/* =========================================================
   The Desk — home page
   ========================================================= */

/* ---------- 1. boot ---------- */
.boot {
  position: fixed; inset: 0; z-index: 1600;
  background: var(--night);
  color: #f2e2cc;
  display: grid; place-items: center;
  font-size: 13px;
}
.no-js .boot, .reduce-motion .boot { display: none; }
.boot__inner { width: min(560px, 86vw); }
.boot__log {
  margin: 0; min-height: 9.5em;
  font-family: var(--font-mono); font-size: 12.5px; line-height: 1.7;
  white-space: pre-wrap; color: rgba(242, 226, 204, .75);
}
.boot__log b { color: var(--hero-3); font-weight: 500; }
.boot__meter { display: flex; align-items: baseline; gap: .2rem; margin-top: 1.4rem; font-family: var(--font-serif); }
.boot__pct { font-size: clamp(4rem, 12vw, 7.5rem); line-height: 1; letter-spacing: -.03em; color: var(--cream); font-variant-numeric: tabular-nums; }
.boot__unit { font-size: 2rem; font-style: italic; color: var(--hero-3); }
.boot__bar { height: 2px; background: rgba(255, 255, 255, .1); margin-top: 1rem; overflow: hidden; }
.boot__bar i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, var(--hero-3), var(--hero-4)); transform: scaleX(0); transform-origin: left; }

/* ---------- 2. intro / room ---------- */
.intro { position: relative; background: var(--night); }
.intro__stage {
  position: relative;
  height: 100vh; height: 100svh;
  overflow: hidden;
  isolation: isolate;
}
.room { position: absolute; inset: 0; z-index: 0; background: #3b2a22; }
.room__canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.room__fallback {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity .6s;
}
.no-webgl .room__fallback { opacity: 1; }
.no-webgl .room__canvas { display: none; }
.room__vignette {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(120% 80% at 50% 62%, transparent 40%, rgba(25, 15, 10, .55) 100%),
    linear-gradient(180deg, rgba(30, 18, 12, .55) 0%, transparent 34%);
}

.hero {
  position: absolute; inset: 0; z-index: 2;
  display: flex; flex-direction: column; align-items: center;
  padding: calc(var(--header-h) + 18px + clamp(1.5rem, 5vh, 3.5rem)) var(--edge) 1.6rem;
  text-align: center;
  color: var(--cream);
  pointer-events: none;
}
.hero__eyebrow {
  display: inline-flex; align-items: center; gap: .8rem; flex-wrap: wrap; justify-content: center;
  font-size: 12px; letter-spacing: .08em; text-transform: uppercase;
  color: rgba(254, 249, 237, .82);
}
.hero__dot { width: 5px; height: 5px; border-radius: 50%; background: var(--hero-3); }
.hero__title {
  margin-top: 1rem;
  font-family: var(--font-serif); font-weight: 450;
  line-height: .9; letter-spacing: -.025em;
  text-shadow: 0 2px 30px rgba(40, 20, 10, .35);
}
.hero__line { display: block; overflow: hidden; padding-bottom: .08em; }
.hero__line > span { display: block; }
.hero__line:first-child { font-size: clamp(3.6rem, 10.5vw, 10rem); }
.hero__line--2 { font-size: clamp(1.7rem, 4.2vw, 4rem); margin-top: .1em; color: var(--hero-1); }
.hero__line em { font-style: italic; color: var(--hero-3); }
.hero__sub {
  max-width: 36ch; margin-top: 1.2rem;
  font-family: var(--font-serif); font-size: clamp(1.05rem, 1.45vw, 1.35rem); line-height: 1.4;
  color: rgba(254, 249, 237, .9);
  text-shadow: 0 1px 18px rgba(40, 20, 10, .5);
}
.hero__foot {
  margin-top: auto; width: 100%;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  font-size: 11.5px; letter-spacing: .04em; color: rgba(254, 249, 237, .7);
}
.hero__scroll { display: inline-flex; align-items: center; gap: .7rem; color: var(--cream); }
.hero__mouse { width: 20px; height: 30px; border: 1.5px solid currentColor; border-radius: 12px; display: grid; justify-items: center; padding-top: 5px; }
.hero__mouse i { width: 2px; height: 6px; border-radius: 2px; background: currentColor; animation: wheel 1.8s var(--ease-out-quart) infinite; }
@keyframes wheel { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(8px); opacity: 0; } 100% { opacity: 0; } }
@media (max-width: 760px) {
  .hero__eyebrow { flex-direction: column; gap: .3rem; font-size: 11px; }
  .hero__dot { display: none; }
  .hero__coords { display: none; }
  .hero__foot { justify-content: center; }
  .hero { padding-top: calc(var(--header-h) + 12px + 2.2rem); }
}

