/* ==========================================================================
   Design Tokens & CSS Variables
   ========================================================================== */
:root {
    --bg-color: #121417;         /* Charcoal black background */
    --card-bg: #1b1f24;         /* Slightly lighter surface for cards */
    --card-border: #2d333b;      /* Subtle dark border */

    --text-main: #f3f4f6;        /* Soft white for main text */
    --text-muted: #9ca3af;       /* Muted grey for secondary text */

    --primary: #10b981;          /* Emerald green */
    --primary-dark: #059669;     /* Darker emerald for hover states */

    --accent: #2563eb;           /* Sapphire blue */
    --accent-dark: #1d4ed8;      /* Darker sapphire for hover states */

    --accent-dark-neutral: #242a31; /* Dark neutral alternative */

    --radius: 20px;              /* Standard corner curvature for bento cards */
    --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================================================
   Global Resets & Layout Setup
   ========================================================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    color: var(--text-main);

    min-height: 100vh;

    display: flex;
    justify-content: center;
    align-items: center;

    padding: 32px 16px;
    margin: 0;

    position: relative;
    isolation: isolate;

    background: #0f1114;

    overflow-x: hidden;
}

/* Main ambient background glow */
body::before {
    content: "";

    position: fixed;
    inset: -15%;

    pointer-events: none;
    z-index: -1;

    background:
        radial-gradient(
            circle at 20% 15%,
            rgba(16, 185, 129, 0.24),
            transparent 30%
        ),
        radial-gradient(
            circle at 80% 30%,
            rgba(37, 99, 235, 0.22),
            transparent 32%
        ),
        radial-gradient(
            circle at 50% 90%,
            rgba(16, 185, 129, 0.14),
            transparent 35%
        );

    opacity: 0.55;

    transform: scale(1);

    filter: blur(6px);

    animation: background-pulse 7s ease-in-out infinite;
}

/* Secondary glow */
body::after {
    content: "";

    position: fixed;

    width: 550px;
    height: 550px;

    top: 40%;
    left: 50%;

    transform: translate(-50%, -50%);

    pointer-events: none;
    z-index: -1;

    background: radial-gradient(
        circle,
        rgba(37, 99, 235, 0.13),
        rgba(16, 185, 129, 0.08) 40%,
        transparent 70%
    );

    filter: blur(24px);

    animation: background-float 10s ease-in-out infinite;
}

/* Brighter breathing effect */
@keyframes background-pulse {
    0%,
    100% {
        opacity: 0.50;
        transform: scale(1);
    }

    50% {
        opacity: 1;
        transform: scale(1.08);
    }
}

