/* =========================================================
   JIAHANG.LI — STREAMING-INSPIRED PORTFOLIO
   ========================================================= */

:root {
  --bg: #07020e;
  --bg-2: #0d0420;
  --fg: #f3eefb;
  --muted: #a394c2;
  --line: rgba(255, 255, 255, 0.08);

  --roku: #6f1ab1;        /* Roku purple */
  --roku-2: #9d4edd;
  --spectrum: #00a4ff;    /* Spectrum-ish blue */
  --spectrum-2: #0061ff;
  --hot: #ff3d7f;
  --warm: #ffb547;

  --grad: linear-gradient(135deg, var(--roku) 0%, var(--spectrum) 100%);
  --grad-hot: linear-gradient(135deg, var(--hot), var(--warm));

  --r-lg: 22px;
  --r-md: 14px;
  --r-sm: 8px;

  --shadow-glow: 0 30px 80px -20px rgba(111, 26, 177, 0.55);
  --shadow-card: 0 20px 60px -25px rgba(0, 0, 0, 0.7);

  --max: 1240px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

html, body { background: var(--bg); color: var(--fg); }

body {
  font-family: "Space Grotesk", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  cursor: none;
  background:
    radial-gradient(1200px 800px at 80% -10%, rgba(0, 164, 255, 0.18), transparent 60%),
    radial-gradient(900px 700px at -10% 30%, rgba(111, 26, 177, 0.28), transparent 55%),
    radial-gradient(800px 600px at 50% 110%, rgba(255, 61, 127, 0.15), transparent 60%),
    var(--bg);
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: none; }

::selection { background: var(--roku); color: white; }

/* ===================== EFFECTS ===================== */

.scanlines {
  pointer-events: none;
  position: fixed; inset: 0;
  z-index: 9000;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.025) 0,
    rgba(255, 255, 255, 0.025) 1px,
    transparent 1px,
    transparent 3px
  );
  mix-blend-mode: overlay;
  opacity: 0.6;
}

.noise {
  pointer-events: none;
  position: fixed; inset: 0;
  z-index: 8999;
  opacity: 0.05;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  animation: noiseShift 1.2s steps(4) infinite;
}
@keyframes noiseShift {
  0% { transform: translate(0,0); }
  25% { transform: translate(-3%,2%); }
  50% { transform: translate(2%,-2%); }
  75% { transform: translate(-2%,3%); }
  100% { transform: translate(0,0); }
}

/* ===================== CUSTOM CURSOR ===================== */

.cursor {
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  z-index: 10000;
  mix-blend-mode: difference;
  will-change: transform;
}
.cursor__ring {
  position: absolute;
  width: 38px; height: 38px;
  border: 1.5px solid rgba(255,255,255,0.85);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width .25s, height .25s, border-color .25s, background .25s;
}
.cursor__dot {
  position: absolute;
  width: 6px; height: 6px;
  background: white;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}
.cursor.is-active .cursor__ring {
  width: 64px; height: 64px;
  background: rgba(255,255,255,0.08);
  border-color: white;
}
@media (max-width: 720px) {
  body { cursor: auto; }
  .cursor { display: none; }
  button, a { cursor: pointer; }
}

/* ===================== BOOT SCREEN ===================== */

.boot {
  position: fixed; inset: 0;
  background: var(--bg);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  z-index: 11000;
  gap: 24px;
  transition: opacity .8s ease, visibility .8s;
}
.boot.is-done { opacity: 0; visibility: hidden; }
.boot__bar {
  width: min(280px, 60vw); height: 3px;
  background: rgba(255,255,255,0.08);
  border-radius: 99px; overflow: hidden;
}
.boot__bar span {
  display: block; height: 100%; width: 0;
  background: var(--grad);
  animation: boot 1.6s ease forwards;
}
@keyframes boot { to { width: 100%; } }
.boot__hint {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px; letter-spacing: 3px;
  color: var(--muted);
  animation: blink 1.2s steps(2) infinite;
}
@keyframes blink { 50% { opacity: .35; } }

/* ===================== TOP BAR ===================== */

.topbar {
  position: fixed;
  top: 16px; left: 50%;
  transform: translateX(-50%);
  z-index: 7000;
  width: min(var(--max), calc(100% - 32px));
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
  padding: 10px 14px 10px 18px;
  background: rgba(13, 4, 32, 0.55);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: var(--shadow-card);
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 600;
}
.brand__mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px;
  border-radius: 10px;
  background: var(--grad);
  font-family: "Bebas Neue", sans-serif;
  font-size: 16px; letter-spacing: 1px;
  color: white;
  box-shadow: 0 6px 18px -8px var(--roku);
}
.brand__mark.sm { width: 26px; height: 26px; font-size: 13px; border-radius: 8px; }
.brand__text { font-size: 15px; }
.brand__text em { font-style: normal; color: var(--muted); font-weight: 400; }

