:root {
  color-scheme: dark;
  --ink: #f5f0e6;
  --muted: #b7b0a4;
  --faint: #777168;
  --bg: #0a0a09;
  --bg-deep: #050504;
  --surface: #131210;
  --surface-2: #1c1a17;
  --line: rgba(245, 240, 230, 0.13);
  --line-strong: rgba(245, 240, 230, 0.27);
  --accent: #f28c3a;
  --accent-hover: #ffa95f;
  --accent-rgb: 242, 140, 58;
  --accent-soft: rgba(242, 140, 58, 0.12);
  --warm: #b8aa97;
  --warm-rgb: 184, 170, 151;
  --warm-soft: rgba(184, 170, 151, 0.12);
  --bg-rgb: 10, 10, 9;
  --bg-deep-rgb: 5, 5, 4;
  --grid-rgb: 236, 229, 215;
  --map-line-rgb: 203, 195, 181;
  --number-rgb: 235, 226, 211;
  --lede: #c8c0b4;
  --quote: #e3ddd2;
  --tag: #aaa296;
  --company: #c9c0b3;
  --node-bg: rgba(20, 19, 17, 0.96);
  --node-core: #211a14;
  --diagram-bg: rgba(5, 5, 4, 0.66);
  --panel-bg: rgba(25, 23, 20, 0.8);
  --contact-ink: #190d05;
  --contact-muted: #5a2c0e;
  --contact-kicker: #673511;
  --button-ink: #190d05;
  --button-dark: #0d0b09;
  --button-dark-hover: #282018;
  --footer-bg: #030302;
  --shell: min(1180px, calc(100vw - 48px));
  --header-height: 76px;
  --radius: 6px;
  --font-sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

html[data-theme="green"] {
  --ink: #e9f2ef;
  --muted: #9aaca6;
  --faint: #687a74;
  --bg: #07100e;
  --bg-deep: #050a09;
  --surface: #0c1714;
  --surface-2: #111f1b;
  --line: rgba(200, 233, 223, 0.14);
  --line-strong: rgba(200, 233, 223, 0.28);
  --accent: #54e5bb;
  --accent-hover: #7af0ce;
  --accent-rgb: 84, 229, 187;
  --accent-soft: rgba(84, 229, 187, 0.12);
  --warm: #e9a861;
  --warm-rgb: 233, 168, 97;
  --warm-soft: rgba(233, 168, 97, 0.12);
  --bg-rgb: 7, 16, 14;
  --bg-deep-rgb: 5, 10, 9;
  --grid-rgb: 188, 230, 218;
  --map-line-rgb: 178, 217, 205;
  --number-rgb: 212, 235, 228;
  --lede: #b7c6c1;
  --quote: #cbd9d5;
  --tag: #99aaa5;
  --company: #a9bbb5;
  --node-bg: rgba(9, 20, 17, 0.94);
  --node-core: #0c1e19;
  --diagram-bg: rgba(3, 10, 8, 0.55);
  --panel-bg: rgba(13, 26, 22, 0.74);
  --contact-ink: #05110d;
  --contact-muted: #174639;
  --contact-kicker: #194c3c;
  --button-ink: #04100c;
  --button-dark: #07100e;
  --button-dark-hover: #14241f;
  --footer-bg: #040807;
}

html[data-theme="amber"] {
  --ink: #fff2e9;
  --muted: #bda8a0;
  --faint: #836e67;
  --bg: #100908;
  --bg-deep: #080505;
  --surface: #1a0e0c;
  --surface-2: #261310;
  --line: rgba(255, 216, 199, 0.14);
  --line-strong: rgba(255, 216, 199, 0.29);
  --accent: #ffb35c;
  --accent-hover: #ffc982;
  --accent-rgb: 255, 179, 92;
  --accent-soft: rgba(255, 179, 92, 0.12);
  --warm: #ff5a4e;
  --warm-rgb: 255, 90, 78;
  --warm-soft: rgba(255, 90, 78, 0.12);
  --bg-rgb: 16, 9, 8;
  --bg-deep-rgb: 8, 5, 5;
  --grid-rgb: 255, 213, 191;
  --map-line-rgb: 225, 184, 165;
  --number-rgb: 255, 226, 212;
  --lede: #cdb8b0;
  --quote: #eadbd4;
  --tag: #bca8a0;
  --company: #d1bbb3;
  --node-bg: rgba(29, 12, 9, 0.95);
  --node-core: #25100c;
  --diagram-bg: rgba(17, 6, 5, 0.63);
  --panel-bg: rgba(34, 16, 13, 0.78);
  --contact-ink: #1a0905;
  --contact-muted: #64251b;
  --contact-kicker: #6f291d;
  --button-ink: #1a0905;
  --button-dark: #160806;
  --button-dark-hover: #2c110d;
  --footer-bg: #070303;
}

html[data-theme="cyan"] {
  --ink: #edf6fa;
  --muted: #a3b5be;
  --faint: #687d88;
  --bg: #071018;
  --bg-deep: #04090e;
  --surface: #0c1922;
  --surface-2: #11242f;
  --line: rgba(195, 226, 240, 0.14);
  --line-strong: rgba(195, 226, 240, 0.29);
  --accent: #55d9f4;
  --accent-hover: #83e6f8;
  --accent-rgb: 85, 217, 244;
  --accent-soft: rgba(85, 217, 244, 0.12);
  --warm: #7899bf;
  --warm-rgb: 120, 153, 191;
  --warm-soft: rgba(120, 153, 191, 0.13);
  --bg-rgb: 7, 16, 24;
  --bg-deep-rgb: 4, 9, 14;
  --grid-rgb: 198, 226, 240;
  --map-line-rgb: 174, 207, 223;
  --number-rgb: 211, 232, 243;
  --lede: #b6c8d1;
  --quote: #d1e0e7;
  --tag: #9db1bb;
  --company: #afc2cc;
  --node-bg: rgba(8, 23, 32, 0.95);
  --node-core: #0d2631;
  --diagram-bg: rgba(3, 10, 15, 0.62);
  --panel-bg: rgba(12, 31, 42, 0.78);
  --contact-ink: #03131a;
  --contact-muted: #164753;
  --contact-kicker: #1b5665;
  --button-ink: #03131a;
  --button-dark: #06131b;
  --button-dark-hover: #102a36;
  --footer-bg: #03080c;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 24px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -3;
  pointer-events: none;
  background:
    radial-gradient(circle at 72% 8%, rgba(var(--accent-rgb), 0.08), transparent 28rem),
    radial-gradient(circle at 8% 62%, rgba(var(--warm-rgb), 0.04), transparent 30rem),
    var(--bg);
}

::selection { background: var(--accent); color: var(--bg-deep); }

a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; }

