:root {
    --ink-primary: #1a1a2e;
    --ink-secondary: #16213e;
    --ink-accent: #0f3460;
    --rust-primary: #e85d04;
    --rust-light: #f48c06;
    --rust-dark: #dc2f02;
    --paper-white: #faf9f6;
    --paper-cream: #f5f5dc;
    --paper-aged: #e8e6e1;
    --charcoal: #2d3436;
    --graphite: #636e72;
    --silver: #b2bec3;
    --space-xs: 0.5rem;
    --space-sm: 0.75rem;
    --space-md: 1.25rem;
    --space-lg: 2rem;
    --space-xl: 3.25rem;
    --space-2xl: 5.25rem;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Source Serif 4', serif;
    font-size: 17px;
    line-height: 1.7;
    color: var(--charcoal);
    background-color: var(--paper-cream);
}

/* Header Styles */
.header {
    background: var(--ink-primary);
    height: 80px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    border-bottom: 3px solid var(--ink-secondary);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--space-lg);
}

.logo {
    display: flex;
    flex-direction: column;
    text-decoration: none;
}

.logo-text {
    font-family: 'JetBrains Mono', monospace;
    font-size: 20px;
    font-weight: 700;
    color: white;
    letter-spacing: -0.02em;
}

.logo-subtitle {
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 12px;
    font-weight: 400;
    color: var(--silver);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.nav {
    display: flex;
    gap: var(--space-lg);
}

.nav-link {
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: var(--silver);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: var(--space-xs) 0;
    border-bottom: 2px solid transparent;
    transition: all 200ms ease;
}

.nav-link:hover,
.nav-link.active {
    color: white;
    border-bottom-color: var(--rust-primary);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
}

/* Main Content */
.main {
    margin-top: 80px;
    min-height: calc(100vh - 80px - 300px);
}

/* Page Header */
.page-header {
    background: var(--paper-cream);
    padding: var(--space-2xl) var(--space-lg);
    text-align: center;
    border-bottom: 3px solid var(--ink-primary);
}

.page-title {
    font-family: 'Playfair Display', serif;
    font-size: 42px;
    font-weight: 700;
    color: var(--ink-primary);
    margin-bottom: var(--space-md);
}

.page-subtitle {
    font-family: 'Source Serif 4', serif;
    font-size: 18px;
    color: var(--graphite);
    font-style: italic;
    max-width: 600px;
    margin: 0 auto;
}

/* Section */
.section {
    padding: var(--space-2xl) var(--space-lg);
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    font-family: 'Playfair Display', serif;
    font-size: 28px;
    font-weight: 600;
    color: var(--ink-primary);
    margin-bottom: var(--space-xl);
    padding-bottom: var(--space-sm);
    border-bottom: 3px solid var(--rust-primary);
    display: inline-block;
}

/* Category Tabs */
.tabs-container {
    background: var(--paper-white);
    padding: var(--space-lg);
    border-bottom: 1px solid var(--paper-aged);
    position: sticky;
    top: 80px;
    z-index: 100;
}

.tabs {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    gap: var(--space-sm);
    flex-wrap: wrap;
    justify-content: center;
}

.tab {
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 12px 24px;
    background: transparent;
    border: 2px solid var(--ink-primary);
    color: var(--ink-primary);
    cursor: pointer;
    transition: all 200ms ease;
}

.tab:hover,
.tab.active {
    background: var(--ink-primary);
    color: white;
}

/* Buttons */
.btn {
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 14px 28px;
    border: 3px solid var(--ink-primary);
    cursor: pointer;
    transition: all 200ms ease;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: var(--ink-primary);
    color: white;
}

.btn-primary:hover {
    background: var(--rust-primary);
    border-color: var(--rust-primary);
}

.btn-secondary {
    background: transparent;
    color: var(--ink-primary);
}

.btn-secondary:hover {
    background: var(--ink-primary);
    color: white;
}

/* Cards */
.card {
    background: var(--paper-white);
    border: 1px solid var(--paper-aged);
    padding: var(--space-lg);
    box-shadow: 2px 3px 0 var(--paper-aged), 4px 6px 12px rgba(0,0,0,0.08);
    transition: all 200ms ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 2px 3px 0 var(--paper-aged), 6px 10px 20px rgba(0,0,0,0.12);
}

/* Footer */
.footer {
    background: var(--ink-primary);
    color: white;
    padding: var(--space-2xl) var(--space-lg) var(--space-lg);
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-xl);
    margin-bottom: var(--space-xl);
}

.footer-section h3 {
    font-family: 'Playfair Display', serif;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: var(--space-md);
    color: white;
}

.footer-section p {
    font-size: 14px;
    color: var(--silver);
    line-height: 1.6;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: var(--space-xs);
}

.footer-links a {
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 14px;
    color: var(--silver);
    text-decoration: none;
    transition: color 200ms ease;
}

.footer-links a:hover {
    color: var(--rust-primary);
}

.footer-bottom {
    border-top: 1px solid var(--ink-accent);
    padding-top: var(--space-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-sm);
}

.footer-copyright {
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 13px;
    color: var(--silver);
}

.footer-legal {
    display: flex;
    gap: var(--space-md);
}

.footer-legal a {
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 13px;
    color: var(--silver);
    text-decoration: none;
}

.footer-legal a:hover {
    color: var(--rust-primary);
}

.beian {
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 12px;
    color: var(--graphite);
    margin-top: var(--space-sm);
}

.beian a {
    color: var(--graphite);
    text-decoration: none;
}

.beian a:hover {
    color: var(--rust-primary);
}

/* Responsive */
@media (max-width: 768px) {
    .nav {
        display: none;
        position: absolute;
        top: 80px;
        left: 0;
        right: 0;
        background: var(--ink-primary);
        flex-direction: column;
        padding: var(--space-md);
        gap: var(--space-sm);
    }

    .nav.active {
        display: flex;
    }

    .mobile-menu-btn {
        display: block;
    }

    .page-title {
        font-size: 32px;
    }

    .section-title {
        font-size: 24px;
    }

    .tabs {
        gap: var(--space-xs);
    }

    .tab {
        padding: 8px 16px;
        font-size: 12px;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
