:root {
  --paper: #f5f6f8;
  --paper-2: #ffffff;
  --ink: #0f1219;
  --ink-soft: #4a5568;
  --muted: #8f99a8;
  --line: #dde1e9;
  --line-strong: #c4d0de;
  --accent: #2a3f6f;
  --accent-light: #e2eaf5;
  --accent-mid: #8baac8;
  --warn: #b45a62;
  --serif: "Inter", system-ui, sans-serif;
  --sans: "Inter", system-ui, sans-serif;
  --maxw: 1280px;
  --pad: clamp(20px, 5vw, 80px);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  width: 100%;
  overflow-x: hidden;
}
::selection { background: var(--ink); color: var(--paper); }
a { color: inherit; text-decoration: none; }
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding-inline: var(--pad); }

/* ---- nav ---- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  width: 100%;
}
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 74px; }
.brand { font-family: var(--serif); font-size: 23px; font-weight: 500; letter-spacing: -.01em; white-space: nowrap; }
.brand i { font-style: italic; }
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  width: 44px;
  height: 44px;
  place-items: center;
  cursor: pointer;
  color: var(--ink);
}
.nav-toggle svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 2; }
.nav-links { display: flex; gap: 36px; align-items: center; }
.nav-links a {
  font-size: 14.5px; font-weight: 500; color: var(--ink-soft);
  position: relative; padding: 4px 0; white-space: nowrap;
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 1px; width: 0;
  background: var(--ink); transition: width .3s ease;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a:hover::after { width: 100%; }
.nav-cta {
  border: 1px solid var(--accent); border-radius: 999px; padding: 9px 20px !important;
  color: var(--accent) !important; transition: background .25s, color .25s;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transform: translateZ(0);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  outline: none;
}
.nav-cta::after { display: none; }
.nav-cta:hover { background: var(--accent); color: var(--paper-2) !important; }
@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-toggle { display: grid; }
  nav.open .nav-links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    position: absolute;
    top: 74px;
    left: 0;
    right: 0;
    background: var(--paper-2);
    border-bottom: 1px solid var(--line);
    padding: 1.5rem var(--pad);
    z-index: 200;
  }
  nav.open .nav-links a { display: block; }
}

/* ---- shared section bits ---- */
section { position: relative; }
.eyebrow {
  font-size: 12.5px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase;
  color: var(--muted); display: inline-flex; align-items: center; gap: 12px;
}
.eyebrow::before { content: ""; width: 26px; height: 1px; background: var(--line-strong); }
h2.title {
  font-family: var(--serif); font-weight: 400; letter-spacing: -.02em;
  font-size: clamp(28px, 3.8vw, 44px); line-height: 1.16; color: var(--ink);
  margin-top: 18px; max-width: 18ch; text-wrap: balance;
}
h2.title em { font-style: normal; font-weight: 600; color: var(--accent); }
.lede { font-size: clamp(17px, 1.6vw, 20px); color: var(--muted); margin-top: 22px; line-height: 1.55; }

/* reveal */
.reveal { transition: opacity .8s ease, transform .8s cubic-bezier(.2,.7,.2,1); }
.anim .reveal { opacity: 0; transform: translateY(22px); }
.anim .reveal.in { opacity: 1; transform: none; }

/* ---- section backgrounds (alternating rhythm) ---- */
#about, #skills { background: var(--paper-2); }

/* ---- section spacing ---- */
.section-pad { padding: clamp(56px, 7vh, 88px) 0; width: 100%; }

/* ---- hero ---- */
.hero { padding-top: clamp(88px, 11vh, 120px); padding-bottom: clamp(48px, 6vh, 72px); width: 100%; }
.hero-grid { display: grid; grid-template-columns: 1.06fr 0.94fr; gap: clamp(32px, 4.5vw, 64px); align-items: center; }
.hero-eyebrow { margin-bottom: 22px; }
.hero h1 {
  font-family: var(--serif); font-weight: 300; letter-spacing: -.02em;
  font-size: clamp(34px, 4.4vw, 52px); line-height: 1.08; color: var(--ink);
  text-wrap: balance;
}
.hero h1 em { font-style: normal; font-weight: 600; color: var(--accent); }
.hero h1 .u {
  position: relative; white-space: nowrap; color: var(--accent); font-weight: 600;
}
.hero-text .lede { margin-top: 26px; max-width: 48ch; }
.hero-actions { display: flex; gap: 14px; margin-top: 34px; flex-wrap: wrap; align-items: center; }