h1, h2, h3, p, blockquote, dl, dd { margin-top: 0; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 5px;
}

.shell { width: var(--shell); margin-inline: auto; }
.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: 12px;
  left: 12px;
  z-index: 1000;
  padding: 10px 16px;
  background: var(--accent);
  color: var(--bg);
  border-radius: var(--radius);
  transform: translateY(-180%);
  transition: transform 160ms ease;
}

.skip-link:focus { transform: translateY(0); }

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  height: var(--header-height);
  border-bottom: 1px solid transparent;
  transition: background 220ms ease, border-color 220ms ease, backdrop-filter 220ms ease;
}

.site-header.is-scrolled {
  background: rgba(var(--bg-rgb), 0.82);
  border-color: var(--line);
  backdrop-filter: blur(18px);
}

.header-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; }

.brand { display: inline-flex; align-items: center; gap: 13px; font-weight: 680; letter-spacing: -0.02em; }

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--accent);
  font: 700 11px/1 var(--font-mono);
  letter-spacing: 0.08em;
}

.site-nav { display: flex; align-items: center; gap: clamp(20px, 2.6vw, 36px); }

.site-nav a {
  position: relative;
  color: var(--muted);
  font-size: 13px;
  font-weight: 580;
  letter-spacing: 0.02em;
  transition: color 160ms ease;
}

