@font-face {
    font-family: 'Comic Custom';
    src: url('comic.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

:root {
    --color-bg: #ffffff;
    --color-text: #1e293b;
    --color-text-light: #475569;
    --color-primary: #0f172a;
    --color-secondary: #f8fafc;
    --color-accent: #2563eb;
    --color-accent-hover: #1d4ed8;
    --color-footer-bg: #0f172a;
    --color-footer-text: #cbd5e1;
    --img-opacity: 1;
    --font-primary: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --max-width: 1200px;
}

@media (prefers-color-scheme: dark) {
    :root {
        --color-bg: #0f172a;
        --color-text: #f8fafc;
        --color-text-light: #94a3b8;
        --color-primary: #cbd5e1;
        --color-secondary: #1e293b;
        --color-accent: #60a5fa;
        --color-accent-hover: #93c5fd;
        --color-footer-bg: #020617;
        --color-footer-text: #94a3b8;
        --img-opacity: 0.85; /* Dim images slightly to reduce eye strain */
    }
}

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

html {
    height: 100%;
}

body {
    font-family: var(--font-primary);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    font-size: 1rem;
    transition: background-color 0.3s ease, color 0.3s ease;
    min-height: 100%;
}

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

a {
    color: var(--color-accent);
    text-decoration: none;
    transition: color 0.2s ease-in-out;
}

a:hover {
    color: var(--color-accent-hover);
    text-decoration: underline;
}

.container {
    width: 90%;
    max-width: var(--max-width);
    margin: 0 auto;
}

/* Base image styling for dark mode dimming */
img {
    opacity: var(--img-opacity);
    transition: opacity 0.3s ease;
}

/* ===== Header & Navigation ===== */
.top-bar {
    font-family: 'Comic Custom', cursive, sans-serif;
    background-color: var(--color-secondary);
    color: var(--color-text);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

@media (prefers-color-scheme: light) {
    .top-bar {
        background-color: var(--color-primary);
    }
    .nav-links a { color: #ffffff; }
    .nav-links a:hover { color: #93c5fd; }
}

@media (prefers-color-scheme: dark) {
    .nav-links a { color: #f8fafc; }
    .nav-links a:hover { color: var(--color-accent); }
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 70px;
}

.header-content img {
    height: 2.5rem;
    vertical-align: center;
}

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

.nav-links a {
    font-weight: 500;
    padding: 0.5rem 0;
}

/* ===== Continuous Scrolling Image Slider ===== */
.hero-slider {
    font-family: 'Comic Custom', cursive, sans-serif;
    position: relative;
    width: 100vw;
    height: 100vh;
    background-color: #000;
    overflow: hidden;
}

.slider-track {
    display: flex;
    width: max-content;
    height: 100vh;
    animation: scroll-sideways 25s linear infinite;
}

.slide {
    height: 100%;
    width: 100vw;
    object-fit: cover;
    flex-shrink: 0;
    opacity: 1; /* no dimming here in dark mode */
}

@keyframes scroll-sideways {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* WCAG: Respect user preferences for reduced motion */
@media (prefers-reduced-motion: reduce) {
    .slider-track {
        animation: none;
        width: 100vw;
    }
}

.hero-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: #ffffff;
    padding: 2rem;
    border-radius: 8px;
}

.hero-overlay img {
    opacity: 1;
    max-width: 90vw;
}

/* ===== Content Sections & Image Alignment ===== */
.content-section {
    padding: 5rem 0;
}

.content-section h2 {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    text-align: center;
    color: var(--color-primary);
}

.content-block {
    margin-bottom: 4rem;
    display: flow-root;
}

.content-block h3 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
    color: var(--color-primary);
}

.content-block p {
    margin-bottom: 1.25rem;
}


.content-block dt {
    height: 1rem;
    float: left;
    width: 5rem;
    text-align: right;
}

.content-block dt img {
    height: 1rem;
}

.content-block dd {
    margin: 0 0 1rem 5.5rem;
}

.align-left {
    float: left;
    margin: 0.5rem 2rem 1rem 0;
    border-radius: 4px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    max-width: 50%;
    height: auto;
}

.align-right {
    float: right;
    margin: 0.5rem 0 1rem 2rem;
    border-radius: 4px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    max-width: 50%;
    height: auto;
}

/* ===== Footer ===== */
.site-footer {
    background-color: var(--color-footer-bg);
    color: var(--color-footer-text);
    text-align: center;
    padding: 2rem 0;
    margin-top: 2rem;
}

.site-footer a {
    color: var(--color-accent);
}

/* ===== Responsive Design (Media Queries) =====*/
@media (max-width: 768px) {
    .nav-links {
        gap: 1rem;
    }

    .hero-slider {
        height: 400px;
    }

    .hero-overlay {
        width: 90%;
    }

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

    .align-left,
    .align-right {
        float: none;
        display: block;
        margin: 0 auto 1.5rem auto;
        max-width: 100%;
    }
}
