:root {
  color-scheme: dark;
  --background: #090909;
  --text: #ededeb;
  --muted: #aaa9a5;
  --line: #3b3b39;
  --font: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
  --header-height: 66px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--background); color: var(--text); font: 14px/1.65 var(--font); }
a { color: inherit; text-decoration: none; }
::selection { background: var(--text); color: var(--background); }
:focus-visible { outline: 1px solid var(--text); outline-offset: 4px; }
.skip-link { position: absolute; z-index: 100; top: -60px; left: 16px; padding: 8px 12px; background: var(--text); color: var(--background); }
.skip-link:focus { top: 12px; }
.site { max-width: 1320px; min-height: 100vh; margin: 0 auto; border-left: 1px solid var(--line); border-right: 1px solid var(--line); }

.site-header { position: sticky; top: 0; z-index: 30; height: var(--header-height); display: flex; align-items: center; gap: 42px; padding: 0 42px; border-bottom: 1px solid var(--line); background: var(--background); }
.wordmark { display: inline-flex; align-items: center; gap: 14px; font-weight: 700; white-space: nowrap; }
.mark { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid var(--text); font-size: 12px; }
.site-nav { display: flex; align-items: center; gap: 27px; margin-left: auto; }
.site-nav a { color: var(--muted); white-space: nowrap; }
.site-nav a:hover, .site-nav a[aria-current="location"] { color: var(--text); text-decoration: underline; text-underline-offset: 6px; }

