/* ---------- theme ---------- */
:root {
  --sans: "Segoe UI", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --radius: 14px;
  --maxw: 1180px;
}
[data-theme="dark"] {
  --bg: #0A0D12; --bg2: #0D1117; --panel: #11161D; --panel2: #161B22; --border: #262D36;
  --fg: #E6EDF3; --muted: #8B949E; --faint: #30363D;
  --accent: #CCEF00; --accent-text: #CCEF00; --accent-soft: rgba(204, 239, 0, .12);
  --accent2: #22D3EE; --accent3: #A78BFA; --on-accent: #0D1117;
  --shadow: 0 20px 60px rgba(0, 0, 0, .45);
}
[data-theme="light"] {
  --bg: #FFFFFF; --bg2: #F6F8FA; --panel: #FFFFFF; --panel2: #F6F8FA; --border: #D0D7DE;
  --fg: #1F2328; --muted: #59636E; --faint: #D8DEE4;
  --accent: #9BC400; --accent-text: #5C7400; --accent-soft: rgba(155, 196, 0, .14);
  --accent2: #0E7490; --accent3: #7C3AED; --on-accent: #1F2328;
  --shadow: 0 20px 50px rgba(31, 35, 40, .12);
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0; background: var(--bg); color: var(--fg); font: 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  background-image: radial-gradient(circle at 1px 1px, var(--faint) 1px, transparent 0);
  background-size: 28px 28px; background-attachment: fixed;
}
a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
.mono { font-family: var(--mono); }
h1, h2, h3 { line-height: 1.15; margin: 0; }
::selection { background: var(--accent); color: var(--on-accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.btn {
  display: inline-flex; align-items: center; gap: .5em; padding: .75em 1.3em; border-radius: 999px;
  background: var(--accent); color: var(--on-accent); font-weight: 700; border: 1px solid var(--accent);
  transition: transform .15s, box-shadow .15s; cursor: pointer; font-size: .95rem;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); box-shadow: 0 8px 24px var(--accent-soft); }
.btn-ghost { background: transparent; color: var(--fg); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent-text); }
.btn-small { padding: .45em 1em; font-size: .85rem; }
.chip {
  font: 600 .85rem var(--mono); padding: .45em 1em; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--border); background: var(--panel); color: var(--muted);
}
.chip.active, .chip:hover { border-color: var(--accent); color: var(--accent-text); background: var(--accent-soft); }
.link-btn { background: none; border: 0; color: var(--muted); font: inherit; cursor: pointer; }
.link-btn:hover { color: var(--accent-text); }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50; display: flex; align-items: center; justify-content: space-between;
  padding: 14px max(20px, calc((100% - var(--maxw)) / 2)); backdrop-filter: blur(12px);
  background: color-mix(in srgb, var(--bg) 78%, transparent); border-bottom: 1px solid var(--border);
}
.brand { color: var(--fg); font-weight: 700; font-size: 1.05rem; }
.brand span { color: var(--accent-text); }
.brand:hover { text-decoration: none; }
.nav-links { display: flex; align-items: center; gap: 22px; }
.nav-links a:not(.btn) { color: var(--muted); font-weight: 500; font-size: .95rem; }
.nav-links a:not(.btn):hover, .nav-links a.active { color: var(--fg); text-decoration: none; }
.nav-links a.active::after { content: ""; display: block; height: 2px; background: var(--accent); border-radius: 2px; }
.theme-toggle { background: none; border: 1px solid var(--border); color: var(--fg); border-radius: 50%; width: 34px; height: 34px; cursor: pointer; font-size: 1rem; }
.theme-toggle:hover { border-color: var(--accent); }
.nav-toggle { display: none; background: none; border: 0; width: 36px; height: 36px; cursor: pointer; }
.nav-toggle span { display: block; height: 2px; margin: 7px 6px; background: var(--fg); transition: transform .2s; }

