/* Isolated readability draft. The live page and its inline assets are untouched. */
:root {
  color-scheme: dark;
  --bg: #0c0c0e;
  --bg-alt: #141418;
  --ink: #f2f2f6;
  --ink-soft: #d0d0d8;
  --mid: #aaaab5;
  --faint: #9797a4;
  --rule: #393940;
  --rule-light: #29292f;
  --signal: #57cb91;
  --signal-soft: #10291d;
  --signal-mid: #29583e;
  --on-signal: #0c0c0e;
  --badge: #b1b9ff;
  --badge-bg: #202137;
  --footer-bg: #09090b;
  --grid-line: rgba(255,255,255,0.11);
  --grid-center: rgba(255,255,255,0.18);
  --grid-bracket: rgba(255,255,255,0.2);
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --page-inset: max(var(--gutter), calc((100vw - 76rem) / 2));
  --mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Consolas, monospace;
  --sans: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --frame: 0px;
}
[data-theme="light"] {
  color-scheme: light;
  --bg: #fafaf7;
  --bg-alt: #f0efeb;
  --ink: #17171c;
  --ink-soft: #393940;
  --mid: #575761;
  --faint: #62626b;
  --rule: #c9c9c4;
  --rule-light: #deded8;
  --signal: #176b40;
  --signal-soft: #e6f1e9;
  --signal-mid: #aec9b8;
  --on-signal: #ffffff;
  --badge: #414ca6;
  --badge-bg: #eceefa;
  --footer-bg: #f0efeb;
  --grid-line: rgba(0,0,0,0.12);
  --grid-center: rgba(0,0,0,0.20);
  --grid-bracket: rgba(0,0,0,0.2);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 6rem; }
body {
  font-family: var(--sans); background: var(--bg); color: var(--ink);
  font-size: 1.125rem; line-height: 1.7; font-weight: 400;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--signal); color: var(--on-signal); }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .22em; }
button { font: inherit; cursor: pointer; }
a:focus-visible, button:focus-visible {
  outline: 3px solid var(--signal); outline-offset: 5px; border-radius: 2px;
}
h1, h2, h3 { text-wrap: balance; }
main:focus, section:focus { outline: none; }
.skip-link {
  position: fixed; left: var(--gutter); top: .75rem; z-index: 500;
  padding: .65rem 1rem; color: var(--on-signal); background: var(--signal);
  transform: translateY(-200%); font-size: 1rem; font-weight: 600;
}
.skip-link:focus { transform: translateY(0); }
.cur-h, .cur-v, .cur-dot, .coord, .frame-top, .frame-bot, .frame-l,
.frame-r, .zone, .tick-cv { display: none; }

/* The same engineering vocabulary, with a calmer background behind prose. */
body::before {
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: -1;
  background-image: radial-gradient(circle, var(--faint) .4px, transparent .4px);
  background-size: 24px 24px; opacity: .08;
}
nav {
  position: fixed; inset: 0 0 auto; z-index: 250; height: 4.5rem;
  padding: 0 var(--page-inset); background: var(--bg);
  border-bottom: 1px solid var(--rule); display: flex;
  align-items: center; justify-content: space-between; gap: 1.5rem;
}
.nav-logo { font: 500 .875rem/1.5 var(--mono); display: flex; align-items: center; gap: .625rem; }
.nav-sig { width: 18px; height: 10px; position: relative; overflow: hidden; color: var(--signal); flex-shrink: 0; }
.nav-sig svg { position: absolute; width: 36px; height: 10px; animation: ws 2s linear infinite; }
@keyframes ws { to { transform: translateX(-18px); } }
.nav-right { display: flex; gap: 1.5rem; align-items: center; }
.nav-links { display: flex; gap: 1.5rem; }
.nav-links a {
  display: inline-flex; align-items: center; min-height: 44px;
  font: 400 .875rem/1.5 var(--mono); color: var(--ink-soft); text-decoration: none;
}
.nav-links a:hover { color: var(--signal); text-decoration: underline; }
.theme-toggle {
  width: 44px; height: 44px; flex-shrink: 0; display: flex; align-items: center;
  justify-content: center; background: var(--bg); border: 1px solid var(--mid); color: var(--ink-soft);
}
.theme-toggle:hover { color: var(--signal); border-color: var(--signal); }
.theme-toggle svg { width: 20px; height: 20px; }
.icon-sun, [data-theme="light"] .icon-moon { display: none; }
[data-theme="light"] .icon-sun { display: block; }
.nav-burger {
  display: none; width: 44px; height: 44px; padding: 11px 9px;
  border: 1px solid var(--mid); background: var(--bg); color: var(--ink);
  flex-direction: column; justify-content: space-between;
}
.nav-burger span { height: 2px; width: 100%; background: currentColor; }
.nav-burger.open span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.nav-burger.open span:nth-child(2) { opacity: 0; }
.nav-burger.open span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }
.nav-mobile-overlay { display: none; }
.nav-mobile-overlay.open {
  display: flex; position: fixed; inset: 4.5rem 0 0; z-index: 200;
  background: var(--bg); flex-direction: column; gap: 1.5rem;
  padding: 2rem var(--gutter); overflow-y: auto;
}
.nav-mobile-overlay a { font: 400 1.25rem/1.6 var(--mono); padding: .75rem 0; }