.nav {
  display: flex; gap: 4px;
  align-items: center;
}
.nav a {
  position: relative;
  padding: 8px 14px;
  font-size: 13.5px;
  border-radius: 99px;
  color: var(--muted);
  transition: color .25s, background .25s;
}
.nav a::before {
  content: attr(data-ch);
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  margin-right: 6px;
  color: rgba(255,255,255,0.25);
}
.nav a:hover, .nav a.active {
  color: white;
  background: rgba(255,255,255,0.06);
}
.nav a:hover::before, .nav a.active::before { color: var(--spectrum); }

.status {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 12px;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 99px;
}
.status .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 10px #22c55e;
  animation: pulseDot 1.6s ease-in-out infinite;
}
@keyframes pulseDot { 50% { opacity: .35; } }

@media (max-width: 880px) {
  .nav { display: none; }
}

/* ===================== HERO ===================== */

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  padding: 140px 5vw 80px;
  overflow: hidden;
  isolation: isolate;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
}
#heroCanvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  z-index: -1;
  opacity: .9;
}
.hero__left { max-width: 720px; }
.hero__right {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
}

@media (max-width: 1100px) {
  .hero { grid-template-columns: 1fr; gap: 56px; padding-bottom: 120px; }
  .hero__right { justify-self: center; }
}

.hero__chip {
  display: inline-flex; align-items: center; gap: 10px;
  width: max-content;
  padding: 8px 14px;
  border-radius: 99px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--line);
  font-family: "JetBrains Mono", monospace;
  font-size: 11.5px; letter-spacing: 2px;
  color: var(--muted);
}
.rec {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--hot);
  box-shadow: 0 0 14px var(--hot);
  animation: pulseDot 1.4s ease-in-out infinite;
}

.hero__title {
  margin-top: 28px;
  font-family: "Bebas Neue", sans-serif;
  font-size: clamp(56px, 8.5vw, 138px);
  line-height: .9;
  letter-spacing: -1px;
  font-weight: 700;
}
.hero__title .line {
  display: block; overflow: hidden;
}
.hero__title .word {
  display: inline-block;
  transform: translateY(110%);
  animation: rise 1s cubic-bezier(.2,.8,.2,1) forwards;
}
.hero__title .line:nth-child(2) .word { animation-delay: .15s; }
.hero__title .line:nth-child(3) .word { animation-delay: .3s; }
@keyframes rise { to { transform: translateY(0); } }

.hero__title .gradient {
  background: linear-gradient(90deg, var(--roku-2), var(--spectrum), var(--hot));
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shift 6s linear infinite, rise 1s cubic-bezier(.2,.8,.2,1) .3s forwards;
}
@keyframes shift { to { background-position: 200% 0; } }

.hero__sub {
  margin-top: 24px;
  max-width: 620px;
  font-size: clamp(15px, 1.2vw, 18px);
  color: #d4cae8;
  opacity: 0;
  transform: translateY(12px);
  animation: fadeUp .9s .8s ease forwards;
}
.hero__sub strong { color: white; font-weight: 600; }
@keyframes fadeUp { to { opacity: 1; transform: translateY(0); } }

