:root {
    color-scheme: dark;
    --surface: #151e2a;
    --border: #546478;
    --text: #f7f9fc;
    --muted: #bdcadd;
    --link: #a7d8ff;
}

* { box-sizing: border-box; }
html { scroll-padding-top: 1.5rem; }

.speaking-page {
    margin: 0;
    min-height: 100vh;
    background: #090a0f radial-gradient(ellipse at top, #223344, #090a0f 58rem) no-repeat;
    color: var(--text);
    font: 1rem/1.6 system-ui, sans-serif;
    isolation: isolate;
}

.speaking-page::before {
    content: "";
    position: fixed;
    inset: -11rem 0 0;
    z-index: -1;
    pointer-events: none;
    background-image: radial-gradient(circle at 21px 32px, #fff 0.8px, transparent 1.5px),
        radial-gradient(circle at 81px 122px, #8f9fb7 0.75px, transparent 1.45px),
        radial-gradient(circle at 112px 47px, #e5efff 0.65px, transparent 1.3px);
    background-size: 157px 173px, 211px 197px, 269px 307px;
    opacity: 0.5;
    animation: drift-stars 100s linear infinite alternate;
}

@keyframes drift-stars { to { transform: translateY(10rem); } }
@media (prefers-reduced-motion: reduce) { .speaking-page::before { animation: none; } }

.page-width { width: min(68rem, 100% - 2rem); margin-inline: auto; }
.site-header, .intro-actions, .language-control {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
}
.site-header {
    justify-content: space-between;
    padding-block: 1rem;
    border-bottom: 1px solid var(--border);
}

.site-header[hidden] { display: none; }

h1, h2, h3, .site-header > a { font-family: Montserrat, system-ui, sans-serif; line-height: 1.2; }
h1 { font-size: clamp(2.4rem, 7vw, 4.5rem); margin-block: 0 0.75rem; }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); margin-block: 0 1rem; }
h3 { font-size: 1.15rem; margin: 0; overflow-wrap: anywhere; }
p { margin-block: 0 1rem; }
a { color: var(--link); text-underline-offset: 0.21em; }
:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
main > section { padding-block: clamp(1.5rem, 5vw, 3rem); }
.intro { padding-block: clamp(2.5rem, 8vw, 5.5rem) 1.5rem; }
.intro p { max-width: 60ch; color: var(--muted); font-size: 1.1rem; }

.action {
    display: inline-block;
    border: 1px solid var(--link);
    border-radius: 0.5rem;
    padding: 0.6rem 0.85rem;
    background: var(--link);
    color: #101924;
    font-weight: 650;
    text-decoration: none;
}
.action.secondary { background: var(--surface); color: var(--link); }
.action:hover { background: var(--text); color: #101924; }
.topics, .filters, .cards { display: grid; gap: 0.85rem; }
.topics, .cards { grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr)); }
.topics { list-style: none; padding: 0; margin: 0; }
.topics li, .event-card { background: var(--surface); border: 1px solid var(--border); border-radius: 0.65rem; }
.topics li { padding: 0.8rem 1rem; }
.filters { border: 0; padding: 0; margin: 0 0 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); }
.filters[hidden] { display: none; }
.filters label { display: grid; gap: 0.25rem; min-width: 0; }
select { min-height: 2.75rem; border: 1px solid var(--border); border-radius: 0.45rem; background: var(--surface); color: var(--text); padding-inline: 0.6rem; font: inherit; }

.event-card { min-width: 0; padding: 1rem; display: grid; align-content: start; gap: 0.6rem; }
.event-card img { display: block; width: 100%; height: 6rem; object-fit: contain; border-radius: 0.4rem; background: #0e141e; }
.event-card p { margin: 0; }
.event-meta, #event-count { color: var(--muted); font-size: 0.925rem; }
.event-type { font-weight: 700; color: #c9d7e8; }
.event-card[data-speaking] .event-type { color: #9de2c5; }
.event-sources { display: flex; flex-wrap: wrap; column-gap: 1rem; }
.invitation { border-top: 1px solid var(--border); }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

@media (horizontal-viewport-segments: 2) and (vertical-viewport-segments: 1) {
    .page-width { width: min(68rem, calc(env(viewport-segment-width 0 0) - 2rem)); margin-inline: 1rem auto; }
}
