/* ---------- Tokens (dark only) ---------- */
:root {
  --bg: #0f0d12;
  --bg-alt: #0c0a10;
  --surface: #181420;
  --surface-2: #231f2e;
  --text: #efecf6;
  --muted: #9690a8;
  --subtle: #7b7490;
  --border: rgba(220, 210, 255, .08);
  --border-strong: rgba(220, 210, 255, .15);
  --accent: #a78bfa;          /* text, icons and outlines on dark */
  --accent-hover: #c4b5fd;
  --accent-soft: rgba(167, 139, 250, .12);
  --accent-line: rgba(167, 139, 250, .4);
  --btn: #7c3aed;             /* filled buttons (deep enough for white text) */
  --btn-hover: #6d28d9;
  --on-accent: #ffffff;
  --success: #6baf94;
  --live: #eb0400;
  --twitch: #9146ff;
  --youtube: #ff0033;
  --discord: #5865f2;
  --dots: rgba(220, 210, 255, .09);
  --glow-1: rgba(124, 58, 237, .4);
  --glow-2: rgba(192, 38, 211, .22);
  --glow-3: rgba(99, 102, 241, .22);

  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Code", monospace;
  --radius: 14px;
  --radius-sm: 8px;
  --max: 1100px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  scroll-behavior: smooth; scroll-padding-top: 76px;
  touch-action: pan-x pan-y; /* no pinch or double-tap zoom on phones */
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  transition: background-color .3s ease, color .3s ease;
  overflow-x: hidden;
}
::selection { background: var(--btn); color: var(--on-accent); }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: -0.025em; }
em { font-style: normal; color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
svg use { fill: currentColor; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 24px; }

.skip-link {
  position: absolute; left: 16px; top: -48px; z-index: 100;
  background: var(--btn); color: var(--on-accent); padding: 8px 14px; border-radius: var(--radius-sm);
}
.skip-link:focus { top: 12px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s;
}
.site-header.scrolled { border-bottom-color: var(--border); }
.nav { display: flex; align-items: center; gap: 24px; height: 60px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: .95rem; letter-spacing: -0.01em; }
.logo-avatar { width: 30px; height: 30px; border-radius: 50%; transition: transform .4s var(--ease); }
.logo:hover .logo-avatar { transform: rotate(-10deg) scale(1.06); }
.nav-links { display: flex; gap: 2px; list-style: none; margin: 0 0 0 auto; padding: 0; }
.nav-links a {
  display: block; padding: 6px 12px; border-radius: var(--radius-sm);
  color: var(--muted); font-size: .9rem;
  transition: color .2s, background .2s;
}
.nav-links a:hover { color: var(--text); background: var(--surface); }
.nav-links a[aria-current="page"] { color: var(--text); background: var(--surface); }

/* "On this page" section bar (built by site.js from [data-section] elements) */
html.has-subnav { scroll-padding-top: 116px; }
.subnav { border-top: 1px solid var(--border); }
.subnav[hidden] { display: none; }
.subnav-inner {
  display: flex; align-items: center; gap: 2px; height: 42px;
  overflow-x: auto; scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 24px), transparent);
          mask-image: linear-gradient(90deg, #000 calc(100% - 24px), transparent);
}
.subnav-inner::-webkit-scrollbar { display: none; }
.subnav-label { flex-shrink: 0; margin-right: 10px; font: 500 .68rem/1 var(--mono); text-transform: uppercase; letter-spacing: .12em; color: var(--subtle); }
.subnav button {
  flex-shrink: 0; padding: 6px 12px; border: 0; border-radius: 999px; background: none; cursor: pointer;
  font: 500 .82rem/1 var(--sans); color: var(--muted); transition: color .2s, background .2s;
}
.subnav button:hover { color: var(--text); }
.subnav button.active { color: var(--accent); background: var(--accent-soft); }
.subnav button:focus-visible { outline-offset: -2px; }