/* ---------- 3. desktop ---------- */
.desktop {
  position: absolute; inset: 0; z-index: 3;
  opacity: 0; visibility: hidden;
  color: var(--ink);
  overflow: hidden;
  font-size: 12px;
}
.desktop.is-live { visibility: visible; }
.desktop__wall {
  position: absolute; inset: 0;
  background:
    radial-gradient(70% 60% at 78% 18%, #fff1e2 0%, transparent 60%),
    radial-gradient(90% 80% at 10% 100%, #e7a07c 0%, transparent 60%),
    linear-gradient(160deg, #fde3d1 0%, #fbd3be 38%, #f0b494 72%, #dc8f6c 100%);
}
.desktop__wall::before {
  content: ''; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(93, 60, 40, .16) 1px, transparent 1.4px);
  background-size: 28px 28px;
  -webkit-mask-image: radial-gradient(80% 70% at 50% 45%, #000 30%, transparent 100%);
  mask-image: radial-gradient(80% 70% at 50% 45%, #000 30%, transparent 100%);
}
.desktop__wordmark {
  position: absolute; right: 4vw; bottom: calc(52px + 3vh);
  font-family: var(--font-serif); font-size: clamp(4rem, 13vw, 13rem); line-height: .8; letter-spacing: -.04em;
  color: rgba(254, 249, 237, .38);
  user-select: none;
}
.desktop__wordmark em { font-style: italic; color: rgba(184, 105, 74, .28); margin-left: .05em; }
.desktop__scan {
  position: absolute; inset: 0; pointer-events: none; z-index: 50;
  background:
    repeating-linear-gradient(180deg, rgba(93, 60, 40, .045) 0 1px, transparent 1px 3px),
    radial-gradient(130% 110% at 50% 50%, transparent 60%, rgba(93, 50, 30, .22) 100%);
  mix-blend-mode: multiply;
}

.desktop__icons {
  position: absolute; z-index: 2;
  top: calc(var(--header-h) + 18px + 2rem); left: clamp(1rem, 2.5vw, 2.25rem);
  bottom: 70px;
  display: grid; grid-auto-flow: column; grid-template-rows: repeat(5, max-content);
  gap: .6rem .5rem; align-content: start;
}
.dicon {
  width: 92px; padding: .45rem .3rem .5rem;
  display: flex; flex-direction: column; align-items: center; gap: .45rem;
  border-radius: 12px;
  text-align: center;
  transition: background .2s;
}
.dicon:hover { background: rgba(254, 249, 237, .28); }
.dicon[aria-pressed='true'], .dicon:focus-visible { background: rgba(254, 249, 237, .45); }
.dicon__img {
  width: 52px; height: 52px; display: block;
  filter: drop-shadow(0 6px 10px rgba(110, 60, 35, .25));
  transition: transform .4s var(--ease-out-expo);
}
.dicon:hover .dicon__img { transform: translateY(-3px) rotate(-3deg); }
.dicon__label {
  font-size: 11px; line-height: 1.25; color: var(--ink-deep);
  padding: .15em .45em; border-radius: 5px;
}
.dicon[aria-pressed='true'] .dicon__label { background: var(--ink); color: var(--cream); }

.desktop__note {
  position: absolute; z-index: 2;
  right: clamp(1rem, 3vw, 2.75rem); top: calc(var(--header-h) + 18px + 2.2rem);
  width: 210px; padding: 1rem 1.1rem 1.1rem;
  background: #fbe7a8;
  color: #5b4a2f;
  font-family: var(--font-serif); font-size: 15px; line-height: 1.35;
  box-shadow: 0 18px 30px -14px rgba(90, 50, 20, .45);
  transform: rotate(2.5deg);
  border-radius: 2px 2px 14px 2px;
}
.desktop__note p + p { margin-top: .5rem; }
.desktop__note-h { font-family: var(--font-mono); font-size: 11px; letter-spacing: .06em; opacity: .7; }

/* update dialog */
.dialog {
  position: absolute; z-index: 20;
  left: 50%; top: 50%;
  width: min(460px, calc(100vw - 32px));
  transform: translate(-50%, -54%);
}
.dialog__body { display: flex; gap: 1.1rem; padding: 1.4rem 1.4rem .4rem; }
.dialog__icon { width: 64px; flex: none; }
.dialog__icon svg { width: 64px; height: 64px; }
.dialog__text { flex: 1; min-width: 0; }
.dialog__text h2 { font-family: var(--font-serif); font-weight: 450; font-size: 1.85rem; line-height: 1.05; letter-spacing: -.01em; }
.dialog__text > p { margin-top: .35rem; color: var(--ink-soft); font-size: 12px; line-height: 1.5; }
.dialog__text > p b { color: var(--ink); font-weight: 500; }
.dialog__progress { height: 12px; margin-top: 1rem; border-radius: 99px; background: var(--paper); border: 1px solid var(--line); overflow: hidden; }
.dialog__progress i {
  display: block; height: 100%; width: 100%;
  background: repeating-linear-gradient(-45deg, var(--hero-4) 0 8px, #e49c79 8px 16px);
  background-size: 200% 100%;
  transform: scaleX(0); transform-origin: left;
  animation: stripes 1s linear infinite;
}
@keyframes stripes { to { background-position: -45px 0; } }
.dialog__status { min-height: 1.5em; font-size: 11.5px !important; }
.dialog__hold {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  width: calc(100% - 2.8rem); margin: .8rem 1.4rem 1.4rem;
  height: 3.2rem; border-radius: 12px;
  background: var(--ink); color: var(--cream);
  font-size: 12.5px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase;
  overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none;
  transition: transform .2s var(--ease-out-quart);
}
.dialog__hold::before {
  content: ''; position: absolute; inset: 0;
  background: var(--hero-4);
  transform: scaleX(var(--p, 0)); transform-origin: left;
}
.dialog__hold span { position: relative; }
.dialog__hold.is-holding { transform: scale(.98); }
.dialog.is-done .dialog__hold { background: var(--hero-4); }
.hold-tip {
  position: fixed; z-index: 60; pointer-events: none;
  padding: .35rem .7rem; border-radius: 99px;
  background: var(--cream); color: var(--ink);
  font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase;
  box-shadow: 0 6px 18px rgba(60, 30, 15, .25);
  opacity: 0; transform: translate(14px, 14px) scale(.8);
  transition: opacity .2s, transform .25s var(--ease-out-expo);
}
.hold-tip.is-on { opacity: 1; transform: translate(14px, 14px) scale(1); }

/* windows */
.desktop__windows { position: absolute; inset: 0; z-index: 30; pointer-events: none; }
.oswin {
  position: absolute; pointer-events: auto;
  width: min(600px, calc(100vw - 24px));
  will-change: transform;
}
.oswin .win__bar { cursor: grab; touch-action: none; }
.oswin.is-dragging .win__bar { cursor: grabbing; }
.oswin .win__dots button { width: 12px; height: 12px; border-radius: 50%; background: var(--hero-4); display: grid; place-items: center; }
.oswin .win__dots button svg { width: 8px; height: 8px; opacity: 0; color: var(--ink-deep); transition: opacity .15s; }
.oswin .win__bar:hover .win__dots button svg, .oswin .win__dots button:focus-visible svg { opacity: 1; }
.oswin .win__dots i:nth-child(2) { background: var(--hero-3); }
.oswin.is-front { box-shadow: 0 1px 0 rgba(255,255,255,.6) inset, 0 40px 90px -20px rgba(60, 40, 28, .55), 0 10px 30px -8px rgba(60, 40, 28, .3); }
.oswin:not(.is-front) .win__bar { opacity: .85; }
.pwin__media { position: relative; aspect-ratio: 16 / 9; background: var(--ink-deep); overflow: hidden; }
.pwin__media video { width: 100%; height: 100%; object-fit: cover; }
.pwin__tag { position: absolute; left: .8rem; top: .8rem; padding: .3rem .6rem; border-radius: 99px; background: rgba(34, 27, 23, .65); color: var(--cream); font-size: 10.5px; letter-spacing: .04em; backdrop-filter: blur(6px); }
.pwin__body { padding: 1.1rem 1.25rem 1.25rem; }
.pwin__name { font-family: var(--font-serif); font-size: 2rem; line-height: 1; letter-spacing: -.015em; }
.pwin__tagline { margin-top: .5rem; font-family: var(--font-serif); font-size: 1.05rem; line-height: 1.35; color: var(--ink); }
.pwin__nums { display: grid; grid-template-columns: repeat(3, 1fr); gap: .8rem; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.pwin__nums b { display: block; font-family: var(--font-serif); font-weight: 450; font-size: 1.35rem; line-height: 1.05; color: var(--accent, var(--ink)); }
.pwin__nums span { display: block; margin-top: .25rem; font-size: 10.5px; line-height: 1.35; color: var(--ink-soft); }
.pwin__foot { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 1.1rem; }
.pwin__foot small { color: var(--ink-soft); font-size: 11px; }
.txtwin__body {
  max-height: min(52vh, 440px); overflow: auto;
  padding: 1.3rem 1.4rem 1.5rem;
  font-family: var(--font-serif); font-size: 1.08rem; line-height: 1.5;
  background: repeating-linear-gradient(180deg, transparent 0 calc(1.62rem - 1px), rgba(93, 82, 75, .08) calc(1.62rem - 1px) 1.62rem);
}
.txtwin__body p + p { margin-top: .8rem; }
.txtwin__body .mono { font-family: var(--font-mono); font-size: 11.5px; color: var(--ink-soft); }
.txtwin__list { display: grid; gap: .55rem; margin-top: .4rem; }
.txtwin__list li { display: grid; grid-template-columns: 7.5rem 1fr; gap: .8rem; font-size: 1rem; }
.txtwin__list li span:first-child { font-family: var(--font-mono); font-size: 11px; color: var(--rust); padding-top: .25rem; }
.txtwin__links { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; }

/* taskbar */
.taskbar {
  position: absolute; z-index: 40; left: 0; right: 0; bottom: 0;
  height: 52px; padding: 0 .6rem;
  display: flex; align-items: center; gap: .6rem;
  background: rgba(254, 249, 237, .92);
  border-top: 1px solid rgba(93, 82, 75, .14);
  box-shadow: 0 -10px 30px -18px rgba(93, 60, 40, .4);
}
.taskbar__start {
  display: inline-flex; align-items: center; gap: .5rem;
  height: 38px; padding: 0 .9rem 0 .35rem; border-radius: 10px;
  font-weight: 500; font-size: 12px;
  transition: background .2s;
}
.taskbar__start .brand__mark { width: 30px; height: 30px; font-size: 1rem; border-radius: 8px; }
.taskbar__start:hover, .taskbar__start[aria-expanded='true'] { background: var(--paper); }
.taskbar__tabs { flex: 1; display: flex; gap: .4rem; min-width: 0; overflow: hidden; }
.taskbar__tab {
  display: inline-flex; align-items: center; gap: .45rem; min-width: 0;
  height: 34px; padding: 0 .8rem; border-radius: 9px;
  background: var(--paper); font-size: 11px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 170px;
}
.taskbar__tab.is-front { background: var(--ink); color: var(--cream); }
.taskbar__tab img, .taskbar__tab svg { width: 16px; height: 16px; flex: none; }
.taskbar__tray { display: flex; align-items: center; gap: 1rem; padding-right: .5rem; font-size: 11.5px; color: var(--ink-soft); }
.taskbar__clock { color: var(--ink); font-weight: 500; font-variant-numeric: tabular-nums; }
.startmenu {
  position: absolute; left: .6rem; bottom: 60px; width: 240px;
  padding: .6rem;
  display: grid;
}
.startmenu[hidden] { display: none; }
.startmenu__h { padding: .5rem .7rem .7rem; font-family: var(--font-serif); font-size: 1.3rem; border-bottom: 1px solid var(--line); margin-bottom: .3rem; }
.startmenu a { padding: .6rem .7rem; border-radius: 8px; font-size: 12px; }
.startmenu a:hover, .startmenu a:focus-visible { background: var(--paper); }
.desktop__hint {
  position: absolute; z-index: 35; left: 50%; bottom: 64px; transform: translateX(-50%);
  padding: .45rem .9rem; border-radius: 99px; background: rgba(34, 27, 23, .7); color: var(--cream);
  font-size: 11px; letter-spacing: .03em; white-space: nowrap;
  opacity: 0; transition: opacity .6s;
}
.desktop__hint.is-on { opacity: 1; }

@media (max-width: 760px) {
  .desktop__icons {
    top: calc(var(--header-h) + 12px + 1rem); left: 0; right: 0; bottom: auto;
    grid-auto-flow: row; grid-template-rows: none; grid-template-columns: repeat(5, 1fr);
    gap: .2rem; padding: 0 .4rem;
  }
  .dicon { width: auto; padding: .4rem .1rem; }
  .dicon__img { width: 42px; height: 42px; }
  .dicon__label { font-size: 9.5px; padding: .1em .2em; }
  .desktop__note { display: none; }
  .dialog { top: auto; bottom: 74px; transform: translate(-50%, 0); }
  .dialog__body { padding: 1.1rem 1.1rem .2rem; gap: .9rem; }
  .dialog__icon, .dialog__icon svg { width: 48px; height: 48px; }
  .dialog__text h2 { font-size: 1.5rem; }
  .taskbar__os { display: none; }
  .desktop__wordmark { bottom: auto; top: 50%; right: 50%; transform: translate(50%, -50%); font-size: 26vw; }
  .oswin { left: 12px !important; width: calc(100vw - 24px); }
  .pwin__name { font-size: 1.6rem; }
  .pwin__nums b { font-size: 1.1rem; }
}

/* static (reduced motion / no WebGL) layout: room then desktop, no pin */
.intro.is-static .intro__stage { height: auto; }
.intro.is-static .room, .intro.is-static .hero { position: relative; height: 100svh; }
.intro.is-static .room { position: absolute; height: 100svh; }
.intro.is-static .hero { height: 100svh; }
.intro.is-static .desktop { position: relative; height: 100svh; min-height: 640px; opacity: 1; visibility: visible; }

/* ---------- 4. manifesto ---------- */
.manifesto { position: relative; background: var(--cream); }
.manifesto__pin { min-height: 100vh; display: flex; align-items: center; padding: 8rem 0; }
.manifesto__eyebrow { margin-bottom: 2rem; }
.manifesto__text {
  max-width: 22ch;
  font-family: var(--font-serif); font-weight: 450;
  font-size: clamp(2rem, 4.6vw, 4.6rem); line-height: 1.08; letter-spacing: -.015em;
  color: var(--ink-deep);
}
@media (min-width: 1100px) { .manifesto__text { max-width: 26ch; } }
.manifesto__text .w { display: inline; opacity: .14; transition: none; }
.manifesto__text .kw {
  font-style: italic;
  background-image: linear-gradient(transparent 60%, var(--marker) 60%, var(--marker) 94%, transparent 94%);
  background-repeat: no-repeat; background-size: var(--hl, 0%) 100%;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
.no-js .manifesto__text .kw, .reduce-motion .manifesto__text .kw { --hl: 100%; }

/* ---------- 5. projects rail ---------- */
.work { position: relative; background: var(--cream); padding-top: 4rem; }
.work__head { display: grid; grid-template-columns: 1fr minmax(0, 30rem); align-items: end; gap: 1rem 3rem; padding-bottom: 3rem; }
.work__head .eyebrow { grid-column: 1 / -1; }
.work__intro { color: var(--ink-soft); font-size: 1.15rem; }
@media (max-width: 860px) { .work__head { grid-template-columns: 1fr; } }

.rail { position: relative; height: 100vh; height: 100svh; overflow: hidden; }
.rail__track {
  display: flex; align-items: center; gap: clamp(2rem, 5vw, 5rem);
  height: 100%;
  padding-inline: max(var(--edge), calc((100vw - min(1180px, 86vw)) / 2));
  width: max-content;
}
.app {
  --accent: var(--ink);
  flex: none;
  width: min(1180px, 86vw);
  height: min(700px, calc(100svh - 150px));
  transform-style: preserve-3d;
}
.app__win { height: 100%; display: flex; flex-direction: column; transform-style: preserve-3d; }
.app__win .win__bar { flex: none; }
.app__win .win__title { text-align: left; }
.app__when { font-size: 11px; color: var(--ink-soft); white-space: nowrap; }
.app__body { flex: 1; min-height: 0; display: grid; grid-template-columns: 1.15fr 1fr; }
.app__media { position: relative; overflow: hidden; background: var(--app-tint, var(--paper)); }
.app__video {
  position: absolute; left: 7%; top: 9%; width: 78%; aspect-ratio: 16/10;
  border-radius: 10px; overflow: hidden; background: var(--ink-deep);
  box-shadow: 0 30px 60px -20px rgba(40, 25, 15, .5);
}
.app__video video { width: 100%; height: 100%; object-fit: cover; }
.app__shot {
  position: absolute; border-radius: 8px; overflow: hidden;
  box-shadow: 0 20px 40px -14px rgba(40, 25, 15, .45);
  border: 5px solid var(--cream);
}
.app__shot img { width: 100%; height: 100%; object-fit: cover; }
.app__shot--a { right: 5%; bottom: 7%; width: 38%; aspect-ratio: 4/3; transform: rotate(3deg); }
.app__shot--b { left: 4%; bottom: 5%; width: 30%; aspect-ratio: 1; transform: rotate(-4deg); }
.app__glare {
  position: absolute; inset: 0; pointer-events: none; z-index: 3;
  background: radial-gradient(60% 50% at var(--gx, 50%) var(--gy, 0%), rgba(255, 250, 240, .35), transparent 70%);
  mix-blend-mode: soft-light;
}
.app__info { display: flex; flex-direction: column; padding: clamp(1.4rem, 3vw, 2.6rem); min-width: 0; }
.app__idx { font-size: 11.5px; color: var(--ink-soft); display: flex; justify-content: space-between; }
.app__idx b { color: var(--accent); font-weight: 500; }
.app__name { margin-top: 1.2rem; font-family: var(--font-serif); font-weight: 450; font-size: clamp(2.4rem, 4.6vw, 4.4rem); line-height: .92; letter-spacing: -.025em; color: var(--ink-deep); }
.app__tag { margin-top: 1rem; font-family: var(--font-serif); font-size: clamp(1.02rem, 1.3vw, 1.22rem); line-height: 1.4; max-width: 34ch; }
.app__nums { margin-top: auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; padding-top: 1.4rem; border-top: 1px solid var(--line); }
.app__nums b { display: block; font-family: var(--font-serif); font-weight: 450; font-size: clamp(1.4rem, 2.2vw, 2.1rem); line-height: 1; letter-spacing: -.02em; color: var(--accent); }
.app__nums span { display: block; margin-top: .4rem; font-size: 10.5px; line-height: 1.4; color: var(--ink-soft); }
.app__meta { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; margin-top: 1.4rem; font-size: 11.5px; }
.app__meta dt { color: var(--ink-soft); font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; }
.app__meta dd { margin: .25rem 0 0; color: var(--ink-deep); }
.app__stack { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: 1.2rem; }
.app__stack .chip { font-size: 10.5px; padding: .35em .75em; }
.app__cta { margin-top: 1.4rem; display: flex; gap: .6rem; align-items: center; }
.app__cta .pill--dark { background: var(--accent); }

.rail__hud {
  position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%);
  display: flex; align-items: center; gap: 1rem;
  font-size: 11.5px; color: var(--ink-soft); white-space: nowrap;
}
.rail__count b { color: var(--ink); font-weight: 500; }
.rail__bar { width: 160px; height: 2px; background: var(--line); border-radius: 2px; overflow: hidden; }
.rail__bar i { display: block; height: 100%; background: var(--ink); transform-origin: left; transform: scaleX(0); }
.rail__label { min-width: 9rem; font-family: var(--font-serif); font-size: 1rem; color: var(--ink); font-style: italic; }

/* mobile / static: vertical stack */
.rail.is-stacked { height: auto; overflow: visible; }
.rail.is-stacked .rail__track { flex-direction: column; width: auto; padding: 0 var(--edge) 4rem; gap: 2rem; }
.rail.is-stacked .rail__hud { display: none; }
.rail.is-stacked .app { width: 100%; height: auto; }
@media (max-width: 860px) {
  .app__body { grid-template-columns: 1fr; }
  .app__media { aspect-ratio: 4 / 3.1; }
  .app__nums { margin-top: 1.4rem; }
}

/* ---------- 6. time volume ---------- */
.volume { position: relative; background: var(--night); color: var(--cream); }
.volume__pin { position: relative; height: 100vh; height: 100svh; overflow: hidden; }
.volume__canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.volume__fallback { display: none; }
.no-webgl .volume__fallback {
  display: block; position: absolute; right: 6vw; top: 50%; transform: translateY(-50%) perspective(900px) rotateY(-24deg);
  width: min(52vw, 640px); border-radius: 10px; box-shadow: 30px 30px 0 -6px rgba(240, 180, 148, .25), 60px 60px 0 -12px rgba(240, 180, 148, .12);
}
.volume__labels span {
  position: absolute; left: 0; top: 0; z-index: 2;
  font-size: 12px; letter-spacing: .06em; color: rgba(254, 249, 237, .85);
  padding: .25rem .55rem; border: 1px solid rgba(254, 249, 237, .25); border-radius: 99px;
  background: rgba(34, 27, 23, .5);
  white-space: nowrap; will-change: transform;
}
.volume__labels span[data-l='present'] { color: var(--night); background: var(--hero-3); border-color: var(--hero-3); }
.no-webgl .volume__labels { display: none; }
.volume__copy {
  position: absolute; z-index: 3; left: var(--edge); top: 50%; transform: translateY(-50%);
  max-width: min(30rem, 40vw);
}
.volume__copy .eyebrow { color: var(--hero-3); }
.volume__copy .h2 { margin-top: 1rem; color: var(--cream); }
.volume__copy .h2 em { color: var(--hero-3); }
.volume__p { margin-top: 1.4rem; font-family: var(--font-serif); font-size: 1.2rem; line-height: 1.45; color: rgba(254, 249, 237, .85); }
.volume__p--soft { margin-top: .8rem; font-size: 1.05rem; color: rgba(254, 249, 237, .55); font-style: italic; }
.volume__readout {
  position: absolute; z-index: 3; right: var(--edge); bottom: 2rem;
  display: flex; align-items: center; gap: 1.4rem;
  font-size: 11.5px; color: rgba(254, 249, 237, .6); font-variant-numeric: tabular-nums;
}
.volume__readout b { color: var(--cream); font-weight: 500; }
.volume__scrub { width: 140px; height: 2px; background: rgba(254, 249, 237, .15); }
.volume__scrub i { display: block; height: 100%; background: var(--hero-3); transform-origin: left; transform: scaleX(0); }
@media (max-width: 760px) {
  .volume__copy { top: calc(var(--header-h) + 3rem); transform: none; max-width: none; right: var(--edge); }
  .volume__p { font-size: 1.05rem; }
  .volume__p--soft { display: none; }
  .volume__readout { left: var(--edge); right: auto; }
}

/* ---------- 7. timeline ---------- */
.timeline { position: relative; background: var(--cream); padding: 9rem 0 8rem; overflow: hidden; }
.timeline__head { max-width: 1100px; }
.timeline__head .h2 { margin-top: 1rem; max-width: 16ch; }
.timeline__body { position: relative; margin-top: 5rem; }
.timeline__svg { position: absolute; left: 0; top: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.timeline__ghost { fill: none; stroke: var(--line); stroke-width: 1.5; stroke-dasharray: 2 7; stroke-linecap: round; }
.timeline__path { fill: none; stroke: var(--hero-4); stroke-width: 2.5; stroke-linecap: round; }
.timeline__head-dot {
  position: absolute; left: 0; top: 0; z-index: 2;
  width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%;
  background: var(--hero-4); box-shadow: 0 0 0 6px rgba(220, 143, 108, .2), 0 0 22px rgba(220, 143, 108, .6);
}
.tl { position: relative; display: grid; grid-template-columns: 1fr 1fr; column-gap: 9rem; row-gap: 1.2rem; }
.tl__year {
  grid-column: 1 / -1; justify-self: center;
  font-family: var(--font-serif); font-size: clamp(3.5rem, 9vw, 8rem); line-height: 1; letter-spacing: -.03em; font-style: italic;
  color: var(--paper-mid);
  -webkit-text-stroke: 1px rgba(166, 124, 82, .45);
  padding: 2rem 0 1rem; position: relative; z-index: 1;
}
.tl__year span { display: inline-block; background: var(--cream); padding: 0 .3em; }
.tl__item {
  position: relative; z-index: 1;
  max-width: 30rem;
  padding: 1.3rem 1.5rem 1.4rem;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  transition: border-color .3s, box-shadow .4s, transform .5s var(--ease-out-expo);
}
.tl__item:hover { border-color: var(--line-strong); box-shadow: 0 20px 40px -24px rgba(93, 60, 40, .35); transform: translateY(-3px); }
.tl__item[data-side='l'] { grid-column: 1; justify-self: end; text-align: right; }
.tl__item[data-side='r'] { grid-column: 2; justify-self: start; }
.tl__item::before {
  content: ''; position: absolute; top: 1.7rem; width: 9px; height: 9px; border-radius: 50%;
  background: var(--cream); border: 2px solid var(--hero-4);
}
.tl__item[data-side='l']::before { right: calc(-4.5rem - 6px); }
.tl__item[data-side='r']::before { left: calc(-4.5rem - 6px); }
.tl__when { font-size: 11.5px; color: var(--rust); letter-spacing: .03em; }
.tl__what { margin-top: .45rem; font-family: var(--font-serif); font-weight: 450; font-size: 1.6rem; line-height: 1.1; color: var(--ink-deep); }
.tl__what a { background-image: linear-gradient(currentColor, currentColor); background-size: 100% 1px; background-repeat: no-repeat; background-position: 0 95%; transition: color .25s; }
.tl__what a:hover { color: var(--terracotta); }
.tl__desc { margin-top: .45rem; font-size: 12.5px; line-height: 1.55; color: var(--ink-soft); }
.tl__item--big { background: var(--ink-deep); border-color: var(--ink-deep); }
.tl__item--big .tl__what { color: var(--cream); font-size: 1.9rem; }
.tl__item--big .tl__desc { color: rgba(254, 249, 237, .65); }
.tl__item--big .tl__when { color: var(--hero-3); }
.tl__item--now { background: linear-gradient(140deg, var(--hero-1), var(--hero-3)); border-color: transparent; }
.tl__item--now .tl__when { color: var(--ink-deep); }
@media (max-width: 860px) {
  .tl { grid-template-columns: 1fr; padding-left: 2.6rem; }
  .tl__item[data-side] { grid-column: 1; justify-self: stretch; text-align: left; max-width: none; }
  .tl__item[data-side]::before { left: calc(-2.6rem + 9px - 6px); right: auto; }
  .tl__year { justify-self: start; font-size: 3.4rem; padding: 1.4rem 0 .4rem; margin-left: -.4rem; }
  .tl__item--big .tl__what { font-size: 1.6rem; }
}

/* ---------- 8. bento ---------- */
.bento-sec { background: var(--paper); padding: 8rem 0; position: relative; }
.bento-sec__head .h2 { margin-top: 1rem; max-width: 14ch; }
.bento {
  margin-top: 3.5rem;
  display: grid; gap: 14px;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: minmax(150px, auto);
  grid-template-areas:
    'models models products stat1'
    'models models place place'
    'stack prod prod stat2'
    'stack edu stat3 stat2';
}
.tile {
  position: relative; overflow: hidden;
  padding: 1.5rem;
  background: var(--cream);
  border-radius: var(--radius-xl);
  display: flex; flex-direction: column;
  transition: transform .6s var(--ease-out-expo), box-shadow .5s;
}
.tile:hover { transform: translateY(-4px); box-shadow: 0 30px 60px -36px rgba(93, 60, 40, .45); }
.tile__n { font-size: 11px; color: var(--rust); letter-spacing: .06em; }
.tile__h { margin-top: .6rem; font-family: var(--font-serif); font-weight: 450; font-size: clamp(1.6rem, 2.3vw, 2.2rem); line-height: 1.02; letter-spacing: -.015em; color: var(--ink-deep); }
.tile__p { margin-top: .6rem; font-size: 12.5px; line-height: 1.6; color: var(--ink-soft); max-width: 46ch; }
.tile--models { grid-area: models; background: var(--ink-deep); color: var(--cream); }
.tile--models .tile__h { color: var(--cream); font-size: clamp(2.2rem, 3.6vw, 3.4rem); }
.tile--models .tile__p { color: rgba(254, 249, 237, .65); }
.tile--models .tile__n { color: var(--hero-3); }
.tile--products { grid-area: products; }
.tile--products .tile__h { font-size: clamp(1.45rem, 1.9vw, 1.8rem); }
.tile--stack { grid-area: stack; }
.tile--prod { grid-area: prod; }
.tile--place { grid-area: place; padding: 0; min-height: 210px; color: var(--cream); justify-content: flex-end; }
.tile--edu { grid-area: edu; }
.tile--stat { grid-area: stat1; background: var(--hero-2); justify-content: space-between; }
.tile--stat2 { grid-area: stat2; background: var(--hero-4); color: var(--cream); }
.tile--stat2 .stat__label { color: rgba(254, 249, 237, .85); }
.tile--stat3 { grid-area: stat3; background: var(--cream); }
.stat__num { font-family: var(--font-serif); font-size: clamp(3.4rem, 6vw, 6rem); line-height: .9; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.stat__label { font-size: 12px; line-height: 1.5; color: var(--ink); margin-top: 1rem; max-width: 26ch; }
.edu__h { font-family: var(--font-serif); font-size: 3rem; line-height: 1; margin-top: auto; }

.widget { margin-top: auto; padding-top: 1.4rem; }
.widget--decode {
  margin-top: auto; padding: 1.1rem 1.2rem; border-radius: 16px;
  background: rgba(254, 249, 237, .06); border: 1px solid rgba(254, 249, 237, .12);
  font-size: 12.5px;
}
.decode__head { display: flex; justify-content: space-between; font-size: 10.5px; color: rgba(254, 249, 237, .5); letter-spacing: .04em; }
.decode__ms { color: var(--hero-3); }
.decode__in { margin-top: .8rem; font-family: var(--font-serif); font-style: italic; font-size: 1.05rem; color: rgba(254, 249, 237, .8); min-height: 2.6em; }
.decode__out { margin-top: .6rem; font-size: 1.4rem; color: var(--cream); letter-spacing: .04em; min-height: 1.5em; }
.decode__prompt { color: var(--hero-3); }
.decode__caret { display: inline-block; width: .55em; height: 1em; vertical-align: -.12em; background: var(--hero-3); margin-left: 2px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.widget--flow { display: flex; align-items: center; flex-wrap: wrap; gap: .35rem; font-size: 11px; }
.widget--flow span { padding: .45em .8em; border-radius: 99px; background: var(--paper); transition: background .3s, color .3s; }
.widget--flow span.is-on { background: var(--ink); color: var(--cream); }
.widget--flow i { width: 14px; height: 1px; background: var(--line-strong); }

.widget--layers { display: grid; gap: 6px; perspective: 600px; }
.widget--layers span {
  padding: .7rem .9rem; border-radius: 10px; font-size: 11px;
  background: color-mix(in srgb, var(--hero-3) calc(100% - var(--i) * 22%), var(--paper));
  transform: rotateX(28deg) translateZ(calc(var(--i) * -4px));
  transition: transform .5s var(--ease-out-expo);
}
.tile--stack:hover .widget--layers span { transform: rotateX(0) translateX(calc(var(--i) * 8px)); }

.widget--ci { display: flex; flex-wrap: wrap; gap: .4rem; font-size: 11px; list-style: none; padding-left: 0; }
.widget--ci li {
  position: relative; padding: .5em .9em .5em 1.9em; border-radius: 99px; border: 1px solid var(--line-strong);
  transition: background .3s, border-color .3s, color .3s;
}
.widget--ci li::before { content: ''; position: absolute; left: .75em; top: 50%; width: .55em; height: .55em; margin-top: -.275em; border-radius: 50%; border: 1.5px solid var(--ink-soft); }
.widget--ci li.is-ok { background: var(--ink); color: var(--cream); border-color: var(--ink); }
.widget--ci li.is-ok::before { background: var(--hero-3); border-color: var(--hero-3); }

.place__sky {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, #4d5f86 0%, #b98a8a 55%, #f0b494 100%);
}
.place__sun { position: absolute; left: 70%; top: 40%; width: 64px; height: 64px; margin: -32px; border-radius: 50%; background: #ffe9cf; box-shadow: 0 0 60px 20px rgba(255, 220, 180, .55); }
.place__sky::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 38%;
  background: linear-gradient(180deg, transparent, rgba(34, 27, 23, .5));
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 80' preserveAspectRatio='none'%3E%3Cpath d='M0 80V50h20v-8h14v-14h8v14h16v-22h10v22h12v-6h18v16h10V28l8-10 8 10v26h22V40h14v-8h10v8h12v30h16V34h6v-6h10v6h8v24h20V44h12v-12h6v12h14v22h18V36h16v20h14v-8h16v32z' fill='black'/%3E%3C/svg%3E") bottom / 100% 100% no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 80' preserveAspectRatio='none'%3E%3Cpath d='M0 80V50h20v-8h14v-14h8v14h16v-22h10v22h12v-6h18v16h10V28l8-10 8 10v26h22V40h14v-8h10v8h12v30h16V34h6v-6h10v6h8v24h20V44h12v-12h6v12h14v22h18V36h16v20h14v-8h16v32z' fill='black'/%3E%3C/svg%3E") bottom / 100% 100% no-repeat;
  background-color: #2b2420;
}
.place__city, .place__time, .place__meta { position: relative; z-index: 1; padding-inline: 1.5rem; }
.place__city { font-family: var(--font-serif); font-size: 2.2rem; line-height: 1; }
.place__time { font-size: 1.1rem; margin-top: .4rem; font-variant-numeric: tabular-nums; }
.place__time small { font-size: 11px; opacity: .7; }
.place__meta { font-size: 11px; opacity: .8; padding-bottom: 1.4rem; margin-top: .3rem; }

@media (max-width: 1000px) {
  .bento {
    grid-template-columns: repeat(2, 1fr);
    grid-template-areas:
      'models models'
      'products stat1'
      'place place'
      'stack prod'
      'stat2 edu'
      'stat2 stat3';
  }
}
@media (max-width: 600px) {
  .bento {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      'models models'
      'products products'
      'stat1 stat3'
      'place place'
      'stack stack'
      'prod prod'
      'stat2 edu';
  }
  .stat__num { font-size: 3rem; }
  .edu__h { font-size: 2.4rem; }
}

/* ---------- 9. marquee ---------- */
.marquee { background: var(--paper); padding: 1rem 0 6rem; overflow: hidden; }
.marquee__row { display: flex; white-space: nowrap; padding: .4rem 0; }
.marquee__inner { display: flex; flex: none; gap: 0; will-change: transform; }
.marquee__inner span {
  display: inline-flex; align-items: center;
  font-family: var(--font-serif); font-size: clamp(2.2rem, 5vw, 4.6rem); line-height: 1.15; letter-spacing: -.02em;
  color: var(--ink-deep);
  padding-right: .7em;
}
.marquee__inner span::after { content: ''; width: .22em; height: .22em; margin-left: .7em; border-radius: 50%; background: var(--hero-4); }
.marquee__inner em { font-style: italic; color: var(--rust); }
.marquee__row[data-dir='-1'] .marquee__inner span { color: transparent; -webkit-text-stroke: 1px var(--ink); }
.marquee__row[data-dir='-1'] .marquee__inner em { -webkit-text-stroke: 1px var(--rust); }

/* ---------- contact ---------- */
.contact {
  position: relative; overflow: hidden;
  background: var(--hero-4);
  background: linear-gradient(180deg, var(--hero-2) 0%, var(--hero-3) 45%, var(--hero-4) 100%);
  color: var(--ink-deep);
  padding: 9rem 0 8rem;
}
.contact__glow {
  position: absolute; width: 70vw; height: 70vw; left: 50%; top: 10%; margin-left: -35vw; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 243, 230, .7), transparent 60%);
  filter: blur(20px);
  pointer-events: none;
}
.contact__inner { position: relative; }
.contact .eyebrow { color: var(--ink-deep); }
.contact__title {
  margin-top: 1.4rem;
  font-family: var(--font-serif); font-weight: 450;
  font-size: clamp(3.2rem, 9.5vw, 9.5rem); line-height: .92; letter-spacing: -.035em;
}
.contact__title em { font-style: italic; color: var(--cream); }
.contact__p { margin-top: 2rem; max-width: 40ch; font-family: var(--font-serif); font-size: 1.3rem; line-height: 1.4; }
.contact__actions { display: flex; flex-wrap: wrap; align-items: center; gap: .7rem; margin-top: 2.4rem; }
.copy-mail {
  display: inline-flex; align-items: center; gap: .9rem;
  height: 3.6rem; padding: 0 .45rem 0 1.5rem; border-radius: 99px;
  background: var(--ink-deep); color: var(--cream);
  font-size: 14px;
  transition: transform .35s var(--ease-out-quart), box-shadow .35s;
}
.copy-mail:hover { transform: translateY(-2px); box-shadow: 0 16px 30px -12px rgba(43, 36, 32, .6); }
.copy-mail__btn { display: inline-flex; align-items: center; gap: .4rem; height: 2.7rem; padding: 0 1rem; border-radius: 99px; background: var(--hero-3); color: var(--ink-deep); font-size: 12px; }
.copy-mail__btn svg { width: 15px; height: 15px; }
.copy-mail.is-copied .copy-mail__btn { background: var(--cream); }
.contact__labs { margin-top: 2.6rem; font-size: 12px; }
.contact__labs a { text-decoration: underline; text-underline-offset: 3px; }
.contact__labs a:hover { color: var(--cream); }
@media (max-width: 520px) {
  .copy-mail { font-size: 12px; padding-left: 1.1rem; width: 100%; justify-content: space-between; }
}

.footer__safe { font-family: var(--font-serif); font-style: italic; font-size: 14px; }
