/* ==========================================================================
   BELEQET JOBS — MODERN DESIGN SYSTEM
   Premium dark-mode linktree with glassmorphism & micro-interactions
   ========================================================================== */

/* ---------- Google Fonts (loaded in HTML) ---------- */

/* ==========================================================================
   1. DESIGN TOKENS
   ========================================================================== */
:root {
    /* Background */
    --color-bg-deep: #0a0a0f;
    --color-bg-surface: rgba(255, 255, 255, 0.04);
    --color-bg-card: rgba(255, 255, 255, 0.06);
    --color-bg-card-hover: rgba(255, 255, 255, 0.10);

    /* Brand — Emerald Accent */
    --color-primary: #34d399;
    --color-primary-dim: rgba(52, 211, 153, 0.15);
    --color-primary-glow: rgba(52, 211, 153, 0.25);
    --color-primary-deep: #059669;

    /* Text */
    --color-text-main: #f0f0f5;
    --color-text-secondary: rgba(240, 240, 245, 0.65);
    --color-text-muted: rgba(240, 240, 245, 0.40);

    /* Borders */
    --color-border: rgba(255, 255, 255, 0.08);
    --color-border-hover: rgba(52, 211, 153, 0.35);

    /* Effects */
    --shadow-card: 0 2px 16px rgba(0, 0, 0, 0.25);
    --shadow-card-hover: 0 8px 32px rgba(52, 211, 153, 0.12), 0 4px 16px rgba(0, 0, 0, 0.3);
    --shadow-glow: 0 0 30px rgba(52, 211, 153, 0.15);

    /* Motion */
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --transition-smooth: 0.35s var(--ease-out-expo);

    /* Layout */
    --radius-card: 16px;
    --radius-avatar: 50%;
    --max-width: 480px;
}

/* ==========================================================================
   1b. LIGHT THEME OVERRIDES
   ========================================================================== */
[data-theme="light"] {
    /* Background */
    --color-bg-deep: #f0f2f5;
    --color-bg-surface: rgba(255, 255, 255, 0.7);
    --color-bg-card: rgba(255, 255, 255, 0.75);
    --color-bg-card-hover: rgba(255, 255, 255, 0.90);

    /* Brand — Deeper emerald for contrast on light */
    --color-primary: #059669;
    --color-primary-dim: rgba(5, 150, 105, 0.10);
    --color-primary-glow: rgba(5, 150, 105, 0.18);
    --color-primary-deep: #047857;

    /* Text */
    --color-text-main: #1a1a2e;
    --color-text-secondary: rgba(26, 26, 46, 0.65);
    --color-text-muted: rgba(26, 26, 46, 0.40);

    /* Borders */
    --color-border: rgba(0, 0, 0, 0.08);
    --color-border-hover: rgba(5, 150, 105, 0.40);

    /* Effects */
    --shadow-card: 0 2px 12px rgba(0, 0, 0, 0.06);
    --shadow-card-hover: 0 8px 28px rgba(5, 150, 105, 0.10), 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-glow: 0 0 24px rgba(5, 150, 105, 0.12);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--color-bg-deep);
    color: var(--color-text-main);
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    padding: 48px 20px 60px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    position: relative;
    transition: background-color 0.5s ease, color 0.4s ease;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 99px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

[data-theme="light"] ::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.12);
}
[data-theme="light"] ::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.22);
}

/* ==========================================================================
   2b. THEME TOGGLE BUTTON
   ========================================================================== */
.theme-toggle {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 10;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    border: 1px solid var(--color-border);
    background: var(--color-bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-secondary);
    transition:
        background var(--transition-smooth),
        border-color var(--transition-smooth),
        color var(--transition-smooth),
        transform 0.2s var(--ease-spring),
        box-shadow var(--transition-smooth);
    animation: fadeInUp 0.7s var(--ease-out-expo) 0.2s both;
}

.theme-toggle:hover {
    background: var(--color-bg-card-hover);
    border-color: var(--color-border-hover);
    color: var(--color-primary);
    box-shadow: var(--shadow-glow);
    transform: scale(1.08);
}

.theme-toggle:active {
    transform: scale(0.95);
}

.theme-toggle:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 3px;
}

.theme-toggle__icon {
    position: absolute;
    width: 20px;
    height: 20px;
    transition: opacity 0.35s ease, transform 0.45s var(--ease-spring);
}

.theme-toggle__icon svg {
    width: 20px;
    height: 20px;
}

/* Dark mode (default): show moon, hide sun */
.theme-toggle__icon--moon {
    opacity: 1;
    transform: scale(1) rotate(0deg);
}

.theme-toggle__icon--sun {
    opacity: 0;
    transform: scale(0.5) rotate(-90deg);
}

