  :root {
    --bg: #131620;
    --bg-2: #181C26;
    --panel: #1D2230;
    --panel-2: #232838;
    --ink: #F4F4F2;
    --ink-2: #C8CAD3;
    --muted: #8489A0;
    --rule: rgba(255,255,255,0.08);
    --rule-strong: rgba(255,255,255,0.18);
    --accent: #3B82F6;
    --accent-2: #60A5FA;
    --accent-soft: rgba(59, 130, 246, 0.14);
    --accent-glow: rgba(59, 130, 246, 0.35);
    --max: 1200px;
  }
  * { box-sizing: border-box; }
  html, body { margin: 0; padding: 0; overflow-x: hidden; }
  body {
    background: var(--bg);
    color: var(--ink);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
  }
  body::before {
    content: "";
    position: fixed;
    pointer-events: none;
    top: -200px; right: -200px;
    width: 720px; height: 720px;
    background: radial-gradient(circle, var(--accent-glow), transparent 60%);
    opacity: 0.55;
    filter: blur(40px);
    z-index: 0;
  }
  a { color: var(--ink); text-decoration: none; }
  a:hover { color: var(--accent); }
  .mono { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 12px; letter-spacing: 0.04em; }

  .wrap { max-width: var(--max); margin: 0 auto; padding: 0 28px; position: relative; z-index: 1; }

  /* Header */
  header.site {
    border-bottom: 1px solid var(--rule);
    padding: 18px 0;
    position: sticky; top: 0;
    background: rgba(19, 22, 32, 0.78);
    backdrop-filter: saturate(140%) blur(12px);
    z-index: 5;
  }
  header.site .row {
    display: flex; align-items: center; justify-content: space-between; gap: 24px;
  }
  .brand {
    display: inline-flex; align-items: center; gap: 12px;
    font-weight: 600;
    font-size: 15px;
    letter-spacing: -0.01em;
    color: var(--ink);
  }
  .brand .avatar {
    width: 40px; height: 40px;
    border-radius: 50%;
    overflow: hidden;
    background: #333;
    border: 1px solid var(--rule-strong);
    box-shadow: 0 0 0 3px rgba(255,255,255,0.04);
    flex-shrink: 0;
  }
  .brand .avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
  nav.primary {
    display: flex; gap: 4px; align-items: center;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1.6px;
    font-weight: 600;
  }
  nav.primary a {
    color: var(--ink-2);
    padding: 10px 14px;
    border-radius: 6px;
    transition: color .15s ease, background .15s ease;
  }
  nav.primary a:hover { color: var(--ink); background: rgba(255,255,255,0.04); }
  nav.primary a.active { color: var(--accent); }
  nav.primary a.active::before {
    content: "";
    display: inline-block;
    width: 6px; height: 6px;
    background: var(--accent);
    border-radius: 50%;
    margin-right: 8px;
    transform: translateY(-2px);
    box-shadow: 0 0 8px var(--accent-glow);
  }

  /* Hero */
  .hero {
    padding: 96px 0 72px;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 64px;
    align-items: center;
    border-bottom: none;
  }
  .hero .portrait-wrap { grid-column: 2; grid-row: 1; }
  .hero .hero-text { grid-column: 1; grid-row: 1; }
  .eyebrow {
    text-transform: uppercase;
    letter-spacing: 3.6px;
    font-size: 12px;
    color: var(--muted);
    font-weight: 600;
    margin-bottom: 28px;
    display: inline-flex; align-items: center; gap: 12px;
  }
  .eyebrow::before {
    content: "";
    display: inline-block;
    width: 32px; height: 1px;
    background: var(--accent);
  }
  h1 {
    font-weight: 700;
    font-size: clamp(36px, 5.4vw, 62px);
    line-height: 1.04;
    letter-spacing: -0.035em;
    margin: 0 0 28px;
    color: var(--ink);
  }
  h1 .accent { color: var(--accent); }
  h1 .line { display: block; }
  .lede {
    font-size: 18px;
    line-height: 1.7;
    color: var(--ink-2);
    max-width: 54ch;
    margin: 0 0 36px;
  }
  .pill-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 36px; }
  .pill {
    display: inline-block;
    padding: 7px 14px;
    background: var(--panel);
    border: 1px solid var(--rule);
    border-radius: 999px;
    font-size: 13px;
    color: var(--ink-2);
  }
  .pill.dark {
    background: transparent;
    color: var(--accent);
    border-color: var(--accent);
  }

  .cta-row { display: flex; flex-wrap: wrap; gap: 12px; }
  .btn {
    display: inline-flex; align-items: center; gap: 10px;
    padding: 14px 22px;
    border-radius: 999px;
    font-weight: 600; font-size: 14px;
    letter-spacing: 0.02em;
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  }
  .btn-primary {
    background: var(--accent);
    color: white;
    box-shadow: 0 8px 30px -8px var(--accent-glow);
  }
  .btn-primary:hover { transform: translateY(-1px); background: var(--accent-2); color: white; }
  .btn-ghost {
    background: transparent;
    color: var(--ink);
    border: 1px solid var(--rule-strong);
  }
  .btn-ghost:hover { background: rgba(255,255,255,0.04); color: var(--ink); }

  .portrait-wrap {
    position: relative;
    aspect-ratio: 4/5;
    max-width: 345px;
    margin-left: auto;
  }
  .portrait-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
    display: block;
    border: 1px solid var(--rule-strong);
    box-shadow: 0 30px 60px -30px rgba(0,0,0,0.6);
    filter: contrast(1.02) saturate(0.95);
  }

  /* Stats grid */
  .stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    border-top: 1px solid var(--rule-strong);
    border-bottom: 1px solid var(--rule-strong);
    margin: 24px 0 0;
  }
  .stat {
    padding: 32px 22px;
    border-right: 1px solid var(--rule);
    display: flex; flex-direction: column;
  }
  .stat:last-child { border-right: none; }
  .stat .num {
    font-weight: 700;
    font-size: 56px;
    line-height: 1;
    letter-spacing: -0.04em;
    color: var(--ink);
  }
  .stat .num .small { font-size: 28px; vertical-align: top; line-height: 1; color: var(--accent); margin-left: 2px; }
  .stat .num.accent { color: var(--accent); }
  .stat .label {
    margin-top: 16px;
    font-size: 13px;
    color: var(--muted);
    line-height: 1.5;
  }

  /* Sections */
  section { padding: 110px 0; border-bottom: 1px solid var(--rule); }
  section:last-of-type { border-bottom: none; }
  .section-grid {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 56px;
  }
  .section-grid .label-col { position: sticky; top: 90px; align-self: start; }
  .section-grid h2 {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 2.2px;
    margin: 0 0 6px;
    color: var(--ink);
    font-weight: 600;
  }
  .section-grid .num-tag {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: var(--accent);
    letter-spacing: 0.06em;
  }
  .section-grid .lede-2 {
    font-size: clamp(24px, 2.6vw, 34px);
    line-height: 1.25;
    letter-spacing: -0.02em;
    margin: 0 0 32px;
    max-width: 28ch;
    font-weight: 600;
    color: var(--ink);
  }
  .section-grid .lede-2 .accent { color: var(--accent); }
  .section-grid p {
    margin: 0 0 18px;
    max-width: 64ch;
    color: var(--ink-2);
    font-size: 16px;
  }

  /* Expertise cards */
  .skill-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }
  .skill {
    background: var(--panel);
    border: 1px solid var(--rule);
    border-radius: 8px;
    padding: 26px 24px;
    transition: border-color .2s ease, transform .2s ease, background .2s ease;
    position: relative;
  }
  .skill:hover {
    border-color: var(--accent);
    background: var(--panel-2);
    transform: translateY(-2px);
  }
  .skill .num {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: var(--accent);
    margin-bottom: 18px;
    letter-spacing: 0.08em;
  }
  .skill h3 {
    font-size: 17px;
    font-weight: 600;
    margin: 0 0 8px;
    letter-spacing: -0.01em;
    color: var(--ink);
  }
  .skill p { margin: 0; font-size: 14px; color: var(--muted); line-height: 1.55; }

  /* Experience */
  .timeline { display: flex; flex-direction: column; gap: 0; }
  .role {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 32px;
    padding: 36px 0;
    border-top: 1px solid var(--rule);
    align-items: start;
  }
  .role:first-child { border-top: 1px solid var(--rule-strong); }
  .role .when {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: var(--muted);
    letter-spacing: 0.04em;
    padding-top: 4px;
  }
  .role .org {
    color: var(--accent);
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.6px;
    margin-bottom: 8px;
    font-family: 'Inter', sans-serif;
  }
  .role h3 {
    font-size: 22px;
    font-weight: 600;
    margin: 0 0 14px;
    letter-spacing: -0.015em;
    line-height: 1.3;
    color: var(--ink);
  }
  .role ul { margin: 0; padding-left: 18px; color: var(--ink-2); }
  .role ul li { margin-bottom: 10px; line-height: 1.65; }
  .role ul li::marker { color: var(--accent); }

  /* Education */
  .edu-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
  }
  .edu-card {
    background: var(--panel);
    border: 1px solid var(--rule);
    border-radius: 8px;
    padding: 26px;
  }
  .edu-card .num {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: var(--accent);
    letter-spacing: 0.08em;
    margin-bottom: 14px;
  }
  .edu-card h3 { margin: 0 0 6px; font-size: 17px; font-weight: 600; color: var(--ink); }
  .edu-card p { margin: 0; color: var(--muted); font-size: 14px; }
  .cert-link {
    display: inline-flex; align-items: center; gap: 6px;
    color: var(--accent);
    font-size: 13px;
    font-weight: 500;
    margin-top: 14px;
    transition: color .15s ease;
  }
  .cert-link:hover { color: var(--accent-2); text-decoration: underline; text-underline-offset: 4px; }

  /* Publications */
  .pub-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0; }
  .pub-list li {
    border-top: 1px solid var(--rule);
    padding: 22px 0;
  }
  .pub-list li:first-child { border-top: 1px solid var(--rule-strong); }
  .pub-list a {
    display: block;
    color: var(--ink);
    transition: color .15s ease;
  }
  .pub-list a:hover { color: var(--accent); }
  .pub-list a:hover h3 { text-decoration: underline; text-underline-offset: 4px; }
  .pub-list h3 {
    font-size: 17px;
    font-weight: 600;
    letter-spacing: -0.01em;
    margin: 0 0 6px;
    line-height: 1.35;
    color: var(--ink);
  }
  .pub-list h3 .ext {
    color: var(--accent);
    font-weight: 700;
    font-size: 20px;
    margin-left: 8px;
    display: inline-block;
    transition: transform .15s ease;
    text-decoration: none;
  }
  .pub-list a:hover .ext { transform: translate(2px, -2px); color: var(--accent-2); }
  .pub-list p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.5; max-width: 60ch; }

  /* Footer CTA */
  footer.cta {
    background: var(--bg-2);
    border-top: 1px solid var(--rule);
    padding: 110px 0 32px;
    position: relative;
    overflow: hidden;
  }
  footer.cta::before {
    content: "";
    position: absolute;
    bottom: -300px; left: -200px;
    width: 600px; height: 600px;
    background: radial-gradient(circle, var(--accent-glow), transparent 65%);
    opacity: 0.4;
    filter: blur(40px);
  }
  footer.cta .grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 56px;
    align-items: end;
    position: relative;
  }
  footer.cta h2 {
    font-size: clamp(40px, 5.4vw, 64px);
    font-weight: 700;
    line-height: 1.0;
    letter-spacing: -0.035em;
    margin: 0 0 18px;
    max-width: 14ch;
    color: var(--ink);
  }
  footer.cta h2 .accent { color: var(--accent); }
  footer.cta p { color: var(--ink-2); max-width: 50ch; margin: 0 0 32px; font-size: 17px; }
  footer.cta .channels { display: flex; flex-direction: column; gap: 0; }
  footer.cta .channel {
    display: flex; justify-content: space-between; align-items: center;
    padding: 22px 0;
    border-top: 1px solid var(--rule);
    color: var(--ink);
    transition: padding .2s ease, color .15s ease;
  }
  footer.cta .channel:hover { padding-left: 8px; color: var(--accent); }
  footer.cta .channel:last-child { border-bottom: 1px solid var(--rule); }
  footer.cta .channel .lab {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px; letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
  }
  footer.cta .channel .val { font-size: 17px; font-weight: 500; }
  .colophon {
    margin-top: 48px;
    color: var(--muted);
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.06em;
    display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px;
    position: relative;
  }

  /* Responsive */
  @media (max-width: 960px) {
    .hero {
      display: block;
      padding: 56px 0 40px;
    }
    .hero::after { content: ""; display: block; clear: both; }
    .hero .portrait-wrap {
      float: right;
      width: 240px;
      max-width: 40%;
      margin: 8px 0 20px 28px;
      aspect-ratio: 4/5;
    }
    .stats { grid-template-columns: repeat(2, 1fr); }
    .stat:nth-child(2) { border-right: none; }
    .stat:nth-child(1), .stat:nth-child(2) { border-bottom: 1px solid var(--rule); }
    .section-grid { grid-template-columns: 1fr; gap: 24px; }
    .section-grid .label-col { position: static; }
    .skill-grid, .edu-grid { grid-template-columns: 1fr; }
    .role { grid-template-columns: 1fr; gap: 8px; }
    footer.cta .grid { grid-template-columns: 1fr; gap: 40px; }
  }
  @media (max-width: 740px) {
    nav.primary a:not([href="#contact"]) { display: none; }
    nav.primary a { padding: 8px 10px; letter-spacing: 0.1em; }
  }
  @media (max-width: 520px) {
    .hero {
      display: flex;
      flex-direction: column;
      padding: 16px 0 32px;
      gap: 0;
      align-items: stretch;
    }
    .hero .hero-text { order: 1; }
    .hero .portrait-wrap {
      float: none;
      width: 100%;
      max-width: 260px;
      margin: 22px 0 0;
      order: 2;
      align-self: flex-start;
    }
    section { padding: 55px 0; }
    .stats { grid-template-columns: 1fr; }
    .stat { border-right: none; border-bottom: 1px solid var(--rule); }
    .stat:last-child { border-bottom: none; }
    h1 { font-size: 36px; }
  }
