:root {
  color-scheme: dark;
  --bg: #08090e;
  --panel: #121319;
  --ink: #f7f7fb;
  --ink-2: #c8c9d1;
  --muted: #91939f;
  --line: #2a2b34;
  --line-strong: #e8e8ee;
  --accent: #5a5cff;
  --accent-ink: #9da0ff;
  --accent-soft: #20214e;
  --on-accent: #ffffff;
  --header-bg: rgba(8, 9, 14, .88);
  --font-display: "Archivo", Arial, sans-serif;
  --font-body: "Space Grotesk", Arial, sans-serif;
  --page: min(1320px, calc(100vw - 48px));
  --header-h: 72px;
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f5f5f8;
  --panel: #ffffff;
  --ink: #0b0b10;
  --ink-2: #34343d;
  --muted: #62636e;
  --line: #d4d5db;
  --line-strong: #0b0b10;
  --accent: #4f51f4;
  --accent-ink: #3e40c8;
  --accent-soft: #e8e8ff;
  --on-accent: #ffffff;
  --header-bg: rgba(245, 245, 248, .9);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #090b10;
    --panel: #0f1219;
    --ink: #f4f6f8;
    --ink-2: #c2c7d0;
    --muted: #8e96a3;
    --line: #2a303a;
    --line-strong: #f4f6f8;
    --accent: #60a5fa;
    --accent-ink: #93c5fd;
    --accent-soft: #13213a;
    --on-accent: #08111f;
    --header-bg: rgba(9, 11, 16, .94);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 24px); }
