:root {
  --bg: #080b0f;
  --bg-deep: #05070a;
  --surface: #0d1117;
  --surface-2: #11171e;
  --line: #252c34;
  --line-bright: #39434e;
  --text: #f2f5f4;
  --muted: #9aa5ad;
  --dim: #66717a;
  --amber: #f4b860;
  --mint: #83e6c5;
  --sans: "Manrope", sans-serif;
  --mono: "DM Mono", monospace;
  --page: min(1380px, calc(100vw - 64px));
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--bg); }
body {
  margin: 0;
  min-width: 320px;
  color: var(--text);
  background:
    radial-gradient(circle at 78% 8%, rgba(244,184,96,.08), transparent 23rem),
    linear-gradient(180deg, var(--bg) 0%, #090d12 52%, var(--bg-deep) 100%);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.65;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button, a { -webkit-tap-highlight-color: transparent; }
::selection { background: var(--amber); color: var(--bg); }
.skip-link { position: fixed; top: -100px; left: 20px; z-index: 100; padding: 10px 16px; background: var(--amber); color: var(--bg); }
.skip-link:focus { top: 20px; }
#signal-canvas { position: fixed; inset: 0; width: 100%; height: 100%; opacity: .18; pointer-events: none; z-index: 0; }
main, footer, .site-header { position: relative; z-index: 1; }

.site-header {
  width: var(--page);
  height: 76px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: .78rem;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.wordmark { display: inline-flex; align-items: center; gap: 12px; justify-self: start; }
.wordmark-mark { display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid var(--line-bright); color: var(--amber); font-weight: 500; }
.wordmark-text { color: #c9d0d4; }
nav { display: flex; align-items: center; gap: 32px; color: var(--muted); }
nav a, .header-status, footer a, .text-link { transition: color .2s ease; }
nav a:hover, nav a:focus-visible, footer a:hover, .text-link:hover { color: var(--amber); }
.header-status { justify-self: end; color: var(--mint); display: flex; align-items: center; gap: 8px; }
.status-pulse { width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 5px rgba(131,230,197,.08); }

.hero { width: var(--page); margin: 0 auto; padding: clamp(80px, 10vw, 150px) 0 0; display: grid; grid-template-columns: 1.05fr .72fr; column-gap: clamp(50px, 8vw, 130px); }
.hero-copy { align-self: center; }
.eyebrow, .section-index, .project-meta, .project-number, .role-kicker, .timeline-date, .education-year, .window-bar, .window-readout, .lab-board-header, .experiment-status, .experiment-code, .proof-label {
  font-family: var(--mono);
  letter-spacing: .075em;
  text-transform: uppercase;
}
.eyebrow { margin: 0 0 24px; color: var(--amber); font-size: .82rem; }
.hero-hello { margin: 0 0 36px; color: var(--text); font-family: var(--mono); font-size: clamp(1.35rem, 2.4vw, 2.2rem); letter-spacing: -.03em; }
.type-caret { display: inline-block; width: 2px; height: 1.1em; margin-left: 7px; background: var(--amber); vertical-align: -.12em; animation: caretBlink 1s steps(1) infinite; }
@keyframes caretBlink { 50% { opacity: 0; } }
h1 { margin: 0; max-width: 900px; font-size: clamp(3rem, 5.4vw, 6.1rem); line-height: .98; letter-spacing: -.062em; font-weight: 500; }
.hero-summary { max-width: 660px; margin: 36px 0 0; color: #b2bbc0; font-size: clamp(1.05rem, 1.5vw, 1.25rem); line-height: 1.7; }
.hero-actions, .contact-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 38px; }
.button { min-height: 48px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 0 20px; border: 1px solid var(--line-bright); font-family: var(--mono); font-size: .78rem; text-transform: uppercase; letter-spacing: .045em; transition: transform .2s ease, background .2s ease, color .2s ease, border-color .2s ease; }
.button:hover { transform: translateY(-2px); }
.button:focus-visible, a:focus-visible, summary:focus-visible { outline: 2px solid var(--amber); outline-offset: 4px; }
.button-primary { background: var(--amber); border-color: var(--amber); color: #171109; }
.button-primary:hover { background: #ffd08c; }
.button-secondary { color: #c8d0d4; }
.button-secondary:hover { border-color: var(--amber); color: var(--amber); }

.portrait-window { align-self: center; width: min(100%, 520px); margin: 0; justify-self: end; }
.portrait-frame { position: relative; overflow: hidden; aspect-ratio: 4 / 5; border: 1px solid var(--line-bright); background: var(--surface); box-shadow: 0 28px 90px rgba(0,0,0,.36); }
.portrait-frame::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, transparent 62%, rgba(8,11,15,.48)); box-shadow: inset 0 0 0 8px rgba(8,11,15,.2); }
.portrait-frame img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%; filter: saturate(.83) contrast(1.04); transition: transform .8s cubic-bezier(.2,.7,.2,1), filter .4s ease; }
.portrait-window:hover img { transform: scale(1.018); filter: saturate(.96) contrast(1.02); }
.portrait-index { position: absolute; z-index: 1; right: 16px; top: 16px; padding: 7px 9px; background: rgba(8,11,15,.78); color: #c8d0d4; font-family: var(--mono); font-size: .62rem; letter-spacing: .07em; }
.portrait-window figcaption { display: flex; justify-content: space-between; gap: 20px; padding: 14px 2px 0; color: var(--dim); font-family: var(--mono); font-size: .66rem; text-transform: uppercase; letter-spacing: .055em; }
.portrait-window figcaption span:first-child { color: var(--amber); }
.window-bar, .lab-board-header { display: flex; justify-content: space-between; align-items: center; min-height: 48px; padding: 0 18px; border-bottom: 1px solid var(--line); color: var(--dim); font-size: .68rem; }
.window-live { color: var(--mint); }
.signal-map { padding: 18px; }
.signal-map svg { display: block; width: 100%; height: auto; }
.map-grid path { stroke: var(--line-bright); stroke-width: 1; }
.map-route { fill: none; stroke: url(#signalGradient); stroke-width: 2; }
.map-node circle { fill: var(--bg); stroke: #7c8790; stroke-width: 2; }
.map-node text { fill: #89949b; font-family: var(--mono); font-size: 11px; letter-spacing: .1em; }
.map-node-active circle { stroke: var(--mint); filter: url(#glow); }
.map-node-active text { fill: var(--mint); }
.signal-dot { fill: var(--amber); filter: url(#glow); }
.window-readout { min-height: 70px; display: grid; grid-template-columns: repeat(3,1fr); border-top: 1px solid var(--line); font-size: .64rem; color: var(--dim); }
.window-readout span { padding: 15px 18px; border-right: 1px solid var(--line); display: flex; flex-direction: column; }
.window-readout span:last-child { border-right: 0; }
.window-readout b { color: var(--text); font-size: .85rem; font-weight: 400; }

.proof-strip { grid-column: 1/-1; margin-top: clamp(80px, 10vw, 150px); display: grid; grid-template-columns: repeat(4,1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.proof-strip > div { min-height: 98px; padding: 23px 24px; border-right: 1px solid var(--line); display: flex; flex-direction: column; justify-content: center; }
.proof-strip > div:last-child { border-right: 0; }
.proof-label { color: var(--dim); font-size: .64rem; margin-bottom: 7px; }
.proof-strip strong { font-weight: 500; color: #d8dddf; }

.section { width: var(--page); margin: 0 auto; padding: clamp(100px, 12vw, 180px) 0; border-bottom: 1px solid var(--line); }
.section-index { display: flex; gap: 18px; color: var(--dim); font-size: .72rem; }
.section-index span:first-child { color: var(--amber); }
.section-heading { margin: 36px 0 68px; display: grid; grid-template-columns: 1.35fr .65fr; gap: 80px; align-items: end; }
h2 { margin: 0; font-size: clamp(2.4rem, 4.8vw, 5.6rem); line-height: 1.03; letter-spacing: -.055em; font-weight: 500; }
.section-heading p, .lab-intro > p:last-child { margin: 0; color: var(--muted); font-size: 1.05rem; }

.project-list { border-top: 1px solid var(--line); }
.project { display: grid; grid-template-columns: 150px 1fr; padding: 48px 0; border-bottom: 1px solid var(--line); transition: border-color .25s ease; }
.project:hover { border-color: var(--line-bright); }
.project-number { color: var(--dim); font-size: .7rem; padding-top: 8px; }
.project-meta { display: flex; justify-content: space-between; color: var(--dim); font-size: .68rem; }
.project-meta span:last-child { color: var(--amber); }
.project h3 { margin: 16px 0 18px; font-size: clamp(1.8rem, 3.4vw, 3.65rem); font-weight: 500; line-height: 1.08; letter-spacing: -.04em; }
.project-lead { margin: 0; max-width: 860px; color: #aeb7bc; font-size: 1.05rem; }
.architecture { margin: 34px 0 6px; display: flex; align-items: center; gap: 10px; overflow-x: auto; padding-bottom: 10px; color: var(--dim); font-family: var(--mono); font-size: .68rem; }
.architecture-node { flex: 0 0 auto; padding: 10px 12px; border: 1px solid var(--line-bright); color: #b6c0c5; background: var(--surface); text-transform: uppercase; }
.architecture-node-accent { border-color: rgba(131,230,197,.45); color: var(--mint); }
.project-footer { margin-top: 30px; display: flex; justify-content: space-between; gap: 30px; align-items: end; }
.tags, .role-signals { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tags li, .role-signals li { border: 1px solid var(--line); padding: 6px 9px; color: #89949b; font-family: var(--mono); font-size: .66rem; text-transform: uppercase; letter-spacing: .04em; }
.text-link { flex: 0 0 auto; color: #cbd2d6; font-family: var(--mono); font-size: .75rem; text-transform: uppercase; letter-spacing: .045em; }
details { margin-top: 28px; border-top: 1px dashed var(--line-bright); }
summary { padding: 14px 0; cursor: pointer; list-style: none; display: flex; justify-content: space-between; color: #c6cdd1; font-family: var(--mono); font-size: .76rem; text-transform: uppercase; letter-spacing: .06em; }
summary::-webkit-details-marker { display: none; }
details[open] summary span { transform: rotate(45deg); }
summary span { transition: transform .2s ease; }
.detail-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; padding: 10px 0 20px; }
.detail-grid p { color: var(--muted); font-size: .9rem; }
.detail-grid p span { display: block; color: var(--amber); font-family: var(--mono); font-size: .65rem; text-transform: uppercase; margin-bottom: 7px; }

.analytics-layer { margin-top: 76px; display: grid; grid-template-columns: .72fr 1.28fr; gap: clamp(40px, 7vw, 110px); padding: 42px; border: 1px solid var(--line-bright); background: linear-gradient(120deg, rgba(131,230,197,.055), transparent 45%), var(--surface); }
.analytics-intro .eyebrow { margin-bottom: 14px; color: var(--mint); }
.analytics-intro h3 { margin: 0 0 18px; font-size: clamp(1.8rem, 3vw, 3rem); line-height: 1.08; letter-spacing: -.045em; font-weight: 500; }
.analytics-intro > p:last-child { margin: 0; color: var(--muted); }
.analytics-flow { display: grid; grid-template-columns: repeat(3, 1fr); border-left: 1px solid var(--line); }
.analytics-step { min-height: 230px; padding: 22px; border-top: 1px solid var(--line); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); display: flex; flex-direction: column; }
.analytics-step > span { color: var(--amber); font-family: var(--mono); font-size: .64rem; letter-spacing: .065em; }
.analytics-step strong { margin: auto 0 12px; color: #dce1e2; font-size: 1rem; font-weight: 500; }
.analytics-step p { margin: 0; color: var(--dim); font-size: .78rem; line-height: 1.55; }

.experience-section { position: relative; }
.timeline { margin-top: 70px; }
.timeline-item { display: grid; grid-template-columns: 150px 32px 1fr; min-height: 320px; }
.timeline-date { color: var(--dim); font-size: .7rem; padding-top: 7px; }
.timeline-node { width: 11px; height: 11px; margin-top: 8px; border: 2px solid var(--dim); background: var(--bg); position: relative; }
.timeline-node::after { content: ""; position: absolute; width: 1px; top: 14px; left: 3px; height: 290px; background: var(--line); }
.timeline-item:last-child .timeline-node::after { display: none; }
.timeline-bosch .timeline-node { border-color: var(--mint); box-shadow: 0 0 18px rgba(131,230,197,.3); }
.timeline-content { padding: 0 0 75px 42px; }
.role-kicker { color: var(--mint); font-size: .68rem; }
.timeline-content h3 { margin: 10px 0 0; font-size: clamp(1.7rem, 3vw, 3.2rem); font-weight: 500; letter-spacing: -.04em; }
.company { margin: 0 0 22px; color: var(--amber); }
.timeline-content > p:not(.company) { max-width: 800px; color: var(--muted); }
.role-signals { margin-top: 24px; }
.impact-grid { display: grid; grid-template-columns: repeat(4,1fr); margin: 32px 0; border: 1px solid var(--line); }
.impact-grid div { padding: 22px 18px; border-right: 1px solid var(--line); }
.impact-grid div:last-child { border-right: 0; }
.impact-grid strong { display: block; color: var(--amber); font-family: var(--mono); font-size: 1.4rem; font-weight: 400; }
.impact-grid span { color: var(--dim); font-size: .73rem; line-height: 1.4; }

.lab-section { width: 100%; max-width: none; padding-left: max(32px, calc((100vw - 1380px)/2)); padding-right: max(32px, calc((100vw - 1380px)/2)); background: linear-gradient(120deg, rgba(244,184,96,.06), transparent 34%), var(--surface); }
.lab-layout { margin-top: 44px; display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(50px, 8vw, 130px); align-items: start; }
.lab-intro { position: sticky; top: 120px; }
.lab-intro h2 { font-size: clamp(2.6rem, 4.5vw, 5rem); }
.lab-intro > p:last-child { margin-top: 32px; max-width: 560px; }
.lab-board { border: 1px solid var(--line-bright); background: rgba(8,11,15,.72); }
.experiment { position: relative; padding: 30px; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 150px 1fr; gap: 24px; }
.experiment-status { font-size: .65rem; }
.status-development { color: var(--amber); }
.status-planned { color: var(--mint); }
.experiment h3 { margin: 0 0 12px; font-size: 1.5rem; font-weight: 500; }
.experiment p { margin: 0 0 20px; color: var(--muted); }
.experiment-code { position: absolute; right: 18px; top: 18px; color: #404b54; font-size: .6rem; }
.lab-note { margin: 0; padding: 18px 30px; color: var(--dim); font-family: var(--mono); font-size: .68rem; }

.education-grid { margin-top: 64px; display: grid; grid-template-columns: repeat(3,1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.education-card { min-height: 300px; padding: 30px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); display: flex; flex-direction: column; }
.education-year { color: var(--amber); font-size: .66rem; }
.education-card h3 { margin: auto 0 14px; font-size: 1.35rem; line-height: 1.35; font-weight: 500; }
.education-card p { margin: 0 0 12px; color: #bbc3c7; }
.education-card > span:last-child { color: var(--dim); font-size: .8rem; }

.contact-section { width: var(--page); margin: 0 auto; padding: clamp(120px, 15vw, 220px) 0; text-align: center; position: relative; overflow: hidden; }
.contact-section h2 { font-size: clamp(2.8rem, 6vw, 6.8rem); }
.contact-copy { max-width: 680px; margin: 32px auto 0; color: var(--muted); font-size: 1.05rem; }
.contact-actions { justify-content: center; }
.contact-signal { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 14px; opacity: .08; z-index: -1; }
.contact-signal span { width: 1px; height: 70%; background: linear-gradient(transparent, var(--amber), transparent); animation: equalize 4s ease-in-out infinite alternate; }
.contact-signal span:nth-child(2) { height: 45%; animation-delay: -.8s; }.contact-signal span:nth-child(3) { height: 90%; animation-delay: -1.6s; }.contact-signal span:nth-child(4) { height: 55%; animation-delay: -2.4s; }.contact-signal span:nth-child(5) { height: 75%; animation-delay: -3.2s; }
@keyframes equalize { to { transform: scaleY(.35); } }

footer { width: var(--page); min-height: 76px; margin: 0 auto; border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 20px; color: var(--dim); font-family: var(--mono); font-size: .67rem; text-transform: uppercase; letter-spacing: .045em; }

.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1); }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

@media (max-width: 1100px) {
  .site-header { grid-template-columns: 1fr auto; }
  .site-header nav { display: none; }
  .hero { grid-template-columns: 1fr; }
  .hero-copy { max-width: 880px; }
  .portrait-window { margin-top: 70px; justify-self: start; width: min(72vw, 520px); }
  .lab-layout { grid-template-columns: 1fr; }
  .lab-intro { position: static; }
  .impact-grid { grid-template-columns: repeat(2,1fr); }
  .analytics-layer { grid-template-columns: 1fr; }
  .impact-grid div:nth-child(2) { border-right: 0; }
  .impact-grid div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
}

@media (max-width: 760px) {
  :root { --page: calc(100vw - 36px); }
  .site-header { height: 66px; }
  .wordmark-text, .header-status .status-pulse { display: none; }
  .header-status { font-size: .62rem; }
  .hero { padding-top: 80px; }
  h1 { font-size: clamp(2.75rem, 14vw, 4.4rem); }
  .hero-summary { margin-top: 26px; }
  .portrait-window { margin-top: 56px; width: 100%; }
  .portrait-window figcaption { flex-direction: column; gap: 2px; }
  .window-readout { grid-template-columns: 1fr; }
  .window-readout span { border-right: 0; border-bottom: 1px solid var(--line); }
  .window-readout span:last-child { border-bottom: 0; }
  .proof-strip { grid-template-columns: repeat(2,1fr); }
  .proof-strip > div:nth-child(2) { border-right: 0; }
  .proof-strip > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .section-heading { grid-template-columns: 1fr; gap: 24px; margin-bottom: 48px; }
  .project { grid-template-columns: 1fr; gap: 16px; padding: 38px 0; }
  .project-number { padding: 0; }
  .project-meta { gap: 16px; }
  .project-footer { align-items: flex-start; flex-direction: column; }
  .detail-grid { grid-template-columns: 1fr; gap: 4px; }
  .analytics-layer { margin-top: 52px; padding: 24px 18px; }
  .analytics-flow { grid-template-columns: 1fr; border-left: 1px solid var(--line); }
  .analytics-step { min-height: 190px; border-bottom: 0; }
  .analytics-step:last-child { border-bottom: 1px solid var(--line); }
  .timeline-item { grid-template-columns: 24px 1fr; }
  .timeline-date { grid-column: 2; padding: 0 0 12px 24px; }
  .timeline-node { grid-column: 1; grid-row: 1/3; }
  .timeline-content { grid-column: 2; padding-left: 24px; }
  .timeline-node::after { height: 100%; }
  .impact-grid { grid-template-columns: 1fr 1fr; }
  .lab-section { padding-left: 18px; padding-right: 18px; }
  .experiment { grid-template-columns: 1fr; gap: 12px; padding: 26px 20px; }
  .experiment-code { display: none; }
  .lab-note { padding: 16px 20px; }
  .education-grid { grid-template-columns: 1fr; }
  .education-card { min-height: 250px; }
  .contact-actions .button { width: 100%; }
  footer { padding: 24px 0; flex-direction: column; align-items: flex-start; }
}

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