/* ---------- layout ---------- */
main > section { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.section { padding-top: 110px !important; }
.section-head { max-width: 760px; margin-bottom: 36px; }
.kicker { color: var(--accent-text); font-size: .85rem; letter-spacing: .08em; text-transform: uppercase; margin: 0 0 10px; }
.section-head h2, .contact h2 { font-size: clamp(1.9rem, 3.6vw, 2.8rem); letter-spacing: -.01em; }
.lead { color: var(--muted); font-size: 1.08rem; margin: 14px 0 0; }
.sub-head { color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .12em; margin: 28px 0 12px; }

.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- hero ---------- */
.hero { padding-top: 70px; }
.hero-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 40px; align-items: center; }
.eyebrow { color: var(--muted); font-size: .85rem; margin: 0 0 18px; display: flex; align-items: center; gap: 10px; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 var(--accent); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.hero h1 { font-size: clamp(2.8rem, 7vw, 5rem); font-weight: 800; letter-spacing: -.02em; }
.hero-role { font-size: clamp(1.15rem, 2.2vw, 1.5rem); margin: 10px 0 0; color: var(--fg); }
.hero-role span:first-child { color: var(--accent-text); font-weight: 600; }
.hero-typed { color: var(--muted); margin: 18px 0 0; min-height: 1.6em; }
.caret { display: inline-block; width: .6em; height: 1.1em; background: var(--accent); vertical-align: -.2em; margin-left: 2px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.hero-summary { color: var(--muted); font-size: 1.08rem; max-width: 640px; margin: 18px 0 0; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-photo { display: flex; justify-content: center; }
.photo-ring { position: relative; width: min(320px, 70vw); aspect-ratio: 1; border-radius: 50%; padding: 8px;
  background: conic-gradient(from 0deg, var(--accent), var(--accent2), var(--accent3), var(--accent)); animation: spin 14s linear infinite; }
.photo-ring img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; border: 6px solid var(--bg); animation: spin 14s linear infinite reverse; }
@keyframes spin { to { transform: rotate(360deg); } }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 60px; }
.stat { background: var(--panel2); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px 20px 18px; position: relative; overflow: hidden; }
.stat::before { content: ""; position: absolute; left: 20px; top: 0; width: 36px; height: 3px; background: var(--accent); border-radius: 0 0 2px 2px; }
.stat b { display: block; font-size: clamp(1.9rem, 4vw, 2.6rem); color: var(--accent-text); line-height: 1.1; }
.stat span { font: 600 .75rem var(--mono); color: var(--muted); text-transform: uppercase; letter-spacing: .1em; }

/* ---------- planet ---------- */
.planet-wrap { position: relative; background: var(--bg2); border: 1px solid var(--border); border-radius: 20px; overflow: hidden; box-shadow: var(--shadow); }
#planet-canvas { display: block; width: 100%; cursor: default; touch-action: pan-y; }
.planet-info {
  position: absolute; right: 16px; top: 16px; width: min(300px, calc(100% - 32px)); background: color-mix(in srgb, var(--panel) 92%, transparent);
  border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; font-size: .9rem; backdrop-filter: blur(8px);
  transition: opacity .25s;
}
.planet-info h3 { font-size: 1.1rem; display: flex; align-items: center; gap: 10px; }
.planet-info h3 img { height: 22px; width: auto; background: #161B22; border-radius: 6px; padding: 3px 6px; }
.planet-info .big { font-size: 1.9rem; font-weight: 800; color: var(--accent-text); line-height: 1.1; margin-top: 8px; }
.planet-info .muted { color: var(--muted); }
.bar { height: 6px; background: var(--faint); border-radius: 3px; margin: 8px 0 10px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--accent); border-radius: 3px; transition: width .4s; }

/* ---------- pinout ---------- */
.pinout-wrap { background: var(--bg2); border: 1px solid var(--border); border-radius: 20px; padding: 24px 16px 18px; box-shadow: var(--shadow); }
#pinout { overflow-x: auto; -webkit-overflow-scrolling: touch; }
#pinout svg { width: 100%; min-width: 760px; height: auto; display: block; }
.pin { cursor: pointer; outline: none; }
.pin .pin-line { stroke: var(--faint); stroke-width: 6; }
.pin .pin-sig { stroke: var(--accent); stroke-width: 6; stroke-dasharray: 14 400; animation: sig 2.4s linear infinite; }
.pin .pin-end { fill: var(--bg2); stroke: var(--accent); stroke-width: 2.5; }
.pin .pin-desc { fill: var(--fg); font: 500 15px var(--sans); }
.pin .pin-num { fill: var(--muted); font: 500 10px var(--mono); }
.pin:hover .pin-line, .pin:focus .pin-line, .pin.on .pin-line { stroke: var(--accent); }
.pin:hover .pin-desc, .pin:focus .pin-desc, .pin.on .pin-desc { fill: var(--accent-text); font-weight: 700; }
@keyframes sig { from { stroke-dashoffset: 0; } to { stroke-dashoffset: -150; } }
.pin-info { min-height: 3.2em; text-align: center; color: var(--muted); margin-top: 8px; font-size: .95rem; }
.pin-info b { color: var(--fg); }
.skill-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; margin-top: 24px; }
.skill-group { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; }
.skill-group h4 { margin: 0 0 10px; font: 700 .8rem var(--mono); text-transform: uppercase; letter-spacing: .1em; color: var(--accent-text); }
.tag-row { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font: 500 .8rem var(--mono); padding: .25em .7em; border-radius: 999px; border: 1px solid var(--border); color: var(--muted); background: var(--panel2); }

