/* ============================================================
   Liam Wilson — personal site
   Modern editorial dark theme
   ============================================================ */

/* The [hidden] attribute must always win over component display rules
   (e.g. .nowplaying { display: flex }), otherwise elements set to hidden
   in markup/JS would still render. */
[hidden] {
    display: none !important;
}

:root {
    --bg: #0d0c0f;
    --bg-soft: #16141a;
    --surface: #1c1a21;
    --surface-2: #232028;
    --line: rgba(255, 255, 255, 0.08);
    --line-2: rgba(255, 255, 255, 0.14);
    --text: #ece9f1;
    --muted: #9a95a8;
    --faint: #6a6577;
    --accent: #ff8a4c;
    /* warm amber */
    --accent-2: #ffd166;
    /* golden */
    --accent-3: #7c6cff;
    /* violet counterpoint */
    --maxw: 1200px;
    --ease: cubic-bezier(0.16, 1, 0.3, 1);

    --font-display: "Fraunces", Georgia, "Times New Roman", serif;
    --font-body: "Space Grotesk", system-ui, -apple-system, sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: clamp(1rem, 0.95rem + 0.2vw, 1.075rem);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    position: relative;
}

a {
    color: inherit;
    text-decoration: none;
}

::selection {
    background: var(--accent);
    color: #1a1005;
}

/* ---------- Film grain + cursor glow ---------- */
.grain {
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    opacity: 0.045;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.cursor-glow {
    position: fixed;
    top: 0;
    left: 0;
    width: 480px;
    height: 480px;
    margin: -240px 0 0 -240px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 138, 76, 0.10), transparent 60%);
    pointer-events: none;
    z-index: 0;
    transform: translate3d(-9999px, -9999px, 0);
    transition: opacity 0.4s;
}

@media (hover: none) {
    .cursor-glow {
        display: none;
    }
}

/* ---------- Scroll progress ---------- */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0%;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    z-index: 60;
    transition: width 0.1s linear;
}

/* ---------- Side nav (desktop) ---------- */
.sidenav {
    position: fixed;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 50;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
}

.sidenav__brand {
    align-self: flex-start;
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 1.15rem;
    letter-spacing: 0.02em;
    padding: 8px 10px;
    border: 1px solid var(--line-2);
    border-radius: 10px;
    line-height: 1;
    transition: border-color 0.3s, color 0.3s;
}

.sidenav__brand:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.sidenav__list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 8px;
    border-radius: 16px;
    background: rgba(22, 20, 26, 0.6);
    border: 1px solid var(--line);
    backdrop-filter: blur(10px);
}

/* Each item is a full, always-labelled menu row with a big hit target */
.sidenav__list a {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    padding: 9px 16px 9px 12px;
    border-radius: 10px;
    cursor: pointer;
    color: var(--muted);
    transition: background 0.25s, color 0.25s;
}

.sidenav__list a:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
}

/* The dot indicator */
.sidenav__list a span {
    flex: 0 0 auto;
    display: block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--faint);
    transition: transform 0.35s var(--ease), background 0.35s;
}

/* Always-visible text label */
.sidenav__list a::after {
    content: attr(data-label);
    font-size: 0.74rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    white-space: nowrap;
}

/* Active state: filled pill, bright accent, larger dot */
.sidenav__list a.is-active {
    background: rgba(255, 138, 76, 0.14);
    color: var(--accent);
}

.sidenav__list a.is-active span,
.sidenav__list a:hover span {
    background: var(--accent);
    transform: scale(1.4);
}

.sidenav__list a.is-active::after {
    color: var(--accent);
}

@media (max-width: 900px) {
    .sidenav {
        display: none;
    }
}

/* ---------- Mobile top bar ---------- */
.topbar {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 55;
    padding: 14px 20px;
    align-items: center;
    justify-content: space-between;
    background: rgba(13, 12, 15, 0.72);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
}

.topbar__brand {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 1.1rem;
}

.topbar__toggle {
    background: none;
    border: 0;
    cursor: pointer;
    width: 30px;
    height: 22px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.topbar__toggle span {
    display: block;
    height: 2px;
    width: 100%;
    background: var(--text);
    border-radius: 2px;
    transition: transform 0.3s, opacity 0.3s;
}

.topbar__toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(10px) rotate(45deg);
}

.topbar__toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}

.topbar__toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-10px) rotate(-45deg);
}

