/* === BASE STYLES (grid pattern, dark) — colours below are swapped live by script.js === */
:root {
    --accent-d: #ff3b3b;
    --accent-l-d: #ff5555;
    --glow-d: 255, 59, 59;
    --accent-l: #3b82f6;
    --accent-l-l: #60a5fa;
    --glow-l: 59, 130, 246;
    --accent-rgb: 255, 59, 59;
    --accent-rgb-l: 59, 130, 246;
    --body-radial: 255, 59, 59;
    --body-linear: 255, 196, 196;
    --light-bg-top: #ffdcdc;

    --bg-color: #050505;
    --card-bg: rgba(26, 26, 26, 0.6);
    --text-main: #ffffff;
    --text-muted: #888899;
    --accent: var(--accent-d);
    --accent-light: var(--accent-l-d);
    --hover-bg: rgba(45, 45, 45, 0.8);
    --border-color: rgba(255, 255, 255, 0.08);
    --shadow: rgba(0, 0, 0, 0.5);
    --profile-glow: rgba(var(--glow-d), 0.4);
    --video-overlay: rgba(0, 0, 0, 0.55);
    --panel-bg: rgba(18, 18, 20, 0.92);
    --glass-bg: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
    --glass-bg-hover: linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02));
    --glass-border-top: rgba(255, 255, 255, 0.35);
    --glass-border-bottom: rgba(0, 0, 0, 0.05);
    --glass-sheen: rgba(255, 255, 255, 0.30);
    --glass-sheen-soft: rgba(255, 255, 255, 0.12);
    --glass-edge: rgba(255, 255, 255, 0.18);
    --glass-blur: 1px;
    --glass-saturate: 100%;
    --vignette-color: rgba(0, 0, 0, 0.15);
    --hub-font: 'JetBrains Mono', monospace;
}

[data-theme="light"] {
    --bg-color: #ffffff;
    --card-bg: rgba(245, 245, 247, 0.6);
    --text-main: #1a1a1a;
    --text-muted: #666666;
    --accent: var(--accent-l);
    --accent-light: var(--accent-l-l);
    --hover-bg: rgba(229, 231, 235, 0.8);
    --border-color: rgba(0, 0, 0, 0.08);
    --shadow: rgba(0, 0, 0, 0.1);
    --profile-glow: rgba(var(--glow-l), 0.5);
    --video-overlay: rgba(255, 255, 255, 0.6);
    --panel-bg: rgba(255, 255, 255, 0.92);
    --glass-bg: linear-gradient(180deg, rgba(255, 255, 255, 0.35), rgba(255, 255, 255, 0.15));
    --glass-bg-hover: linear-gradient(180deg, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0.30));
    --glass-border-top: rgba(255, 255, 255, 0.95);
    --glass-border-bottom: rgba(0, 0, 0, 0.06);
    --glass-sheen: rgba(255, 255, 255, 0.9);
    --glass-sheen-soft: rgba(255, 255, 255, 0.5);
    --glass-edge: rgba(255, 255, 255, 0.8);
    --vignette-color: rgba(30, 41, 59, 0.15);
}

/* === NETWORK PATTERN OVERRIDES === */
body.pattern-network {
    --bg-color: #151517;
    --card-bg: rgba(255, 255, 255, 0.04);
    --text-main: #f9fafb;
    --text-muted: #adb2b8;
    --hover-bg: rgba(255, 255, 255, 0.08);
    --border-color: hsla(0, 0%, 100%, 0.12);
    --profile-glow: rgba(var(--glow-d), 0.35);
    --hub-font: 'Inter', -apple-system, 'Segoe UI', Roboto, system-ui, sans-serif;
    background-image: radial-gradient(1200px 700px at 50% -10%, rgba(var(--body-radial), 0.16), transparent 60%),
        linear-gradient(180deg, rgba(var(--body-linear), 0.12) 0%, transparent 100%);
}

body.pattern-network[data-theme="light"] {
    --profile-glow: rgba(var(--glow-l), 0.25);
    background-image: linear-gradient(180deg, var(--light-bg-top) 0%, rgba(250, 250, 250, 0) 100%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--hub-font);
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    min-height: 100dvh;
    padding: 20px;
    padding-top: calc(20px + env(safe-area-inset-top));
    padding-bottom: calc(20px + env(safe-area-inset-bottom));
    transition: background-color 0.3s ease, color 0.3s ease, background-image 0.3s ease;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior-y: contain;
}

/* Desktop: Custom cursor, Mobile: Default */
@media (hover: hover) and (pointer: fine) {
    body,
    .customize-toggle,
    .customize-panel button,
    .panel-close {
        cursor: none;
    }
}

