/* ═══════════════════════════════════════════════
   DESIGN TOKENS
═══════════════════════════════════════════════ */
:root {
    --bg: #04080f;
    --surface: #0d1117;
    --glass: rgba(255, 255, 255, 0.04);
    --glass-hover: rgba(255, 255, 255, 0.09);
    --border: rgba(255, 255, 255, 0.08);
    --border-glow: rgba(255, 255, 255, 0.18);
    --text: #e8edf4;
    --muted: rgba(232, 237, 244, 0.45);
    --accent: #38bdf8;
    --accent2: #818cf8;
    --radius-card: 20px;
    --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.5);
    --font-display: 'Syne', sans-serif;
    --font-body: 'DM Sans', sans-serif;
    --card-size: 148px;
    --img-size: 56px;

    /* Banner height: enough room to show content without cropping top */
    --banner-h: clamp(180px, 30vw, 320px);
    /* How far the avatar overlaps the banner bottom edge */
    --avatar-overlap: 54px;
    /* Avatar ring diameter */
    --avatar-d: 108px;
}

/* ═══════════════════════════════════════════════
   RESET & BASE
═══════════════════════════════════════════════ */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ═══════════════════════════════════════════════
   PARTICLE CANVAS
═══════════════════════════════════════════════ */
#bg-canvas {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* ═══════════════════════════════════════════════
   HERO / HEADER
═══════════════════════════════════════════════ */
.hero {
    position: relative;
    z-index: 1;
    /* Reserve space below banner for the overlapping profile block */
    padding-bottom: calc(var(--avatar-d) / 2 + 56px);
}

/* ── Banner ── */
.banner-wrap {
    position: relative;
    width: 100%;
    height: var(--banner-h);
    overflow: hidden;
    /* Prevent any sub-pixel gap at the very top */
    display: block;
}

.banner {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Always anchor to the TOP so the top edge is never clipped */
    object-position: top center;
    display: block;
}

.banner-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom,
            transparent 20%,
            rgba(4, 8, 15, 0.55) 70%,
            var(--bg) 100%);
}

/* ── Profile block ──
   Sits half-inside the banner, half below it.
   Uses a flex column so it stays centred on every viewport.
─────────────────────────────────────────────── */
.profile {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    width: max-content;
    max-width: 90vw;
    /* Translate upwards so the ring centre aligns with the banner bottom */
    transform: translateX(-50%) translateY(calc(var(--avatar-d) / 2));
}

/* Spinning gradient ring around avatar */
.avatar-ring {
    position: relative;
    width: var(--avatar-d);
    height: var(--avatar-d);
    margin: 0 auto;
    border-radius: 50%;
    padding: 4px;
    background: conic-gradient(from 0deg,
            var(--accent),
            var(--accent2),
            var(--accent),
            var(--accent2),
            var(--accent));
    animation: spin-ring 6s linear infinite;
}

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

.logo {
    width: calc(var(--avatar-d) - 8px);
    height: calc(var(--avatar-d) - 8px);
    border-radius: 50%;
    object-fit: cover;
    object-position: center;
    display: block;
    background: var(--surface);
    border: 3px solid var(--bg);
    position: relative;
    z-index: 1;
}

.display-name {
    font-family: var(--font-display);
    font-size: clamp(1.3rem, 4vw, 1.9rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-top: 12px;
    white-space: nowrap;
    text-shadow: 0 2px 20px rgba(56, 189, 248, 0.3);
}

.tagline {
    font-size: 0.78rem;
    color: var(--muted);
    font-weight: 300;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-top: 4px;
    white-space: nowrap;
}

/* ═══════════════════════════════════════════════
   SECTION BLOCK & LABEL
═══════════════════════════════════════════════ */
main {
    position: relative;
    z-index: 1;
    padding: 0 clamp(16px, 5vw, 60px) 60px;
}

.section-block {
    max-width: 900px;
    margin: 0 auto 8px;
}

/* Sleek label: two hairlines flanking the title */
.section-label {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
    /* First section gets top margin to push below the floating profile */
    padding-top: clamp(88px, 12vw, 108px);
}

.section-block+.section-block .section-label {
    /* Subsequent sections need less top space */
    padding-top: clamp(32px, 5vw, 48px);
}

.section-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(to right,
            transparent,
            var(--border-glow) 40%,
            var(--border-glow) 60%,
            transparent);
}

/* Reverse gradient direction for right line */
.section-label .section-line:last-child {
    background: linear-gradient(to left,
            transparent,
            var(--border-glow) 40%,
            var(--border-glow) 60%,
            transparent);
}