/* ---- buttons ---- */
.btn {
  font-family: var(--sans); font-size: 15px; font-weight: 600; cursor: pointer;
  border-radius: 999px; padding: 13px 28px; border: 1px solid transparent;
  transition: transform .2s ease, background .25s ease, color .25s ease, border-color .25s ease;
  display: inline-flex; align-items: center; gap: 10px;
  line-height: 1;
}
.btn-solid { background: var(--accent); color: var(--paper-2); border-color: var(--accent); }
.btn-solid:hover { transform: translateY(-2px); background: #1e2f55; border-color: #1e2f55; }
.btn-ghost {
  background: transparent; color: var(--accent); border-color: var(--accent);
  font-size: 13px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
  padding: 12px 22px;
}
.btn-ghost:hover { background: var(--accent); color: var(--paper-2); }
.btn svg { width: 17px; height: 17px; flex-shrink: 0; transition: transform .25s ease; }
.btn-solid:hover svg { transform: translate(3px, -3px); }

.hero-portrait { display: flex; flex-direction: column; }
.portrait-frame { width: 100%; height: clamp(380px, 50vh, 520px); border-radius: 18px; overflow: hidden; }
.portrait-frame img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.portrait-cap { margin-top: 16px; }
.portrait-cap .k { font-family: var(--serif); font-style: normal; font-size: 14px; color: var(--muted); line-height: 1.55; }

@media (max-width: 1024px) {
  .hero-grid { gap: clamp(30px, 5vw, 50px); }
}
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .portrait-frame { height: 380px; }
}
@media (max-width: 480px) {
  .hero-actions { flex-direction: column; width: 100%; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .hero h1 { font-size: clamp(28px, 7vw, 36px); }
}

/* ---- hero stats ---- */
.hero-stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 0;
  margin-top: clamp(40px, 6vh, 64px); border-top: 1px solid var(--line);
}
.stat { padding: 28px 0 6px; padding-right: 24px; }
.stat .n {
  font-family: var(--serif); font-size: clamp(26px, 4vw, 48px); font-weight: 400;
  letter-spacing: -.02em; color: var(--accent);
}
.stat .l { font-size: 14px; color: var(--muted); margin-top: 6px; letter-spacing: .01em; }
@media (max-width: 600px) {
  .hero-stats { grid-template-columns: 1fr 1fr; }
  .hero-stats .stat:last-child { grid-column: span 2; }
}

/* ---- about ---- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 5vw, 80px);
  align-items: start;
}
.about-body .eyebrow { margin-bottom: 0; }
.about-body p { color: var(--ink-soft); font-size: 17px; line-height: 1.85; font-weight: 300; }
.about-body .lede { font-size: clamp(17px, 1.6vw, 20px); color: var(--muted); }
.about-body p + p { margin-top: 18px; }
.about-pillars {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  align-self: start;
}
.pillar {
  padding: 22px 24px;
  background: var(--paper-2);
}
.pillar-label { font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin-bottom: 10px; }
.pillar-text { color: var(--ink-soft); font-size: 15px; line-height: 1.7; }
@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; gap: clamp(28px, 4vw, 48px); }
}
@media (max-width: 520px) {
  .about-pillars { grid-template-columns: 1fr; }
  .pillar { padding: 18px 20px; }
}

/* ---- work ---- */
.work-list {
  margin-top: 40px;
  display: grid;
  gap: 20px;
}
.project {
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 70px); align-items: start;
  padding: clamp(28px, 5vw, 56px); background: var(--paper-2); border-radius: 0;
  transition: transform .2s ease, background .2s ease;
  position: relative;
}
.project:hover { transform: translateY(-2px); background: var(--accent-light); }
.project::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--accent-mid);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform .35s ease;
}
.project:hover::before { transform: scaleY(1); }
.project:nth-child(even) .project-media { order: 2; }
.project-media { position: relative; overflow: hidden; }
.project-kicker {
  display: flex; align-items: center; gap: 14px; font-size: 13px; color: var(--muted);
  letter-spacing: .04em; text-transform: uppercase; font-weight: 600;
}
.project-kicker .num { font-family: var(--serif); font-style: italic; text-transform: none; font-size: 20px; letter-spacing: 0; color: var(--ink); }
.project h3 {
  font-family: var(--serif); font-weight: 500; font-size: clamp(22px, 2.4vw, 30px);
  letter-spacing: -.02em; line-height: 1.12; margin-top: 14px;
}
.project .desc { color: var(--ink-soft); font-size: 16px; margin-top: 16px; max-width: 48ch; line-height: 1.75; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.tag {
  font-size: 12px; font-weight: 600; color: var(--ink-soft); border: 1px solid var(--line-strong);
  border-radius: 999px; padding: 7px 14px;
}
.shot-img {
  width: 100%; height: 420px; border-radius: 10px; overflow: hidden;
}
.shot-img img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
@media (max-width: 920px) {
  .project { padding: clamp(24px, 4vw, 42px); }
}
@media (max-width: 760px) {
  .project { grid-template-columns: 1fr; }
  .project:nth-child(even) .project-media { order: 0; }
  .shot-img { height: 280px; }
}
@media (max-width: 480px) {
  .shot-img { height: 220px; }
}

/* ---- skills ---- */
.skills-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line);
  border: 1px solid var(--line); margin-top: 38px;
}
.skill-cat { background: var(--paper); padding: 30px; }
.skill-cat:hover { background: var(--accent-light); }
.skill-head { display: flex; align-items: baseline; justify-content: space-between; }
.skill-head h3 { font-family: var(--serif); font-weight: 500; font-size: 24px; letter-spacing: -.01em; }
.level { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.skill-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.skill-list span { font-size: 14.5px; color: var(--ink-soft); }
.skill-list span:not(:last-child)::after { content: "·"; margin-left: 8px; color: var(--line-strong); }
@media (max-width: 680px) { .skills-grid { grid-template-columns: 1fr; } }

/* ---- skills ai sub-section ---- */
.skills-ai-head { margin-top: 56px; margin-bottom: 0; }
.platform-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  margin-top: 24px;
}
.platform-card {
  background: var(--paper);
  padding: 30px;
}
.platform-card:hover { background: var(--accent-light); }
.platform-card h4 {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 500;
  margin-bottom: 12px;
  color: var(--ink);
}
.platform-card p {
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.7;
}
@media (max-width: 680px) {
  .platform-grid { grid-template-columns: 1fr; }
}