/* === CUSTOM CURSOR === */
.custom-cursor {
    position: fixed;
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    mix-blend-mode: difference;
    transition: transform 0.1s ease;
    transform: translate(-50%, -50%);
}

.cursor-follower {
    position: fixed;
    width: 35px;
    height: 35px;
    border: 2px solid var(--accent);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9998;
    transition: all 0.15s ease;
    opacity: 0.5;
    transform: translate(-50%, -50%);
}

.cursor-follower.hover {
    width: 50px;
    height: 50px;
    border-color: var(--accent-light);
    opacity: 0.8;
    background: rgba(var(--accent-rgb), 0.1);
}

[data-theme="light"] .cursor-follower.hover {
    background: rgba(var(--accent-rgb-l), 0.1);
}

/* === PATTERN LAYERS === */
/* Grid pattern (animated grid + floating particles) */
.bg-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    opacity: 0.03;
    display: none;
    background-image:
        linear-gradient(var(--text-main) 1px, transparent 1px),
        linear-gradient(90deg, var(--text-main) 1px, transparent 1px);
    background-size: 60px 60px;
    animation: gridMove 20s linear infinite;
}

body.pattern-grid .bg-grid {
    display: block;
}

@keyframes gridMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(60px, 60px); }
}

.particle {
    position: fixed;
    background: var(--accent);
    border-radius: 50%;
    pointer-events: none;
    opacity: 0;
    z-index: 0;
    display: none;
    animation: floatParticle linear infinite;
}

body.pattern-grid .particle {
    display: block;
}

@keyframes floatParticle {
    0% {
        opacity: 0;
        transform: translateY(100vh) scale(0) rotate(0deg);
    }
    10% {
        opacity: 0.6;
    }
    90% {
        opacity: 0.6;
    }
    100% {
        opacity: 0;
        transform: translateY(-100px) scale(1) rotate(360deg);
    }
}

/* Network pattern (aurora + dot grid + particle network + vignette + grain) */
.bg-aurora,
.bg-particles,
.bg-network,
.bg-vignette,
.bg-grain {
    display: none;
}

body.pattern-network .bg-aurora,
body.pattern-network .bg-particles,
body.pattern-network .bg-network,
body.pattern-network .bg-vignette,
body.pattern-network .bg-grain {
    display: block;
}

.bg-aurora {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 50%, rgba(0, 0, 0, 0.6) 85%, transparent 100%);
    mask-image: linear-gradient(to bottom, #000 0%, #000 50%, rgba(0, 0, 0, 0.6) 85%, transparent 100%);
}

.bg-particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 55%, rgba(0, 0, 0, 0.88) 78%, transparent 100%);
    mask-image: linear-gradient(to bottom, #000 0%, #000 55%, rgba(0, 0, 0, 0.88) 78%, transparent 100%);
}

.bg-network {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 60%, rgba(0, 0, 0, 0.9) 82%, transparent 100%);
    mask-image: linear-gradient(to bottom, #000 0%, #000 60%, rgba(0, 0, 0, 0.9) 82%, transparent 100%);
}

.bg-vignette {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    background: radial-gradient(ellipse 120% 90% at 50% 45%, transparent 55%, var(--vignette-color) 100%);
}

.bg-grain {
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    pointer-events: none;
    z-index: 0;
    opacity: 0.035;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    animation: grainShift 0.9s steps(6) infinite;
}

@keyframes grainShift {
    0% { transform: translate(0, 0); }
    16% { transform: translate(-2%, 1%); }
    33% { transform: translate(1%, -2%); }
    50% { transform: translate(-1%, 2%); }
    66% { transform: translate(2%, 1%); }
    83% { transform: translate(0, -1%); }
    100% { transform: translate(0, 0); }
}

.cursor-glow {
    position: fixed;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--profile-glow) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
    transform: translate(-50%, -50%);
    opacity: 0.3;
    transition: opacity 0.3s ease;
}

/* === BACKGROUND VIDEO === */
.bg-video-wrap {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.bg-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.bg-video-poster {
    display: none;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bg-video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--video-overlay);
    transition: background 0.3s ease;
}

body.bg-mode-plain .bg-video-wrap {
    display: none;
}

/* If the video can't play, fall back to the poster image */
body.video-fallback .bg-video {
    display: none;
}

body.video-fallback .bg-video-poster {
    display: block;
}

/* === CONTAINER === */
.container {
    width: 100%;
    max-width: 420px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    animation: containerFadeIn 0.8s ease-out;
    position: relative;
    z-index: 1;
}

