:root {
  color-scheme: dark;
  --ink: #f4f7fb;
  --muted: #9eabbc;
  --bg: #08111f;
  --bg-soft: #0d192a;
  --panel: #101e31;
  --line: rgba(159, 184, 213, 0.2);
  --blue: #6ee7ff;
  --blue-strong: #27c9f1;
  --violet: #8b7cff;
  --lime: #cbf85f;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.32);
  --max: 1180px;
  --radius: 24px;
}

[data-theme="light"] {
  color-scheme: light;
  --ink: #0a1726;
  --muted: #58687b;
  --bg: #f5f8fc;
  --bg-soft: #eaf1f8;
  --panel: #ffffff;
  --line: rgba(26, 59, 91, 0.18);
  --blue: #007fa3;
  --blue-strong: #006c8d;
  --violet: #5545c4;
  --lime: #668c00;
  --shadow: 0 24px 70px rgba(32, 62, 91, 0.12);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 100px; }
body { margin: 0; min-width: 320px; overflow-x: hidden; background: var(--bg); color: var(--ink); font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: 16px; line-height: 1.6; transition: background-color .3s ease, color .3s ease; }
body::before { content: ""; position: fixed; inset: 0; pointer-events: none; z-index: -1; background-image: linear-gradient(rgba(110, 231, 255, .035) 1px, transparent 1px), linear-gradient(90deg, rgba(110, 231, 255, .035) 1px, transparent 1px); background-size: 40px 40px; mask-image: linear-gradient(to bottom, black, transparent 80%); }
a { color: inherit; text-decoration: none; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: 10px; left: 10px; z-index: 100; transform: translateY(-160%); padding: 10px 16px; border-radius: 10px; background: var(--blue); color: #06101c; font-weight: 800; }
.skip-link:focus { transform: translateY(0); }

.site-header { position: fixed; z-index: 50; top: 18px; left: 50%; width: min(calc(100% - 32px), var(--max)); transform: translateX(-50%); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px; padding: 10px 12px 10px 16px; border: 1px solid var(--line); border-radius: 18px; background: color-mix(in srgb, var(--bg) 76%, transparent); box-shadow: 0 12px 36px rgba(0, 0, 0, .12); backdrop-filter: blur(18px); }
.brand { display: inline-flex; align-items: center; gap: 10px; width: max-content; font-weight: 760; letter-spacing: -.02em; }
.brand-mark { display: grid; width: 32px; height: 32px; place-items: center; border-radius: 9px; background: var(--blue); color: #05101b; font-size: 13px; font-weight: 900; }
.site-nav { display: flex; align-items: center; gap: 26px; }
.site-nav a { position: relative; color: var(--muted); font-size: .88rem; font-weight: 700; }
.site-nav a::after { content: ""; position: absolute; right: 0; bottom: -7px; left: 0; height: 2px; transform: scaleX(0); background: var(--blue); transition: transform .2s ease; }
.site-nav a:hover, .site-nav a:focus-visible, .site-nav a.active { color: var(--ink); }
.site-nav a:hover::after, .site-nav a:focus-visible::after, .site-nav a.active::after { transform: scaleX(1); }
.theme-toggle { justify-self: end; display: grid; width: 38px; height: 38px; place-items: center; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); color: var(--ink); cursor: pointer; }
.theme-toggle svg { position: absolute; width: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform .25s ease, opacity .25s ease; }
.theme-toggle .sun-icon { opacity: 0; transform: rotate(-45deg) scale(.7); }
[data-theme="light"] .theme-toggle .sun-icon { opacity: 1; transform: rotate(0) scale(1); }
[data-theme="light"] .theme-toggle .moon-icon { opacity: 0; transform: rotate(45deg) scale(.7); }
.menu-toggle { display: none; }

.hero { width: min(calc(100% - 40px), var(--max)); min-height: 850px; margin: 0 auto; padding: 180px 0 100px; display: grid; grid-template-columns: 1.08fr .92fr; align-items: center; gap: clamp(50px, 8vw, 100px); }
.eyebrow, .section-index { margin: 0 0 22px; color: var(--blue); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .78rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.pulse { display: inline-block; width: 8px; height: 8px; margin-right: 9px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 0 color-mix(in srgb, var(--lime) 50%, transparent); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 9px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.hero h1 { max-width: 750px; margin: 0; font-size: clamp(3.2rem, 6vw, 6.6rem); line-height: .94; letter-spacing: -.068em; font-weight: 820; }
.hero h1 span, .section-heading h2 span { color: var(--blue); }
.hero-lede { max-width: 640px; margin: 30px 0 0; color: var(--muted); font-size: clamp(1.05rem, 1.5vw, 1.22rem); line-height: 1.72; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.button { display: inline-flex; min-height: 50px; align-items: center; justify-content: center; gap: 10px; padding: 12px 20px; border: 1px solid transparent; border-radius: 13px; font-size: .92rem; font-weight: 800; transition: transform .2s ease, background .2s ease, border-color .2s ease; }
.button:hover { transform: translateY(-2px); }
.button:focus-visible, button:focus-visible, a:focus-visible { outline: 3px solid color-mix(in srgb, var(--blue) 55%, transparent); outline-offset: 3px; }
.button-primary { background: var(--blue); color: #04111c; box-shadow: 0 10px 30px color-mix(in srgb, var(--blue) 18%, transparent); }
.button-primary:hover { background: var(--blue-strong); }
.button-quiet { border-color: var(--line); background: var(--panel); }
.hero-links { display: flex; flex-wrap: wrap; gap: 20px; margin-top: 28px; color: var(--muted); font-size: .83rem; font-weight: 700; }
.hero-links a:hover { color: var(--blue); }

.signal-card { position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(145deg, color-mix(in srgb, var(--panel) 94%, var(--blue)), var(--panel)); box-shadow: var(--shadow); }
.signal-card::after { content: ""; position: absolute; top: -80px; right: -60px; width: 180px; height: 180px; border-radius: 50%; background: var(--violet); opacity: .08; filter: blur(18px); }
.signal-card-top { display: flex; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--line); color: var(--muted); font-family: ui-monospace, monospace; font-size: .7rem; font-weight: 800; letter-spacing: .07em; }
.signal-live { color: var(--lime); }
.signal-live i { display: inline-block; width: 6px; height: 6px; margin-right: 6px; border-radius: 50%; background: currentColor; }
.waveform { height: 190px; padding: 18px 16px 8px; }
.waveform svg { width: 100%; height: 100%; overflow: visible; }
.grid-line { fill: none; stroke: var(--line); stroke-width: 1; }
.wave { fill: none; stroke: var(--blue); stroke-width: 3; stroke-linejoin: round; filter: drop-shadow(0 0 6px color-mix(in srgb, var(--blue) 45%, transparent)); stroke-dasharray: 1100; stroke-dashoffset: 1100; animation: draw 3s .4s ease forwards; }
.wave-back { stroke: var(--violet); opacity: .28; stroke-width: 2; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.metric-grid { display: grid; grid-template-columns: repeat(2, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.metric-grid article { padding: 18px 20px; }
.metric-grid article:nth-child(odd) { border-right: 1px solid var(--line); }
.metric-grid article:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
.metric-grid strong, .metric-grid span { display: block; }
.metric-grid strong { font-family: ui-monospace, monospace; font-size: 1.35rem; letter-spacing: -.04em; }
.metric-grid span { color: var(--muted); font-size: .75rem; }
.signal-caption { display: flex; justify-content: space-between; gap: 20px; margin: 0; padding: 17px 20px; color: var(--muted); font-size: .76rem; }
.signal-caption span { color: var(--ink); font-weight: 800; }

.marquee-strip { overflow: hidden; border-block: 1px solid var(--line); background: var(--bg-soft); }
.marquee-track { display: flex; width: max-content; align-items: center; gap: 34px; padding: 16px 0; color: var(--muted); font-family: ui-monospace, monospace; font-size: .75rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; animation: marquee 28s linear infinite; }
.marquee-track i { color: var(--blue); font-style: normal; }
@keyframes marquee { to { transform: translateX(-50%); } }

.section { width: min(calc(100% - 40px), var(--max)); margin: 0 auto; padding: 130px 0; }
.section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 60px; margin-bottom: 54px; }
.section-heading .section-index { flex: 0 0 220px; padding-top: 13px; }
.section-heading h2, .toolkit-intro h2 { max-width: 760px; margin: 0; font-size: clamp(2.6rem, 5.5vw, 5.4rem); line-height: 1.02; letter-spacing: -.058em; }
.section-heading.compact h2 { font-size: clamp(2.4rem, 4.5vw, 4.4rem); }
.project-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 22px; }
.project-card { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); box-shadow: 0 20px 60px rgba(0, 0, 0, .1); }
.project-meta { display: flex; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--line); color: var(--muted); font-family: ui-monospace, monospace; font-size: .68rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.project-meta span:first-child { color: var(--blue); }
.project-visual { position: relative; height: 315px; overflow: hidden; border-bottom: 1px solid var(--line); }
.chess-visual { display: grid; place-items: center; background: radial-gradient(circle at 18% 12%, rgba(110,231,255,.2), transparent 36%), #0a1422; }
.chess-board { display: grid; width: 252px; height: 252px; grid-template-columns: repeat(8, 1fr); transform: rotate(-6deg); border: 8px solid #15253a; box-shadow: 22px 28px 45px rgba(0,0,0,.38); }
.chess-board span { display: grid; place-items: center; color: #08111f; font-size: 1.35rem; line-height: 1; }
.chess-board span:nth-child(16n+1), .chess-board span:nth-child(16n+3), .chess-board span:nth-child(16n+5), .chess-board span:nth-child(16n+7), .chess-board span:nth-child(16n+10), .chess-board span:nth-child(16n+12), .chess-board span:nth-child(16n+14), .chess-board span:nth-child(16n+16) { background: #6ee7ff; }
.chess-board span:not(:nth-child(16n+1)):not(:nth-child(16n+3)):not(:nth-child(16n+5)):not(:nth-child(16n+7)):not(:nth-child(16n+10)):not(:nth-child(16n+12)):not(:nth-child(16n+14)):not(:nth-child(16n+16)) { background: #37516e; }
.engine-readout { position: absolute; right: 18px; bottom: 18px; display: grid; min-width: 110px; padding: 10px 12px; border: 1px solid rgba(255,255,255,.14); border-radius: 10px; background: rgba(8,17,31,.82); color: #f4f7fb; font-family: ui-monospace, monospace; backdrop-filter: blur(8px); }
.engine-readout span, .engine-readout small { color: #99aabd; font-size: .6rem; text-transform: uppercase; }
.engine-readout strong { color: #cbf85f; font-size: 1.1rem; }
.dash-visual { background: linear-gradient(#2f3d79 0 50%, #ec8e4b 50% 100%); }
.dash-visual .sun { position: absolute; top: 34px; right: 56px; width: 70px; height: 70px; border-radius: 50%; background: #ffe074; box-shadow: 0 0 40px rgba(255,224,116,.38); }
.dune { position: absolute; left: -10%; width: 120%; height: 170px; border-radius: 50% 50% 0 0; }
.dune-one { bottom: -85px; background: #df7544; transform: rotate(-3deg); }
.dune-two { right: -40%; bottom: -118px; left: auto; background: #f3af5d; transform: rotate(7deg); }
.runner { position: absolute; z-index: 3; bottom: 52px; left: 20%; color: #08111f; font-size: 2.1rem; transform: rotate(90deg); }
.target { position: absolute; z-index: 3; color: #fff4cb; font-size: 1.45rem; }
.target-one { top: 62px; right: 26%; }.target-two { right: 10%; bottom: 58px; }
.dash-visual svg { position: absolute; z-index: 2; inset: 0; width: 100%; height: 100%; fill: none; stroke: rgba(8,17,31,.75); stroke-width: 2; stroke-dasharray: 7 7; }
.project-copy { padding: 30px; }
.project-kicker { margin: 0 0 7px; color: var(--blue); font-family: ui-monospace, monospace; font-size: .74rem; font-weight: 800; text-transform: uppercase; }
.project-copy h3 { margin: 0 0 15px; font-size: 2rem; letter-spacing: -.04em; }
.project-copy > p:not(.project-kicker), .project-copy li { color: var(--muted); }
.project-copy ul { margin: 20px 0 0; padding: 0; list-style: none; }
.project-copy li { position: relative; margin: 9px 0; padding-left: 20px; font-size: .9rem; }
.project-copy li::before { content: "+"; position: absolute; left: 0; color: var(--lime); font-family: ui-monospace, monospace; font-weight: 900; }

.experience-section { border-top: 1px solid var(--line); }
.timeline { border-top: 1px solid var(--line); }
.timeline-item { display: grid; grid-template-columns: 160px 1fr 1.55fr; gap: 42px; padding: 34px 0; border-bottom: 1px solid var(--line); }
.timeline-date { display: flex; flex-direction: column; color: var(--muted); font-family: ui-monospace, monospace; font-size: .72rem; font-weight: 700; text-transform: uppercase; }
.timeline-role p { margin: 0 0 5px; color: var(--blue); font-family: ui-monospace, monospace; font-size: .7rem; font-weight: 800; text-transform: uppercase; }
.timeline-role h3 { margin: 0; font-size: 1.35rem; line-height: 1.25; }
.timeline-copy p { margin: 0 0 14px; color: var(--muted); font-size: .94rem; }

.toolkit-section { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(50px, 10vw, 120px); align-items: start; }
.toolkit-intro > p:last-child { max-width: 470px; color: var(--muted); }
.tool-groups { border-top: 1px solid var(--line); }
.tool-groups article { padding: 26px 0; border-bottom: 1px solid var(--line); }
.tool-groups article > p { margin: 0 0 16px; color: var(--muted); font-family: ui-monospace, monospace; font-size: .7rem; font-weight: 800; text-transform: uppercase; }
.tag-list { display: flex; flex-wrap: wrap; gap: 10px; }
.tag-list span { padding: 8px 13px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel); font-size: .85rem; font-weight: 750; }
.education-card h3 { margin: 0 0 4px; font-size: 1.5rem; }
.education-card > span, .education-card > small { display: block; }
.education-card > span { color: var(--muted); }.education-card > small { margin-top: 10px; color: var(--blue); font-family: ui-monospace, monospace; font-size: .72rem; }

.awards-section { border-top: 1px solid var(--line); }
.award-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.award-card { padding: 34px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.award-card strong { display: inline-block; margin-right: 10px; color: var(--blue); font-size: clamp(3rem, 6vw, 5.2rem); line-height: 1; letter-spacing: -.06em; }
.award-card > span { color: var(--muted); font-family: ui-monospace, monospace; font-size: .72rem; font-weight: 800; text-transform: uppercase; }
.award-card p { max-width: 450px; margin: 26px 0 0; color: var(--muted); }

.contact-section { position: relative; overflow: hidden; display: grid; min-height: 620px; place-items: center; align-content: center; padding: 100px 24px; background: var(--blue); color: #06111d; text-align: center; }
.contact-section .section-index { color: #17334a; }
.contact-section h2 { max-width: 850px; margin: 0; font-size: clamp(3.3rem, 7vw, 7.6rem); line-height: .92; letter-spacing: -.07em; }
.contact-section > p:not(.section-index) { max-width: 610px; margin: 28px auto; color: #17334a; font-size: 1.05rem; }
.button-light { position: relative; z-index: 2; background: #071322; color: #fff; }
.contact-links { position: relative; z-index: 2; display: flex; gap: 24px; margin-top: 34px; color: #17334a; font-size: .8rem; font-weight: 800; text-decoration: underline; text-underline-offset: 4px; }
.contact-orbit { position: absolute; width: min(70vw, 800px); aspect-ratio: 1; border: 1px solid rgba(6,17,29,.16); border-radius: 50%; animation: orbit 26s linear infinite; }
.contact-orbit::before, .contact-orbit::after { content: ""; position: absolute; inset: 18%; border: 1px solid rgba(6,17,29,.14); border-radius: 50%; }.contact-orbit::after { inset: 35%; }
.contact-orbit span { position: absolute; width: 12px; height: 12px; border-radius: 50%; background: #08111f; }.contact-orbit span:nth-child(1) { top: 13%; left: 20%; }.contact-orbit span:nth-child(2) { right: -6px; top: 50%; }.contact-orbit span:nth-child(3) { bottom: 4%; left: 34%; }
@keyframes orbit { to { transform: rotate(360deg); } }

footer { display: flex; justify-content: space-between; gap: 24px; padding: 28px max(20px, calc((100% - var(--max))/2)); color: var(--muted); background: var(--bg); font-size: .76rem; }
footer p { margin: 0; } footer a { color: var(--ink); font-weight: 800; }

.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

@media (max-width: 920px) {
  .site-header { grid-template-columns: 1fr auto auto; }
  .menu-toggle { display: grid; width: 38px; height: 38px; place-items: center; gap: 5px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); color: var(--ink); cursor: pointer; }
  .menu-toggle span:not(.sr-only) { display: block; width: 16px; height: 1.5px; background: currentColor; transition: transform .2s ease; }
  .menu-toggle[aria-expanded="true"] span:nth-child(2) { transform: translateY(3px) rotate(45deg); }.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-3px) rotate(-45deg); }
  .site-nav { position: absolute; top: calc(100% + 10px); right: 0; left: 0; display: none; flex-direction: column; align-items: stretch; gap: 0; padding: 10px; border: 1px solid var(--line); border-radius: 16px; background: var(--bg); box-shadow: var(--shadow); }
  .site-nav.open { display: flex; }.site-nav a { padding: 12px; }
  .hero { min-height: auto; padding-top: 150px; grid-template-columns: 1fr; }
  .signal-card { max-width: 620px; }
  .project-grid { grid-template-columns: 1fr; }.project-card { display: grid; grid-template-columns: .9fr 1.1fr; }.project-meta { grid-column: 1 / -1; }.project-visual { height: 100%; min-height: 390px; border-right: 1px solid var(--line); border-bottom: 0; }
  .section-heading { display: block; }.section-heading .section-index { padding-top: 0; }
  .timeline-item { grid-template-columns: 120px 1fr; }.timeline-copy { grid-column: 2; }
  .toolkit-section { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .site-header { top: 10px; width: calc(100% - 20px); padding-left: 10px; gap: 7px; }.brand-text { display: none; }
  .hero { width: min(calc(100% - 32px), var(--max)); padding: 132px 0 80px; gap: 46px; }.hero h1 { font-size: clamp(3rem, 16vw, 4.6rem); }.hero-lede { line-height: 1.6; }
  .hero-actions { flex-direction: column; }.button { width: 100%; }.hero-links { flex-direction: column; gap: 8px; }
  .signal-card-top { padding-inline: 14px; }.waveform { height: 160px; }.metric-grid article { padding: 15px; }.signal-caption { display: block; }.signal-caption span { display: block; }
  .section { width: min(calc(100% - 32px), var(--max)); padding: 92px 0; }.section-heading { margin-bottom: 38px; }.section-heading h2, .toolkit-intro h2 { font-size: clamp(2.4rem, 13vw, 3.7rem); }
  .project-card { display: block; }.project-visual { height: 290px; min-height: 0; border-right: 0; border-bottom: 1px solid var(--line); }.project-copy { padding: 24px; }.chess-board { width: 220px; height: 220px; }
  .timeline-item { grid-template-columns: 1fr; gap: 12px; padding: 28px 0; }.timeline-date { flex-direction: row; gap: 8px; }.timeline-date span:first-child::after { content: " →"; }.timeline-copy { grid-column: auto; }
  .award-grid { grid-template-columns: 1fr; }.award-card { padding: 28px; }
  .contact-section { min-height: 600px; }.contact-section h2 { font-size: clamp(3.1rem, 17vw, 5rem); }.contact-links { gap: 18px; }
  footer { flex-direction: column; align-items: center; text-align: center; }
}

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