/* FLEX Project Page - Main Styles */

/* ========================================
   CSS Variables & Design System
   ======================================== */
:root {
    /* Core Colors */
    --primary-color: #2563eb;
    --secondary-color: #1e40af;
    --accent-color: #3b82f6;
    --text-color: #1f2937;
    --light-bg: #f9fafb;
    --white: #ffffff;
    --border-color: #e5e7eb;
    
    /* Domain Colors */
    --math-color: #3b82f6;
    --chemistry-color: #10b981;
    --biology-color: #8b5cf6;
    --methodology-color: #f59e0b;
    --applications-color: #06b6d4;
    --theory-color: #6366f1;
    
    /* Shadows */
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-2xl: 4rem;
    
    /* Layout */
    --max-width: 1200px;
    --max-width-wide: 1400px;
    
    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* ========================================
   Base Styles
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--white);
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.02em;
}

h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
}

h2 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
}

h3 {
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    font-weight: 600;
}

p {
    margin-bottom: 1rem;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color var(--transition-base);
}

a:hover {
    color: var(--accent-color);
}

/* Code */
code {
    background-color: #f3f4f6;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    color: #dc2626;
}

/* Utilities */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
}

.container-wide {
    max-width: var(--max-width-wide);
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
}

.text-center {
    text-align: center;
}

.highlight {
    background: linear-gradient(120deg, #fef3c7 0%, #fde68a 100%);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-weight: 500;
}

/* ========================================
   Logo Bar
   ======================================== */
.logo-bar {
    background: linear-gradient(to bottom, #ffffff 0%, #f8fafc 100%);
    padding: 1.8rem 2rem;
    border-bottom: 1px solid rgba(59, 130, 246, 0.1);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    position: relative;
    z-index: 1000;
}

.logo-bar::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(59, 130, 246, 0.3) 25%, 
        rgba(147, 51, 234, 0.3) 75%, 
        transparent 100%);
}

.logo-container {
    display: flex;
    gap: 3.5rem;
    align-items: center;
    justify-content: center;
    flex: 1;
}

.logo-bar img {
    height: 52px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.06));
    transition: all var(--transition-base);
}

.logo-bar img:hover {
    transform: translateY(-2px) scale(1.05);
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.12));
}

/* ========================================
   Section Styles
   ======================================== */
section {
    padding: var(--spacing-2xl) 0;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

section h2 {
    color: var(--primary-color);
    margin-bottom: var(--spacing-md);
    padding-bottom: var(--spacing-xs);
    border-bottom: 3px solid var(--accent-color);
    display: inline-block;
}

/* ========================================
   Responsive Design
   ======================================== */
@media (max-width: 1024px) {
    :root {
        --spacing-lg: 1.5rem;
        --spacing-xl: 2rem;
        --spacing-2xl: 3rem;
    }
}

@media (max-width: 768px) {
    .logo-bar {
        justify-content: center;
        padding: 1.2rem 1rem;
    }

    .logo-container {
        flex-direction: column;
        gap: 1rem;
    }

    .logo-bar img {
        height: 40px;
    }

    section {
        padding: var(--spacing-xl) 0;
    }
}

/* ========================================
   Accessibility
   ======================================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* Focus styles */
:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
    border-radius: 4px;
}

/* Skip to content link */
.skip-to-content {
    position: absolute;
    top: -100px;
    left: 0;
    background: var(--primary-color);
    color: white;
    padding: 0.5rem 1rem;
    text-decoration: none;
    z-index: 10000;
}

.skip-to-content:focus {
    top: 0;
}
