:root {
  --bg: #111111;
  --bg-2: #151515;
  --card: #171717;
  --line: rgba(255, 255, 255, 0.09);
  --line-2: rgba(255, 255, 255, 0.16);
  --text: #f4f3ef;
  --muted: #8d8b84;
  --lime: #d6ff3f;
  --peri: #b8c8ff;
  --peach: #ff9c63;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --sans: "Geist", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --hand: "Covered By Your Grace", cursive;
  --rail: 250px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 40px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, p, ul { margin: 0; padding: 0; }
ul { list-style: none; }
::selection { background: var(--lime); color: #111; }

.mono { font-family: var(--mono); font-size: 12px; letter-spacing: 0.02em; text-transform: uppercase; }

/* ---------- progress + cursor ---------- */
.progress {
  position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 100;
  background: var(--lime); transform-origin: left; transform: scaleX(0);
}

.cursor {
  position: fixed; top: 0; left: 0; z-index: 200; pointer-events: none;
  width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%;
  border: 1.5px solid var(--lime); opacity: 0;
  display: grid; place-items: center;
  transition: width 0.35s var(--ease), height 0.35s var(--ease), margin 0.35s var(--ease), background 0.25s ease, opacity 0.3s ease;
  mix-blend-mode: normal;
}
.cursor.on { opacity: 1; }
.cursor.hot { width: 64px; height: 64px; margin: -32px 0 0 -32px; background: var(--lime); border-color: var(--lime); }
.cursor-label { color: #111; font-size: 10px; opacity: 0; transition: opacity 0.2s ease; }
.cursor.hot .cursor-label { opacity: 1; }
.cursor.down { transform: scale(0.85); }

@media (hover: none), (pointer: coarse) { .cursor { display: none; } }

/* ---------- fixed controls ---------- */
.mode {
  position: fixed; left: 22px; top: 18px; z-index: 90; display: flex; gap: 2px;
  padding: 4px; border-radius: 999px; height: 40px;
  background: rgba(24, 24, 24, 0.72); border: 1px solid var(--line);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  transition: transform 0.8s var(--ease);
}
.mode.docked { transform: translateY(calc(100vh - 100% - 36px)); transform: translateY(calc(100svh - 76px)); }
.mode button {
  padding: 0 16px; border-radius: 999px; font-size: 13px; color: var(--muted);
  transition: color 0.25s ease, background 0.3s ease;
}
.mode button[aria-selected="true"] { color: #111; background: var(--text); }
.mode button:not([aria-selected="true"]):hover { color: var(--text); }

.topright {
  position: fixed; right: 22px; top: 18px; z-index: 90; display: flex; align-items: center; gap: 14px;
}
.clock { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); }
.clock b { color: var(--text); font-weight: 500; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--lime); position: relative; }
.live-dot::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--lime); animation: ping 2s ease-out infinite; }
@keyframes ping { from { transform: scale(1); opacity: 0.7; } to { transform: scale(3); opacity: 0; } }

.pill {
  display: inline-flex; align-items: center; height: 40px; padding: 0 18px; border-radius: 999px;
  background: var(--text); color: #111; font-size: 13px; font-weight: 500;
  transition: background 0.25s ease, transform 0.3s var(--ease);
}
.pill:hover { background: var(--lime); }

/* ---------- hero ---------- */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 110px 24px 96px; text-align: center; overflow: hidden;
}
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(700px 420px at 50% 42%, rgba(214, 255, 63, 0.055), transparent 70%),
    radial-gradient(500px 300px at 85% 90%, rgba(184, 200, 255, 0.05), transparent 70%);
}
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0.5;
  background-image: radial-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px);
  background-size: 28px 28px;
  -webkit-mask-image: radial-gradient(ellipse at center, #000 20%, transparent 72%);
  mask-image: radial-gradient(ellipse at center, #000 20%, transparent 72%);
}

.eyebrow { color: var(--muted); margin-bottom: 34px; position: relative; z-index: 1; animation: fadeUp 1s var(--ease) 0.2s both; }

.stage { position: relative; z-index: 1; width: 100%; max-width: 1240px; }

#hero-title {
  font-weight: var(--w, 300);
  font-size: clamp(36px, 9.4vw, 132px);
  line-height: 1.02;
  letter-spacing: var(--tr, -0.02em);
  font-variation-settings: "wght" var(--w, 300);
  transition: font-weight 0.15s linear;
}