/* Floating centre glow */
@keyframes background-float {
    0%,
    100% {
        transform:
            translate(-50%, -50%)
            scale(0.9);

        opacity: 0.45;
    }

    50% {
        transform:
            translate(-50%, -46%)
            scale(1.15);

        opacity: 0.9;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    body::before,
    body::after {
        animation: none;
    }
}

/* Main wrapper constraining max-width and triggering initial page load animation */
.container {
    width: 100%;
    max-width: 480px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    opacity: 0;
    transform: translateY(10px);
    animation: fadeIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Fade-in entrance keyframes */
@keyframes fadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================================================
   Bento Grid Structure
   ========================================================================== */
.bento-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

/* Base card styling */
.card {
    background-color: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    padding: 20px;
    text-decoration: none;
    color: var(--text-main);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
    cursor: pointer;
}

/*Hover lift effect for interactive cards
.card:hover {
    transform: translateY(-3px);
    border-color: var(--text-muted);
    box-shadow: 0 12px 30px -8px rgba(43, 41, 39, 0.08);
}


/* Full-width bento modifier spanning both columns */
.card.full {
    grid-column: span 2;
}


/* ==========================================================================
   Profile Header Card Styles
   ========================================================================== */
.profile-card {
    grid-column: span 2;
    align-items: center;
    text-align: center;
    padding: 32px 20px 24px;
    gap: 12px;
    cursor: default;
}

/* Prevent profile card from lifting on hover */
.profile-card:hover {
    transform: none;
    box-shadow: none;
    border-color: var(--card-border);
}

.avatar-container {
    position: relative;
    margin-bottom: 2px;
}

.avatar {
    width: 92px;
    height: 92px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--card-border);
}

.avatar-container {
    position: relative;

    width: 98px;
    height: 98px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;
}

.avatar-container::before {
    content: "";

    position: absolute;
    inset: 0;

    border-radius: 50%;

    background: conic-gradient(
        var(--primary),
        var(--accent),
        var(--primary)
    );

    box-shadow:
        0 0 10px rgba(16, 185, 129, 0.45),
        0 0 20px rgba(37, 99, 235, 0.35),
        0 0 30px rgba(16, 185, 129, 0.2);

    animation:
        avatar-border-spin 3s linear infinite,
        avatar-glow 2s ease-in-out infinite alternate;
}

.avatar {
    position: relative;
    z-index: 1;

    width: 92px;
    height: 92px;

    border-radius: 50%;
    object-fit: cover;

    border: 3px solid var(--card-bg);
}

@keyframes avatar-border-spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes avatar-glow {
    from {
        filter: brightness(1);
        box-shadow:
            0 0 8px rgba(16, 185, 129, 0.35),
            0 0 16px rgba(37, 99, 235, 0.25);
    }

    to {
        filter: brightness(1.15);
        box-shadow:
            0 0 14px rgba(16, 185, 129, 0.65),
            0 0 28px rgba(37, 99, 235, 0.5),
            0 0 40px rgba(16, 185, 129, 0.25);
    }
}

/* Verified checkmark badge positioned on avatar */
.verified-badge {
    position: absolute;
    bottom: 2px;
    right: 2px;
    background: var(--text-main);
    color: #ffffff;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    border: 2px solid var(--card-bg);
}

/* Circular social icon buttons row layout */
.profile-socials {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    align-items: center;
    margin-bottom: 6px;
}

/* Individual circular icon button styling */
.social-icon-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--bg-color);
    border: 1px solid var(--card-border);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--text-main);
    font-size: 0.9rem;
    transition: var(--transition);
}

/* Hover state inverted for circular buttons */
.social-icon-btn:hover {
    background-color: var(--accent-dark-neutral);
    color: #ffffff;
    border-color: var(--primary-dark);
    transform: translateY(-2px);
}

.profile-info h1 {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 4px;
    letter-spacing: -0.01em;
}

.profile-info p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.5;
    max-width: 360px;
}

/* ==========================================================================
   Card Content Elements & Brand Colors
   ========================================================================== */
.card-icon {
    font-size: 1.4rem;
    margin-bottom: 14px;
}

.icon-youtube { color: #ff0000; }
.icon-instagram { color: #e1306c; }
.icon-spotify { color: #1db954; }
.icon-twitch { color: #9146ff; }
.icon-kick { color: #53fc18; }
.icon-email { color: var(--text-main); }

.card-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    letter-spacing: -0.01em;
}

.card-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.4;
}

/* Featured Video Card Dark Gradient Look */
.media-card {
    background: linear-gradient(135deg, #2b2927 0%, #4a4642 100%);
    color: #ffffff;
    grid-column: span 2;
}

.media-card .card-title,
.media-card .card-desc {
    color: #ffffff;
}

.media-card .card-desc {
    opacity: 0.8;
}

/* Arrow animation helper */
.arrow {
    font-size: 1rem;
    transition: transform 0.2s ease;
}

.card:hover .arrow {
    transform: translate(2px, -2px);
}

.interactive-card {
    position: relative;
    overflow: hidden;
    isolation: isolate;

    background: rgba(27, 31, 36, 0.55);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);

    border: 1px solid rgba(255, 255, 255, 0.08);

    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);

    transition: var(--transition);
}

/* Animated Google colour glow */
.interactive-card::before {
    content: "";

    position: absolute;
    inset: -2px;

    border-radius: inherit;

    background: conic-gradient(
        from 0deg,
        #4285f4,
        #ea4335,
        #fbbc05,
        #34a853,
        #4285f4
    );

    z-index: -2;

    animation: google-glow-spin 6s linear infinite;

    filter: blur(10px);
    opacity: 0.55;
}

/* Glass layer keeps the glow around the edge */
.interactive-card::after {
    content: "";

    position: absolute;
    inset: 1px;

    border-radius: inherit;

    background: rgba(27, 31, 36, 0.82);

    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);

    z-index: -1;
}

/* Stronger glow when hovered */
.interactive-card:hover {
    transform: translateY(-4px);

    box-shadow:
        0 12px 40px rgba(0, 0, 0, 0.35),
        0 0 18px rgba(66, 133, 244, 0.22),
        0 0 28px rgba(234, 67, 53, 0.15),
        0 0 34px rgba(52, 168, 83, 0.14);
}

.interactive-card:hover::before {
    opacity: 0.85;
    filter: blur(14px);
}

/* Rotating colour animation */
@keyframes google-glow-spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.copy-hint {
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--text-muted);
}