/* ---- contact ---- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 76px); align-items: start; }
.contact-left h2 { margin-top: 18px; }
.contact-left .lede { max-width: 42ch; }
.contact-info { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.ci { display: flex; align-items: center; gap: 18px; padding: 4px 0; }
.ci .ic {
  width: 44px; height: 44px; border: 1px solid var(--line-strong); border-radius: 50%;
  display: grid; place-items: center; flex: none;
}
.ci .ic svg { width: 19px; height: 19px; stroke: var(--ink); }
button.copy-email {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 999px;
  width: 44px;
  min-width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background .25s ease, color .25s ease, border-color .25s ease;
}
button.copy-email:hover { background: var(--accent); color: var(--paper-2); border-color: var(--accent); }
button.copy-email svg { width: 18px; height: 18px; stroke: currentColor; }
button.copy-email:hover svg { stroke: var(--paper-2); }
.copy-email-label { font-size: 13px; color: var(--muted); }

form.card { background: var(--paper-2); border: 1px solid var(--line); border-radius: 18px; padding: clamp(26px,3vw,40px); }
form.card h3 { font-family: var(--serif); font-weight: 500; font-size: 26px; letter-spacing: -.01em; }
.field { margin-top: 20px; }
.field label { display: block; font-size: 13.5px; font-weight: 600; color: var(--ink-soft); margin-bottom: 8px; }
.field label .required { color: var(--warn); }
.field input, .field textarea {
  width: 100%; font-family: var(--sans); font-size: 16px; color: var(--ink);
  background: var(--paper); border: 1px solid var(--line); border-radius: 11px; padding: 14px 16px;
  transition: border-color .2s, background .2s;
}
.field textarea { resize: vertical; min-height: 120px; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); background: var(--paper-2); }
.field input::placeholder, .field textarea::placeholder { color: var(--muted); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 520px) { .form-row { grid-template-columns: 1fr; } }
form .btn-solid { width: 100%; justify-content: center; margin-top: 26px; border: 0; }
.privacy { text-align: center; font-size: 13px; color: var(--muted); margin-top: 16px; }
.form-success { display: none; text-align: center; padding: 30px 10px; }
.form-success.show { display: block; }
.form-success .ok {
  width: 56px; height: 56px; border-radius: 50%; background: var(--accent); color: var(--paper-2);
  display: grid; place-items: center; margin: 0 auto 18px;
}
.form-success h3 { font-family: var(--serif); font-size: 26px; font-weight: 500; }
.form-success p { color: var(--muted); margin-top: 8px; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }

/* ---- footer ---- */
footer { padding: clamp(28px, 4vh, 48px) 0; border-top: 1px solid var(--line); width: 100%; }
footer .wrap { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px; }
footer .c { color: var(--muted); font-size: 14px; }
footer .fl { display: flex; gap: 26px; font-size: 14px; }
footer .fl a { color: var(--ink-soft); }
footer .fl a:hover { color: var(--ink); }