.pill {
  display: inline-block;
  padding: 1px 10px;
  border-radius: 99px;
  font-size: .9em;
  font-weight: 600;
  margin: 0 2px;
}
.pill--blue { background: rgba(0,164,255,.18); color: #7ed1ff; border: 1px solid rgba(0,164,255,.35); }
.pill--purple { background: rgba(157,78,221,.18); color: #d2adf7; border: 1px solid rgba(157,78,221,.4); }

.hero__cta {
  margin-top: 32px;
  display: flex; gap: 12px; flex-wrap: wrap;
  opacity: 0; transform: translateY(12px);
  animation: fadeUp .9s 1s ease forwards;
}

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px;
  border-radius: 99px;
  font-weight: 600; font-size: 14px;
  letter-spacing: .2px;
  transition: transform .25s, box-shadow .25s, background .25s, color .25s;
  border: 1px solid transparent;
}
.btn--primary {
  background: var(--grad);
  color: white;
  box-shadow: 0 12px 30px -12px var(--roku);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 18px 38px -10px var(--spectrum); }
.btn--ghost {
  border-color: var(--line);
  color: white;
  background: rgba(255,255,255,0.02);
}
.btn--ghost:hover { background: rgba(255,255,255,0.07); border-color: rgba(255,255,255,0.2); }
.btn.big { padding: 16px 26px; margin-top: 28px; }

.hero__meta {
  margin-top: 48px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  max-width: 620px;
  opacity: 0; transform: translateY(12px);
  animation: fadeUp .9s 1.2s ease forwards;
}
.hero__meta div { border-left: 2px solid rgba(255,255,255,0.08); padding-left: 14px; }
.hero__meta b {
  display: block;
  font-family: "Bebas Neue", sans-serif;
  font-size: clamp(28px, 3vw, 40px);
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  line-height: 1;
  letter-spacing: 1px;
}
.hero__meta span {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}

/* ===================== TV ===================== */

.tv {
  position: relative;
  width: min(520px, 100%);
  opacity: 0;
  animation: fadeUp 1s 1.2s ease forwards;
}
.tv__bezel {
  position: relative;
  border-radius: 18px;
  padding: 14px;
  background: linear-gradient(180deg, #1a0a30, #07020e);
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow:
    0 50px 100px -30px rgba(0,0,0,0.8),
    0 0 0 2px rgba(255,255,255,0.02),
    inset 0 1px 0 rgba(255,255,255,0.06);
}
.tv__screen {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: 8px;
  overflow: hidden;
  background: #050010;
  box-shadow: inset 0 0 30px rgba(0,0,0,0.8);
}
.tv__glare {
  position: absolute; inset: 14px;
  border-radius: 8px;
  background: linear-gradient(120deg, rgba(255,255,255,0.08), transparent 40%);
  pointer-events: none;
  mix-blend-mode: screen;
}
.tv__stand {
  width: 130px; height: 22px;
  margin: -2px auto 0;
  background: linear-gradient(180deg, #1a0a30, #0a0418);
  border: 1px solid rgba(255,255,255,0.08);
  border-top: 0;
  border-radius: 0 0 8px 8px;
}
.tv__base {
  width: 220px; height: 8px;
  margin: 0 auto;
  background: linear-gradient(180deg, #1a0a30, #050010);
  border-radius: 99px;
  box-shadow: 0 16px 40px -10px rgba(0,0,0,0.8);
}

.tv__view {
  position: absolute; inset: 0;
  opacity: 0; visibility: hidden;
  transition: opacity .35s, visibility .35s;
}
.tv__view.is-active { opacity: 1; visibility: visible; }

.tv__home {
  display: flex; flex-direction: column;
  background:
    radial-gradient(80% 60% at 80% 0%, rgba(0,164,255,0.15), transparent 60%),
    radial-gradient(80% 60% at 0% 100%, rgba(111,26,177,0.25), transparent 60%),
    #0a0419;
  color: #f3eefb;
  padding: 12px 14px;
  font-size: 12px;
}
.tv__topbar {
  display: flex; justify-content: space-between; align-items: center;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  padding-bottom: 8px;
  margin-bottom: 10px;
}
.tv__brand { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 12px; }
.tv__time { font-family: "JetBrains Mono", monospace; font-size: 11px; color: var(--muted); }

.tv__body {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 10px;
  flex: 1;
  min-height: 0;
}
.tv__sidebar {
  list-style: none;
  display: flex; flex-direction: column;
  gap: 4px;
  font-size: 11px;
  color: var(--muted);
}
.tv__sidebar li {
  padding: 6px 8px;
  border-radius: 6px;
  border: 1px solid transparent;
  transition: background .25s, color .25s, border-color .25s;
}
.tv__sidebar li.is-on {
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.08);
  color: white;
}
.tv__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 8px;
  min-height: 0;
}
.tv-tile {
  position: relative;
  border-radius: 8px;
  border: 1.5px solid transparent;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--c1) 70%, #0a0419), color-mix(in srgb, var(--c2) 60%, #0a0419));
  padding: 8px 10px;
  display: flex; flex-direction: column;
  justify-content: space-between;
  text-align: left;
  color: white;
  transition: transform .25s, border-color .25s, box-shadow .25s;
  overflow: hidden;
  cursor: none;
}
.tv-tile::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(160deg, rgba(255,255,255,0.18), transparent 40%);
  pointer-events: none;
}
.tv-tile__num {
  font-family: "Bebas Neue", sans-serif;
  font-size: 22px;
  letter-spacing: 1px;
  color: rgba(255,255,255,0.5);
  line-height: 1;
}
.tv-tile__title {
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
}
.tv-tile.is-focused {
  transform: scale(1.04);
  border-color: white;
  box-shadow:
    0 0 0 2px rgba(255,255,255,0.15),
    0 12px 30px -10px var(--c2),
    0 0 30px -8px var(--c1);
  z-index: 2;
}

.tv__hint {
  margin-top: 8px;
  text-align: center;
  font-family: "JetBrains Mono", monospace;
  font-size: 9px;
  letter-spacing: 3px;
  color: rgba(255,255,255,0.35);
}