body {
  margin: 0;
  background-color: var(--bg);
  background-image: none;
  color: var(--ink);
  font: 400 17px/1.55 var(--font-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
:root[data-theme="dark"] body { background-image: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) body { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 40 40'%3E%3Cpath d='M40 0H0v40' fill='none' stroke='%23171b23' stroke-width='.6'/%3E%3C/svg%3E"); }
}
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 4px; }
img, svg { display: block; max-width: 100%; }
[hidden] { display: none !important; }
::selection { background: var(--accent); color: var(--on-accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
h1, h2, h3, p { margin-top: 0; }
.wrap { width: var(--page); margin-inline: auto; }
.skip-link { position: fixed; z-index: 100; top: 8px; left: 8px; transform: translateY(-160%); background: var(--ink); color: var(--bg); padding: 10px 14px; text-decoration: none; }
.skip-link:focus { transform: translateY(0); }

.site-header { position: sticky; z-index: 40; top: 0; height: var(--header-h); border-bottom: 1px solid var(--line); background: var(--header-bg); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
.header-inner { height: 100%; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 28px; }
.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; font: 750 16px/1 var(--font-display); letter-spacing: -.03em; }
.brand-mark { display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 12px 4px 12px 12px; font: 700 10px/1 var(--font-display); letter-spacing: .03em; background: var(--ink); color: var(--bg); transform: rotate(-4deg); }
.nav { justify-self: center; display: flex; align-items: center; gap: 26px; }
.nav a { color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 500; transition: color .2s ease; }
.nav a:hover, .nav a.active { color: var(--ink); }
.header-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn, .text-btn, .button { min-height: 44px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 9px; text-decoration: none; font-weight: 600; transition: color .2s ease, background .2s ease, border-color .2s ease, transform .2s ease; }
.icon-btn { width: 44px; padding: 0; }
.icon-btn svg { width: 18px; height: 18px; }
.text-btn { padding: 0 14px; font-size: 13px; }
.button { padding: 12px 17px; font-size: 14px; }
.button:hover, .text-btn:hover, .icon-btn:hover { border-color: var(--ink); transform: translateY(-1px); }
.button.primary, .text-btn.primary { border-color: var(--accent); background: var(--accent); color: var(--on-accent); }
.button.primary:hover, .text-btn.primary:hover { border-color: var(--ink); background: var(--ink); color: var(--bg); }
.button .arrow { font-size: 18px; line-height: 1; }

.eyebrow { display: flex; align-items: center; gap: 10px; margin: 0 0 18px; font: 600 12px/1.35 var(--font-body); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.eyebrow::before { content: ""; width: 28px; height: 2px; background: var(--accent); }
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); background: radial-gradient(circle at 72% 42%, rgba(63, 70, 255, .9) 0, rgba(39, 44, 207, .68) 18%, rgba(12, 14, 45, .25) 42%, rgba(8, 9, 14, 0) 63%), var(--bg); }
.hero::after { content: ""; position: absolute; z-index: 0; width: 44vw; height: 44vw; min-width: 460px; min-height: 460px; top: 50%; right: -8vw; transform: translateY(-50%); border: 1px solid rgba(255,255,255,.17); border-radius: 50%; box-shadow: 0 0 0 90px rgba(255,255,255,.035), 0 0 0 180px rgba(255,255,255,.018); pointer-events: none; }
.hero-grid { min-height: calc(100svh - var(--header-h)); display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(340px, .75fr); }
.hero-grid { position: relative; z-index: 1; }
.hero-copy { display: flex; flex-direction: column; justify-content: center; padding: clamp(72px, 9vw, 132px) clamp(32px, 6vw, 88px) clamp(64px, 8vw, 112px) 0; }
.status { display: inline-flex; align-items: center; gap: 9px; align-self: flex-start; border: 1px solid rgba(255,255,255,.18); border-radius: 999px; padding: 9px 13px; margin-bottom: 32px; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); background: rgba(18,19,25,.72); backdrop-filter: blur(10px); }
.status-dot { width: 8px; height: 8px; background: var(--accent); border-radius: 50%; box-shadow: 0 0 0 4px var(--accent-soft); }
h1 { max-width: 860px; margin-bottom: 28px; font: 750 clamp(60px, 8.2vw, 124px)/.86 var(--font-display); font-stretch: 82%; letter-spacing: -.065em; text-wrap: balance; }
h1 .accent { color: var(--accent); }
.hero-intro { max-width: 700px; margin-bottom: 30px; color: var(--ink-2); font-size: clamp(19px, 1.55vw, 24px); line-height: 1.48; }
.hero-intro strong { color: var(--ink); font-weight: 600; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.hero-aside { align-self: center; margin-block: 44px; border: 1px solid rgba(255,255,255,.18); border-radius: 28px; overflow: hidden; display: grid; grid-template-rows: minmax(360px, 1fr) auto; background: rgba(13, 14, 22, .74); backdrop-filter: blur(18px); box-shadow: 0 30px 90px rgba(0,0,0,.38); }
.diagram { position: relative; min-height: 460px; overflow: hidden; color: var(--ink); }
.diagram svg { width: 100%; height: 100%; position: absolute; inset: 0; }
.diagram .trace { stroke: var(--line); stroke-width: 1; fill: none; }
.diagram .trace-strong { stroke: var(--ink); stroke-width: 1.4; fill: none; }
.diagram .trace-accent { stroke: var(--accent); stroke-width: 2; fill: none; }
.diagram .node { fill: var(--panel); stroke: var(--ink); stroke-width: 1.5; }
.diagram .node-accent { fill: var(--accent); stroke: var(--accent); }
.diagram-label { position: absolute; font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.diagram-label.one { left: 10%; top: 13%; }
.diagram-label.two { right: 9%; top: 44%; }
.diagram-label.three { left: 13%; bottom: 13%; }
.diagram-centre { position: absolute; inset: 50% auto auto 50%; transform: translate(-50%, -50%); width: 172px; height: 172px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.35); border-radius: 50%; background: rgba(8,9,14,.76); font: 750 45px/1 var(--font-display); letter-spacing: -.05em; box-shadow: 0 0 70px rgba(90,92,255,.42); }
.diagram-centre::before, .diagram-centre::after { content: ""; position: absolute; background: var(--accent); }
.diagram-centre::before { width: 28px; height: 2px; top: -1px; left: -1px; }
.diagram-centre::after { width: 2px; height: 28px; top: -1px; left: -1px; }
.metric-grid { display: grid; grid-template-columns: repeat(2, 1fr); border-top: 1px solid var(--line-strong); }
.metric { min-height: 128px; padding: 22px; display: flex; flex-direction: column; justify-content: space-between; }
.metric:nth-child(odd) { border-right: 1px solid var(--line); }
.metric:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
.metric-value { font: 700 34px/1 var(--font-display); letter-spacing: -.04em; }
.metric-label { font-size: 12px; line-height: 1.4; color: var(--muted); text-transform: uppercase; letter-spacing: .07em; }

.lens-bar { border-bottom: 1px solid var(--line); background: #0d0e14; }
.lens-inner { display: grid; grid-template-columns: minmax(240px, .7fr) minmax(0, 1.3fr); align-items: stretch; }
.lens-copy { padding: 34px 36px 34px 0; border-right: 1px solid var(--line-strong); }
.lens-copy h2 { margin: 0 0 8px; font: 650 24px/1.1 var(--font-display); letter-spacing: -.03em; }
.lens-copy p { margin: 0; color: var(--muted); font-size: 14px; max-width: 38ch; }
.lens-control { display: grid; grid-template-columns: repeat(3, 1fr); }
.lens-button { appearance: none; position: relative; min-height: 126px; border: 0; border-right: 1px solid var(--line); padding: 24px; background: transparent; text-align: left; cursor: pointer; transition: color .2s ease, background .2s ease, transform .2s ease; }
.lens-button:last-child { border-right: 0; }
.lens-button:hover { background: var(--accent-soft); }
.lens-button[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); box-shadow: inset 0 0 38px rgba(255,255,255,.08); }
.lens-num { display: block; margin-bottom: 22px; font-size: 11px; letter-spacing: .1em; opacity: .72; }
.lens-title { display: block; font: 650 18px/1.1 var(--font-display); }
.lens-sub { display: block; margin-top: 6px; font-size: 12px; line-height: 1.35; opacity: .76; }

.section { padding: clamp(72px, 9vw, 128px) 0; border-bottom: 1px solid var(--line-strong); background: var(--bg); }
.section-head { display: grid; grid-template-columns: 1fr 1.35fr; gap: 48px; align-items: end; margin-bottom: 48px; }
.section-kicker { margin: 0; color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
h2 { margin: 0; font: 700 clamp(42px, 5vw, 72px)/.95 var(--font-display); font-stretch: 86%; letter-spacing: -.055em; }
.section-intro { margin: 0; color: var(--ink-2); font-size: 18px; max-width: 62ch; }

.project-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 16px; }
.project { grid-column: span 4; min-width: 0; border: 1px solid var(--line); border-radius: 24px; overflow: hidden; background: var(--panel); display: flex; flex-direction: column; transition: opacity .25s ease, background .2s ease, transform .2s ease, border-color .2s ease; }
.project:hover { transform: translateY(-4px); border-color: #484b60; }
.project-visual { height: 230px; position: relative; overflow: hidden; border-bottom: 1px solid var(--line); background: #0b0c12; }
.project-visual svg { width: 100%; height: 100%; }
.project-visual .v-line { stroke: var(--line); fill: none; }
.project-visual .v-strong { stroke: var(--ink); fill: none; }
.project-visual .v-accent { stroke: var(--accent); fill: none; }
.project-number { position: absolute; top: 16px; left: 18px; font-size: 11px; font-weight: 600; letter-spacing: .1em; color: var(--muted); }
.project-state { position: absolute; top: 12px; right: 12px; border: 1px solid var(--line); border-radius: 999px; padding: 7px 10px; background: rgba(18,19,25,.8); backdrop-filter: blur(8px); font-size: 10px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.project-body { padding: 26px; display: flex; flex: 1; flex-direction: column; gap: 16px; }
.project-meta { margin: 0; color: var(--muted); font-size: 12px; letter-spacing: .04em; }
.project h3 { margin: 0; font: 650 28px/1.05 var(--font-display); letter-spacing: -.045em; }
.project p { margin: 0; color: var(--ink-2); font-size: 15px; }
.project .outcome { color: var(--ink); font-weight: 500; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 4px; }
.tag { max-width: 100%; white-space: nowrap; padding: 7px 9px; border: 1px solid var(--line); border-radius: 999px; background: #171820; font-size: 11px; line-height: 1; color: var(--muted); }
.project-link { display: inline-flex; align-items: center; gap: 7px; align-self: flex-start; color: var(--accent-ink); font-weight: 600; font-size: 14px; }
.project-link:hover { color: var(--ink); }

.experience-grid { display: grid; grid-template-columns: 280px minmax(0, 1fr); border-top: 1px solid var(--line-strong); }
.timeline-index { padding: 28px 28px 28px 0; border-right: 1px solid var(--line-strong); }
.timeline-index p { margin: 0 0 8px; color: var(--muted); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; }
.timeline-index strong { font: 650 20px/1.2 var(--font-display); }
.timeline { min-width: 0; }
.role { display: grid; grid-template-columns: minmax(0, 1fr) 160px; gap: 28px; padding: 36px 0 36px 38px; transition: opacity .25s ease; }
.role + .role { border-top: 1px solid var(--line); }
.role h3 { margin: 0 0 4px; font: 650 26px/1.15 var(--font-display); letter-spacing: -.035em; }
.role-org { margin: 0 0 18px; color: var(--muted); font-size: 14px; }
.role-summary { margin: 0 0 18px; color: var(--ink-2); }
.role-date { grid-column: 2; grid-row: 1; justify-self: end; color: var(--muted); font-size: 12px; text-align: right; letter-spacing: .04em; }
.role-main { grid-column: 1; min-width: 0; }
.bullet-list { margin: 0; padding-left: 20px; display: grid; gap: 10px; color: var(--ink-2); }
.bullet-list li { padding-left: 4px; }
.bullet-list li::marker { color: var(--accent); }
.role:not(.open) .bullet-list li:nth-child(n+4) { display: none; }
.more { appearance: none; margin-top: 18px; padding: 0; border: 0; background: transparent; color: var(--accent-ink); font-size: 13px; font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 4px; }

.proof-band { background: radial-gradient(circle at 12% 24%, rgba(99,102,255,.52), rgba(20,21,44,.2) 38%, transparent 64%), #11121a; color: var(--ink); border-bottom: 1px solid var(--line); }
.proof-grid { display: grid; grid-template-columns: 1fr 1fr; }
.proof-copy { padding: clamp(64px, 8vw, 112px) clamp(32px, 6vw, 84px) clamp(64px, 8vw, 112px) 0; border-right: 1px solid color-mix(in srgb, var(--bg) 25%, transparent); }
.proof-copy .eyebrow { color: color-mix(in srgb, var(--bg) 68%, transparent); }
.proof-copy h2 { max-width: 9ch; }
.proof-copy p { margin: 24px 0 0; max-width: 48ch; color: color-mix(in srgb, var(--bg) 76%, transparent); }
.proof-steps { display: grid; }
.proof-step { min-height: 154px; padding: 28px 0 28px 38px; display: grid; grid-template-columns: 46px 1fr; gap: 18px; align-content: center; }
.proof-step + .proof-step { border-top: 1px solid color-mix(in srgb, var(--bg) 25%, transparent); }
.proof-step .n { color: var(--accent); font-size: 12px; font-weight: 600; letter-spacing: .1em; }
.proof-step h3 { margin: 0 0 6px; font: 650 22px/1.1 var(--font-display); }
.proof-step p { margin: 0; color: color-mix(in srgb, var(--bg) 72%, transparent); font-size: 14px; }

.education-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.education-card { padding: 32px; border: 1px solid var(--line); border-radius: 24px; background: var(--panel); }
.education-card h3 { margin: 0 0 6px; font: 650 24px/1.15 var(--font-display); letter-spacing: -.035em; }
.education-meta { margin: 0 0 24px; color: var(--muted); font-size: 13px; }
.subject-list { list-style: none; margin: 0; padding: 0; }
.subject-list li, .grade-row { display: flex; justify-content: space-between; gap: 18px; padding: 10px 0; border-top: 1px solid var(--line); }
.subject-list span:last-child, .grade { flex: none; color: var(--muted); font-size: 13px; text-align: right; }
.grades { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 24px; }
.grade-row { font-size: 14px; }
.grade { font-size: 15px; color: var(--ink); font-weight: 600; }

.skills-layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); border-top: 1px solid var(--line-strong); }
.skills-note { padding: 28px 28px 28px 0; border-right: 1px solid var(--line-strong); }
.skills-note p { margin: 0; color: var(--muted); font-size: 14px; }
.skill-groups { min-width: 0; }
.skill-group { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 24px; padding: 28px 0 28px 38px; }
.skill-group + .skill-group { border-top: 1px solid var(--line); }
.skill-group h3 { margin: 9px 0 0; color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.chips { min-width: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chip { appearance: none; min-height: 40px; max-width: 100%; padding: 9px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel); color: var(--ink-2); font-size: 13px; font-weight: 500; white-space: nowrap; cursor: pointer; transition: border-color .2s ease, background .2s ease, color .2s ease, opacity .25s ease; }
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-ink); }
.evidence-caption { grid-column: 2; min-height: 0; margin: 10px 0 0; color: var(--accent-ink); font-size: 12px; }
.evidence-caption:empty { display: none; }

.credential-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.credential { min-height: 170px; padding: 26px; border: 1px solid var(--line); border-radius: 22px; background: var(--panel); }
.credential-type { margin: 0 0 20px; color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.credential h3 { margin: 0 0 8px; font: 650 20px/1.15 var(--font-display); }
.credential p { margin: 0; color: var(--muted); font-size: 13px; }
.credential a { display: inline-block; margin-top: 16px; color: var(--accent-ink); font-size: 13px; font-weight: 600; }

.contact-section { padding: clamp(84px, 11vw, 154px) 0 0; background: radial-gradient(circle at 78% 30%, #7778ff 0, var(--accent) 28%, #393bd3 72%); color: var(--on-accent); }
.contact-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 72px; align-items: end; padding-bottom: clamp(72px, 9vw, 120px); }
.contact-section .eyebrow { color: color-mix(in srgb, var(--on-accent) 74%, transparent); }
.contact-section .eyebrow::before { background: var(--on-accent); }
.contact-section h2 { max-width: 10ch; font-size: clamp(52px, 7vw, 104px); }
.contact-side p { margin: 0 0 24px; max-width: 48ch; color: color-mix(in srgb, var(--on-accent) 82%, transparent); }
.contact-email { display: inline-block; max-width: 100%; overflow-wrap: anywhere; font: 650 clamp(22px, 2.6vw, 36px)/1.2 var(--font-display); letter-spacing: -.035em; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.contact-section .button { border-color: color-mix(in srgb, var(--on-accent) 70%, transparent); background: transparent; color: var(--on-accent); }
.contact-section .button:hover { background: var(--on-accent); color: var(--accent); border-color: var(--on-accent); }
.footer { border-top: 1px solid color-mix(in srgb, var(--on-accent) 46%, transparent); }
.footer-inner { min-height: 88px; display: flex; align-items: center; justify-content: space-between; gap: 24px; font-size: 12px; }
.footer-links { display: flex; gap: 20px; }

.dim { opacity: .36; }
.evidence { outline: 3px solid var(--accent); outline-offset: -3px; position: relative; }
.evidence::after { content: "Evidence"; position: absolute; z-index: 3; top: 0; right: 0; padding: 6px 8px; background: var(--accent); color: var(--on-accent); font-size: 10px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.toast { position: fixed; z-index: 70; left: 50%; bottom: 24px; transform: translate(-50%, 18px); opacity: 0; background: var(--ink); color: var(--bg); border: 1px solid var(--line); padding: 11px 14px; font-size: 13px; pointer-events: none; transition: opacity .2s ease, transform .2s ease; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.print-only { display: none; }
.menu-toggle, .project-toggle { display: none; }
.mobile-portrait { display: none; }
.hero-portrait { position: relative; min-height: 410px; margin: 0; overflow: hidden; }
.hero-portrait > img { width: 100%; height: 100%; position: absolute; inset: 0; object-fit: cover; object-position: 50% 30%; }
.hero-portrait figcaption { position: absolute; bottom: 0; left: 0; right: 0; padding: 50px 24px 24px; background: linear-gradient(transparent, rgba(8,9,14,.9)); color: #fff; font-weight: 600; }
.hero-portrait figcaption span { display: block; font-size: 13px; color: #d5d7e2; font-weight: 400; }
.photo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; max-width: 850px; }
.photo-card { display: block; overflow: hidden; text-decoration: none; border: 1px solid var(--line); border-radius: 24px; background: var(--panel); }
.photo-card > img { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; }
.photo-card > span { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 18px 20px; font-size: 15px; }
.personal-link { display: inline-flex; align-items: center; min-height: 44px; margin-top: 20px; font-size: 14px; color: var(--accent-ink); }

@media (max-width: 1060px) {
  :root { --page: min(100% - 36px, 960px); }
  .nav { display: none; }
  .menu-toggle { display: inline-flex; }
  .nav.is-open { display: grid; position: absolute; top: calc(var(--header-h) + 8px); left: 18px; right: 18px; justify-self: stretch; gap: 8px; padding: 16px; border: 1px solid var(--line); border-radius: 20px; background: var(--panel); box-shadow: 0 24px 60px rgba(0,0,0,.35); }
  .nav a { display: flex; align-items: center; min-height: 48px; padding: 8px 16px; border-radius: 12px; font-size: 16px; }
  .nav a:hover, .nav a.active { background: var(--accent-soft); }
  .header-inner { grid-template-columns: 1fr auto; }
  .header-actions { grid-column: 2; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-copy { min-height: calc(85svh - var(--header-h)); padding-right: 0; }
  .hero-aside { border-left: 0; border-top: 1px solid var(--line-strong); grid-template-columns: 1fr 1fr; grid-template-rows: auto; }
  .diagram { min-height: 410px; border-right: 1px solid var(--line-strong); }
  .lens-inner { grid-template-columns: 1fr; }
  .lens-copy { padding-right: 0; border-right: 0; border-bottom: 1px solid var(--line-strong); }
  .project { grid-column: span 6; }
  .project:last-child { grid-column: span 12; }
  .project:last-child .project-visual { height: 260px; }
  .contact-grid { gap: 48px; }
}

@media (max-width: 760px) {
  :root { --page: min(100% - 28px, 680px); --header-h: 64px; }
  body { font-size: 16px; }
  .brand > span:last-child { display: none; }
  .text-btn span:first-child { display: none; }
  .text-btn { width: 44px; padding: 0; }
  .hero-copy { min-height: auto; padding-block: 72px 64px; }
  h1 { font-size: clamp(56px, 17vw, 88px); }
  .hero-aside { grid-template-columns: 1fr; }
  .diagram { min-height: 370px; border-right: 0; border-bottom: 1px solid var(--line-strong); }
  .lens-control { grid-template-columns: 1fr; }
  .lens-button { min-height: 88px; border-right: 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 34px 1fr; align-content: center; }
  .lens-button:last-child { border-bottom: 0; }
  .lens-num { grid-row: 1 / 3; margin: 2px 0 0; }
  .lens-sub { margin-top: 3px; }
  .section-head { grid-template-columns: 1fr; gap: 20px; margin-bottom: 34px; }
  .project-grid { grid-template-columns: 1fr; }
  .project, .project:last-child { grid-column: 1; }
  .project-visual, .project:last-child .project-visual { height: 220px; }
  .experience-grid, .skills-layout { grid-template-columns: 1fr; }
  .timeline-index, .skills-note { padding-right: 0; border-right: 0; border-bottom: 1px solid var(--line-strong); }
  .role { grid-template-columns: 1fr; padding-left: 0; }
  .role-date { grid-column: 1; grid-row: auto; justify-self: start; text-align: left; }
  .proof-grid { grid-template-columns: 1fr; }
  .proof-copy { padding-right: 0; border-right: 0; border-bottom: 1px solid color-mix(in srgb, var(--bg) 25%, transparent); }
  .proof-step { padding-left: 0; }
  .education-grid, .credential-grid { grid-template-columns: 1fr; }
  .grades { grid-template-columns: 1fr; }
  .skill-group { grid-template-columns: 1fr; gap: 14px; padding-left: 0; }
  .skill-group h3 { margin-top: 0; }
  .evidence-caption { grid-column: 1; }
  .contact-grid { grid-template-columns: 1fr; gap: 38px; align-items: start; }
  .footer-inner { align-items: flex-start; flex-direction: column; justify-content: center; padding-block: 20px; }
  .chip { white-space: normal; text-align: left; }
}

@media (max-width: 420px) {
  :root { --page: calc(100% - 22px); }
  .header-inner { gap: 10px; }
  .header-actions { gap: 6px; }
  .status { letter-spacing: .04em; }
  .metric { min-height: 112px; padding: 18px; }
  .metric-value { font-size: 28px; }
  .project-body, .education-card, .credential { padding: 22px; }
  .hero-actions .button { width: 100%; }
}

/* A compact, thumb-friendly reading experience, not a scaled desktop canvas. */
@media (max-width: 760px) {
  :root { --page: calc(100% - 36px); }
  .brand > span:last-child { display: inline; font-size: 14px; }
  .brand { gap: 8px; }
  .header-actions { gap: 8px; }
  .header-actions .icon-btn, .header-actions .text-btn { width: 44px; min-height: 44px; }
  .hero { background: radial-gradient(ellipse at 100% 15%, rgba(63,70,255,.45), transparent 65%), var(--bg); }
  .hero::after { display: none; }
  .hero-grid { min-height: 0; }
  .hero-copy { padding-block: 36px 28px; }
  .status { margin-bottom: 24px; padding: 9px 11px; font-size: 10px; text-transform: none; letter-spacing: .02em; line-height: 1.5; }
  .status-dot { flex-shrink: 0; }
  .eyebrow { font-size: 10px; letter-spacing: .06em; margin-bottom: 16px; }
  h1 { font-size: clamp(52px, 15vw, 82px); line-height: .98; margin-bottom: 22px; }
  .hero-intro { font-size: 17px; line-height: 1.6; margin-bottom: 24px; }
  .hero-actions { display: grid; grid-template-columns: 1fr; gap: 10px; }
  .hero-actions .button { min-height: 48px; width: 100%; }
  .hero-aside { margin: 0 0 28px; border: 1px solid var(--line); border-radius: 20px; box-shadow: none; }
  .diagram { display: none; }
  .hero-portrait { display: none; }
  .mobile-portrait { display: block; width: 88px; height: 88px; object-fit: cover; object-position: 50% 15%; border-radius: 24px; border: 1px solid var(--line); margin-bottom: 22px; }
  .metric-grid { border-top: 0; }
  .metric { min-height: 88px; padding: 16px; gap: 10px; }
  .metric-value { font-size: 26px; }
  .metric-label { font-size: 10px; letter-spacing: .03em; }
  .metric-label br { display: block; }
  .lens-copy { padding: 22px 0 16px; border-bottom: 0; }
  .lens-copy h2 { font-size: 21px; }
  .lens-copy p { font-size: 13px; max-width: none; }
  .lens-control { grid-template-columns: repeat(3, minmax(0,1fr)); gap: 8px; padding-bottom: 24px; }
  .lens-button { display: flex; align-items: center; justify-content: center; min-height: 48px; padding: 10px 4px; border: 1px solid var(--line); border-radius: 12px; text-align: center; }
  .lens-button:last-child { border: 1px solid var(--line); }
  .lens-title { font-size: 12px; }
  .lens-num, .lens-sub { display: none; }
  .section { padding-block: 48px; }
  h2 { font-size: clamp(36px, 11vw, 54px); line-height: 1.05; }
  .section-head { gap: 16px; margin-bottom: 26px; }
  .section-intro { font-size: 16px; line-height: 1.6; }
  .project-grid { gap: 20px; }
  .project-visual, .project:last-child .project-visual { height: 165px; }
  .project-body { padding: 22px; gap: 14px; }
  .project h3 { font-size: 26px; line-height: 1.15; }
  .project p { font-size: 16px; line-height: 1.6; }
  .project .project-meta { font-size: 12px; }
  .js-ready .project:not(.details-open) .project-detail { display: none; }
  .project-toggle { display: inline-flex; align-self: flex-start; align-items: center; min-height: 44px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 12px; background: transparent; color: var(--accent-ink); font-size: 14px; font-weight: 600; cursor: pointer; }
  .project-link { min-height: 44px; align-items: center; }
  .dim { opacity: .75; }
  .tag { white-space: normal; line-height: 1.35; font-size: 11px; }
  .role { gap: 12px; padding-block: 28px; }
  .role-date { grid-row: 1; }
  .role h3 { font-size: 23px; }
  .more { min-height: 44px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; }
  .chip { min-height: 44px; font-size: 14px; }
  .proof-copy { padding-block: 44px; }
  .proof-step { min-height: 0; padding-block: 24px; grid-template-columns: 28px 1fr; gap: 12px; }
  .proof-step p { font-size: 16px; }
  .contact-section { padding-top: 48px; }
  .contact-grid { padding-bottom: 44px; gap: 24px; }
  .footer-links a { display: flex; align-items: center; min-height: 44px; }
  .footer-inner { padding-bottom: max(20px, env(safe-area-inset-bottom)); }
  .photo-grid { gap: 12px; }
  .photo-card { border-radius: 16px; }
  .photo-card > span { min-height: 56px; padding: 12px; font-size: 12px; }
}
@media (max-width: 360px) {
  .brand > span:last-child { font-size: 12px; }
  .brand-mark { width: 28px; height: 28px; }
  .header-inner { gap: 6px; }
  .header-actions #theme { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

@page { size: A4; margin: 11mm 13mm; }
@media print {
  .mobile-portrait, .hero-portrait, .personal-section { display: none !important; }
  .project-toggle { display: none !important; }
  .js-ready .project .project-detail { display: block !important; }
  :root, :root[data-theme="dark"] { color-scheme: light; --bg: #fff; --panel: #fff; --ink: #111; --ink-2: #333; --muted: #5a5a5a; --line: #bbb; --line-strong: #111; --accent: #1756c4; --accent-ink: #1549a2; --accent-soft: #fff; --on-accent: #fff; }
  body { background: #fff; font-size: 9pt; line-height: 1.35; }
  .wrap { width: 100%; }
  .site-header, .lens-bar, .diagram, .hero-actions, .proof-band, .skills-note, .more, .toast, .footer, .project-visual, .section-intro, .section-kicker { display: none !important; }
  .print-only { display: block; }
  .hero, .section, .contact-section { padding: 0; border: 0; background: #fff; color: #111; }
  .hero-grid { min-height: 0; display: block; }
  .hero-copy { padding: 0 0 8pt; border-bottom: 2px solid #111; }
  .status { margin: 0 0 5pt; padding: 0; border: 0; background: none; font-size: 8pt; }
  h1 { margin: 0 0 5pt; max-width: none; font-size: 28pt; line-height: .95; }
  .hero-intro { max-width: none; margin: 0; font-size: 10pt; line-height: 1.35; }
  .hero-aside { display: block; border: 0; }
  .metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); border: 0; border-bottom: 1px solid #aaa; }
  .metric { min-height: 0; padding: 5pt 6pt; border: 0 !important; }
  .metric-value { font-size: 15pt; }
  .metric-label { font-size: 7pt; }
  .section { padding: 8pt 0 0; }
  .section-head { display: block; margin: 0 0 5pt; }
  h2 { font-size: 15pt; letter-spacing: -.02em; }
  .project-grid { display: block; border: 0; }
  .project { display: block; border: 0; border-top: 1px solid #aaa; padding: 5pt 0; break-inside: avoid; }
  .project-body { display: block; padding: 0; }
  .project h3 { font-size: 11pt; }
  .project p { font-size: 8.5pt; margin-top: 2pt; }
  .project .outcome { font-size: 9pt; }
  .tags { margin-top: 3pt; padding: 0; }
  .tag { padding: 2pt 4pt; font-size: 7pt; }
  .project-link::after { content: " — " attr(href); font-weight: 400; }
  .experience-grid { display: block; border: 0; }
  .timeline-index { display: none; }
  .role { display: grid; grid-template-columns: 1fr 110pt; gap: 6pt; padding: 5pt 0; break-inside: avoid; }
  .role h3 { font-size: 11pt; }
  .role-org, .role-summary { margin-bottom: 3pt; font-size: 8.5pt; }
  .role-date { grid-column: 2; grid-row: 1; }
  .bullet-list { gap: 2pt; padding-left: 14pt; font-size: 8pt; }
  .role .bullet-list li { display: list-item !important; }
  .education-grid, .credential-grid { grid-template-columns: repeat(2, 1fr); border-color: #111; }
  .education-card, .credential { min-height: 0; padding: 7pt; border-color: #111; break-inside: avoid; }
  .education-card h3, .credential h3 { font-size: 10pt; }
  .education-meta { margin-bottom: 4pt; }
  .subject-list li, .grade-row { padding: 2pt 0; font-size: 7.5pt; }
  .skills-layout { display: block; border: 0; }
  .skill-group { grid-template-columns: 90pt 1fr; gap: 6pt; padding: 4pt 0; }
  .skill-group h3 { font-size: 7pt; }
  .chip { min-height: 0; padding: 2pt 4pt; font-size: 7.5pt; border-color: #aaa; background: #fff; color: #111; }
  .evidence-caption { display: none; }
  .contact-section { margin-top: 8pt; border-top: 2px solid #111; }
  .contact-grid { display: block; padding: 7pt 0 0; }
  .contact-section h2 { font-size: 14pt; }
  .contact-side p, .contact-actions { display: none; }
  .contact-email { font-size: 10pt; }
  .dim { display: none !important; }
  .evidence { outline: 0; }
  .evidence::after { display: none; }
  a { color: #111; text-decoration: none; }
}
