:root {
    --mit-brick-red: #661b21;
    --mit-dawn-orange: #f26522;
    --mit-midnight-blue: #192955;
    --mit-purple: #462556;
    --mit-light-yellow: #ffefcf;
    --mit-lilac: #dfcbe3;
    --mit-light-blue: #d3eefb;

    --bg: #fffaf1;
    --surface: #ffffff;
    --surface-soft: #ffefcf;
    --ink: #192955;
    --ink-muted: #3f4b6f;
    --primary: #192955;
    --primary-strong: #661b21;
    --accent: #f26522;
    --line: #e9ddc7;
    --shadow: 0 16px 34px rgba(25, 41, 85, 0.14);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Allumi Std", "Halyard Micro", "Segoe UI", sans-serif;
    color: var(--ink);
    line-height: 1.75;
    background:
        radial-gradient(circle at 5% 10%, var(--mit-light-blue) 0%, transparent 36%),
        radial-gradient(circle at 92% 18%, var(--mit-lilac) 0%, transparent 36%),
        var(--bg);
}

.container {
    width: min(1160px, 90%);
    margin: 0 auto;
}

section {
    padding: 92px 0;
}

h1,
h2,
h3 {
    font-family: "Halyard Micro", "Allumi Std", sans-serif;
    letter-spacing: -0.02em;
}

h1 {
    font-size: clamp(2rem, 4.6vw, 3.45rem);
    line-height: 1.15;
    margin-bottom: 16px;
    color: #fff;
}

h2 {
    font-size: clamp(1.7rem, 3vw, 2.55rem);
    margin-bottom: 26px;
    color: var(--primary-strong);
}

h3 {
    font-size: 1.18rem;
    margin-bottom: 10px;
}

p {
    color: var(--ink-muted);
    margin-bottom: 18px;
    max-width: 900px;
}

.auto-margin {
    margin: 0 auto;
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-weight: 700;
    font-size: 0.78rem;
    color: var(--mit-light-yellow);
    margin-bottom: 14px;
}

/* Navbar */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1100;
    padding: 0;
    background: rgba(255, 250, 241, 0.9);
    border-bottom: 1px solid transparent;
    backdrop-filter: blur(8px);
    transition: border-color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.navbar.scrolled {
    border-color: rgba(102, 27, 33, 0.2);
    box-shadow: 0 10px 24px rgba(25, 41, 85, 0.08);
    background: rgba(255, 250, 241, 0.96);
}

.scroll-progress {
    height: 4px;
    width: 100%;
    background: rgba(102, 27, 33, 0.1);
}

.scroll-progress span {
    display: block;
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, var(--mit-dawn-orange), var(--mit-brick-red));
    transition: width 0.08s linear;
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    padding: 16px 0;
}

.logo {
    font-family: "Halyard Micro", "Allumi Std", sans-serif;
    text-decoration: none;
    font-size: 1.15rem;
    color: var(--primary-strong);
    font-weight: 700;
    letter-spacing: 0.04em;
}

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

.nav-links a,
.drop-toggle {
    text-decoration: none;
    color: var(--primary-strong);
    font-weight: 600;
    font-size: 0.95rem;
    transition: color 0.2s ease, background-color 0.2s ease;
}

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

.dropdown {
    position: relative;
}

.drop-toggle {
    border: none;
    background: transparent;
    font-family: inherit;
    display: flex;
    align-items: center;
    cursor: pointer;
    gap: 6px;
}

.arrow {
    font-size: 0.72rem;
    transition: transform 0.25s ease;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 265px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 8px;
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: all 0.25s ease;
}

.dropdown-menu a {
    display: block;
    padding: 10px 12px;
    border-radius: 8px;
}

.dropdown-menu a:hover {
    background: #fff7e6;
}

@media (min-width: 769px) {
    .dropdown:hover .dropdown-menu {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .dropdown:hover .arrow {
        transform: rotate(180deg);
    }
}

.hamburger {
    display: none;
    width: 30px;
    height: 20px;
    position: relative;
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 0;
}

.hamburger span {
    position: absolute;
    width: 100%;
    height: 2px;
    background: var(--primary-strong);
    left: 0;
    transition: all 0.3s ease;
}

.hamburger span:nth-child(1) {
    top: 0;
}

.hamburger span:nth-child(2) {
    top: 9px;
}

.hamburger span:nth-child(3) {
    top: 18px;
}

.hamburger.active span:nth-child(1) {
    top: 9px;
    transform: rotate(45deg);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    top: 9px;
    transform: rotate(-45deg);
}

/* Hero */
.hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(128deg, var(--mit-midnight-blue) 0%, var(--mit-purple) 52%, var(--mit-brick-red) 100%);
    padding: 118px 0 94px;
}