.site-nav a:not(.language-link)::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -8px;
  width: 100%;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 180ms ease;
}

.site-nav a:hover { color: var(--ink); }
.site-nav a:hover::after { transform: scaleX(1); transform-origin: left; }

.language-link {
  display: grid;
  place-items: center;
  min-width: 39px;
  height: 31px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-family: var(--font-mono);
}

.language-link:hover { background: var(--accent-soft); border-color: var(--accent); color: var(--accent) !important; }
.nav-toggle { display: none; }

.hero {
  position: relative;
  min-height: 900px;
  padding: calc(var(--header-height) + 92px) 0 96px;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-strong) 20%, var(--line-strong) 80%, transparent);
}

.hero-grid {
  position: absolute;
  inset: 0;
  z-index: -2;
  opacity: 0.42;
  background-image:
    linear-gradient(rgba(var(--grid-rgb), 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(var(--grid-rgb), 0.045) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, black 12%, transparent 92%);
}

.hero-layout { display: grid; grid-template-columns: minmax(0, 1.02fr) minmax(440px, 0.98fr); gap: clamp(48px, 7vw, 104px); align-items: center; }

.eyebrow, .section-label, .panel-kicker, .article-type, .diagram-label {
  color: var(--accent);
  font: 650 11px/1.4 var(--font-mono);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.hero-copy h1 {
  max-width: 760px;
  margin: 22px 0 28px;
  font-size: clamp(56px, 6.8vw, 94px);
  line-height: 0.98;
  letter-spacing: -0.062em;
  font-weight: 680;
}

.hero-copy h1 span { color: var(--accent); }

.hero-lede {
  max-width: 670px;
  margin-bottom: 34px;
  color: var(--lede);
  font-size: clamp(18px, 1.65vw, 22px);
  line-height: 1.55;
  letter-spacing: -0.015em;
}

.hero-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  min-height: 50px;
  padding: 0 21px;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  font-size: 13px;
  font-weight: 680;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.button:hover { transform: translateY(-2px); }
.button-primary { background: var(--accent); border-color: var(--accent); color: var(--button-ink); }
.button-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.button-quiet:hover { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }

.hero-facts {
  display: grid;
  grid-template-columns: 0.7fr 1.3fr 0.8fr;
  gap: 24px;
  margin: 58px 0 0;
  padding-top: 23px;
  border-top: 1px solid var(--line);
}

.hero-facts div { min-width: 0; }
.hero-facts dt { margin-bottom: 4px; color: var(--faint); font: 600 10px/1.4 var(--font-mono); letter-spacing: 0.13em; text-transform: uppercase; }
.hero-facts dd { color: var(--muted); font-size: 13px; line-height: 1.45; }

.system-visual {
  position: relative;
  width: min(100%, 570px);
  aspect-ratio: 1;
  justify-self: end;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: radial-gradient(circle at center, rgba(var(--accent-rgb), 0.09), transparent 38%), rgba(var(--bg-rgb), 0.36);
  box-shadow: 0 0 100px rgba(0, 0, 0, 0.35), inset 0 0 80px rgba(var(--accent-rgb), 0.025);
  transition: transform 300ms cubic-bezier(.2,.8,.2,1);
}

.system-visual::before, .system-visual::after {
  content: "";
  position: absolute;
  inset: 7%;
  border: 1px dashed rgba(var(--accent-rgb), 0.13);
  border-radius: 50%;
}

.system-visual::after { inset: 19%; border-color: rgba(var(--warm-rgb), 0.11); }
.visual-topline, .visual-footer { position: absolute; z-index: 4; display: flex; align-items: center; color: var(--faint); font: 600 9px/1 var(--font-mono); letter-spacing: 0.11em; text-transform: uppercase; }
.visual-topline { top: 4%; left: 17%; right: 17%; justify-content: space-between; }
.visual-footer { left: 22%; right: 22%; bottom: 5%; justify-content: space-between; }

.live-dot { display: inline-flex; align-items: center; gap: 7px; }
.live-dot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px var(--accent); animation: pulse 2s ease-in-out infinite; }

.system-lines { position: absolute; inset: 0; width: 100%; height: 100%; }
.orbit, .link-line { fill: none; stroke: rgba(var(--map-line-rgb), 0.16); stroke-width: 1; }
.orbit-a { stroke-dasharray: 3 8; }
.orbit-b { stroke: rgba(var(--warm-rgb), 0.13); stroke-dasharray: 1 7; }
.link-line { stroke-dasharray: 3 5; }
.signal { fill: none; stroke: var(--accent); stroke-width: 1.5; stroke-dasharray: 2 220; stroke-linecap: round; animation: signal 4.8s linear infinite; filter: drop-shadow(0 0 5px var(--accent)); }
.signal-delay { animation-delay: -2.4s; stroke: var(--warm); filter: drop-shadow(0 0 5px var(--warm)); }

.system-node {
  position: absolute;
  z-index: 5;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 100px;
  min-height: 60px;
  padding: 11px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: var(--node-bg);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.24);
}