/* ---------- projects ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.project-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 20px; }
.card {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
  display: flex; flex-direction: column; transition: transform .2s, border-color .2s, box-shadow .2s;
}
.card:hover { transform: translateY(-4px); border-color: var(--accent); box-shadow: var(--shadow); }
.card.hide { display: none; }
.card-media { aspect-ratio: 16 / 9; background: #0D1117; overflow: hidden; position: relative; }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-media .card-anim { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.card-media.placeholder { display: grid; place-items: center; background:
  radial-gradient(circle at 30% 30%, var(--accent-soft), transparent 60%), linear-gradient(135deg, #0D1117, #1C2128); }
.card-media.placeholder .initials { font: 800 2.2rem var(--mono); color: #CCEF00; letter-spacing: .05em; }
.card-kind { position: absolute; left: 12px; top: 12px; font: 700 .7rem var(--mono); text-transform: uppercase; letter-spacing: .1em;
  background: rgba(13, 17, 23, .85); color: #CCEF00; padding: .3em .7em; border-radius: 999px; border: 1px solid rgba(204, 239, 0, .4); }
.card-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card-body h3 { font-size: 1.2rem; }
.card-body p { margin: 0; color: var(--muted); font-size: .95rem; flex: 1; }
.card-body .more { font-weight: 600; font-size: .9rem; }

/* ---------- journey ---------- */
.timeline { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; position: relative; padding-top: 40px; }
.timeline::before { content: ""; position: absolute; left: 12.5%; right: 12.5%; top: 14px; height: 3px; background: var(--faint); border-radius: 2px; }
.timeline::after { content: ""; position: absolute; left: 12.5%; top: 14px; height: 3px; width: 0; background: var(--accent); border-radius: 2px; transition: width 1.6s ease .2s; }
.timeline.in::after { width: 75%; }
.stage { position: relative; background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px 18px 18px; text-align: center; }
.stage::before { content: attr(data-marker); position: absolute; left: 50%; top: -40px; transform: translateX(-50%);
  width: 30px; height: 30px; border-radius: 50%; background: var(--bg); border: 3px solid var(--accent); font: 800 .7rem/24px var(--mono); color: var(--accent-text); }