.section-title {
    font-family: var(--font-display);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--muted);
    white-space: nowrap;
    /* Subtle glow on the label text */
    text-shadow: 0 0 12px rgba(56, 189, 248, 0.3);
}

/* ═══════════════════════════════════════════════
   GRID
═══════════════════════════════════════════════ */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(var(--card-size), 1fr));
    gap: clamp(12px, 2.5vw, 22px);
}

/* Support section: centre cards if there are only 1-2 */
.grid--centered {
    justify-content: center;
    grid-template-columns: repeat(auto-fit, minmax(var(--card-size), var(--card-size)));
}

/* ═══════════════════════════════════════════════
   SOCIAL CARD
═══════════════════════════════════════════════ */
.card {
    background: var(--glass);
    border: 1px solid var(--border);
    border-radius: var(--radius-card);
    padding: 24px 16px 20px;
    text-align: center;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);

    /* Staggered entrance */
    opacity: 0;
    transform: translateY(28px) scale(0.96);
    transition:
        transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
        border-color 0.3s ease,
        box-shadow 0.3s ease,
        background 0.3s ease,
        opacity 0.4s ease;
}

.card.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Colour spotlight */
.card::before {
    content: '';
    position: absolute;
    inset: -50%;
    border-radius: 50%;
    background: radial-gradient(circle, var(--card-color, transparent) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

/* Shine sweep */
.card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(105deg,
            transparent 40%,
            rgba(255, 255, 255, 0.07) 50%,
            transparent 60%);
    transition: left 0.5s ease;
    pointer-events: none;
}

.card:hover {
    background: var(--glass-hover);
    border-color: var(--border-glow);
    box-shadow:
        var(--shadow-card),
        0 0 0 1px var(--border-glow),
        0 0 30px rgba(56, 189, 248, 0.08);
    transform: translateY(-6px) scale(1.03);
}

.card:hover::before {
    opacity: 0.06;
}

.card:hover::after {
    left: 140%;
}

.card:active {
    transform: translateY(-2px) scale(1.01);
    transition-duration: 0.1s;
}

/* ── Card Image ── */
.card-img-wrap {
    width: var(--img-size);
    height: var(--img-size);
    margin: 0 auto 14px;
    border-radius: 14px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.card:hover .card-img-wrap {
    transform: scale(1.12) rotate(-2deg);
}

.card-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
}

/* ── Card Label ── */
.card p {
    font-family: var(--font-display);
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text);
    transition: color 0.25s ease;
}

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

/* ── Bottom accent bar ── */
.card-accent {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 50%;
    height: 2px;
    border-radius: 2px 2px 0 0;
    background: var(--card-color, var(--accent));
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.card:hover .card-accent {
    transform: translateX(-50%) scaleX(1);
}

/* ═══════════════════════════════════════════════
   MUSIC TOGGLE
═══════════════════════════════════════════════ */
#music-toggle {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 100;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: border-color 0.25s, box-shadow 0.25s, transform 0.2s;
    color: var(--text);
}

#music-toggle:hover {
    border-color: var(--border-glow);
    box-shadow: 0 0 16px rgba(56, 189, 248, 0.25);
    transform: scale(1.1);
}

/* ═══════════════════════════════════════════════
   RESPONSIVE TWEAKS
═══════════════════════════════════════════════ */

/* ── Small phones (portrait) ── */
@media (max-width: 480px) {
    :root {
        --card-size: 120px;
        --img-size: 44px;
        --banner-h: 140px;
        --avatar-d: 88px;
        --avatar-overlap: 44px;
    }

    .section-label {
        padding-top: 72px;
    }

    .display-name {
        font-size: 1.1rem;
    }
}

/* ── Phones up to 600px ── */
@media (max-width: 600px) {
    :root {
        --card-size: 120px;
        --img-size: 44px;
    }
}

/* ── Tablets / small desktops ── */
@media (min-width: 900px) {
    :root {
        --card-size: 160px;
        --img-size: 64px;
    }
}

/* ── Wide desktops ── */
@media (min-width: 1200px) {
    .section-block {
        max-width: 1000px;
    }
}

/* ── Landscape on mobile (short viewports) ── */
@media (orientation: landscape) and (max-height: 500px) {
    :root {
        --banner-h: 110px;
        --avatar-d: 80px;
    }

    .section-label {
        padding-top: 60px;
    }

    .display-name {
        font-size: 1rem;
    }

    .tagline {
        font-size: 0.68rem;
    }
}

/* ── Landscape on mid-size tablets ── */
@media (orientation: landscape) and (min-height: 500px) and (max-height: 700px) {
    :root {
        --banner-h: clamp(130px, 22vw, 200px);
    }
}