.hero {
  display: grid; grid-template-columns: 1.2fr 1fr; align-items: center; gap: 3rem;
  padding: 8.5rem var(--page-inset) 5.5rem; min-height: min(52rem, 95svh); position: relative;
}
.hero-left { min-width: 0; }
.hero-tag { font: 500 .875rem/1.6 var(--mono); color: var(--signal); margin-bottom: 1.5rem; }
.hero h1 { font-size: clamp(2.5rem, 5vw, 4.5rem); line-height: 1.08; letter-spacing: -.035em; font-weight: 700; max-width: 10ch; }
.hero-subtitle { font-size: clamp(1.125rem, 1.6vw, 1.375rem); line-height: 1.65; color: var(--ink-soft); max-width: 38ch; margin-top: 1.75rem; }
.hero-roles { display: flex; flex-wrap: wrap; gap: .625rem; margin-top: 2rem; }
.hero-role { font: 400 .875rem/1.6 var(--mono); color: var(--ink-soft); border: 1px solid var(--rule); padding: .5rem .75rem; }
.hero-right { position: relative; height: 29rem; min-width: 0; }
.hero-right canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.wave-data { position: absolute; bottom: 1rem; left: 1rem; font: 400 .875rem/1.8 var(--mono); color: var(--mid); }
.wave-data .val { color: var(--ink-soft); }
.wave-data .sig { color: var(--signal); }
.scroll-hint { position: absolute; bottom: 1.25rem; left: 50%; display: grid; justify-items: center; gap: .5rem; transform: translateX(-50%); }
.scroll-hint span { font: 400 .8125rem/1.5 var(--mono); color: var(--mid); }
.scroll-line { width: 1px; height: 24px; background: var(--signal); }
.callout { position: absolute; right: .75rem; top: 50%; writing-mode: vertical-lr; font: 400 .8125rem/1.5 var(--mono); color: var(--faint); }

.metrics-bar { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); padding: 0 var(--page-inset); background: var(--bg-alt); border-block: 1px solid var(--rule); }
.metric-cell { text-align: center; padding: 1.75rem .875rem; border-right: 1px solid var(--rule); }
.metric-cell:last-child { border-right: none; }
.metric-num { font-size: 2rem; line-height: 1.2; font-weight: 700; margin-bottom: .5rem; font-variant-numeric: tabular-nums; }
.metric-label { font: 400 .875rem/1.55 var(--mono); color: var(--mid); }
.center-mark { position: relative; display: flex; justify-content: center; padding: .5rem var(--page-inset); }
.center-mark::before { content: ''; position: absolute; top: 50%; left: var(--page-inset); right: var(--page-inset); height: 1px; background: var(--rule-light); }
.center-mark svg { position: relative; width: 20px; height: 20px; padding: 3px; background: var(--bg); }
.dim-line { display: flex; align-items: center; gap: .75rem; padding: .5rem var(--page-inset); font: 400 .8125rem/1.5 var(--mono); color: var(--faint); }
.dim-line .dl { flex: 1; border-top: 1px solid var(--rule-light); }
.dim-val { text-align: center; }

