/* Base styles - Common to all themes */
:root {
    --transition-smooth: cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    transition: all 0.5s var(--transition-smooth);
}

/* Typography Scale */
.h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
.h2 { font-size: clamp(1.75rem, 3vw, 2.5rem); }
.h3 { font-size: clamp(1.25rem, 2vw, 1.75rem); }
.body-large { font-size: 1.125rem; }
.body { font-size: 1rem; }
.small { font-size: 0.875rem; }

/* Layout Containers */
.container {
    width: min(90%, 1200px);
    margin: 0 auto;
    padding: 2rem;
}

.fluid-container {
    width: 100%;
    padding: 2rem;
}

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 1s ease-out;
}

.loading-screen.hidden {
    opacity: 0;
    pointer-events: none;
}


/* Navigation */
.navigation {
    padding: 2rem 0;
    position: relative;
    z-index: 100;
    background: transparent;
}

.nav-constellation {
    position: relative;
    width: 100%;
    min-height: 300px;
    margin: 2rem 0 3rem 0;
    z-index: 100;
    overflow: visible;
}

.nav-node {
    position: absolute;
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.4s var(--transition-smooth);
    z-index: 101;
}

.nav-node:hover {
    transform: scale(1.1);
}

.nav-line {
    position: absolute;
    height: 1px;
    transform-origin: left center;
    pointer-events: none;
    opacity: 0.3;
}

/* Main Content Area */
#mainContent {
    position: relative;
    z-index: 50;
    margin-top: 1rem;
    padding-top: 0;
    clear: both;
}

/* Content Sections */
.content-section {
    margin: 4rem 0;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s var(--transition-smooth), transform 0.8s var(--transition-smooth);
    position: relative;
    z-index: 50;
}

/* Footer specific override */
.footer.content-section {
    margin-top: 8rem;
    position: relative;
    z-index: 10;
}

.content-section.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Cards */
.card {
    padding: 2rem;
    border-radius: 1rem;
    transition: all 0.3s var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
}

/* Grid Layouts */
.project-grid,
.archive-grid,
.dreams-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

/* Microinteractions - simplified without breathing effect */
.glow-on-hover {
    position: relative;
    transition: all 0.3s ease;
}

.glow-on-hover:hover {
    /* Simple hover without expansion animation */
    box-shadow: 0 0 20px rgba(57, 255, 20, 0.3);
}

/* Animations */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes glitch {
    0%, 100% { transform: translate(0); }
    20% { transform: translate(-2px, 2px); }
    40% { transform: translate(-2px, -2px); }
    60% { transform: translate(2px, 2px); }
    80% { transform: translate(2px, -2px); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

@keyframes rippleEffect {
    to {
        width: 200%;
        height: 200%;
        opacity: 0;
    }
}

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

.fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
    opacity: 0;
}

.ripple {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    animation: rippleEffect 1s ease-out;
}

/* Responsive */
@media (max-width: 768px) {
    .theme-switcher {
        top: 1rem;
        right: 1rem;
    }
    
    .nav-constellation {
        min-height: 500px;
        margin: 1rem 0 2rem 0;
    }
    
    .nav-node {
        width: 90px;
        height: 90px;
        font-size: 0.85rem;
    }
    
    .nav-node .node-label {
        font-size: 0.8rem;
        line-height: 1.2;
    }
    
    /* Reposition nodes for mobile */
    .nav-node[data-section="maker"] {
        top: 5% !important;
        left: 10% !important;
    }
    
    .nav-node[data-section="ai-speakeasy"] {
        top: 5% !important;
        left: 55% !important;
    }
    
    .nav-node[data-section="silicon-dreams"] {
        top: 40% !important;
        left: 10% !important;
    }
    
    .nav-node[data-section="life"] {
        top: 40% !important;
        left: 55% !important;
    }
    
    .container {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .nav-constellation {
        min-height: 400px;
    }
    
    .nav-node {
        width: 80px;
        height: 80px;
    }
    
    .nav-node .node-label {
        font-size: 0.7rem;
    }
}

/* Accessibility */
*:focus {
    outline: 2px solid currentColor;
    outline-offset: 4px;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}