:root {
    --primary: #1a1a1a;
    --primary-light: #333333;
    --accent: #b30000;
    --accent-dark: #8b0000;
    --text-light: #666666;
    --bg-light: #f8f8f8;
    --bg-white: #ffffff;
    --shadow: 0 10px 30px rgba(0,0,0,0.1);
    --shadow-heavy: 0 20px 50px rgba(0,0,0,0.15);
    --serif: 'Georgia', 'Times New Roman', serif;
    --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --mono: 'Courier New', monospace;
}

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

body {
    font-family: var(--sans);
    color: var(--primary);
    line-height: 1.6;
    background-color: var(--bg-white);
    overflow-x: hidden;
}

.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary);
    color: white;
    padding: 8px;
    text-decoration: none;
    z-index: 100;
}

.skip-link:focus {
    top: 0;
}

/* Header */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

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

.nav-links a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.3s ease;
}

.nav-links a:hover::after,
.nav-links a:focus::after {
    width: 100%;
}

.cta-button {
    background: var(--accent);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
}

.cta-button:hover {
    background: var(--accent-dark);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(179,0,0,0.3);
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--primary);
    transition: all 0.3s ease;
}

/* Hero Section */
.hero {
    min-height: calc(100vh - 80px);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: var(--bg-light);
    overflow: hidden;
    margin-top: 80px;
}

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    text-align: center;
    position: relative;
    z-index: 2;
}

.hero-quote {
    font-family: var(--serif);
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 300;
    line-height: 1.3;
    margin-bottom: 2rem;
    opacity: 0;
    animation: fadeInUp 1s ease forwards;
}

.hero-author {
    font-size: 1.2rem;
    color: var(--text-light);
    margin-bottom: 3rem;
    opacity: 0;
    animation: fadeInUp 1s ease 0.2s forwards;
}

.hero-title {
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -2px;
    opacity: 0;
    animation: fadeInUp 1s ease 0.4s forwards;
}

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

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--text-light);
    margin-bottom: 3rem;
    opacity: 0;
    animation: fadeInUp 1s ease 0.6s forwards;
}

.typography-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.03;
    font-family: var(--mono);
    font-size: 1rem;
    line-height: 1.5;
    color: var(--primary);
    overflow: hidden;
    white-space: pre-wrap;
    pointer-events: none;
    animation: scrollText 60s linear infinite;
}

@keyframes scrollText {
    0% { transform: translateY(0); }
    100% { transform: translateY(-50%); }
}

/* TOC */
.toc {
    background: var(--bg-light);
    border-radius: 15px;
    padding: 2rem;
    margin-bottom: 3rem;
}

.toc h2 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--primary);
}

.toc ol {
    list-style: none;
    counter-reset: toc-counter;
    padding: 0;
}

.toc li {
    counter-increment: toc-counter;
    margin-bottom: 0.5rem;
}

.toc li::before {
    content: counter(toc-counter) ". ";
    font-weight: 700;
    color: var(--accent);
}

.toc a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s;
}

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

/* Main Content */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

/* Journey Section */
.journey-section {
    margin-bottom: 6rem;
}

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

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--accent);
}

.section-subtitle {
    font-size: 1.2rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
}

/* Image sections */
.content-image {
    width: 100%;
    border-radius: 15px;
    margin: 2rem 0;
    box-shadow: var(--shadow);
}

.image-credit {
    font-size: 0.8rem;
    color: var(--text-light);
    text-align: center;
    margin-top: -1rem;
    margin-bottom: 2rem;
}

/* Timeline */
.timeline {
    position: relative;
    padding: 2rem 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--bg-light);
    transform: translateX(-50%);
}

.timeline-item {
    position: relative;
    margin-bottom: 4rem;
    opacity: 0;
    animation: fadeInUp 0.8s ease forwards;
}

.timeline-item:nth-child(even) .timeline-content {
    margin-left: auto;
}

.timeline-content {
    width: calc(50% - 3rem);
    background: var(--bg-white);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    position: relative;
}

.timeline-content:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-heavy);
}

.timeline-marker {
    position: absolute;
    top: 2rem;
    width: 20px;
    height: 20px;
    background: var(--accent);
    border: 4px solid var(--bg-white);
    border-radius: 50%;
    box-shadow: 0 0 0 4px var(--bg-light);
}