.hero-bg-shape {
    position: absolute;
    border-radius: 999px;
    filter: blur(10px);
    z-index: 0;
}

.hero-bg-shape-one {
    width: 260px;
    height: 260px;
    background: rgba(242, 101, 34, 0.24);
    top: -90px;
    right: 8%;
}

.hero-bg-shape-two {
    width: 330px;
    height: 330px;
    background: rgba(211, 238, 251, 0.22);
    bottom: -140px;
    left: -40px;
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
}

.hero .location,
.hero .hero-content p {
    color: #e5ecff;
}

.hero-cta-row {
    margin-top: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.partner-logos {
    margin-top: 22px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.partner-logo-card {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(223, 203, 227, 0.75);
    border-radius: 12px;
    padding: 10px 12px;
    min-height: 150px;
    display: grid;
    grid-template-rows: 1fr auto;
    place-items: center;
    gap: 8px;
    box-shadow: 0 10px 20px rgba(25, 41, 85, 0.1);
}

.partner-logo-card img {
    width: min(100%, 250px);
    height: 95px;
    object-fit: contain;
    object-position: center;
    display: block;
    margin: 0 auto;
}

.partner-logo-card p {
    margin: 8px 0 0;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--mit-brick-red);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.btn-primary,
.btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 700;
    padding: 13px 24px;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.btn-primary {
    color: #fff;
    background: linear-gradient(90deg, #f26522, #f88c52);
    box-shadow: 0 12px 22px rgba(242, 101, 34, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
}

.btn-ghost {
    border: 1px solid rgba(255, 239, 207, 0.5);
    color: var(--mit-light-yellow);
    background: rgba(255, 255, 255, 0.05);
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.12);
}

.event-meta-grid {
    margin-top: 34px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.meta-card {
    background: rgba(255, 255, 255, 0.09);
    border: 1px solid rgba(223, 203, 227, 0.38);
    padding: 16px;
    border-radius: 12px;
    text-align: left;
}

.meta-card h3 {
    color: #fff;
    margin-bottom: 3px;
}

.meta-card p {
    color: #ede3f3;
    margin-bottom: 0;
    font-size: 0.92rem;
}

.countdown-card {
    margin-top: 22px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(223, 203, 227, 0.4);
    border-radius: 14px;
    padding: 18px;
}

.countdown-card h3 {
    color: #fff;
    margin-bottom: 12px;
}

.countdown {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.time-box {
    border-radius: 10px;
    padding: 12px 10px;
    background: rgba(25, 41, 85, 0.5);
}

.time-box span {
    color: #fff;
    display: block;
    font-family: "Halyard Micro", "Allumi Std", sans-serif;
    font-size: 1.6rem;
    line-height: 1;
    margin-bottom: 4px;
}

.time-box small {
    color: #e3d7ea;
    text-transform: uppercase;
    font-size: 0.66rem;
    letter-spacing: 0.08em;
}

/* Sections */
.section-light {
    background: transparent;
}

.section-dark {
    color: #f6f1fa;
    background: linear-gradient(130deg, var(--mit-midnight-blue) 0%, var(--mit-purple) 100%);
    position: relative;
}

.section-dark::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 18%, rgba(242, 101, 34, 0.17), transparent 35%);
    pointer-events: none;
}

.section-dark .container {
    position: relative;
    z-index: 1;
}

.section-dark h2,
.section-dark h3 {
    color: #fff;
}

.section-dark p,
.section-dark li {
    color: #eadff3;
}

.theme-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
}

.theme-grid div {
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(223, 203, 227, 0.36);
    border-radius: 10px;
    padding: 16px;
}

.track {
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 0;
    margin-bottom: 18px;
    background: rgba(255, 255, 255, 0.85);
    box-shadow: 0 8px 20px rgba(25, 41, 85, 0.08);
    overflow: hidden;
}

.track summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    list-style: none;
    cursor: pointer;
    padding: 10px 20px;
    transition: background 0.2s ease;
}

.track summary::-webkit-details-marker {
    display: none;
}

.track summary::after {
    content: "+";
    font-size: 1.35rem;
    line-height: 1;
    color: var(--primary-strong);
    font-weight: 600;
}

.track[open] summary::after {
    content: "−";
}

.track summary:hover {
    background: rgba(223, 203, 227, 0.28);
}

.track h3 {
    margin-bottom: 0;
}

.track ul {
    list-style: none;
    padding: 0 22px 18px;
}

.track li {
    padding: 8px 0;
    border-bottom: 1px dashed #d7c5df;
}

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

#submission ul {
    list-style-position: inside;
}

.dates-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 12px 26px rgba(25, 41, 85, 0.08);
}

