:root {
    /* Your palette: black + blue as the main tones, yellow as the pop accent */
    --accent: #2f6fc9;      /* lightened working-tint of brand blue #0C2E59, used for glow/borders so it reads against black */
    --accent-brand-blue: #0C2E59; /* exact brand blue, used for flatter surfaces (tags, chips) */
    --accent-2: #b8c012;   /* lightened working-tint of brand yellow #54590C, used for divider/secondary glow */
    --accent-2-brand: #54590C; /* exact brand yellow */

    --bg-base: #030B16;    /* exact brand black */
    --card-bg: rgba(12, 46, 89, 0.18);   /* translucent brand-blue glass */
    --card-border: rgba(47, 111, 201, 0.18);
    --text-main: #f3f6fb;
    --text-secondary: #9fb0c7;
    --text-muted: #64748b;
}

* { box-sizing: border-box; }

html {
    background: var(--bg-base);
}

html, body {
    margin: 0;
    padding: 0;
    min-height: 100%;
    color: var(--text-main);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Background image + overlay so a photo can sit behind everything, dimmed */
.bg-layer {
    position: fixed;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: blur(4px) brightness(0.85) saturate(1.15);
    transform: scale(1.05);
    z-index: -3;
}

.bg-overlay {
    position: fixed;
    inset: 0;
    background: radial-gradient(ellipse at top, rgba(47,111,201,0.14), transparent 60%),
                radial-gradient(ellipse at bottom, rgba(184,192,18,0.06), transparent 60%),
                rgba(3, 11, 22, 0.32);
    z-index: -2;
}

#bg-stars {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
}

/* Old-TV / screen-door texture: a fine pixel grid laid over the whole
   background so it reads like it's glowing through a CRT screen. */
.bg-crt {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background-image:
        repeating-linear-gradient(to bottom, rgba(0, 0, 0, 0.22) 0px, rgba(0, 0, 0, 0.22) 1px, transparent 1px, transparent 3px),
        repeating-linear-gradient(to right, rgba(255, 255, 255, 0.05) 0px, rgba(255, 255, 255, 0.05) 1px, transparent 1px, transparent 3px);
    mix-blend-mode: overlay;
    opacity: 0.6;
}

.container {
    max-width: 480px;
    margin: 0 auto;
    padding: 3rem 1.25rem 2.5rem;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.container.loaded {
    opacity: 1;
    transform: translateY(0);
}

/* ---------- Header ---------- */

header {
    text-align: center;
    margin-bottom: 2rem;
}

.avatar-wrap {
    position: relative;
    max-width: 320px;
    margin: 0 auto 1.25rem;
}

.avatar {
    display: block;
    width: 100%;
    height: auto;
    /* No crop: the full logo shows as-is, just framed with a soft glow */
    object-fit: contain;
    border-radius: 18px;
    filter: drop-shadow(0 0 20px rgba(47, 111, 201, 0.45));
    animation: float 5s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

.badge {
    position: absolute;
    bottom: -4px;
    right: -4px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--bg-base);
    background: var(--card-bg);
    box-shadow: 0 0 14px rgba(47, 111, 201, 0.5);
}

.name {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-weight: 700;
    font-size: 2.4rem;
    margin: 0 0 0.75rem;
    letter-spacing: 0.01em;
    background: linear-gradient(90deg, var(--accent-2), var(--accent), var(--accent-2));
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    filter: drop-shadow(0 0 18px rgba(47, 111, 201, 0.4));
    animation: name-glow-shift 6s ease-in-out infinite;
}

@keyframes name-glow-shift {
    0%, 100% { background-position: 0% center; }
    50% { background-position: 100% center; }
}

.greeting {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent-2);
    margin: -0.35rem 0 0.9rem;
}

.name .accent {
    color: var(--accent);
}

.tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.tag {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.65rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-secondary);
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    padding: 0.3rem 0.7rem;
    border-radius: 999px;
}

.bio {
    font-style: italic;
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    overflow-wrap: break-word;
    word-wrap: break-word;
    white-space: normal;
    max-width: 100%;
}