/* ---------- Hero: profile + links ---------- */
.hero {
  position: relative;
  padding: 40px 0 96px;
  overflow: hidden;
  isolation: isolate;
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -2;
  background-image: radial-gradient(var(--dots) 1px, transparent 1px);
  background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(ellipse 60% 70% at 50% 40%, #000 25%, transparent 75%);
          mask-image: radial-gradient(ellipse 60% 70% at 50% 40%, #000 25%, transparent 75%);
}
.hero-bg { position: absolute; inset: 0; z-index: -1; filter: blur(80px); }
.blob { position: absolute; border-radius: 50%; animation: float 20s ease-in-out infinite alternate; }
.blob-1 { width: 480px; height: 480px; background: var(--glow-1); top: -140px; left: calc(50% + 60px); }
.blob-2 { width: 400px; height: 400px; background: var(--glow-2); top: 220px; left: calc(50% - 460px); animation-duration: 24s; animation-delay: -6s; }
.blob-3 { width: 360px; height: 360px; background: var(--glow-3); bottom: -120px; left: calc(50% + 40px); animation-duration: 28s; animation-delay: -12s; }
@keyframes float {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(-50px, 40px) scale(1.08); }
  100% { transform: translate(30px, -30px) scale(.95); }
}

.profile { width: 100%; max-width: 600px; margin: 0 auto; padding: 0 16px; }

.profile-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 30px 80px -40px rgba(0, 0, 0, .6);
}
.banner { width: 100%; height: auto; aspect-ratio: 1200 / 480; object-fit: cover; object-position: right; }
.profile-body { position: relative; display: flow-root; padding: 0 28px 28px; } /* flow-root stops the avatar's negative margin dragging the badges up onto the banner */
.avatar-wrap {
  position: relative; width: 104px; height: 104px; margin-top: -52px;
  border-radius: 50%; padding: 4px; background: var(--surface);
}
.avatar { width: 96px; height: 96px; border-radius: 50%; }
.is-live .avatar-wrap { background: var(--live); animation: live-ring 2s ease-in-out infinite; }
@keyframes live-ring { 50% { box-shadow: 0 0 0 6px rgba(235, 4, 0, .25); } }

.badges { position: absolute; top: 16px; right: 24px; display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 999px;
  font: 500 .72rem/1.4 var(--mono);
  color: var(--twitch); background: rgba(145, 70, 255, .12);
}
.live-badge {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 4px 10px; border-radius: 999px;
  font: 600 .72rem/1.4 var(--mono); letter-spacing: .04em; text-transform: uppercase;
  color: #fff; background: var(--live);
}
.live-badge[hidden] { display: none; }
.dot { position: relative; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.dot::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: currentColor; animation: ping 1.6s ease-out infinite; }
@keyframes ping { to { transform: scale(2.6); opacity: 0; } }

.profile h1 { font-size: clamp(2rem, 6vw, 2.6rem); line-height: 1.1; letter-spacing: -0.04em; margin: 14px 0 6px; }
.bio { margin: 0; color: var(--muted); font-size: 1.02rem; }

/* Link buttons */
.links { list-style: none; margin: 20px 0 0; padding: 0; display: grid; gap: 12px; }
.link {
  display: flex; align-items: center; gap: 16px;
  padding: 14px 18px 14px 14px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  transition: transform .25s var(--ease), border-color .2s, background .2s, box-shadow .25s;
}
.link:hover { transform: translateY(-2px); border-color: var(--brand, var(--accent-line)); box-shadow: 0 14px 30px -18px var(--brand, var(--accent)); }
.link-icon {
  display: grid; place-items: center; flex-shrink: 0;
  width: 44px; height: 44px; border-radius: 11px;
  background: var(--brand, var(--btn)); color: #fff;
}
.link-icon svg { width: 22px; height: 22px; }
.link-text { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.35; }
.link-text strong { font-weight: 600; }
.link-text small { color: var(--subtle); font: .78rem/1.4 var(--mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.link-arrow { color: var(--subtle); transition: transform .3s var(--ease), color .2s; }
.link:hover .link-arrow { transform: translate(3px, -3px); color: var(--brand, var(--accent)); }
/* --brand is set per link from its platform (src/profile.js) */
.link-icon.is-dark { color: #0b0b0f; }
.link-icon.is-black { background: #000; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14); }
/* Twitch gets the spotlight */
.link-twitch { background: linear-gradient(135deg, rgba(145, 70, 255, .16), var(--surface) 70%); border-color: rgba(145, 70, 255, .3); }
.is-live .link-twitch { border-color: var(--live); background: linear-gradient(135deg, rgba(235, 4, 0, .16), var(--surface) 70%); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 11px 20px; border-radius: var(--radius-sm);
  font: 600 .92rem/1 var(--sans);
  border: 1px solid transparent; cursor: pointer;
  transition: transform .2s var(--ease), background .2s, border-color .2s, color .2s, box-shadow .25s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--btn); color: var(--on-accent); }
.btn-primary:hover { background: var(--btn-hover); box-shadow: 0 10px 30px -12px var(--btn); }
.btn-lg { padding: 15px 26px; font-size: 1rem; }
.btn-icon { width: 18px; height: 18px; }

/* ---------- Sections ---------- */
.section { padding: 104px 0; border-top: 1px solid var(--border); }
.section:nth-of-type(even) { background: var(--bg-alt); }
.section-head {
  display: flex; align-items: baseline; gap: 14px;
  margin-bottom: 44px; padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}
.section-head h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); line-height: 1.1; }
.head-link { margin-left: auto; font-size: .9rem; color: var(--muted); transition: color .2s; }
.head-link:hover { color: var(--accent); }
.section-intro { color: var(--muted); margin: -20px 0 36px; max-width: 60ch; }
.mini-title { font: 500 .72rem/1 var(--mono); text-transform: uppercase; letter-spacing: .14em; color: var(--subtle); margin: 0 0 14px; }
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { padding: 4px 12px; border-radius: 999px; font-size: .82rem; background: var(--accent-soft); color: var(--accent); }

/* Stream */
.stream-grid { display: grid; grid-template-columns: 1.7fr 1fr; gap: 40px; align-items: start; }
.player {
  position: relative; aspect-ratio: 16 / 9;
  border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--border); background: #000;
}
.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.stream-status { display: flex; align-items: center; gap: 10px; margin: 0 0 28px; font-weight: 600; }
.stream-title { margin: -18px 0 28px; color: var(--muted); font-size: .95rem; }
.stream-title[hidden], .games[hidden] { display: none; }
.status-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--subtle); }
.is-live .status-dot { background: var(--live); box-shadow: 0 0 0 4px rgba(235, 4, 0, .2); }
.stream-note { color: var(--muted); margin: 28px 0 18px; font-size: .95rem; }