.timeline-item:nth-child(odd) .timeline-marker {
    right: -3.5rem;
}

.timeline-item:nth-child(even) .timeline-marker {
    left: -3.5rem;
}

.timeline-date {
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.timeline-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.timeline-text {
    color: var(--text-light);
    line-height: 1.8;
}

/* Story Cards */
.story-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 4rem;
}

.story-card {
    background: var(--bg-white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    position: relative;
}

.story-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-heavy);
}

.story-card-header {
    background: var(--bg-light);
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

.story-card-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.story-card-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

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

.story-card-body {
    padding: 2rem;
}

.story-card-text {
    line-height: 1.8;
    color: var(--text-light);
}

/* Quote Box */
.quote-box {
    background: var(--bg-light);
    border-left: 4px solid var(--accent);
    padding: 2rem;
    margin: 3rem 0;
    border-radius: 0 10px 10px 0;
    position: relative;
}

.quote-text {
    font-family: var(--serif);
    font-size: 1.3rem;
    font-style: italic;
    line-height: 1.8;
    margin-bottom: 1rem;
}

.quote-author {
    text-align: right;
    color: var(--text-light);
    font-weight: 600;
}

/* Author Note */
.author-note {
    background: linear-gradient(135deg, #f8f8f8 0%, #f0f0f0 100%);
    border-radius: 15px;
    padding: 2.5rem;
    margin: 3rem 0;
    position: relative;
    overflow: hidden;
}

.author-note-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--accent);
}

.author-note-text {
    line-height: 1.8;
    color: var(--text-light);
}

/* Leaflet Map */
.map-section {
    background: var(--bg-light);
    border-radius: 20px;
    padding: 3rem;
    margin: 4rem 0;
}

#brecht-map {
    height: 450px;
    border-radius: 15px;
    box-shadow: var(--shadow);
    z-index: 1;
}

/* Route List */
.route-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.route-item {
    background: var(--bg-white);
    padding: 1.5rem;
    border-radius: 10px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.route-item:hover {
    border-color: var(--accent);
    transform: translateX(5px);
}

.route-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 30px;
    height: 30px;
    background: var(--accent);
    color: white;
    border-radius: 50%;
    font-weight: 700;
    flex-shrink: 0;
}

.route-name {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

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

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    padding: 4rem 2rem;
    border-radius: 20px;
    text-align: center;
    margin: 4rem 0;
    position: relative;
    overflow: hidden;
}

.cta-content {
    position: relative;
    z-index: 2;
}

.cta-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.cta-text {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.cta-button-white {
    background: white;
    color: var(--primary);
    padding: 1rem 2rem;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 700;
    display: inline-block;
    transition: all 0.3s ease;
    margin: 0.5rem;
}

.cta-button-white:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

/* Footer */
footer {
    background: var(--primary);
    color: white;
    padding: 3rem 2rem 2rem;
    margin-top: 6rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.6);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .timeline::before {
        left: 30px;
    }

    .timeline-item {
        margin-left: 60px;
    }

    .timeline-content {
        width: calc(100% - 60px);
    }

    .timeline-marker {
        left: -30px !important;
    }

    .timeline-item:nth-child(even) .timeline-content {
        margin-left: 0;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 2rem;
        box-shadow: var(--shadow);
    }

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

    .menu-toggle {
        display: flex;
    }

    .hero-title {
        letter-spacing: -1px;
    }

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

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    #brecht-map {
        height: 350px;
    }
}

@media (max-width: 480px) {
    nav {
        padding: 1rem;
    }

    .hero-content {
        padding: 1rem;
    }

    .timeline-content {
        padding: 1.5rem;
    }

    .cta-section {
        padding: 3rem 1.5rem;
    }

    #brecht-map {
        height: 280px;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

@media (prefers-contrast: high) {
    :root {
        --primary: #000000;
        --accent: #ff0000;
        --text-light: #444444;
        --bg-light: #f0f0f0;
    }
}

*:focus {
    outline: 3px solid var(--accent);
    outline-offset: 2px;
}

@media print {
    header, .cta-section, footer, .map-section {
        display: none;
    }

    .story-card, .timeline-content {
        break-inside: avoid;
    }
}
