/* Aryan Awasthi — scroll journey portfolio */

:root {
  --bg: #07090e;
  --surface: rgba(13, 16, 23, 0.88);
  --line: rgba(237, 230, 214, 0.12);
  --line-strong: rgba(237, 230, 214, 0.24);
  --text: #ede6d6;
  --text-2: #d8d1c2;
  --text-3: #b8b2a5;
  --muted: #9a9588;
  --accent: #f2a541;
  --accent-ink: #1a1206;
  --ice: #8fc1d4;
  --serif: 'Instrument Serif', Georgia, serif;
  --sans: 'IBM Plex Sans', system-ui, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
  --gutter: clamp(16px, 5.5vw, 80px);
  color-scheme: dark;
}

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

html {
  background: var(--bg);
  color: var(--text);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); }
a:hover { color: #ffd08a; }

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

h1, h2, h3 { margin: 0; font-weight: 400; }
p { margin: 0; }

.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

.skip {
  position: fixed; left: 16px; top: -60px; z-index: 50;
  padding: 10px 16px; border-radius: 10px;
  background: var(--accent); color: var(--accent-ink); font-weight: 600; text-decoration: none;
}
.skip:focus { top: 16px; }

/* --- type ------------------------------------------------------------------ */

.kicker {
  margin: 0;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}

.display {
  font-family: var(--serif);
  font-size: clamp(40px, 5vw, 68px);
  line-height: 1;
}

.lede { font-size: 17px; line-height: 1.6; color: var(--text-2); }

/* --- buttons ---------------------------------------------------------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px;
  border: 0; border-radius: 12px;
  background: var(--accent); color: var(--accent-ink);
  font: 600 14px/1 var(--sans); text-decoration: none; cursor: pointer;
}
.btn:hover { background: #ffb85c; color: var(--accent-ink); }
.btn--ghost { background: transparent; color: var(--text); border: 1px solid var(--line-strong); font-weight: 500; }
.btn--ghost:hover { background: rgba(237, 230, 214, 0.06); color: var(--text); }

.pill {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 44px; padding: 0 18px;
  border: 1px solid var(--line-strong); border-radius: 999px;
  color: var(--text); font-size: 14px; text-decoration: none;
}
.pill:hover { color: var(--text); border-color: rgba(237, 230, 214, 0.45); }
.pill span {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted);
}

.chip {
  min-height: 40px; padding: 0 14px;
  border: 1px solid rgba(237, 230, 214, 0.2); border-radius: 999px;
  background: transparent; color: var(--text-2);
  font: 13px/1 var(--sans); cursor: pointer;
}
.chip:hover { border-color: rgba(237, 230, 214, 0.45); color: var(--text); }

/* --- top bar + rail ---------------------------------------------------------- */

.topbar {
  position: fixed; inset: 0 0 auto 0; z-index: 20;
  height: 72px; padding: 0 var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  background: linear-gradient(rgba(7, 9, 14, 0.9), rgba(7, 9, 14, 0));
}
.brand { display: flex; align-items: baseline; gap: 14px; color: var(--text); text-decoration: none; }
.brand:hover { color: var(--text); }
.brand-name { font-family: var(--serif); font-size: 26px; line-height: 1; }
.brand-role { font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em; color: var(--muted); }

.chapters { display: flex; gap: 2px; margin-left: auto; }
.chapters a {
  display: flex; align-items: center; gap: 6px;
  min-height: 44px; padding: 0 12px;
  border-bottom: 1px solid transparent;
  color: var(--text-3); font-size: 13px; text-decoration: none;
}
.chapters a span { font-family: var(--mono); font-size: 10px; color: #8a867c; }
.chapters a:hover { color: var(--text); }
.chapters a.is-on { color: var(--text); border-bottom-color: var(--accent); }

.rail {
  position: fixed; right: 22px; top: 50%; z-index: 20;
  height: 46vh; transform: translateY(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  pointer-events: none;
}
.rail-track { position: relative; width: 2px; flex: 1; border-radius: 1px; background: rgba(237, 230, 214, 0.12); overflow: hidden; }
.rail-fill { position: absolute; inset: 0; background: var(--accent); transform: scaleY(0); transform-origin: top; }
.rail-pct { font-family: var(--mono); font-size: 10px; letter-spacing: 0.08em; color: var(--muted); }

/* --- story (chapters 01–02) ------------------------------------------------ */

.story { position: relative; }
.stage { position: relative; }
.stage canvas { display: none; }
.anchor { position: absolute; left: 0; width: 1px; height: 1px; }

.panel {
  max-width: 640px;
  margin: 0 auto;
  padding: 96px var(--gutter) 24px;
  display: flex; flex-direction: column; gap: 16px;
}

.js .story { height: 1200vh; }
.js .stage {
  position: sticky; top: 0;
  height: 100vh; height: 100svh;
  overflow: hidden;
}
.js .stage canvas { display: block; position: absolute; left: 0; top: 0; width: 100%; height: 100%; }
.js .stage .real, .js .stage .hud { display: none; }
.js .stage.has-real .real, .js .stage.has-real .hud { display: block; }
.js .stage.has-real .stars { opacity: 0; }
.js .stage .real { background: #020306; transform-origin: 62% 45%; }
.js .panel {
  position: absolute; left: var(--gutter); top: 50%;
  width: min(460px, 38vw); max-width: none; margin: 0; padding: 0;
  opacity: var(--o, 0);
  transform: translateY(calc(-50% + (1 - var(--o, 0)) * 24px));
  pointer-events: none;
  will-change: opacity, transform;
}
.js .panel.is-live { pointer-events: auto; }
.js .panel--right { left: auto; right: calc(var(--gutter) + 24px); width: min(400px, 34vw); }
.js .panel--wp {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(7, 9, 14, 0.72);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.motto {
  margin: 0;
  font-family: var(--serif); font-style: italic; font-size: clamp(30px, 3.2vw, 46px); line-height: 1.1;
  color: var(--text); letter-spacing: 0.01em;
}
/* On the pinned hero it floats in the open sky above the name. */
.js .panel--hero .motto {
  position: absolute; left: 0; white-space: nowrap; line-height: 1;
  /* sized by story.js to span the open band between the header and the hero block */
  font-size: var(--motto-size, 46px);
  bottom: calc(100% + max(8px, (50svh - 50% - 72px - 1em) / 2));
}
.panel--hero h1 {
  font-family: var(--serif);
  font-size: clamp(64px, 8.5vw, 120px);
  line-height: 0.92;
  letter-spacing: -0.01em;
}
.panel--hero .lede { max-width: 440px; font-size: 18px; }

.itinerary { list-style: none; margin: 8px 0 0; padding: 0; }
.itinerary li {
  display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; column-gap: 12px; align-items: center;
  min-height: 50px; padding: 4px 0;
  border-top: 1px solid var(--line);
}
.itinerary li:last-child { border-bottom: 1px solid var(--line); }
.itinerary .num, .itinerary .yr { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.itinerary li:first-child .num { color: var(--accent); }
.itinerary b { display: block; font-size: 16px; font-weight: 600; line-height: 1.3; }
.itinerary small { display: block; font-size: 13px; color: var(--text-3); line-height: 1.3; }

.wp-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.bars { display: flex; gap: 5px; }
.bars i { width: 20px; height: 3px; border-radius: 2px; background: rgba(237, 230, 214, 0.18); }
.bars[data-n="1"] i:nth-child(-n + 1),
.bars[data-n="2"] i:nth-child(-n + 2),
.bars[data-n="3"] i:nth-child(-n + 3),
.bars[data-n="4"] i:nth-child(-n + 4),
.bars[data-n="5"] i:nth-child(-n + 5),
.bars[data-n="6"] i:nth-child(-n + 6) { background: var(--accent); }

.wp-city { font-family: var(--serif); font-size: clamp(48px, 4.8vw, 72px); line-height: 0.95; overflow-wrap: anywhere; }
.wp-geo, .when {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase;
  line-height: 1.8; color: var(--text-3);
}
.when { color: var(--muted); }
.panel--wp h3 {
  padding-top: 16px; border-top: 1px solid var(--line);
  font-family: var(--serif); font-size: 30px; line-height: 1.1;
}
.panel--wp p:not([class]) { color: var(--text-2); }
.panel--wp ul:not(.network) { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; font-size: 15px; line-height: 1.5; color: var(--text-2); }

.legs {
  margin: 4px 0 0; padding-top: 14px; border-top: 1px solid var(--line);
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px;
}
.legs dt { font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.legs dd { margin: 4px 0 0; font-size: 14px; }

.network { list-style: none; margin: 0; padding: 14px 0 0; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; font-size: 14px; color: var(--text-2); }
.network li { display: flex; align-items: center; gap: 12px; }
.network b { color: var(--text); font-weight: 600; }
.key { flex: 0 0 auto; width: 10px; height: 10px; }
.key--here { border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(242, 165, 65, 0.18); }
.key--office { background: var(--ice); transform: rotate(45deg) scale(0.85); }


.scroll-cue { display: none; }
.js .scroll-cue {
  position: absolute; left: var(--gutter); bottom: 40px;
  display: flex; align-items: center; gap: 14px;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted);
}
.scroll-cue-dot { animation: cue 1.8s ease-in-out infinite; }
@keyframes cue { 0%, 100% { transform: translateY(0); opacity: 1; } 60% { transform: translateY(6px); opacity: 0.3; } }

/* --- floating assistant ------------------------------------------------------ */

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.dock {
  --glass: rgba(16, 20, 28, 0.42);
  position: fixed; z-index: 30;
  --dw: min(560px, calc(100vw - var(--gutter) * 2));
  left: calc((100vw - var(--dw)) / 2); bottom: 26px;
  width: var(--dw);
  display: flex; flex-direction: column;
  transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.45s ease;
  transform: translate(var(--mx, 0px), var(--my, 0px)) scale(var(--ms, 1));
  transform-origin: 50% 100%;
}
.dock[hidden] { display: none; }
.dock.is-merged { opacity: 0; pointer-events: none; }
/* The panel grows up out of the bar */
.dock-panel {
  display: grid; grid-template-rows: 0fr;
  transition: grid-template-rows 0.45s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.3s ease, margin 0.45s ease;
  opacity: 0; margin-bottom: 0;
}
.dock.is-open .dock-panel { grid-template-rows: 1fr; opacity: 1; margin-bottom: 8px; }
.dock-inner {
  min-height: 0; overflow: hidden;
  border: 1px solid rgba(237, 230, 214, 0.12); border-radius: 20px;
  background: var(--glass);
  -webkit-backdrop-filter: blur(22px) saturate(1.3); backdrop-filter: blur(22px) saturate(1.3);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.dock-head { display: flex; align-items: center; gap: 10px; padding: 10px 8px 6px 16px; }
.dock-title { display: flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.dock-title .status { width: 7px; height: 7px; border-radius: 50%; background: #7fd1a0; box-shadow: 0 0 8px rgba(127, 209, 160, 0.6); }
.dock-link { margin-left: auto; font-size: 12px; color: var(--text-3); text-decoration: none; }
.dock-link:hover { color: var(--text); }
.dock-close { width: 32px; height: 32px; }
.dock .dock-log { max-height: min(46vh, 380px); padding: 4px 14px 10px; }
.dock-log .msg { background: rgba(255, 255, 255, 0.04); border-color: rgba(237, 230, 214, 0.1); max-width: 90%; }
.dock-log .msg--user { background: rgba(242, 165, 65, 0.12); border-color: rgba(242, 165, 65, 0.3); }
.dock-suggest {
  display: flex; flex-direction: column; gap: 2px; padding: 8px;
  border-top: 1px solid rgba(237, 230, 214, 0.08); background: rgba(0, 0, 0, 0.12);
}
.dock-q {
  display: flex; align-items: center; gap: 8px; padding: 7px 10px; border: 0; border-radius: 10px;
  background: transparent; color: var(--text-2); font: 13px var(--sans); text-align: left; cursor: pointer;
}
.dock-q::before { content: '→'; color: var(--muted); }
.dock-q:hover, .dock-q:focus-visible { background: rgba(237, 230, 214, 0.07); color: var(--text); outline: none; }
.dock.has-chat .dock-suggest { display: none; }
.dock-bar {
  display: flex; align-items: center; gap: 10px; height: 52px; padding: 0 6px 0 16px;
  border: 1px solid rgba(237, 230, 214, 0.14); border-radius: 999px;
  background: var(--glass);
  -webkit-backdrop-filter: blur(22px) saturate(1.3); backdrop-filter: blur(22px) saturate(1.3);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: border-color 0.2s, border-radius 0.3s;
}
.dock.is-open .dock-bar { border-radius: 16px; }
.dock-bar:focus-within { border-color: rgba(242, 165, 65, 0.55); }
.dock-spark { flex: 0 0 auto; }
.dock-bar input { flex: 1; min-width: 0; height: 40px; border: 0; background: transparent; color: var(--text); font: 14px var(--sans); }
.dock-bar input:focus { outline: none; }
.dock-bar input::placeholder { color: #8f8a7f; }
.dock-send {
  flex: 0 0 auto; width: 40px; height: 40px; display: grid; place-items: center;
  border: 0; border-radius: 50%; background: var(--accent); color: var(--accent-ink); cursor: pointer;
}
.dock-send:hover { filter: brightness(1.08); }

@media (min-width: 761px) and (max-width: 1240px) { .js .scroll-cue { bottom: 96px; } }

/* --- projects (chapter 03, the story's last scene) ---------------------------- */

.js .stage { touch-action: pan-y pinch-zoom; }
.js .stage.is-orbiting { cursor: grab; }
.js .stage.is-dragging { cursor: grabbing; user-select: none; }
.js .panel--projects {
  top: 96px; bottom: 104px; transform: translateY(calc((1 - var(--o, 0)) * 24px));
  width: min(420px, 34vw);
  overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin;
  gap: 12px;
}
.js .panel--projects .display { font-size: clamp(40px, 4.4vw, 64px); }
.js .panel--projects .lede { font-size: 15px; }
.panel--projects .mission { margin-top: 4px; }
.panel--projects .legend { position: static; margin: 2px 0 0; }
.sat-layer { display: none; }
.js .sat-layer { display: block; position: absolute; inset: 0; opacity: var(--o, 0); pointer-events: none; }
.js .sat-layer.is-live .sat { pointer-events: auto; }
.js .sat-layer.is-live .sat.is-behind { pointer-events: none; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.filter {
  min-height: 44px; padding: 0 16px;
  border: 1px solid rgba(237, 230, 214, 0.22); border-radius: 999px;
  background: transparent; color: var(--text-2);
  font: 13px/1 var(--sans); cursor: pointer;
}
.filter[aria-pressed="true"] { background: var(--text); border-color: var(--text); color: var(--bg); }


.sat {
  position: absolute; left: 0; top: 0; width: 120px; padding: 0;
  transform: translate(-50%, -24px);
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  border: 0; background: transparent; color: #cfc8b8;
  font: 13px/16px var(--sans); cursor: pointer;
  transition: opacity 0.3s;
}
.sat.is-behind { opacity: 0.18; pointer-events: none; }
.sat-glyph { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; border: 1px solid transparent; }
.sat-glyph svg { transform: rotate(var(--tilt, 0deg)); }
.sat-label {
  white-space: nowrap; padding: 2px 8px; border-radius: 999px;
  background: rgba(7, 9, 14, 0.72); border: 1px solid rgba(237, 230, 214, 0.14);
}
.sat:hover .sat-glyph { border-color: rgba(237, 230, 214, 0.3); }
.sat[aria-pressed="true"] { color: var(--accent); }
.sat[aria-pressed="true"] .sat-glyph { border-color: var(--accent); box-shadow: 0 0 16px rgba(242, 165, 65, 0.35); }
.sat.is-dim { opacity: 0.28; }

.legend {
  list-style: none; margin: 0; padding: 0;
  display: flex; gap: 18px;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted);
}
.legend li { display: flex; align-items: center; gap: 8px; }
.legend i { width: 12px; height: 8px; border-radius: 1px; }

.missions { display: grid; gap: 16px; }
.mission {
  padding: 28px;
  border: 1px solid var(--line); border-radius: 20px; background: var(--surface);
  display: flex; flex-direction: column; gap: 14px;
}
.mission[hidden] { display: none; }
.mission-top { display: flex; justify-content: space-between; align-items: center; }
.mission .cat { font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.mission h3 { font-family: var(--serif); font-size: 42px; line-height: 1; }
.mission .sub { margin-top: -6px; font-size: 14px; color: var(--text-3); }
.mission p { font-size: 14px; line-height: 1.6; color: var(--text-2); }
.stack { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.stack li {
  padding: 4px 9px; border: 1px solid rgba(237, 230, 214, 0.18); border-radius: 999px;
  font-family: var(--mono); font-size: 10.5px; color: var(--text-2);
}
.mission .telemetry {
  padding-top: 12px; border-top: 1px solid rgba(237, 230, 214, 0.1);
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted);
}
.bullets { margin: -6px 0 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; line-height: 1.5; color: var(--text-2); }
.mission-actions { display: flex; gap: 10px; margin-top: 6px; }
.mission-actions .btn:first-child { flex: 1; }
.js .mission-actions [data-next-mission] { display: inline-flex; }
.mission-actions [data-next-mission] { display: none; }

.skills {
  max-width: 1440px; margin: 0 auto;
  padding: 120px calc(var(--gutter) + 24px) 40px var(--gutter);
}
.manifest { padding-top: 28px; border-top: 1px solid var(--line); }
.manifest-grid {
  margin: 20px 0 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px 32px;
}
.manifest-grid dt { font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.manifest-grid dd { margin: 4px 0 0; font-size: 15px; line-height: 1.55; }

/* --- contact (chapter 04) ---------------------------------------------------- */

.contact { position: relative; overflow: hidden; padding-top: 140px; text-align: center; }
.contact-inner {
  position: relative; z-index: 2;
  max-width: 960px; margin: 0 auto; padding: 0 var(--gutter);
  display: flex; flex-direction: column; align-items: center; gap: 18px;
}
.contact .display { font-size: clamp(44px, 6vw, 76px); }
.contact .lede { max-width: 620px; }
.contact-links { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }

.console { width: 100%; max-width: 920px; margin-top: 18px; text-align: left; }
.chat-log { max-height: 320px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding: 0 2px 14px; }
.msg {
  max-width: 82%; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: 14px; background: var(--surface);
  font-size: 14px; line-height: 1.55; color: var(--text-2);
}
.msg--user { align-self: flex-end; background: rgba(242, 165, 65, 0.1); border-color: rgba(242, 165, 65, 0.35); color: var(--text); }
.msg-who { display: block; margin-bottom: 4px; font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em; color: var(--muted); }
.msg-body ul { margin: 6px 0; padding-left: 18px; }
.msg-body code { font-family: var(--mono); font-size: 12.5px; }
.msg-suggest { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.is-typing .msg-body { animation: fade 1.2s ease-in-out infinite; }
.msg-body pre { margin: 8px 0; padding: 10px 12px; border-radius: 10px; background: rgba(0, 0, 0, 0.35); overflow-x: auto; }
.msg-body pre code { font-size: 12.5px; white-space: pre; }
.msg--gate { max-width: 92%; }
.gate-form { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.gate-form input {
  min-width: 0; height: 40px; padding: 0 12px; border-radius: 10px;
  border: 1px solid rgba(237, 230, 214, 0.16); background: rgba(0, 0, 0, 0.25); color: var(--text); font: 14px var(--sans);
}
.gate-form input:focus { outline: none; border-color: rgba(242, 165, 65, 0.6); }
.gate-form input[name="note"] { grid-column: 1 / -1; }
.gate-form .btn { grid-column: 1 / -1; justify-self: start; height: 40px; }
.gate-err { grid-column: 1 / -1; margin: 0; min-height: 1em; font-size: 12.5px; color: #e8a08a; }
@keyframes fade { 50% { opacity: 0.45; } }

.chat-bar {
  display: flex; align-items: center; gap: 12px;
  min-height: 72px; padding: 0 10px 0 18px;
  border: 1px solid rgba(237, 230, 214, 0.16); border-radius: 16px; background: var(--surface);
}
.chat-bar:focus-within { border-color: rgba(242, 165, 65, 0.6); }
.chat-bar .status { flex: 0 0 auto; width: 8px; height: 8px; border-radius: 50%; background: #7fd1a0; box-shadow: 0 0 10px rgba(127, 209, 160, 0.6); }
.chat-bar label { font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-3); white-space: nowrap; }
.chat-bar input {
  flex: 1; min-width: 0; height: 44px; padding: 0 14px;
  border: 0; border-left: 1px solid rgba(237, 230, 214, 0.14); background: transparent;
  color: var(--text); font: 15px var(--sans);
}
.chat-bar input:focus { outline: none; }
.chat-bar input::placeholder { color: #8a867c; }
.icon-btn {
  flex: 0 0 auto; width: 44px; height: 44px; display: grid; place-items: center;
  border: 0; border-radius: 10px; background: transparent; color: var(--muted); cursor: pointer;
}
.icon-btn:hover { color: var(--text); background: rgba(237, 230, 214, 0.06); }
.chat-suggest { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 12px; }

.limb {
  display: block; width: 100%; height: clamp(280px, 44vh, 440px); margin-top: 24px;
  -webkit-mask-image: linear-gradient(transparent, #000 35%);
  mask-image: linear-gradient(transparent, #000 35%);
}
.foot {
  position: absolute; left: var(--gutter); bottom: 20px; z-index: 2;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: #8a867c;
}

/* --- small screens ------------------------------------------------------------ */

@media (max-width: 760px) {
  .chapters { display: none; }
  .brand-role { display: none; }
  .rail { right: 8px; height: 30vh; }
  .rail-pct { display: none; }

  .js .panel, .js .panel--right {
    left: 12px; right: 12px; top: auto; bottom: 12px;
    width: auto; max-height: 63svh; overflow-y: auto;
    padding: 20px;
    border: 1px solid var(--line); border-radius: 18px;
    background: rgba(9, 12, 18, 0.88);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    transform: translateY(calc((1 - var(--o, 0)) * 24px));
    gap: 12px;
  }
  .js .panel--hero { background: none; border: 0; backdrop-filter: none; -webkit-backdrop-filter: none; }
  .js .panel--hero .motto { position: static; font-size: 28px; }
  .panel--hero h1 { font-size: 64px; }
  .display { font-size: 34px; }
  .lede { font-size: 15px; }
  .wp-city { font-size: 42px; }
  .panel--wp h3 { font-size: 22px; padding-top: 10px; }
  .panel--wp ul:not(.network) { font-size: 14px; gap: 4px; }
  /* The map already labels these on phones, so keep the cards short. */
  .panel--wp .wp-geo, .panel--wp .legs { display: none; }
  .hide-sm { display: none; }
  /* Keep the key that explains the ripples, just smaller. */
  .panel--wp .network { padding-top: 10px; gap: 6px; font-size: 13px; }
  .panel--wp .network .key { width: 8px; height: 8px; }
  .itinerary { margin-top: 0; }
  .itinerary li { min-height: 36px; padding: 2px 0; }
  .itinerary b { font-size: 14px; }
  .itinerary small { font-size: 12px; }
  .js .scroll-cue { bottom: 84px; }
  /* room for the floating assistant along the bottom */
  .js .panel, .js .panel--right { bottom: 76px; }
  .js .panel--hero { bottom: 128px; }
  .dock { --dw: calc(100vw - 24px); bottom: 12px; }

  .skills { padding: 88px 16px 24px; }
  .mission { padding: 22px; }
  .mission h3 { font-size: 32px; }
  .sat { width: 88px; font-size: 12px; }
  /* Projects: a bottom sheet under the globe, scrolling inside itself. */
  .js .panel--projects { top: auto; bottom: 76px; max-height: 46svh; }
  .js .panel--projects .display { font-size: 30px; }
  .js .panel--projects .lede, .js .panel--projects .legend { display: none; }

  .contact { padding-top: 110px; }
  .chat-bar { flex-wrap: wrap; padding: 10px; gap: 8px; }
  .chat-bar label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .chat-bar .status { display: none; }
  .chat-bar input { flex-basis: 100%; border-left: 0; padding: 0 6px; }
  .chat-bar .btn { flex: 1; }
  .msg { max-width: 92%; }
}

@media (max-width: 760px) and (max-height: 780px) {
  .lede--intro { display: none; }
  .wp-city { font-size: 34px; }
  .panel--wp ul:not(.network) li:nth-child(n + 3) { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .scroll-cue-dot, .is-typing .msg-body { animation: none; }
}
