/* MoscowQA Static Site â€” based on moscowqa-site (Next.js) design */

/* === Reset & Base === */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --max-w: 1400px;
    --pink: #db2777;
    --pink-dark: #be185d;
    --pink-light: rgba(219, 39, 119, 0.1);
    --purple: #7c3aed;
    --green: #16a34a;
    --green-light: rgba(22, 163, 74, 0.1);
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --radius: 0.75rem;
    --shadow: 0 1px 3px rgba(0,0,0,.1), 0 1px 2px rgba(0,0,0,.06);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -4px rgba(0,0,0,.07);
    --shadow-xl: 0 20px 25px -5px rgba(0,0,0,.1), 0 8px 10px -6px rgba(0,0,0,.1);
}

body {
    margin: 0;
    padding: 0;
    background: #000;
    color: var(--gray-800);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: var(--pink);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--pink-dark);
}

h1, h2, h3, h4 {
    font-weight: 700;
    line-height: 1.3;
    color: var(--gray-900);
}

h1 { font-size: 2.25rem; }
h2 { font-size: 1.875rem; }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1rem; }

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

/* === Header (black bar) === */
.header {
    background: #000;
    color: #fff;
}

.header__inner {
    max-width: var(--max-w);
    width: 100%;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header__logo {
    display: flex;
    align-items: center;
    gap: 0;
    text-decoration: none;
    color: #fff;
}

.header__logo:hover {
    text-decoration: none;
    color: #fff;
}

/* The header carries six links, so the logo and the navigation are sized
   against the viewport instead of fixed values: they give ground gradually
   between 900px and the 1400px layout width rather than wrapping or pushing
   the burger off-screen. Below 900px the menu collapses into the burger and
   these clamps are overridden with comfortable tap targets. */
.header__logo-img {
    width: clamp(44px, 4.5vw, 64px);
    height: clamp(44px, 4.5vw, 64px);
    object-fit: contain;
    flex-shrink: 0;
}

.header__logo-text {
    font-size: clamp(1.25rem, 2vw, 1.875rem);
    font-weight: 700;
    padding: 0 clamp(0.5rem, 1vw, 1rem);
    white-space: nowrap;
}

.header__nav {
    display: flex;
    gap: 0;
    align-items: center;
}

.header__nav a {
    color: #fff;
    font-size: clamp(0.75rem, 0.9vw, 0.875rem);
    text-transform: uppercase;
    font-weight: 500;
    padding: 1.25rem clamp(0.5rem, 0.95vw, 1.5rem);
    white-space: nowrap;
    transition: color 0.2s, background 0.2s;
    text-decoration: none;
}

.header__nav a:hover {
    color: var(--pink);
    text-decoration: none;
}

.header__nav a.active {
    background: var(--pink);
    color: #fff;
}

/* Burger */
.header__burger {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
}

@media (max-width: 899px) {
    .header__nav {
        display: none;
    }
    .header__burger {
        display: block;
    }
    /* `top: 100%` instead of the old hard-coded 64px: the header is as tall
       as the logo, which now scales with the viewport. */
    .header__nav.open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #000;
        z-index: 100;
    }
    .header__nav.open a {
        font-size: 0.875rem;
        padding: 1rem 1.5rem;
        border-bottom: 1px solid #222;
    }
    .header__inner {
        position: relative;
    }
}

/* Skip link: off-screen until focused, so a keyboard user can jump the
   header instead of tabbing through the whole navigation on every page. */
.skip-link {
    position: absolute;
    top: 0;
    left: -9999px;
    z-index: 200;
    padding: 0.75rem 1.25rem;
    background: #fff;
    color: var(--pink);
    font-weight: 600;
    border-radius: 0 0 var(--radius) 0;
    box-shadow: var(--shadow-lg);
}

.skip-link:focus {
    left: 0;
}

/* The skip target wraps every page's <main>; body is a flex column, so the
   wrapper has to pass the "fill the viewport" behaviour through to .main,
   otherwise the footer floats up on short pages. */
#content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

#content:focus {
    outline: none;
}