.bio p { margin: 0.15rem 0; }

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.bio-cursor {
    display: inline-block;
    margin-left: 1px;
    color: var(--accent-2);
    animation: bio-cursor-blink 0.9s steps(1) infinite;
}

@keyframes bio-cursor-blink {
    0%, 49% { opacity: 1; }
    50%, 100% { opacity: 0; }
}

/* ---------- Music toggle ---------- */

.music-player {
    position: fixed;
    top: 1.25rem;
    right: 1.25rem;
    z-index: 40;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.65rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--card-border);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: border-color 0.2s ease;
}

.music-player.playing {
    border-color: var(--accent-2);
    animation: music-pulse 1.8s ease-in-out infinite;
}

.music-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-main);
    font-size: 0.8rem;
    line-height: 1;
    cursor: pointer;
    flex-shrink: 0;
    transition: transform 0.15s ease, background 0.15s ease;
}

.music-btn:hover {
    background: rgba(255, 255, 255, 0.14);
    transform: translateY(-1px);
}

.music-player.disabled .music-btn,
.music-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    transform: none;
}

.music-volume {
    -webkit-appearance: none;
    appearance: none;
    width: 64px;
    height: 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.15);
    cursor: pointer;
    accent-color: var(--accent-2);
}

.music-volume::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--accent-2);
    cursor: pointer;
}

.music-volume::-moz-range-thumb {
    width: 12px;
    height: 12px;
    border: none;
    border-radius: 50%;
    background: var(--accent-2);
    cursor: pointer;
}

@keyframes music-pulse {
    0%, 100% { box-shadow: 0 0 0 rgba(184, 192, 18, 0); }
    50% { box-shadow: 0 0 14px rgba(184, 192, 18, 0.55); }
}

@media (max-width: 380px) {
    .music-volume { width: 44px; }
}

.quick-copy-row {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.9rem;
}

.quick-copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.68rem;
    letter-spacing: 0.04em;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--card-border);
    border-radius: 999px;
    padding: 0.35rem 0.75rem;
    cursor: pointer;
    transition: transform 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.quick-copy-btn:hover {
    color: var(--text-main);
    border-color: var(--accent);
    transform: translateY(-1px);
}

.quick-copy-btn.copied {
    border-color: var(--accent-2);
    color: var(--accent-2);
}

.quick-copy-btn img {
    width: 14px;
    height: 14px;
    object-fit: contain;
}

/* ---------- Socials card ---------- */

.socials-card {
    position: relative;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 26px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    overflow: hidden;
}

.socials-card::after {
    content: "";
    position: absolute;
    top: -6px;
    right: -6px;
    width: 46px;
    height: 46px;
    opacity: 0.5;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 20C4 20 3 10 10 4C17 -2 22 3 22 3C22 3 21 12 15 17C9 22 4 20 4 20Z' fill='%23b8c012'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    transform: rotate(20deg);
}

.socials-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.85rem;
}

.socials-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.65rem;
    letter-spacing: 0.12em;
    color: var(--text-muted);
}

.share-btn {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.62rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--card-border);
    border-radius: 999px;
    padding: 0.3rem 0.7rem;
    cursor: pointer;
    transition: transform 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.share-btn:hover {
    color: var(--text-main);
    border-color: var(--accent);
    transform: translateY(-1px);
}

.socials-row {
    display: flex;
    gap: 0.6rem;
    margin-bottom: 0.5rem;
}

.social-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--card-border);
    transition: transform 0.15s ease, filter 0.15s ease;
    text-decoration: none;
}

.social-icon img {
    width: 22px;
    height: 22px;
    object-fit: contain;
    filter: drop-shadow(0 0 5px rgba(47, 111, 201, 0.45));
    transition: filter 0.2s ease;
}

.social-icon:hover {
    transform: translateY(-2px);
    filter: brightness(1.15);
}

.social-icon:hover img {
    filter: drop-shadow(0 0 9px rgba(47, 111, 201, 0.75));
}

/* Live/placeholder status row, styled like a Discord presence card */
.status-row[hidden] {
    display: none;
}

.status-row {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--card-border);
    border-radius: 14px;
    padding: 0.6rem 0.85rem;
    margin-top: 0.75rem;
}