section { padding: 5rem var(--page-inset); position: relative; }
.s-label { font: 600 clamp(1.625rem, 2.6vw, 2rem)/1.25 var(--sans); letter-spacing: -.02em; margin-bottom: 2rem; display: flex; align-items: center; gap: 1rem; }
.s-label::after { content: ''; width: 3rem; height: 2px; background: var(--signal); flex-shrink: 0; }
.datum { display: inline-flex; align-items: baseline; gap: .5rem; font: 400 .875rem/1.7 var(--mono); color: var(--mid); }
.datum::before { content: ''; width: 0; height: 0; border-inline: 4px solid transparent; border-top: 6px solid var(--signal); flex-shrink: 0; }
.about-grid { display: grid; grid-template-columns: minmax(0, 1fr) 18rem; gap: 4rem; align-items: start; }
.about-text { max-width: 65ch; font-size: 1.125rem; line-height: 1.8; color: var(--ink-soft); }
.about-text p + p { margin-top: 1.5rem; }
.about-sidebar, .contact-details { border: 1px solid var(--rule); padding: 1.75rem; background: var(--bg-alt); }
.about-sidebar-title, .contact-details-title { font: 500 1rem/1.5 var(--mono); color: var(--signal); padding-bottom: .875rem; margin-bottom: 1.25rem; border-bottom: 1px solid var(--rule); }
.about-fact + .about-fact { margin-top: 1.25rem; }
.about-fact-label, .contact-detail-label { font: 400 .875rem/1.5 var(--mono); color: var(--mid); margin-bottom: .25rem; }
.about-fact-value, .contact-detail-value { font-size: 1rem; line-height: 1.65; color: var(--ink-soft); }

.proj-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; }
.proj-card { display: flex; flex-direction: column; padding: 2rem; border: 1px solid var(--rule); border-left: 3px solid var(--rule); background: var(--bg); min-width: 0; }
.proj-card:hover, .proj-card:focus-within { border-left-color: var(--signal); }
.proj-num { font: 400 .875rem/1.5 var(--mono); color: var(--mid); margin-bottom: .875rem; }
.proj-title { font-size: 1.5rem; line-height: 1.35; font-weight: 600; margin-bottom: .75rem; }
.proj-where { font: 400 .875rem/1.7 var(--mono); color: var(--mid); margin-bottom: 1.25rem; }
.proj-desc { font-size: 1.0625rem; line-height: 1.75; color: var(--ink-soft); flex: 1; max-width: 60ch; }
.proj-tags { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.5rem; }
.proj-tag { font: 400 .875rem/1.5 var(--mono); padding: .3rem .6rem; border: 1px solid var(--rule); color: var(--mid); }
.proj-link { display: inline-flex; align-items: center; gap: .5rem; font: 500 .9375rem/1.6 var(--mono); color: var(--signal); margin-top: 1rem; min-height: 44px; align-self: flex-start; }
.proj-link svg { width: 16px; height: 16px; }
.proj-link:hover { text-decoration-thickness: 2px; }
.focus-wrap { display: flex; flex-wrap: wrap; gap: .75rem; }
.focus-chip { font: 400 .9375rem/1.6 var(--mono); padding: .65rem .875rem; border: 1px solid var(--rule); color: var(--ink-soft); background: var(--bg); }