.h-line { display: block; overflow: hidden; padding: 0.06em 0 0.14em; margin: -0.06em 0 -0.14em; }
.w { display: inline-block; }
.js .h-line .w { transform: translateY(112%); animation: wordUp 1.1s var(--ease) both; animation-delay: calc(var(--i, 0) * 70ms + 250ms); }
@keyframes wordUp { to { transform: translateY(0); } }

.fancy { position: relative; transition: color 0.5s ease; }
.fancy[data-fancy="true"] { font-family: var(--serif); font-style: italic; font-weight: 400; color: var(--lime); letter-spacing: 0; }
.fancy .ch { display: inline-block; }

/* dials */
.dial {
  position: absolute; z-index: 3; display: flex; align-items: center; gap: 14px;
  height: 60px; padding: 12px 18px 0; min-width: 190px; align-items: flex-start; border-radius: 16px;
  background: linear-gradient(160deg, rgba(60, 60, 60, 0.55), rgba(24, 24, 24, 0.7));
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 18px 40px -12px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  user-select: none; touch-action: none; cursor: ew-resize; outline: none;
  transform: rotate(var(--r, 0deg));
  opacity: 0;
  animation: dialIn 1s var(--spring) both, float 6s ease-in-out infinite;
  animation-delay: var(--in, 1.6s), calc(var(--in, 1.6s) + 1s);
  transition: border-color 0.25s ease;
}
.dial:hover, .dial:focus-visible, .dial.drag { border-color: rgba(214, 255, 63, 0.55); }
.dial:focus-visible { box-shadow: 0 0 0 3px rgba(214, 255, 63, 0.25), 0 18px 40px -12px rgba(0, 0, 0, 0.7); }
@keyframes dialIn { from { opacity: 0; transform: rotate(var(--r, 0deg)) translateY(30px) scale(0.85); } to { opacity: 1; transform: rotate(var(--r, 0deg)); } }
@keyframes float { 0%, 100% { transform: rotate(var(--r, 0deg)) translateY(0); } 50% { transform: rotate(calc(var(--r, 0deg) + 1deg)) translateY(-7px); } }

.d1 { --r: 5deg; top: -14%; right: 4%; --in: 1.5s; }
.d2 { --r: -8deg; left: 0; bottom: 6%; --in: 1.7s; }
.d3 { --r: 6deg; right: 1%; bottom: -3%; --in: 1.9s; cursor: pointer; height: 52px; padding: 0 8px 0 18px; align-items: center; min-width: 0; }

.dial-fill { position: absolute; left: 18px; right: 18px; bottom: 13px; height: 3px; border-radius: 3px; background: rgba(255, 255, 255, 0.14); pointer-events: none; }
.dial-fill::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: calc(var(--f, 0.4) * 100%); border-radius: 3px; background: var(--lime); }
.dial-knob {
  position: absolute; bottom: 14.5px; left: calc(18px + (100% - 36px) * var(--f, 0.4)); width: 17px; height: 17px; margin: 0 0 -8.5px -8.5px;
  border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle at 35% 30%, #fff, #bdbdbd 75%);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.55), 0 0 0 4px rgba(214, 255, 63, 0.14);
  transition: box-shadow 0.25s ease, transform 0.3s var(--spring);
}
.dial.drag .dial-knob { transform: scale(1.25); box-shadow: 0 3px 8px rgba(0, 0, 0, 0.55), 0 0 0 6px rgba(214, 255, 63, 0.22); }
.dial-name { position: relative; font-weight: 600; font-size: 15px; letter-spacing: -0.01em; }
.dial-slider .dial-name, .dial-slider .dial-val { pointer-events: none; }
.dial-val { position: relative; margin-left: auto; color: var(--lime); font-size: 13px; font-variant-numeric: tabular-nums; }

