/* ================================================= */
/*          FONTS (self-hosted, latin subset)        */
/* ================================================= */

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url('../assets/fonts/Inter-latin.woff2') format('woff2');
}

@font-face {
    font-family: 'Space Grotesk';
    font-style: normal;
    font-weight: 500 700;
    font-display: swap;
    src: url('../assets/fonts/SpaceGrotesk-latin.woff2') format('woff2');
}

/* ================================================= */
/*          DESIGN TOKENS                            */
/* ================================================= */

/*
 * The original design is dark-first, so dark values are the default.
 * Light values apply when the OS reports "light" (no JS required) or
 * when the visitor forces a theme via the header toggle
 * (html[data-theme="light" | "dark"], set pre-paint by an inline snippet).
 */

:root {
    color-scheme: dark;

    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-heading: 'Space Grotesk', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

    --bg: #000000;
    --surface: #111111;
    --border: #222222;
    --border-soft: #eeeeee;
    --frame: #333333;
    --frame-strong: #444444;

    --text: #e0e0e0;
    --text-soft: #bdc3c7;
    --muted: #888888;
    --nav-link: #ecf0f1;
    --nav-active: #ffffff;

    --accent: #0779e4;
    --accent-hover: #0560b3;

    --chip-bg: #222222;

    --scrollbar-thumb: #444444;

    --shadow-card: 0 2px 5px rgba(0, 0, 0, 0.5);
    --shadow-card-hover: 0 4px 15px rgba(0, 0, 0, 0.7);
    --shadow-spotlight: 0 4px 12px rgba(0, 0, 0, 0.5);
    --shadow-wall: 0 2px 5px rgba(0, 0, 0, 0.3);
    --shadow-media: 0 4px 8px rgba(0, 0, 0, 0.3);
    --shadow-pane: 0 10px 30px rgba(0, 0, 0, 0.5);

    --radius: 8px;
}

@media (prefers-color-scheme: light) {
    :root:not([data-theme]) {
        color-scheme: light;

        --bg: #f4f5f7;
        --surface: #ffffff;
        --border: #e3e6ea;
        --border-soft: #eef0f3;
        --frame: #d9dde3;
        --frame-strong: #c4cad2;

        --text: #23272e;
        --text-soft: #5a6270;
        --muted: #6b7280;
        --nav-link: #3a3f47;
        --nav-active: #101215;

        --chip-bg: #e9edf2;

        --scrollbar-thumb: #c3c9d1;

        --shadow-card: 0 2px 5px rgba(15, 23, 42, 0.1);
        --shadow-card-hover: 0 4px 15px rgba(15, 23, 42, 0.16);
        --shadow-spotlight: 0 4px 12px rgba(15, 23, 42, 0.14);
        --shadow-wall: 0 2px 5px rgba(15, 23, 42, 0.1);
        --shadow-media: 0 4px 8px rgba(15, 23, 42, 0.12);
        --shadow-pane: 0 10px 30px rgba(15, 23, 42, 0.25);
    }
}

html[data-theme="light"] {
    color-scheme: light;

    --bg: #f4f5f7;
    --surface: #ffffff;
    --border: #e3e6ea;
    --border-soft: #eef0f3;
    --frame: #d9dde3;
    --frame-strong: #c4cad2;

    --text: #23272e;
    --text-soft: #5a6270;
    --muted: #6b7280;
    --nav-link: #3a3f47;
    --nav-active: #101215;

    --chip-bg: #e9edf2;

    --scrollbar-thumb: #c3c9d1;

    --shadow-card: 0 2px 5px rgba(15, 23, 42, 0.1);
    --shadow-card-hover: 0 4px 15px rgba(15, 23, 42, 0.16);
    --shadow-spotlight: 0 4px 12px rgba(15, 23, 42, 0.14);
    --shadow-wall: 0 2px 5px rgba(15, 23, 42, 0.1);
    --shadow-media: 0 4px 8px rgba(15, 23, 42, 0.12);
    --shadow-pane: 0 10px 30px rgba(15, 23, 42, 0.25);
}

/* ================================================= */
/*          BASE                                     */
/* ================================================= */

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

body {
    font-family: var(--font-body);
    line-height: 1.6;
    color: var(--text);
    background-color: var(--bg);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    letter-spacing: 0.01em;
}

.container {
    width: 95%;
    margin: auto;
    overflow: hidden;
    padding: 0 20px;
    flex: 1;
}

.section-title {
    text-align: center;
    margin-bottom: 40px;
}

.page-pad {
    padding-top: 40px;
    padding-bottom: 40px;
}

.mt-50 {
    margin-top: 50px;
}

