:root {
    --primary: #1a1a1a;
    --secondary: #34495e;
    --accent: #1abc9c;
    --accent-dark: #16a085;
    --bg-light: #f9f9f9;
    --text-main: #2c3e50;
    --text-light: #7f8c8d;
    --white: #ffffff;
    --text-on-dark: #ffffff;
    --header-bg: rgba(255, 255, 255, 0.92);
    --border-subtle: rgba(0, 0, 0, 0.06);
    --shadow-subtle: rgba(0, 0, 0, 0.05);
    --border-light: #eee;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.5;
    color: var(--text-main);
    background-color: var(--white);
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Site header (scoped so nested <header> elements like .letter-header
   inside articles don't inherit nav styling) */
body > header {
    padding: 1rem 0;
    background: var(--header-bg);
    border-bottom: 1px solid var(--border-subtle);
}

body > header .container {
    position: relative;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-weight: 700;
    font-size: 1.3rem;
    color: var(--primary);
    text-decoration: none;
    letter-spacing: -0.5px;
    text-transform: uppercase;
}

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

.nav-links {
    display: flex;
    align-items: center;
    gap: 0;
}

.nav-links a {
    margin-left: 1.5rem;
    text-decoration: none;
    color: var(--secondary);
    font-weight: 500;
    font-size: 0.85rem;
    transition: color 0.3s;
}

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

.nav-links a[aria-current="page"] {
    color: var(--accent);
}

/* Mobile nav toggle */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    color: var(--primary);
}

.nav-toggle svg {
    width: 24px;
    height: 24px;
    display: block;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.8rem 1.8rem;
    border-radius: 4px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
    cursor: pointer;
    font-size: 0.9rem;
}

.btn-primary {
    background: var(--accent);
    color: var(--text-on-dark);
}

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

.btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.7);
    color: var(--text-on-dark);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.18);
    transform: translateY(-1px);
}

/* Focus styles */
:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: 2px;
}

.btn:focus-visible,
.tab-btn:focus-visible,
.form-group input:focus-visible,
.form-group button:focus-visible {
    outline-offset: 3px;
}

/* Shared section layout */
.section {
    padding: 4rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.section-header h2 {
    font-size: 1.8rem;
    color: var(--primary);
    margin-bottom: 0.75rem;
}

.section-header .underline {
    width: 40px;
    height: 3px;
    background: var(--accent);
    margin: 0 auto;
}

.section + .section {
    border-top: 1px solid var(--border-subtle);
}

.section-alt {
    background-color: var(--bg-light);
}

/* Cards */
.card {
    padding: 2rem;
    background: var(--bg-light);
    border-radius: 8px;
    transition: transform 0.3s;
}

.card h3 {
    margin-bottom: 0.75rem;
    color: var(--primary);
    font-size: 1.2rem;
}

.card p {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Newsletter / email signup */
.newsletter {
    background: linear-gradient(135deg, #1a1a1a 0%, #2c3e50 100%);
    color: var(--text-on-dark);
    padding: 4rem 0;
    text-align: center;
}

.newsletter h2 {
    font-size: 1.6rem;
    margin-bottom: 0.5rem;
}

.newsletter p {
    font-size: 0.95rem;
    color: #bdc3c7;
}

.form-group {
    margin-top: 1.5rem;
    display: flex;
    justify-content: center;
    max-width: 450px;
    margin-left: auto;
    margin-right: auto;
}

.form-group input {
    padding: 0.8rem 1rem;
    border: none;
    border-radius: 4px 0 0 4px;
    flex: 1;
    font-family: inherit;
    font-size: 0.9rem;
    background: #ffffff;
    color: #2c3e50;
}

.form-group button {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 0 4px 4px 0;
    background: var(--accent);
    color: var(--white);
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
    font-size: 0.9rem;
}

.form-group button:hover {
    background: var(--accent-dark);
}

/* Footer */
footer {
    padding: 2.5rem 0;
    text-align: center;
    color: var(--text-light);
    font-size: 0.8rem;
    border-top: 1px solid var(--border-light);
}

footer a {
    color: var(--accent);
    text-decoration: none;
}

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

.footer-project {
    margin-top: 0.5rem;
    opacity: 0.8;
}

.footer-url {
    margin-top: 0.25rem;
}

/* Mobile */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        z-index: 100;
        background: var(--header-bg);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        flex-direction: column;
        padding: 1rem 0;
        border-bottom: 1px solid var(--border-subtle);
        box-shadow: 0 4px 12px var(--shadow-subtle);
    }

    .nav-links.open {
        display: flex;
    }

    .nav-links a {
        margin: 0;
        padding: 0.75rem 1.5rem;
        width: 100%;
        text-align: center;
    }

    .nav-links a:hover {
        background: var(--bg-light);
    }

    .nav-toggle {
        display: block;
    }
}