.seg { position: relative; display: inline-flex; margin-left: auto; padding: 3px; border-radius: 10px; background: rgba(0, 0, 0, 0.35); }
.seg b { position: relative; z-index: 1; padding: 6px 14px; font-size: 14px; font-weight: 600; color: var(--muted); transition: color 0.25s ease; }
.seg b.on { color: #fff; }
.seg-thumb {
  position: absolute; top: 3px; bottom: 3px; left: 3px; width: calc(50% - 3px); border-radius: 8px;
  background: rgba(255, 255, 255, 0.14); transition: transform 0.5s var(--spring);
}
.dial-toggle[aria-checked="true"] .seg-thumb { transform: translateX(100%); }
.dial-toggle[aria-checked="true"] .seg b[data-v="on"] { color: var(--lime); }

.hint {
  position: absolute; z-index: 2; right: 6%; bottom: -78px; display: flex; align-items: flex-start; gap: 6px;
  font-family: var(--hand); font-size: 22px; color: var(--muted); transform: rotate(-3deg);
  animation: fadeUp 1s var(--ease) 2.8s both;
}
.hint svg { width: 54px; height: 36px; margin-top: -26px; order: 2; }
.hint path { stroke: var(--muted); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.hero-foot {
  position: absolute; left: 0; right: 0; bottom: 30px; z-index: 1; padding: 0 28px;
  display: flex; justify-content: space-between; align-items: center; gap: 20px; color: var(--muted);
  animation: fadeUp 1s var(--ease) 2.2s both;
}
.scroll-cue { display: inline-flex; align-items: center; gap: 10px; }
.scroll-cue i { width: 1px; height: 26px; background: linear-gradient(var(--lime), transparent); animation: cue 2s ease-in-out infinite; transform-origin: top; }
@keyframes cue { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(0); transform-origin: bottom; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* ---------- layout + rail ---------- */
.layout { display: grid; grid-template-columns: var(--rail) minmax(0, 1fr); gap: 56px; max-width: 1280px; margin: 0 auto; padding: 0 32px; }

.rail { position: sticky; top: 0; align-self: start; height: 100vh; height: 100svh; padding: 96px 0 100px; display: flex; flex-direction: column; }
.rail-mark { font-size: 34px; font-weight: 300; letter-spacing: -0.04em; display: inline-block; width: fit-content; transition: transform 0.4s var(--spring); }
.rail-mark span { color: var(--lime); }
.rail-mark:hover { transform: rotate(-6deg) scale(1.08); }

.rail-nav { position: relative; margin-top: 48px; display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.rail-nav a { position: relative; display: flex; gap: 14px; padding: 8px 0 8px 16px; color: var(--muted); transition: color 0.3s ease, transform 0.4s var(--ease); }
.rail-nav a i { font-style: normal; opacity: 0.6; }
.rail-nav a:hover { color: var(--text); transform: translateX(4px); }
.rail-nav a.active { color: var(--text); }
.rail-line { position: absolute; left: 0; top: var(--ry, 8px); width: 2px; height: 20px; background: var(--lime); border-radius: 2px; transition: top 0.5s var(--ease); }
.rail-note { margin-top: auto; color: var(--muted); font-size: 10.5px; line-height: 1.7; opacity: 0.8; text-transform: none; }

.content { padding-bottom: 60px; min-width: 0; }
.sec { padding: 112px 0 24px; }
.label { display: flex; align-items: center; gap: 12px; color: var(--muted); margin-bottom: 28px; }
.label i { font-style: normal; color: var(--lime); }

.statement { font-size: clamp(26px, 3.1vw, 40px); line-height: 1.22; font-weight: 300; letter-spacing: -0.025em; }
.statement em { font-family: var(--serif); font-style: italic; font-weight: 400; color: var(--lime); letter-spacing: 0; }
.lead { margin-top: 26px; max-width: 620px; font-size: 18px; line-height: 1.55; color: #b6b4ad; }
.h2 { font-size: clamp(32px, 4.2vw, 56px); font-weight: 300; line-height: 1.08; letter-spacing: -0.035em; margin-bottom: 44px; }
.big { font-size: clamp(64px, 12vw, 168px); font-weight: 300; line-height: 0.95; letter-spacing: -0.05em; margin-bottom: 28px; }
.big .dot { color: var(--lime); }

/* stats */
.stats { margin-top: 64px; display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.stat { padding: 28px 22px 26px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stat b { display: block; font-size: clamp(34px, 3.6vw, 52px); font-weight: 300; letter-spacing: -0.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.stat span { display: block; margin-top: 12px; font-size: 13.5px; line-height: 1.4; color: var(--muted); max-width: 190px; }

/* ---------- projects ---------- */
.projects { display: grid; gap: 22px; }
.proj {
  --mx: 50%; --my: 50%;
  position: relative; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.9fr); gap: 30px;
  padding: 30px; border-radius: 28px; background: var(--card); border: 1px solid var(--line);
  overflow: hidden; isolation: isolate;
  transition: border-color 0.4s ease, opacity 0.5s ease, filter 0.5s ease, transform 0.9s var(--ease);
}
.proj::before {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity 0.4s ease;
  background: radial-gradient(520px circle at var(--mx) var(--my), rgba(255, 255, 255, 0.07), transparent 60%);
}
.proj:hover { border-color: var(--line-2); }
.proj:hover::before { opacity: 1; }
.proj.dim { opacity: 0.32; filter: grayscale(1); }
.proj.hit { border-color: rgba(214, 255, 63, 0.6); box-shadow: 0 0 0 1px rgba(214, 255, 63, 0.25), 0 30px 70px -30px rgba(214, 255, 63, 0.25); }

.proj-top { display: flex; justify-content: space-between; color: var(--muted); margin-bottom: 26px; }
.proj h3 { font-size: clamp(24px, 2.5vw, 32px); font-weight: 400; line-height: 1.12; letter-spacing: -0.03em; }
.proj-meta { margin-top: 10px; color: var(--muted); font-size: 11.5px; }
.proj ul { margin-top: 22px; display: grid; gap: 12px; }
.proj li { position: relative; padding-left: 20px; font-size: 15px; line-height: 1.55; color: #bdbbb4; }
.proj li::before { content: ""; position: absolute; left: 2px; top: 0.7em; width: 6px; height: 1px; background: var(--lime); }
.tags { margin-top: 26px; display: flex; flex-wrap: wrap; gap: 8px; }
.tags span { padding: 5px 11px; border: 1px solid var(--line-2); border-radius: 999px; font-size: 11px; color: #cfcdc6; }

.proj-art { position: relative; border-radius: 20px; background: #0d0d0d; border: 1px solid var(--line); min-height: 280px; overflow: hidden; align-self: stretch; }
.proj-art::after { content: ""; position: absolute; inset: 0; pointer-events: none; box-shadow: inset 0 0 60px rgba(0, 0, 0, 0.6); }

/* art: heat map */
.heat { position: absolute; inset: 22px 22px 44px; display: grid; grid-template-columns: repeat(8, 1fr); grid-template-rows: repeat(6, 1fr); gap: 6px; }
.heat i { border-radius: 6px; background: var(--c, var(--lime)); opacity: var(--o, 0.3); animation: heat 4.5s ease-in-out infinite; animation-delay: var(--d, 0s); }
@keyframes heat { 0%, 100% { opacity: var(--o, 0.3); } 50% { opacity: calc(var(--o, 0.3) * 0.35); } }
.heat-key { position: absolute; left: 22px; bottom: 12px; display: flex; gap: 14px; }
.heat-key span { display: inline-flex; align-items: center; gap: 6px; font-size: 9.5px; color: var(--muted); }
.heat-key span::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--c); }

/* art: svg wrappers */
.art-svg { position: absolute; inset: 0; width: 100%; height: 100%; }

/* art: monitor */
.mon { position: absolute; inset: 0; padding: 26px 24px; display: flex; flex-direction: column; justify-content: center; gap: 18px; font-family: var(--mono); font-size: 11px; text-transform: uppercase; }
.mon-row { display: grid; grid-template-columns: 74px 1fr 70px; align-items: center; gap: 12px; color: var(--muted); }
.mon-bar { height: 8px; border-radius: 8px; background: rgba(255, 255, 255, 0.07); overflow: hidden; }
.mon-bar i { display: block; height: 100%; width: 40%; border-radius: 8px; background: var(--lime); transition: width 1.4s var(--ease), background 0.6s ease; }
.mon-state { text-align: right; color: var(--lime); transition: color 0.4s ease; }
.mon-row.crit .mon-bar i { background: var(--peach); }
.mon-row.crit .mon-state { color: var(--peach); }
.mon-head { display: flex; justify-content: space-between; color: var(--muted); font-size: 10px; margin-bottom: 4px; }
.mon-head b { color: var(--text); font-weight: 500; }

/* ---------- skills panel ---------- */
.panel { margin-top: 44px; padding: 8px 28px 26px; border-radius: 28px; background: var(--card); border: 1px solid var(--line); }
.panel-group { padding: 24px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 170px 1fr; gap: 20px; align-items: start; }
.panel-title { color: var(--muted); padding-top: 9px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  position: relative; display: inline-flex; align-items: center; gap: 9px; height: 38px; padding: 0 16px;
  border-radius: 12px; background: rgba(255, 255, 255, 0.045); border: 1px solid var(--line-2);
  font-size: 14px; color: #d9d7d0; transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease, transform 0.35s var(--spring);
}
.chip:not(.plain)::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 3px rgba(214, 255, 63, 0.15); }
.chip.plain { cursor: default; color: #a9a7a0; }
.chip:not(.plain):hover { transform: translateY(-2px); border-color: rgba(214, 255, 63, 0.5); }
.chip.active { background: var(--lime); color: #111; border-color: var(--lime); }
.chip.active::before { background: #111; box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.15); }
.readout { margin-top: 22px; min-height: 22px; color: var(--muted); text-transform: none; font-size: 13px; }
.readout .caret { color: var(--lime); }
.readout.has b { color: var(--text); font-weight: 500; }

/* ---------- timeline ---------- */
.timeline { border-top: 1px solid var(--line); }
.tl-item { display: grid; grid-template-columns: 210px 1fr; gap: 28px; padding: 34px 0; border-bottom: 1px solid var(--line); }
.tl-date { color: var(--muted); padding-top: 6px; }
.tl-date em { color: var(--lime); font-style: normal; }
.tl-body h3 { font-size: 26px; font-weight: 400; letter-spacing: -0.03em; }
.tl-org { margin-top: 8px; color: var(--muted); font-size: 11.5px; }
.tl-body ul { margin-top: 18px; display: grid; gap: 10px; }
.tl-body li { position: relative; padding-left: 20px; color: #bdbbb4; font-size: 15px; line-height: 1.55; }
.tl-body li::before { content: ""; position: absolute; left: 2px; top: 0.7em; width: 6px; height: 1px; background: var(--lime); }

/* ---------- contact ---------- */
.cta-row { margin-top: 36px; display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; gap: 10px; height: 58px; padding: 0 28px; border-radius: 999px;
  background: var(--lime); color: #111; font-size: 17px; font-weight: 500; letter-spacing: -0.01em;
  transition: transform 0.35s var(--ease), background 0.25s ease, color 0.25s ease;
}
.btn:hover { background: #e6ff7a; }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--line-2); }
.btn.ghost:hover { background: var(--text); color: #111; }
.where { margin-top: 30px; color: var(--muted); }

.footer { max-width: 1280px; margin: 0 auto; padding: 28px 32px 90px; display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; color: var(--muted); border-top: 1px solid var(--line); }
.footer a:hover, .linklike:hover { color: var(--text); }
.linklike { font: inherit; text-transform: inherit; letter-spacing: inherit; color: var(--text); border-bottom: 1px solid var(--line-2); }

/* ---------- reveal ---------- */
.js .rv { opacity: 0; transform: translateY(32px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); transition-delay: var(--d, 0s); }
.js .rv.in { opacity: 1; transform: none; }
.js .proj.rv.in { transition: border-color 0.4s ease, opacity 0.5s ease, filter 0.5s ease, transform 0.9s var(--ease); }

/* ---------- terminal ---------- */
#terminal-view { position: fixed; inset: 0; z-index: 80; background: #0a0a0a; padding: 84px 24px 90px; overflow: hidden; }
#terminal-view[hidden] { display: none; }
body.mode-terminal #human-view { display: none; }
body.mode-terminal .topright { display: none; }
body.mode-terminal .mode { transform: none; }

.term { max-width: 960px; height: 100%; margin: 0 auto; display: flex; flex-direction: column; border-radius: 16px; border: 1px solid var(--line-2); background: #0d0d0d; overflow: hidden; box-shadow: 0 40px 100px -30px rgba(0, 0, 0, 0.9); }
.term-bar { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.term-bar span { width: 11px; height: 11px; border-radius: 50%; background: #2a2a2a; }
.term-bar span:nth-child(1) { background: #ff6b5f; }
.term-bar span:nth-child(2) { background: #ffbd3f; }
.term-bar span:nth-child(3) { background: #3ecf5a; }
.term-bar em { margin: 0 auto; font-style: normal; color: var(--muted); text-transform: none; transform: translateX(-24px); }
.term-body { flex: 1; overflow-y: auto; padding: 18px 20px 6px; font-family: var(--mono); font-size: 13.5px; line-height: 1.65; color: #cfcdc6; scrollbar-width: thin; scrollbar-color: #2a2a2a transparent; }
.term-body .ln { white-space: pre-wrap; word-break: break-word; animation: fadeUp 0.35s var(--ease) both; }
.term-body .cmd { color: var(--text); }
.term-body .cmd b { color: var(--lime); font-weight: 400; }
.term-body .hl { color: var(--lime); }
.term-body .dim { color: var(--muted); }
.term-body .err { color: var(--peach); }
.term-body .pe { color: var(--peri); }
.term-form { display: flex; align-items: center; gap: 10px; padding: 8px 20px 18px; }
.term-prompt { color: var(--lime); text-transform: none; font-size: 13.5px; white-space: nowrap; }
.term-form input { flex: 1; min-width: 0; background: transparent; border: 0; outline: 0; color: var(--text); font-size: 13.5px; text-transform: none; caret-color: var(--lime); }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .layout { grid-template-columns: minmax(0, 1fr); gap: 0; padding: 0 22px; }
  .rail { display: none; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .proj { grid-template-columns: minmax(0, 1fr); }
  .proj-art { min-height: 240px; order: -1; }
  .panel-group { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .panel-title { padding-top: 0; }
}

@media (max-width: 760px) {
  .topright .clock { display: none; }
  .mode { left: 14px; top: 14px; }
  .topright { right: 14px; top: 14px; }
  .hero { padding: 100px 18px 118px; justify-content: center; }
  .eyebrow { margin-bottom: 26px; }
  .dials { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 44px; }
  .dial { position: relative; inset: auto; margin: 0; min-width: 0; flex: 1 1 150px; max-width: 220px; }
  .d1, .d2, .d3 { top: auto; left: auto; right: auto; bottom: auto; margin: 0; }
  .d3 { flex: 0 0 auto; }
  .hint { display: none; }
  .hero-foot { flex-direction: column; gap: 10px; bottom: 20px; }
  .hero-foot span:first-child, .hero-foot span:last-child { display: none; }
  .sec { padding-top: 84px; }
  .tl-item { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .stat { padding: 22px 16px 20px; }
  .proj { padding: 20px; border-radius: 22px; }
  #terminal-view { padding: 70px 10px 74px; }
  .footer { padding: 24px 22px 80px; }
  .btn { height: 54px; font-size: 15px; padding: 0 22px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  .js .h-line .w, .js .rv, .dial { opacity: 1; transform: none; }
  .dial { transform: rotate(var(--r, 0deg)); }
}