.system-node span, .system-node small { margin-bottom: 4px; color: var(--accent); font: 650 9px/1 var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; }
.system-node strong { font-size: 12px; line-height: 1.25; letter-spacing: -0.01em; }
.node-core { left: 50%; top: 50%; min-width: 126px; min-height: 78px; text-align: center; transform: translate(-50%, -50%); border-color: rgba(var(--accent-rgb), 0.56); background: var(--node-core); }
.node-core strong { font-size: 14px; }
.node-medical { left: 50%; top: 8%; transform: translateX(-50%); }
.node-cloud { right: 2%; top: 31%; }
.node-ai { right: 8%; bottom: 16%; }
.node-graphics { left: 8%; bottom: 17%; }
.node-lowlevel { left: 1%; top: 30%; }

.section { position: relative; padding: 130px 0; }
.section + .section { border-top: 1px solid var(--line); }
.section-label { display: inline-flex; align-items: center; gap: 11px; margin-bottom: 30px; }
.section-label span { color: var(--faint); }
.section-title { max-width: 860px; margin-bottom: 24px; font-size: clamp(38px, 4.7vw, 65px); line-height: 1.08; letter-spacing: -0.048em; font-weight: 620; }
.section-heading { margin-bottom: 70px; }
.section-heading > p { max-width: 620px; margin-bottom: 0; color: var(--muted); font-size: 18px; }
.section-heading-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 50px; }
.section-heading-row .section-title { margin-bottom: 0; }
.section-heading-row > p { max-width: 350px; font-size: 16px; }

.intro-section { background: var(--bg-deep); }
.split-intro { display: grid; grid-template-columns: 230px 1fr; gap: clamp(40px, 7vw, 110px); align-items: start; }
.intro-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 45px; margin-top: 44px; color: var(--muted); font-size: 18px; }
.intro-columns p { margin-bottom: 0; }
.principle { margin: 74px 0 0; padding: 31px 0 0 30px; border-top: 1px solid var(--line); border-left: 2px solid var(--accent); }
.principle p { max-width: 800px; margin-bottom: 0; color: var(--quote); font-size: clamp(21px, 2.2vw, 29px); line-height: 1.45; letter-spacing: -0.025em; }

.expertise-section { background: linear-gradient(180deg, var(--surface), var(--bg)); }
.expertise-list { border-top: 1px solid var(--line-strong); }
.expertise-item { display: grid; grid-template-columns: 58px minmax(0, 1fr) minmax(250px, 0.58fr); gap: 42px; align-items: start; padding: 33px 0; border-bottom: 1px solid var(--line); transition: background 180ms ease, padding 180ms ease; }
.expertise-item:hover { padding-left: 16px; padding-right: 16px; background: rgba(var(--accent-rgb), 0.035); }
.expertise-index { padding-top: 7px; color: var(--accent); font: 600 11px/1 var(--font-mono); }
.expertise-item h3 { margin-bottom: 9px; font-size: 25px; line-height: 1.2; letter-spacing: -0.025em; }
.expertise-item p { margin-bottom: 0; color: var(--muted); }
.tech-line { padding-top: 7px; color: var(--faint) !important; font: 500 11px/1.7 var(--font-mono); letter-spacing: 0.02em; }

