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

/* CSS Variables - Design System */
:root {
    /* Colors */
    --bg-primary: #FAFAFA;
    --bg-secondary: #F9F9F7;
    --text-primary: #1A1A1A;
    --text-primary-hover: #333333;
    --text-secondary: #666666;
    --text-hover: #444444;
    --accent: #0066CC;
    --border: #E5E5E5;
    
    /* Typography */
    --font-heading: 'Libre Baskerville', Georgia, serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    
    /* Font sizes */
    --text-hero: clamp(3rem, 6vw, 5rem);
    --text-h1: clamp(2.25rem, 4vw, 3.5rem);
    --text-h2: clamp(1.75rem, 3vw, 2.5rem);
    --text-body: 1.125rem;
    --text-body-lg: 1.25rem;
    --text-small: 0.875rem;
    
    /* Line heights */
    --leading-tight: 1.15;
    --leading-normal: 1.6;
    --leading-relaxed: 1.75;
    
    /* Letter spacing */
    --tracking-tight: -0.02em;
    --tracking-normal: 0;
    --tracking-wide: 0.05em;
    
    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 2rem;
    --space-lg: 4rem;
    --space-xl: 8rem;
    --space-2xl: 12rem;
    
    /* Container */
    --max-width: 720px;
    --max-width-wide: 1200px;
    --gutter: clamp(1.5rem, 5vw, 4rem);
}

/* Base Styles */
html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: var(--text-body);
    line-height: var(--leading-relaxed);
    color: var(--text-primary);
    background-color: var(--bg-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Typography */
h1, h2, h3 {
    font-family: var(--font-heading);
    font-weight: 400;
    letter-spacing: var(--tracking-tight);
    line-height: var(--leading-tight);
    color: var(--text-primary);
}

p {
    margin-bottom: 1.5rem;
}

p:last-child {
    margin-bottom: 0;
}

/* Links */
a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--text-hover); /* Color-based hover for better accessibility */
}

/* Container */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

/* Navigation */
nav {
    position: sticky;
    top: 0;
    background: var(--bg-primary);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px); /* Safari support */
    padding: 1.25rem 0;
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    opacity: 0.95;
}

/* Fallback for browsers without backdrop-filter support */
@supports not (backdrop-filter: blur(10px)) {
    nav {
        background: var(--bg-primary);
        opacity: 1;
    }
}

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

.nav-logo {
    font-family: var(--font-heading);
    font-size: 1.125rem;
    font-weight: 700;
    letter-spacing: var(--tracking-tight);
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    font-size: 0.9375rem;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s ease;
}

.nav-links a:hover {
    color: var(--text-hover); /* Color-based hover for better accessibility */
}

/* Hero Section */
.hero {
    padding: var(--space-2xl) 0 var(--space-xl) 0;
    min-height: 60vh;
    display: flex;
    align-items: center;
}

.hero-title {
    font-size: var(--text-hero);
    margin-bottom: var(--space-md);
    font-weight: 400;
}

.hero-subtitle {
    font-size: var(--text-body-lg);
    color: var(--text-secondary);
    line-height: var(--leading-normal);
    max-width: 600px;
}

/* Sections */
.section {
    padding: var(--space-xl) 0;
}

.section-title {
    font-size: var(--text-h2);
    font-weight: 400;
    margin-bottom: 1.5rem;
}

.content {
    color: var(--text-primary);
}

.content p {
    font-size: var(--text-body);
    line-height: var(--leading-relaxed);
}

/* Contact Section */
.section-contact {
    background-color: var(--bg-secondary);
    padding: var(--space-xl) 0;
}

/* Button */
.button {
    display: inline-block;
    padding: 0.875rem 1.75rem;
    margin-top: var(--space-md);
    background: var(--text-primary);
    color: var(--bg-primary);
    font-size: 0.9375rem;
    font-weight: 500;
    border-radius: 4px;
    text-decoration: none;
    transition: background 0.2s ease, transform 0.2s ease;
}

.button:hover {
    background: var(--text-primary-hover);
    transform: translateY(-1px);
}

/* Footer */
footer {
    padding: var(--space-lg) 0;
    border-top: 1px solid var(--border);
    text-align: center;
}

footer p {
    font-size: var(--text-small);
    color: var(--text-secondary);
    margin-bottom: 0;
}

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

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

/* Responsive Design */
@media (max-width: 768px) {
    :root {
        --text-hero: 2.5rem;
        --text-h1: 2rem;
        --text-h2: 1.5rem;
        --text-body: 1rem;
        --text-body-lg: 1.125rem;
        --space-xl: 4rem;
        --space-2xl: 6rem;
    }
    
    .nav-links {
        gap: 1.25rem;
    }
    
    .nav-links a {
        font-size: 0.875rem;
    }
    
    .hero {
        min-height: 50vh;
    }
}

@media (max-width: 480px) {
    :root {
        --gutter: 1.5rem;
    }
    
    .nav-container {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .nav-links {
        gap: 1rem;
    }
}