.mobile-menu {
    display: none;
    position: fixed;
    top: 51px;
    left: 0;
    right: 0;
    z-index: 54;
    flex-direction: column;
    background: var(--bg-soft);
    border-bottom: 1px solid var(--line);
    padding: 8px 0;
}

.mobile-menu[hidden] {
    display: none;
}

.mobile-menu a {
    padding: 14px 20px;
    font-size: 1.05rem;
    border-bottom: 1px solid var(--line);
    color: var(--muted);
}

.mobile-menu a:last-child {
    border-bottom: 0;
}

@media (max-width: 900px) {
    .topbar {
        display: flex;
    }

    .mobile-menu.is-open {
        display: flex;
    }
}

/* ---------- Layout helpers ---------- */
main {
    position: relative;
    z-index: 2;
}

.section {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: clamp(80px, 12vh, 160px) clamp(24px, 6vw, 96px);
}

@media (max-width: 900px) {
    .section {
        padding-top: 90px;
    }
}

.section__head {
    display: flex;
    align-items: baseline;
    gap: 18px;
    margin-bottom: 42px;
    padding-bottom: 22px;
    border-bottom: 1px solid var(--line);
}

.section__index {
    font-family: var(--font-body);
    font-size: 0.85rem;
    letter-spacing: 0.2em;
    color: var(--accent);
    font-weight: 600;
}

.section__title {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: clamp(2rem, 1.2rem + 3vw, 3.6rem);
    line-height: 1;
    letter-spacing: -0.02em;
}

.section__intro {
    font-size: clamp(1.1rem, 1rem + 0.6vw, 1.4rem);
    color: var(--muted);
    max-width: 60ch;
    margin-bottom: 48px;
}

/* ---------- Hero ---------- */
.hero {
    min-height: 100svh;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    column-gap: clamp(32px, 5vw, 72px);
    position: relative;
    padding: clamp(90px, 12vh, 140px) clamp(24px, 6vw, 96px) 110px;
    max-width: var(--maxw);
    margin: 0 auto;
}

.hero__inner {
    max-width: 760px;
    position: relative;
    z-index: 2;
}

/* Portrait */
.hero__portrait {
    z-index: 1;
    justify-self: end;
}

.hero__portrait img {
    display: block;
    width: clamp(200px, 20vw, 300px);
    height: clamp(200px, 20vw, 300px);
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    object-fit: cover;
    object-position: center 20%;
    border: 3px solid var(--line-2);
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.55),
        0 0 0 12px rgba(255, 138, 76, 0.06);
    filter: saturate(1.05);
    animation: portraitFloat 7s ease-in-out infinite;
}

@keyframes portraitFloat {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .hero__portrait img {
        animation: none;
    }
}

/* Stack on narrower screens: portrait above text, still round */
@media (max-width: 900px) {
    .hero {
        grid-template-columns: 1fr;
        justify-items: start;
        row-gap: 32px;
        padding-bottom: 120px;
    }

    .hero__portrait {
        order: -1;
        justify-self: start;
    }

    .hero__portrait img {
        width: clamp(140px, 40vw, 200px);
        height: clamp(140px, 40vw, 200px);
    }
}

/* Hero actions */
.hero__actions {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 44px;
}

.hero__socials {
    display: flex;
    gap: 12px;
}

.hero__socials a,
.footer__socials a {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line-2);
    border-radius: 50%;
    color: var(--muted);
    transition: color 0.3s, border-color 0.3s, transform 0.3s var(--ease), background 0.3s;
}

.hero__socials a:hover,
.footer__socials a:hover {
    color: var(--accent);
    border-color: var(--accent);
    transform: translateY(-3px);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 26px;
    border-radius: 100px;
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.01em;
    transition: transform 0.3s var(--ease), box-shadow 0.3s, background 0.3s;
}

.btn--primary {
    background: linear-gradient(120deg, var(--accent), var(--accent-2));
    color: #1a1005;
}

.btn--primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(255, 138, 76, 0.3);
}

.hero__eyebrow {
    font-size: 0.85rem;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 28px;
}

.hero__title {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: clamp(3.5rem, 1rem + 15vw, 12rem);
    line-height: 0.86;
    letter-spacing: -0.04em;
    margin-bottom: 34px;
}

.hero__title span {
    display: block;
}

.hero__title-accent {
    color: transparent;
    -webkit-text-stroke: 1.5px var(--accent);
    text-stroke: 1.5px var(--accent);
}