@keyframes containerFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === THEME, SOUND & CUSTOMIZE TOGGLES === */
.theme-toggle, .sound-toggle, .customize-toggle {
    position: fixed;
    top: calc(20px + env(safe-area-inset-top));
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 100;
    backdrop-filter: blur(10px);
    touch-action: manipulation;
}

.customize-toggle {
    top: auto;
    bottom: calc(20px + env(safe-area-inset-bottom));
    right: calc(20px + env(safe-area-inset-right));
}

.theme-toggle {
    right: calc(20px + env(safe-area-inset-right));
}

.sound-toggle {
    right: calc(75px + env(safe-area-inset-right));
}

.theme-toggle:hover, .sound-toggle:hover, .customize-toggle:hover {
    transform: scale(1.1) rotate(15deg);
    border-color: var(--accent);
}

.theme-toggle svg, .sound-toggle svg, .customize-toggle svg {
    width: 22px;
    height: 22px;
    fill: var(--text-main);
    transition: fill 0.3s ease;
}

.customize-toggle svg {
    width: 20px;
    height: 20px;
}

.theme-toggle:focus-visible,
.sound-toggle:focus-visible,
.customize-toggle:focus-visible,
.email-footer:focus-visible,
.panel-close:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* === CUSTOMIZE PANEL === */
.customize-panel {
    position: fixed;
    right: calc(20px + env(safe-area-inset-right));
    bottom: calc(80px + env(safe-area-inset-bottom));
    width: 264px;
    max-height: calc(100vh - 160px);
    overflow-y: auto;
    background: var(--panel-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 16px;
    z-index: 999;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    flex-direction: column;
    gap: 14px;
    opacity: 0;
    transform: translateY(12px) scale(0.97);
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
    box-shadow: 0 16px 48px var(--shadow);
}

.customize-panel.open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.panel-title {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.panel-close {
    background: none;
    border: none;
    padding: 4px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease, transform 0.3s ease;
}

.panel-close:hover {
    color: var(--accent);
    transform: rotate(90deg);
}

.panel-close svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.panel-section h4 {
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.swatch {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 2px solid transparent;
    outline: none;
    padding: 0;
    position: relative;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.swatch:hover {
    transform: scale(1.15);
}

.swatch.active {
    border-color: var(--text-main);
    transform: scale(1.1);
}

.seg {
    display: flex;
    gap: 6px;
}

.seg button {
    flex: 1;
    padding: 8px 0;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: transparent;
    color: var(--text-muted);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    transition: all 0.25s ease;
    font-family: var(--hub-font);
}

.seg button:hover {
    border-color: var(--accent);
    color: var(--text-main);
}

.seg button.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #ffffff;
}

.panel-reset {
    padding: 9px 0;
    border-radius: 8px;
    border: 1px dashed var(--border-color);
    background: transparent;
    color: var(--text-muted);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    transition: all 0.25s ease;
    font-family: var(--hub-font);
}

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

.combo-label {
    font-size: 0.62rem;
    text-align: center;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    border-top: 1px solid var(--border-color);
    padding-top: 10px;
}

/* === PROFILE SECTION === */
.profile-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.pfp-wrapper {
    position: relative;
    width: 120px;
    height: 120px;
}

.pfp-wrapper::before {
    content: '';
    position: absolute;
    top: -6px;
    left: -6px;
    right: -6px;
    bottom: -6px;
    border-radius: 50%;
    border: 2px solid transparent;
    border-top-color: var(--accent);
    border-right-color: var(--accent);
    animation: spinRing 4s linear infinite;
    z-index: 1;
}

@keyframes spinRing {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.pfp {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--card-bg);
    position: relative;
    z-index: 2;
    animation: pulseGlow 3s ease-in-out infinite;
    transition: transform 0.3s ease;
}

.pfp:hover {
    transform: scale(1.05);
}

@keyframes pulseGlow {
    0%, 100% {
        box-shadow: 0 0 20px var(--profile-glow),
                    0 0 40px var(--profile-glow);
    }
    50% {
        box-shadow: 0 0 30px var(--profile-glow),
                    0 0 60px var(--profile-glow);
    }
}

.status-dot {
    position: absolute;
    bottom: 8px;
    right: 8px;
    width: 18px;
    height: 18px;
    background: #22c55e;
    border-radius: 50%;
    border: 3px solid var(--bg-color);
    z-index: 3;
    animation: statusPulse 2s ease-in-out infinite;
}

@keyframes statusPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(34, 197, 94, 0);
    }
}

h1 {
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: 1px;
    position: relative;
    display: inline-block;
}

.glitch-wrapper {
    position: relative;
    display: inline-block;
}

.glitch-wrapper::before,
.glitch-wrapper::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
}