.intro-text {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 40px auto;
}

.center-heading {
    text-align: center;
}

/* ================================================= */
/*          HEADER & NAVIGATION                      */
/* ================================================= */

header.main-header {
    background: var(--surface);
    color: var(--nav-active);
    padding: 1rem 0;
    border-bottom: var(--accent) 4px solid;
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
}

header.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 18px;
}

header.main-header #branding h1 {
    margin: 0;
    font-size: 28px;
}

header.main-header #branding h1 a {
    color: var(--nav-active);
    text-decoration: none;
    text-transform: none;
}

nav.main-nav ul {
    list-style: none;
    display: flex;
    justify-content: flex-end;
    margin: 0;
}

nav.main-nav li {
    margin: 0 12px;
}

nav.main-nav a {
    color: var(--nav-link);
    text-decoration: none;
    text-transform: uppercase;
    font-size: 15px;
    padding: 5px 0;
    position: relative;
}

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

nav.main-nav a:hover::after,
nav.main-nav li.current a::after {
    width: 100%;
}

nav.main-nav a:hover,
nav.main-nav li.current a {
    color: var(--nav-active);
}

/* Theme Toggle — single icon button that cycles Auto / Light / Dark */
.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    background: transparent;
    color: var(--nav-link);
    border: 1px solid var(--border);
    border-radius: 50%;
    cursor: pointer;
    transition: color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.theme-toggle:hover {
    color: var(--nav-active);
    border-color: var(--frame-strong);
    transform: rotate(15deg);
}

.theme-toggle:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.theme-toggle .icon {
    display: none;
    line-height: 0;
}

.theme-toggle[data-mode="auto"] .icon-auto,
.theme-toggle[data-mode="light"] .icon-light,
.theme-toggle[data-mode="dark"] .icon-dark {
    display: inline-flex;
}

/* ================================================= */
/*          FOOTER                                   */
/* ================================================= */

footer.main-footer {
    background: var(--surface);
    color: var(--text-soft);
    text-align: center;
    padding: 30px 0;
}

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

/* ================================================= */
/*          REUSABLE COMPONENTS                      */
/* ================================================= */

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    margin-top: 20px;
}

.card,
.sponsor-column,
.article-bar {
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
}

.card {
    padding: 25px;
    display: flex;
    flex-direction: column;
}

.card h3 {
    color: var(--accent);
    margin-bottom: 15px;
}

.card ul {
    list-style-type: none;
}

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

.card a:hover {
    text-decoration: underline;
}

.card ul.link-list {
    list-style-type: none;
    padding-left: 0;
}

.card ul.link-list li {
    margin-bottom: 8px;
}

.card h4 {
    margin-top: 20px;
    margin-bottom: 10px;
    border-bottom: 1px solid var(--border-soft);
    padding-bottom: 5px;
}

.card-divider {
    margin: 20px 0;
    border: 0;
    border-top: 1px solid var(--border-soft);
}

.responsive-img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 20px auto;
    border-radius: var(--radius);
}

.scroll-list {
    max-height: 900px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--scrollbar-thumb) var(--surface);
}

.scroll-list::-webkit-scrollbar {
    width: 8px;
}

.scroll-list::-webkit-scrollbar-track {
    background: var(--surface);
}

.scroll-list::-webkit-scrollbar-thumb {
    background-color: var(--scrollbar-thumb);
    border-radius: 4px;
}

/* ================================================= */
/*          INDEX                                    */
/* ================================================= */

.hero-section {
    position: relative;
    background-image: url('../images/team-photo-small.avif');
    background-size: cover;
    background-position: center;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    padding: 20px;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.3);
    z-index: 1;
}

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

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 15px;
}

.hero-content p {
    font-size: 1.3rem;
    margin-bottom: 25px;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.button {
    display: inline-block;
    padding: 12px 25px;
    text-decoration: none;
    border-radius: 5px;
    font-size: 1rem;
    transition: background-color 0.3s ease, transform 0.2s ease;
    cursor: pointer;
}

.button-primary {
    background-color: var(--accent);
    color: #fff;
    border: 1px solid var(--accent);
}

.button-primary:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
}

.button-secondary {
    background-color: transparent;
    color: #fff;
    border: 1px solid #fff;
}

.button-secondary:hover {
    background-color: #fff;
    color: #333;
    transform: translateY(-2px);
}

.quick-links-section {
    background-color: var(--bg);
    padding: 60px 0;
}

.link-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.link-pane {
    position: relative;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    height: 500px;
    background-size: cover;
    background-position: center;
    text-decoration: none;
    overflow: hidden;
    border-radius: var(--radius);
    filter: grayscale(100%);
    transition: all 0.4s ease-in-out;
}