.projects-section { background: var(--bg-deep); }
.text-link { display: inline-flex; align-items: center; gap: 9px; flex: none; color: var(--accent); font: 650 12px/1.4 var(--font-mono); text-transform: uppercase; letter-spacing: 0.08em; }
.text-link:hover { text-decoration: underline; text-underline-offset: 5px; }
.project-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.project-card { position: relative; min-height: 490px; padding: 29px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); display: flex; flex-direction: column; transition: transform 220ms ease, border-color 220ms ease, background 220ms ease; }
.project-card:hover { transform: translateY(-4px); border-color: var(--line-strong); background: var(--surface-2); }
.project-featured { grid-column: 1 / -1; min-height: 520px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(330px, 0.8fr); grid-template-rows: auto 1fr; column-gap: 70px; }
.project-meta { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-bottom: 24px; border-bottom: 1px solid var(--line); color: var(--faint); font: 600 10px/1.3 var(--font-mono); text-transform: uppercase; letter-spacing: 0.08em; }
.status { display: inline-flex; align-items: center; gap: 7px; }
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--faint); }
.status.active { color: var(--accent); }
.status.active::before { background: var(--accent); box-shadow: 0 0 9px rgba(var(--accent-rgb), .65); }
.status.legacy { color: var(--warm); }
.status.legacy::before { background: var(--warm); }
.project-number { position: absolute; right: 23px; top: 73px; color: rgba(var(--number-rgb), 0.055); font: 700 clamp(82px, 12vw, 150px)/1 var(--font-mono); letter-spacing: -0.1em; }
.project-content { position: relative; z-index: 2; align-self: end; max-width: 590px; padding-top: 80px; }
.project-content h3 { margin-bottom: 17px; font-size: clamp(34px, 4vw, 56px); line-height: 1; letter-spacing: -0.048em; }
.project-card:not(.project-featured) .project-content h3 { font-size: clamp(31px, 3.2vw, 45px); }
.project-content > p { margin-bottom: 25px; color: var(--muted); font-size: 16px; }
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 32px; padding: 0; list-style: none; }
.tag-list li { padding: 5px 9px; border: 1px solid var(--line); border-radius: 2px; color: var(--tag); font: 550 10px/1.3 var(--font-mono); text-transform: uppercase; }
.project-link, .article-link { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); font-size: 13px; font-weight: 650; }
.project-link:hover, .article-card:hover .article-link { color: var(--accent); }

.project-diagram { position: relative; z-index: 2; align-self: center; width: 100%; padding: 23px; border: 1px solid var(--line); background: var(--diagram-bg); font-family: var(--font-mono); }
.diagram-label { display: block; margin-bottom: 30px; }
.flow-row { display: flex; align-items: center; justify-content: space-between; gap: 9px; }
.flow-row.offset { margin-top: 17px; padding-left: 35px; }
.flow-row i { min-width: 62px; padding: 8px 9px; border: 1px solid var(--line-strong); color: var(--muted); font: normal 600 9px/1 var(--font-mono); text-align: center; }
.flow-row b { color: var(--accent); font-size: 12px; }
.data-bars { display: flex; align-items: end; gap: 7px; height: 55px; margin-top: 33px; padding-top: 13px; border-top: 1px solid var(--line); }
.data-bars span { flex: 1; height: 26%; background: rgba(var(--accent-rgb), 0.16); }
.data-bars span:nth-child(2) { height: 54%; }.data-bars span:nth-child(3) { height: 87%; }.data-bars span:nth-child(4) { height: 42%; }.data-bars span:nth-child(5) { height: 68%; background: rgba(var(--warm-rgb), .18); }
.lab-strip { display: grid; grid-template-columns: 1fr 0.9fr auto; gap: 55px; align-items: center; margin-top: 18px; padding: 38px 0; border-top: 1px solid var(--line-strong); border-bottom: 1px solid var(--line-strong); }
.lab-strip .eyebrow { display: block; margin-bottom: 10px; }
.lab-strip h3 { margin-bottom: 0; font-size: 22px; letter-spacing: -0.02em; }
.lab-strip p { margin-bottom: 0; color: var(--muted); font-size: 14px; }