.dates-table {
    width: 100%;
    min-width: 760px;
    border-collapse: collapse;
}

.dates-table th,
.dates-table td {
    padding: 16px 18px;
    border-bottom: 1px solid #eadfcb;
    border-right: 1px solid #eadfcb;
    text-align: left;
    vertical-align: top;
}

.dates-table th:last-child,
.dates-table td:last-child {
    border-right: 0;
}

.dates-table tr:last-child td {
    border-bottom: 0;
}

.dates-table th {
    background: #fff6e4;
    color: var(--primary-strong);
    font-family: "Halyard Micro", "Allumi Std", sans-serif;
    font-size: 1.02rem;
}

.dates-table tbody tr:nth-child(even) {
    background: #fffdfa;
}

.registration-intro {
    margin-bottom: 18px;
    max-width: 980px;
}

.registration-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 12px 26px rgba(25, 41, 85, 0.08);
}

.registration-table {
    width: 100%;
    min-width: 760px;
    border-collapse: collapse;
}

.registration-table th,
.registration-table td {
    padding: 16px 18px;
    border-bottom: 1px solid #eadfcb;
    border-right: 1px solid #eadfcb;
    text-align: left;
    vertical-align: top;
}

.registration-table th:last-child,
.registration-table td:last-child {
    border-right: 0;
}

.registration-table tr:last-child td {
    border-bottom: 0;
}

.registration-table th {
    background: #fff6e4;
    color: var(--primary-strong);
    font-family: "Halyard Micro", "Allumi Std", sans-serif;
    font-size: 1.02rem;
}

.registration-table tbody tr:nth-child(even) {
    background: #fffdfa;
}

.registration-note {
    margin-top: 14px;
    font-size: 0.95rem;
}

.section-map {
    padding-top: 58px;
}

.map-wrapper {
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    background: var(--mit-light-blue);
}

.map-wrapper iframe {
    width: 100%;
    height: min(58vh, 430px);
    border: none;
}

footer {
    background: var(--mit-midnight-blue);
    color: #f4ecf8;
    text-align: center;
    padding: 36px 0;
}

footer p {
    color: #f4ecf8;
    margin-bottom: 4px;
}

.back-to-top {
    position: fixed;
    right: 18px;
    bottom: 20px;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 999px;
    background: var(--mit-brick-red);
    color: #fff;
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 10px 20px rgba(25, 41, 85, 0.22);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(8px);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease, background 0.2s ease;
    z-index: 1200;
}

.back-to-top:hover {
    background: var(--mit-dawn-orange);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

/* Effects */
.reveal {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Mobile */
@media (max-width: 768px) {
    section {
        padding: 72px 0;
    }

    .hero {
        padding-top: 100px;
    }

    .event-meta-grid,
    .countdown,
    .partner-logos {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .partner-logo-card {
        min-height: 140px;
    }

    .partner-logo-card img {
        height: 80px;
    }

    .navbar {
        padding: 0;
    }

    .nav-wrapper {
        padding: 14px 0;
    }

    .hamburger {
        display: flex;
    }

    .nav-links {
        position: absolute;
        top: calc(100% + 8px);
        left: 50%;
        width: 100vw;
        transform: translate(-50%, -8px);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        background: rgba(255, 250, 241, 0.98);
        border: 1px solid rgba(102, 27, 33, 0.16);
        border-radius: 14px;
        box-shadow: 0 20px 35px rgba(25, 41, 85, 0.16);
        padding: 14px;
        display: flex;
        flex-direction: column;
        gap: 8px;
        text-align: left;
        max-height: calc(100vh - 92px);
        overflow: auto;
        transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
    }

    .nav-links.active {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translate(-50%, 0);
    }

    .nav-links a,
    .drop-toggle {
        width: 100%;
        padding: 12px 14px;
        border-radius: 10px;
    }

    .nav-links a:hover,
    .drop-toggle:hover {
        background: #fff2db;
    }

    .dropdown {
        width: 100%;
    }

    .dropdown-menu {
        position: static;
        margin-top: 6px;
        min-width: 0;
        background: #fff9ed;
        border-radius: 10px;
        box-shadow: none;
        border: 1px solid #ead7be;
        opacity: 1;
        visibility: visible;
        transform: none;
        display: none;
    }

    .dropdown.open .dropdown-menu {
        display: block;
    }

    .dropdown.open .arrow {
        transform: rotate(180deg);
    }

    .back-to-top {
        right: 14px;
        bottom: 16px;
    }

    body.menu-open {
        overflow: hidden;
    }
}

@media (max-width: 520px) {
    .partner-logos {
        grid-template-columns: 1fr;
    }
}