.link-pane:hover {
    filter: grayscale(0%);
    transform: scale(1.03);
    box-shadow: var(--shadow-pane);
}

.link-pane h2 {
    color: #fff;
    font-size: 2.5rem;
    font-weight: bold;
    text-align: center;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.8);
    margin: 0;
    padding: 30px;
    width: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0) 100%);
    z-index: 2;
}

/* ================================================= */
/*          ACHIEVEMENTS                             */
/* ================================================= */

.achievements-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
}

.achievements-column h2 {
    text-align: center;
    margin-bottom: 20px;
}

/* ================================================= */
/*          SPONSORS                                 */
/* ================================================= */

.featured-heading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin: 0 0 30px;
}

.featured-heading h3 {
    margin: 0;
    font-size: 1.6rem;
}

.year-badge {
    display: inline-block;
    background-color: var(--accent);
    color: #fff;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.05rem;
    line-height: 1.4;
    padding: 4px 14px;
    border-radius: 999px;
    letter-spacing: 0.04em;
}

.sponsor-group-title {
    color: var(--accent);
    margin: 0 0 15px;
    font-size: 1.15rem;
}

.sponsor-chip-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 12px;
    margin-bottom: 30px;
}

.sponsor-chip {
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 12px;
    text-align: center;
    font-size: 0.95rem;
    transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.sponsor-chip:hover {
    border-color: var(--accent);
    transform: translateY(-3px);
    box-shadow: var(--shadow-card);
}

.sponsor-chip-grid.donors {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
}

.sponsor-chip-grid.donors .sponsor-chip {
    border-style: dashed;
    color: var(--text-soft);
}

.banner-tabs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-bottom: 20px;
}

.banner-tabs button {
    appearance: none;
    background: transparent;
    color: var(--nav-link);
    border: 1px solid var(--border);
    border-radius: 999px;
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 600;
    padding: 7px 18px;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.banner-tabs button:hover {
    color: var(--nav-active);
    border-color: var(--frame-strong);
}

.banner-tabs button.active {
    background-color: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.banner-frame {
    max-width: 1000px;
    margin: 0 auto;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    background: #fff;
}

.banner-frame img {
    display: block;
    width: 100%;
    height: auto;
}

.archive-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
    gap: 20px;
}

.sponsor-column {
    padding: 25px;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.sponsor-column:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-card-hover);
}

.sponsor-column .year-row {
    display: flex;
    justify-content: center;
    margin-bottom: 15px;
}

.sponsor-column ul {
    list-style-type: none;
    padding: 0;
    text-align: center;
}

.sponsor-column li {
    padding: 4px 0;
    font-size: 0.95rem;
    border-bottom: 1px dashed var(--border);
}

.sponsor-column li:last-child {
    border-bottom: 0;
}

.cta-card {
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-top: 4px solid var(--accent);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    text-align: center;
    padding: 45px 30px;
    max-width: 760px;
    margin: 0 auto;
}

.cta-card h3 {
    font-size: 1.8rem;
    margin-bottom: 15px;
}

.cta-card p {
    color: var(--text-soft);
    margin-bottom: 10px;
}

.cta-card .button {
    margin-top: 20px;
}

/* ================================================= */
/*          MEDIA                                    */
/* ================================================= */

.video-placeholder {
    background-color: #000;
    color: #fff;
    aspect-ratio: 16 / 9;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--frame);
}
.video-placeholder img.thumbnail {
    position: absolute;
    top: 0;
    left: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}
.video-placeholder:hover img.thumbnail {
    transform: scale(1.05);
}
.video-placeholder iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}
.spotlight-video-container {
    margin-bottom: 40px;
    max-width: 75%;
    margin-left: auto;
    margin-right: auto;
}
.spotlight-video-container .video-placeholder {
    border: 3px solid var(--frame-strong);
    box-shadow: var(--shadow-spotlight);
}
.video-wall-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 30px;
}
.video-wall-item .video-placeholder {
    border: 1px solid var(--frame);
    box-shadow: var(--shadow-wall);
}

/* ================================================= */
/*          ROBOTS                                   */
/* ================================================= */

.robot-section {
    display: flex;
    gap: 20px;
    width: 100%;
    align-items: flex-start;
    border-bottom: 1px solid var(--border);
    padding-bottom: 20px;
    margin-bottom: 20px;
}

.robot-description {
    flex: 3;
}

.robot-image {
    flex: 2;
    text-align: center;
}

.robot-image img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius);
    box-shadow: var(--shadow-media);
}

.robot-description h2 {
    color: var(--text);
}

