/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Light theme (default) - minimaldoc.com exact palette */
    --bg-primary: #fafafa;
    --bg-secondary: #ffffff;
    --text-primary: #1a1a1a;
    --text-secondary: #4a4a4a;
    --border: #e0e0e0;
    --code-bg: #f5f5f5;
    --code-text: #1a1a1a;
    --accent: #3b82f6;
    --accent-hover: #2563eb;
    --radius: 4px;
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 3rem;
    --spacing-xl: 6rem;
    --max-width: 1200px;
    --transition: 0.2s ease;
}

/* Dark theme */
[data-theme="dark"] {
    --bg-primary: #1a1a1a;
    --bg-secondary: #252525;
    --text-primary: #f5f5f5;
    --text-secondary: #c0c0c0;
    --border: #404040;
    --code-bg: #2a2a2a;
    --code-text: #f5f5f5;
    --accent: #3b82f6;
    --accent-hover: #60a5fa;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    transition: background-color var(--transition), color var(--transition);
}

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

/* Header */
header {
    padding: 1.25rem 0;
    border-bottom: 1px solid var(--border);
    background-color: var(--bg-secondary);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(8px);
    transition: background-color var(--transition), border-color var(--transition);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    letter-spacing: -0.02em;
}

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

.header-links {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.header-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.header-links a:hover {
    color: var(--text-primary);
}

.header-links a:focus {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: 2px;
}

/* Theme Toggle Button */
.theme-toggle {
    background: none;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    width: 36px;
    height: 36px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    padding: 0;
    color: var(--text-secondary);
}

.theme-toggle:hover {
    border-color: var(--text-secondary);
    color: var(--text-primary);
    transform: scale(1.05);
}

.theme-toggle:focus {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.theme-toggle svg {
    width: 18px;
    height: 18px;
}

.theme-toggle .sun-icon {
    display: none;
}

.theme-toggle .moon-icon {
    display: block;
}

[data-theme="dark"] .theme-toggle .sun-icon {
    display: block;
}

[data-theme="dark"] .theme-toggle .moon-icon {
    display: none;
}

/* Hero Section */
.hero {
    padding: var(--spacing-xl) 0;
    text-align: center;
}

.hero h1 {
    font-size: 2.75rem;
    margin-bottom: 1.25rem;
    line-height: 1.15;
    font-weight: 700;
    letter-spacing: -0.04em;
    color: var(--text-primary);
}

.hero h1 span {
    color: var(--accent);
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 2rem;
    line-height: 1.7;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.btn-primary {
    background-color: var(--accent);
    color: white;
    border-color: var(--accent);
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    border-color: var(--accent-hover);
    transform: translateY(-1px);
}

.btn-secondary {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    border-color: var(--border);
}

.btn-secondary:hover {
    background-color: var(--bg-primary);
    border-color: var(--text-secondary);
    transform: translateY(-1px);
}

/* Features Section */
.features {
    padding: var(--spacing-xl) 0;
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.section-title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 3rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.feature-card {
    background-color: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    transition: border-color 0.2s ease;
}

.feature-card:hover {
    border-color: var(--text-secondary);
}

.feature-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--accent);
    font-weight: 600;
    letter-spacing: -0.01em;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.7;
}

/* Code Examples */
.examples {
    padding: var(--spacing-xl) 0;
}

.code-block {
    background-color: var(--code-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    overflow-x: auto;
    font-family: "SF Mono", Monaco, "Cascadia Code", "Courier New", monospace;
    font-size: 0.85rem;
    line-height: 1.5;
}

.code-block pre {
    margin: 0;
}

.code-block code {
    color: var(--code-text);
}

.code-comment {
    color: var(--text-secondary);
}

.code-keyword {
    color: var(--accent);
}

.code-string {
    color: #a5f3fc;
}

/* Download Section */
.download {
    padding: var(--spacing-xl) 0;
    text-align: center;
}

.download h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

.download p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 1.0625rem;
}

/* Footer */
footer {
    padding: 3rem 0;
    border-top: 1px solid var(--border);
    text-align: center;
    background-color: var(--bg-secondary);
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: var(--text-primary);
}

.footer-links a:focus {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: 2px;
}

.footer-credit {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.footer-credit a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-credit a:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
    .hero {
        padding: 3rem 0;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .download {
        padding: 3rem 1rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 0.75rem;
    }

    .hero h1 {
        font-size: 1.75rem;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: stretch;
    }

    .btn {
        justify-content: center;
    }

    .header-content {
        justify-content: center;
        text-align: center;
    }

    .header-right {
        gap: 1rem;
    }

    .header-links {
        gap: var(--spacing-xs);
    }

    .header-links a {
        font-size: 0.875rem;
    }

    .theme-toggle {
        width: 32px;
        height: 32px;
    }

    .theme-toggle svg {
        width: 16px;
        height: 16px;
    }

    .footer-links {
        flex-direction: column;
        gap: var(--spacing-sm);
    }
}