.bom { width: 100%; border-collapse: collapse; }
.bom-head { font: 500 .875rem/1.5 var(--mono); color: var(--mid); border-bottom: 2px solid var(--rule); text-align: left; }
.bom-head th { padding: .875rem .875rem .875rem 0; font-weight: 500; }
.bom-row { border-bottom: 1px solid var(--rule); }
.bom-row:hover { background: var(--signal-soft); }
.bom-row td { padding: 1.375rem .875rem 1.375rem 0; vertical-align: top; }
.bom-idx, .bom-journal, .bom-year { font: 400 .875rem/1.65 var(--mono); color: var(--mid); }
.bom-idx { min-width: 2.75rem; }
.bom-title { font-size: 1.0625rem; line-height: 1.65; }
.bom-title a { text-decoration-color: var(--mid); }
.bom-title a:hover { color: var(--signal); text-decoration-color: currentColor; }
.bom-journal { min-width: 9rem; max-width: 12rem; }
.bom-year { text-align: right; }
.bom-note { text-align: right; min-width: 8.5rem; }
.bom-badge { display: inline-block; font: 500 .8125rem/1.5 var(--mono); padding: .25rem .5rem; background: var(--signal-soft); color: var(--signal); border: 1px solid var(--signal-mid); white-space: nowrap; margin-bottom: .35rem; }
.bom-badge.first { color: var(--badge); background: var(--badge-bg); border-color: var(--badge); }
.awards-list { max-width: 65rem; }
.award-item { display: grid; grid-template-columns: 5rem minmax(0, 1fr); gap: 1.5rem; padding: 1.25rem 0; border-bottom: 1px solid var(--rule-light); }
.award-item:first-child { padding-top: 0; }
.award-year { font: 400 .9375rem/1.7 var(--mono); color: var(--mid); }
.award-text { font-size: 1.125rem; line-height: 1.6; }
.award-text strong { font-weight: 600; }
.award-source { display: block; font: 400 .875rem/1.7 var(--mono); color: var(--mid); margin-top: .35rem; }
.edu-stack { display: grid; gap: 2rem; max-width: 65ch; }
.edu-item + .edu-item { border-top: 1px solid var(--rule-light); padding-top: 2rem; }
.edu-degree { font-size: 1.375rem; line-height: 1.4; font-weight: 600; margin-bottom: .5rem; }
.edu-where { font: 400 .9375rem/1.7 var(--mono); color: var(--mid); margin-bottom: .625rem; }
.edu-thesis { font-size: 1.0625rem; line-height: 1.75; color: var(--ink-soft); }

.contact-sec { background: var(--footer-bg); border-top: 1px solid var(--rule); }
.contact-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 4rem; align-items: start; }
.contact-heading { font-size: clamp(1.5rem, 2.5vw, 2rem); line-height: 1.35; font-weight: 600; margin-bottom: 1.5rem; max-width: 26ch; }
.contact-sub { font-size: 1.125rem; line-height: 1.75; color: var(--ink-soft); max-width: 45ch; margin-bottom: 1.75rem; }
.contact-links { display: flex; flex-wrap: wrap; gap: .75rem; }
.c-link { display: inline-flex; align-items: center; gap: .5rem; padding: .75rem 1rem; min-height: 44px; border: 1px solid var(--mid); color: var(--ink-soft); font: 400 .875rem/1.5 var(--mono); text-decoration: none; }
.c-link:hover { background: var(--signal); border-color: var(--signal); color: var(--on-signal); }
.c-link svg { width: 16px; height: 16px; }
.contact-detail-row { display: grid; grid-template-columns: 5rem minmax(0, 1fr); gap: 1rem; }
.contact-detail-row + .contact-detail-row { margin-top: 1.25rem; }
footer { background: var(--footer-bg); padding-inline: var(--page-inset); }
.title-block { border-top: 1px solid var(--rule); display: grid; grid-template-columns: 2.5fr 1fr 1.2fr .8fr .8fr; }
.tb-cell { display: flex; flex-direction: column; gap: .5rem; padding: 1.25rem 1rem; border-right: 1px solid var(--rule); font: 400 .875rem/1.6 var(--mono); color: var(--mid); }
.tb-cell:first-child { padding-left: 0; }
.tb-cell:last-child { border-right: none; }
.tb-lbl { font-size: .8125rem; color: var(--mid); }
.tb-v { color: var(--ink-soft); }
.scale-bar { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; padding: 1.25rem 0; border-top: 1px solid var(--rule); font: 400 .8125rem/1.7 var(--mono); color: var(--mid); }
.scale-bar-graphic { display: flex; height: 4px; }
.sb-seg { width: 20px; height: 4px; background: var(--rule); }
.sb-seg.filled { background: var(--mid); }