.robot-description h3 {
    color: var(--accent);
    margin-top: 15px;
}

.robots-title {
    text-align: center;
}

.slideshow-container {
    position: relative;
    margin: 0 auto;
}

.slideshow {
    text-align: center;
}

.slideshow img {
    width: 50%;
    display: none;
    margin: 0 auto;
}

.slideshow img.is-active {
    display: block;
}

.prev, .next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    padding: 16px;
    margin-top: -22px;
    color: white;
    font-weight: bold;
    font-size: 18px;
    transition: 0.6s ease;
    user-select: none;
}

.prev {
    left: 25%;
    border-radius: 0 3px 3px 0;
}

.next {
    right: 25%;
    border-radius: 3px 0 0 3px;
}

.prev:hover, .next:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

.fade {
    animation-name: fade;
    animation-duration: 1.5s;
}

@keyframes fade {
    from {opacity: .4}
    to {opacity: 1}
}

/* ================================================= */
/*          UPDATES LISTING                          */
/* ================================================= */

.article-bar {
    padding: 20px 30px;
    margin: 20px 0;
    transition: box-shadow 0.3s ease;
    width: 100%;
}

.article-bar:hover {
    box-shadow: var(--shadow-card-hover);
}

.article-bar h3 {
    margin-top: 0;
    margin-bottom: 5px;
}

.article-bar h3 a {
    color: var(--accent);
    text-decoration: none;
    font-size: 1.5rem;
}

.article-bar .post-meta {
    font-size: 0.9rem;
    color: var(--muted);
    margin-bottom: 15px;
}

.article-bar p {
    margin-bottom: 0;
}

/* ================================================= */
/*          BLOG POSTS                               */
/* ================================================= */

.blog-post-full {
    display: flex;
    gap: 40px;
}

.blog-content {
    flex: 3;
    background-color: var(--surface);
    padding: 40px;
    border-radius: var(--radius);
}

.sidebar {
    flex: 1;
}

.widget {
    background-color: var(--surface);
    padding: 20px;
    border-radius: var(--radius);
    margin-bottom: 20px;
}

.widget h3 {
    color: var(--text);
    border-bottom: 2px solid var(--accent);
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.widget ul {
    list-style: none;
    padding: 0;
}

.widget ul li {
    margin-bottom: 10px;
}

.widget ul li a {
    text-decoration: none;
    color: var(--accent);
}

.tags span {
    display: inline-block;
    background-color: var(--chip-bg);
    color: var(--text);
    padding: 5px 10px;
    border-radius: 5px;
    margin-right: 5px;
    margin-bottom: 5px;
    font-size: 0.9rem;
}

.blog-post-full .post-meta {
    display: flex;
    align-items: center;
    color: var(--muted);
    margin-bottom: 20px;
}

.blog-post-full h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.blog-post-full img {
    width: 33%;
    height: auto;
    border-radius: var(--radius);
    margin: 20px auto;
    display: block;
}

/* ================================================= */
/*          RESPONSIVE                               */
/* ================================================= */

@media (min-width: 769px) {
    .robot-description h3 {
        font-size: 2.5em;
    }

    .robot-description ul li {
        font-size: 1.5em;
        margin-left: 25px;
    }
}

@media (max-width: 1200px) {
    .achievements-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    .link-grid {
        grid-template-columns: 1fr;
    }
    .video-wall-container {
        grid-template-columns: repeat(2, 1fr);
    }
    .blog-post-full {
        flex-direction: column;
    }
    .blog-post-full img {
        width: 100%;
    }
    .achievements-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2.2rem;
    }
    .hero-content p {
        font-size: 1rem;
    }
    header.main-header .container {
        flex-direction: column;
        align-items: center;
    }
    header.main-header #branding h1 {
        margin-bottom: 10px;
    }
    .header-right {
        flex-direction: column;
        gap: 10px;
    }
    nav.main-nav ul {
        justify-content: center;
        flex-wrap: wrap;
    }
    nav.main-nav li {
        margin: 5px 10px;
    }
    .spotlight-video-container {
        max-width: 100%;
    }
    .card-grid {
        grid-template-columns: 1fr;
    }
    .robot-section {
        flex-direction: column;
    }
    .robot-image {
        order: -1;
    }
    .achievements-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .hero-content h1 {
        font-size: 1.8rem;
    }
    .hero-content p {
        font-size: 0.9rem;
    }
    header.main-header #branding h1 {
        font-size: 22px;
        text-align: center;
    }
    .video-wall-container {
        grid-template-columns: 1fr;
    }
    .link-pane h2 {
        font-size: 2rem;
    }
}
