/* Design System Variables */
:root {
    /* Colors */
    --primary-color: #2d3748;
    --secondary-color: #4a5568;
    --accent-color: #6366f1;
    --background-color: #ffffff;
    --text-color: #1a202c;
    --light-gray: #f7fafc;
    --dark-gray: #2d3748;
    
    /* Typography */
    --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-serif: 'Merriweather', Georgia, serif;
    --font-mono: 'JetBrains Mono', monospace;
    
    /* Spacing */
    --space-unit: 0.25rem;
    --space-xs: calc(var(--space-unit) * 2);
    --space-sm: calc(var(--space-unit) * 4);
    --space-md: calc(var(--space-unit) * 6);
    --space-lg: calc(var(--space-unit) * 8);
    --space-xl: calc(var(--space-unit) * 12);
    
    /* Container */
    --max-width: 1200px;
    --content-width: 65ch;
}

/* Reset and Base Styles */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    font-family: var(--font-sans);
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    letter-spacing: -0.02em;
}

h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    letter-spacing: -0.01em;
}

h3 {
    font-size: clamp(1.5rem, 3vw, 2rem);
}

p {
    margin-bottom: var(--space-md);
    max-width: var(--content-width);
}

/* Header and Navigation */
.site-header {
    position: sticky;
    top: 0;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: transform 0.3s ease;
}

.site-header.scroll-down {
    transform: translateY(-100%);
}

.site-header.scroll-up {
    transform: translateY(0);
}

.main-nav {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: var(--space-sm) var(--space-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

.logo:hover {
    color: var(--accent-color);
}

.nav-links {
    display: flex;
    gap: var(--space-md);
    list-style: none;
}

.nav-links a {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: var(--accent-color);
    transform: scaleX(0);
    transition: transform 0.2s ease;
}

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

.nav-links a:hover::after {
    transform: scaleX(1);
}

/* Hero Section */
.hero {
    min-height: 90vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: var(--space-xl) var(--space-md);
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('/assets/images/hero-pattern.svg') center/cover;
    opacity: 0.1;
    z-index: 1;
}

.hero > * {
    position: relative;
    z-index: 2;
}

.hero h1 {
    color: white;
    max-width: 800px;
    margin-bottom: var(--space-lg);
    animation: fadeInUp 1s ease-out;
}

.subtitle {
    font-size: clamp(1.25rem, 2vw, 1.5rem);
    max-width: 600px;
    margin-bottom: var(--space-xl);
    opacity: 0.9;
    animation: fadeInUp 1s ease-out 0.2s backwards;
}

/* Theme Grid */
.theme-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-lg);
    padding: var(--space-xl) var(--space-md);
    max-width: var(--max-width);
    margin: 0 auto;
}

.theme-card {
    background: var(--light-gray);
    padding: var(--space-lg);
    border-radius: 12px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.theme-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}

.theme-icon {
    font-size: 2.5rem;
    margin-bottom: var(--space-md);
}

/* Buttons */
.cta-button {
    display: inline-flex;
    align-items: center;
    padding: var(--space-sm) var(--space-lg);
    background-color: var(--accent-color);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.15);
}

.cta-button:active {
    transform: translateY(0);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

/* Mobile Navigation */
.mobile-nav-toggle {
    display: none;
    background: none;
    border: none;
    padding: var(--space-xs);
    cursor: pointer;
}

@media (max-width: 768px) {
    .mobile-nav-toggle {
        display: block;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--background-color);
        padding: var(--space-md);
        flex-direction: column;
        align-items: center;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    }

    .nav-links.active {
        display: flex;
    }

    .hero {
        min-height: 70vh;
        padding: var(--space-lg) var(--space-md);
    }

    .theme-grid {
        grid-template-columns: 1fr;
        gap: var(--space-md);
        padding: var(--space-lg) var(--space-md);
    }
}

/* Print Styles */
@media print {
    .site-header,
    .cta-button,
    .mobile-nav-toggle {
        display: none;
    }

    body {
        color: black;
        background: white;
    }

    .hero {
        min-height: auto;
        color: black;
        background: none;
    }

    .hero::before {
        display: none;
    }
}