.experience-section { background: linear-gradient(140deg, var(--surface), var(--bg) 65%); }
.experience-layout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(310px, 0.58fr); gap: clamp(60px, 9vw, 130px); align-items: start; }
.experience-main .section-title { margin-bottom: 70px; }
.timeline { margin: 0; padding: 0; list-style: none; }
.timeline-item { position: relative; display: grid; grid-template-columns: 130px 1fr; gap: 30px; padding: 0 0 47px 27px; border-left: 1px solid var(--line-strong); }
.timeline-item::before { content: ""; position: absolute; left: -4px; top: 6px; width: 7px; height: 7px; border-radius: 50%; background: var(--bg); border: 1px solid var(--accent); box-shadow: 0 0 0 5px rgba(var(--accent-rgb), .06); }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-date { padding-top: 1px; color: var(--accent); font: 600 10px/1.5 var(--font-mono); text-transform: uppercase; letter-spacing: 0.05em; }
.timeline-item h3 { margin-bottom: 3px; font-size: 22px; letter-spacing: -0.02em; }
.timeline-item .company { margin-bottom: 13px; color: var(--company); font-size: 13px; font-weight: 620; }
.timeline-item div > p:last-child { margin-bottom: 0; color: var(--muted); font-size: 15px; }
.profile-panel { position: sticky; top: calc(var(--header-height) + 34px); border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel-bg); backdrop-filter: blur(12px); }
.profile-panel-block { padding: 27px; }
.profile-panel-block + .profile-panel-block { border-top: 1px solid var(--line); }
.panel-kicker { margin-bottom: 20px; }
.education-item + .education-item { margin-top: 22px; }
.education-item strong { display: block; margin-bottom: 5px; font-size: 14px; }
.education-item span, .profile-panel-block > p:not(.panel-kicker) { display: block; margin-bottom: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.principle-list { margin: 0; padding: 0; list-style: none; }
.principle-list li { position: relative; padding-left: 17px; color: var(--muted); font-size: 13px; }
.principle-list li + li { margin-top: 10px; }
.principle-list li::before { content: "→"; position: absolute; left: 0; color: var(--accent); }
.profile-panel-block > p:not(.panel-kicker) { display: flex; justify-content: space-between; gap: 20px; }
.profile-panel-block > p:not(.panel-kicker) + p { margin-top: 9px; }
.profile-panel-block > p span { color: var(--ink); }

.writing-section { background: var(--bg-deep); }
.writing-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.article-card { min-height: 390px; padding: 34px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); display: flex; flex-direction: column; transition: transform 220ms ease, border-color 220ms ease, background 220ms ease; }
.article-card:hover { transform: translateY(-4px); border-color: rgba(var(--accent-rgb), .38); background: var(--surface-2); }
.article-type { display: block; margin-bottom: auto; }
.article-card h3 { max-width: 500px; margin: 70px 0 18px; font-size: clamp(29px, 3.3vw, 43px); line-height: 1.08; letter-spacing: -0.04em; }
.article-card p { max-width: 520px; margin-bottom: 30px; color: var(--muted); }
.article-link { margin-top: auto; }