/* Playing view */
.tv__playing {
  display: flex; align-items: flex-end;
  padding: 16px;
}
.tv__playbg {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, var(--c1, #6F1AB1), var(--c2, #00A4FF));
  transition: background .5s;
}
.tv__playbg::after {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(60% 80% at 70% 20%, rgba(255,255,255,0.35), transparent 60%),
    linear-gradient(180deg, transparent 30%, rgba(0,0,0,0.6));
}
.tv__playmeta {
  position: relative;
  z-index: 1;
  color: white;
  max-width: 80%;
}
.tv__nowtag {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  letter-spacing: 3px;
  background: rgba(0,0,0,0.4);
  border: 1px solid rgba(255,255,255,0.15);
  padding: 5px 10px;
  border-radius: 99px;
  margin-bottom: 10px;
}
.tv__playmeta h3 {
  font-family: "Bebas Neue", sans-serif;
  font-size: 38px;
  letter-spacing: 1px;
  line-height: 1;
  margin-bottom: 6px;
}
.tv__playmeta p {
  font-size: 12px;
  color: rgba(255,255,255,0.85);
  max-width: 36ch;
}
.tv__eq {
  display: flex; gap: 4px; align-items: end;
  height: 24px;
  margin-top: 12px;
}
.tv__eq span {
  width: 4px;
  background: white;
  border-radius: 2px;
  height: 30%;
  animation: eq 1.4s ease-in-out infinite;
}
.tv__eq span:nth-child(1)  { animation-delay: .0s; }
.tv__eq span:nth-child(2)  { animation-delay: .1s; }
.tv__eq span:nth-child(3)  { animation-delay: .2s; }
.tv__eq span:nth-child(4)  { animation-delay: .3s; }
.tv__eq span:nth-child(5)  { animation-delay: .4s; }
.tv__eq span:nth-child(6)  { animation-delay: .5s; }
.tv__eq span:nth-child(7)  { animation-delay: .15s; }
.tv__eq span:nth-child(8)  { animation-delay: .25s; }
.tv__eq span:nth-child(9)  { animation-delay: .35s; }
.tv__eq span:nth-child(10) { animation-delay: .45s; }
.tv__eq span:nth-child(11) { animation-delay: .55s; }
.tv__eq span:nth-child(12) { animation-delay: .05s; }

/* ===================== REMOTE ===================== */

.remote {
  flex-shrink: 0;
  width: 130px;
  padding: 14px 12px 16px;
  border-radius: 22px;
  background: linear-gradient(180deg, #2a153f, #0e0420);
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow:
    0 30px 60px -10px rgba(0,0,0,.7),
    inset 0 1px 0 rgba(255,255,255,.08);
  transform-origin: center;
  opacity: 0;
  animation: remoteIn 1s 1.4s ease forwards, floaty 6s 2.4s ease-in-out infinite;
}
@keyframes remoteIn {
  to { opacity: 1; }
}
@keyframes floaty {
  0%,100% { transform: rotate(4deg) translateY(0); }
  50%      { transform: rotate(3deg) translateY(-6px); }
}
.remote__top {
  height: 6px; width: 30px; margin: 0 auto 12px;
  border-radius: 99px;
  background: rgba(255,255,255,0.1);
}
.remote__pad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-areas:
    ". up ."
    "left ok right"
    ". down .";
  gap: 6px;
  margin-bottom: 12px;
}
.remote__btn {
  aspect-ratio: 1;
  border-radius: 10px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  color: var(--muted);
  font-size: 12px;
  display: flex; align-items: center; justify-content: center;
  transition: transform .12s ease, background .2s, color .2s, box-shadow .2s;
  cursor: none;
}
.remote__btn:hover { color: white; background: rgba(255,255,255,0.08); }
.remote__btn.is-press {
  transform: scale(0.92);
  background: rgba(255,255,255,0.14);
  color: white;
}
.remote__btn.up    { grid-area: up; }
.remote__btn.left  { grid-area: left; }
.remote__btn.right { grid-area: right; }
.remote__btn.down  { grid-area: down; }
.remote__btn.ok    {
  grid-area: ok;
  background: var(--grad);
  color: white;
  font-weight: 700;
  box-shadow: 0 6px 16px -6px var(--roku);
  border: none;
}
.remote__btn.ok.is-press {
  transform: scale(0.92);
  box-shadow: 0 3px 10px -4px var(--roku), 0 0 0 4px rgba(157,78,221,0.25);
}
.remote__row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 0 0 8px;
}
.remote__key {
  height: 28px;
  border-radius: 8px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  color: var(--muted);
  font-size: 12px;
  display: flex; align-items: center; justify-content: center;
  transition: transform .12s, background .2s, color .2s;
  cursor: none;
}
.remote__key:hover { color: white; background: rgba(255,255,255,0.08); }
.remote__key.is-press {
  transform: scale(0.92);
  background: rgba(255,255,255,0.14);
  color: white;
}
.remote__brand {
  text-align: center;
  font-family: "JetBrains Mono", monospace;
  font-size: 9px;
  color: rgba(255,255,255,0.35);
  letter-spacing: 2px;
}