/* === Main content area === */
.main {
    flex: 1;
    background: linear-gradient(to bottom, var(--gray-50), #fff);
}

/* === Container === */
.container {
    max-width: var(--max-w);
    width: 100%;
    margin: 0 auto;
    padding: 3rem 1rem;
}

.container--narrow {
    max-width: 42rem;
}

/* === Hero Section (index page) === */
.hero {
    background: linear-gradient(135deg, var(--pink) 0%, #ec4899 40%, var(--purple) 100%);
    color: #fff;
    padding: 5rem 1rem;
}

.hero__content {
    max-width: var(--max-w);
    margin: 0 auto;
}

.hero__title {
    font-size: 3.5rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

.hero__subtitle {
    font-size: 1.25rem;
    opacity: 0.9;
    max-width: 700px;
    margin-bottom: 2rem;
    line-height: 1.7;
}

.hero__actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

@media (max-width: 640px) {
    .hero { padding: 3rem 1rem; }
    .hero__title { font-size: 2.25rem; }
}

/* === Buttons === */
.btn {
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 2rem;
    border-radius: 9999px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
    border: none;
}

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

.btn--primary:hover {
    background: var(--gray-100);
    color: var(--pink-dark);
    text-decoration: none;
}

.btn--outline {
    border: 2px solid rgba(255,255,255,0.5);
    color: #fff;
    background: rgba(255,255,255,0.1);
}

.btn--outline:hover {
    background: rgba(255,255,255,0.2);
    border-color: #fff;
    text-decoration: none;
    color: #fff;
}

/* Light-surface counterpart of .btn--outline: the outline variant is white on
   purpose (it lives on the gradient heroes) and disappears on a white card. */
.btn--secondary {
    border: 2px solid var(--gray-300);
    color: var(--gray-700);
    background: #fff;
}

.btn--secondary:hover {
    border-color: var(--pink);
    color: var(--pink);
    text-decoration: none;
}

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

.btn--pink:hover {
    background: var(--pink-dark);
    color: #fff;
    text-decoration: none;
}

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

.btn--green:hover {
    background: #15803d;
    color: #fff;
    text-decoration: none;
}

/* === Info Panel === */
.panel {
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
}

.panel h3 {
    margin-bottom: 0.75rem;
    color: var(--pink);
}

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

/* === Section === */
.section {
    margin-bottom: 3rem;
}

.section__title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--pink);
    margin-bottom: 2rem;
}

/* === Ближайший митап (первый экран главной) === */
/* Блок отвечает на вопрос, с которым сюда приходят. Когда впереди ничего
   нет, он же показывает последний прошедший митап — подпись и кнопки
   переключаются через .is-upcoming / .is-completed. */
.next-event .container {
    padding-top: 0.5rem;
    padding-bottom: 1rem;
}

.next-event__box {
    background: linear-gradient(135deg, var(--pink-light) 0%, rgba(124, 58, 237, 0.09) 100%);
    border: 1px solid var(--gray-200);
    border-radius: 1.25rem;
    box-shadow: var(--shadow-lg);
    padding: 1.75rem;
}

.next-event__label {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--pink);
    margin-bottom: 1.25rem;
}

.next-event__inner {
    display: flex;
    gap: 1.75rem;
    align-items: flex-start;
}