/* Clips */
.clips { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.clip { display: block; }
.clip-thumb {
  position: relative; aspect-ratio: 16 / 9; overflow: hidden;
  border-radius: 12px; border: 1px solid var(--border); background: #000;
  margin-bottom: 12px;
}
.clip-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease), opacity .3s; }
.clip:hover .clip-thumb img { transform: scale(1.06); opacity: .75; }
.clip-play {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) scale(.8);
  display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%;
  background: rgba(0, 0, 0, .6); color: #fff; opacity: 0;
  transition: opacity .25s, transform .3s var(--ease);
}
.clip-play svg { width: 20px; height: 20px; margin-left: 3px; }
.clip:hover .clip-play { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.clip h3 { font-size: 1rem; line-height: 1.35; letter-spacing: -0.01em; transition: color .2s; }
.clip:hover h3 { color: var(--accent); }
.clip p { margin: 2px 0 0; font: .75rem/1.4 var(--mono); color: var(--subtle); }

/* Projects */
.projects { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.project-link {
  display: flex; flex-direction: column; height: 100%;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden;
  transition: transform .4s var(--ease), box-shadow .4s var(--ease), border-color .3s;
}
.project-link:hover { transform: translateY(-4px); border-color: var(--accent-line); box-shadow: 0 24px 50px -24px rgba(0, 0, 0, .55); }
.thumb { position: relative; aspect-ratio: 16 / 9; overflow: hidden; display: grid; place-items: center; border-bottom: 1px solid var(--border); }
.thumb::before {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,.14) 1px, transparent 1px);
  background-size: 18px 18px;
}
.thumb.has-img::before { display: none; }
.thumb span { position: relative; font-size: clamp(1.4rem, 2.6vw, 1.9rem); font-weight: 700; letter-spacing: -0.03em; color: rgba(255,255,255,.95); transition: transform .6s var(--ease); }
.project-link:hover .thumb span { transform: scale(1.06); }
.thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.project-link:hover .thumb img { transform: scale(1.04); }
.thumb-1 { background: linear-gradient(135deg, #3b1a78, #8b5cf6); }
.thumb-2 { background: linear-gradient(135deg, #5b1466, #c026d3); }
.project-body { padding: 22px 24px 26px; display: flex; flex-direction: column; flex: 1; }
.project-meta { display: flex; gap: 10px; font: .75rem/1.4 var(--mono); color: var(--subtle); margin-bottom: 8px; }
.project-meta span + span::before { content: "·"; margin-right: 10px; }
.project h3 { font-size: 1.3rem; line-height: 1.25; margin-bottom: 8px; display: flex; justify-content: space-between; gap: 12px; }
.arrow { font-weight: 400; color: var(--subtle); transition: transform .35s var(--ease), color .2s; }
.project-link:hover .arrow { transform: translate(3px, -3px); color: var(--accent); }
.project p { color: var(--muted); margin: 0 0 18px; flex: 1; font-size: .95rem; }
.project .project-role { flex: 0; margin: -4px 0 8px; color: var(--accent); font-size: .88rem; font-weight: 500; }
.tags { list-style: none; padding: 0; margin: 0; display: flex; gap: 6px; flex-wrap: wrap; }
.tags li { font-size: .75rem; padding: 2px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); }

/* Contact */
.contact { text-align: center; }
.contact-title { font-size: clamp(2rem, 5vw, 3.6rem); font-weight: 700; line-height: 1.08; letter-spacing: -0.035em; max-width: 18ch; margin: 0 auto 16px; }
.contact-sub { color: var(--muted); margin: 0 0 32px; }
.contact .btn-primary { background: var(--discord); }
.contact .btn-primary:hover { background: #4752c4; box-shadow: 0 10px 30px -12px var(--discord); }

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding: 24px 0; font-size: .85rem; color: var(--subtle); }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.footer-inner p { margin: 0; }
.footer-socials { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; }
.footer-socials a { display: grid; place-items: center; width: 34px; height: 34px; border-radius: var(--radius-sm); color: var(--subtle); transition: color .2s, background .2s; }
.footer-socials a:hover { color: var(--text); background: var(--surface); }
.footer-socials svg { width: 17px; height: 17px; }

/* ---------- Projects page ---------- */
.page-hero { position: relative; padding: 72px 0 56px; overflow: hidden; isolation: isolate; }
.page-hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(500px 300px at 85% 0%, var(--glow-1), transparent 70%),
    radial-gradient(400px 260px at 60% 100%, var(--glow-2), transparent 70%);
  opacity: .7;
}
.page-hero .mini-title { color: var(--accent); }
.page-hero h1 { font-size: clamp(2.6rem, 7vw, 4.4rem); line-height: 1; letter-spacing: -0.045em; margin-bottom: 16px; }
.page-lede { margin: 0; max-width: 52ch; color: var(--muted); font-size: 1.1rem; }
.projects-section { padding-top: 56px; }
.projects-status { margin: 0; padding: 40px 0; color: var(--muted); text-align: center; }
.projects-status[hidden] { display: none; }

/* ---------- Project page ---------- */
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
.btn-ghost:hover { border-color: var(--accent-line); color: var(--accent); }

.pj { padding-top: 28px; padding-bottom: 96px; }
.back-link { display: inline-block; color: var(--muted); font-size: .9rem; margin-bottom: 32px; transition: color .2s; }
.back-link:hover { color: var(--accent); }
.pj-empty { padding: 60px 0; }
.pj-empty h1 { font-size: 2.2rem; margin-bottom: 8px; }
.pj-empty p { color: var(--muted); margin: 0 0 24px; }
.pj-draft {
  margin: 0 0 24px; padding: 10px 14px; border-radius: var(--radius-sm);
  background: var(--accent-soft); color: var(--accent); font: 500 .8rem/1.5 var(--mono);
}

.pj-head { max-width: 780px; margin-bottom: 32px; }
.pj-meta { margin-bottom: 10px; }
.pj-title { font-size: clamp(2.2rem, 6vw, 3.8rem); line-height: 1.05; letter-spacing: -0.04em; margin-bottom: 18px; }
.pj-role { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin: 0 0 12px; }
.pj-role[hidden] { display: none; }
.pj-role .mini-title { margin: 0; }
.pj-role-text { color: var(--accent); font-weight: 600; font-size: 1.05rem; }
.pj-summary { margin: 0; font-size: 1.15rem; color: var(--muted); padding-left: 16px; border-left: 2px solid var(--accent); }

.pj-cover {
  display: block; width: 100%; padding: 0; margin: 0 0 56px; cursor: zoom-in;
  border: 1px solid var(--border); border-radius: 18px; overflow: hidden; background: var(--surface);
}
.pj-cover img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; transition: transform .6s var(--ease); }
.pj-cover:hover img { transform: scale(1.015); }

.pj-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 56px; align-items: start; }
.pj-block { margin-bottom: 52px; }
.pj-block h2 { font-size: 1.5rem; margin-bottom: 20px; padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.contrib-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.contrib-list li {
  position: relative; padding: 14px 16px 14px 46px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
}
.contrib-list li::before {
  content: "✓"; position: absolute; left: 14px; top: 13px;
  display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent); font-size: .72rem; font-weight: 700;
}
.pj-description p { color: var(--muted); margin: 0 0 16px; max-width: 68ch; }
.pj-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.pj-thumb { padding: 0; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; cursor: zoom-in; background: var(--surface); }
.pj-thumb img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; transition: transform .5s var(--ease), opacity .2s; }
.pj-thumb:hover img { transform: scale(1.05); opacity: .85; }

