@font-face {
    font-family: "Berkeley Mono";
    src: url("/assets/fonts/berkeley-mono/BerkeleyMono-Regular.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Berkeley Mono";
    src: url("/assets/fonts/berkeley-mono/BerkeleyMono-Bold.woff2") format("woff2");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

:root {
    --paper: #f4ede3;
    --paper-warm: #fbf6ed;
    --ink: #050505;
    --soft-ink: #38322c;
    --blue: #0648d8;
    --orange: #ff3d12;
    --yellow: #ffdf69;
    --cream: #fff7ea;
    --shadow: 9px 10px 0 rgba(5, 5, 5, 0.12);
    --mono: "Berkeley Mono", "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

* {
    box-sizing: border-box;
}

html {
    background: var(--paper);
}

body {
    min-height: 100vh;
    margin: 0;
    overflow-x: hidden;
    color: var(--ink);
    background:
        linear-gradient(90deg, rgba(5, 5, 5, 0.032) 1px, transparent 1px),
        linear-gradient(0deg, rgba(5, 5, 5, 0.028) 1px, transparent 1px),
        radial-gradient(circle at 12% 8%, #fff 0, transparent 32rem),
        var(--paper);
    background-size: 22px 22px, 22px 22px, auto, auto;
    font-family: var(--mono);
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
    max-width: 100%;
}

.page {
    width: min(100%, 1536px);
    margin: 0 auto;
    padding: 24px 28px 44px;
}

.site-header {
    display: grid;
    grid-template-columns: minmax(238px, 0.92fr) minmax(420px, 1.28fr) auto;
    gap: 24px;
    align-items: end;
    padding: 18px 22px 22px;
    border-block: 2px solid var(--ink);
}

.brand {
    display: block;
    width: min(100%, 350px);
}

.brand img {
    width: 100%;
}

.nav,
.header-actions,
.event-actions,
.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
    align-items: center;
}

.nav a {
    padding: 6px 2px;
    font-size: 0.78rem;
    text-transform: uppercase;
}

.nav a:hover,
.nav a:focus-visible,
.footer a:hover,
.footer a:focus-visible {
    color: var(--blue);
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 5px;
}

.btn {
    display: inline-flex;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    padding: 11px 18px;
    border: 2px solid var(--ink);
    background: var(--paper-warm);
    box-shadow: 5px 6px 0 var(--ink);
    font-size: 0.74rem;
    font-weight: 700;
    line-height: 1.1;
    text-transform: uppercase;
    transition: transform 120ms ease, box-shadow 120ms ease, background 120ms ease;
}

.btn:hover,
.btn:focus-visible {
    transform: translate(2px, 2px);
    box-shadow: 3px 4px 0 var(--ink);
}

.btn-blue {
    background: var(--blue);
    color: #fff;
}

.btn-orange {
    background: var(--orange);
    color: #fff;
}

.event-shell {
    margin-top: 34px;
}

.back-link {
    display: inline-flex;
    gap: 9px;
    align-items: center;
    margin-bottom: 18px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
}

.back-link:hover,
.back-link:focus-visible {
    color: var(--blue);
}

.event-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(360px, 0.8fr);
    min-height: 690px;
    overflow: hidden;
    border: 2px solid var(--ink);
    background: var(--ink);
    box-shadow: var(--shadow);
}

.event-main {
    position: relative;
    z-index: 1;
    display: grid;
    align-content: space-between;
    gap: 50px;
    padding: clamp(34px, 6vw, 84px);
    color: var(--cream);
}

.event-main::after {
    position: absolute;
    right: -88px;
    bottom: -118px;
    z-index: -1;
    width: 290px;
    height: 290px;
    border: 42px solid var(--blue);
    border-radius: 50%;
    content: "";
}

.event-kind {
    display: inline-flex;
    width: fit-content;
    min-height: 31px;
    align-items: center;
    padding: 6px 10px;
    border: 2px solid currentColor;
    color: var(--yellow);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.event-title {
    max-width: 10ch;
    margin: 20px 0 0;
    font-size: clamp(4.2rem, 8.4vw, 9rem);
    line-height: 0.82;
    letter-spacing: -0.075em;
    text-transform: uppercase;
}

.event-speaker {
    display: block;
    margin-top: 24px;
    color: var(--yellow);
    font-size: clamp(1rem, 2vw, 1.5rem);
    font-weight: 700;
}

.event-date-line {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 20px;
    align-items: center;
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
}

.event-date-line span + span::before {
    margin-right: 20px;
    color: var(--orange);
    content: "◆";
}

.event-visual {
    position: relative;
    overflow: hidden;
    border-left: 2px solid var(--ink);
    background: var(--orange);
}

.event-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 28%;
}

.event-visual::after {
    position: absolute;
    right: 20px;
    bottom: 18px;
    padding: 7px 10px;
    border: 2px solid var(--ink);
    background: var(--yellow);
    box-shadow: 4px 5px 0 var(--ink);
    color: var(--ink);
    content: "EBMC · BERKELEY";
    font-size: 0.66rem;
    font-weight: 700;
}

.event-public {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 18px 28px;
    align-items: center;
    margin-top: 22px;
    padding: 22px 26px;
    border: 2px solid var(--ink);
    background: var(--yellow);
    box-shadow: var(--shadow);
}

.event-public strong {
    font-size: clamp(1.1rem, 2.3vw, 1.8rem);
    line-height: 1.1;
    text-transform: uppercase;
}

.event-public span {
    font-size: 0.78rem;
    line-height: 1.5;
}

.event-details {
    display: grid;
    grid-template-columns: minmax(0, 0.72fr) minmax(0, 1.28fr);
    gap: 28px;
    margin-top: 22px;
}

.event-facts,
.event-story {
    border: 2px solid var(--ink);
    background: var(--paper-warm);
    box-shadow: var(--shadow);
}

.event-facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.fact {
    min-height: 128px;
    padding: 22px;
    border-right: 2px solid var(--ink);
    border-bottom: 2px solid var(--ink);
}

.fact:nth-child(2n) {
    border-right: 0;
}

.fact:nth-last-child(-n + 2) {
    border-bottom: 0;
}

.fact span {
    display: block;
    margin-bottom: 10px;
    color: var(--orange);
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
}

.fact strong {
    display: block;
    font-size: clamp(1.2rem, 2vw, 1.8rem);
    line-height: 1.22;
    letter-spacing: -0.025em;
}

.event-story {
    display: grid;
    align-content: center;
    padding: clamp(30px, 5vw, 62px);
}

.event-story .eyebrow {
    margin: 0;
    color: var(--blue);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
}

.event-story p {
    max-width: 38ch;
    margin: 18px 0 0;
    font-size: clamp(1.18rem, 2.2vw, 2rem);
    line-height: 1.45;
}

.event-story p:only-child {
    margin-top: 0;
}

.event-actions {
    margin-top: 34px;
    padding: 26px;
    border: 2px solid var(--ink);
    background: var(--yellow);
    box-shadow: var(--shadow);
}

.event-note {
    flex: 1 1 360px;
    margin: 0;
    font-size: 0.76rem;
    line-height: 1.5;
}

.event-actions .btn {
    flex: 0 0 auto;
}

.build-dates {
    margin-top: 22px;
    overflow: hidden;
    border: 2px solid var(--ink);
    background: var(--paper-warm);
    box-shadow: var(--shadow);
}

.build-dates-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 20px;
    align-items: end;
    padding: 28px;
    border-bottom: 2px solid var(--ink);
    background: var(--ink);
    color: var(--cream);
}

.build-dates-head h2 {
    margin: 0;
    font-size: clamp(2rem, 4vw, 4rem);
    line-height: 0.9;
    text-transform: uppercase;
}

.build-dates-head p {
    max-width: 440px;
    margin: 0;
    color: rgba(255, 247, 234, 0.72);
    font-size: 0.74rem;
    line-height: 1.5;
}

.build-date {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 24px;
    align-items: center;
    padding: 22px 28px;
    border-bottom: 2px solid var(--ink);
}

.build-date:last-child {
    border-bottom: 0;
}

.build-date time {
    display: grid;
    gap: 6px;
}

.build-date time strong {
    font-size: clamp(1.25rem, 2.4vw, 2rem);
    line-height: 1;
    text-transform: uppercase;
}

.build-date time span {
    color: var(--soft-ink);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
}

.build-date-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.build-date-actions .btn {
    min-height: 42px;
    box-shadow: 4px 5px 0 var(--ink);
    font-size: 0.66rem;
}

.build-page .event-hero {
    background: var(--blue);
}

.build-page .event-main::after {
    border-color: var(--yellow);
}

.build-page .event-visual {
    display: grid;
    place-items: center;
    padding: 40px;
    background:
        linear-gradient(90deg, rgba(5, 5, 5, 0.12) 1px, transparent 1px),
        linear-gradient(0deg, rgba(5, 5, 5, 0.12) 1px, transparent 1px),
        var(--orange);
    background-size: 22px 22px;
}

.build-page .event-visual img {
    width: 155%;
    max-width: none;
    height: auto;
    transform: rotate(-5deg);
    filter: brightness(0) invert(1);
    opacity: 0.92;
}

.build-page .event-visual::before {
    position: absolute;
    top: 34px;
    left: 28px;
    z-index: 1;
    color: var(--cream);
    content: "MAKE / FIX";
    font-size: clamp(3.2rem, 4.8vw, 5.6rem);
    font-weight: 700;
    line-height: 0.9;
    letter-spacing: -0.065em;
    white-space: nowrap;
}

.footer {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 20px;
    margin-top: 44px;
    padding: 26px 22px;
    border-block: 2px solid var(--ink);
    font-size: 0.72rem;
    line-height: 1.5;
}

.footer p {
    max-width: 820px;
    margin: 0;
}

@media (max-width: 1120px) {
    .site-header {
        grid-template-columns: 1fr auto;
    }

    .nav {
        grid-column: 1 / -1;
        order: 3;
    }

    .event-hero {
        grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
    }

    .event-details {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .page {
        padding: 18px 16px 32px;
    }

    .site-header {
        grid-template-columns: 1fr;
        align-items: start;
        padding-inline: 0;
    }

    .brand {
        width: min(100%, 300px);
    }

    .header-actions {
        width: 100%;
    }

    .header-actions .btn {
        flex: 1 1 120px;
    }

    .nav {
        grid-column: auto;
    }

    .event-shell {
        margin-top: 24px;
    }

    .event-hero {
        grid-template-columns: 1fr;
        min-height: 0;
    }

    .event-main {
        min-height: 500px;
        padding: 34px 24px;
    }

    .event-title {
        font-size: clamp(3.7rem, 18vw, 6rem);
    }

    .event-visual {
        min-height: 470px;
        border-top: 2px solid var(--ink);
        border-left: 0;
    }

    .build-page .event-visual {
        min-height: 410px;
    }

    .event-details {
        margin-top: 22px;
    }

    .event-public {
        grid-template-columns: 1fr;
        padding: 20px;
    }

    .event-facts {
        grid-template-columns: 1fr;
    }

    .fact,
    .fact:nth-child(2n),
    .fact:nth-last-child(-n + 2) {
        min-height: 0;
        border-right: 0;
        border-bottom: 2px solid var(--ink);
    }

    .fact:last-child {
        border-bottom: 0;
    }

    .event-actions {
        align-items: stretch;
    }

    .event-actions .btn {
        flex: 1 1 100%;
    }

    .build-dates-head,
    .build-date {
        grid-template-columns: 1fr;
    }

    .build-date-actions .btn {
        flex: 1 1 180px;
    }

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

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 1ms !important;
    }
}