/* Portfolio Website Bento Card */
.website-bento-card {
    position: relative;
    overflow: hidden;
    isolation: isolate;

    flex-direction: row;
    align-items: center;
    justify-content: space-between;

    background: var(--card-bg);
    color: #ffffff;

    border: 1px solid rgba(255, 255, 255, 0.08);

    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease;
}

/* Animated emerald + sapphire border */
.website-bento-card::before {
    content: "";

    position: absolute;
    inset: -2px;

    border-radius: inherit;

    background: conic-gradient(
        #10b981,
        #2563eb,
        #10b981,
        #2563eb,
        #10b981
    );

    z-index: -2;

    animation:
        website-border-spin 6s linear infinite,
        website-glow 2.5s ease-in-out infinite alternate;

    transition:
        filter 0.3s ease,
        box-shadow 0.3s ease;
}

/* Keeps the inside dark */
.website-bento-card::after {
    content: "";

    position: absolute;
    inset: 2px;

    border-radius: inherit;

    background: var(--card-bg);

    z-index: -1;

    transition: background 0.3s ease;
}

/* Category */
.website-bento-card .bento-category {
    font-size: 0.75rem;
    font-weight: 600;

    color: rgba(255, 255, 255, 0.8);

    text-transform: uppercase;
    letter-spacing: 0.5px;

    margin-bottom: 2px;

    transition: color 0.3s ease;
}

/* Globe icon */
.website-bento-card .bento-category i {
    margin-right: 5px;

    color: #10b981;

    transition:
        color 0.3s ease,
        transform 0.3s ease,
        filter 0.3s ease;
}

/* Hover card */
.website-bento-card:hover {
    transform: translateY(-4px);

    box-shadow:
        0 8px 25px rgba(0, 0, 0, 0.30),
        0 0 14px rgba(16, 185, 129, 0.30),
        0 0 22px rgba(37, 99, 235, 0.25);
}

/* Stronger glow on hover */
.website-bento-card:hover::before {
    filter: brightness(1.25);

    box-shadow:
        0 0 14px rgba(16, 185, 129, 0.70),
        0 0 28px rgba(37, 99, 235, 0.55),
        0 0 42px rgba(16, 185, 129, 0.30),
        0 0 55px rgba(37, 99, 235, 0.18);
}

/* Slightly brighten card interior */
.website-bento-card:hover::after {
    background: #20252b;
}

/* Category becomes emerald */
.website-bento-card:hover .bento-category {
    color: #10b981;
}

/* Globe reacts on hover */
.website-bento-card:hover .bento-category i {
    color: #2563eb;

    transform: rotate(15deg) scale(1.1);

    filter: drop-shadow(
        0 0 6px rgba(37, 99, 235, 0.65)
    );
}

/* Arrow */
.website-bento-card .arrow {
    transition:
        transform 0.3s ease,
        color 0.3s ease;
}

/* Arrow hover */
.website-bento-card:hover .arrow {
    transform: translate(3px, -3px);

    color: #10b981;
}