.status-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.status-text {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.status-handle {
    font-size: 0.85rem;
    font-weight: 600;
}

.status-line {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #f04747; /* overridden per-status by JS */
}

/* ---------- Link rows ---------- */

.links-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.link-row {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 22px;
    padding: 0.75rem 1rem;
    text-decoration: none;
    color: var(--text-main);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    transition: border-color 0.15s ease, transform 0.15s ease, background 0.15s ease;
}

.link-row:hover {
    transform: translateX(2px);
    border-color: var(--row-color, var(--accent));
    background: rgba(255, 255, 255, 0.06);
}

.link-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--card-border);
}

.link-icon img {
    width: 20px;
    height: 20px;
    object-fit: contain;
    filter: drop-shadow(0 0 4px rgba(47, 111, 201, 0.4));
    transition: filter 0.2s ease;
}

.link-row:hover .link-icon img {
    filter: drop-shadow(0 0 8px rgba(184, 192, 18, 0.6));
}

.link-text {
    flex: 1;
    min-width: 0;
}

.link-title {
    font-weight: 600;
    font-size: 0.95rem;
}

.link-badge {
    display: inline-block;
    margin-left: 0.45rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    padding: 0.12rem 0.4rem;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--accent-2), var(--accent));
    color: #05070c;
    vertical-align: middle;
}