.stage:last-child::before { background: var(--accent); color: var(--on-accent); box-shadow: 0 0 0 6px var(--accent-soft); }
.stage h3 { font-size: 1.05rem; }
.stage .sub { font: 700 .72rem var(--mono); text-transform: uppercase; letter-spacing: .1em; color: var(--accent-text); margin: 6px 0 8px; }
.stage p { margin: 0; color: var(--muted); font-size: .9rem; }
.journey-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 40px; margin-top: 30px; }
.job { border-left: 2px solid var(--border); padding: 0 0 22px 22px; position: relative; }
.job::before { content: ""; position: absolute; left: -7px; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: var(--bg); border: 2px solid var(--accent); }
.job:first-child::before { background: var(--accent); }
.job .when { font: 600 .8rem var(--mono); color: var(--muted); }
.job h4 { margin: 2px 0 0; font-size: 1.08rem; }
.job .org { color: var(--accent-text); font-weight: 600; font-size: .92rem; }
.job ul { margin: 8px 0 0; padding-left: 18px; color: var(--muted); font-size: .94rem; }
.job li { margin-bottom: 4px; }
.job li::marker { color: var(--accent); }
.edu-item { margin-bottom: 14px; }
.edu-item b { display: block; }
.edu-item span { display: block; color: var(--muted); font-size: .92rem; }
.lang-list div { display: flex; justify-content: space-between; border-bottom: 1px dashed var(--border); padding: 6px 0; }
.lang-list span { color: var(--muted); }

/* ---------- contact / footer ---------- */
.contact { padding-bottom: 80px; }
.contact-card { text-align: center; background: var(--bg2); border: 1px solid var(--border); border-radius: 24px; padding: 56px 24px; box-shadow: var(--shadow);
  background-image: radial-gradient(circle at 50% 0, var(--accent-soft), transparent 60%); }
.contact-card .lead { margin-left: auto; margin-right: auto; max-width: 560px; }
.contact-card .hero-cta { justify-content: center; }
.footer { display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; color: var(--muted); font-size: .8rem;
  padding: 24px max(20px, calc((100% - var(--maxw)) / 2)); border-top: 1px solid var(--border); }
.noscript { text-align: center; padding: 40px; }

/* ---------- boot intro (js/intro.js) ---------- */
.boot { position: fixed; inset: 0; z-index: 100; overflow: hidden; background: #2a1c12; color: #E6EDF3;
  transition: opacity .6s ease, visibility .6s; }