/* Rotating border */
@keyframes website-border-spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Soft emerald / sapphire glow */
@keyframes website-glow {
    from {
        filter: brightness(1);

        box-shadow:
            0 0 8px rgba(16, 185, 129, 0.30),
            0 0 14px rgba(37, 99, 235, 0.20);
    }

    to {
        filter: brightness(1.15);

        box-shadow:
            0 0 14px rgba(16, 185, 129, 0.55),
            0 0 26px rgba(37, 99, 235, 0.40),
            0 0 38px rgba(16, 185, 129, 0.20);
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .website-bento-card::before {
        animation: none;
    }

    .website-bento-card {
        transition: none;
    }
}

/* Spotify Bento Card */
.spotify-bento-card {
    position: relative;
    overflow: hidden;
    isolation: isolate;

    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;

    background: transparent;
    color: #ffffff;

    border-radius: var(--radius);

    box-shadow:
        0 0 8px rgba(30, 215, 96, 0.20),
        0 0 18px rgba(30, 215, 96, 0.10);

    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease;
}

/* Moving Spotify light */
.spotify-bento-card::before {
    content: "";

    position: absolute;
    width: 160%;
    height: 300%;

    top: -100%;
    left: -30%;

    background: conic-gradient(
        transparent 0deg,
        transparent 260deg,
        rgba(30, 215, 96, 0.15) 290deg,
        #1ed760 315deg,
        #8affb2 325deg,
        #1ed760 335deg,
        rgba(30, 215, 96, 0.15) 345deg,
        transparent 360deg
    );

    animation: spotify-border-scan 4s linear infinite;

    z-index: 0;
    pointer-events: none;
}

/* Dark inside of card */
.spotify-bento-card::after {
    content: "";

    position: absolute;
    inset: 2px;

    border-radius: calc(var(--radius) - 2px);

    background: var(--card-bg);

    z-index: 1;
    pointer-events: none;
}

/* Keep content above animation */
.spotify-bento-card > * {
    position: relative;
    z-index: 2;
}

/* Spotify category */
.spotify-bento-card .bento-category {
    font-size: 0.75rem;
    font-weight: 600;

    color: rgba(255, 255, 255, 0.8);

    text-transform: uppercase;
    letter-spacing: 0.5px;

    margin-bottom: 2px;

    transition: color 0.3s ease;
}

/* Spotify icon */
.spotify-bento-card .spotify-icon {
    color: #1ed760;

    transition:
        transform 0.3s ease,
        filter 0.3s ease;
}

/* Hover */
.spotify-bento-card:hover {
    transform: translateY(-4px);

    box-shadow:
        0 8px 25px rgba(0, 0, 0, 0.30),
        0 0 12px rgba(30, 215, 96, 0.45),
        0 0 28px rgba(30, 215, 96, 0.22);
}

/* Green category on hover */
.spotify-bento-card:hover .bento-category {
    color: #1ed760;
}

/* Spotify icon hover */
.spotify-bento-card:hover .spotify-icon {
    transform: scale(1.08);

    filter: drop-shadow(
        0 0 6px rgba(30, 215, 96, 0.6)
    );
}

/* Border scanner animation */
@keyframes spotify-border-scan {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .spotify-bento-card::before {
        animation: none;
    }

    .spotify-bento-card {
        transition: none;
    }
}

/* Custom full-width TikTok bento card */
.tiktok-bento-card {
    position: relative;
    overflow: hidden;
    isolation: isolate;

    flex-direction: row;
    align-items: center;
    justify-content: space-between;

    background: var(--card-bg);
    color: #ffffff;

    border: 1px solid rgba(255, 255, 255, 0.08);

    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease;
}

/* Animated TikTok border */
.tiktok-bento-card::before {
    content: "";

    position: absolute;
    inset: -2px;

    border-radius: inherit;

    background: conic-gradient(
        #25f4ee,
        #fe2c55,
        #25f4ee
    );

    z-index: -2;

    animation:
        tiktok-border-spin 5s linear infinite,
        tiktok-glow 2s ease-in-out infinite alternate;

    transition:
        filter 0.3s ease,
        box-shadow 0.3s ease;
}

/* Keeps the inside of the card dark */
.tiktok-bento-card::after {
    content: "";

    position: absolute;
    inset: 2px;

    border-radius: inherit;

    background: var(--card-bg);

    z-index: -1;

    transition: background 0.3s ease;
}

/* TikTok card hover */
.tiktok-bento-card:hover {
    transform: translateY(-4px);

    box-shadow:
        0 8px 25px rgba(0, 0, 0, 0.3),
        0 0 14px rgba(37, 244, 238, 0.25),
        0 0 20px rgba(254, 44, 85, 0.2);
}

/* Stronger animated glow on hover */
.tiktok-bento-card:hover::before {
    filter: brightness(1.3);

    box-shadow:
        0 0 14px rgba(37, 244, 238, 0.8),
        0 0 26px rgba(254, 44, 85, 0.65),
        0 0 40px rgba(37, 244, 238, 0.4),
        0 0 55px rgba(254, 44, 85, 0.25);
}

/* Slightly brighten card interior on hover */
.tiktok-bento-card:hover::after {
    background: #20252b;
}

/* TikTok category label */
.tiktok-bento-card .bento-category {
    font-size: 0.75rem;
    font-weight: 600;

    color: rgba(255, 255, 255, 0.8);

    text-transform: uppercase;
    letter-spacing: 0.5px;

    margin-bottom: 2px;

    transition: color 0.3s ease;
}

/* Category changes to TikTok cyan on hover */
.tiktok-bento-card:hover .bento-category {
    color: #25f4ee;
}

/* Rotating border animation */
@keyframes tiktok-border-spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Existing TikTok glow animation */
@keyframes tiktok-glow {
    from {
        filter: brightness(1);

        box-shadow:
            0 0 8px rgba(37, 244, 238, 0.35),
            0 0 16px rgba(254, 44, 85, 0.25);
    }

    to {
        filter: brightness(1.15);

        box-shadow:
            0 0 14px rgba(37, 244, 238, 0.65),
            0 0 28px rgba(254, 44, 85, 0.50),
            0 0 40px rgba(37, 244, 238, 0.25);
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .tiktok-bento-card::before {
        animation: none;
    }

    .tiktok-bento-card {
        transition: none;
    }
}

.title-white {
    margin-bottom: 0;
    color: #ffffff;
}

.arrow-white {
    font-size: 1.2rem;
    color: #ffffff;
}

.shop-card {
    position: relative;
    overflow: hidden;
    isolation: isolate;

    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;

    background: var(--card-bg);
    color: var(--text-main);

    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius);

    transition: var(--transition);

    box-shadow:
        0 0 10px rgba(255, 144, 232, 0.12),
        0 0 18px rgba(255, 201, 0, 0.08);
}

/* Moving Gumroad light sweep */
.shop-card::before {
    content: "";

    position: absolute;
    width: 70%;
    height: 250%;

    top: -75%;
    left: -90%;

    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 144, 232, 0.9),
        rgba(255, 201, 0, 1),
        rgba(144, 168, 237, 0.9),
        transparent
    );

    transform: rotate(20deg);

    filter: blur(8px);

    z-index: -2;

    animation: gumroad-sweep 4s ease-in-out infinite;
}