.hero__lead {
    font-size: clamp(1.15rem, 1rem + 0.8vw, 1.6rem);
    color: var(--text);
    max-width: 46ch;
    line-height: 1.5;
    margin-bottom: 40px;
}

.hero__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 14px 34px;
    margin-bottom: 56px;
}

.hero__meta span {
    font-size: 0.95rem;
    color: var(--text);
}

.hero__meta em {
    display: block;
    font-style: normal;
    font-size: 0.72rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--faint);
    margin-bottom: 3px;
}

.hero__scroll {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 0.8rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--muted);
    transition: color 0.3s;
}

.hero__scroll:hover {
    color: var(--accent);
}

.hero__scroll svg {
    animation: bob 1.8s var(--ease) infinite;
}

@keyframes bob {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(5px);
    }
}

.hero__marquee {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 18px 0;
    border-top: 1px solid var(--line);
    overflow: hidden;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}

.hero__marquee-track {
    display: flex;
    gap: 28px;
    white-space: nowrap;
    width: max-content;
    animation: marquee 26s linear infinite;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: clamp(1rem, 0.9rem + 0.8vw, 1.6rem);
    color: var(--faint);
}

.hero__marquee-track span:nth-child(even) {
    color: var(--accent);
}

@keyframes marquee {
    to {
        transform: translateX(-50%);
    }
}

@media (prefers-reduced-motion: reduce) {
    .hero__marquee-track {
        animation: none;
    }

    .hero__scroll svg {
        animation: none;
    }
}

/* ---------- About ---------- */
.about__lead {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(1.6rem, 1rem + 2.4vw, 3rem);
    line-height: 1.2;
    letter-spacing: -0.01em;
    margin-bottom: 48px;
    max-width: 22ch;
}

.about__cols {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 32px 56px;
    color: var(--muted);
    max-width: 900px;
}

/* ---------- Timeline ---------- */
.timeline {
    list-style: none;
    position: relative;
    margin-left: 6px;
    padding-left: 34px;
}

.timeline::before {
    content: "";
    position: absolute;
    left: 5px;
    top: 6px;
    bottom: 6px;
    width: 2px;
    background: linear-gradient(var(--accent), var(--accent-3));
    opacity: 0.4;
}

.timeline__item {
    position: relative;
    padding-bottom: 46px;
}

.timeline__item:last-child {
    padding-bottom: 0;
}

.timeline__item::before {
    content: "";
    position: absolute;
    left: -34px;
    top: 7px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--bg);
    border: 2px solid var(--accent);
    transition: background 0.3s, box-shadow 0.3s;
}

.timeline__item:hover::before {
    background: var(--accent);
    box-shadow: 0 0 0 6px rgba(255, 138, 76, 0.15);
}

.timeline__when {
    font-size: 0.8rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 8px;
}

.timeline__body h3 {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: clamp(1.3rem, 1rem + 1vw, 1.85rem);
    line-height: 1.2;
    margin-bottom: 12px;
}

.timeline__org {
    display: block;
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--muted);
    letter-spacing: 0.02em;
    margin-top: 2px;
}

.timeline__body p {
    color: var(--muted);
    max-width: 62ch;
}

/* ---------- Cards ---------- */
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.cards--sport {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 28px 26px;
    transition: transform 0.4s var(--ease), border-color 0.4s, background 0.4s;
}

.card:hover {
    transform: translateY(-4px);
    border-color: var(--line-2);
    background: var(--surface-2);
}

.card h3 {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.35rem;
    margin-bottom: 6px;
}

.card__meta {
    font-size: 0.78rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 14px;
}

.card p {
    color: var(--muted);
}

.grades {
    list-style: none;
    margin-top: 16px;
    display: grid;
    gap: 6px;
}

.grades li {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    font-size: 0.9rem;
    padding: 5px 0;
    border-bottom: 1px dashed var(--line);
}

.grades li span {
    color: var(--muted);
}

.grades li b {
    font-family: var(--font-display);
    color: var(--accent-2);
    font-size: 1rem;
}

/* ---------- People (family + friends) ---------- */
.people {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 18px;
}

.person {
    background: linear-gradient(160deg, var(--surface), var(--bg-soft));
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 26px 26px 28px;
    position: relative;
    overflow: hidden;
    transition: transform 0.4s var(--ease), border-color 0.4s;
}

.person::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 0;
    background: linear-gradient(var(--accent), var(--accent-3));
    transition: height 0.5s var(--ease);
}