html.skip-boot .boot { display: none; }
.boot.done { opacity: 0; visibility: hidden; pointer-events: none; }
body.booting { overflow: hidden; }
.boot-svg { position: absolute; left: 0; top: 0; width: 100%; height: 100%; display: block; }
.boot { -webkit-user-select: none; user-select: none; }
.boot-term { -webkit-user-select: text; user-select: text; }
.boot.looking { cursor: grab; touch-action: none; }
.boot.looking.grabbing { cursor: grabbing; }
.boot-hint { position: absolute; left: 50%; bottom: calc(9vh + 66px); transform: translateX(-50%); pointer-events: none;
  font: .78rem var(--mono); color: #8B949E; letter-spacing: .04em; white-space: nowrap; }
.boot-hint::before { content: "\21BB  "; color: #CCEF00; }
.boot-hint[hidden] { display: none; }
.boot-vignette { position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse at 50% 45%, transparent 40%, rgba(5, 3, 2, .72) 100%); }

/* portal: a hole opens around the antenna and the site shows through */
.boot.portal { --hr: 0px;
  -webkit-mask: radial-gradient(circle at var(--hx) var(--hy), transparent var(--hr), #000 calc(var(--hr) + 1px));
          mask: radial-gradient(circle at var(--hx) var(--hy), transparent var(--hr), #000 calc(var(--hr) + 1px)); }
.boot-ring { display: none; position: absolute; pointer-events: none; border-radius: 50%;
  left: calc(var(--hx) - var(--hr) - 6px); top: calc(var(--hy) - var(--hr) - 6px);
  width: calc(2 * var(--hr) + 12px); height: calc(2 * var(--hr) + 12px);
  border: 5px solid #22D3EE; box-shadow: 0 0 30px 8px rgba(34, 211, 238, .6), inset 0 0 18px rgba(204, 239, 0, .6); }
.boot.portal .boot-ring { display: block; }

/* svg parts */
.boot-svg text { font-family: var(--mono); text-rendering: geometricPrecision; }
.boot-svg .silk { fill: #E9ECEF; fill-opacity: .9; }
.boot-svg .b { font-weight: 700; font-family: var(--sans); }
.boot-svg .silk-line { fill: none; stroke: #E9ECEF; stroke-opacity: .7; stroke-width: .28; }
.boot-svg rect.silk-line[fill] { fill: #10141a; }
.boot-svg .chip-txt { fill: #C9D1D9; font-weight: 600; }
.boot-svg .chip-txt.dim { fill: #8B949E; }
.boot-svg .etch { fill: #4a5159; font-weight: 700; }
.boot-svg .plug-txt { fill: #8B949E; font-weight: 700; }
.boot-svg .bus-label { fill-opacity: .75; }
.boot-svg .trace { fill: none; stroke: #C9A227; stroke-opacity: .3; stroke-width: .85; stroke-linejoin: round; }
.boot-svg .trace.rail { stroke-width: 2.4; stroke-opacity: .32; }
.boot-svg .sig { fill: none; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1.6 4.4; opacity: 0; transition: opacity .4s; }
.boot-svg .sig.pwr { stroke: #CCEF00; stroke-width: 1.6; stroke-dasharray: 3 3; }
.boot-svg .sig.i2c { stroke: #22D3EE; stroke-width: .9; }
.boot-svg .sig.spi { stroke: #A78BFA; stroke-width: .9; }
.boot-svg .sig.on { opacity: 1; animation: boot-flow .55s linear infinite; }
.boot-svg .sig.pwr.on { animation-duration: 1.1s; }
.boot-svg .sig.rev { animation-direction: reverse; }
@keyframes boot-flow { to { stroke-dashoffset: -6; } }

.boot-svg .led-body { fill: #3a1515; }
.boot-svg .led-g .led-body { fill: #173a1f; }
.boot-svg .led-o .led-body { fill: #3d2a0c; }
.boot-svg .led-glow { opacity: 0; transition: opacity .25s; }
.boot-svg .led.on .led-glow { opacity: 1; }
.boot-svg .led-g.on .led-body { fill: #5CFF7A; }
.boot-svg .led-o.on .led-body { fill: #FFB020; }
.boot-svg .led-r.on .led-body { fill: #FF4D4D; }
#buttons.chase .bled .led-glow { animation: boot-chase 2.2s ease-out both; animation-delay: calc(var(--i) * 45ms); }
#buttons.chase .bled .led-body { animation: boot-chase-b 2.2s ease-out both; animation-delay: calc(var(--i) * 45ms); }
@keyframes boot-chase { 0%, 100% { opacity: 0; } 8%, 20% { opacity: 1; } }
@keyframes boot-chase-b { 0%, 100% { fill: #3a1515; } 8%, 20% { fill: #FF4D4D; } }

#mcu-glow { opacity: 0; transition: opacity 1s; }
#mcu.running #mcu-glow { opacity: 1; animation: boot-breathe 2.4s ease-in-out infinite; }
@keyframes boot-breathe { 50% { opacity: .55; } }
#sw { cursor: pointer; }
#touch-glow { opacity: 0; transition: opacity .3s; }
#sw.on #touch-glow { opacity: 1; }
#touch-ring, #touch-icon { transition: stroke .25s; }
#sw.on #touch-ring, #sw.on #touch-icon { stroke: #CCEF00; }
#lcd-glass { fill: #1d2410; transition: fill .4s; }
#lcd-glass.on { fill: #A8C83C; }
.boot-svg .lcd-txt { fill: #1b2408; font-weight: 700; white-space: pre; }

.boot-svg .ring { transform-box: fill-box; transform-origin: center; opacity: 0; }
.boot-svg .ring circle { stroke-width: .9; }
.boot-svg .r-pwr circle { stroke: #CCEF00; }
.boot-svg .r-usb circle { stroke: #22D3EE; }
.boot-svg .rings.show .ring, .boot-svg.idle .r-usb .ring { animation: boot-ring 1.8s ease-out infinite; }
@keyframes boot-ring { 0% { transform: scale(.3); opacity: 0; } 20% { opacity: 1; } 100% { transform: scale(1.25); opacity: 0; } }
.boot-svg .usb-guide path { stroke: #22D3EE; stroke-width: .8; stroke-dasharray: 2 2.4; opacity: 0; transition: opacity .3s; }
.boot-svg.idle .usb-guide path { opacity: .8; animation: boot-flow .8s linear infinite reverse; }
.boot-svg.idle #plug { cursor: pointer; }

.boot-svg .wv { transform-box: fill-box; transform-origin: center; opacity: 0; }
.boot-svg .waves.on .wv { animation: boot-wave 2.1s ease-out infinite; }
@keyframes boot-wave { 0% { transform: scale(.08); opacity: 0; } 12% { opacity: 1; } 100% { transform: scale(1); opacity: 0; } }
#wifi-halo { opacity: 0; transition: opacity 1s; }
.waves.on #wifi-halo { opacity: 1; animation: boot-breathe 1.2s ease-in-out infinite; }

/* hud */
.boot-hud { position: absolute; left: 20px; top: 18px; display: flex; align-items: center; gap: 14px; font-size: .85rem; pointer-events: none; }
.boot-brand { font-weight: 700; color: #E6EDF3; }
.boot-brand b { color: #CCEF00; }
.boot-stage { color: #8B949E; padding: .25em .8em; border: 1px solid #30363D; border-radius: 999px; background: rgba(8, 11, 15, .6); }
.boot-stage:empty { display: none; }
.boot-stage b { color: #CCEF00; }
.boot-tr { position: absolute; right: 20px; top: 16px; display: flex; align-items: center; gap: 8px; }
.boot-sound { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; cursor: pointer;
  background: rgba(8, 11, 15, .6); border: 1px solid #30363D; color: #C9D1D9; }
.boot-sound:hover { color: #CCEF00; border-color: #CCEF00; }
.sound-btn { display: inline-grid; place-items: center; }
.sound-btn .snd-off, .sound-btn[aria-pressed="false"] .snd-on { display: none; }
.sound-btn[aria-pressed="false"] .snd-off { display: inline; }
.sound-btn[aria-pressed="false"] { opacity: .65; }
.boot-skip { background: rgba(8, 11, 15, .6); border: 1px solid #30363D; border-radius: 999px;
  color: #C9D1D9; font-size: .85rem; padding: .35em 1em; cursor: pointer; }
.boot-skip:hover { color: #CCEF00; border-color: #CCEF00; }
.boot-cta { position: absolute; left: 50%; bottom: 9vh; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 26px; border-radius: 999px; border: 1px solid #CCEF00; background: rgba(13, 17, 23, .85); color: #E6EDF3;
  font-size: 1rem; font-weight: 700; cursor: pointer; box-shadow: 0 0 0 0 rgba(204, 239, 0, .5); animation: boot-pulse 1.8s infinite; }
.boot-cta:hover, .boot-callout:hover { background: #CCEF00; color: #0D1117; }
.boot-bolt { color: #CCEF00; }
.boot-cta:hover .boot-bolt { color: inherit; }
@keyframes boot-pulse { 70% { box-shadow: 0 0 0 18px rgba(204, 239, 0, 0); } 100% { box-shadow: 0 0 0 0 rgba(204, 239, 0, 0); } }
.boot-callout { position: absolute; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px; border-radius: 12px; border: 1px solid #CCEF00; background: rgba(13, 17, 23, .92); color: #E6EDF3;
  font-size: .95rem; font-weight: 700; cursor: pointer; animation: boot-pulse 1.8s infinite, boot-bob 1.2s ease-in-out infinite; }
.boot-callout span { color: #CCEF00; font-size: 1.1rem; }
.boot-callout:hover span { color: inherit; }
.boot-callout::after { content: ""; position: absolute; left: 50%; top: -7px; width: 12px; height: 12px; transform: translateX(-50%) rotate(45deg);
  background: inherit; border-left: 1px solid #CCEF00; border-top: 1px solid #CCEF00; }
@keyframes boot-bob { 50% { margin-top: -6px; } }
.boot-cta[hidden], .boot-callout[hidden] { display: none; }

/* terminal */
.boot-term { position: absolute; right: 24px; bottom: 24px; width: min(540px, 44vw); height: min(400px, 62vh); display: flex; flex-direction: column;
  background: rgba(6, 9, 12, .97); border: 1px solid #30363D; border-radius: 12px; box-shadow: 0 24px 70px rgba(0, 0, 0, .6);
  opacity: 0; transform: translateY(18px); transition: opacity .45s, transform .45s; pointer-events: none; }
.boot-term.open { opacity: 1; transform: none; }
.boot-term-bar { display: flex; align-items: center; gap: 6px; padding: 9px 12px; border-bottom: 1px solid #21262D; font: .75rem var(--mono); color: #8B949E; }
.boot-term-bar i { width: 10px; height: 10px; border-radius: 50%; background: #FF5F56; }
.boot-term-bar i:nth-child(2) { background: #FFBD2E; }
.boot-term-bar i:nth-child(3) { background: #27C93F; margin-right: 8px; }
.boot-term-body { flex: 1; overflow: auto; padding: 12px 14px; font-size: .78rem; line-height: 1.6; color: #C9D1D9; white-space: pre-wrap; scrollbar-width: thin; }
.boot-term-body .t-dim { color: #8B949E; }
.boot-term-body .t-ok { color: #CCEF00; }
.boot-term-body .t-cmd { color: #F0F6FC; font-weight: 700; }
.boot-term-body .t-i2c { color: #22D3EE; }
.boot-term-body .t-spi { color: #A78BFA; }
.boot-term-body .t-hex { color: #7EE787; }
.boot-term-body .t-sec { color: #6E7681; margin: .5em 0 .2em; }
@media (max-width: 760px) {
  .boot-term { left: 10px; right: 10px; bottom: 10px; width: auto; height: 40vh; }
  .boot-term-body { font-size: .7rem; }
  .boot-hud { left: 12px; top: 14px; gap: 8px; font-size: .75rem; }
  .boot-brand { display: none; }
  .boot-tr { right: 12px; top: 12px; }
  .boot-skip { font-size: .75rem; }
}

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-photo { order: -1; justify-content: flex-start; }
  .photo-ring { width: 150px; padding: 5px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .timeline { grid-template-columns: 1fr; padding-top: 0; gap: 26px; }
  .timeline::before, .timeline::after { display: none; }
  .stage::before { top: 14px; left: 18px; transform: none; }
  .stage { text-align: left; padding-left: 64px; }
  .journey-grid { grid-template-columns: 1fr; gap: 0; }
  .planet-info { position: static; width: auto; margin: 0 12px 12px; }
  .nav-toggle { display: block; }
  .nav-links { position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: flex-start; gap: 14px;
    padding: 18px 20px 22px; background: var(--bg); border-bottom: 1px solid var(--border); display: none; }
  .nav-links.open { display: flex; }
  .project-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}
