/* Jekyll-inspired theme with black, gray, and light blue */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-black: #0a0a0a;
    --secondary-black: #1a1a1a;
    --primary-gray: #2d2d2d;
    --secondary-gray: #4a4a4a;
    --light-gray: #6a6a6a;
    --text-gray: #b0b0b0;
    --light-blue: #7fb3d3;
    --accent-blue: #5dade2;
    --dark-blue: #3498db;
    --white: #ffffff;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, var(--primary-black) 0%, var(--secondary-black) 100%);
    color: var(--white);
    line-height: 1.6;
    min-height: 100vh;
}

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

/* Header */
header {
    background: var(--primary-gray);
    border-bottom: 3px solid var(--light-blue);
    padding: 2rem 0;
    margin-bottom: 3rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

h1 {
    font-size: 3rem;
    font-weight: 300;
    color: var(--light-blue);
    text-align: center;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.subtitle {
    text-align: center;
    font-size: 1.2rem;
    color: var(--text-gray);
    font-weight: 300;
}

/* Navigation */
nav {
    background: var(--secondary-black);
    padding: 1rem 0;
    margin-bottom: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 2rem;
}

nav a {
    color: var(--text-gray);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-size: 1rem;
    font-weight: 500;
}

nav a:hover {
    color: var(--light-blue);
    background: var(--primary-gray);
    transform: translateY(-2px);
}

/* Main sections */
.section {
    background: var(--primary-gray);
    margin: 2rem 0;
    padding: 2rem;
    border-radius: 12px;
    border-left: 4px solid var(--light-blue);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease forwards;
}

.section:nth-child(even) {
    animation-delay: 0.2s;
}

.section:nth-child(odd) {
    animation-delay: 0.1s;
}

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

h2 {
    color: var(--light-blue);
    font-size: 2rem;
    margin-bottom: 1rem;
    font-weight: 400;
    border-bottom: 2px solid var(--secondary-gray);
    padding-bottom: 0.5rem;
}

h3 {
    color: var(--accent-blue);
    font-size: 1.4rem;
    margin: 1.5rem 0 1rem 0;
    font-weight: 500;
}

p {
    color: var(--text-gray);
    margin-bottom: 1rem;
    font-size: 1rem;
    line-height: 1.7;
}

/* Image gallery */
.image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.image-container {
    background: var(--secondary-black);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.image-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(127, 179, 211, 0.2);
}

.image-container img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.image-container:hover img {
    transform: scale(1.02);
}

.image-caption {
    padding: 1rem;
    background: var(--secondary-gray);
    color: var(--text-gray);
    font-size: 0.9rem;
    text-align: center;
}

/* Code blocks */
.code-block {
    background: var(--secondary-black);
    border: 1px solid var(--secondary-gray);
    border-radius: 6px;
    padding: 1.5rem;
    margin: 1rem 0;
    overflow-x: auto;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.4;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.code-block code {
    color: var(--light-blue);
    background: none;
}

/* Equations */
.equation-container {
    background: var(--secondary-black);
    border-left: 4px solid var(--accent-blue);
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 0 6px 6px 0;
}

.equation-title {
    color: var(--accent-blue);
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.equation {
    font-family: 'Courier New', monospace;
    color: var(--light-blue);
    background: var(--primary-black);
    padding: 0.8rem;
    border-radius: 4px;
    border: 1px solid var(--light-gray);
    word-wrap: break-word;
}

/* Statistics cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.stat-card {
    background: linear-gradient(135deg, var(--secondary-gray) 0%, var(--primary-gray) 100%);
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--light-gray);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(127, 179, 211, 0.15);
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--light-blue);
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-gray);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Interactive elements */
.interactive-demo {
    background: var(--secondary-black);
    padding: 2rem;
    border-radius: 8px;
    margin: 2rem 0;
    border: 2px solid var(--light-blue);
}

.slider-container {
    margin: 1rem 0;
}

.slider-label {
    color: var(--light-blue);
    font-weight: 500;
    margin-bottom: 0.5rem;
    display: block;
}

input[type="range"] {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: var(--secondary-gray);
    outline: none;
    -webkit-appearance: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--light-blue);
    cursor: pointer;
    border: 2px solid var(--white);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--light-blue);
    cursor: pointer;
    border: 2px solid var(--white);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Footer */
footer {
    background: var(--primary-gray);
    color: var(--text-gray);
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
    border-top: 3px solid var(--light-blue);
}

.footer-links {
    margin-top: 1rem;
}

.footer-links a {
    color: var(--light-blue);
    text-decoration: none;
    margin: 0 1rem;
    transition: color 0.3s ease;
}

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

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    h1 {
        font-size: 2.2rem;
    }
    
    .section {
        padding: 1.5rem;
        margin: 1rem 0;
    }
    
    nav ul {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .image-gallery {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .section {
        animation: none;
        opacity: 1;
        transform: none;
    }
    
    .image-container:hover {
        transform: none;
    }
    
    .image-container:hover img {
        transform: none;
    }
}

/* Print styles */
@media print {
    body {
        background: white;
        color: black;
    }
    
    .section {
        background: white;
        border: 1px solid #ccc;
        break-inside: avoid;
    }
    
    nav {
        display: none;
    }
}