.story { height: 400vh; }
.story-stage { position: sticky; top: var(--header-height); height: calc(100svh - var(--header-height)); min-height: 580px; overflow: hidden; background: #000; border-bottom: 1px solid var(--line); }
.story-copy { position: absolute; z-index: 3; left: 42px; top: 50%; width: min(38%, 460px); transform: translateY(-50%); }
.scene { animation: scene-enter .35s ease both; }
.scene[hidden] { display: none; }
.section-id { display: inline-block; margin: 0; color: var(--muted); font-size: 11px; line-height: 1.5; letter-spacing: .07em; }
.scene h1, .scene h2 { max-width: 390px; margin: 28px 0 19px; font-size: 17px; font-weight: 700; line-height: 1.55; letter-spacing: .01em; text-transform: uppercase; }
.scene > p:not(.section-id) { max-width: 410px; margin: 0; color: var(--muted); }
.scene .under-link, .scene .button-primary { margin-top: 30px; }
.button-primary { display: inline-flex; align-items: center; justify-content: space-between; gap: 25px; min-height: 40px; padding: 8px 12px; background: var(--text); color: var(--background); font-weight: 700; }
.button-primary:hover { background: #cfcfcb; }
.under-link { display: inline-flex; gap: 15px; border-bottom: 1px solid var(--muted); padding: 4px 0; }
.under-link:hover { border-color: var(--text); }
.story-progress { position: absolute; z-index: 4; left: 42px; bottom: 28px; display: flex; align-items: center; gap: 14px; color: var(--muted); font-size: 11px; }
.progress-track { width: 140px; height: 1px; background: var(--line); }
.progress-track i { display: block; width: 0; height: 1px; background: var(--text); }
.scroll-hint { position: absolute; z-index: 4; right: 42px; bottom: 28px; color: var(--muted); font-size: 11px; letter-spacing: .04em; }

.laptop { --device-scale: .94; --device-rotation: -6deg; --device-y: 0px; position: absolute; z-index: 2; right: 4%; top: 47%; width: min(53vw, 720px); transform: translateY(calc(-50% + var(--device-y))) scale(var(--device-scale)) rotateY(var(--device-rotation)); transform-style: preserve-3d; perspective: 1100px; }
.laptop-screen { position: relative; width: 83%; aspect-ratio: 16 / 10; margin: 0 auto; overflow: hidden; border: 1px solid #777; border-bottom: 12px solid #444; border-radius: 13px 13px 5px 5px; background: linear-gradient(135deg, #646464, #2d2d2d 23%, #494949 78%, #656565); box-shadow: inset 0 1px #929292, inset 0 0 0 2px #202020, 0 0 0 2px #141414; }
.camera-dot { position: absolute; z-index: 3; left: 50%; top: 5px; width: 4px; height: 4px; transform: translateX(-50%); border: 1px solid #111; border-radius: 50%; background: #777; }
.screen-content { --terminal-green: #84dc8b; position: absolute; inset: 11px 10px 9px; overflow: hidden; border: 1px solid #102315; background: #020703; color: var(--terminal-green); font-size: clamp(9px, 1.05vw, 13px); line-height: 1.55; box-shadow: inset 0 0 22px #000; }
.screen-content::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(118deg, transparent 28%, #ffffff08 45%, transparent 58%); }
.screen-brand { position: absolute; left: 50%; bottom: -9px; transform: translateX(-50%); color: #c5c5c5; font-size: 8px; line-height: 1; letter-spacing: -.08em; }
.screen-bar { height: 26px; display: flex; justify-content: space-between; align-items: center; padding: 0 15px; border-bottom: 1px solid #225329; font-size: .8em; }
.screen-panel { position: absolute; left: 9%; right: 7%; top: 29%; display: flex; flex-direction: column; gap: 12px; opacity: 0; transform: translateY(6px); transition: opacity .32s, transform .32s; }
.screen-panel span { font-size: .82em; }
.screen-panel strong { font-size: 1.55em; font-weight: 700; line-height: 1.25; overflow-wrap: anywhere; }
.screen-panel small { font-size: .86em; color: #b2d9b4; }
.story-stage[data-scene="0"] .screen-panel-0,
.story-stage[data-scene="1"] .screen-panel-1,
.story-stage[data-scene="2"] .screen-panel-2,
.story-stage[data-scene="3"] .screen-panel-3 { opacity: 1; transform: translateY(0); }
.screen-command { position: absolute; left: 9%; bottom: 10%; }
.screen-command i { display: inline-block; width: 7px; height: 1.1em; background: var(--terminal-green); vertical-align: -2px; animation: cursor-blink 1s steps(1) infinite; }
.laptop-hinge { position: relative; width: 88%; height: 9px; margin: -2px auto 0; border-radius: 0 0 5px 5px; background: linear-gradient(#686868, #2e2e2e); box-shadow: inset 0 -1px #181818; }
.laptop-hinge::after { content: ""; position: absolute; left: 44%; right: 44%; top: 1px; height: 3px; border-radius: 0 0 3px 3px; background: #151515; }
.laptop-base { position: relative; width: 100%; height: clamp(70px, 10vw, 128px); margin: 0 auto; overflow: hidden; clip-path: polygon(9% 0, 91% 0, 100% 92%, 99% 100%, 1% 100%, 0 92%); background: linear-gradient(180deg, #555 0%, #696969 15%, #505050 63%, #414141 100%); box-shadow: inset 0 1px #929292; }
.laptop-base::before { content: ""; position: absolute; inset: 2px 2% 12%; pointer-events: none; border: 1px solid #ffffff16; clip-path: polygon(8% 0, 92% 0, 100% 100%, 0 100%); }
.keyboard { position: absolute; left: 19%; right: 19%; top: 9%; height: 46%; display: flex; flex-direction: column; gap: 4px; transform: perspective(300px) rotateX(14deg); transform-origin: top; }
.key-row { display: flex; flex: 1; gap: 4px; }
.key { flex: 1; min-width: 0; border: 1px solid #080808; border-radius: 2px; background: linear-gradient(180deg, #2d2d2d, #101010); box-shadow: inset 0 1px #4a4a4a, 0 1px #777; }
.key.space { flex: 4; }
.trackpad { position: absolute; left: 40%; bottom: 9%; width: 20%; height: 26%; border: 1px solid #777; border-radius: 3px; background: #4a4a4a; box-shadow: inset 0 1px #888; }
.ports { position: absolute; right: 2.5%; top: 55%; width: 6%; height: 5px; border-radius: 1px; background: #151515; box-shadow: -11px 0 #1b1b1b; }
.laptop-front { position: relative; width: 97%; height: 8px; margin: -1px auto 0; border-radius: 0 0 10px 10px; background: linear-gradient(180deg, #5b5b5b, #252525); box-shadow: 0 5px 7px #000; }
.laptop-front::after { content: ""; position: absolute; left: 42%; top: 0; width: 16%; height: 3px; border-radius: 0 0 4px 4px; background: #969696; }

.content-section { display: grid; grid-template-columns: 31% minmax(0, 1fr); border-bottom: 1px solid var(--line); scroll-margin-top: calc(var(--header-height) + 20px); }
.section-side { display: flex; align-items: flex-start; gap: 23px; padding: 43px 30px 35px 42px; }
.side-rule { width: 48px; height: 1px; margin-top: 8px; background: var(--line); }
.section-main { max-width: 820px; padding: 39px 54px 52px 0; }
.section-main h2 { margin: 0 0 20px; font-size: 16px; line-height: 1.55; text-transform: uppercase; letter-spacing: .01em; }
.section-main > p { max-width: 720px; margin: 0; color: var(--muted); }
.numbered-list { margin-top: 36px; border-top: 1px solid var(--line); }
.numbered-row { display: grid; grid-template-columns: 44px 180px minmax(0, 1fr); gap: 16px; align-items: baseline; padding: 18px 0; border-bottom: 1px solid var(--line); }
.numbered-row > span { color: var(--muted); font-size: 11px; }
.numbered-row strong { font-weight: 700; }
.numbered-row p { margin: 0; color: var(--muted); }
.plain-callout { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 20px; margin: 32px 0 0; padding: 17px 0; border-top: 1px solid var(--text); border-bottom: 1px solid var(--text); }
.plain-callout > span, .inline-pair > span, .placeholder > span { font-size: 11px; letter-spacing: .06em; }
.plain-callout p, .inline-pair p, .placeholder p { margin: 0; }
.inline-pair { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 20px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.inline-pair > span { color: var(--muted); padding-top: 2px; }
.inline-pair p { color: var(--muted); }
.text-action { display: inline-flex; gap: 23px; margin-top: 28px; padding-bottom: 3px; border-bottom: 1px solid var(--text); }
.text-action:hover { color: var(--muted); border-color: var(--muted); }
.placeholder { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 20px; margin-top: 34px; padding: 18px 0; border-top: 1px dashed var(--line); border-bottom: 1px dashed var(--line); color: var(--muted); }
.placeholder > span { color: var(--text); }
.contact-method { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; margin-top: 34px; padding: 19px 0; border-top: 1px solid var(--text); border-bottom: 1px solid var(--line); }
.contact-method > span { color: var(--muted); font-size: 11px; letter-spacing: .06em; }
.contact-method a { font-size: 17px; font-weight: 700; border-bottom: 1px solid var(--text); }
.contact-method a:hover { color: #84dc8b; border-color: #84dc8b; }
.small-note { margin-top: 27px !important; font-size: 12px; }
.contact-section { border-bottom: 0; }
.site-footer { display: flex; align-items: center; justify-content: space-between; gap: 25px; min-height: 68px; padding: 15px 42px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.site-footer a { color: var(--text); }
.site-footer a:hover { text-decoration: underline; }

@keyframes scene-enter { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes cursor-blink { 50% { opacity: 0; } }

@media (max-width: 900px) {
  :root { --header-height: 95px; }
  .site-header { flex-wrap: wrap; gap: 0; padding: 9px 25px; }
  .site-nav { width: 100%; margin: 6px 0 0; overflow-x: auto; gap: 24px; padding-bottom: 2px; scrollbar-width: thin; }
  .story-copy { left: 25px; width: 39%; }
  .laptop { right: -6%; width: 64vw; }
  .story-progress { left: 25px; }
  .content-section { grid-template-columns: 25% minmax(0, 1fr); }
  .section-side { padding: 37px 20px 30px 25px; }
  .side-rule { display: none; }
  .section-main { padding: 34px 28px 46px 0; }
  .numbered-row { grid-template-columns: 34px 130px minmax(0, 1fr); }
}

@media (max-width: 650px) {
  :root { --header-height: 112px; }
  body { font-size: 13px; }
  .site { border-left: 0; border-right: 0; }
  .site-header { padding: 10px 20px; }
  .site-nav { flex-wrap: wrap; overflow: visible; gap: 4px 21px; }
  .story { height: 350svh; }
  .story-stage { min-height: 0; }
  .laptop { left: 50%; right: auto; top: 31%; width: min(95vw, 500px); transform: translate(-50%, calc(-50% + var(--device-y))) scale(var(--device-scale)); }
  .laptop-screen { border-bottom-width: 9px; border-radius: 8px 8px 3px 3px; }
  .screen-content { inset: 7px 6px 6px; }
  .laptop-base { height: 70px; }
  .laptop-hinge { height: 6px; }
  .keyboard { gap: 2px; }
  .key-row { gap: 2px; }
  .key { border-radius: 1px; }
  .screen-content { font-size: clamp(7px, 2.1vw, 11px); }
  .screen-bar { height: 20px; padding: 0 9px; }
  .screen-panel { top: 26%; gap: 6px; }
  .story-copy { left: 20px; top: auto; bottom: 74px; width: calc(100% - 40px); transform: none; }
  .scene h1, .scene h2 { margin: 14px 0 10px; font-size: 15px; line-height: 1.45; }
  .scene > p:not(.section-id) { font-size: 12px; max-width: 360px; }
  .scene .under-link, .scene .button-primary { margin-top: 15px; }
  .story-progress { left: 20px; bottom: 22px; }
  .progress-track { width: 70px; }
  .scroll-hint { right: 20px; bottom: 23px; font-size: 9px; max-width: 135px; text-align: right; }
  .content-section { display: block; }
  .section-side { padding: 29px 20px 0; }
  .section-main { padding: 22px 20px 42px; }
  .section-main h2 { font-size: 14px; }
  .numbered-list { margin-top: 28px; }
  .numbered-row { grid-template-columns: 30px minmax(0, 1fr); gap: 4px 10px; padding: 15px 0; }
  .numbered-row p { grid-column: 2; }
  .plain-callout, .inline-pair, .placeholder { grid-template-columns: 1fr; gap: 7px; }
  .contact-method { align-items: flex-start; flex-direction: column; gap: 10px; }
  .site-footer { padding: 19px 20px; display: grid; grid-template-columns: 1fr auto; }
  .site-footer span:nth-child(2) { grid-column: 1 / -1; grid-row: 2; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .story { height: auto; }
  .story-stage { position: relative; top: 0; height: auto; min-height: 0; display: flex; flex-direction: column; padding: 35px 20px 40px; }
  .story-progress, .scroll-hint { display: none; }
  .laptop { position: relative; top: auto; left: auto; right: auto; order: 1; width: min(100%, 560px); margin: 0 auto 30px; transform: none !important; }
  .story-copy { position: relative; top: auto; left: auto; bottom: auto; order: 2; width: min(100%, 620px); margin: 0 auto; transform: none; }
  .scene { padding: 20px 0; border-bottom: 1px solid var(--line); }
}
