@font-face {
    font-display: swap;
    font-family: 'Atkinson Hyperlegible Next';
    font-style: normal;
    font-weight: 300;
    src: url('../assets/fonts/AtkinsonHyperlegibleNext-Light.woff2') format('woff2');
}
@font-face {
    font-display: swap;
    font-family: 'Atkinson Hyperlegible Next';
    font-style: normal;
    font-weight: 400;
    src: url('../assets/fonts/AtkinsonHyperlegibleNext-Regular.woff2') format('woff2');
}
@font-face {
    font-display: swap;
    font-family: 'Atkinson Hyperlegible Next';
    font-style: italic;
    font-weight: 400;
    src: url('../assets/fonts/AtkinsonHyperlegibleNext-RegularItalic.woff2') format('woff2');
}
@font-face {
    font-display: swap;
    font-family: 'Atkinson Hyperlegible Next';
    font-style: normal;
    font-weight: 600;
    src: url('../assets/fonts/AtkinsonHyperlegibleNext-Bold.woff2') format('woff2');
}
@font-face {
    font-display: swap;
    font-family: 'Atkinson Hyperlegible Next';
    font-style: normal;
    font-weight: 800;
    src: url('../assets/fonts/AtkinsonHyperlegibleNext-ExtraBold.woff2') format('woff2');
}

:root {
    --websiteBG: rgb(223, 241, 238);
    --surface: rgb(255, 255, 255);
    --link: rgb(29, 81, 88);
    --hover: 2px solid rgb(29, 81, 88);
    --focus: 2px solid rgb(29, 81, 88);
    --text: rgb(16, 22, 33);
    --h1: rgb(16, 22, 33);
    --h2: rgb(42, 42, 42);
    --h2Emphasized: rgb(44, 79, 129);
    --h3: rgb(16, 22, 33);
    --h4: rgb(54, 97, 159);
    --h5: rgb(54, 97, 159);
    --h6: rgb(16, 22, 33);
    --list: rgb(7, 141, 143);
    --accent: rgb(58, 170, 171);
    --accent2: rgb(241, 193, 83);

    --font-text: 'Atkinson Hyperlegible Next', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --font-display: var(--font-text);
    --content-width: 46rem;
    --radius: 0.75rem;
}

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

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}

body {
    margin: 0;
    background: var(--websiteBG);
    color: var(--text);
    font-family: var(--font-text);
    font-size: 1.125rem;
    line-height: 1.65;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

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

h1, h2, h3, h4, h5, h6 {
    line-height: 1.2;
    margin: 2rem 0 0.75rem;
    overflow-wrap: break-word;
}

h1 {
    font-family: var(--font-display);
    font-weight: 800;
    color: var(--h1);
    font-size: clamp(2.25rem, 1.5rem + 3vw, 3.5rem);
    letter-spacing: 0.01em;
    margin-top: 0;
}

h2 {
    font-family: var(--font-display);
    font-weight: 800;
    color: var(--h2);
    font-size: clamp(1.6rem, 1.3rem + 1.2vw, 2.1rem);
    letter-spacing: 0.01em;
}

h2::after {
    content: "";
    display: block;
    width: 3.5rem;
    height: 0.3rem;
    margin-top: 0.5rem;
    border-radius: 0.2rem;
    background: linear-gradient(90deg, var(--accent) 0 60%, var(--accent2) 60% 100%);
}

h3 { color: var(--h3); font-size: 1.35rem; font-weight: 600; }
h4 { color: var(--h4); font-size: 1.2rem; font-weight: 600; }
h5 { color: var(--h5); font-size: 1.1rem; font-weight: 600; }
h6 { color: var(--h6); font-size: 1rem; font-weight: 600; }

.emphasized {
    color: var(--h2Emphasized);
}

p, ul, ol {
    margin: 0 0 1rem;
}

ul {
    padding-left: 1.4rem;
}

li + li {
    margin-top: 0.5rem;
}

li::marker {
    color: var(--link);
}

strong {
    font-weight: 600;
}

a {
    color: var(--link);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.2em;
}

a:hover {
    text-decoration-thickness: 2px;
    outline: var(--hover);
    outline-offset: 2px;
    border-radius: 2px;
}

a:focus-visible,
button:focus-visible {
    outline: var(--focus);
    outline-offset: 3px;
    border-radius: 2px;
    box-shadow: 0 0 0 5px var(--surface);
}

.visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.container {
    width: 100%;
    max-width: calc(var(--content-width) + 3rem);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.lang-bar {
    display: flex;
    justify-content: flex-end;
    padding-top: 0.75rem;
}

.lang-switch a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0.4rem 0.75rem;
    font-weight: 600;
    border-radius: 0.4rem;
    border: 2px solid transparent;
}

.lang-switch a:hover {
    outline: none;
    border: var(--hover);
    text-decoration-thickness: 2px;
}

.footer-nav ul {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 0.5rem;
    list-style: none;
    margin: 0 0 0 -0.75rem;
    padding: 0;
}

.footer-nav li + li {
    margin-top: 0;
}

.footer-nav a {
    display: inline-block;
    padding: 0.4rem 0.75rem;
    min-height: 44px;
    line-height: 1.65;
    font-weight: 600;
    border-radius: 0.4rem;
    border: 2px solid transparent;
}

.footer-nav a:hover {
    outline: none;
    border: var(--hover);
}

.footer-nav a[aria-current="page"] {
    background: var(--websiteBG);
    text-decoration-thickness: 2px;
    text-underline-offset: 0.3em;
}

main {
    flex: 1 0 auto;
    padding: 1rem 0 3rem;
}

.section {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 1.75rem 1.5rem;
    margin-bottom: 1.75rem;
}

.section > h2:first-child {
    margin-top: 0;
}

@media (min-width: 40em) {
    .section {
        padding: 2.25rem 2.5rem;
    }
}

.intro {
    display: grid;
    gap: 1.75rem;
    align-items: start;
    margin-bottom: 2.5rem;
}

.intro__logo {
    width: min(15rem, 70%);
    height: auto;
}

.intro__lead {
    font-size: 1.25rem;
    margin-bottom: 0;
}

.intro__tagline {
    font-weight: 600;
    color: var(--h2Emphasized);
    margin: -0.25rem 0 1rem;
    font-size: 1.2rem;
    line-height: 1.4;
    letter-spacing: normal;
}

.intro__tagline::after {
    content: none;
}

@media (min-width: 44em) {
    .intro {
        grid-template-columns: 15rem 1fr;
        gap: 2.5rem;
    }

    .intro__logo {
        width: 100%;
    }
}

.topics {
    list-style: none;
    margin: 0 0 0.5em 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 8rem), 1fr));
    gap: 0.75rem;
}