.next-event__visual {
    flex: 0 0 15rem;
    align-self: stretch;
    min-height: 12rem;
    background: linear-gradient(135deg, var(--pink) 0%, #ec4899 50%, var(--purple) 100%);
    color: #fff;
    border-radius: 1rem;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.next-event__visual--cover {
    background: #000;
}

/* Обложка — <img> или <picture>, отсюда правила и для вложенного <img>
   (см. templates/partials/cover.html). */
.next-event__cover,
.next-event__cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.next-event__number {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1;
}

.next-event__body {
    flex: 1 1 auto;
    min-width: 0;
}

.next-event__title {
    font-size: 1.875rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 0.875rem;
}

.next-event__title a {
    color: var(--gray-900);
    text-decoration: none;
}

.next-event__title a:hover {
    color: var(--pink);
    text-decoration: none;
}

.next-event__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.5rem;
    color: var(--gray-600);
    font-size: 0.9375rem;
    margin-bottom: 1rem;
}

.next-event__meta-item {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.next-event__desc {
    color: var(--gray-700);
    margin-bottom: 0.875rem;
}

.next-event__speakers {
    color: var(--gray-600);
    font-size: 0.9375rem;
    margin-bottom: 1.5rem;
}

.next-event__speakers-label {
    color: var(--gray-900);
    font-weight: 600;
}

.next-event__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

@media (max-width: 768px) {
    .next-event__box {
        padding: 1.25rem;
    }
    .next-event__inner {
        flex-direction: column;
    }
    .next-event__visual {
        flex: 0 0 auto;
        width: 100%;
        align-self: auto;
        min-height: 10rem;
    }
    .next-event__title {
        font-size: 1.5rem;
    }
}

/* === Event Card === */
.event-card {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    border: 1px solid var(--gray-100);
    transition: box-shadow 0.3s;
    margin-bottom: 2rem;
}

.event-card:hover {
    box-shadow: var(--shadow-xl);
}

@media (min-width: 1024px) {
    .event-card__inner {
        display: flex;
    }
}

.event-card__badge {
    background: linear-gradient(135deg, var(--pink) 0%, #ec4899 50%, var(--purple) 100%);
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
    min-height: 18rem;
    flex-shrink: 0;
}

@media (min-width: 1024px) {
    .event-card__badge {
        width: 24rem;
        min-height: auto;
    }
}

/* Cover image instead of the number badge — for events without a
   sequential MoscowQA number (e.g. community tracks at conferences) */
.event-card__badge--cover {
    padding: 0;
    background: #000;
    min-height: 0;
}

/* The cover is an <img>, or a <picture> when the event ships a separate
   desktop variant (see templates/partials/cover.html) — hence the rules
   repeated for the inner <img>. */
.event-card__cover,
.event-card__cover img {
    width: 100%;
    height: auto;
    display: block;
}

@media (min-width: 1024px) {
    .event-card__cover,
    .event-card__cover img {
        height: 100%;
        object-fit: contain;
    }
}

.event-card__number {
    font-size: 5rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.event-card__label {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-weight: 500;
}

.event-card__body {
    padding: 2rem 2.5rem;
    flex: 1;
}

@media (min-width: 1024px) {
    .event-card__body {
        padding: 3rem;
    }
}

.event-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    color: var(--gray-600);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.event-card__meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.event-card__meta-item svg {
    width: 1.25rem;
    height: 1.25rem;
    color: var(--pink);
    flex-shrink: 0;
}

.event-card__title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--gray-900);
    transition: color 0.2s;
}

.event-card__title a {
    color: var(--gray-900);
    text-decoration: none;
}

.event-card:hover .event-card__title a {
    color: var(--pink);
}

.event-card__desc {
    color: var(--gray-700);
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.event-card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
}

.event-card__tag {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
}

.event-card__tag--talks {
    background: var(--pink-light);
    color: var(--pink);
}

.event-card__tag--upcoming {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: var(--green);
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    box-shadow: var(--shadow-lg);
}

/* === Event Detail Hero === */
.event-hero {
    background: linear-gradient(135deg, var(--pink) 0%, #ec4899 50%, var(--purple) 100%);
    color: #fff;
    padding: 5rem 2rem;
}

.event-hero__inner {
    max-width: var(--max-w);
    margin: 0 auto;
}

.event-hero__top {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.event-hero__number {
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(4px);
    border-radius: 1rem;
    padding: 2rem;
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1;
}

.event-hero__top--cover {
    flex-wrap: nowrap;
    align-items: center;
}

.event-hero__cover {
    width: 22rem;
    max-width: 40%;
    border-radius: 1rem;
    box-shadow: var(--shadow-lg);
    display: block;
    flex-shrink: 0;
}

/* Same as above: with a desktop variant the cover is a <picture>. */
.event-hero__cover img {
    width: 100%;
    display: block;
    border-radius: inherit;
}

@media (max-width: 768px) {
    .event-hero__top--cover {
        flex-wrap: wrap;
    }
    .event-hero__cover {
        width: 100%;
        max-width: 100%;
    }
}

.event-hero__title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #fff;
    margin: 0;
}

.event-hero__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.event-hero__meta-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(4px);
    border-radius: 9999px;
    padding: 0.5rem 1.5rem;
    font-size: 1rem;
}

@media (max-width: 640px) {
    .event-hero { padding: 3rem 1rem; }
    .event-hero__title { font-size: 1.75rem; }
    .event-hero__number { font-size: 2.5rem; padding: 1.5rem; }
}

/* === Info Cards (location, date, registration on event page) === */
.info-grid {
    display: grid;
    gap: 2rem;
    margin-bottom: 3rem;
}

@media (min-width: 768px) {
    .info-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.info-card {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 2rem;
    border: 1px solid var(--gray-100);
    transition: box-shadow 0.2s;
}

.info-card:hover {
    box-shadow: var(--shadow-xl);
}

.info-card--gradient {
    background: linear-gradient(135deg, var(--pink) 0%, var(--purple) 100%);
    color: #fff;
    border: none;
}

.info-card__header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.info-card__icon {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background: var(--pink);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.2rem;
}

.info-card--gradient .info-card__icon {
    background: rgba(255,255,255,0.2);
}

.info-card__title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--gray-800);
}

.info-card--gradient .info-card__title {
    color: #fff;
}

.info-card__text {
    font-size: 1.1rem;
    color: var(--gray-700);
}

.info-card--gradient .info-card__text {
    color: rgba(255,255,255,0.9);
}

/* === Talk Cards (event detail) === */
.talks-grid {
    display: grid;
    gap: 2rem;
}

@media (min-width: 768px) {
    .talks-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.talk-card {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 2rem;
    border: 1px solid var(--gray-100);
    transition: box-shadow 0.2s;
    display: flex;
    flex-direction: column;
}

.talk-card:hover {
    box-shadow: var(--shadow-xl);
}

.talk-card__title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--gray-800);
}