.contact-section { padding: 105px 0; background: var(--accent); color: var(--contact-ink); }
.contact-section .eyebrow { color: var(--contact-kicker); }
.contact-layout { display: grid; grid-template-columns: 1.3fr 0.7fr; gap: 90px; align-items: end; }
.contact-layout h2 { margin: 17px 0 0; font-size: clamp(42px, 5vw, 72px); line-height: 1.04; letter-spacing: -0.055em; font-weight: 650; }
.contact-side p { margin-bottom: 28px; color: var(--contact-muted); font-size: 16px; }
.button-light { background: var(--button-dark); border-color: var(--button-dark); color: var(--ink); }
.button-light:hover { background: var(--button-dark-hover); }

.site-footer { padding: 44px 0; background: var(--footer-bg); }
.footer-inner { display: grid; grid-template-columns: 1fr auto auto; gap: 60px; align-items: center; }
.footer-inner > div:first-child { display: flex; flex-direction: column; }
.footer-inner strong { font-size: 14px; }.footer-inner span { color: var(--faint); font-size: 11px; }
.footer-links { display: flex; gap: 24px; }
.footer-links a { color: var(--muted); font-size: 12px; }.footer-links a:hover { color: var(--accent); }
.footer-inner > p { margin-bottom: 0; color: var(--faint); font: 500 10px/1.4 var(--font-mono); }

.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity 650ms ease, transform 650ms cubic-bezier(.2,.75,.2,1); }
.js .reveal.is-visible { opacity: 1; transform: translateY(0); }

@keyframes signal { from { stroke-dashoffset: 0; } to { stroke-dashoffset: -224; } }
@keyframes pulse { 0%, 100% { opacity: 0.45; transform: scale(.82); } 50% { opacity: 1; transform: scale(1.1); } }

@media (max-width: 1080px) {
  .hero { min-height: auto; }
  .hero-layout { grid-template-columns: 1fr; }
  .hero-copy { max-width: 800px; }
  .system-visual { justify-self: center; width: min(82vw, 570px); margin-top: 30px; }
  .project-featured { grid-template-columns: 1fr; }
  .project-diagram { width: min(100%, 520px); margin: 35px 0 0; }
  .lab-strip { grid-template-columns: 1fr 1fr; }
  .lab-strip .text-link { grid-column: 1 / -1; }
  .experience-layout { gap: 60px; }
}

@media (max-width: 820px) {
  :root { --shell: min(calc(100% - 34px), 700px); --header-height: 68px; }
  .js .nav-toggle { position: relative; z-index: 3; display: grid; place-content: center; gap: 6px; width: 42px; height: 42px; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: rgba(var(--bg-rgb), .65); color: var(--ink); }
  .nav-toggle span:not(.sr-only) { display: block; width: 17px; height: 1px; background: currentColor; transition: transform 180ms ease; }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { transform: translateY(3.5px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-3.5px) rotate(-45deg); }
  .js .site-nav { position: fixed; inset: 0; z-index: 2; display: flex; flex-direction: column; justify-content: center; gap: 23px; padding: 80px 25px; background: rgba(var(--bg-deep-rgb), .98); opacity: 0; visibility: hidden; transform: translateY(-10px); transition: opacity 180ms ease, visibility 180ms ease, transform 180ms ease; }
  .js .site-nav.is-open { opacity: 1; visibility: visible; transform: translateY(0); }
  .js .site-nav a { font-size: 22px; }
  .js .site-nav .language-link { min-width: 52px; height: 38px; font-size: 13px; }
  html:not(.js) .site-nav { gap: 12px; flex-wrap: wrap; justify-content: flex-end; }
  html:not(.js) .site-nav a { font-size: 11px; }
  body.nav-open { overflow: hidden; }
  .hero { padding-top: calc(var(--header-height) + 70px); }
  .hero-copy h1 { font-size: clamp(50px, 12vw, 76px); }
  .hero-facts { grid-template-columns: 1fr 1fr; }
  .hero-facts div:last-child { display: none; }
  .section { padding: 96px 0; }
  .split-intro { grid-template-columns: 1fr; gap: 15px; }
  .intro-columns { grid-template-columns: 1fr; gap: 18px; }
  .expertise-item { grid-template-columns: 42px 1fr; gap: 20px; }
  .tech-line { grid-column: 2; }
  .section-heading-row { display: block; }
  .section-heading-row .text-link { margin-top: 25px; }
  .section-heading-row > p { margin-top: 25px; }
  .project-grid, .writing-grid { grid-template-columns: 1fr; }
  .project-featured { grid-column: auto; }
  .experience-layout { grid-template-columns: 1fr; }
  .profile-panel { position: static; }
  .contact-layout { grid-template-columns: 1fr; gap: 40px; }
  .footer-inner { grid-template-columns: 1fr; gap: 25px; }
}