/* Light mode: show sun, hide moon */
[data-theme="light"] .theme-toggle__icon--moon {
    opacity: 0;
    transform: scale(0.5) rotate(90deg);
}

[data-theme="light"] .theme-toggle__icon--sun {
    opacity: 1;
    transform: scale(1) rotate(0deg);
}

/* ==========================================================================
   3. ANIMATED BACKGROUND
   ========================================================================== */
.bg-animation {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.bg-animation::before,
.bg-animation::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.5;
    animation: bgFloat 12s ease-in-out infinite alternate;
}

.bg-animation::before {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(52, 211, 153, 0.18) 0%, transparent 70%);
    top: -15%;
    right: -10%;
    animation-duration: 14s;
}

.bg-animation::after {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.12) 0%, transparent 70%);
    bottom: -10%;
    left: -10%;
    animation-duration: 18s;
    animation-direction: alternate-reverse;
}

.bg-orb {
    position: absolute;
    width: 350px;
    height: 350px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.10) 0%, transparent 70%);
    filter: blur(80px);
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: bgFloat 16s ease-in-out infinite alternate;
    opacity: 0.6;
}

@keyframes bgFloat {
    0%   { transform: translate(0, 0) scale(1); }
    50%  { transform: translate(30px, -20px) scale(1.05); }
    100% { transform: translate(-20px, 15px) scale(0.97); }
}

/* Noise texture overlay */
.bg-noise {
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    opacity: 0.025;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 128px 128px;
    transition: opacity 0.5s ease;
}

[data-theme="light"] .bg-noise {
    opacity: 0.015;
}

/* Light mode: soften the animated orbs */
[data-theme="light"] .bg-animation::before {
    background: radial-gradient(circle, rgba(5, 150, 105, 0.10) 0%, transparent 70%);
    opacity: 0.4;
}

[data-theme="light"] .bg-animation::after {
    background: radial-gradient(circle, rgba(16, 185, 129, 0.08) 0%, transparent 70%);
    opacity: 0.3;
}

[data-theme="light"] .bg-orb {
    background: radial-gradient(circle, rgba(6, 182, 212, 0.06) 0%, transparent 70%);
    opacity: 0.4;
}

/* ==========================================================================
   4. LAYOUT CONTAINER
   ========================================================================== */
.bio-container {
    width: 100%;
    max-width: var(--max-width);
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
}

/* ==========================================================================
   5. HEADER / PROFILE
   ========================================================================== */
.bio-header {
    text-align: center;
    margin-bottom: 36px;
    width: 100%;
    animation: fadeInUp 0.7s var(--ease-out-expo) both;
}

/* --- Avatar --- */
.bio-avatar-container {
    width: 100px;
    height: 100px;
    border-radius: var(--radius-avatar);
    background: linear-gradient(135deg, var(--color-primary), #06b6d4, var(--color-primary-deep));
    padding: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 18px auto;
    position: relative;
    animation: avatarPulse 3s ease-in-out infinite;
}

.bio-avatar-container::after {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-primary), transparent, #06b6d4);
    opacity: 0.3;
    z-index: -1;
    filter: blur(10px);
    animation: avatarPulse 3s ease-in-out infinite;
}

.bio-avatar-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    background: var(--color-bg-deep);
}

@keyframes avatarPulse {
    0%, 100% { box-shadow: 0 0 20px rgba(52, 211, 153, 0.15); }
    50%      { box-shadow: 0 0 35px rgba(52, 211, 153, 0.30); }
}

/* --- Title --- */
.bio-title-row {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.bio-title {
    font-size: 24px;
    font-weight: 800;
    color: var(--color-text-main);
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.bio-badge {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary);
    filter: drop-shadow(0 0 4px rgba(52, 211, 153, 0.4));
}

/* --- Description --- */
.bio-description {
    font-size: 14px;
    color: var(--color-text-secondary);
    max-width: 400px;
    margin: 0 auto;
    line-height: 1.7;
    word-wrap: break-word;
}

/* ==========================================================================
   6. NAVIGATION LINKS
   ========================================================================== */
.bio-nav {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* --- Link Card --- */
.bio-link-card {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    min-height: 62px;
    padding: 16px 22px;
    background: var(--color-bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-card);
    text-decoration: none;
    color: var(--color-text-main);
    font-weight: 600;
    font-size: 14px;
    box-shadow: var(--shadow-card);
    transition:
        transform var(--transition-smooth),
        background var(--transition-smooth),
        border-color var(--transition-smooth),
        box-shadow var(--transition-smooth);
    position: relative;
    cursor: pointer;
    overflow: hidden;

    /* Entrance animation — delay set via JS */
    opacity: 0;
    animation: cardEnter 0.6s var(--ease-out-expo) forwards;
}

.bio-link-card:hover {
    transform: translateY(-3px) scale(1.01);
    background: var(--color-bg-card-hover);
    border-color: var(--color-border-hover);
    box-shadow: var(--shadow-card-hover);
}

.bio-link-card:active {
    transform: translateY(0) scale(0.99);
    transition-duration: 0.1s;
}

.bio-link-card:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 3px;
}

/* Hover shimmer line */
.bio-link-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.04), transparent);
    transition: left 0.6s ease;
    pointer-events: none;
}