.person:hover {
    transform: translateY(-4px);
    border-color: var(--line-2);
}

.person:hover::before {
    height: 100%;
}

.person--wide {
    grid-column: 1 / -1;
}

.person h3 {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.35rem;
    margin-bottom: 12px;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 10px;
}

.person__rel {
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 0.68rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent);
    padding: 3px 9px;
    border: 1px solid rgba(255, 138, 76, 0.4);
    border-radius: 100px;
}

.person p {
    color: var(--muted);
}

/* ---------- Places (travel) ---------- */
.places {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 18px;
}

.place {
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 26px;
    background: var(--surface);
    transition: transform 0.4s var(--ease), border-color 0.4s;
}

.place:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
}

.place__loc {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 1.7rem;
    line-height: 1;
    margin-bottom: 16px;
    letter-spacing: -0.01em;
}

.place__loc em {
    display: block;
    font-family: var(--font-body);
    font-style: normal;
    font-weight: 500;
    font-size: 0.75rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--accent);
    margin-top: 8px;
}

.place p {
    color: var(--muted);
}

/* ---------- Section tints ---------- */
.section--work {
    background: radial-gradient(120% 60% at 0% 0%, rgba(124, 108, 255, 0.06), transparent 60%);
}

.section--family {
    background: radial-gradient(120% 60% at 100% 0%, rgba(255, 138, 76, 0.06), transparent 60%);
}

.section--travel {
    background: radial-gradient(120% 60% at 0% 0%, rgba(255, 209, 102, 0.06), transparent 60%);
}

.section--sport {
    background: radial-gradient(120% 60% at 100% 100%, rgba(124, 108, 255, 0.06), transparent 60%);
}

.section--work,
.section--family,
.section--travel,
.section--sport {
    max-width: none;
}

.section--work>*,
.section--family>*,
.section--travel>*,
.section--sport>* {
    max-width: var(--maxw);
    margin-left: auto;
    margin-right: auto;
}

/* ---------- Spotify ---------- */
.section--spotify {
    background: radial-gradient(120% 60% at 100% 0%, rgba(30, 215, 96, 0.07), transparent 60%);
    max-width: none;
}

.section--spotify>* {
    max-width: var(--maxw);
    margin-left: auto;
    margin-right: auto;
}

/* Now playing banner */
.nowplaying {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 16px 20px;
    margin-bottom: 24px;
    border: 1px solid rgba(30, 215, 96, 0.35);
    border-radius: 16px;
    background: linear-gradient(120deg, rgba(30, 215, 96, 0.10), rgba(30, 215, 96, 0.02));
    transition: transform 0.35s var(--ease), border-color 0.35s;
}

a.nowplaying:hover {
    transform: translateY(-3px);
    border-color: #1ed760;
}

.nowplaying__art {
    flex: 0 0 auto;
    width: 64px;
    height: 64px;
    border-radius: 10px;
    background-size: cover;
    background-position: center;
    background-color: var(--surface-2);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.nowplaying__art--empty::after {
    content: "\266A";
    /* music note */
    display: grid;
    place-items: center;
    height: 100%;
    color: var(--faint);
    font-size: 1.6rem;
}

.nowplaying__body {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.nowplaying__label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #1ed760;
}

.nowplaying__name {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.25rem;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nowplaying__artist {
    font-size: 0.92rem;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Animated equalizer bars, shown only while playing */
.nowplaying__equalizer {
    display: inline-flex;
    align-items: flex-end;
    gap: 2px;
    height: 12px;
}

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

.nowplaying__equalizer i:nth-child(2) {
    animation-delay: 0.2s;
}

.nowplaying__equalizer i:nth-child(3) {
    animation-delay: 0.4s;
}

.nowplaying__equalizer i:nth-child(4) {
    animation-delay: 0.1s;
}

@keyframes eq {

    0%,
    100% {
        transform: scaleY(0.3);
    }

    50% {
        transform: scaleY(1);
    }
}

@media (prefers-reduced-motion: reduce) {
    .nowplaying__equalizer i {
        animation: none;
        transform: scaleY(0.6);
    }
}

.spotify__status {
    color: var(--muted);
    font-size: 1.05rem;
    padding: 20px 0;
}

.spotify__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
}

.track {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface);
    transition: transform 0.35s var(--ease), border-color 0.35s, background 0.35s;
}

a.track:hover {
    transform: translateY(-3px);
    border-color: #1ed760;
    background: var(--surface-2);
}

.track__art {
    flex: 0 0 auto;
    width: 56px;
    height: 56px;
    border-radius: 8px;
    object-fit: cover;
    background: var(--surface-2);
}

.track__art--empty {
    display: grid;
    place-items: center;
    color: var(--faint);
    font-size: 1.4rem;
}

.track__info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.track__name {
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.track__artist {
    font-size: 0.9rem;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.track__when {
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #1ed760;
    margin-top: 3px;
}

.spotify__meta {
    margin-top: 18px;
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--faint);
}

/* Pager */
.spotify__pager {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 26px;
    flex-wrap: wrap;
}

.pager__btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border: 1px solid var(--line-2);
    border-radius: 100px;
    background: var(--surface);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.25s, background 0.25s, transform 0.25s var(--ease), opacity 0.25s;
}

.pager__btn:hover:not(:disabled) {
    border-color: #1ed760;
    background: var(--surface-2);
    transform: translateY(-2px);
}

.pager__btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.pager__status {
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--faint);
    text-align: center;
    flex: 1 1 auto;
}

