/* =========================================
   SHARED DESIGN TOKENS & BASE STYLES
   ========================================= */

:root {
    /* Color Palette - Dark Theme Base */
    --color-bg-base: #0a0a0c;
    --color-bg-surface: #141418;
    --color-bg-surface-glass: rgba(20, 20, 24, 0.6);
    
    --color-text-primary: #f5f5f7;
    --color-text-secondary: #a1a1aa;
    
    /* Random Studio Accents */
    --color-random-accent: #00f0ff; /* Electric Blue */
    --color-random-glow: rgba(0, 240, 255, 0.4);

    /* Ronic Accents */
    --color-ronic-accent: #ef233c; /* Tech Red */
    --color-ronic-glow: rgba(239, 35, 60, 0.4);

    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    
    /* Spacing & Utilities */
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 2rem;
    --spacing-xl: 4rem;
    
    --border-radius: 12px;
    --transition-speed: 0.3s;
}

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

html, body {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    background-color: var(--color-bg-base);
    color: var(--color-text-primary);
    font-family: var(--font-sans);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Typography Utilities */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: var(--spacing-md);
}

h2 {
    font-size: clamp(2rem, 6vw, 2.5rem);
}

h3 {
    font-size: clamp(1.2rem, 4vw, 1.5rem);
}

/* Ensure horizontal padding on mobile for all content */
section, header, footer {
    padding-left: var(--spacing-md);
    padding-right: var(--spacing-md);
}

@media (min-width: 768px) {
    section, header, footer {
        padding-left: var(--spacing-xl);
        padding-right: var(--spacing-xl);
    }
}

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-speed) ease;
}

/* Glassmorphism Components */
.glass-panel {
    background: var(--color-bg-surface-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--border-radius);
    padding: var(--spacing-lg);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-speed) ease;
    border: none;
    outline: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.875rem;
}

.btn-random {
    background: transparent;
    color: var(--color-random-accent);
    border: 1px solid var(--color-random-accent);
    box-shadow: 0 0 10px var(--color-random-glow);
}

.btn-random:hover {
    background: var(--color-random-accent);
    color: var(--color-bg-base);
    box-shadow: 0 0 20px var(--color-random-glow);
    transform: translateY(-2px);
}

.btn-ronic {
    background: transparent;
    color: var(--color-text-primary);
    border: 1px solid var(--color-ronic-accent);
    box-shadow: 0 0 10px var(--color-ronic-glow);
}

.btn-ronic:hover {
    background: var(--color-ronic-accent);
    color: var(--color-text-primary);
    box-shadow: 0 0 20px var(--color-ronic-glow);
    transform: translateY(-2px);
}

/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Header / Nav */
.main-nav {
    position: fixed;
    top: 0;
    width: 100%;
    height: 80px;
    z-index: 1000;
    padding: 0 var(--spacing-xl);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(10, 10, 12, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.logo {
    display: flex;
    align-items: center;
    height: 40px;
    text-decoration: none;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
    list-style: none;
}

/* Nav Links Animations */
@keyframes slideInFromRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

.nav-links > * {
    opacity: 0;
    transform: translateX(20px);
    animation: slideInFromRight 0.5s forwards cubic-bezier(0.2, 0.8, 0.2, 1);
}

.nav-links > *:nth-child(1) { animation-delay: 0.1s; }
.nav-links > *:nth-child(2) { animation-delay: 0.15s; }
.nav-links > *:nth-child(3) { animation-delay: 0.2s; }
.nav-links > *:nth-child(4) { animation-delay: 0.25s; }
.nav-links > *:nth-child(5) { animation-delay: 0.3s; }
.nav-links > *:nth-child(6) { animation-delay: 0.35s; }
.nav-links > *:nth-child(7) { animation-delay: 0.4s; }
.nav-links > *:nth-child(8) { animation-delay: 0.45s; }

.nav-exit > * {
    animation: slideOutToRight 0.3s forwards ease-in !important;
}

.nav-exit > *:nth-child(1) { animation-delay: 0.0s; }
.nav-exit > *:nth-child(2) { animation-delay: 0.05s; }
.nav-exit > *:nth-child(3) { animation-delay: 0.1s; }
.nav-exit > *:nth-child(4) { animation-delay: 0.15s; }
.nav-exit > *:nth-child(5) { animation-delay: 0.2s; }
.nav-exit > *:nth-child(6) { animation-delay: 0.25s; }
.nav-exit > *:nth-child(7) { animation-delay: 0.3s; }
.nav-exit > *:nth-child(8) { animation-delay: 0.35s; }

.nav-links a {
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-text-secondary);
}

.nav-links a:hover {
    color: var(--color-text-primary);
}

.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    z-index: 1001; /* Above mobile menu */
}

.bar {
    height: 3px;
    width: 25px;
    background-color: var(--color-text-primary);
    margin: 4px 0;
    border-radius: 3px;
    transition: all 0.3s ease;
}

/* Mobile Nav Styles */
@media (max-width: 768px) {
    .main-nav {
        padding: 0 var(--spacing-md);
    }

    .menu-toggle {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100vw;
        height: 100vh;
        background: rgba(10, 10, 12, 0.98);
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: right 0.4s ease;
        z-index: 1000;
        margin: 0;
        padding: 0;
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links li {
        margin: 1.5rem 0;
    }

    .nav-links a {
        font-size: 1.5rem;
    }

    .lang-selector {
        border-left: none;
        border-top: 1px solid rgba(255,255,255,0.1);
        padding-left: 0;
        padding-top: 1rem;
        margin-left: 0;
        margin-top: 1rem;
        width: 100%;
        justify-content: center;
    }

    /* Hamburger Animation */
    .menu-toggle.is-active .bar:nth-child(2) {
        opacity: 0;
    }
    .menu-toggle.is-active .bar:nth-child(1) {
        transform: translateY(11px) rotate(45deg);
    }
    .menu-toggle.is-active .bar:nth-child(3) {
        transform: translateY(-11px) rotate(-45deg);
    }
}

.lang-selector {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    border-left: 1px solid rgba(255,255,255,0.1);
    padding-left: 1rem;
    margin-left: 1rem;
}

.lang-btn {
    font-size: 0.8rem !important;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    background: transparent;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.lang-btn.active {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.2);
    color: var(--color-text-primary);
}

/* Modal / Gallery Styles */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(10, 10, 12, 0.95);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-speed) ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    width: 90%;
    max-width: 1200px;
    max-height: 90vh;
    background: var(--color-bg-surface-glass);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--border-radius);
    padding: var(--spacing-xl);
    overflow-y: auto;
    position: relative;
    transform: translateY(20px);
    transition: transform var(--transition-speed) ease;
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: transparent;
    border: none;
    color: var(--color-text-primary);
    font-size: 2rem;
    cursor: pointer;
    transition: color 0.2s ease;
}

.modal-close:hover {
    color: var(--color-ronic-accent);
}

.modal-header {
    margin-bottom: var(--spacing-lg);
    text-align: center;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-md);
}

.gallery-item {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: var(--border-radius);
    border: 1px solid rgba(255,255,255,0.05);
    transition: transform 0.3s ease;
}

.gallery-item:hover {
    transform: scale(1.02);
}

/* Ambient Glows */
.ambient-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(150px);
    opacity: 0.4;
    z-index: 0;
    pointer-events: none;
    transition: transform 0.1s ease-out;
}
