:root {
    --primary: #0066cc;
    --primary-dark: #004499;
    --accent: #ff6b35;
    --success: #00a67e;
    --warning: #ffb700;
    --danger: #e63946;
    --text: #2c3e50;
    --text-light: #5a6c7d;
    --bg: #ffffff;
    --bg-alt: #f8f9fa;
    --bg-card: #ffffff;
    --border: #e1e8ed;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.12);
    --radius: 8px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --max-width: 1200px;
    --gap: clamp(1rem, 4vw, 2rem);
    --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'SF Mono', Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
    :root {
        --primary: #4da3ff;
        --primary-dark: #1a73e8;
        --accent: #ff8a65;
        --text: #e4e6eb;
        --text-light: #b0b3b8;
        --bg: #18191a;
        --bg-alt: #242526;
        --bg-card: #242526;
        --border: #3a3b3c;
        --shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
        --shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.4);
    }
}

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

html {
    font-family: var(--font-body);
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    font-size: clamp(1rem, 1.5vw, 1.125rem);
}

/* Typography */
h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    line-height: 1.2;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

h2 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    margin: 2rem 0 1rem;
    color: var(--primary-dark);
    position: relative;
    padding-left: 1rem;
}

h3 {
    font-size: clamp(1.25rem, 2vw, 1.5rem);
    margin: 1.5rem 0 0.75rem;
    color: var(--text);
}

p {
    margin-bottom: 1rem;
    line-height: 1.8;
}

/* Layout */
main {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: var(--gap);
}

header {
    text-align: center;
    padding: clamp(2rem, 8vw, 4rem) 0;
    margin-bottom: 3rem;
    position: relative;
}

header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
}

section {
    margin-bottom: clamp(2rem, 6vw, 4rem);
    animation: fadeIn 0.6s ease-out;
}

article {
    background: var(--bg-card);
    padding: clamp(1.5rem, 4vw, 2rem);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
    transition: var(--transition);
}

article:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

/* Navigation */
nav {
    background: var(--bg-alt);
    padding: 1rem;
    margin-bottom: 2rem;
    border-radius: var(--radius);
    backdrop-filter: blur(10px);
}

nav ul {
    list-style: none;
    display: flex;
    gap: 1rem;
    padding-bottom: 0.5rem;
    flex-wrap: wrap;
}

nav a {
    color: var(--text);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: calc(var(--radius) / 2);
    white-space: nowrap;
    transition: var(--transition);
}

nav a:hover,
nav a:focus {
    background: var(--primary);
    color: white;
    transform: scale(1.05);
}

/* Lists */
ul,
ol {
    margin: 1rem 0 1.5rem 2rem;
}

li {
    margin-bottom: 0.5rem;
}

/* Highlights and Quotes */
mark {
    background: linear-gradient(105deg, transparent 0.5rem, rgba(255, 107, 53, 0.2) 0);
    padding: 0.2rem 0.5rem;
    border-radius: 3px;
    color: white;
}

blockquote {
    border-left: 4px solid var(--accent);
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: var(--text-light);
}

strong {
    color: var(--primary-dark);
    font-weight: 600;
}

/* Stats Box */
.stat-box {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.stat-item {
    background: var(--bg-alt);
    padding: 1rem;
    border-radius: var(--radius);
    text-align: center;
    transition: var(--transition);
}

.stat-item:hover {
    transform: scale(1.05);
    background: var(--primary);
    color: white;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--accent);
}

.stat-item:hover .stat-value {
    color: white;
}

/* Warning Box */
.warning {
    background: linear-gradient(135deg, var(--warning), var(--accent));
    color: #18191a;
    padding: 1.5rem;
    border-radius: var(--radius);
    margin: 2rem 0;
    box-shadow: var(--shadow);
}

/* Footer */
footer {
    text-align: center;
    padding: 3rem var(--gap);
    background: var(--bg-alt);
    margin-top: 4rem;
    border-top: 1px solid var(--border);
}

/* Aside */
aside {
    background: var(--bg-alt);
    padding: 1.5rem;
    border-radius: var(--radius);
    margin: 2rem 0;
    border-left: 4px solid var(--primary);
}

/* Time */
time {
    color: var(--text-light);
    font-size: 0.9rem;
}

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

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

/* Responsive */
@media (max-width: 768px) {
    nav ul {
        /* flex-direction: column; */
    }

    .stat-box {
        grid-template-columns: 1fr;
    }
}

/* Accessibility */
:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.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;
}

/* Print styles */
@media print {

    nav,
    aside,
    footer {
        display: none;
    }

    article {
        break-inside: avoid;
    }
}