/* ===== CSS Variables ===== */
:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-code: #1e1e1e;
    --text-primary: #212529;
    --text-secondary: #6c757d;
    --text-muted: #adb5bd;
    --border-color: #dee2e6;
    --accent: #0d6efd;
    --accent-dark: #0a58ca;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.08);
    --transition: all 0.15s ease;
    --radius: 4px;
    --font-mono: 'IBM Plex Mono', 'Consolas', monospace;
    --font-sans: 'IBM Plex Sans', -apple-system, sans-serif;
}

/* ===== Reset ===== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.65;
    font-size: 16px;
    font-weight: 400;
}

a {
    color: inherit;
    text-decoration: none;
}

/* ===== Navigation ===== */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 8%;
    max-width: 1000px;
    margin: 0 auto;
    border-bottom: 1px solid var(--border-color);
}

.logo {
    font-family: var(--font-mono);
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: -0.5px;
}

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

.nav-links a {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition);
}

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

/* ===== Main Content ===== */
main {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 8%;
}

/* ===== Hero Section ===== */
.hero {
    text-align: center;
    padding: 4rem 0 3rem;
    border-bottom: 1px solid var(--border-color);
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1.25rem;
}

.hero h1 {
    font-family: var(--font-mono);
    font-size: clamp(2.5rem, 6vw, 3.5rem);
    font-weight: 600;
    letter-spacing: -1px;
    margin-bottom: 0.5rem;
}

.subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    font-weight: 300;
}

/* ===== Intro Section ===== */
.intro {
    padding: 2.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.intro p {
    font-size: 1.0625rem;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}

.intro strong {
    color: var(--text-primary);
    font-weight: 500;
}

/* ===== Features Section ===== */
.features {
    padding: 3rem 0;
    border-bottom: 1px solid var(--border-color);
}

.features h2,
.about h2,
.requirements h2,
.history h2,
.cta h2 {
    font-family: var(--font-mono);
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

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

.feature {
    padding: 1.25rem;
    background: var(--bg-secondary);
    border-radius: var(--radius);
}

.feature h3 {
    font-family: var(--font-mono);
    font-size: 0.9375rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.feature p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* ===== About Section ===== */
.about {
    padding: 3rem 0;
    border-bottom: 1px solid var(--border-color);
}

.about p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    max-width: 700px;
}

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

.about em {
    font-style: italic;
}

/* ===== Requirements Section ===== */
.requirements {
    padding: 2.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.req-box {
    background: var(--bg-code);
    color: #e9ecef;
    padding: 1.25rem 1.5rem;
    border-radius: var(--radius);
    font-family: var(--font-mono);
    font-size: 0.875rem;
}

.req-box p {
    margin-bottom: 0.5rem;
}

.req-box p:last-child {
    margin-bottom: 0;
}

.req-box strong {
    color: #69db7c;
}

/* ===== History Section ===== */
.history {
    padding: 3rem 0;
    border-bottom: 1px solid var(--border-color);
}

.version-table {
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    overflow: hidden;
}

.version-row {
    display: grid;
    grid-template-columns: 60px 120px 1fr;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    border-bottom: 1px solid var(--border-color);
}

.version-row:last-child {
    border-bottom: none;
}

.version-row:nth-child(odd) {
    background: var(--bg-secondary);
}

.ver {
    font-family: var(--font-mono);
    font-weight: 600;
}

.date {
    color: var(--text-secondary);
    font-size: 0.8125rem;
}

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

/* ===== CTA Section ===== */
.cta {
    padding: 3rem 0;
    text-align: center;
}

.cta p {
    color: var(--text-secondary);
    margin-bottom: 1.25rem;
}

.cta-link {
    display: inline-block;
    padding: 0.625rem 1.5rem;
    background: var(--text-primary);
    color: white;
    border-radius: var(--radius);
    font-family: var(--font-mono);
    font-weight: 500;
    font-size: 0.875rem;
    transition: var(--transition);
}

.cta-link:hover {
    background: var(--accent-dark);
}

/* ===== Page Header (Links page) ===== */
.page-header {
    padding: 2.5rem 0 2rem;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

.back-link {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    transition: var(--transition);
}

.back-link:hover {
    color: var(--text-primary);
}

.page-header h1 {
    font-family: var(--font-mono);
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 0.375rem;
}

.page-subtitle {
    color: var(--text-secondary);
    font-size: 0.9375rem;
}

/* ===== Links Section ===== */
.links-section {
    padding: 2.5rem 0;
}

.links-intro {
    max-width: 600px;
    margin: 0 auto 2rem;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9375rem;
}

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

.link-card {
    display: block;
    padding: 1.25rem;
    background: var(--bg-secondary);
    border: 1px solid transparent;
    border-radius: var(--radius);
    transition: var(--transition);
}

.link-card:hover {
    border-color: var(--border-color);
    box-shadow: var(--shadow-md);
}

.link-card h3 {
    font-family: var(--font-mono);
    font-size: 0.9375rem;
    font-weight: 600;
    margin-bottom: 0.375rem;
}

.link-card p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.625rem;
    line-height: 1.5;
}

.external {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--accent);
}

/* ===== Note Section ===== */
.note {
    padding: 1.5rem 0 3rem;
    text-align: center;
}

.note p {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

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

footer p {
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.copyright {
    color: var(--text-muted);
    font-size: 0.75rem;
    margin-top: 0.25rem;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    nav {
        padding: 1rem 5%;
    }

    main {
        padding: 0 5%;
    }

    .hero {
        padding: 3rem 0 2.5rem;
    }

    .version-row {
        grid-template-columns: 1fr;
        gap: 0.25rem;
    }

    .date {
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    .nav-links {
        gap: 1.25rem;
    }

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

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