/* --- Base Variables --- */
:root {
    --font-primary: 'Outfit', sans-serif;
    --font-mono: 'Space Mono', monospace;
    --font-serif: 'Cinzel', serif;

    --transition-speed: 0.4s;

    /* Default: Tech Theme (Clean Dark) */
    --bg-color: #09090b;
    --text-color: #ffffff;
    --primary-color: #10b981;
    /* Emerald Green */

    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-hover: rgba(255, 255, 255, 0.08);

    --border-width: 1px;
    --border-radius: 12px;

    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --backdrop-blur: 12px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-primary);
    background-color: var(--bg-color);
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    /* transition: background-color var(--transition-speed), color var(--transition-speed); */
    overflow-x: hidden;
    position: relative;
    -webkit-font-smoothing: antialiased;
}

/* --- THEMES --- */

/* 1. Tech Theme (Clean, Modern Dark) */
body.theme-tech {
    background: linear-gradient(135deg, #09090b 0%, #18181b 100%);
    --primary-color: #10b981;
}

/* 2. Cyberpunk Theme (Bold, Animated, Mono) */
body.theme-cyberpunk {
    --font-primary: 'Space Mono', monospace;
    background-color: #050505;
    --text-color: #fff;
    --primary-color: #00ff9d;
    --glass-bg: #000;
    --glass-border: #00ff9d;
    --glass-hover: #00ff9d;
    /* Hover fill */
    --border-width: 2px;
    --border-radius: 0px;
    --shadow: 4px 4px 0px #00ff9d;
}

/* Floating Grid Animation for Cyberpunk ONLY */
body.theme-cyberpunk .background-anim {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background-image:
        linear-gradient(rgba(0, 255, 157, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 157, 0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    background-position: center;
    animation: moveGrid 15s linear infinite;
    opacity: 0.4;
    pointer-events: none;
}

@keyframes moveGrid {
    0% {
        transform: translateY(0);
    }

    100% {
        transform: translateY(50px);
    }
}

/* 3. Luxury Theme (Dark Gold, Serif) */
body.theme-luxury {
    --font-primary: 'Cinzel', serif;
    /* Much darker, almost black background */
    background: #030303;
    --text-color: #D4AF37;
    /* Gold */
    --primary-color: #D4AF37;

    --glass-bg: rgba(10, 10, 10, 0.8);
    --glass-border: rgba(212, 175, 55, 0.3);
    --glass-hover: rgba(212, 175, 55, 0.15);

    --border-radius: 2px;
    --shadow: 0 0 20px rgba(0, 0, 0, 0.8);

    /* Subtle texture */
    background-image: linear-gradient(to bottom, #000000, #0a0a0a);
}

/* 4. Light Theme */
body.theme-light {
    background: #f4f4f5;
    --text-color: #18181b;
    --primary-color: #2563eb;
    --glass-bg: #ffffff;
    --glass-border: #e4e4e7;
    --glass-hover: #f4f4f5;
    --shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* 5. Image Theme */
body.theme-image {
    background-color: #000;
}

body.theme-image .background-anim {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -2;
    background-image: var(--bg-image);
    background-size: cover;
    background-position: center;
    filter: blur(20px) brightness(0.6);
    transform: scale(1.1);
}

/* Layout */
.container {
    width: 100%;
    max-width: 480px;
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    z-index: 10;
}

/* Profile */
.profile-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
}

.profile-pic-container {
    position: relative;
    cursor: pointer;
    transition: transform 0.2s;
}

.profile-pic-container:active {
    transform: scale(0.95);
}

.profile-pic {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--glass-border);
    box-shadow: var(--shadow);
}

/* Cyberpunk overrides */
body.theme-cyberpunk .profile-pic {
    border-radius: 0;
    border: 2px solid var(--primary-color);
}

.name {
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 0.5rem;
}

body.theme-luxury .name {
    letter-spacing: 3px;
    font-weight: 400;
}

body.theme-cyberpunk .name {
    text-transform: uppercase;
    letter-spacing: 2px;
}

.bio {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Links */
.links-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.glass-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 1rem 1.25rem;
    min-height: 60px;

    background: var(--glass-bg);
    border: var(--border-width) solid var(--glass-border);
    border-radius: var(--border-radius);

    color: var(--text-color);
    text-decoration: none;
    font-weight: 600;

    box-shadow: var(--shadow);
    transition: all 0.2s ease;
}

.glass-btn:hover {
    transform: translateY(-2px);
    background: var(--glass-hover);
    border-color: var(--primary-color);
}

/* Hover text color change for Cyberpunk */
body.theme-cyberpunk .glass-btn:hover {
    color: #000;
    /* Invert text on hover since hover bg is intense */
}

/* Icons */
.glass-btn .icon {
    font-size: 1.25rem;
    width: 30px;
    text-align: center;
}

.glass-btn span {
    flex: 1;
    text-align: center;
}

.glass-btn .share-icon {
    font-size: 0.8rem;
    opacity: 0.5;
}

/* --- SPECIAL LINK (2X26 PROJECTS) --- */
/* The user felt this looked "always active". 
   We will make it identifiable but subtle. */
.special-link {
    border-color: var(--primary-color);
    /* Just border color */
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    /* Subtle shadow */
}

/* Add a tiny indicator or glow on hover mainly */
.special-link:hover {
    box-shadow: 0 0 15px var(--primary-color);
    /* Glow on hover */
}

/* Cyberpunk Special: Dashed border to stand out without looking pressed */
body.theme-cyberpunk .special-link {
    border-style: dashed;
    box-shadow: none;
}

body.theme-cyberpunk .special-link:hover {
    background: var(--primary-color);
    border-style: solid;
    box-shadow: 4px 4px 0px #fff;
    color: #000;
}

/* Luxury Special: Gold border, no fill */
body.theme-luxury .special-link {
    border: 1px solid var(--primary-color);
    box-shadow: none;
}

/* Footer */
.footer {
    margin-top: 1rem;
    font-size: 0.75rem;
    opacity: 0.5;
}

/* Animations */
.animate-fade-in {
    animation: fadeIn 0.8s ease-out forwards;
}

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

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

/* Transition Animations (triggered by JS) */
.anim-fade {
    animation: transFade 0.5s ease;
}

@keyframes transFade {
    0% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

.anim-slide {
    animation: transSlide 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes transSlide {
    0% {
        transform: translateX(50px);
        opacity: 0;
    }

    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

.anim-scale {
    animation: transScale 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes transScale {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.anim-bounce {
    animation: transBounce 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes transBounce {
    0% {
        transform: translateY(-50px);
        opacity: 0;
    }

    60% {
        transform: translateY(10px);
        opacity: 1;
    }

    100% {
        transform: translateY(0);
    }
}

.anim-blur {
    animation: transBlur 0.5s ease-out;
}

@keyframes transBlur {
    0% {
        filter: blur(10px);
        opacity: 0;
    }

    100% {
        filter: blur(0);
        opacity: 1;
    }
}

.anim-flip {
    animation: transFlip 0.6s ease-in-out;
}

@keyframes transFlip {
    0% {
        transform: perspective(400px) rotateX(90deg);
        opacity: 0;
    }

    100% {
        transform: perspective(400px) rotateX(0deg);
        opacity: 1;
    }
}