/* ============================================================
   ruytha.dev home page (index.html only)

   Night sky and frosted glass, pastel pink and baby blue, Japanese
   section names, sticker cards that bounce, and music that runs the
   colours: the glow behind me takes the colours of the album I'm
   playing. Femboy mode turns the sky plum and everything pinker.
   M PLUS Rounded 1c for all of it, English and Japanese.
   ============================================================ */

:root {
  --ground: #070b1f;
  --ink: #eef1ff;
  --muted: #a6aed3;
  --dim: rgba(238, 241, 255, 0.26);
  --glass: rgba(170, 190, 255, 0.07);
  --glass-2: rgba(170, 190, 255, 0.12);
  --edge: rgba(200, 215, 255, 0.14);

  --pink: #ffb3d9;
  --blue: #a8d8ff;
  --lilac: #c9b6ff;
  --mint: #a2f0d2;
  --lemon: #ffe58f;
  --peach: #ffc4a3;
  --on-pastel: #1a1430;

  --hot: var(--pink);          /* the main accent */
  --cool: var(--blue);         /* the second one */
  --np1: var(--pink);          /* album colours, set from the cover art */
  --np2: var(--blue);
  --sky-a: rgba(90, 120, 255, 0.22);
  --sky-b: rgba(255, 140, 200, 0.12);
  --star: rgba(255, 255, 255, 0.55);

  /* one rounded font for everything, English and Japanese */
  --display: "M PLUS Rounded 1c", "Hiragino Maru Gothic ProN", system-ui, sans-serif;
  --sans: "M PLUS Rounded 1c", "Hiragino Maru Gothic ProN", system-ui, sans-serif;
  --ja: "M PLUS Rounded 1c", "Hiragino Maru Gothic ProN", "Yu Gothic", sans-serif;
  --pad: clamp(16px, 4vw, 56px);
  --max: 1320px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --boing: cubic-bezier(0.34, 1.56, 0.64, 1);
}
:root.femboy {
  --ground: #170a1f;
  --muted: #d0b3cf;
  --glass: rgba(255, 170, 215, 0.08);
  --glass-2: rgba(255, 170, 215, 0.14);
  --edge: rgba(255, 190, 225, 0.18);
  --hot: #ff8fc8;
  --cool: #9fd4ff;
  --sky-a: rgba(255, 110, 190, 0.22);
  --sky-b: rgba(140, 200, 255, 0.14);
  --star: rgba(255, 210, 235, 0.6);
}

