/* ==========================================================================
   Base Styles - Variables, Reset, Typography, Section System, Animations
   ========================================================================== */

/* CSS Custom Properties */
:root {
    --primary-color: #333333;
    --secondary-color: #666666;
    --accent-color: #000000;
    --bg-light: #ffffff;
    --bg-lighter: #fafafa;
    --text-primary: #333333;
    --text-secondary: #666666;
    --text-light: #999999;
    --border-light: #e0e0e0;
    --shadow-subtle: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 4px 20px rgba(0, 0, 0, 0.15);
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-secondary: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --nav-height: 80px;
}

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

html {
    scroll-behavior: smooth;
    overflow-y: scroll;
}

body {
    font-family: var(--font-secondary);
    background: var(--bg-light);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    opacity: 0;
    transition: opacity 0.5s ease;
}

body.loaded {
    opacity: 1;
}

body.no-scroll {
    overflow: hidden !important;
    height: 100vh !important;
}

body.modal-open {
    overflow: hidden;
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Section System
   Sections are hidden by default; only the .active section is visible.
   Non-active sections are absolutely positioned to prevent layout shift. */
.section {
    min-height: 100vh;
    padding: calc(var(--nav-height) + 20px) 0;
    display: none;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
}

.section.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    position: relative;
}

.section:not(.active) {
    pointer-events: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Typography */
.section-title {
    font-family: var(--font-primary);
    font-size: 2.5rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--text-primary);
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 2px;
    background: var(--primary-color);
}

.cyber-title {
    font-family: var(--font-primary);
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.glitch-text {
    display: block;
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-weight: 400;
}

.name-highlight {
    color: var(--accent-color);
}

/* Glass Effect */
.glass-effect {
    background: var(--bg-light);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    box-shadow: var(--shadow-subtle);
    transition: box-shadow 0.3s ease;
}

.glass-effect:hover {
    box-shadow: var(--shadow-hover);
}

/* Animations */
.animate-in {
    animation: slideInUp 0.6s ease forwards;
}

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

/* Responsive */

/* On small screens, shrink nav and allow scrolling when intro overflows */
@media (max-width: 768px) {
    :root {
        --nav-height: 60px;
    }

    body.no-scroll {
        overflow-y: auto !important;
        height: auto !important;
    }

    .cyber-title {
        font-size: 2.5rem;
    }

    .glitch-text {
        font-size: 1.1rem;
    }

    .section-title {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    :root {
        --nav-height: 56px;
    }

    .cyber-title {
        font-size: 1.8rem;
    }

    .glitch-text {
        font-size: 1rem;
    }

    .section-title {
        font-size: 1.5rem;
    }
}