@media (min-width: 48em) {
    .topics {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.topics li + li {
    margin-top: 0;
}

.topic {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 0.6rem;
    min-width: 0;
    padding: 1.1rem 0.75rem;
    text-align: center;
    background: var(--websiteBG);
    border-radius: var(--radius);
}

.topic__icon {
    flex: none;
    width: 2.5rem;
    height: 2.5rem;
    padding: 0.5rem;
    box-sizing: content-box;
    border-radius: 50%;
    background: var(--surface);
    color: var(--link);
    fill: none;
    stroke: currentColor;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.topic__label {
    font-weight: 600;
    line-height: 1.3;
    max-width: 100%;
    overflow-wrap: break-word;
    hyphens: auto;
}

.topic abbr[title] {
    text-decoration: none;
}

.contact-grid {
    display: grid;
    gap: 0 2rem;
}

.contact-grid h3 {
    margin-top: 1.25rem;
}

@media (min-width: 44em) {
    .contact-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.talks {
    list-style: none;
    padding: 0;
}

.talks li {
    position: relative;
    padding: 0.75rem 0 0.75rem 1.5rem;
    border-bottom: 1px solid var(--list);
    margin: 0;
}

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

.talks li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 1.35rem;
    width: 0.6rem;
    height: 0.6rem;
    border-radius: 50%;
    background: var(--accent);
}

.note {
    border-left: 5px solid var(--accent2);
    background: rgb(253, 246, 228);
    padding: 1rem 1.25rem;
    border-radius: 0 var(--radius) var(--radius) 0;
    margin-bottom: 1.5rem;
}

.note p:last-child {
    margin-bottom: 0;
}

.archive-list li {
    margin-top: 0.75rem;
}

.plain-list {
    list-style: none;
    padding: 0;
}

.plain-list li {
    margin-top: 0.75rem;
}

.small {
    font-size: 1rem;
}

.site-footer {
    background: var(--surface);
    border-top: 4px solid var(--accent);
    padding: 1.5rem 0;
    font-size: 1rem;
}

.site-footer .container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.site-footer__meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.5rem 1.5rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--websiteBG);
}

.site-footer p {
    margin: 0;
}

@media (forced-colors: active) {
    .topic {
        border: 1px solid CanvasText;
    }

    .topic__icon {
        color: CanvasText;
        background: Canvas;
    }

    h2::after,
    .talks li::before {
        background: CanvasText;
    }

    .footer-nav a[aria-current="page"] {
        border: 2px solid LinkText;
    }

    .section {
        border-color: transparent;
    }
}

@media print {
    body {
        background: #fff;
    }

    .lang-bar,
    .footer-nav {
        display: none;
    }

    .section {
        padding: 0;
    }

    a[href^="http"]::after {
        content: " (" attr(href) ")";
        font-size: 0.85em;
    }
}