.talk-card__desc {
    color: var(--gray-700);
    line-height: 1.7;
    flex: 1;
    margin-bottom: 1rem;
}

.talk-card__speakers {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: auto;
}

.talk-card__speaker {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.talk-card__speaker-avatar {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: var(--gray-500);
    overflow: hidden;
    flex-shrink: 0;
}

.talk-card__speaker-name {
    font-weight: 500;
    color: var(--gray-900);
}

.talk-card__speaker-name:hover {
    color: var(--pink);
}

.talk-card__speaker-company {
    font-size: 0.875rem;
    color: var(--gray-500);
}

/* Talk links */
.talk-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1rem;
}

.talk-links a {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.875rem;
    color: var(--pink);
    font-weight: 500;
}

.talk-links a:hover {
    color: var(--pink-dark);
}

/* === Speakers Search === */
/* Progressive enhancement: the form is revealed only when
   static/js/speakers-search.js can drive it, so a JS-less visitor still gets
   the complete list instead of a dead input. */
.speakers-search {
    display: none;
    margin-bottom: 1rem;
}

.has-js .speakers-search {
    display: block;
}

.speakers-search__field {
    position: relative;
    max-width: 32rem;
}

.speakers-search__input {
    width: 100%;
    padding: 0.75rem 2.5rem 0.75rem 1rem;
    font: inherit;
    color: var(--gray-800);
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.speakers-search__input::placeholder {
    color: var(--gray-500);
}

.speakers-search__input:focus {
    outline: none;
    border-color: var(--pink);
    box-shadow: 0 0 0 3px var(--pink-light);
}

/* The custom clear button replaces the WebKit one so both engines look alike. */
.speakers-search__input::-webkit-search-cancel-button {
    -webkit-appearance: none;
    appearance: none;
}

.speakers-search__clear {
    position: absolute;
    top: 50%;
    right: 0.5rem;
    transform: translateY(-50%);
    width: 1.75rem;
    height: 1.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    line-height: 1;
    color: var(--gray-500);
    background: none;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
}

.speakers-search__clear:hover {
    color: var(--pink);
    background: var(--pink-light);
}

.speakers-count {
    margin-bottom: 2rem;
}

.speakers-empty {
    color: var(--gray-600);
    margin-bottom: 3rem;
}

/* === Speakers Grid === */
.speakers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.speaker-card {
    border-radius: var(--radius);
    border: 1px solid #e5e7eb52;
    transition: box-shadow 0.2s;
}

.speaker-card:hover {
    box-shadow: var(--shadow-lg);
}

.speaker-card__photo {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 50%
}

.speaker-card__photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.speaker-card__placeholder {
    font-size: 4rem;
    color: var(--gray-300);
}

.speaker-card__info {
    padding: 1rem;
}

.speaker-card__name {
    font-weight: 700;
    font-size: 1.125rem;
    margin-bottom: 0.25rem;
}

.speaker-card__name a {
    color: var(--gray-800);
}

.speaker-card__name a:hover {
    color: var(--pink);
}

.speaker-card__company {
    font-size: 0.875rem;
    color: var(--gray-600);
    margin-bottom: 1rem;
}

/* === Speaker Detail === */
.speaker-detail {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

@media (min-width: 768px) {
    .speaker-detail {
        flex-direction: row;
    }
}

.speaker-detail__photo {
    width: 100%;
    max-width: 250px;
}

@media (min-width: 768px) {
    .speaker-detail__photo {
        flex: 0 0 25%;
    }
}

.speaker-detail__photo-img {
    aspect-ratio: 1;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    background: var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: center;
}

.speaker-detail__photo-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.speaker-detail__info {
    flex: 1;
}

.speaker-detail__name {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--pink);
    margin-bottom: 0.5rem;
}

.speaker-detail__company {
    font-size: 1.25rem;
    color: var(--gray-600);
    margin-bottom: 1.5rem;
}

.speaker-detail__bio {
    color: var(--gray-700);
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.speaker-detail__social {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.speaker-detail__social a {
    color: var(--pink);
    font-weight: 500;
}

.speaker-detail__social a:hover {
    text-decoration: underline;
}

/* Share button */
.speaker-detail__share {
    display: flex;
    align-items: center;
    margin-top: 1rem;
}

.btn--sm {
    padding: 0.5rem 1.25rem;
    font-size: 0.875rem;
}

/* Speaker stats */
.speaker-stats {
    display: flex;
    gap: 2rem;
    margin: 2.5rem 0;
    padding: 1.5rem 2rem;
    background: #fff;
    border-radius: var(--radius);
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow);
}

.speaker-stats__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.speaker-stats__number {
    font-size: 2rem;
    font-weight: 800;
    color: var(--pink);
    line-height: 1;
}

.speaker-stats__label {
    font-size: 0.875rem;
    color: var(--gray-500);
    text-align: center;
}

@media (max-width: 640px) {
    .speaker-stats {
        gap: 1rem;
        padding: 1rem;
    }
    .speaker-stats__number {
        font-size: 1.5rem;
    }
}

/* External talks badge */
.talk-item__event-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.75rem;
    background: var(--purple);
    color: #fff;
    border-radius: 9999px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* Speaker talks list */
.speaker-talks .talk-item {
    background: var(--gray-50);
    padding: 1.5rem;
    border-radius: var(--radius);
    border: 1px solid var(--gray-200);
    margin-bottom: 1.5rem;
    transition: box-shadow 0.2s;
}

.speaker-talks .talk-item:hover {
    box-shadow: var(--shadow-lg);
}

.speaker-talks .talk-item__meta {
    font-size: 0.9rem;
    color: var(--gray-500);
    margin-bottom: 0.5rem;
}

.speaker-talks .talk-item__meta a {
    color: var(--pink);
}

.speaker-talks .talk-item__title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 0.5rem;
}

.speaker-talks .talk-item__desc {
    color: var(--gray-700);
    margin-bottom: 1rem;
}

/* === Footer === */
.footer {
    background: #000;
    color: rgba(255,255,255,0.7);
    padding: 3rem 1rem;
    margin-top: auto;
}

.footer__inner {
    max-width: var(--max-w);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.footer__col {
    flex: 1 1 auto;
}

.footer__col:last-child {
    text-align: right;
}

@media (max-width: 640px) {
    .footer__col:last-child {
        text-align: left;
    }
}

.footer__copyright {
    font-size: 0.875rem;
    color: rgba(255,255,255,0.5);
    margin-bottom: 0.75rem;
}

/* The links wrap onto several rows on narrow screens, so the spacing is a
   grid gap rather than a right margin — wrapped rows keep the same rhythm and
   the last link in a row leaves no dangling margin. */
.footer__links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.5rem;
    font-size: 0.875rem;
}

.footer__links a {
    color: rgba(255,255,255,0.7);
}

.footer__links a:hover {
    color: var(--pink);
}

/* Соседние сообщества сети (site.yml других сайтов, `published: true`). */
.footer__communities {
    margin-top: 0.75rem;
}

.speaker-detail__elsewhere {
    margin-top: 1rem;
    font-size: 0.95rem;
}

.footer__social {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
}

@media (max-width: 640px) {
    .footer__social {
        justify-content: flex-start;
    }
}

.footer__social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.7);
    font-size: 1.1rem;
    transition: all 0.2s;
}