@media (max-width: 64rem) {
  .nav-links { gap: 1rem; }
  .nav-right { gap: 1rem; }
  .hero { gap: 2rem; min-height: auto; }
  .hero-right { height: 27rem; }
  .about-grid { grid-template-columns: minmax(0, 1fr) 16rem; gap: 2rem; }
  .metrics-bar { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .metric-cell:nth-child(3n) { border-right: none; }
  .metric-cell:nth-child(n+4) { border-top: 1px solid var(--rule); }
  .proj-card { padding: 1.5rem; }
  .contact-grid { gap: 2rem; }
  .bom, .bom tbody { display: block; }
  .bom thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .bom-row { display: grid; grid-template-columns: 2.5rem minmax(0, 1fr) auto; gap: .625rem .5rem; padding: 1.5rem 0; }
  .bom-row td { display: block; padding: 0; }
  .bom-idx { grid-column: 1; grid-row: 1; }
  .bom-title { grid-column: 2 / 4; grid-row: 1; }
  .bom-journal { grid-column: 2; grid-row: 2; max-width: none; min-width: 0; }
  .bom-year { grid-column: 3; grid-row: 2; }
  .bom-note { grid-column: 2 / 4; grid-row: 3; text-align: left; min-width: 0; }
  .bom-note:empty { display: none; }
}
@media (max-width: 48rem) {
  nav { padding-inline: var(--gutter); }
  .js .nav-links { display: none; }
  .js .nav-burger { display: flex; }
  .nav-right { gap: .625rem; }
  html:not(.js) nav { position: static; height: auto; padding-block: 1rem; flex-wrap: wrap; }
  html:not(.js) .nav-links { flex-wrap: wrap; }
  .hero { grid-template-columns: 1fr; padding-top: 7rem; padding-bottom: 3rem; gap: 1.5rem; }
  .hero h1 { max-width: 12ch; }
  .hero-subtitle { max-width: 40ch; }
  .hero-right { height: 18rem; }
  .scroll-hint, .callout { display: none; }
  section { padding-block: 3.5rem; }
  .s-label { margin-bottom: 1.75rem; }
  .about-grid, .proj-grid, .contact-grid { grid-template-columns: 1fr; gap: 2rem; }
  .about-sidebar { max-width: 65ch; }
  .proj-title { font-size: 1.375rem; }
  .title-block { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tb-cell { border-bottom: 1px solid var(--rule); padding: 1rem; }
  .tb-cell:first-child { grid-column: 1 / -1; }
  .tb-cell:nth-child(even) { padding-left: 0; }
  .tb-cell:nth-child(odd) { border-right: none; }
  .scale-bar span:last-child { flex-basis: 100%; }
}
@media (max-width: 30rem) {
  .nav-logo { font-size: .875rem; gap: .4rem; }
  .nav-sig { display: none; }
  nav { gap: .5rem; }
  .metrics-bar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric-cell:nth-child(3n) { border-right: 1px solid var(--rule); }
  .metric-cell:nth-child(2n) { border-right: none; }
  .metric-cell:nth-child(n+3) { border-top: 1px solid var(--rule); }
  .metric-cell { padding: 1.5rem .625rem; }
  .proj-card, .about-sidebar, .contact-details { padding: 1.25rem; }
  .focus-chip { font-size: .875rem; }
  .award-item { grid-template-columns: 4.25rem minmax(0, 1fr); gap: .75rem; }
  .contact-detail-row { grid-template-columns: 1fr; gap: .25rem; }
  .bom-row { grid-template-columns: 1.75rem minmax(0, 1fr) auto; }
  .bom-idx { min-width: 0; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