.pj-side { position: sticky; top: 84px; display: grid; gap: 28px; }
.pj-links { display: grid; gap: 10px; }
.pj-links .btn { justify-content: center; padding: 13px 18px; }
.pj-stats { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pj-stats div { padding: 14px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.pj-stats dt { font: .7rem/1.4 var(--mono); color: var(--subtle); text-transform: uppercase; letter-spacing: .08em; }
.pj-stats dd { margin: 4px 0 0; font-size: 1.15rem; font-weight: 700; letter-spacing: -0.02em; }
.pj-stats[hidden], .pj-links[hidden], .pj-tools[hidden], .pj-cover[hidden] { display: none; }

/* Lightbox */
.lightbox {
  width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
  background: rgba(8, 6, 10, .94); color: #fff;
}
.lightbox[open] { display: grid; place-items: center; }
.lightbox::backdrop { background: transparent; }
.lightbox img { max-width: calc(100vw - 120px); max-height: calc(100vh - 100px); border-radius: 10px; object-fit: contain; }
.lb-btn {
  position: fixed; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.15); background: rgba(255,255,255,.06); color: #fff;
  font-size: 1.5rem; line-height: 1; cursor: pointer; transition: background .2s;
}
.lb-btn:hover { background: rgba(255,255,255,.16); }
.lb-close { top: 16px; right: 16px; font-size: 1rem; }
.lb-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 16px; top: 50%; transform: translateY(-50%); }
.lightbox.single .lb-prev, .lightbox.single .lb-next { display: none; }
.lb-count { position: fixed; bottom: 16px; left: 0; right: 0; margin: 0; text-align: center; font: .8rem/1 var(--mono); color: rgba(255,255,255,.6); }