.glitch-wrapper:hover::before {
    animation: glitch1 0.3s ease-in-out;
    color: var(--accent);
    opacity: 0.8;
}

.glitch-wrapper:hover::after {
    animation: glitch2 0.3s ease-in-out;
    color: var(--accent-light);
    opacity: 0.8;
}

@keyframes glitch1 {
    0% { transform: translate(0); }
    20% { transform: translate(-2px, 2px); }
    40% { transform: translate(2px, -2px); }
    60% { transform: translate(-1px, 1px); }
    80% { transform: translate(1px, -1px); }
    100% { transform: translate(0); }
}

@keyframes glitch2 {
    0% { transform: translate(0); }
    20% { transform: translate(2px, -2px); }
    40% { transform: translate(-2px, 2px); }
    60% { transform: translate(1px, -1px); }
    80% { transform: translate(-1px, 1px); }
    100% { transform: translate(0); }
}

.subtitle {
    color: var(--text-muted);
    font-size: 0.8rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    animation: fadeInUp 0.8s ease-out 0.3s both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === LINKS SECTION === */
.links-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
}

.link-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-radius: 12px;
    text-decoration: none;
    color: var(--text-main);
    touch-action: manipulation;
    -webkit-user-select: none;
    user-select: none;
    border: 1px solid var(--border-color);
    background-color: var(--card-bg);
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(20px);
    animation: cardSlideIn 0.5s ease-out forwards;
    transition: all 0.3s ease;
}

.link-card:nth-child(1) { animation-delay: 0.4s; }
.link-card:nth-child(2) { animation-delay: 0.5s; }
.link-card:nth-child(3) { animation-delay: 0.6s; }
.link-card:nth-child(4) { animation-delay: 0.7s; }
.link-card:nth-child(5) { animation-delay: 0.8s; }

@keyframes cardSlideIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.link-card.ready {
    opacity: 1;
    transform: translateY(0);
}

/* Grid pattern card treatments */
body.pattern-grid .link-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.08),
        transparent
    );
    transition: left 0.6s ease;
}

body.pattern-grid .link-card:hover::before {
    left: 100%;
}

body.pattern-grid .link-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 12px;
    border: 1px solid transparent;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    pointer-events: none;
}

body.pattern-grid .link-card:hover::after {
    border-color: var(--accent);
    box-shadow: inset 0 0 20px rgba(var(--accent-rgb), 0.05);
}

body.pattern-grid .link-card:hover {
    background-color: var(--hover-bg);
}

/* Network pattern (liquid glass) card treatments */
body.pattern-network .link-card {
    --mx: 50%;
    --my: 50%;
    border-radius: 18px;
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
    -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
    box-shadow: inset 0 1px 0 var(--glass-edge), inset 0 -1px 0 rgba(255, 255, 255, 0.04), 0 8px 32px var(--shadow);
    transition: background 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease, transform 0.15s ease;
}

body.pattern-network .link-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(
        200% 120% at var(--mx) var(--my),
        rgba(255, 255, 255, 0.10),
        transparent 60%
    );
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

body.pattern-network .link-card:hover::before {
    opacity: 1;
}

body.pattern-network .link-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 18px;
    padding: 1px;
    background: linear-gradient(
        145deg,
        var(--glass-border-top),
        var(--glass-border-bottom)
    );
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    mask-composite: exclude;
    opacity: 0.8;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

body.pattern-network .link-card:hover {
    background: var(--glass-bg-hover);
    box-shadow: inset 0 1px 0 var(--glass-border-top), inset 0 -1px 0 rgba(255, 255, 255, 0.06), 0 12px 40px var(--shadow);
}

body.pattern-network .link-card:hover::after {
    opacity: 1;
}

.card-spotlight {
    position: absolute;
    top: 0;
    left: 0;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    pointer-events: none;
    display: none;
    background: radial-gradient(circle, var(--glass-sheen) 0%, var(--glass-sheen-soft) 45%, transparent 70%);
    mix-blend-mode: screen;
    opacity: 0;
    transform: translate(-50%, -50%);
    transition: opacity 0.4s ease, left 0.15s ease-out, top 0.15s ease-out;
    z-index: 2;
}

body.pattern-network .card-spotlight {
    display: block;
}

body.pattern-network .link-card:hover .card-spotlight {
    opacity: 1;
}

[data-theme="light"] .card-spotlight {
    mix-blend-mode: normal;
}