@media (max-width: 560px) {
  :root { --shell: calc(100% - 28px); }
  .brand-name { display: none; }
  .hero { padding-bottom: 72px; }
  .hero-copy h1 { margin-top: 18px; font-size: clamp(43px, 13.5vw, 62px); }
  .hero-lede { font-size: 17px; }
  .hero-actions { align-items: stretch; flex-direction: column; }
  .button { width: 100%; justify-content: space-between; }
  .hero-facts { grid-template-columns: 1fr; gap: 14px; margin-top: 42px; }
  .hero-facts div { padding-bottom: 12px; border-bottom: 1px solid var(--line); }
  .hero-facts div:last-child { display: none; }
  .system-visual { width: min(112vw, 480px); margin-left: -6vw; }
  .system-node { min-width: 83px; min-height: 52px; padding: 8px 9px; }
  .system-node strong { font-size: 9px; }.system-node span, .system-node small { font-size: 7px; }
  .node-core { min-width: 106px; min-height: 64px; }.node-core strong { font-size: 11px; }
  .visual-footer { display: none; }
  .section-title { font-size: clamp(35px, 11vw, 49px); }
  .intro-columns { font-size: 16px; }
  .principle { margin-top: 48px; padding-left: 19px; }
  .expertise-item { display: grid; grid-template-columns: 34px 1fr; gap: 14px; padding: 25px 0; }
  .expertise-item:hover { padding-left: 0; padding-right: 0; }
  .expertise-item h3 { font-size: 21px; }
  .expertise-item p { font-size: 14px; }
  .project-card { min-height: 450px; padding: 21px; }
  .project-featured { min-height: 0; }
  .project-content { padding-top: 95px; }
  .project-diagram { padding: 16px; }
  .flow-row { gap: 4px; }.flow-row i { min-width: 48px; padding: 7px 4px; font-size: 7px; }.flow-row.offset { padding-left: 13px; }
  .lab-strip { grid-template-columns: 1fr; gap: 22px; }
  .lab-strip .text-link { grid-column: auto; }
  .timeline-item { grid-template-columns: 1fr; gap: 9px; padding-left: 22px; }
  .writing-grid { gap: 12px; }
  .article-card { min-height: 350px; padding: 25px; }
  .article-card h3 { margin-top: 55px; }
  .contact-section { padding: 80px 0; }
  .contact-layout h2 { font-size: clamp(39px, 12vw, 56px); }
  .footer-links { flex-wrap: wrap; gap: 14px 22px; }
}

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

@media print {
  .site-header, .system-visual, .hero-grid, .hero-actions, .contact-section, .site-footer { display: none !important; }
  body { background: white; color: #111; font-size: 11pt; }
  .hero { min-height: 0; padding: 30px 0; }
  .section { padding: 30px 0; border-color: #ccc !important; }
  .hero-copy h1, .section-title { color: #111; }
  .hero-copy h1 span, .eyebrow, .section-label, .expertise-index, .timeline-date { color: #9b430b; }
  .hero-lede, .intro-columns, .expertise-item p, .project-content > p, .timeline-item div > p:last-child { color: #333; }
  .project-card, .profile-panel, .article-card { break-inside: avoid; background: white; border-color: #bbb; }
  .js .reveal { opacity: 1; transform: none; }
}