@media (max-width: 900px) {
  .pj-grid { grid-template-columns: 1fr; gap: 8px; }
  .pj-side { position: static; order: -1; margin-bottom: 44px; }
}
@media (max-width: 640px) {
  .pj-cover { margin-bottom: 36px; border-radius: 12px; }
  .pj-gallery { grid-template-columns: 1fr 1fr; gap: 8px; }
  .lightbox img { max-width: 100vw; max-height: calc(100vh - 140px); border-radius: 0; }
  .lb-prev, .lb-next { top: auto; bottom: 16px; transform: none; }
}

/* ---------- Reveal animation (only when JS is on) ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }
.links .reveal:nth-child(1) { transition-delay: .08s; }
.links .reveal:nth-child(2) { transition-delay: .14s; }
.links .reveal:nth-child(3) { transition-delay: .2s; }
.links .reveal:nth-child(4) { transition-delay: .26s; }
.links .reveal:nth-child(5) { transition-delay: .32s; }
.clips .reveal:nth-child(2) { transition-delay: .06s; }
.clips .reveal:nth-child(3) { transition-delay: .12s; }
.clips .reveal:nth-child(4) { transition-delay: .18s; }
/* Headers float in line by line; contact lines follow each other */
.page-hero .reveal:nth-child(2), .pj-head .reveal:nth-child(2), .contact .reveal:nth-child(2) { transition-delay: .08s; }
.page-hero .reveal:nth-child(3), .pj-head .reveal:nth-child(3), .contact .reveal:nth-child(3) { transition-delay: .16s; }
.pj-head .reveal:nth-child(4) { transition-delay: .24s; }
.pj-cover.reveal { transition-delay: .28s; }
.pj-side.reveal { transition-delay: .12s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .stream-grid { grid-template-columns: 1fr; gap: 28px; }
  .clips { grid-template-columns: repeat(2, 1fr); }
  .projects { grid-template-columns: 1fr; }
  .section { padding: 80px 0; }
}
@media (max-width: 640px) {
  .container { padding: 0 16px; }
  .nav { gap: 8px; }
  .subnav-label { display: none; }
  .subnav-inner { height: 40px; }
  .nav-links a { padding: 6px 8px; font-size: .88rem; }
  .hero { padding: 20px 0 72px; }
  .profile { padding: 0 12px; }
  .profile-body { padding: 0 20px 22px; }
  .avatar-wrap { width: 88px; height: 88px; margin-top: -44px; }
  .avatar { width: 80px; height: 80px; }
  .badges { top: 12px; right: 16px; }
  .blob-1 { width: 300px; height: 300px; }
  .blob-2 { width: 260px; height: 260px; left: -120px; }
  .blob-3 { width: 240px; height: 240px; }
  .clips { gap: 16px 12px; }
  .section-head { margin-bottom: 32px; }
}
@media (max-width: 380px) {
  .clips { grid-template-columns: 1fr; }
}