.footer__social a:hover {
    background: var(--pink);
    color: #fff;
}

.footer__social svg {
    width: 1.35rem;
    height: 1.35rem;
    display: block;
}

/* === Tags === */
.tag {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.tag--completed {
    background: var(--gray-200);
    color: var(--gray-600);
}

.tag--upcoming {
    background: var(--green-light);
    color: var(--green);
}

.tag--online {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.tag--offline {
    background: rgba(124, 58, 237, 0.1);
    color: var(--purple);
}

/* Topic tags (см. templates/tag.html, tags.html): chips under a talk and the
   cloud on /tags/. Unlike the status tags above these are links. */
.tag--topic {
    background: var(--pink-light);
    color: var(--pink);
    text-transform: none;
    letter-spacing: 0;
}

.tag--topic:hover {
    background: var(--pink);
    color: #fff;
    text-decoration: none;
}

/* Same chip on the gradient hero of a talk page. */
.tag--topic-invert {
    background: rgba(255,255,255,0.18);
    color: #fff;
    text-transform: none;
    letter-spacing: 0;
}

.tag--topic-invert:hover {
    background: rgba(255,255,255,0.32);
    color: #fff;
    text-decoration: none;
}

.topic-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.75rem;
}

.topic-tags--hero {
    margin-top: 1rem;
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin: 2rem 0;
}

.tag-cloud__item {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    border-radius: 9999px;
    background: #fff;
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow);
    color: var(--gray-800);
    font-weight: 600;
}

