/* ==========================================================================
   DESIGN SYSTEM & VARIABLES
   ========================================================================== */
:root {
    /* Fonts */
    --font-primary: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-serif: 'Playfair Display', Georgia, serif;

    /* Colors - Light Theme Default */
    --bg-base: #f3f4f6;
    --text-primary: #111827;
    --text-secondary: #4b5563;
    --text-muted: #9ca3af;
    
    --card-bg: rgba(255, 255, 255, 0.65);
    --card-border: rgba(255, 255, 255, 0.5);
    --card-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.04);
    --card-hover-bg: rgba(255, 255, 255, 0.8);
    --card-hover-border: rgba(255, 255, 255, 0.8);
    
    --control-btn-bg: rgba(255, 255, 255, 0.8);
    --control-btn-border: rgba(229, 231, 235, 1);
    --control-btn-hover-bg: #ffffff;
    
    /* Brand Gradients */
    --grad-blue: linear-gradient(135deg, #3b82f6, #1d4ed8);
    --grad-purple: linear-gradient(135deg, #a855f7, #6b21a8);
    --grad-orange: linear-gradient(135deg, #f97316, #c2410c);
    --grad-gold: linear-gradient(135deg, #fbbf24, #b45309);
    --grad-green: linear-gradient(135deg, #10b981, #047857);
    --grad-avatar: linear-gradient(135deg, #3b82f6, #a855f7, #f97316);
    --grad-highlight: linear-gradient(90deg, rgba(59, 130, 246, 0.1), rgba(168, 85, 247, 0.1));

    /* Glow Elements (Orbs) */
    --orb-1: rgba(168, 85, 247, 0.15);
    --orb-2: rgba(59, 130, 246, 0.15);
    --orb-3: rgba(249, 115, 22, 0.1);
}

/* Dark Theme Variables */
[data-theme="dark"] {
    --bg-base: #080b11;
    --text-primary: #f9fafb;
    --text-secondary: #d1d5db;
    --text-muted: #6b7280;
    
    --card-bg: rgba(15, 23, 42, 0.45);
    --card-border: rgba(255, 255, 255, 0.07);
    --card-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    --card-hover-bg: rgba(15, 23, 42, 0.65);
    --card-hover-border: rgba(255, 255, 255, 0.15);
    
    --control-btn-bg: rgba(15, 23, 42, 0.6);
    --control-btn-border: rgba(255, 255, 255, 0.08);
    --control-btn-hover-bg: rgba(15, 23, 42, 0.9);
    
    --grad-highlight: linear-gradient(90deg, rgba(59, 130, 246, 0.15), rgba(168, 85, 247, 0.15));

    /* Glow Elements (Orbs) */
    --orb-1: rgba(168, 85, 247, 0.25);
    --orb-2: rgba(59, 130, 246, 0.25);
    --orb-3: rgba(249, 115, 22, 0.15);
}

/* ==========================================================================
   RESET & BASE STYLES
   ========================================================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: var(--font-primary);
    background-color: var(--bg-base);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    position: relative;
    overflow-x: hidden;
    transition: background-color 0.5s cubic-bezier(0.4, 0, 0.2, 1), color 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

a {
    color: inherit;
    text-decoration: none;
}

/* ==========================================================================
   BACKGROUND GLOWS (ORBS)
   ========================================================================== */
.bg-glow {
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    z-index: -1;
    pointer-events: none;
    transition: background-color 0.5s ease;
}

.bg-glow-1 {
    top: -10%;
    left: -10%;
    width: 60vw;
    height: 60vw;
    background-color: var(--orb-1);
}

.bg-glow-2 {
    bottom: -10%;
    right: -10%;
    width: 60vw;
    height: 60vw;
    background-color: var(--orb-2);
}

.bg-glow-3 {
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40vw;
    height: 40vw;
    background-color: var(--orb-3);
}

/* ==========================================================================
   LAYOUT CONTAINER
   ========================================================================== */
.container {
    width: 100%;
    max-width: 580px;
    padding: 32px 16px 64px 16px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    z-index: 1;
}

/* ==========================================================================
   GLASSMOPHISM GENERAL CARD
   ========================================================================== */
.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    box-shadow: var(--card-shadow);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* ==========================================================================
   TOP CONTROLS
   ========================================================================== */
.top-controls {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.control-btn {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    border: 1px solid var(--control-btn-border);
    background: var(--control-btn-bg);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

.control-btn:hover {
    background: var(--control-btn-hover-bg);
    transform: translateY(-2px);
}

.control-btn:active {
    transform: translateY(0);
}

/* Sun/Moon visibility depending on theme */
.sun-icon { display: none; }
.moon-icon { display: block; }
[data-theme="dark"] .sun-icon { display: block; }
[data-theme="dark"] .moon-icon { display: none; }

/* Language Text styling */
#lang-toggle span {
    font-size: 13px;
    letter-spacing: 0.5px;
}

/* ==========================================================================
   PROFILE HEADER
   ========================================================================== */
.profile-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    margin-top: 8px;
}

.avatar-wrapper {
    position: relative;
    padding: 4px;
    border-radius: 50%;
    background: var(--grad-avatar);
    display: inline-flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15);
}

.avatar {
    width: 104px;
    height: 104px;
    border-radius: 50%;
    object-cover: cover;
    border: 3px solid var(--bg-base);
    transition: border-color 0.5s ease;
}

/* Pulse Ring Animation */
.pulse-ring {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 50%;
    border: 2px solid var(--text-muted);
    opacity: 0;
    pointer-events: none;
    animation: pulse 3s infinite;
    z-index: -1;
}

@keyframes pulse {
    0% {
        transform: scale(0.95);
        opacity: 0.5;
    }
    50% {
        opacity: 0.3;
    }
    100% {
        transform: scale(1.15);
        opacity: 0;
    }
}

.profile-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.name {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.verified-badge {
    color: #3b82f6;
    display: inline-flex;
    align-items: center;
}

.title {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Social Icon Section */
.social-links {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 8px;
}

.social-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    box-shadow: var(--card-shadow);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.social-icon:hover {
    color: var(--text-primary);
    transform: translateY(-3px) scale(1.08);
    background: var(--control-btn-hover-bg);
    border-color: rgba(59, 130, 246, 0.4);
    box-shadow: 0 10px 20px rgba(59, 130, 246, 0.15);
}

.social-icon:active {
    transform: translateY(0) scale(1);
}

/* ==========================================================================
   BIO DETAILS CARD
   ========================================================================== */
.bio-card {
    padding: 20px 24px;
}

.bio-text {
    display: none;
    flex-direction: column;
    gap: 12px;
    font-size: 14.5px;
    line-height: 1.6;
    color: var(--text-secondary);
}

.bio-text.active {
    display: flex;
}

.bio-text strong {
    color: var(--text-primary);
}

.bio-subtext {
    font-size: 13px;
    color: var(--text-muted);
}

/* ==========================================================================
   BIO LINKS WRAPPER & ITEMS
   ========================================================================== */
.links-wrapper {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.link-item {
    display: flex;
    align-items: center;
    padding: 16px;
    gap: 16px;
    cursor: pointer;
}

.link-item:hover {
    background: var(--card-hover-bg);
    border-color: var(--card-hover-border);
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] .link-item:hover {
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

.link-item:active {
    transform: translateY(-1px);
}

/* Gradient Background for Link Icons */
.link-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    flex-shrink: 0;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

.bg-blue-grad { background: var(--grad-blue); }
.bg-purple-grad { background: var(--grad-purple); }
.bg-orange-grad { background: var(--grad-orange); }
.bg-gold-grad { background: var(--grad-gold); }
.bg-green-grad { background: var(--grad-green); }

.link-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex-grow: 1;
    min-width: 0; /* Ensures overflow text ellipsis works */
}

.link-title-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.link-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.2px;
}

.link-description {
    font-size: 12.5px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.link-arrow {
    color: var(--text-muted);
    transition: transform 0.2s ease;
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.link-item:hover .link-arrow {
    transform: translateX(4px);
    color: var(--text-primary);
}

/* Highlights for Special Links */
.link-item.highlight {
    background: var(--grad-highlight);
    border: 1px solid rgba(168, 85, 247, 0.25);
    position: relative;
    overflow: hidden;
}

.link-item.highlight::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(
        to right,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.2) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    transform: skewX(-25deg);
    animation: shine 4s infinite ease-in-out;
}

@keyframes shine {
    0% { left: -100%; }
    25% { left: 150%; }
    100% { left: 150%; }
}

/* ==========================================================================
   BADGES
   ========================================================================== */
.badge {
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: 6px;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
}

.badge-accent {
    background: rgba(59, 130, 246, 0.1);
    color: #2563eb;
}

[data-theme="dark"] .badge-accent {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
}

.badge-hot {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
    animation: pulse-badge 2s infinite;
}

[data-theme="dark"] .badge-hot {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
}

@keyframes pulse-badge {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.badge-new {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
}

[data-theme="dark"] .badge-new {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
}

.badge-premium {
    background: rgba(217, 119, 6, 0.1);
    color: #d97706;
}

[data-theme="dark"] .badge-premium {
    background: rgba(251, 191, 36, 0.15);
    color: #fbbf24;
}

/* ==========================================================================
   FOOTER SECTION
   ========================================================================== */
.footer {
    margin-top: 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.slogan {
    font-family: var(--font-serif);
    font-size: 18px;
    font-style: italic;
    color: var(--text-secondary);
    letter-spacing: 0.5px;
}

.copyright {
    font-size: 11px;
    color: var(--text-muted);
}

/* ==========================================================================
   ANIMATIONS & PAGE LOAD EFFECTS
   ========================================================================== */
.animate-fade-in {
    animation: fadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

/* ==========================================================================
   MOBILE RESPONSIVENESS
   ========================================================================== */
@media (max-width: 480px) {
    .container {
        padding: 24px 12px 48px 12px;
        gap: 20px;
    }
    
    .avatar {
        width: 88px;
        height: 88px;
    }
    
    .name {
        font-size: 21px;
    }
    
    .title {
        font-size: 13px;
    }
    
    .bio-card {
        padding: 16px 20px;
    }
    
    .bio-text {
        font-size: 13.5px;
    }
    
    .link-item {
        padding: 12px;
        gap: 12px;
    }
    
    .link-icon {
        width: 42px;
        height: 42px;
        border-radius: 12px;
    }
    
    .link-title {
        font-size: 14.5px;
    }
    
    .link-description {
        font-size: 12px;
    }
    
    .slogan {
        font-size: 16px;
    }
}