/* ---------- Bookshelf (Audible) ---------- */
.section--books {
    background: radial-gradient(120% 60% at 100% 100%, rgba(124, 108, 255, 0.07), transparent 60%);
    max-width: none;
}

.section--books>* {
    max-width: var(--maxw);
    margin-left: auto;
    margin-right: auto;
}

.books__status {
    color: var(--muted);
    font-size: 1.05rem;
    padding: 20px 0;
}

.books__grid {
    display: grid;
    /* Fixed-width columns (not 1fr) so cells never stretch. A partial final
       row then simply left-aligns at the natural cover width, with no odd
       stretched empty space on the right. */
    grid-template-columns: repeat(auto-fill, minmax(150px, 170px));
    gap: 22px 18px;
    justify-content: start;
    align-items: start;
}

.book {
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: transform 0.35s var(--ease);
}

a.book:hover {
    transform: translateY(-5px);
}

.book__cover {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 10px;
    background: var(--surface-2);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.45);
    transition: box-shadow 0.35s;
}

a.book:hover .book__cover {
    box-shadow: 0 20px 44px rgba(0, 0, 0, 0.6), 0 0 0 2px var(--accent-3);
}

.book__cover--empty {
    display: grid;
    place-items: center;
    color: var(--faint);
    font-size: 2.4rem;
}

.book__info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.book__title {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.98rem;
    line-height: 1.25;
    color: var(--text);
    /* clamp to two lines */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.book__author {
    font-size: 0.82rem;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.book__year {
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent-3);
    margin-top: 2px;
}

/* ---------- Contact ---------- */
.section--contact {
    background: radial-gradient(120% 60% at 0% 100%, rgba(255, 138, 76, 0.07), transparent 60%);
    max-width: none;
}

.section--contact>* {
    max-width: var(--maxw);
    margin-left: auto;
    margin-right: auto;
}

.contact {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 18px;
}

.contact__card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 30px 28px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 16px;
    transition: transform 0.4s var(--ease), border-color 0.4s, background 0.4s;
}

.contact__card:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
    background: var(--surface-2);
}

.contact__icon {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(255, 138, 76, 0.12);
    color: var(--accent);
    margin-bottom: 14px;
}

.contact__label {
    font-size: 0.72rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--faint);
}

.contact__value {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.15rem;
    color: var(--text);
    word-break: break-word;
}

/* ---------- Footer ---------- */
.footer {
    text-align: center;
    padding: clamp(80px, 12vh, 140px) 24px 70px;
    border-top: 1px solid var(--line);
}

.footer__socials {
    display: flex;
    justify-content: center;
    gap: 14px;
    margin: 24px 0 28px;
}

.footer__big {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: clamp(3rem, 1rem + 12vw, 9rem);
    line-height: 1;
    letter-spacing: -0.03em;
    background: linear-gradient(120deg, var(--text), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 20px;
}

.footer__note {
    color: var(--muted);
    margin-bottom: 6px;
}

.footer__copy {
    color: var(--faint);
    font-size: 0.85rem;
}

/* ---------- Reveal animation ---------- */
.reveal {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity 0.8s var(--ease) var(--d, 0s), transform 0.8s var(--ease) var(--d, 0s);
    will-change: opacity, transform;
}

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

@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
}