.link-subtitle {
    font-style: italic;
    font-size: 0.8rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.link-arrow {
    flex-shrink: 0;
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* Section divider, e.g. "✦ ABOUT ME ✦" */
.divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    margin: 0.75rem 0 0.25rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    color: var(--text-muted);
}

.divider .diamond,
.divider-ornament {
    color: var(--accent-2);
    width: 12px;
    height: 12px;
    flex-shrink: 0;
    animation: sparkle-pulse 2.4s ease-in-out infinite;
}

@keyframes sparkle-pulse {
    0%, 100% { opacity: 0.6; text-shadow: 0 0 0 transparent; }
    50% { opacity: 1; text-shadow: 0 0 6px rgba(184, 192, 18, 0.8); }
}

/* ---------- Footer ---------- */

footer {
    text-align: center;
    margin-top: 2rem;
    font-style: italic;
    font-size: 0.8rem;
    color: var(--text-muted);
}

footer p {
    display: inline-block;
    transition: transform 0.2s ease, color 0.2s ease;
}

footer p:hover {
    transform: scale(1.08);
    color: var(--accent-2);
}

@media (max-width: 380px) {
    .name { font-size: 2rem; }
    .avatar-wrap { max-width: 220px; }
}

/* ---------- Accessibility ---------- */

.social-icon:focus-visible,
.link-row:focus-visible,
.age-gate-input:focus-visible,
.age-gate-btn:focus-visible,
.share-btn:focus-visible,
.music-btn:focus-visible,
.music-volume:focus-visible,
.intro-splash:focus-visible,
.motion-toggle:focus-visible,
.quick-copy-btn:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* ---------- Cursor sparkle trail ---------- */

.cursor-sparkle {
    position: fixed;
    z-index: 50;
    pointer-events: none;
    font-size: 12px;
    transform: translate(-50%, -50%);
    animation: sparkle-trail-fade 0.7s ease-out forwards;
}

@keyframes sparkle-trail-fade {
    0% { opacity: 0.9; transform: translate(-50%, -50%) scale(1); }
    100% { opacity: 0; transform: translate(-50%, -65%) scale(0.4); }
}

/* ---------- Logo easter egg ---------- */

.egg-sparkle {
    position: fixed;
    z-index: 60;
    pointer-events: none;
    font-size: 16px;
    transform: translate(-50%, -50%);
    animation: egg-burst 0.9s ease-out forwards;
}

@keyframes egg-burst {
    0% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
    100% { opacity: 0; transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(0.3); }
}

.egg-message {
    position: fixed;
    left: 50%;
    top: 14%;
    transform: translate(-50%, -10px);
    background: rgba(12, 46, 89, 0.55);
    border: 1px solid var(--card-border);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 0.5rem 1.1rem;
    border-radius: 999px;
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: 0.9rem;
    color: var(--text-main);
    opacity: 0;
    transition: opacity 0.4s ease, transform 0.4s ease;
    z-index: 61;
    pointer-events: none;
}

.egg-message.show {
    opacity: 1;
    transform: translate(-50%, 0);
}

@media (prefers-reduced-motion: reduce) {
    .social-icon,
    .link-row,
    .social-icon img,
    .link-icon img,
    .avatar,
    .divider .diamond,
    .container,
    .egg-message,
    .music-player,
    footer p {
        transition: none;
        animation: none;
    }
    .container {
        opacity: 1;
        transform: none;
    }
    .bg-layer {
        transform: none;
    }
}

/* Same set of rules again, but triggered by the manual on-page toggle
   (html.motion-reduced) rather than only the OS-level setting, so the
   toggle actually behaves like "reduce motion" everywhere. */
html.motion-reduced .social-icon,
html.motion-reduced .link-row,
html.motion-reduced .social-icon img,
html.motion-reduced .link-icon img,
html.motion-reduced .avatar,
html.motion-reduced .divider .diamond,
html.motion-reduced .container,
html.motion-reduced .egg-message,
html.motion-reduced .music-player,
html.motion-reduced footer p {
    transition: none;
    animation: none;
}
html.motion-reduced .container {
    opacity: 1;
    transform: none;
}
html.motion-reduced .bg-layer {
    transform: none;
}
html.motion-reduced .intro-text,
html.motion-reduced .intro-subtext,
html.motion-reduced .intro-splash {
    animation: none;
}
html.motion-reduced {
    cursor: auto;
}

/* ---------- Age gate modal ---------- */

.age-gate-overlay {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    background: rgba(3, 11, 22, 0.72);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.age-gate-overlay[hidden] {
    display: none;
}

.age-gate-card {
    width: 100%;
    max-width: 360px;
    background: rgba(12, 46, 89, 0.35);
    border: 1px solid var(--card-border);
    border-radius: 26px;
    padding: 1.5rem;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.age-gate-card h2 {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: 1.4rem;
    margin: 0 0 0.6rem;
}

.age-gate-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0 0 1.1rem;
}

.age-gate-label {
    display: block;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.65rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.age-gate-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--card-border);
    border-radius: 10px;
    padding: 0.6rem 0.75rem;
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    color-scheme: dark;
}

.age-gate-input:focus {
    outline: none;
    border-color: var(--accent);
}

.age-gate-error {
    min-height: 1.2em;
    font-size: 0.8rem;
    color: #ff8080;
    margin: 0.6rem 0 0;
}

.age-gate-actions {
    display: flex;
    gap: 0.6rem;
    margin-top: 1rem;
}

.age-gate-btn {
    flex: 1;
    border-radius: 12px;
    padding: 0.65rem 0.75rem;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid var(--card-border);
    transition: transform 0.15s ease, filter 0.15s ease;
}

.age-gate-btn:hover {
    transform: translateY(-1px);
}

.age-gate-btn-cancel {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-secondary);
}

.age-gate-btn-confirm {
    background: var(--accent-brand-blue);
    color: var(--text-main);
    border-color: transparent;
}

.age-gate-btn-confirm:hover {
    filter: brightness(1.15);
}

/* ---------- Intro splash ---------- */

.intro-splash {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    text-align: center;
    padding: 1.5rem;
    background: rgba(3, 11, 22, 0.55);
    backdrop-filter: blur(18px) saturate(1.1);
    -webkit-backdrop-filter: blur(18px) saturate(1.1);
    cursor: pointer;
    transition: opacity 0.6s ease;
}

.intro-splash.hidden {
    opacity: 0;
    pointer-events: none;
}

.intro-text {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-weight: 700;
    font-size: 1.6rem;
    margin: 0;
    background: linear-gradient(90deg, var(--accent-2), var(--accent));
    background-size: 100% auto;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    max-width: 90vw;
    overflow-wrap: break-word;
    word-wrap: break-word;
    white-space: normal;
}

.intro-subtext {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin: 0;
    animation: intro-subtext-pulse 1.8s ease-in-out infinite;
}