/* Dark centre of card */
.shop-card::after {
    content: "";

    position: absolute;
    inset: 2px;

    border-radius: calc(var(--radius) - 2px);

    background: var(--card-bg);

    z-index: -1;
}

/* Keep content visible */
.shop-card > * {
    position: relative;
    z-index: 1;
}

/* Stronger glow on hover */
.shop-card:hover {
    transform: translateY(-3px);

    box-shadow:
        0 0 14px rgba(255, 144, 232, 0.35),
        0 0 24px rgba(255, 201, 0, 0.22),
        0 0 34px rgba(144, 168, 237, 0.18);
}

/* Light travels across the card */
@keyframes gumroad-sweep {
    0% {
        left: -90%;
        opacity: 0;
    }

    15% {
        opacity: 1;
    }

    50% {
        opacity: 1;
    }

    70% {
        left: 120%;
        opacity: 0;
    }

    100% {
        left: 120%;
        opacity: 0;
    }
}

.bento-category {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.title-reset {
    margin-bottom: 0;
}

.shop-arrow {
    font-size: 1.2rem;
}

/* Footer typography */
.footer {
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 8px;
    letter-spacing: 0.02em;
}

/* ==========================================================================
   Toast Notification Component
   ========================================================================== */
.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--accent-dark);
    color: #ffffff;
    padding: 10px 20px;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 500;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
    z-index: 1000;
}

/* Class triggered via JS to slide toast into view */
.toast.show {
    transform: translateX(-50%) translateY(0);
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 420px) {
    .bento-grid {
        grid-template-columns: 1fr; /* Switch bento grid to single column layout on smaller mobiles */
    }
    .card.full, .profile-card, .media-card {
        grid-column: span 1;
    }
}