.bio-link-card:hover::before {
    left: 100%;
}

/* Card entrance animation */
@keyframes cardEnter {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* --- Link Icon --- */
.bio-link-icon {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: var(--color-primary-dim);
    color: var(--color-primary);
    transition: background var(--transition-smooth), transform var(--transition-smooth);
}

.bio-link-icon svg {
    width: 18px;
    height: 18px;
}

.bio-link-card:hover .bio-link-icon {
    background: var(--color-primary-glow);
    transform: scale(1.05);
}

/* --- Link Text --- */
.bio-link-text {
    flex: 1;
    min-width: 0;
    line-height: 1.4;
}

/* --- Arrow indicator --- */
.bio-link-arrow {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    color: var(--color-text-muted);
    transition: transform var(--transition-smooth), color var(--transition-smooth);
}

.bio-link-card:hover .bio-link-arrow {
    color: var(--color-primary);
    transform: translateX(3px);
}

/* ==========================================================================
   7. FEATURED CARD
   ========================================================================== */
.bio-link-card--featured {
    background: linear-gradient(135deg, rgba(52, 211, 153, 0.12), rgba(6, 182, 212, 0.08));
    border-color: rgba(52, 211, 153, 0.25);
}

.bio-link-card--featured .bio-link-icon {
    background: linear-gradient(135deg, var(--color-primary-deep), #0891b2);
    color: #ffffff;
}

.bio-link-card--featured:hover {
    border-color: var(--color-primary);
    box-shadow: var(--shadow-glow), var(--shadow-card-hover);
}

/* Shimmer sweep on featured */
.bio-link-card--featured::after {
    content: '';
    position: absolute;
    top: 0;
    left: -150%;
    width: 60%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(52, 211, 153, 0.06) 40%,
        rgba(52, 211, 153, 0.10) 50%,
        rgba(52, 211, 153, 0.06) 60%,
        transparent 100%
    );
    animation: shimmer 4s ease-in-out infinite;
    pointer-events: none;
}

@keyframes shimmer {
    0%   { left: -150%; }
    100% { left: 250%; }
}

/* ==========================================================================
   8. RIPPLE EFFECT
   ========================================================================== */
.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(52, 211, 153, 0.25);
    transform: scale(0);
    animation: rippleEffect 0.6s ease-out forwards;
    pointer-events: none;
}

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

/* ==========================================================================
   9. FOOTER
   ========================================================================== */
.bio-footer {
    margin-top: 48px;
    text-align: center;
    width: 100%;
    animation: fadeInUp 0.7s var(--ease-out-expo) 1.2s both;
}

.bio-footer-divider {
    width: 40px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--color-primary), transparent);
    margin: 0 auto 16px auto;
    border-radius: 99px;
    opacity: 0.5;
}

.bio-footer-text {
    font-size: 12px;
    color: var(--color-text-muted);
    letter-spacing: 0.3px;
}

/* ==========================================================================
   10. GLOBAL ANIMATIONS
   ========================================================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================================================
   11. RESPONSIVE
   ========================================================================== */
@media (max-width: 520px) {
    body {
        padding: 32px 16px 48px;
    }

    .bio-title {
        font-size: 21px;
    }

    .bio-description {
        font-size: 13px;
    }

    .bio-link-card {
        font-size: 13px;
        padding: 14px 18px;
        min-height: 58px;
        gap: 12px;
    }

    .bio-link-icon {
        width: 34px;
        height: 34px;
        border-radius: 8px;
    }

    .bio-link-icon svg {
        width: 16px;
        height: 16px;
    }

    .bg-animation::before {
        width: 350px;
        height: 350px;
    }

    .bg-animation::after {
        width: 280px;
        height: 280px;
    }

    .bg-orb {
        width: 200px;
        height: 200px;
    }
}

@media (max-width: 360px) {
    .bio-link-card {
        padding: 12px 14px;
        gap: 10px;
        font-size: 12.5px;
    }

    .bio-link-icon {
        width: 30px;
        height: 30px;
    }
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}