.link-card:focus {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.link-card:active {
    transform: scale(0.98);
}

.link-content {
    display: flex;
    align-items: center;
    gap: 15px;
    position: relative;
    z-index: 1;
}

.icon {
    width: 24px;
    height: 24px;
    fill: currentColor;
    transition: transform 0.3s ease, fill 0.3s ease;
}

.link-card:hover .icon {
    transform: scale(1.15) rotate(-5deg);
    fill: var(--accent);
}

.app-name {
    font-weight: 700;
    font-size: 1rem;
    position: relative;
}

.app-name::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1.5px;
    background: var(--accent);
    transition: width 0.3s ease;
}

.link-card:hover .app-name::after {
    width: 100%;
}

.arrow {
    opacity: 0.5;
    transition: transform 0.3s ease, opacity 0.3s ease;
    font-size: 1.1rem;
    position: relative;
    z-index: 1;
}

.link-card:hover .arrow {
    opacity: 1;
    transform: translateX(5px);
    color: var(--accent);
}

.ripple {
    position: absolute;
    border-radius: 50%;
    background: var(--accent);
    opacity: 0.3;
    transform: scale(0);
    animation: rippleAnim 0.6s ease-out;
    pointer-events: none;
}

@keyframes rippleAnim {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* === EMAIL FOOTER === */
.email-footer {
    margin-top: 1rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    letter-spacing: 0.5px;
    transition: color 0.3s ease;
    position: relative;
    display: inline-block;
    padding: 8px 16px;
    border-radius: 8px;
    opacity: 0;
    animation: fadeInUp 0.5s ease-out 1s both;
}

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

.copied-toast {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
    background: var(--accent);
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 700;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.copied-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(-15px);
}

/* === ACCESSIBILITY & REDUCED MOTION === */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .bg-grid { animation: none; }
    .particle { display: none; }
    .cursor-glow { display: none; }
    .custom-cursor { display: none; }
    .cursor-follower { display: none; }
    .bg-grain { animation: none; opacity: 0.02; }
    .bg-video { display: none; }
    .bg-video-poster { display: block; }
    body { cursor: auto; }
    .pfp-wrapper::before {
        animation: none;
        border: 2px solid var(--accent);
        opacity: 0.5;
    }
    .pfp {
        animation: none;
        box-shadow: 0 0 20px var(--profile-glow);
    }
    .status-dot {
        animation: none;
        box-shadow: none;
    }
    .link-card { transition: none; }
    .link-card:hover { transform: none; }
    .link-card::before, .link-card::after, .card-spotlight { display: none; }
}

/* === RESPONSIVE === */
@media (max-width: 480px) {
    .container { gap: 1.8rem; }
    h1 { font-size: 1.4rem; }
    .theme-toggle, .sound-toggle {
        width: 44px;
        height: 44px;
        top: calc(15px + env(safe-area-inset-top));
    }
    .theme-toggle { right: calc(15px + env(safe-area-inset-right)); }
    .sound-toggle { right: calc(69px + env(safe-area-inset-right)); }
    .theme-toggle svg, .sound-toggle svg { width: 22px; height: 22px; }
    .customize-toggle {
        width: 44px;
        height: 44px;
        bottom: calc(15px + env(safe-area-inset-bottom));
        right: calc(15px + env(safe-area-inset-right));
    }
    .customize-panel {
        left: 12px;
        right: 12px;
        bottom: calc(74px + env(safe-area-inset-bottom));
        width: auto;
        max-height: 62vh;
    }
    body { cursor: auto; }
    .custom-cursor, .cursor-follower { display: none !important; }
    .theme-toggle, .sound-toggle, .link-card, .email-footer, .customize-toggle, .customize-panel button, .panel-close { cursor: pointer; }
    .link-card { padding: 14px 16px; border-radius: 12px; }
    body.pattern-network .link-card { border-radius: 16px; }
}

/* Small phones */
@media (max-width: 360px) {
    h1 { font-size: 1.25rem; }
    .link-card { padding: 12px 14px; }
}

/* Landscape phones: keep the hub compact so it fits without scrolling */
@media (max-height: 520px) and (orientation: landscape) {
    .container { gap: 1.2rem; }
    .profile-section { gap: 10px; }
    .pfp-wrapper { width: 84px; height: 84px; }
    .links-container { gap: 10px; }
    .link-card { padding: 12px 16px; }
}

/* Touch devices: Always show default cursor */
@media (hover: none) {
    body {
        cursor: auto;
    }
    .custom-cursor, .cursor-follower {
        display: none !important;
    }
    .theme-toggle, .sound-toggle, .link-card, .email-footer, .customize-toggle, .customize-panel button, .panel-close {
        cursor: pointer;
    }
}