:root {
  --deep: #020617;
  --mid: #0f172a;
  --card: #111a2e;
  --card-hover: #16213a;
  --line: #1e293b;
  --text: #f1f5f9;
  --muted: #94a3b8;
  --dim: #64748b;
  --col: 760px;
  --radius: 22px;
  --font: 'Google Sans Flex', 'Google Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  background: var(--deep);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
b { color: var(--text); font-weight: 500; }

.col { width: 100%; max-width: calc(var(--col) + 48px); margin: 0 auto; padding: 0 24px; }
.band { padding: 120px 0; }
.band-deep { background: var(--deep); }
.band-mid { background: var(--mid); }
.band-light { background: #1e293b; }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 10;
  background: rgba(2, 6, 23, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.brand { display: flex; align-items: center; gap: 12px; font-weight: 500; font-size: 15px; }
.brand img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
.nav-links { display: flex; gap: 24px; font-size: 14px; font-weight: 500; }
.nav-links a { color: var(--text); opacity: .85; transition: opacity .2s; }
.nav-links a:hover { opacity: 1; }

/* Hero */
.hero { padding-top: 96px; }
.hero-grid { display: grid; grid-template-columns: 300px 1fr; gap: 56px; align-items: center; }
.portrait { border-radius: var(--radius); overflow: hidden; aspect-ratio: 4 / 5; background: var(--card); }
.portrait img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 12%; }
h1 { font-size: 46px; line-height: 1.12; font-weight: 500; letter-spacing: -0.02em; }
.lede { margin-top: 24px; font-size: 19px; line-height: 1.55; color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }
.pill {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 16px; border-radius: 999px;
  font-size: 15px; font-weight: 500;
  transition: transform .2s, background .2s;
}
.pill svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pill-solid { background: #e2e8f0; color: var(--deep); }
.pill-solid:hover { background: #fff; transform: translateY(-1px); }
.pill-outline { border: 1px solid #cbd5e1; color: var(--text); }
.pill-outline:hover { background: rgba(255,255,255,.08); transform: translateY(-1px); }

.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 48px; }
.stat { background: var(--card); border-radius: var(--radius); padding: 30px 32px; }
.stat strong { display: block; font-size: 30px; font-weight: 500; letter-spacing: -0.01em; }
.stat strong span { color: var(--dim); }
.stat strong .to { font-size: .8em; }
.stat p { margin-top: 10px; font-size: 15px; line-height: 1.5; color: var(--dim); }

/* Narrative */
.statement { font-size: 38px; line-height: 1.2; font-weight: 500; letter-spacing: -0.015em; }
.prose { margin-top: 48px; color: var(--muted); font-size: 15px; line-height: 1.75; }
.prose p + p { margin-top: 18px; }

/* Work */
.section-title { font-size: 36px; font-weight: 500; letter-spacing: -0.015em; margin-bottom: 40px; }
.section-sub { margin: -24px 0 40px; color: var(--muted); }
.work { display: block; }
.work + .work { margin-top: 96px; }
.work-media { border-radius: var(--radius); overflow: hidden; aspect-ratio: 16 / 9; background: #e7e5df; }
.work-media img { width: 100%; height: 100%; object-fit: cover; object-position: top center; transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.work:hover .work-media img { transform: scale(1.03); }
.work-meta { display: flex; align-items: center; gap: 10px; margin-top: 20px; font-size: 14px; font-weight: 500; }
.work-meta i { width: 3px; height: 3px; border-radius: 50%; background: var(--dim); }
.work-meta { color: var(--text); }
.badge {
  display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%;
  background: var(--c); color: #fff; font-size: 11px; font-weight: 600;
}
.work h3 { margin-top: 8px; font-size: 30px; line-height: 1.25; font-weight: 500; letter-spacing: -0.01em; transition: color .2s; }
.work:hover h3 { color: #cbd5e1; }

/* AI Lab */
.lab { display: grid; gap: 16px; }
.lab-card { display: block; background: var(--card); border-radius: var(--radius); padding: 32px; transition: background .2s; }
.lab-card:hover { background: var(--card-hover); }
.lab-card h3 { margin-top: 14px; font-size: 22px; font-weight: 500; }
.lab-card p { margin-top: 8px; color: var(--muted); font-size: 15px; }
.status { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 500; color: var(--muted); }
.status::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--dim); }
.status.live::before { background: #4ade80; }
.more { display: inline-flex; align-items: center; gap: 8px; margin-top: 20px; font-size: 14px; font-weight: 500; }
.more svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s; }
.lab-card:hover .more svg { transform: translateX(4px); }

/* Contact & footer */
.contact h2 { font-size: 38px; line-height: 1.2; font-weight: 500; letter-spacing: -0.015em; }
.contact p { margin-top: 16px; color: var(--muted); }
.footer { padding: 40px 0; border-top: 1px solid var(--line); }
.footer-inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px; font-size: 14px; color: var(--dim); }
.footer-inner nav { display: flex; gap: 20px; }
.footer-inner a:hover { color: var(--text); }

/* Reveal */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .work-media img { transition: none; }
}

/* Responsive */
@media (max-width: 720px) {
  body { font-size: 16px; }
  .band { padding: 80px 0; }
  .hero { padding-top: 56px; }
  .col { padding: 0 16px; }
  .hero-grid { grid-template-columns: 1fr; gap: 28px; }
  .portrait { width: 190px; aspect-ratio: 4 / 5; }
  h1 { font-size: 36px; }
  .lede { font-size: 18px; }
  .stats { grid-template-columns: 1fr; }
  .statement, .contact h2 { font-size: 28px; }
  .section-title { font-size: 30px; }
  .work + .work { margin-top: 64px; }
  .work h3 { font-size: 23px; }
  .nav-links { gap: 16px; }
  .brand span { display: none; }
}

/* ---------- Multi-page additions ---------- */
.nav-links a[aria-current="page"] { opacity: 1; text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 1px; }
.portrait video, .portrait img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 12%; display: block; }
.eyebrow { font-size: 12px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 16px; }
.page-hero { padding: 96px 0 72px; }
.page-hero h1 { max-width: 680px; }
.page-hero .lede { max-width: 680px; }
.page-hero.card-hero .col > div { background: var(--mid); border-radius: 0 0 32px 32px; padding: 72px 48px; margin: -96px -48px 0; }
.link-row { margin-top: 56px; }
.text-link { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 500; }
.text-link svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s; }
.text-link:hover svg { transform: translateX(4px); }

/* About */
.col-wide { max-width: calc(960px + 48px); }
.about-grid { display: grid; grid-template-columns: 1fr 300px; gap: 56px; align-items: start; }
.about-grid h1 { font-size: 42px; }
.about-grid .prose { margin-top: 32px; }
.about-side { position: sticky; top: 96px; }
.about-side .portrait { aspect-ratio: 4 / 5; }
.side-title { margin: 32px 0 16px; font-size: 12px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.timeline { list-style: none; display: grid; gap: 18px; }
.timeline li { display: grid; grid-template-columns: 32px 1fr; gap: 12px; align-items: start; }
.timeline .badge { width: 32px; height: 32px; font-size: 13px; }
.timeline strong { display: block; font-size: 14px; font-weight: 500; }
.timeline div span { display: block; font-size: 13px; color: var(--muted); line-height: 1.4; }
.timeline em { font-style: normal; font-size: 12px; color: var(--dim); }
.side-links { display: flex; gap: 24px; margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); }
.skills { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 8px; }
.skill { background: var(--card); border-radius: var(--radius); padding: 28px; }
.skill h3 { font-size: 18px; font-weight: 500; line-height: 1.3; }
.skill p { margin-top: 10px; font-size: 14px; color: var(--muted); }

/* AI Lab entries */
.entry + .entry { border-top: 1px solid var(--line); margin-top: 96px; padding-top: 96px; }
.entry h2 { font-size: 34px; line-height: 1.2; font-weight: 500; letter-spacing: -0.015em; }
.entry .byline { margin-top: 12px; color: var(--dim); font-size: 15px; }
.entry .byline b { color: var(--muted); }
.entry-points { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 36px; }
.entry-points div { background: var(--card); border-radius: 18px; padding: 22px 24px; }
.entry-points strong { display: block; font-size: 15px; font-weight: 500; }
.entry-points span { display: block; margin-top: 4px; font-size: 14px; color: var(--muted); }
.entry .prose { margin-top: 36px; }
.entry .prose b { font-weight: 600; }

/* Contact form */
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 48px; }
.field { display: grid; gap: 8px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 13px; color: var(--muted); }
.field input, .field textarea {
  width: 100%; font: inherit; font-size: 15px; color: var(--text);
  background: var(--card); border: 1px solid transparent; border-radius: 10px; padding: 12px 14px;
  transition: border-color .2s;
}
.field textarea { min-height: 160px; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: var(--dim); }
.field input:focus, .field textarea:focus { outline: none; border-color: #64748b; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-foot { grid-column: 1 / -1; display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.form button { border: 0; cursor: pointer; font: inherit; padding: 10px 28px; }
.form button[disabled] { opacity: .6; cursor: wait; }
.form-status { font-size: 14px; color: var(--muted); }
.form-status.ok { color: #4ade80; }
.form-status.err { color: #fca5a5; }
.contact-alt { margin-top: 64px; padding-top: 32px; border-top: 1px solid var(--line); color: var(--muted); font-size: 15px; }
.contact-alt a { color: var(--text); text-decoration: underline; text-underline-offset: 4px; }
.min-page { min-height: calc(100vh - 60px - 97px); }

@media (max-width: 860px) {
  .about-grid { grid-template-columns: 1fr; }
  .about-side { position: static; max-width: 420px; }
  .skills { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .page-hero { padding: 56px 0 48px; }
  .page-hero.card-hero .col > div { padding: 56px 16px 40px; margin: -56px -16px 0; border-radius: 0 0 24px 24px; }
  .about-grid h1 { font-size: 32px; }
  .entry h2 { font-size: 26px; }
  .entry + .entry { margin-top: 64px; padding-top: 64px; }
  .entry-points, .form { grid-template-columns: 1fr; }
}