@media (max-width: 1100px) {
  .hero__right { flex-direction: column; gap: 24px; }
  .remote { transform: none; animation: fadeUp 1s 1.4s ease forwards; }
}
@media (max-width: 520px) {
  .remote { width: 110px; }
  .tv__playmeta h3 { font-size: 28px; }
  .tv__sidebar { display: none; }
  .tv__body { grid-template-columns: 1fr; }
}

/* ===================== MARQUEE ===================== */

.marquee {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(90deg, transparent, rgba(255,255,255,0.02), transparent);
  overflow: hidden;
  padding: 18px 0;
}
.marquee__track {
  display: flex; gap: 36px;
  white-space: nowrap;
  animation: scroll 40s linear infinite;
  font-family: "Bebas Neue", sans-serif;
  font-size: clamp(28px, 4vw, 56px);
  letter-spacing: 4px;
  color: rgba(255,255,255,0.5);
}
.marquee__track span:nth-child(odd) {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
@keyframes scroll {
  to { transform: translateX(-50%); }
}

/* ===================== SECTIONS COMMON ===================== */

.section {
  position: relative;
  padding: 140px 5vw;
  max-width: var(--max);
  margin: 0 auto;
}
.section__head { margin-bottom: 60px; }
.kicker {
  display: inline-block;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px; letter-spacing: 4px;
  color: var(--spectrum);
  padding: 6px 12px;
  border-radius: 99px;
  background: rgba(0,164,255,0.08);
  border: 1px solid rgba(0,164,255,0.2);
  margin-bottom: 18px;
}
.section h2 {
  font-family: "Bebas Neue", sans-serif;
  font-size: clamp(40px, 6vw, 84px);
  letter-spacing: 1px;
  line-height: 1;
  max-width: 16ch;
}
.section__sub {
  margin-top: 14px;
  color: var(--muted);
  max-width: 60ch;
}

/* ===================== ABOUT ===================== */

.about__grid {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 56px;
  align-items: start;
}
.about__copy p { margin-bottom: 18px; color: #d4cae8; font-size: 17px; }
.about__copy em { color: white; font-style: normal; font-weight: 600; }
.about__copy strong { color: white; }

.about__card {
  background: linear-gradient(180deg, #160a2a, #0a0419);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.about__card-head {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px;
  background: rgba(255,255,255,0.02);
  border-bottom: 1px solid var(--line);
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  color: var(--muted);
}
.about__card-head span { margin-left: 10px; }
.led { width: 10px; height: 10px; border-radius: 50%; }
.led--green { background: #22c55e; box-shadow: 0 0 8px #22c55e; }
.led--amber { background: #f59e0b; box-shadow: 0 0 8px #f59e0b; }
.led--red   { background: #ef4444; box-shadow: 0 0 8px #ef4444; }

.code {
  padding: 22px;
  font-family: "JetBrains Mono", monospace;
  font-size: 13.5px;
  line-height: 1.7;
  color: #e7defb;
  white-space: pre;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.tk-c { color: #6e6088; }
.tk-k { color: #b794f4; }
.tk-s { color: #6ee7b7; }

@media (max-width: 880px) {
  .about__grid { grid-template-columns: 1fr; gap: 32px; }
}

/* ===================== EXPERIENCE TIMELINE ===================== */

.timeline { list-style: none; position: relative; padding-left: 24px; }
.timeline::before {
  content: "";
  position: absolute;
  left: 9px; top: 8px; bottom: 8px;
  width: 2px;
  background: linear-gradient(180deg, var(--roku), var(--spectrum), transparent);
  opacity: .6;
}
.timeline__item {
  position: relative;
  padding-bottom: 36px;
}
.timeline__dot {
  position: absolute;
  left: -22px; top: 24px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--spectrum);
  box-shadow: 0 0 0 4px rgba(0,164,255,0.15), 0 0 18px var(--spectrum);
}
.timeline__item:first-child .timeline__dot {
  border-color: var(--hot);
  box-shadow: 0 0 0 4px rgba(255,61,127,0.15), 0 0 18px var(--hot);
}

.timeline__card {
  background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01));
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 28px;
  position: relative;
  transition: border-color .3s, transform .4s;
}
.timeline__card:hover { border-color: rgba(255,255,255,0.18); }
.timeline__head {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px;
  margin-bottom: 10px;
}
.timeline__head h3 {
  font-family: "Space Grotesk", sans-serif;
  font-size: 22px; font-weight: 600;
}
.timeline__co {
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  color: var(--muted);
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
}
.timeline__card p { color: #d4cae8; }

.chips {
  list-style: none;
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-top: 14px;
}
.chips li {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 99px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--line);
  color: #cfc1ea;
}

/* ===================== WORK / CHANNELS ===================== */

.channels {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 18px;
}
.channel {
  position: relative;
  grid-column: span 2;
  padding: 26px;
  min-height: 240px;
  border-radius: var(--r-lg);
  background:
    linear-gradient(160deg, color-mix(in srgb, var(--c1) 35%, #0a0419), color-mix(in srgb, var(--c2) 25%, #0a0419));
  border: 1px solid rgba(255,255,255,0.08);
  overflow: hidden;
  isolation: isolate;
  transform-style: preserve-3d;
  transition: transform .35s cubic-bezier(.2,.8,.2,1);
  display: flex; flex-direction: column; justify-content: space-between;
}
.channel::before {
  content: "";
  position: absolute; inset: -1px;
  background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,0.18) 50%, transparent 70%);
  opacity: 0;
  transition: opacity .4s, transform .8s;
  pointer-events: none;
  transform: translateX(-100%);
  z-index: 1;
}
.channel:hover::before { opacity: 1; transform: translateX(100%); }
.channel:hover { transform: translateY(-6px); }
.channel--lg { grid-column: span 4; min-height: 320px; }

.channel__num {
  font-family: "Bebas Neue", sans-serif;
  font-size: 88px;
  letter-spacing: 2px;
  color: rgba(255,255,255,0.06);
  line-height: 1;
}
.channel__body h3 {
  font-family: "Space Grotesk", sans-serif;
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 10px;
}
.channel--lg .channel__body h3 { font-size: 30px; }
.channel__body p { color: rgba(255,255,255,0.78); font-size: 15px; }

.channel__tag {
  position: absolute; top: 18px; right: 18px;
  font-family: "JetBrains Mono", monospace;
  font-size: 10px; letter-spacing: 3px;
  padding: 5px 9px;
  border-radius: 99px;
  background: rgba(0,0,0,0.35);
  border: 1px solid rgba(255,255,255,0.18);
}

@media (max-width: 980px) {
  .channels { grid-template-columns: repeat(2, 1fr); }
  .channel, .channel--lg { grid-column: span 2; min-height: 200px; }
}
@media (max-width: 600px) {
  .channels { grid-template-columns: 1fr; }
  .channel, .channel--lg { grid-column: span 1; }
}

/* ===================== STACK ===================== */

.stack__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px 56px;
  margin-bottom: 60px;
}
.skill { display: flex; flex-direction: column; gap: 8px; }
.skill > span {
  display: flex; justify-content: space-between;
  font-size: 14px;
  color: #e7defb;
  font-weight: 500;
}
.bar {
  position: relative;
  height: 6px;
  border-radius: 99px;
  background: rgba(255,255,255,0.05);
  overflow: hidden;
}
.bar i {
  display: block;
  height: 100%;
  width: var(--p);
  background: var(--grad);
  border-radius: 99px;
  transform-origin: left;
  transform: scaleX(0);
  transition: transform 1.2s cubic-bezier(.2,.8,.2,1);
  box-shadow: 0 0 12px rgba(157,78,221,0.5);
}
.skill.in-view .bar i { transform: scaleX(1); }

.eq {
  display: flex; gap: 8px; align-items: end;
  height: 80px;
  padding: 0 4px;
  border-top: 1px dashed var(--line);
  padding-top: 28px;
}
.eq span {
  flex: 1;
  background: var(--grad);
  border-radius: 4px 4px 0 0;
  height: 30%;
  animation: eq 1.4s ease-in-out infinite;
}
.eq span:nth-child(1)  { animation-delay: .0s; }
.eq span:nth-child(2)  { animation-delay: .15s; }
.eq span:nth-child(3)  { animation-delay: .3s; }
.eq span:nth-child(4)  { animation-delay: .45s; }
.eq span:nth-child(5)  { animation-delay: .6s; }
.eq span:nth-child(6)  { animation-delay: .1s; }
.eq span:nth-child(7)  { animation-delay: .25s; }
.eq span:nth-child(8)  { animation-delay: .4s; }
.eq span:nth-child(9)  { animation-delay: .55s; }
.eq span:nth-child(10) { animation-delay: .7s; }
.eq span:nth-child(11) { animation-delay: .05s; }
.eq span:nth-child(12) { animation-delay: .2s; }
.eq span:nth-child(13) { animation-delay: .35s; }
.eq span:nth-child(14) { animation-delay: .5s; }
.eq span:nth-child(15) { animation-delay: .65s; }
@keyframes eq {
  0%,100% { height: 18%; }
  50%     { height: 92%; }
}
@media (max-width: 720px) {
  .stack__grid { grid-template-columns: 1fr; gap: 18px; }
}

/* ===================== CONTACT ===================== */

.contact__card {
  background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01));
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 36px;
  max-width: 720px;
  position: relative;
  overflow: hidden;
}
.contact__card::before {
  content: "";
  position: absolute; inset: -2px;
  background: var(--grad);
  z-index: -1;
  filter: blur(40px);
  opacity: .25;
}
.contact__row {
  display: flex; align-items: center; gap: 16px;
  padding: 14px 0;
  border-bottom: 1px dashed var(--line);
}
.contact__row:last-of-type { border-bottom: 0; }
.contact__label {
  width: 110px;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px; letter-spacing: 3px;
  color: var(--muted);
  text-transform: uppercase;
}
.contact__val { font-size: 17px; }
.contact__val.link {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  font-weight: 600;
  position: relative;
}
.contact__val.link::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: -3px;
  height: 1px; background: currentColor; opacity: .3;
}

/* ===================== FOOTER ===================== */

.footer {
  border-top: 1px solid var(--line);
  padding: 30px 5vw;
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px;
  font-size: 12.5px;
  color: var(--muted);
  flex-wrap: wrap;
}
.footer__left { display: flex; align-items: center; gap: 10px; }
.footer__right .hint {
  font-family: "JetBrains Mono", monospace;
  letter-spacing: 2px;
}

/* ===================== RESTART OVERLAY ===================== */

.restart {
  position: fixed; inset: 0;
  background: var(--bg);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 24px;
  z-index: 9500;
  opacity: 0; visibility: hidden;
  transition: opacity .35s, visibility .35s;
}
.restart.is-on { opacity: 1; visibility: visible; }
.restart__bar {
  width: min(280px, 60vw); height: 3px;
  background: rgba(255,255,255,0.08);
  border-radius: 99px; overflow: hidden;
}
.restart__bar span {
  display: block; height: 100%; width: 0;
  background: var(--grad);
}
.restart.is-on .restart__bar span {
  animation: boot 2.4s ease forwards;
}
.restart__hint {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px; letter-spacing: 3px;
  color: var(--muted);
  animation: blink 1.2s steps(2) infinite;
}

/* ===================== UTIL ===================== */

.tilt { transition: transform .25s ease-out; }

/* Reveal animation */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .8s ease, transform .8s cubic-bezier(.2,.8,.2,1);
}
.reveal.in-view { opacity: 1; transform: translateY(0); }

/* prefers reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001s !important;
    transition-duration: .001s !important;
  }
}

/* =========================================================
   RESPONSIVE TUNING
   ========================================================= */

/* Tablets and small laptops */
@media (max-width: 1024px) {
  .section { padding: 110px 5vw; }
  .channels { grid-template-columns: repeat(4, 1fr); }
  .channel { grid-column: span 2; }
  .channel--lg { grid-column: span 4; }
}

/* Phones — landscape and large */
@media (max-width: 720px) {
  body { font-size: 15px; }

  /* Topbar */
  .topbar {
    top: 12px;
    width: calc(100% - 20px);
    padding: 8px 10px 8px 12px;
    gap: 8px;
  }
  .brand__text { display: none; }
  .brand__mark { width: 28px; height: 28px; font-size: 14px; }
  .status { padding: 5px 10px; font-size: 10px; letter-spacing: 1px; }
  .status .dot { width: 7px; height: 7px; }

  /* Hero */
  .hero {
    padding: 110px 20px 60px;
    gap: 36px;
    align-items: start;
  }
  .hero__title { margin-top: 18px; font-size: clamp(44px, 13vw, 84px); }
  .hero__sub { margin-top: 16px; font-size: 15px; }
  .hero__cta { margin-top: 22px; }
  .hero__cta .btn { padding: 12px 18px; font-size: 13.5px; }
  .hero__meta { margin-top: 32px; gap: 14px; }
  .hero__meta b { font-size: 26px; }
  .hero__meta span { font-size: 11px; }

  /* TV + Remote layout on phones */
  .hero__right { gap: 20px; }
  .tv { width: min(440px, 100%); }
  .tv__bezel { padding: 10px; }
  .tv__home { padding: 10px 12px; font-size: 11px; }
  .tv__topbar { padding-bottom: 6px; margin-bottom: 8px; }
  .tv__brand { font-size: 11px; gap: 6px; }
  .tv__brand .brand__mark.sm { width: 22px; height: 22px; font-size: 11px; }
  .tv__time { font-size: 10px; }
  .tv__body { grid-template-columns: 76px 1fr; gap: 8px; }
  .tv__sidebar { font-size: 10px; gap: 3px; }
  .tv__sidebar li { padding: 5px 6px; }
  .tv-tile { padding: 7px 8px; }
  .tv-tile__num { font-size: 18px; }
  .tv-tile__title { font-size: 10px; }
  .tv__hint { font-size: 8px; letter-spacing: 2px; }

  /* Sections */
  .section { padding: 90px 20px; }
  .section__head { margin-bottom: 40px; }
  .section h2 { font-size: clamp(34px, 9vw, 56px); }
  .kicker { font-size: 10px; padding: 5px 10px; }

  /* About */
  .about__grid { gap: 24px; }
  .about__copy p { font-size: 15px; }
  .about__card-head { padding: 10px 12px; font-size: 11px; }
  .code { padding: 16px; font-size: 12px; }

  /* Timeline */
  .timeline { padding-left: 20px; }
  .timeline__card { padding: 20px; }
  .timeline__head h3 { font-size: 19px; }
  .timeline__co { font-size: 11px; }

  /* Channels */
  .channels { grid-template-columns: 1fr; gap: 14px; }
  .channel, .channel--lg {
    grid-column: span 1;
    min-height: 180px;
    padding: 22px;
  }
  .channel--lg { min-height: 220px; }
  .channel__num { font-size: 64px; }
  .channel__body h3 { font-size: 20px; }
  .channel--lg .channel__body h3 { font-size: 24px; }
  .channel__body p { font-size: 14px; }

  /* Stack */
  .eq { height: 60px; padding-top: 20px; gap: 5px; }

  /* Contact */
  .contact__card { padding: 24px 20px; }
  .contact__row {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 12px 0;
  }
  .contact__label { width: auto; font-size: 10px; }
  .contact__val { font-size: 15px; word-break: break-word; }
  .btn.big { padding: 14px 20px; font-size: 13.5px; width: 100%; justify-content: center; }

  /* Footer */
  .footer {
    padding: 24px 20px;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    font-size: 11.5px;
  }

  /* Marquee — quieter on phones */
  .marquee { padding: 14px 0; }
  .marquee__track { font-size: clamp(22px, 6vw, 36px); gap: 24px; }

  /* Effects — cheaper / less distracting */
  .scanlines { opacity: 0.4; }
  .noise { opacity: 0.03; animation: none; }
}

/* Small phones (iPhone SE, mini, etc.) */
@media (max-width: 420px) {
  .topbar { top: 10px; width: calc(100% - 16px); padding: 6px 8px 6px 10px; }
  .hero { padding: 100px 18px 50px; gap: 32px; }
  .hero__chip { font-size: 10px; letter-spacing: 1.5px; padding: 6px 10px; }
  .hero__title { font-size: clamp(40px, 14vw, 64px); }

  .hero__meta { grid-template-columns: 1fr 1fr; }
  .hero__meta div:nth-child(3) { grid-column: 1 / -1; }

  .hero__cta { width: 100%; }
  .hero__cta .btn { flex: 1; justify-content: center; }

  /* Tighter TV on tiny screens */
  .tv__body { grid-template-columns: 64px 1fr; gap: 6px; }
  .tv__sidebar { font-size: 9px; }
  .tv__sidebar li { padding: 4px 5px; }
  .tv__grid { gap: 6px; }
  .tv-tile__num { font-size: 16px; }
  .tv-tile__title { font-size: 9.5px; }

  /* Even smaller remote */
  .remote { width: 104px; padding: 12px 10px 14px; }
  .remote__btn { font-size: 11px; }
  .remote__key { height: 24px; font-size: 11px; }

  /* Section spacing */
  .section { padding: 70px 18px; }
  .section h2 { font-size: clamp(30px, 10vw, 44px); }
}

/* Coarse-pointer (touch) — kill desktop-only behavior */
@media (hover: none), (pointer: coarse) {
  body { cursor: auto; }
  .cursor { display: none; }
  button, a { cursor: pointer; }
  /* Remove tilt transform on touch (it sticks otherwise) */
  .tilt { transform: none !important; }
  /* Disable channel hover-lift to prevent sticky :hover state on mobile */
  .channel:hover { transform: none; }
}

/* Landscape phones — keep the hero from getting awkwardly tall */
@media (max-height: 560px) and (orientation: landscape) {
  .hero { min-height: 0; padding-top: 100px; padding-bottom: 60px; }
  .tv { width: min(360px, 70%); }
}

/* Very wide screens — keep things from sprawling */
@media (min-width: 1600px) {
  .hero { max-width: 1480px; margin: 0 auto; }
}

/* Safe-area insets (notched iPhones) */
@supports (padding: max(0px)) {
  .topbar {
    padding-left: max(18px, env(safe-area-inset-left));
    padding-right: max(14px, env(safe-area-inset-right));
  }
  .hero,
  .section,
  .footer {
    padding-left: max(20px, env(safe-area-inset-left));
    padding-right: max(20px, env(safe-area-inset-right));
  }
}