*, *::before, *::after { box-sizing: border-box; }
html { overflow-x: clip; scroll-behavior: smooth; background: var(--ground); transition: background 0.6s; }
body {
  margin: 0; color: var(--ink);
  font: 17px/1.6 var(--sans); -webkit-font-smoothing: antialiased;
  /* the night sky: two soft glows and a sprinkle of still stars */
  background:
    radial-gradient(60% 40% at 15% -5%, var(--sky-a), transparent 70%),
    radial-gradient(45% 35% at 95% 25%, var(--sky-b), transparent 70%),
    radial-gradient(1.2px 1.2px at 20px 30px, var(--star), transparent 100%),
    radial-gradient(1px 1px at 120px 80px, var(--star), transparent 100%),
    radial-gradient(1.4px 1.4px at 200px 160px, var(--star), transparent 100%),
    radial-gradient(1px 1px at 60px 210px, var(--star), transparent 100%),
    radial-gradient(1px 1px at 260px 40px, var(--star), transparent 100%);
  background-size: 100% 1400px, 100% 1400px, 300px 260px, 300px 260px, 300px 260px, 300px 260px, 300px 260px;
  background-repeat: no-repeat, no-repeat, repeat, repeat, repeat, repeat, repeat;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button, input, textarea { font: inherit; color: inherit; }
::selection { background: var(--hot); color: var(--on-pastel); }
:focus-visible { outline: 2px solid var(--hot); outline-offset: 3px; border-radius: 6px; }
[hidden] { display: none !important; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 50; background: var(--ink); color: var(--ground); padding: 10px 16px; border-radius: 999px; }
.skip:focus { left: 8px; }

/* ---------- shared ---------- */
.glass {
  background: var(--glass);
  border: 1px solid var(--edge);
  -webkit-backdrop-filter: blur(18px) saturate(150%); backdrop-filter: blur(18px) saturate(150%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}
.ja { font-family: var(--ja); font-weight: 800; letter-spacing: 0; }
.h2 {
  display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 18px;
  margin: 0;
  font: 800 clamp(48px, 6.6vw, 100px)/0.95 var(--display); letter-spacing: -0.025em;
}
.h2 .ja {
  display: inline-block; font-size: clamp(16px, 1.6vw, 22px); color: var(--on-pastel);
  background: var(--hot); padding: 6px 14px 7px; border-radius: 999px; rotate: -4deg; translate: 0 -0.4em;
}
.lede { margin: 18px 0 0; max-width: 50ch; font-size: 19px; color: var(--muted); }
.sec { max-width: var(--max); margin: 0 auto; padding: clamp(112px, 12vw, 190px) var(--pad) 0; }
.sec-head { margin-bottom: clamp(36px, 5vw, 60px); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 50px; padding: 6px 26px; border: 0; border-radius: 999px;
  font-weight: 600; font-size: 15.5px; text-decoration: none; cursor: pointer;
  transition: transform 0.35s var(--boing), background 0.25s;
}
.btn:hover { transform: translateY(-3px) rotate(-1.5deg); }
.btn:active { transform: scale(0.96); }
.btn-pop { background: linear-gradient(100deg, var(--hot), var(--cool)); color: var(--on-pastel); }
.btn-glass { background: var(--glass-2); border: 1px solid var(--edge); color: var(--ink); }
.btn-dark { background: #111; color: #efe7da; }
.btn:disabled { opacity: 0.5; cursor: default; transform: none; }
.arrow-link { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; text-decoration: none; }
.arrow-link span { transition: translate 0.25s var(--ease); }
.arrow-link:hover span, a:hover > .arrow-link span { translate: 4px 0; }

/* ---------- top bar (scrolls away with the page) ---------- */
.bar {
  position: absolute; top: 0; left: 0; right: 0; z-index: 10;
  display: flex; align-items: center; gap: 22px;
  max-width: var(--max); margin: 0 auto; padding: 20px var(--pad);
}
/* once you're down the page it waits just above the screen and slides back in when you scroll up */
.bar.float {
  position: fixed; top: 10px; left: 12px; right: 12px; max-width: calc(var(--max) - 24px);
  padding: 10px 18px; border-radius: 22px; border: 1px solid var(--glass-2);
  background: rgba(10, 12, 32, 0.62); -webkit-backdrop-filter: blur(16px) saturate(1.3); backdrop-filter: blur(16px) saturate(1.3);
  box-shadow: 0 18px 40px -24px rgba(0, 0, 0, 0.8);
  translate: 0 calc(-100% - 20px); transition: translate 0.45s var(--ease);
}
.bar.float.shown { translate: none; }
.mark { display: flex; align-items: center; gap: 10px; margin-right: auto; font: 800 22px/1 var(--display); letter-spacing: -0.02em; text-decoration: none; }
.mark img { width: 30px; height: 30px; border-radius: 50%; }
.bar-links { display: flex; gap: 2px; }
.bar-links a { padding: 8px 12px; border-radius: 999px; font-size: 15px; color: var(--muted); text-decoration: none; transition: color 0.2s, background 0.2s; }
.bar-links a:hover { color: var(--ink); background: var(--glass-2); }

/* femboy mode switch */
.fem { display: inline-flex; align-items: center; gap: 10px; padding: 6px 14px 6px 6px; border: 1px solid var(--edge); border-radius: 999px; background: var(--glass); font-size: 14px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.fem-track { position: relative; width: 44px; height: 26px; border-radius: 999px; background: rgba(255, 255, 255, 0.12); transition: background 0.3s; }
.fem-knob { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; display: grid; place-items: center; border-radius: 50%; background: #fff; color: #ff5fa8; font-size: 12px; line-height: 1; transition: translate 0.4s var(--boing); }
.femboy .fem-track { background: linear-gradient(90deg, #ff8fc8, #9fd4ff); }
.femboy .fem-knob { translate: 18px 0; }

/* ============================================================
   Hero
   ============================================================ */
.hero {
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: center;
  gap: clamp(32px, 5vw, 80px);
  max-width: var(--max); margin: 0 auto;
  min-height: clamp(640px, 100svh, 980px);
  padding: 110px var(--pad) 40px;
}
.hi { margin: 0 0 6px; font: 700 clamp(20px, 2vw, 26px) var(--display); color: var(--hot); letter-spacing: -0.01em; }
.hi .ja { margin-right: 6px; }
.name {
  margin: 0; padding-bottom: 0.06em;
  font: 800 clamp(80px, 11.5vw, 178px)/0.9 var(--display); letter-spacing: -0.0325em;
  background: linear-gradient(100deg, var(--ink) 30%, var(--cool) 70%, var(--hot));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.femboy .name { background-image: linear-gradient(100deg, #ff6fb3 0%, #ffb3d9 30%, #fff 50%, #a8d8ff 72%, #5aa9ff 100%); }

/* the synced lyric line: words fill in one after another, like Spicy Lyrics */
.sing { margin: clamp(18px, 2.4vw, 28px) 0 0; min-height: 2.4em; max-width: 20ch; font: 800 clamp(28px, 3.2vw, 44px)/1.15 var(--display); letter-spacing: -0.0175em; }
.sing .w {
  display: inline-block;
  background: linear-gradient(90deg, var(--ink) 0 50%, var(--dim) 50% 100%) 100% 0 / 200% 100% no-repeat;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  transition: background-position var(--dur, 0.35s) linear, translate 0.3s var(--ease), text-shadow 0.3s;
}
.sing .w.on { background-position: 0 0; translate: 0 -2px; text-shadow: 0 0 22px color-mix(in srgb, var(--np1) 45%, transparent); }
.sing.out .w { transition: opacity 0.4s; opacity: 0; }

.meta { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; margin: clamp(18px, 2.4vw, 26px) 0 0; font-size: 15.5px; color: var(--muted); }
.live-dot { width: 9px; height: 9px; border-radius: 50%; background: #6ee7a8; box-shadow: 0 0 10px #6ee7a8; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: clamp(22px, 3vw, 32px); }

.hero-side { display: grid; justify-items: center; gap: 0; }
.me { position: relative; width: clamp(220px, 26vw, 340px); aspect-ratio: 1; }
.me::before {    /* a glow ring in the album's colours */
  content: ""; position: absolute; inset: -14px; border-radius: 50%;
  background: conic-gradient(from 200deg, var(--np1), var(--np2), var(--np1));
  filter: blur(18px); opacity: 0.75; transition: opacity 1s var(--ease);
}
.me img { position: relative; width: 100%; height: 100%; object-fit: cover; border-radius: 50%; border: 3px solid rgba(255, 255, 255, 0.9); transition: transform 0.5s var(--boing); }
.me:hover img { transform: rotate(-4deg) scale(1.03); }
.spark { position: absolute; color: var(--lemon); font-size: 30px; line-height: 1; }
.spark::before { content: "✦"; }
.femboy .spark { color: #ff8fc8; }
.femboy .spark::before { content: "♡"; }
.s1 { top: 2%; right: 4%; }
.s2 { bottom: 14%; left: -6%; font-size: 22px; color: var(--blue); }
.s3 { top: 30%; left: -10%; font-size: 16px; color: var(--pink); }

.np {
  position: relative; z-index: 1; display: flex; align-items: center; gap: 14px;
  width: min(100%, 400px); margin-top: -26px; padding: 10px 18px 10px 10px;
  border-radius: 20px; text-decoration: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 18px 50px -18px color-mix(in srgb, var(--np1) 70%, transparent);
  transition: transform 0.4s var(--boing);
}
.np:hover { transform: translateY(-3px) rotate(-1deg); }
.np-art { flex: none; width: 60px; height: 60px; border-radius: 12px; background: var(--glass-2) center / cover no-repeat; }
.np-text { display: grid; min-width: 0; flex: 1; }
.np-label { font-size: 13px; color: var(--muted); }
.np-track { font-weight: 600; font-size: 15.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.np[data-state="playing"] .np-label { color: var(--np1); }
.np-bars { display: flex; align-items: flex-end; gap: 3px; height: 18px; }
.np-bars i { width: 3px; height: 30%; border-radius: 2px; background: var(--np1); }
.np[data-state="playing"] .np-bars i { animation: eq 0.9s ease-in-out infinite alternate; }
.np-bars i:nth-child(2) { animation-delay: -0.3s !important; }
.np-bars i:nth-child(3) { animation-delay: -0.6s !important; }
.np-bars i:nth-child(4) { animation-delay: -0.15s !important; }
@keyframes eq { from { height: 20%; } to { height: 100%; } }

/* ============================================================
   About
   ============================================================ */
.about { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.polaroid { margin: 0; padding: 14px 14px 18px; background: #fbf7f2; border-radius: 6px; rotate: -3deg; box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.7); transition: rotate 0.5s var(--boing); }
.polaroid:hover { rotate: 1deg; }
.polaroid img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 3px; }
.polaroid figcaption { margin-top: 12px; text-align: center; font: 700 17px var(--display); color: #2b2440; letter-spacing: -0.01em; }
.statement { margin: 26px 0 22px; font: 700 clamp(24px, 2.4vw, 32px)/1.2 var(--display); letter-spacing: -0.015em; }
.about p { margin: 0 0 14px; max-width: 62ch; }
.about strong { color: var(--hot); }
.stickers { list-style: none; margin: 32px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 12px; }
.stickers li {
  display: grid; padding: 12px 18px 13px; border-radius: 18px; color: var(--on-pastel);
  rotate: var(--t, -2deg); transition: rotate 0.4s var(--boing), scale 0.4s var(--boing);
}
.stickers li:hover { rotate: 0deg; scale: 1.08; }
.stickers b { font: 800 21px/1.1 var(--display); letter-spacing: -0.0175em; }
.stickers span { font-size: 13.5px; opacity: 0.75; }
.stickers li:nth-child(6n+1), .skill-grid li:nth-child(6n+1) { background: var(--pink); --t: -2deg; }
.stickers li:nth-child(6n+2), .skill-grid li:nth-child(6n+2) { background: var(--blue); --t: 1.5deg; }
.stickers li:nth-child(6n+3), .skill-grid li:nth-child(6n+3) { background: var(--lemon); --t: -1deg; }
.stickers li:nth-child(6n+4), .skill-grid li:nth-child(6n+4) { background: var(--mint); --t: 2deg; }
.stickers li:nth-child(6n+5), .skill-grid li:nth-child(6n+5) { background: var(--lilac); --t: -2.5deg; }
.stickers li:nth-child(6n+6), .skill-grid li:nth-child(6n+6) { background: var(--peach); --t: 1deg; }

/* ============================================================
   What I do: a wall of sticker cards
   ============================================================ */
.about-skills { grid-column: 1 / -1; margin-top: clamp(24px, 3vw, 44px); }
.skill-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.skill-grid li {
  display: grid; align-content: space-between; gap: 18px; min-height: 180px;
  padding: 22px 22px 20px; border-radius: 24px; color: var(--on-pastel);
  rotate: var(--t); transition: rotate 0.45s var(--boing), scale 0.45s var(--boing);
}
.skill-grid li:hover { rotate: 0deg; scale: 1.05; }
.skill-grid b { font: 800 clamp(20px, 2.1vw, 32px)/1 var(--display); letter-spacing: -0.0225em; }
.skill-grid span { font-size: 15px; line-height: 1.45; }

/* ============================================================
   Projects
   ============================================================ */
.proj-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.proj { display: grid; gap: 16px; align-content: start; padding: 12px 12px 22px; border-radius: 22px; transition: transform 0.45s var(--boing), background 0.25s; }
.proj:hover { transform: translateY(-4px) rotate(-0.6deg); background: var(--glass-2); }
.proj img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 14px; }
.proj-body { padding: 0 8px; }
.proj h3 { margin: 6px 0; font: 800 clamp(22px, 2.2vw, 28px)/1.05 var(--display); letter-spacing: -0.0175em; }
.proj-body p { margin: 0; font-size: 15px; color: var(--muted); }
.proj-body a { color: var(--ink); }
.status { display: inline-flex !important; align-items: center; gap: 7px; padding: 4px 11px; border-radius: 999px; background: var(--glass-2); font-size: 13px !important; font-weight: 600; color: var(--muted) !important; }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status-soon { background: var(--pink); color: var(--on-pastel) !important; }
.status-on { background: var(--mint); color: var(--on-pastel) !important; }

/* ============================================================
   Ruytha Studios: the studio's own cream band and type
   ============================================================ */
.studios { margin-top: clamp(112px, 12vw, 190px); background: #efe7da; color: #111; }
.studios-in {
  max-width: var(--max); margin: 0 auto; padding: clamp(80px, 10vw, 140px) var(--pad);
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(36px, 6vw, 88px); align-items: center;
}
.studios-lockup {
  display: flex; align-items: center; gap: 0.18em; margin: 0;
  font: 900 clamp(60px, 7.6vw, 116px)/1 "Archivo", sans-serif; font-stretch: 112%; letter-spacing: -0.025em;
}
.studio-glyph {
  display: inline-block; width: 0.86em; height: 0.86em; flex-shrink: 0; background: currentColor;
  -webkit-mask: url(img/studios/logo.svg) center / contain no-repeat; mask: url(img/studios/logo.svg) center / contain no-repeat;
}
.studios-lede { margin: 22px 0 0; max-width: 42ch; font-size: 19px; color: #3d3a36; }
.studios-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 22px; margin-top: 32px; }
.studios-apps { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.studios-apps a { display: grid; gap: 2px; padding: 18px 22px; border-radius: 14px; background: #e4dbcc; text-decoration: none; transition: background 0.25s, padding 0.3s var(--ease); }
.studios-apps a:hover { background: #d9cfbe; padding-left: 30px; }
.studios-apps b { font: 900 26px/1.1 "Archivo", sans-serif; font-stretch: 112%; letter-spacing: -0.02em; }
.studios-apps span { font-size: 15px; color: #4a463f; }
/* the app rows slide in from the right, one after another */
.rise-on .studios-apps [data-rise]:not(.risen) { translate: 48px 0; }

/* As you scroll in, the cream band opens out from a rounded card to full width and the logo spins into place.
   Tied to the scroll position, so it plays forwards and backwards with you (Chrome, Edge, Vivaldi; others just show it). */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .studios { animation: studios-open linear both; animation-timeline: view(); animation-range: entry 0% entry 90%; }
    @keyframes studios-open {
      from { clip-path: inset(0 clamp(16px, 8vw, 120px) round 48px); }
      to { clip-path: inset(0 0 round 0); }
    }
    .studio-glyph { animation: studios-glyph linear both; animation-timeline: view(); animation-range: entry 20% cover 45%; }
    @keyframes studios-glyph { from { rotate: -160deg; scale: 0.4; } }
  }
}

/* ============================================================
   Music: the recently played list set like a lyric sheet
   ============================================================ */
.listen-grid { display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: clamp(32px, 5vw, 72px); align-items: start; }
.sheet { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.sheet a { display: block; padding: 4px 0; text-decoration: none; }
.sheet .line {
  display: block; font: 800 clamp(26px, 3.2vw, 46px)/1.08 var(--display); letter-spacing: -0.0225em;
  color: var(--dim); transition: color 0.3s, translate 0.4s var(--boing);
  overflow-wrap: anywhere;
}
.sheet .by { display: block; margin-top: 2px; font-size: 14px; color: var(--muted); opacity: 0; max-height: 0; transition: opacity 0.3s, max-height 0.3s; }
.sheet li:first-child .line {
  background: linear-gradient(100deg, var(--np1), var(--np2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.sheet li:first-child .by, .sheet a:hover .by, .sheet a:focus-visible .by { opacity: 1; max-height: 2em; }
.sheet a:hover .line { color: var(--ink); translate: 8px 0; }
.sheet .sk { height: 48px; border-radius: 12px; background: var(--glass); }

.week { padding: 26px; border-radius: 26px; }
.week-num { margin: 0; font: 800 clamp(84px, 9vw, 140px)/0.85 var(--display); letter-spacing: -0.03em; color: var(--hot); }
.week-cap { margin: 10px 0 0; color: var(--muted); }
.artists { list-style: none; margin: 26px 0 0; padding: 0; display: grid; gap: 11px; }
.artists li { display: grid; grid-template-columns: minmax(0, 7.5em) minmax(0, 1fr) 2em; align-items: center; gap: 12px; font-size: 15px; }
.artists a { text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.artists a:hover { color: var(--hot); }
.artists i { display: block; height: 10px; border-radius: 999px; background: linear-gradient(90deg, var(--hot), var(--cool)); }
.artists b { font-weight: 500; text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }

.feature { position: relative; display: block; margin-top: clamp(56px, 7vw, 100px); border-radius: 28px; overflow: hidden; text-decoration: none; }
.feature img { width: 100%; aspect-ratio: 21 / 9; object-fit: cover; object-position: 50% 30%; transition: transform 1.2s var(--ease); }
.feature:hover img { transform: scale(1.03); }
.feature-text {
  position: absolute; left: clamp(16px, 3vw, 36px); bottom: clamp(16px, 3vw, 36px);
  display: grid; gap: 4px; max-width: min(520px, calc(100% - 32px));
  padding: 22px 26px 24px; border-radius: 22px;
  background: rgba(10, 12, 30, 0.45);
}
.feature-kicker { font-size: 14px; color: var(--hot); font-weight: 600; }
.feature-title { font: 800 clamp(40px, 4.6vw, 68px)/0.95 var(--display); letter-spacing: -0.0275em; }
.feature-sub { font-size: 16px; }
/* Japanese name for each nav link, shown on hover */
.bar nav a[data-ja] { position: relative; }
.bar nav a[data-ja]::after {
  content: attr(data-ja); position: absolute; left: 50%; top: calc(100% + 6px); transform: translate(-50%, -4px);
  padding: 3px 9px; border-radius: 999px; background: var(--pink); color: var(--on-pastel);
  font: 700 12px/1.4 var(--ja); letter-spacing: 0; white-space: nowrap; pointer-events: none;
  opacity: 0; transition: opacity .2s, transform .2s var(--boing);
}
.bar nav a[data-ja]:hover::after, .bar nav a[data-ja]:focus-visible::after { opacity: 1; transform: translate(-50%, 0); }
/* vertical welcome beside the avatar */
.hero-side { position: relative; }
.tate {
  position: absolute; top: 0; right: 0; margin: 0; writing-mode: vertical-rl;
  font: 800 clamp(18px, 1.6vw, 24px)/1 var(--ja); letter-spacing: 0.3em; color: var(--pink); opacity: 0.75;
}
.h3 { margin: 0 0 20px; font: 800 clamp(22px, 2.2vw, 28px)/1.15 var(--display); letter-spacing: -0.0175em; }
.h3 .ja { margin-left: 8px; font-size: 0.7em; color: var(--pink); white-space: nowrap; }
.btn span[lang="ja"] { white-space: nowrap; }
.bye-en span[lang] { white-space: nowrap; font-family: var(--ja); font-weight: 700; color: var(--pink); }
.feature-desc { margin: 6px 0 4px; font-size: 15px; line-height: 1.55; color: rgba(255, 255, 255, 0.86); }
.feature-desc i { font-style: normal; font-weight: 700; color: #fff; }
.feature .arrow-link { margin-top: 8px; color: var(--cool); }


/* more music: albums on repeat, the week's chart, all-time stickers */
.music-more { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(28px, 4vw, 64px); margin-top: clamp(48px, 6vw, 80px); align-items: start; }
.album-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px 16px; }
.album a { display: block; text-decoration: none; }
.album .cover {
  display: grid; place-items: end start; aspect-ratio: 1; padding: 12px; border-radius: 18px; overflow: hidden;
  background: var(--tc, var(--pink)) center / cover no-repeat; color: var(--on-pastel);
  font: 800 18px/1.1 var(--display); letter-spacing: -0.01em; overflow-wrap: anywhere;
  rotate: var(--t, 0deg); transition: rotate 0.45s var(--boing), scale 0.45s var(--boing);
  box-shadow: 0 18px 30px -18px rgba(0, 0, 0, 0.7);
}
.album a:hover .cover { rotate: 0deg; scale: 1.05; }
.album:nth-child(odd) { --t: -2deg; }
.album:nth-child(even) { --t: 1.5deg; }
.album b { display: block; margin-top: 10px; font-size: 15px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.album span { display: block; font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top-songs { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; counter-reset: song; }
.top-songs a { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px 14px 10px 10px; border-radius: 16px; text-decoration: none; transition: background 0.25s, transform 0.4s var(--boing); }
.top-songs a:hover { background: var(--glass-2); transform: translateX(4px); }
.top-songs li { counter-increment: song; }
.top-songs a::before {
  content: counter(song); display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  font: 800 15px var(--display); color: var(--on-pastel); background: var(--blue);
}
.top-songs li:first-child a::before { background: var(--lemon); }
.top-songs li:nth-child(2) a::before { background: var(--pink); }
.top-songs .t { display: grid; min-width: 0; }
.top-songs .t b, .top-songs .t span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top-songs .t b { font-weight: 700; font-size: 16px; }
.top-songs .t span { font-size: 13.5px; color: var(--muted); }
.top-songs .n { font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }
.stat-stickers { list-style: none; margin: 28px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.stat-stickers li { display: grid; padding: 10px 16px 11px; border-radius: 16px; color: var(--on-pastel); rotate: var(--t); transition: rotate 0.4s var(--boing), scale 0.4s var(--boing); }
.stat-stickers li:hover { rotate: 0deg; scale: 1.07; }
.stat-stickers b { font: 800 22px/1.1 var(--display); }
.stat-stickers span { font-size: 13px; opacity: 0.75; }
.stat-stickers li:nth-child(1) { background: var(--lilac); --t: -2deg; }
.stat-stickers li:nth-child(2) { background: var(--mint); --t: 1.5deg; }
.stat-stickers li:nth-child(3) { background: var(--peach); --t: -1deg; }
.stat-stickers li:nth-child(4) { background: var(--blue); --t: 2deg; }

/* ============================================================
   Favourites
   ============================================================ */
.fav-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.filters { display: flex; gap: 6px; flex-wrap: wrap; }
.filters button { height: 42px; padding: 0 18px; border: 1px solid var(--edge); border-radius: 999px; background: var(--glass); color: var(--muted); font-size: 14.5px; font-weight: 600; cursor: pointer; transition: background 0.2s, color 0.2s, transform 0.35s var(--boing); }
.filters button:hover { color: var(--ink); transform: translateY(-2px); }
.filters button[aria-pressed="true"] { background: var(--hot); border-color: transparent; color: var(--on-pastel); }
.posters { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 30px 18px; }
.poster { position: relative; }
.poster img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 16px; background: var(--glass); transition: transform 0.45s var(--boing), box-shadow 0.3s; }
.poster:hover img, .poster-btn:focus-visible img { transform: translateY(-6px) rotate(var(--r, -2deg)) scale(1.03); box-shadow: 0 24px 40px -20px color-mix(in srgb, var(--hot) 60%, transparent); }
.poster:nth-child(even) { --r: 2deg; }
.poster b { display: block; margin-top: 12px; font-size: 14.5px; font-weight: 600; line-height: 1.3; }
.poster span { display: block; margin-top: 2px; font-size: 13px; color: var(--muted); }
.poster .top { position: absolute; top: -8px; right: -6px; margin: 0; padding: 4px 10px; border-radius: 999px; background: var(--lemon); color: var(--on-pastel); font-weight: 700; font-size: 12.5px; rotate: 8deg; }

/* ============================================================
   Guestbook: pastel notes on the wall
   ============================================================ */
.gb { display: grid; grid-template-columns: minmax(300px, 4fr) minmax(0, 8fr); gap: clamp(28px, 4vw, 64px); align-items: start; }
.gb-form { display: grid; gap: 16px; padding: clamp(20px, 2.4vw, 28px); border-radius: 26px; }
.gb-form .btn { padding-inline: 16px; }
.gb-form label > span { display: flex; justify-content: space-between; margin-bottom: 6px; font-size: 14px; color: var(--muted); }
.gb-form em { font-style: normal; font-variant-numeric: tabular-nums; }
.gb-form input, .gb-form textarea { width: 100%; padding: 12px 14px; border: 1px solid var(--edge); border-radius: 14px; background: rgba(0, 0, 0, 0.25); resize: vertical; }
.gb-form input:focus, .gb-form textarea:focus { outline: 2px solid var(--hot); outline-offset: 0; }
.gb-hp { position: absolute; left: -9999px; }
.gb-status { margin: 0; min-height: 1.5em; font-size: 14.5px; color: var(--muted); }
.gb-status.is-ok { color: var(--mint); }
.gb-status.is-err { color: #ff9a8f; }
.gb-wall { list-style: none; margin: 0; padding: 0; columns: 3 220px; column-gap: 16px; }
.gb-wall li.note {
  break-inside: avoid; margin: 0 0 16px; padding: 18px 18px 16px; border-radius: 18px;
  background: var(--nc); color: var(--on-pastel);
  rotate: var(--tilt); transition: rotate 0.45s var(--boing), scale 0.45s var(--boing);
}
.gb-wall li.note:hover { rotate: 0deg; scale: 1.04; }
.note p { margin: 0; font: 700 18px/1.25 var(--display); letter-spacing: -0.01em; overflow-wrap: anywhere; }
.note .who { display: flex; justify-content: space-between; gap: 10px; margin-top: 12px; font-size: 13px; opacity: 0.75; }
.note .who b { opacity: 1; font-weight: 700; }
.gb-wall .gb-empty { color: var(--muted); }
.gb-more { background: var(--glass-2); color: var(--ink); border: 1px solid var(--edge); }

/* ============================================================
   Find me
   ============================================================ */
.link-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
.link-wide { grid-column: 1 / -1; }
.meta a { text-decoration-color: var(--dim); text-underline-offset: 3px; }
.meta a:hover { color: var(--ink); }
.link-list a { display: flex; align-items: baseline; gap: 14px; padding: 22px 26px; border-radius: 22px; text-decoration: none; transition: transform 0.4s var(--boing), background 0.25s; }
.link-list a::after { content: "→"; margin-left: auto; font-size: 22px; color: var(--muted); transition: translate 0.25s var(--ease), color 0.25s; }
.link-list a:hover { transform: translateY(-3px) rotate(-0.8deg); background: var(--glass-2); }
.link-list a:hover::after { translate: 5px 0; color: var(--hot); }
.link-list b { font: 800 clamp(26px, 2.4vw, 34px)/1 var(--display); letter-spacing: -0.0225em; }
.link-list span { font-size: 15px; color: var(--muted); }

/* ============================================================
   Footer
   ============================================================ */
.end { margin-top: clamp(64px, 8vw, 120px); padding: 0 var(--pad) 40px; text-align: center; overflow: hidden; }
/* full-width banner; its black wave is keyed out so the night sky shows through */
.end-banner {
  display: block; width: calc(100% + 2 * var(--pad)); max-width: none; height: auto; margin: 0 calc(-1 * var(--pad));
  /* soft on every side that meets the sky: a long fade at the top, feathered left and right edges */
  -webkit-mask-image: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.35) 14%, #000 34%), linear-gradient(to right, transparent, #000 12%, #000 88%, transparent);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.35) 14%, #000 34%), linear-gradient(to right, transparent, #000 12%, #000 88%, transparent);
  mask-composite: intersect;
  /* a touch darker and cooler so the daylight photo sits in the night sky */
  filter: brightness(0.82) saturate(0.85) hue-rotate(-6deg);
}
.end-banner + .bye { position: relative; margin-top: -7vw; }
.bye {
  margin: 0; padding: 0.08em 0 0; border: 0; background: none; cursor: pointer;
  font: 800 clamp(60px, 15vw, 240px)/1 var(--ja); letter-spacing: -0.01em; color: var(--lilac);
}
.bye i { display: inline-block; font-style: normal; transition: translate 0.35s var(--boing), rotate 0.35s var(--boing); }
.bye i:nth-child(1) { color: var(--hot); }
.bye i:nth-child(2) { color: #e9b8f2; }
.bye i:nth-child(3) { color: var(--lilac); }
.bye i:nth-child(4) { color: #b8c8ff; }
.bye i:nth-child(5) { color: var(--cool); }
.bye i:hover { translate: 0 -0.12em; rotate: -6deg; }
.bye.wave i { animation: hop 0.6s var(--boing) calc(var(--n) * 70ms) both; }
@keyframes hop { 40% { translate: 0 -0.22em; rotate: 8deg; } }
.bye-hint { margin: 10px 0 0; font-size: 14px; color: var(--muted); opacity: 0.7; }
.petal { position: absolute; top: -40px; color: #ffc4e1; animation: fall var(--t) linear forwards; }
@keyframes fall {
  25% { translate: calc(var(--sway) * 1) 25vh; rotate: 90deg; }
  50% { translate: calc(var(--sway) * -1) 50vh; rotate: 180deg; }
  75% { translate: var(--sway) 75vh; rotate: 270deg; }
  to { translate: 0 calc(100vh + 60px); rotate: 360deg; opacity: 0.6; }
}
.bye-en { margin: 4px 0 0; font: 700 clamp(20px, 2vw, 26px) var(--display); color: var(--muted); letter-spacing: -0.01em; }
.end-row { max-width: calc(var(--max) - 2 * var(--pad)); margin: 64px auto 0; display: flex; justify-content: space-between; align-items: center; gap: 16px 32px; flex-wrap: wrap; text-align: left; }
.end-links { display: flex; flex-wrap: wrap; gap: 6px 22px; font-size: 14.5px; }
.end-links a { color: var(--muted); text-decoration: none; }
.end-links a:hover { color: var(--ink); }
.end-copy { margin: 0; font-size: 14.5px; color: var(--muted); }


/* ============================================================
   Showreel: my clips, plus the latest from YouTube
   ============================================================ */
/* one feature clip on the left, the other four in a 2x2 beside it */
.clips { display: grid; grid-template-columns: minmax(0, 2fr) repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(2, clamp(150px, 15vw, 230px)); gap: 12px; }
.clip { position: relative; margin: 0; border-radius: 22px; overflow: hidden; background: var(--glass); transition: transform 0.45s var(--boing); }
.clip:hover { transform: translateY(-4px) rotate(-0.5deg); }
.clip video { width: 100%; height: 100%; object-fit: cover; display: block; }
.clip-wide { grid-row: 1 / -1; }
.clip-tall video { object-position: 50% 30%; }
.clip figcaption {
  position: absolute; left: 10px; bottom: 10px; display: grid; gap: 1px;
  max-width: calc(100% - 20px); padding: 7px 12px 8px; border-radius: 12px;
  background: rgba(10, 12, 30, 0.55);
}
.clip figcaption b { font: 800 15px/1.15 var(--display); letter-spacing: -0.01em; }
.clip figcaption span { font-size: 12.5px; color: var(--muted); }
.clip-wide figcaption { left: 14px; bottom: 14px; padding: 10px 16px 11px; border-radius: 14px; }
.clip-wide figcaption b { font-size: clamp(18px, 1.8vw, 24px); }
.clip-wide figcaption span { font-size: 13.5px; }

.yt { margin-top: clamp(28px, 3.5vw, 44px); }
.yt-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 12px; }
.yt-head .h3 { margin: 0; }
.yt-head .arrow-link { color: var(--hot); }
.yt-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
/* side-by-side cards: thumbnail on the left, title and date on the right */
.yt-card {
  position: relative; display: grid; grid-template-columns: 46% minmax(0, 1fr); grid-template-rows: 1fr 1fr; column-gap: 14px; row-gap: 4px;
  width: 100%; padding: 10px; border-radius: 20px;
  text-align: left; cursor: pointer; color: var(--ink); transition: transform 0.45s var(--boing);
}
.yt-card:hover { transform: translateY(-4px) rotate(-0.6deg); }
.yt-card img { grid-row: 1 / -1; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 12px; }
.yt-card b { grid-column: 2; align-self: end; font: 800 clamp(15px, 1.4vw, 18px)/1.2 var(--display); letter-spacing: -0.0125em; }
.yt-card > span:last-child { grid-column: 2; align-self: start; font-size: 13px; color: var(--muted); }
.yt-play {
  position: absolute; top: 50%; left: calc(10px + (100% - 20px) * 0.23); translate: -50% -50%;
  width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%;
  background: linear-gradient(100deg, var(--hot), var(--cool)); color: var(--on-pastel); font-size: 16px; padding-left: 3px;
  transition: scale 0.4s var(--boing);
}
.yt-card:hover .yt-play { scale: 1.12; }
.yt-frame { width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 22px; display: block; background: #000; }

/* ============================================================
   From the blog
   ============================================================ */
.posts .lede .arrow-link { color: var(--hot); margin-left: 6px; }
.post-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.post-list a { display: grid; gap: 6px; height: 100%; padding: 10px 10px 18px; border-radius: 22px; text-decoration: none; transition: transform 0.45s var(--boing), background 0.25s; }
.post-list a:hover { transform: translateY(-4px) rotate(-0.6deg); background: var(--glass-2); }
.post-list img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 14px; margin-bottom: 6px; }
.post-list .when { padding: 0 6px; font-size: 13px; color: var(--hot); font-weight: 600; }
.post-list b { padding: 0 6px; font: 800 22px/1.15 var(--display); letter-spacing: -0.0175em; }
.post-list p { margin: 0; padding: 0 6px; font-size: 15px; color: var(--muted); }

/* ============================================================
   Favourites popup
   ============================================================ */
.poster-btn { display: block; width: 100%; padding: 0; border: 0; background: none; text-align: left; cursor: pointer; color: inherit; }
.fav-pop {
  width: min(860px, calc(100vw - 32px)); max-height: calc(100vh - 48px); padding: 0; border-radius: 28px;
  color: var(--ink); background: color-mix(in srgb, var(--ground) 82%, transparent);
  overflow: auto;
}
.fav-pop::backdrop { background: rgba(4, 6, 20, 0.6); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.fav-pop[open] { animation: pop-in 0.45s var(--boing); }
@keyframes pop-in { from { opacity: 0; scale: 0.92; translate: 0 20px; } }
.fav-pop-in { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.3fr); gap: 28px; padding: 26px; }
.fav-pop-in img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 18px; rotate: -2deg; }
.fav-kind { margin: 4px 0 0; font-size: 13.5px; font-weight: 700; color: var(--hot); }
.fav-pop h3 { margin: 6px 0 0; font: 800 clamp(30px, 3.4vw, 44px)/1 var(--display); letter-spacing: -0.0225em; }
.fav-sub { margin: 6px 0 0; color: var(--muted); }
.fav-sub:empty { display: none; }
.fav-tags { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.fav-tags li { padding: 4px 11px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--on-pastel); background: var(--blue); }
.fav-tags li:nth-child(2n) { background: var(--pink); }
.fav-tags li:nth-child(3n) { background: var(--lemon); }
.fav-body p { margin: 16px 0 0; font-size: 16px; line-height: 1.6; }
.fav-facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 18px 0 0; font-size: 14.5px; }
.fav-facts dt { color: var(--muted); }
.fav-facts dd { margin: 0; }
.fav-close {
  position: absolute; top: 14px; right: 14px; width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--edge); background: var(--glass-2); color: var(--ink); font-size: 22px; line-height: 1; cursor: pointer;
  transition: rotate 0.4s var(--boing);
}
.fav-close:hover { rotate: 90deg; }

/* hearts that burst out when femboy mode turns on */
.hearts { position: fixed; inset: 0; pointer-events: none; z-index: 60; overflow: hidden; }
.heart { position: absolute; color: #ff8fc8; animation: burst 1.3s var(--ease) forwards; }
@keyframes burst { to { translate: var(--dx) var(--dy); opacity: 0; rotate: var(--rot); } }

/* ============================================================
   Motion: parts of each section rise in once (site.js adds .rise-on;
   without it everything simply shows)
   ============================================================ */
.rise-on [data-rise] {
  opacity: 0; translate: 0 28px;
  /* keep the hover wiggles (transform, rotate, background) or this list would switch them off */
  transition: opacity 0.8s var(--ease) var(--d, 0ms), translate 0.8s var(--ease) var(--d, 0ms),
              transform 0.45s var(--boing), rotate 0.5s var(--boing), background 0.25s;
}
.rise-on [data-rise].risen { opacity: 1; translate: none; }
@media (prefers-reduced-motion: no-preference) {
  .hero-text, .hero-side { animation: up 1s var(--ease) both; }
  .hero-side { animation-delay: 0.15s; }
  @keyframes up { from { opacity: 0; translate: 0 30px; } }
  .spark { animation: twinkle 2.6s ease-in-out infinite; }
  .s2 { animation-delay: -0.9s; }
  .s3 { animation-delay: -1.7s; }
  @keyframes twinkle { 50% { scale: 0.6; opacity: 0.5; rotate: 20deg; } }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .np-bars i { animation: none !important; }
  .heart { display: none; }
}

/* ============================================================
   Smaller screens
   ============================================================ */
@media (max-width: 1100px) {
  .posters { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .bar { flex-wrap: wrap; row-gap: 10px; }
  .bar-links { order: 3; width: 100%; overflow-x: auto; scrollbar-width: none; margin: 0 calc(var(--pad) * -1); padding: 0 var(--pad); }
  .bar-links::-webkit-scrollbar { display: none; }
  .bar-links a { white-space: nowrap; }
  .bar.float { padding: 10px 14px 8px; overflow: hidden; }
  .bar.float .bar-links { margin: 0 -14px; padding: 0 14px; }
  /* one column: me first, then the name, then what's playing; nothing waits for a scroll here */
  .hero { grid-template-columns: 1fr; gap: 26px; padding-top: 140px; min-height: 0; }
  .hero-side { display: contents; }
  .me { order: -1; width: clamp(120px, 34vw, 180px); }
  .np { order: 2; width: min(100%, 440px); margin-top: 6px; }
  .tate { display: none; }
  .about, .listen-grid, .gb, .studios-in { grid-template-columns: 1fr; }
  .polaroid { max-width: 320px; }
  .proj-grid { grid-template-columns: 1fr; }
  .proj { grid-template-columns: 150px minmax(0, 1fr); align-items: center; padding: 12px; }
  .proj img { aspect-ratio: 4 / 3; }
  .proj-body { padding: 0; }
  .skill-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gb-wall { columns: 2 200px; }
}
@media (max-width: 640px) {
  body { font-size: 16.5px; }
  .name { font-size: 20vw; }
  .fem { padding-right: 10px; font-size: 0; gap: 0; }
  .proj { grid-template-columns: 110px minmax(0, 1fr); }
  .posters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feature img { aspect-ratio: 4 / 3; }
  .link-list { grid-template-columns: 1fr; }
  .link-list a { flex-wrap: wrap; gap: 4px 14px; }
  .gb-wall { columns: 1; }
  .skill-grid li { min-height: 150px; }
}

@media (max-width: 900px) {
  .clips { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: none; grid-auto-rows: auto; }
  .clip { aspect-ratio: 4 / 3; }
  .clip-wide { grid-column: 1 / -1; grid-row: auto; aspect-ratio: 16 / 8; }
  .post-list { grid-template-columns: 1fr 1fr; }
  .fav-pop-in { grid-template-columns: 1fr; }
  .fav-pop-in img { max-width: 220px; }
}
@media (max-width: 640px) {
  .clips { gap: 10px; }
  .clip { aspect-ratio: 1; border-radius: 18px; }
  .clip-wide { aspect-ratio: 16 / 10; }
  .clip:not(.clip-wide) figcaption { left: 8px; bottom: 8px; max-width: calc(100% - 16px); padding: 6px 10px 7px; }
  .clip:not(.clip-wide) figcaption b { font-size: 14px; }
  .clip:not(.clip-wide) figcaption span { display: none; }
  .yt-list, .post-list { grid-template-columns: 1fr; }
}

@media (max-width: 900px) { .music-more { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .album-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .tate { display: none; } }
@media (max-width: 1240px) {   /* below this the card would cover his face, so it sits under the photo */
  .feature { background: rgba(10, 12, 30, 0.6); }
  .feature-text { position: static; max-width: none; border-radius: 0; background: none; }
}
@media (max-width: 640px) {
  .end-banner { height: 240px; object-fit: cover; object-position: 88% 50%; }
  .end-banner + .bye { margin-top: -40px; }
}

/* ============================================================
   Layout, second take: same night sky, glass and stickers, arranged differently.
   The first screen keeps its split: words on the left, my photo on the right. Each section title sits in a column on
   the left and stays in view while its content scrolls past on the right, and
   About is flipped so the photo is on the right.
   ============================================================ */
.hero { position: relative; }

/* About, flipped: words on the left, photo on the right */
@media (min-width: 901px) {
  .about { grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); }
  .about > .polaroid { grid-column: 2; grid-row: 1; rotate: 3deg; }
  .about > .polaroid:hover { rotate: -1deg; }
  .about > .polaroid + div { grid-column: 1; grid-row: 1; }
}

/* the Tame Impala card always sits under the photo now, never over his face */
.feature { background: rgba(10, 12, 30, 0.6); }
.feature-text { position: static; max-width: none; border-radius: 0; background: none; }
@media (min-width: 641px) { .link-list span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } }

/* title on the left, content on the right */
@media (min-width: 1101px) {
  .sec:not(.about) { display: grid; grid-template-columns: 330px minmax(0, 1fr); column-gap: clamp(36px, 4vw, 64px); align-items: start; }
  .sec:not(.about) > * { grid-column: 2; min-width: 0; }
  .sec:not(.about) > .sec-head { grid-column: 1; grid-row: 1 / span 4; position: sticky; top: 96px; margin-bottom: 0; }
  .sec:not(.about) .h2 { font-size: clamp(44px, 4.4vw, 56px); gap: 12px 14px; }
  .sec:not(.about) .h2 .ja { translate: 0 -0.2em; }
  .fav-head { display: grid; gap: 22px; }
  /* the showreel: one wide clip on top, the other four in a row under it */
  .clips { grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-rows: none; }
  .clip { aspect-ratio: 4 / 3; }
  .clip-wide { grid-column: 1 / -1; grid-row: auto; aspect-ratio: 16 / 7; }
  .clip:not(.clip-wide) figcaption { left: 8px; bottom: 8px; max-width: calc(100% - 16px); padding: 6px 10px 7px; }
  .clip:not(.clip-wide) figcaption span { display: none; }
  .yt { margin-top: 12px; }
  .week-num { font-size: clamp(64px, 6vw, 92px); }
  .posters { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .gb { grid-template-columns: minmax(270px, 4fr) minmax(0, 7fr); gap: 28px; }
  .link-list b { font-size: 26px; white-space: nowrap; }
}

/* ============================================================
   The first screen, made special.
   Two soft lights in the colours of the album that is playing drift
   behind everything, shooting stars cross the sky, the letters of
   my name bounce in one by one (and hop when you point at them),
   and my photo spins in. The lights and my photo lean a little
   towards the mouse.
   ============================================================ */
.hero { z-index: 0; }
.hero::before, .hero::after {
  content: ""; position: absolute; z-index: -1; left: 50%; width: min(720px, 80vw); aspect-ratio: 1; border-radius: 50%;
  filter: blur(80px); pointer-events: none; transition: background 1.2s, translate 0.8s var(--ease);
}
.hero::before { top: 2%; background: var(--np1); opacity: 0.13; translate: calc(-82% + var(--px, 0) * -34px) calc(var(--py, 0) * -24px); }
.hero::after { top: 26%; background: var(--np2); opacity: 0.11; translate: calc(-18% + var(--px, 0) * 34px) calc(var(--py, 0) * 24px); }

.sky { position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.sky i {
  position: absolute; top: var(--y); left: var(--x); width: 150px; height: 2px; border-radius: 2px; rotate: 158deg; opacity: 0;
  background: linear-gradient(90deg, transparent, #fff);
}
.sky i:nth-child(1) { --x: 72%; --y: 10%; --t: 9s; --dl: 1.4s; }
.sky i:nth-child(2) { --x: 34%; --y: 5%; --t: 13s; --dl: 5s; }
.sky i:nth-child(3) { --x: 92%; --y: 32%; --t: 17s; --dl: 9s; }

/* my name: each letter its own colour, fading from white through blue to pink */
.name, .femboy .name { background: none; color: var(--ink); cursor: default; }
.name span {
  display: inline-block; color: var(--c, var(--ink));
  text-shadow: 0 0 48px color-mix(in srgb, var(--c, var(--ink)) 32%, transparent);
  transition: translate 0.35s var(--boing), rotate 0.35s var(--boing), color 0.6s;
}
.name span:hover { translate: 0 -0.09em; rotate: -6deg; }
.name span:nth-child(even):hover { rotate: 6deg; }
.name span:nth-child(3) { --c: color-mix(in srgb, var(--ink) 55%, var(--cool)); }
.name span:nth-child(4) { --c: var(--cool); }
.name span:nth-child(5) { --c: color-mix(in srgb, var(--cool), var(--hot)); }
.name span:nth-child(6) { --c: var(--hot); }
.femboy .name span:nth-child(1) { --c: #ff6fb3; }
.femboy .name span:nth-child(2) { --c: #ffb3d9; }
.femboy .name span:nth-child(3) { --c: #fff; }
.femboy .name span:nth-child(4) { --c: #cfe8ff; }
.femboy .name span:nth-child(5) { --c: #8fc8ff; }
.femboy .name span:nth-child(6) { --c: #5aa9ff; }

.me { translate: calc(var(--px, 0) * 10px) calc(var(--py, 0) * 10px); transition: translate 0.8s var(--ease); }

@media (prefers-reduced-motion: no-preference) {
  .hero::before { animation: drift 13s ease-in-out infinite alternate; }
  .hero::after { animation: drift 17s ease-in-out infinite alternate-reverse; }
  @keyframes drift { to { transform: translate(9%, 10%) scale(1.18); } }
  .sky i { animation: shoot var(--t) linear var(--dl) infinite; }
  @keyframes shoot {
    0% { transform: translateX(0); opacity: 0; }
    2% { opacity: 1; }
    8% { transform: translateX(560px); opacity: 0; }
    100% { transform: translateX(560px); opacity: 0; }
  }
  .name span { animation: letter-in 0.9s var(--boing) backwards; }
  .name span:nth-child(1) { animation-delay: 0.2s; }
  .name span:nth-child(2) { animation-delay: 0.28s; }
  .name span:nth-child(3) { animation-delay: 0.36s; }
  .name span:nth-child(4) { animation-delay: 0.44s; }
  .name span:nth-child(5) { animation-delay: 0.52s; }
  .name span:nth-child(6) { animation-delay: 0.6s; }
  @keyframes letter-in { from { opacity: 0; translate: 0 0.5em; rotate: 16deg; scale: 0.4; } }
  .me { animation: me-in 1.1s var(--boing) backwards; }
  @keyframes me-in { from { opacity: 0; scale: 0; rotate: -200deg; } }
}

/* ============================================================
   What I do: the sticker cards ride past on a belt (site.js sets it up;
   without it, or with reduced motion, they stay as the grid)
   ============================================================ */
.skill-belt {
  overflow-x: clip; padding: 18px 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}
.skill-grid.marquee { display: flex; gap: 0; width: max-content; animation: belt 52s linear infinite; }
.skill-grid.marquee li { flex: none; width: 250px; margin-right: 18px; }
.skill-belt:hover .marquee, .skill-belt:focus-within .marquee { animation-play-state: paused; }
@keyframes belt { to { transform: translateX(-50%); } }

/* ============================================================
   Projects: one wide row each, the picture swapping sides
   ============================================================ */
@media (min-width: 1101px) {
  .proj-grid { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .proj { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(20px, 2.6vw, 36px); align-items: center; padding: 14px; }
  .proj:nth-child(even) { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); }
  .proj:nth-child(even) img { order: 2; }
  .proj img { aspect-ratio: 16 / 9; }
  .proj h3 { margin: 10px 0; font-size: clamp(28px, 2.8vw, 38px); }
  .proj-body p { font-size: 16.5px; }
}
/* the belt is far wider than the page; keep it from stretching the column it sits in */
.about > * { min-width: 0; }
.skill-belt { max-width: 100%; }