.tag-cloud__item:hover {
    border-color: var(--pink);
    color: var(--pink);
    text-decoration: none;
}

.tag-cloud__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.5rem;
    height: 1.5rem;
    padding: 0 0.4rem;
    border-radius: 9999px;
    background: var(--pink-light);
    color: var(--pink);
    font-size: 0.8rem;
}

/* Event + date line on a tag page, where a talk is out of its meetup's context. */
.talk-card__meta {
    margin: 0 0 0.75rem;
    font-size: 0.9rem;
    color: var(--gray-500);
}

.talk-card__meta-sep {
    margin: 0 0.4rem;
}

/* === Page content (from markdown) === */
.md-content h2 {
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.md-content ul, .md-content ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
    list-style-position: outside;
}

.md-content li {
    margin-bottom: 0.25rem;
}

.md-content blockquote {
    border-left: 3px solid var(--pink);
    padding-left: 1rem;
    margin: 1.5rem 0;
    color: var(--gray-600);
}

/* === Utility === */
.text-muted { color: var(--gray-500); }
.text-pink { color: var(--pink); }
.text-gray-600 { color: var(--gray-600); }
.mb-0 { margin-bottom: 0; }
.back-link { display: inline-block; margin-top: 2rem; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* SVG icons inline */
.icon {
    display: inline-block;
    width: 1.25rem;
    height: 1.25rem;
    vertical-align: middle;
    flex-shrink: 0;
}

/* === Talk Page Styles === */
.breadcrumb {
    background: var(--gray-50);
    padding: 1rem 0;
    font-size: 0.875rem;
}

.breadcrumb a {
    color: var(--pink);
    text-decoration: none;
}

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

.breadcrumb__separator {
    margin: 0 0.5rem;
    color: var(--gray-500);
}

.talk-hero {
    background: linear-gradient(135deg, var(--pink) 0%, var(--purple) 100%);
    padding: 3rem 0;
    color: white;
}

.talk-hero__inner {
    max-width: var(--max-w);
    width: 100%;
    margin: 0 auto;
    padding: 0 1rem;
}

.talk-hero__tag {
    display: inline-block;
    background: rgba(255,255,255,0.2);
    padding: 0.375rem 0.875rem;
    border-radius: 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.talk-hero__title {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin: 0;
    color: white;
}

@media (max-width: 768px) {
    .talk-hero__title {
        font-size: 1.75rem;
    }
}

.talk-card:hover a,
.talk-item__title:hover a {
    color: var(--pink);
}

/* === Social Buttons === */
.speaker-detail__social {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

.social-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.9375rem;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,.1);
    color: white !important;
}

.social-btn__icon {
    width: 1.25rem;
    height: 1.25rem;
    flex-shrink: 0;
}

.social-btn--telegram {
    background: #0088cc;
}

.social-btn--telegram:hover {
    background: #006699;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,136,204,.3);
}

.social-btn--github {
    background: #24292e;
}

.social-btn--github:hover {
    background: #1a1e22;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(36,41,46,.3);
}

.social-btn--twitter {
    background: #1da1f2;
}

.social-btn--twitter:hover {
    background: #0d8bd9;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(29,161,242,.3);
}

.social-btn--other {
    background: var(--gray-700);
}

.social-btn--other:hover {
    background: var(--gray-800);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(55,65,81,.3);
}

@media (max-width: 640px) {
    .speaker-detail__social {
        flex-direction: column;
    }

    .social-btn {
        justify-content: center;
    }
}

/* === Статус события === */
/* Проставляется на сборке (build.py) и поправляется на дату посетителя
   в static/js/events-status.js. */
.is-upcoming .js-completed-only { display: none !important; }
.is-completed .js-upcoming-only { display: none !important; }

/* === Timepad widget === */
/* Placeholder rendered by templates/partials/timepad.html; the embed code is
   injected by static/js/timepad-widget.js once the block scrolls into view. */
.timepad-widget__box {
    background: #fff;
    border: 1px solid var(--gray-100);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 1.25rem;
}

.timepad-widget__mount iframe {
    display: block;
    width: 100%;
    border: 0;
}

.timepad-widget__fallback {
    margin: 0;
    padding: 1rem 0;
    text-align: center;
    color: var(--gray-600);
    font-size: 0.95rem;
}

/* Once the widget has rendered, its own UI replaces the fallback line. */
.timepad-widget--ready .timepad-widget__fallback {
    display: none;
}

/* Popup widgets have no in-page UI: the embed code only needs a place to
   live, and the form opens over the page from the registration button. The
   holder is left unstyled on purpose — an empty container already takes no
   space, and clipping it could hide the popup if Timepad ever attaches the
   overlay next to the embed code instead of to <body>. */

/* Пока попап Timepad открыт, страница под ним стоит: иначе колесо мыши
   прокручивает фон, а попап остаётся на месте открытия и уходит за край
   экрана. Класс ставит и снимает static/js/timepad-widget.js — он же
   компенсирует ширину исчезнувшей полосы прокрутки. */
.timepad-popup-open {
    overflow: hidden;
}

@media (max-width: 640px) {
    .timepad-widget__box {
        padding: 0.75rem;
    }
}

/* === 404 === */
/* GitHub Pages serves dist/404.html for any unknown path (see templates/404.html). */
.error-page__code {
    font-size: 5rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--pink), var(--purple));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.error-page__links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
}

/* === "В календарь" (см. templates/event.html) === */
.calendar-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}
