/* ───────────────────────── Tokens ───────────────────────── */

:root {
    --bg: #070b16;
    --bg-2: #0d1326;
    --surface: rgba(255, 255, 255, 0.035);
    --surface-hover: rgba(255, 255, 255, 0.07);
    --border: rgba(255, 255, 255, 0.09);
    --border-strong: rgba(255, 255, 255, 0.18);
    --text: #eaf0f9;
    --muted: #93a2bc;
    --accent: #7cc4e0;
    --accent-ink: #061020;
    --grad: linear-gradient(120deg, #a8e6f2 0%, #77b1ce 45%, #4f8cc9 100%);
    --rainbow: conic-gradient(from var(--angle), #5691aa, #f0d212, #f56831, #9722d2, #2a2af2, #31ea18, #5691aa);
    --blob-opacity: 0.5;
    --shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.7);

    --font: "Outfit", system-ui, -apple-system, "Segoe UI", sans-serif;
    --mono: "Share Tech Mono", ui-monospace, "SF Mono", Menlo, monospace;
    --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
    --radius: 22px;
    --max: 1120px;

    color-scheme: dark;
}

:root[data-theme="light"] {
    --bg: #f4f7fc;
    --bg-2: #ffffff;
    --surface: rgba(12, 30, 60, 0.035);
    --surface-hover: rgba(12, 30, 60, 0.065);
    --border: rgba(12, 30, 60, 0.1);
    --border-strong: rgba(12, 30, 60, 0.22);
    --text: #0c1526;
    --muted: #4d5b74;
    --accent: #2a6fa8;
    --accent-ink: #ffffff;
    --grad: linear-gradient(120deg, #3aa3c9 0%, #2f74b5 50%, #1d4c8c 100%);
    --blob-opacity: 0.3;
    --shadow: 0 30px 70px -35px rgba(20, 40, 80, 0.35);

    color-scheme: light;
}

@property --angle {
    syntax: "<angle>";
    initial-value: 0deg;
    inherits: false;
}

/* ───────────────────────── Base ───────────────────────── */

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 1.0625rem;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    transition: background-color 0.4s var(--ease), color 0.4s var(--ease);
}


h1, h2, h3, p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
svg { display: block; }

::selection { background: var(--accent); color: var(--accent-ink); }

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

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb {
    background: var(--border-strong);
    border: 2px solid var(--bg);
    border-radius: 99px;
}
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

.container {
    width: 100%;
    max-width: var(--max);
    margin-inline: auto;
    padding-inline: clamp(1.25rem, 4vw, 2rem);
}

.grad {
    background: var(--grad);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.eyebrow {
    font-family: var(--mono);
    font-size: 0.9rem;
    letter-spacing: 0.08em;
    color: var(--accent);
}

/* ───────────────────────── Nav ───────────────────────── */

.nav {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 50;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: calc(0.9rem + env(safe-area-inset-top, 0px)) clamp(1.25rem, 4vw, 2.5rem) 0.9rem;
    border-bottom: 1px solid transparent;
    transition: background-color 0.3s var(--ease), border-color 0.3s var(--ease), backdrop-filter 0.3s;
}

.nav.is-scrolled {
    background: color-mix(in srgb, var(--bg) 72%, transparent);
    backdrop-filter: blur(16px) saturate(140%);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
    border-bottom-color: var(--border);
}

.nav__brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.nav__logo {
    width: 26px;
    height: 21px;
    color: var(--accent);
}

.nav__links {
    display: flex;
    gap: 0.25rem;
    margin-left: auto;
    padding: 0.3rem;
    border: 1px solid var(--border);
    border-radius: 99px;
    background: var(--surface);
}

.nav__links a {
    padding: 0.4rem 0.95rem;
    border-radius: 99px;
    font-size: 0.92rem;
    color: var(--muted);
    transition: color 0.2s, background-color 0.2s;
}

.nav__links a:hover { color: var(--text); }

.nav__links a.is-active {
    color: var(--text);
    background: var(--surface-hover);
}

.theme-toggle {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
    transition: background-color 0.2s, transform 0.3s var(--ease);
}

.theme-toggle:hover { background: var(--surface-hover); transform: rotate(-15deg); }

.theme-toggle svg {
    grid-area: 1 / 1;
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: opacity 0.3s, transform 0.4s var(--ease);
}

.icon-sun circle { fill: currentColor; }
.icon-moon { fill: currentColor !important; stroke: none !important; }

:root[data-theme="dark"] .icon-moon,
:root[data-theme="light"] .icon-sun { opacity: 0; transform: rotate(-90deg) scale(0.5); }

.nav__actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ───────────────────────── Spotify ───────────────────────── */

.spot { position: relative; }

.spot-logo path {
    fill: none;
    stroke: #000;
    stroke-linecap: round;
}

.spot-btn {
    position: relative;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 1px solid rgba(29, 185, 84, 0.45);
    border-radius: 50%;
    background: rgba(29, 185, 84, 0.1);
    cursor: pointer;
    transition: transform 0.3s var(--ease), box-shadow 0.3s, background-color 0.3s;
}

.spot-btn .spot-logo {
    width: 26px;
    height: 26px;
    transition: transform 0.5s var(--ease);
}

/* Pulsing ring */
.spot-btn::after {
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: 50%;
    border: 2px solid #1db954;
    animation: spot-ping 2.4s ease-out infinite;
    pointer-events: none;
}

@keyframes spot-ping {
    0%   { transform: scale(1);   opacity: 0.7; }
    80%, 100% { transform: scale(1.55); opacity: 0; }
}

.spot-btn:hover,
.spot-btn[aria-expanded="true"] {
    background: rgba(29, 185, 84, 0.2);
    box-shadow: 0 0 24px -2px rgba(29, 185, 84, 0.65);
    transform: scale(1.06);
}

.spot-btn:hover .spot-logo,
.spot-btn[aria-expanded="true"] .spot-logo { transform: rotate(-20deg); }

/* The popup card is always Spotify-dark */
.spot-pop {
    position: absolute;
    top: calc(100% + 0.75rem);
    right: 0;
    z-index: 60;
    width: min(340px, calc(100vw - 2.5rem));
    padding: 1.1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    background:
        radial-gradient(120% 70% at 0% 0%, rgba(29, 185, 84, 0.35), transparent 60%),
        #121212;
    box-shadow: 0 30px 70px -20px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(0, 0, 0, 0.4);
    color: #fff;
    transform-origin: top right;
    animation: spot-in 0.35s var(--ease);
}

@keyframes spot-in {
    from { opacity: 0; transform: translateY(-8px) scale(0.95); }
}

.spot-pop__head {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: #b3b3b3;
}

.spot-pop__head .spot-logo { width: 20px; height: 20px; }

.spot-kicker {
    display: block;
    font-family: var(--mono);
    font-size: 0.68rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #1ed760;
}

.spot-now {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 0.75rem;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.05);
    transition: background-color 0.2s;
}

.spot-now:hover { background: rgba(255, 255, 255, 0.1); }

.spot-now__text {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.spot-title {
    margin-top: 0.15rem;
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.2;
}

.spot-artist { font-size: 0.88rem; color: #b3b3b3; }

/* Spinning record */
.spot-vinyl {
    position: relative;
    flex-shrink: 0;
    width: 62px;
    height: 62px;
    border-radius: 50%;
    background:
        radial-gradient(circle, #121212 0 7%, transparent 8%),
        radial-gradient(circle, transparent 0 30%, #0b0b0b 31%),
        conic-gradient(from 0deg, #f5a524, #e8577a, #8b5cf6, #1db954, #f5a524);
    box-shadow: 0 6px 18px -6px rgba(0, 0, 0, 0.8);
    animation: spin-vinyl 3.2s linear infinite;
}

/* Grooves + a light glint */
.spot-vinyl::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background:
        repeating-radial-gradient(circle, transparent 0 2px, rgba(255, 255, 255, 0.05) 2px 3px),
        conic-gradient(from 30deg, transparent 0 20%, rgba(255, 255, 255, 0.12) 25%, transparent 30% 70%, rgba(255, 255, 255, 0.08) 75%, transparent 80%);
    -webkit-mask: radial-gradient(circle, transparent 0 31%, #000 32%);
    mask: radial-gradient(circle, transparent 0 31%, #000 32%);
}

@keyframes spin-vinyl { to { transform: rotate(360deg); } }

.spot-eq {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 18px;
}

.spot-eq i {
    width: 3px;
    height: 100%;
    border-radius: 2px;
    background: #1ed760;
    transform-origin: bottom;
    animation: eq 0.9s ease-in-out infinite alternate;
}

.spot-eq i:nth-child(2) { animation-delay: -0.3s; animation-duration: 0.7s; }
.spot-eq i:nth-child(3) { animation-delay: -0.6s; animation-duration: 1.1s; }
.spot-eq i:nth-child(4) { animation-delay: -0.15s; animation-duration: 0.8s; }

@keyframes eq {
    from { transform: scaleY(0.2); }
    to   { transform: scaleY(1); }
}

.spot-progress {
    height: 4px;
    margin: 0.85rem 0.25rem 1.1rem;
    overflow: hidden;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.15);
}

.spot-progress span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: #fff;
    animation: spot-play 30s linear infinite;
}

@keyframes spot-play {
    from { width: 0; }
    to   { width: 100%; }
}

.spot-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 0.25rem;
    margin-bottom: 1.1rem;
}

.spot-chip {
    padding: 0.3rem 0.8rem;
    border-radius: 99px;
    background: rgba(29, 185, 84, 0.18);
    color: #1ed760;
    font-size: 0.88rem;
    font-weight: 600;
}

.spot-open {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.4rem;
    padding: 0.8rem;
    border-radius: 99px;
    background: #1db954;
    color: #000;
    font-weight: 700;
    transition: transform 0.2s var(--ease), background-color 0.2s;
}

.spot-open:hover {
    background: #1ed760;
    transform: scale(1.03);
}

/* ───────────────────────── Hero ───────────────────────── */

.hero {
    position: relative;
    display: grid;
    place-items: center;
    min-height: 100vh;
    min-height: 100svh;
    padding: 7.5rem clamp(1.25rem, 4vw, 2.5rem) 6rem;
    overflow: hidden;
    isolation: isolate;
}

.hero__bg {
    position: absolute;
    inset: 0;
    z-index: -1;
}

/* Soft aurora glow, mostly behind the cards on the right */
.hero__aurora {
    position: absolute;
    inset: -20%;
    background:
        radial-gradient(32% 42% at 72% 40%, rgba(79, 140, 201, 0.55), transparent 70%),
        radial-gradient(26% 34% at 88% 72%, rgba(119, 206, 189, 0.35), transparent 70%),
        radial-gradient(28% 36% at 22% 18%, rgba(107, 86, 214, 0.28), transparent 70%);
    filter: blur(40px);
    opacity: calc(var(--blob-opacity) * 1.8);
    animation: aurora 22s ease-in-out infinite alternate;
}

@keyframes aurora {
    from { transform: rotate(0deg) scale(1); }
    to   { transform: rotate(8deg) scale(1.08) translateX(-3%); }
}

.hero__grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(var(--border) 1px, transparent 1px),
        linear-gradient(90deg, var(--border) 1px, transparent 1px);
    background-size: 64px 64px;
    -webkit-mask-image: radial-gradient(ellipse 70% 60% at 60% 45%, #000 10%, transparent 75%);
    mask-image: radial-gradient(ellipse 70% 60% at 60% 45%, #000 10%, transparent 75%);
}

/* Fine film grain over everything */
.hero__grain {
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    opacity: 0.07;
    mix-blend-mode: overlay;
}

.hero__inner {
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    align-items: center;
    gap: clamp(2rem, 5vw, 5rem);
    width: 100%;
    max-width: 1240px;
}

.hero__text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1.4rem;
}

.status {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.45rem 0.95rem 0.45rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 99px;
    background: var(--surface);
    backdrop-filter: blur(8px);
    font-family: var(--mono);
    font-size: 0.8rem;
    letter-spacing: 0.04em;
    color: var(--muted);
}

.status__dot {
    position: relative;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #f5a524;
}

.status__dot::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: inherit;
    animation: spot-ping 2s ease-out infinite;
}

.hero__title {
    margin-left: -0.04em;
    font-size: clamp(3.2rem, 7.6vw, 6.6rem);
    font-weight: 800;
    line-height: 0.92;
    letter-spacing: -0.055em;
    padding-bottom: 0.06em;
    background:
        linear-gradient(100deg, transparent 40%, rgba(255, 255, 255, 0.55) 50%, transparent 60%) 0 0 / 250% 100%,
        var(--grad);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: title-shine 7s ease-in-out infinite;
}

@keyframes title-shine {
    0%, 55% { background-position: 120% 0, 0 0; }
    100%    { background-position: -120% 0, 0 0; }
}

.hero__lede {
    max-width: 34rem;
    font-size: clamp(1.05rem, 1.6vw, 1.25rem);
    font-weight: 300;
    color: var(--muted);
}

.hero__tags { margin-top: 0.5rem; }

/* ── Floating preview cards ── */

.hero__cards {
    --px: 0;
    --py: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.1rem;
    align-items: start;
}

.hcard {
    --rot: 0deg;
    --depth: 10;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.7rem;
    padding: 1.1rem 1.2rem 1.2rem;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: color-mix(in srgb, var(--bg-2) 72%, transparent);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: var(--shadow);
    color: var(--text);
    font: inherit;
    text-align: left;
    cursor: pointer;
    transform:
        translate3d(calc(var(--px) * var(--depth) * 1px), calc(var(--py) * var(--depth) * 1px), 0)
        rotate(var(--rot));
    transition: transform 0.6s var(--ease), border-color 0.3s, box-shadow 0.3s;
    animation: bob 6s ease-in-out infinite;
    animation-delay: var(--bob);
}

.hcard:nth-child(even) { margin-top: 2.75rem; }

@keyframes bob {
    50% { translate: 0 -8px; }
}

.hcard:hover {
    transform:
        translate3d(calc(var(--px) * var(--depth) * 1px), calc(var(--py) * var(--depth) * 1px), 0)
        rotate(0deg) scale(1.04);
    border-color: var(--border-strong);
}

.hcard__label {
    font-family: var(--mono);
    font-size: 0.7rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
}

.hcard__row {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.hcard__meta {
    font-size: 0.85rem;
    color: var(--muted);
}

.hcard--mc {
    --pixel: "Press Start 2P", var(--mono);
    border-color: color-mix(in srgb, var(--metal) 45%, transparent);
}

.hcard--mc .tier__slot { padding: 4px; }
.hcard--mc .tier__icon { width: 30px; height: 30px; }
.hcard--mc .tier__rank { font-size: 0.7rem; color: #fff; }
.hcard--mc .tier__level { font-size: 0.9rem; }
:root[data-theme="light"] .hcard--mc .tier__rank { color: var(--text); text-shadow: none; }
:root[data-theme="light"] .hcard--mc {
    --metal-sheen: linear-gradient(110deg, #7a3e16 0%, #b5672a 20%, #e3a062 30%, #a85e24 40%, #6b3410 55%, #b97a3e 75%, #7a3e16 100%);
}

.hcard__spark {
    width: 100%;
    height: 42px;
    fill: none;
    stroke: var(--accent);
    stroke-width: 2.5;
    stroke-linecap: round;
    filter: drop-shadow(0 4px 10px color-mix(in srgb, var(--accent) 50%, transparent));
}

.hcard__bar {
    width: 100%;
    height: 7px;
    overflow: hidden;
    border-radius: 99px;
    background: var(--surface-hover);
}

.hcard__bar span {
    display: block;
    width: var(--v);
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #f5d142, #f5a524 45%, #f5513b);
}

.hcard--spot:hover { border-color: rgba(29, 185, 84, 0.6); box-shadow: 0 0 40px -12px rgba(29, 185, 84, 0.6); }
.hcard--spot .hcard__label { color: #1db954; }
.spot-vinyl--sm { width: 44px; height: 44px; }

.hcard__song {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}

.hcard__song strong { font-weight: 700; }
.hcard__song span { font-size: 0.82rem; color: var(--muted); }

.hcard__big {
    font-size: 3.2rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.04em;
    background: var(--grad);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero__cta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 1.5rem;
    border-radius: 99px;
    font-weight: 500;
    transition: transform 0.25s var(--ease), background-color 0.25s, border-color 0.25s, box-shadow 0.25s;
}

.btn span { transition: transform 0.25s var(--ease); }
.btn:hover { transform: translateY(-2px); }
.btn:hover span { transform: translateX(4px); }

.btn--primary {
    background: var(--text);
    color: var(--bg);
    box-shadow: 0 10px 30px -10px color-mix(in srgb, var(--accent) 70%, transparent);
}

.btn--ghost {
    border: 1px solid var(--border-strong);
    background: var(--surface);
    backdrop-filter: blur(8px);
}

.btn--ghost:hover { background: var(--surface-hover); }

.scroll-cue {
    position: absolute;
    bottom: calc(1.75rem + env(safe-area-inset-bottom, 0px));
    left: 50%;
    translate: -50% 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--muted);
    font-family: var(--mono);
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.scroll-cue__mouse {
    position: relative;
    width: 22px;
    height: 34px;
    border: 1.5px solid currentColor;
    border-radius: 12px;
}

.scroll-cue__mouse span {
    position: absolute;
    left: 50%;
    top: 7px;
    width: 3px;
    height: 7px;
    margin-left: -1.5px;
    border-radius: 2px;
    background: currentColor;
    animation: wheel 1.8s var(--ease) infinite;
}

@keyframes wheel {
    0%   { opacity: 0; transform: translateY(-3px); }
    30%  { opacity: 1; }
    100% { opacity: 0; transform: translateY(10px); }
}

/* ───────────────────────── Sections ───────────────────────── */

.section {
    position: relative;
    padding-block: clamp(5rem, 12vw, 9rem);
}

.section + .section { border-top: 1px solid var(--border); }

.section-head {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2.5rem;
    font-family: var(--mono);
    font-size: 0.85rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--muted);
}

.section-head::after {
    content: "";
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, var(--border-strong), transparent);
}

.section-num { color: var(--accent); }

.section-intro { margin-bottom: 3rem; }

.section-title {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4em 0.6em;
    font-size: clamp(2.4rem, 6.5vw, 4.75rem);
    font-weight: 600;
    line-height: 1.02;
    letter-spacing: -0.035em;
}

.section-sub {
    margin-top: 1rem;
    font-size: 1.15rem;
    color: var(--muted);
}

.badge {
    padding: 0.35em 0.8em;
    border: 1px solid var(--border-strong);
    border-radius: 99px;
    font-family: var(--mono);
    font-size: max(0.22em, 0.7rem);
    font-weight: 400;
    letter-spacing: 0.15em;
    color: var(--accent);
    transform: rotate(-4deg);
}

.tag {
    display: inline-block;
    padding: 0.2rem 0.65rem;
    border: 1px solid var(--border);
    border-radius: 99px;
    font-family: var(--mono);
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
}

.tag--live { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 40%, transparent); }

.tag--live::before {
    content: "";
    display: inline-block;
    width: 6px;
    height: 6px;
    margin-right: 0.45rem;
    border-radius: 50%;
    background: currentColor;
    vertical-align: 0.1em;
    animation: pulse 1.6s ease-in-out infinite;
}

@keyframes pulse { 50% { opacity: 0.25; } }

/* ───────────────────────── About ───────────────────────── */

.about {
    display: grid;
    grid-template-columns: 1.25fr 1fr;
    gap: clamp(1.5rem, 3vw, 2.5rem);
    align-items: stretch;
}

/* The spinning rainbow border, carried over from the old bio box */
.bio-card {
    position: relative;
    isolation: isolate;
    padding: 2px;
    border-radius: calc(var(--radius) + 6px);
}

.bio-card::before,
.bio-card::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    border-radius: inherit;
    background: var(--rainbow);
    animation: spin 4s linear infinite;
}

.bio-card::after {
    z-index: -2;
    filter: blur(2.2rem);
    opacity: 0.45;
}

@keyframes spin { to { --angle: 360deg; } }

.bio-card__inner {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1.25rem;
    height: 100%;
    padding: clamp(1.75rem, 4vw, 3rem);
    border-radius: calc(var(--radius) + 4px);
    background: var(--bg-2);
}

.bio-card__title {
    font-size: clamp(1.9rem, 4vw, 3rem);
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: -0.03em;
}

.bio-card p:not(.bio-card__aside) {
    font-size: clamp(1.1rem, 1.8vw, 1.3rem);
    font-weight: 300;
    color: var(--muted);
}

.bio-card__aside {
    font-family: var(--mono);
    color: var(--accent);
}

.focus {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.focus__item {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 1.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    transition: border-color 0.3s, background-color 0.3s, transform 0.4s var(--ease);
}

.focus__item:hover {
    border-color: var(--border-strong);
    background: var(--surface-hover);
    transform: translateY(-4px);
}

.focus__icon {
    display: grid;
    place-items: center;
    width: 2.6rem;
    height: 2.6rem;
    margin-bottom: auto;
    padding-bottom: 0;
    border-radius: 12px;
    background: color-mix(in srgb, var(--accent) 14%, transparent);
    color: var(--accent);
    font-family: var(--mono);
    font-size: 1rem;
}

.focus__item h3 {
    margin-top: 1.5rem;
    font-size: 1.15rem;
    font-weight: 600;
}

.focus__item p { font-size: 0.95rem; color: var(--muted); }

/* ───────────────────────── Games ───────────────────────── */

.games {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
    gap: 1.25rem;
}

.game {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    transition: transform 0.45s var(--ease), border-color 0.3s, box-shadow 0.45s var(--ease);
}

.game:hover {
    transform: translateY(-6px);
    border-color: var(--border-strong);
    box-shadow: var(--shadow);
}

.game__thumb {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: var(--bg-2);
}

.game__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s var(--ease);
}

.game:hover .game__thumb img { transform: scale(1.06); }

/* Battle of Cajamarca: a little CSS sunset over the Andes */
.game__thumb--cajamarca {
    background: linear-gradient(180deg, #ffb35c 0%, #f06a3c 45%, #a8283f 75%, #4a1430 100%);
}

.game__sun {
    position: absolute;
    left: 50%;
    top: 30%;
    width: 30%;
    aspect-ratio: 1;
    translate: -50% 0;
    border-radius: 50%;
    background: radial-gradient(circle, #fff3c4 0%, #ffd56b 55%, transparent 72%);
    transition: transform 0.7s var(--ease);
}

.game:hover .game__sun { transform: translateY(-10%) scale(1.08); }

.game__mountains {
    position: absolute;
    inset: auto 0 0 0;
    height: 55%;
    background: #2a0c22;
    clip-path: polygon(0 60%, 14% 30%, 26% 52%, 42% 12%, 56% 46%, 70% 22%, 84% 50%, 100% 28%, 100% 100%, 0 100%);
}

.game__year {
    position: absolute;
    left: 1rem;
    bottom: 0.75rem;
    font-family: var(--mono);
    font-size: 0.85rem;
    letter-spacing: 0.2em;
    color: #ffd9a8;
}

.game__thumb--soon {
    display: grid;
    place-items: center;
    background:
        repeating-linear-gradient(-45deg, var(--surface) 0 14px, transparent 14px 28px),
        var(--bg-2);
}

.game__thumb--soon span {
    font-family: var(--mono);
    font-size: clamp(2.5rem, 6vw, 3.5rem);
    letter-spacing: 0.15em;
    color: var(--muted);
    animation: pulse 2.4s ease-in-out infinite;
}

.game--soon { border-style: dashed; }

.game__body {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 1.25rem 1.5rem 1.5rem;
}

.game__title {
    font-size: 1.35rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.game__arrow {
    position: absolute;
    top: 1.15rem;
    right: 1.25rem;
    display: grid;
    place-items: center;
    width: 2.2rem;
    height: 2.2rem;
    border: 1px solid var(--border);
    border-radius: 50%;
    transition: background-color 0.3s, color 0.3s, transform 0.4s var(--ease);
}

.game:hover .game__arrow {
    background: var(--text);
    color: var(--bg);
    transform: rotate(45deg);
}

/* ───────────────────────── Minecraft ───────────────────────── */

/* A dark "game scene" in both themes, so it gets its own local palette */
.section--mc {
    --text: #ffffff;
    --muted: #c9ced8;
    --border: rgba(255, 255, 255, 0.16);
    --border-strong: rgba(255, 255, 255, 0.32);
    --accent: #55ff55;
    --pixel: "Press Start 2P", var(--mono);

    display: flex;
    align-items: center;
    min-height: 100vh;
    min-height: 100svh;
    overflow: hidden;
    isolation: isolate;
    color: var(--text);
}

.mc-scene {
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(180deg, #5f8fe8 0%, #9cc0ff 55%, #c4dbff 100%);
}

.mc-world {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    image-rendering: pixelated;
}

/* Darken the scene so the text stays readable over it (or over the clip) */
.mc-scene::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(4, 6, 14, 0.82) 0%, rgba(4, 6, 14, 0.45) 55%, rgba(4, 6, 14, 0.2) 100%),
        linear-gradient(180deg, rgba(4, 6, 14, 0.55) 0%, transparent 30%, transparent 65%, rgba(4, 6, 14, 0.75) 100%);
}

.mc-clouds span {
    position: absolute;
    top: var(--top);
    left: 0;
    width: var(--w);
    height: calc(var(--w) * 0.18);
    background: rgba(255, 255, 255, 0.92);
    animation: cloud var(--t) linear infinite;
    animation-delay: var(--delay);
}

/* A smaller block on top gives the clouds their blocky shape */
.mc-clouds span::before {
    content: "";
    position: absolute;
    left: 20%;
    bottom: 100%;
    width: 45%;
    height: 100%;
    background: inherit;
}

.mc-clouds span:nth-child(1) { --top: 10%; --w: 16vw; --t: 90s;  --delay: -20s; }
.mc-clouds span:nth-child(2) { --top: 20%; --w: 10vw; --t: 70s;  --delay: -55s; }
.mc-clouds span:nth-child(3) { --top: 6%;  --w: 22vw; --t: 120s; --delay: -90s; }

@keyframes cloud {
    from { transform: translateX(-30vw); }
    to   { transform: translateX(110vw); }
}

.mc-intro {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1.25rem;
    margin-bottom: 3rem;
}

.mc-title {
    position: relative;
    font-family: var(--pixel);
    font-size: clamp(1.5rem, 5.4vw, 3.9rem);
    font-weight: 400;
    line-height: 1.25;
    text-shadow: 0.09em 0.09em 0 #3f3f3f;
}

/* Yellow title-screen splash text */
.mc-splash {
    position: absolute;
    right: -1.5em;
    bottom: -1.1em;
    font-size: clamp(0.6rem, 1.3vw, 0.95rem);
    color: #ffff55;
    text-shadow: 0.2em 0.2em 0 #3f3f15;
    white-space: nowrap;
    rotate: -14deg;
    animation: splash 0.45s ease-in-out infinite alternate;
}

@keyframes splash {
    from { scale: 1; }
    to   { scale: 1.09; }
}

.mc-sub {
    margin-top: 0.75rem;
    font-size: 1.15rem;
    color: var(--muted);
}

/* Stone-style game button */
.mc-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.95rem 1.5rem 1.05rem;
    border: 2px solid #000;
    background: #6f6f6f;
    box-shadow: inset 2px 2px 0 #aaaaaa, inset -2px -4px 0 #454545;
    font-family: var(--pixel);
    font-size: 0.8rem;
    color: #fff;
    text-shadow: 2px 2px 0 #3f3f3f;
    transition: transform 0.15s;
}

.mc-btn:hover {
    background: #7a85c2;
    box-shadow: inset 2px 2px 0 #b8c0f2, inset -2px -4px 0 #4b5592;
    color: #ffffa0;
}

.mc-btn:active { transform: translateY(2px); }

.mc-btn svg {
    width: 24px;
    height: 24px;
    fill: #ff0033;
    filter: drop-shadow(2px 2px 0 #3f3f3f);
}

.tiers {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
    gap: 1rem;
}

/* Tier cards look like item tooltips */
.tier {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.9rem 1.1rem;
    border: 2px solid #100010;
    background: rgba(16, 0, 16, 0.9);
    box-shadow: inset 0 0 0 2px var(--metal-dim), 0 12px 30px -10px rgba(0, 0, 0, 0.6);
    transition: transform 0.3s var(--ease), box-shadow 0.3s;
}

.tier:hover {
    transform: translateY(-4px);
    box-shadow: inset 0 0 0 2px var(--metal), 0 0 34px -8px var(--metal);
}

/* Inventory slot */
.tier__slot {
    flex-shrink: 0;
    padding: 6px;
    background: #8b8b8b;
    box-shadow: inset 2px 2px 0 #373737, inset -2px -2px 0 #ffffff;
}

.tier__icon {
    width: 40px;
    height: 40px;
}

.tier__rank {
    font-family: var(--pixel);
    font-size: 0.85rem;
    line-height: 1.6;
    text-shadow: 2px 2px 0 #3f3f3f;
}

.tier__level {
    margin-right: 0.35rem;
    font-size: 1.05rem;
    background: var(--metal-sheen);
    background-size: 250% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: none;
    filter: drop-shadow(2px 2px 0 rgba(0, 0, 0, 0.6));
    animation: sheen 3.5s linear infinite;
}

.tier__source {
    margin-top: 0.3rem;
    font-family: var(--pixel);
    font-size: 0.6rem;
    color: #aaaaaa;
    text-shadow: 1px 1px 0 #2a2a2a;
}

/* Shiny bronze for tier 3 */
.tier--bronze {
    --metal: #cd7f32;
    --metal-dim: #5a3317;
    --metal-sheen: linear-gradient(110deg, #8a4b1f 0%, #d18a4a 20%, #ffe2b8 30%, #c9783c 40%, #7a3e16 55%, #d89a5f 75%, #8a4b1f 100%);
}

/* Steel for tier 4 */
.tier--steel {
    --metal: #9aa6b4;
    --metal-dim: #3d4450;
    --metal-sheen: linear-gradient(110deg, #6b7684 0%, #aab4c0 20%, #f2f5f8 30%, #9aa6b4 40%, #5c6672 55%, #b8c1cc 75%, #6b7684 100%);
}

@keyframes sheen {
    /* Shifts by exactly one 250%-wide tile, so the loop is seamless */
    from { background-position: 0 0; }
    to   { background-position: -166.667% 0; }
}

/* ───────────────────────── Math ───────────────────────── */

.section--math { overflow: hidden; isolation: isolate; }

/* Faint formulas floating in the background */
.math-bg span {
    position: absolute;
    left: var(--x);
    top: var(--y);
    rotate: var(--r);
    font-family: var(--mono);
    font-size: clamp(1rem, 2.4vw, 1.9rem);
    color: var(--text);
    opacity: 0.06;
    white-space: nowrap;
    pointer-events: none;
    z-index: -1;
}

.math {
    display: grid;
    grid-template-columns: 1fr 1.15fr;
    gap: clamp(2rem, 5vw, 4rem);
    align-items: center;
}

.math__extras {
    display: grid;
    gap: 1rem;
    margin-top: 2rem;
}

.cooked,
.fact {
    padding: 1.1rem 1.25rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
}

.cooked__top {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    font-family: var(--mono);
    font-size: 0.8rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
}

.cooked__val { color: #f5713b; }

.cooked__bar {
    height: 12px;
    overflow: hidden;
    border-radius: 99px;
    background: var(--surface-hover);
}

.cooked__bar span {
    display: block;
    width: var(--v);
    height: 100%;
    border-radius: inherit;
    background:
        repeating-linear-gradient(-45deg, rgba(255, 255, 255, 0.18) 0 8px, transparent 8px 16px),
        linear-gradient(90deg, #f5d142, #f5a524 45%, #f5513b);
    background-size: 22.6px 22.6px, 100% 100%;
    animation: sizzle 0.8s linear infinite;
    box-shadow: 0 0 18px -2px rgba(245, 113, 59, 0.6);
}

@keyframes sizzle {
    to { background-position: 22.6px 0, 0 0; }
}

.cooked__caption {
    margin-top: 0.6rem;
    font-size: 0.9rem;
    color: var(--muted);
}

.fact {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    width: 100%;
    color: var(--text);
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.2s, background-color 0.2s;
}

.fact:hover {
    border-color: var(--accent);
    background: var(--surface-hover);
}

.fact__label {
    font-family: var(--mono);
    font-size: 0.8rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
}

.fact__label span {
    display: inline-block;
    transition: transform 0.4s var(--ease);
}

.fact:hover .fact__label span { transform: rotate(180deg); }

.fact__text { font-size: 1.05rem; }

.fact__caption {
    font-size: 0.9rem;
    color: var(--muted);
}

.graph {
    margin: 0;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-2);
    box-shadow: var(--shadow);
}

.graph__bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.5rem 1rem;
    padding: 0.85rem 1.1rem;
    border-bottom: 1px solid var(--border);
    font-family: var(--mono);
    font-size: 0.85rem;
    color: var(--muted);
}

.graph__slope { color: #f5a524; }
.graph__slope output { display: inline-block; min-width: 3.2em; text-align: right; }

.graph__plot { padding: 0.75rem; }
.graph__svg { width: 100%; height: auto; touch-action: pan-y; }

.graph__grid { stroke: var(--border); stroke-width: 1; }
#gridPat path { stroke: var(--border); }
.graph__axis { stroke: var(--border-strong); stroke-width: 1.5; fill: none; }
.graph__area { fill: color-mix(in srgb, var(--accent) 16%, transparent); }
.graph__curve { fill: none; stroke: var(--accent); stroke-width: 2.75; stroke-linecap: round; stroke-linejoin: round; }
.graph__deriv { fill: none; stroke: var(--muted); stroke-width: 1.5; stroke-dasharray: 4 5; opacity: 0.55; }
.graph__label { fill: var(--accent); font-family: var(--mono); font-size: 12px; }
.graph__tangent { stroke: #f5a524; stroke-width: 2.25; stroke-linecap: round; }
.graph__point { fill: #f5a524; stroke: var(--bg-2); stroke-width: 3; }

.graph__hint {
    padding: 0 1.1rem 0.9rem;
    font-family: var(--mono);
    font-size: 0.75rem;
    color: var(--muted);
}

/* ───────────────────────── Tools ───────────────────────── */

.section--center .section-head::before {
    content: "";
    flex: 1;
    height: 1px;
    background: linear-gradient(270deg, var(--border-strong), transparent);
}

.section--center .section-intro { text-align: center; }
.section--center .section-title { justify-content: center; }

.tools {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    max-width: 780px;
    margin-inline: auto;
}

.tool {
    --mx: -999px;
    --my: -999px;
    position: relative;
    isolation: isolate;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    padding: 1.9rem 1rem 1.6rem;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    text-align: center;
    transition: transform 0.4s var(--ease), border-color 0.3s;
}

/* Glow that follows the pointer across all the tiles (positions set in JS) */
.tool::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: radial-gradient(240px circle at var(--mx) var(--my), color-mix(in srgb, var(--brand) 24%, transparent), transparent 70%);
}

.tool:hover {
    transform: translateY(-4px);
    border-color: color-mix(in srgb, var(--brand) 55%, transparent);
}

.tool__icon {
    display: grid;
    place-items: center;
    width: 3.4rem;
    height: 3.4rem;
    margin-bottom: 0.7rem;
    border-radius: 15px;
    background: linear-gradient(140deg, color-mix(in srgb, var(--brand) 75%, #fff), var(--brand) 55%, color-mix(in srgb, var(--brand) 70%, #000));
    box-shadow: 0 12px 26px -12px var(--brand), inset 0 1px 0 rgba(255, 255, 255, 0.35);
    color: #fff;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    transition: transform 0.5s var(--ease);
}

.tool:hover .tool__icon { transform: scale(1.08) rotate(-6deg); }

.tool__name {
    font-size: 1.1rem;
    font-weight: 600;
}

.tool__kind {
    font-family: var(--mono);
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
}

.tool__star {
    position: absolute;
    top: 0.75rem;
    right: 0.9rem;
    color: var(--brand);
    font-size: 0.9rem;
    opacity: 0.75;
    transition: transform 0.6s var(--ease);
}

.tool:hover .tool__star { transform: rotate(144deg) scale(1.25); }

/* ───────────────────────── Setup ───────────────────────── */

.setup { border-top: 1px solid var(--border); }

.setup__row {
    display: grid;
    grid-template-columns: 3.5rem 1fr auto;
    align-items: center;
    gap: 1rem;
    padding: 1.35rem 0.5rem;
    border-bottom: 1px solid var(--border);
    transition: background-color 0.3s, padding 0.4s var(--ease);
}

.setup__row:hover {
    padding-inline: 1.25rem;
    background: var(--surface);
}

.setup__num {
    font-family: var(--mono);
    font-size: 0.85rem;
    color: var(--accent);
}

.setup__name {
    font-size: clamp(1.15rem, 2.4vw, 1.6rem);
    font-weight: 500;
    letter-spacing: -0.015em;
}

.setup__kind {
    font-family: var(--mono);
    font-size: 0.78rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
}

/* Fade the contents, not the row, so it doesn't fight the scroll-reveal opacity */
.setup__row--broken > * { opacity: 0.45; }

.setup__note {
    display: block;
    margin-top: 0.2rem;
    font-family: var(--mono);
    font-size: 0.8rem;
    font-weight: 400;
    letter-spacing: 0.08em;
    color: var(--muted);
}

/* ───────────────────────── Contact ───────────────────────── */

.links { border-top: 1px solid var(--border); }

.link-row {
    display: grid;
    grid-template-columns: 1fr auto auto;
    align-items: center;
    gap: 1.5rem;
    padding: clamp(1.25rem, 3vw, 2rem) 0.25rem;
    border-bottom: 1px solid var(--border);
}

.link-row__name {
    font-size: clamp(2rem, 7vw, 4.5rem);
    font-weight: 600;
    line-height: 1;
    letter-spacing: -0.04em;
    transition: color 0.3s, transform 0.5s var(--ease);
}

a.link-row:hover .link-row__name,
.link-row--copy:hover .link-row__name {
    background: var(--grad);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    transform: translateX(0.75rem);
}

.link-row__handle {
    font-family: var(--mono);
    color: var(--muted);
}

.link-row__arrow {
    display: grid;
    place-items: center;
    width: clamp(2.75rem, 5vw, 3.75rem);
    aspect-ratio: 1;
    border: 1px solid var(--border-strong);
    border-radius: 50%;
    font-size: 1.25rem;
    transition: background-color 0.3s, color 0.3s, transform 0.5s var(--ease);
}

a.link-row:hover .link-row__arrow,
.link-row--copy:hover .link-row__arrow {
    background: var(--text);
    color: var(--bg);
    transform: rotate(45deg);
}

/* Discord has no public profile link, so this row copies the username instead */
.link-row--copy {
    width: 100%;
    border: 0;
    border-bottom: 1px solid var(--border);
    background: none;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.link-row--copy:hover .link-row__arrow { transform: none; }
.link-row--copy.is-copied .link-row__handle { color: var(--accent); }
.link-row__aka { opacity: 0.6; }

.link-row--nope { opacity: 0.55; }
.link-row--nope .link-row__name { text-decoration: line-through; text-decoration-thickness: 0.06em; }

/* ───────────────────────── Footer ───────────────────────── */

.footer {
    padding-block: 2rem calc(2rem + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid var(--border);
    font-size: 0.9rem;
    color: var(--muted);
}

.footer__inner {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.footer__brand { display: flex; align-items: center; gap: 0.6rem; }
.footer__top { font-family: var(--mono); transition: color 0.2s; }
.footer__top:hover { color: var(--text); }

/* ───────────────────────── Cursor ───────────────────────── */

/* Only switched on by JS for mouse/trackpad users */
html.has-cursor,
html.has-cursor * { cursor: none !important; }

html { --cursor-accent: var(--accent); }

.cursor-ring,
.cursor-dot {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 10000;
    pointer-events: none;
    will-change: transform;
    transition: opacity 0.3s;
}

.cursor-ring__shape {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    margin: -17px 0 0 -17px;
    border: 1.5px solid color-mix(in srgb, var(--text) 65%, transparent);
    border-radius: 50%;
    transition:
        width 0.35s var(--ease), height 0.35s var(--ease), margin 0.35s var(--ease),
        background-color 0.3s, border-color 0.3s, border-radius 0.3s, box-shadow 0.3s;
}

.cursor-dot {
    width: 6px;
    height: 6px;
    margin: -3px 0 0 -3px;
    border-radius: 50%;
    background: var(--cursor-accent);
    box-shadow: 0 0 10px var(--cursor-accent);
}

/* Over links and buttons */
.cursor-link .cursor-ring__shape {
    width: 56px;
    height: 56px;
    margin: -28px 0 0 -28px;
    border-color: var(--cursor-accent);
    background: color-mix(in srgb, var(--cursor-accent) 14%, transparent);
}

/* Over things with a label (Play, View, Listen...) */
.cursor-label .cursor-ring__shape {
    width: 78px;
    height: 78px;
    margin: -39px 0 0 -39px;
    border-color: transparent;
    background: var(--cursor-accent);
    box-shadow: 0 10px 34px -8px var(--cursor-accent);
}

.cursor-ring__label {
    font-family: var(--mono);
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    white-space: nowrap;
    color: var(--accent-ink);
    opacity: 0;
    scale: 0.5;
    transition: opacity 0.2s, scale 0.35s var(--ease);
}

.cursor-label .cursor-ring__label { opacity: 1; scale: 1; }
.cursor-label .cursor-dot { opacity: 0; }
.cursor-hidden .cursor-ring,
.cursor-hidden .cursor-dot { opacity: 0; }

/* Blocky cursor inside the Minecraft scene */
.cursor-mc { --cursor-accent: #55ff55; }
.cursor-mc .cursor-ring__shape { border-radius: 0; border-width: 2px; border-color: #fff; }
.cursor-mc.cursor-link .cursor-ring__shape,
.cursor-mc.cursor-label .cursor-ring__shape { border-color: #55ff55; }
.cursor-mc .cursor-dot { border-radius: 0; }
.cursor-mc .cursor-ring__label { font-family: "Press Start 2P", var(--mono); font-size: 0.5rem; letter-spacing: 0; color: #000; }

/* Click ripple */
.cursor-ripple {
    position: fixed;
    z-index: 9999;
    width: 64px;
    height: 64px;
    margin: -32px 0 0 -32px;
    border: 1.5px solid var(--cursor-accent);
    border-radius: 50%;
    pointer-events: none;
    animation: cursor-ripple 0.6s var(--ease) forwards;
}

.cursor-mc .cursor-ripple { border-radius: 0; }

@keyframes cursor-ripple {
    from { transform: scale(0.2); opacity: 0.9; }
    to   { transform: scale(1.5); opacity: 0; }
}

/* ───────────────────────── Scroll reveal ───────────────────────── */

.js .reveal {
    opacity: 0;
    transform: translateY(28px);
    transition:
        opacity 0.9s var(--ease) calc(var(--d, 0) * 80ms),
        transform 0.9s var(--ease) calc(var(--d, 0) * 80ms);
}

.js .reveal.is-visible {
    opacity: 1;
    transform: none;
}

/* ───────────────────────── Responsive ───────────────────────── */

@media (max-width: 900px) {
    .hero { padding-top: 6.5rem; }
    .hero__inner { grid-template-columns: 1fr; }
    .hero__cards { max-width: 560px; }
    .scroll-cue { display: none; }
    .about,
    .math { grid-template-columns: 1fr; }
}

@media (max-width: 1000px) {
    .nav__links a { padding: 0.4rem 0.7rem; font-size: 0.85rem; }
}

@media (max-width: 860px) {
    .nav__links { display: none; }
    .nav__brand { margin-right: auto; }
}

@media (max-width: 560px) {
    .focus { grid-template-columns: 1fr; }
    .hero__cards { gap: 0.75rem; }
    .hcard { padding: 0.9rem; border-radius: 16px; }
    .hcard:nth-child(even) { margin-top: 1.5rem; }
    .hcard__big { font-size: 2.4rem; }
    .spot-vinyl--sm { width: 34px; height: 34px; }
    .hcard__song strong { font-size: 0.9rem; }
    .tools { gap: 0.6rem; }
    .tool { padding: 1.3rem 0.4rem 1.1rem; }
    .tool__icon { width: 2.7rem; height: 2.7rem; border-radius: 12px; font-size: 0.9rem; }
    .tool__name { font-size: 0.92rem; }
    .tool__kind { font-size: 0.6rem; letter-spacing: 0.06em; }
    .tool__star { top: 0.5rem; right: 0.6rem; font-size: 0.75rem; }
    .focus__item h3 { margin-top: 1rem; }
    .setup__row { grid-template-columns: 2.25rem 1fr; }
    .setup__kind { grid-column: 2; margin-top: -0.75rem; }
    .link-row { grid-template-columns: 1fr auto; gap: 0.5rem 1rem; }
    .link-row__handle { grid-row: 2; font-size: 0.9rem; }
    .link-row__arrow { grid-row: 1 / 3; grid-column: 2; }
    .mc-splash { right: 0; bottom: -1.9em; }
}

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