@keyframes intro-subtext-pulse {
    0%, 100% { opacity: 0.55; }
    50% { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
    .intro-text, .intro-subtext, .intro-splash {
        animation: none;
    }
}

/* ---------- Music progress bar ---------- */

.music-progress {
    width: 56px;
    height: 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    overflow: hidden;
    cursor: pointer;
    flex-shrink: 0;
}

.music-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    border-radius: 999px;
    transition: width 0.15s linear;
}

@media (max-width: 380px) {
    .music-progress { width: 34px; }
}

/* ---------- Accessibility: skip link ---------- */

.skip-link {
    position: fixed;
    top: -60px;
    left: 1rem;
    z-index: 300;
    background: var(--accent-brand-blue);
    color: var(--text-main);
    padding: 0.6rem 1rem;
    border-radius: 10px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    transition: top 0.2s ease;
}

.skip-link:focus {
    top: 1rem;
}

/* ---------- Motion toggle ---------- */

.motion-toggle {
    position: fixed;
    top: 1.25rem;
    left: 1.25rem;
    z-index: 40;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--card-border);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: var(--text-main);
    font-size: 0.9rem;
    cursor: pointer;
    transition: transform 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
}

.motion-toggle:hover {
    transform: translateY(-1px);
    border-color: var(--accent);
}

.motion-toggle[aria-pressed="true"] {
    opacity: 0.55;
}

/* ---------- Custom leaf cursor (desktop / precise-pointer only) ---------- */

@media (hover: hover) and (pointer: fine) {
    html {
        cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='26' height='26' viewBox='0 0 24 24'%3E%3Cpath d='M4 20C4 20 3 10 10 4C17 -2 22 3 22 3C22 3 21 12 15 17C9 22 4 20 4 20Z' fill='%23b8c012' stroke='%232f6fc9' stroke-width='1.3'/%3E%3Cpath d='M5 19L18 4' stroke='%232f6fc9' stroke-width='1'/%3E%3C/svg%3E") 3 20, auto;
    }
}

/* ---------- Falling leaf drift ---------- */

.leaf-drift {
    position: fixed;
    top: -24px;
    z-index: -1;
    pointer-events: none;
    opacity: 0.85;
    animation-name: leaf-fall;
    animation-timing-function: linear;
    animation-fill-mode: forwards;
}

@keyframes leaf-fall {
    0% {
        transform: translate(0, 0) rotate(0deg);
        opacity: 0;
    }
    8% { opacity: 0.85; }
    92% { opacity: 0.85; }
    100% {
        transform: translate(var(--leaf-sway, 40px), 100vh) rotate(var(--leaf-rotate, 220deg));
        opacity: 0;
    }
}

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

/* ---------- Corner flourishes ---------- */

.corner-flourish {
    position: fixed;
    width: 90px;
    height: 90px;
    z-index: 1;
    pointer-events: none;
}

.corner-flourish-tl { top: 0; left: 0; }
.corner-flourish-br { bottom: 0; right: 0; }

@media (max-width: 480px) {
    .corner-flourish { width: 60px; height: 60px; }
}

/* ---------- Drifting moon + cloud ---------- */

.moon-drift {
    position: fixed;
    top: 2vh;
    left: -180px;
    width: 160px;
    height: auto;
    z-index: 1;
    pointer-events: none;
    animation: moon-drift-across 90s linear infinite;
}

@keyframes moon-drift-across {
    from { transform: translateX(0); }
    to { transform: translateX(calc(100vw + 180px)); }
}

@media (prefers-reduced-motion: reduce) {
    .moon-drift { animation: none; left: 8vw; }
}
html.motion-reduced .moon-drift {
    animation: none;
    left: 8vw;
}

/* ---------- Scroll-down hint ---------- */

.scroll-hint {
    position: fixed;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    width: 26px;
    height: 26px;
    color: var(--accent-2);
    opacity: 0.7;
    pointer-events: none;
    z-index: 5;
    animation: scroll-hint-bounce 1.6s ease-in-out infinite;
    transition: opacity 0.4s ease;
}

.scroll-hint.hidden {
    opacity: 0;
}

.scroll-hint svg {
    width: 100%;
    height: 100%;
}

@keyframes scroll-hint-bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(6px); }
}

html.motion-reduced .scroll-hint {
    animation: none;
}
