/* ============================================================
   TEDxBeijing Huijia Private School — Styles
   Brand: TED Red #EB0028 · Helvetica / Inter · Letter-spacing 0
   ============================================================ */

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

:root {
  --red: #eb0028;
  --red-dim: #c30021;
  --black: #000;
  --ink: #0a0a0a;
  --bone: #f4f1ea;
  --paper: #ffffff;
  --line: rgba(255, 255, 255, 0.12);
  --line-dark: rgba(0, 0, 0, 0.12);
  --muted: #8a8a8a;
  --max: 1280px;
  --pad: clamp(1.25rem, 4vw, 3rem);
  --font-sans: "Helvetica Neue", Helvetica, "Inter", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font-sans);
  font-weight: 400;
  background: var(--black);
  color: #fff;
  line-height: 1.5;
  letter-spacing: 0; /* per TEDx logo guidelines */
  overflow-x: hidden;
}

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

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s var(--ease), opacity 0.2s var(--ease);
}

button {
  font: inherit;
  background: none;
  border: 0;
  cursor: pointer;
  color: inherit;
}

/* Selection */
::selection {
  background: var(--red);
  color: #fff;
}

/* ---------- Layout helpers ---------- */
.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding-left: var(--pad);
  padding-right: var(--pad);
}

.section {
  padding: clamp(4rem, 9vw, 8rem) 0;
  position: relative;
}

.section--light {
  background: var(--bone);
  color: var(--ink);
}

.section--paper {
  background: var(--paper);
  color: var(--ink);
}

.section--dark {
  background: var(--black);
  color: #fff;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--red);
}

.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--red);
}

h1,
h2,
h3,
h4 {
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.04;
}

.h-display {
  font-size: clamp(3rem, 9vw, 8rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 0.95;
  overflow-wrap: break-word;
}

.h-section {
  font-size: clamp(2rem, 4.5vw, 3.6rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.05;
  overflow-wrap: break-word;
}

.lead {
  font-size: clamp(1.05rem, 1.5vw, 1.25rem);
  color: var(--muted);
  max-width: 60ch;
  line-height: 1.55;
}

.section--light .lead,
.section--paper .lead {
  color: #4a4a4a;
}

/* ---------- TEDx Logo (CSS) ---------- */
/* Per guidelines: "TEDx" red, event name black/white, same height,
   left-aligned to TEDx, letter-spacing 0, Helvetica Regular. */
.tedx-logo {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 0.92;
  letter-spacing: 0;
  font-weight: 700;
  font-family: var(--font-sans);
  user-select: none;
}

.tedx-logo__mark {
  font-size: var(--logo-size, 1.9rem);
  letter-spacing: -0.02em;
  font-weight: 700;
}

.tedx-logo__mark .x {
  color: var(--red);
}

.tedx-logo__mark .ted {
  color: inherit;
}

.tedx-logo__name {
  font-size: var(--logo-size, 1.9rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-top: 0.05em;
}

.tedx-logo--lg {
  --logo-size: clamp(2.5rem, 5vw, 4.5rem);
}

/* ---------- Top Navigation ---------- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: max(1.1rem, env(safe-area-inset-top, 0px)) max(var(--pad), env(safe-area-inset-right, 0px))
    1.1rem max(var(--pad), env(safe-area-inset-left, 0px));
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--line);
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease);
}

.nav.is-light {
  background: rgba(255, 255, 255, 0.78);
  border-bottom-color: var(--line-dark);
  color: var(--ink);
}

.nav__brand {
  flex-shrink: 0;
}

.nav__brand .tedx-logo {
  --logo-size: 1.15rem;
}

.nav__links {
  display: flex;
  gap: 1.8rem;
  list-style: none;
  align-items: center;
}

.nav__links a {
  position: relative;
  font-size: 0.84rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 0.4rem 0;
  opacity: 0.78;
}

.nav__links a:hover {
  opacity: 1;
}

.nav__links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  height: 2px;
  width: 0;
  background: var(--red);
  transition: width 0.3s var(--ease);
}

.nav__links a:hover::after,
.nav__links a[aria-current="page"]::after {
  width: 100%;
}

.nav__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1rem;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.nav__cta:hover {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}

.nav__toggle {
  display: none;
  width: 32px;
  height: 32px;
  position: relative;
}

.nav__toggle span {
  position: absolute;
  left: 4px;
  right: 4px;
  height: 2px;
  background: currentColor;
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease), top 0.3s var(--ease);
}

.nav__toggle span:nth-child(1) { top: 10px; }
.nav__toggle span:nth-child(2) { top: 16px; }
.nav__toggle span:nth-child(3) { top: 22px; }

.nav.is-open .nav__toggle span:nth-child(1) {
  top: 16px;
  transform: rotate(45deg);
}
.nav.is-open .nav__toggle span:nth-child(2) {
  opacity: 0;
}
.nav.is-open .nav__toggle span:nth-child(3) {
  top: 16px;
  transform: rotate(-45deg);
}

@media (max-width: 880px) {
  .nav__toggle {
    display: block;
    flex-shrink: 0;
    margin-left: auto;
  }

  .nav {
    flex-wrap: wrap;
    align-items: center;
    row-gap: 0;
    padding-top: max(1.1rem, env(safe-area-inset-top, 0px));
    padding-bottom: 1.1rem;
    padding-left: max(var(--pad), env(safe-area-inset-left, 0px));
    padding-right: max(var(--pad), env(safe-area-inset-right, 0px));
  }

  .nav > nav {
    order: 3;
    flex: 1 1 100%;
    width: 100%;
    min-width: 0;
  }

  .nav__links {
    position: static;
    inset: auto;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    width: 100%;
    max-height: 0;
    overflow: hidden;
    padding: 0;
    margin: 0;
    opacity: 0;
    border: 0;
    background: transparent;
    transform: none;
    transition: max-height 0.45s var(--ease), opacity 0.28s var(--ease),
      padding 0.32s var(--ease), margin 0.32s var(--ease),
      border-color 0.25s var(--ease);
  }

  .nav:not(.is-open) .nav__links {
    pointer-events: none;
  }

  .nav.is-open .nav__links {
    max-height: min(78vh, 560px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    opacity: 1;
    margin-top: 0.75rem;
    padding: 0.4rem 0 max(1rem, env(safe-area-inset-bottom, 0px));
    border-top: 1px solid var(--line);
    background: rgba(0, 0, 0, 0.94);
    color: #fff;
    border-radius: 0 0 12px 12px;
  }

  .nav.is-light.is-open .nav__links {
    background: rgba(255, 255, 255, 0.98);
    color: var(--ink);
    border-top-color: var(--line-dark);
  }

  .nav__links a {
    width: 100%;
    padding: 0.85rem 0;
    font-size: 1.05rem;
    border-bottom: 1px solid var(--line);
  }

  .nav.is-light .nav__links a {
    border-bottom-color: var(--line-dark);
  }

  .nav.is-light .nav__links a::after {
    background: var(--red);
  }

  .nav__links a.nav__cta::after {
    display: none;
  }

  .nav__links a.nav__cta {
    margin-top: 0.35rem;
    align-self: stretch;
    justify-content: center;
    text-align: center;
    border-bottom: 0;
    padding: 0.75rem 1rem;
    opacity: 1;
  }
}

@media (max-width: 520px) {
  .nav__brand {
    flex: 1 1 auto;
    min-width: 0;
    max-width: calc(100% - 44px);
    padding-right: 0.25rem;
  }

  .nav__brand .tedx-logo {
    --logo-size: 0.78rem;
  }

  .nav__toggle {
    align-self: center;
  }

  .nav.is-open .nav__links {
    max-height: min(85dvh, 640px);
    margin-top: 0.5rem;
    padding-top: 0.25rem;
    border-radius: 0 0 10px 10px;
  }

  .nav__links a {
    font-size: 0.98rem;
    padding: 0.72rem 0;
  }
}

/* ---------- HERO ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 8rem var(--pad) 3rem;
  overflow: hidden;
  background: radial-gradient(
      120% 80% at 70% 20%,
      rgba(235, 0, 40, 0.18) 0%,
      rgba(235, 0, 40, 0) 60%
    ),
    linear-gradient(180deg, #050505 0%, #000 100%);
}

.hero__grid {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(
      to right,
      rgba(255, 255, 255, 0.04) 1px,
      transparent 1px
    ),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(ellipse at center, #000 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse at center, #000 30%, transparent 80%);
  pointer-events: none;
}

.hero__noise {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.35;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='0.5'/></svg>");
}

.hero__meta {
  position: relative;
  display: flex;
  gap: 2rem;
  align-items: center;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 2rem;
}

.hero__meta span:not(:last-child)::after {
  content: "/";
  margin-left: 2rem;
  color: var(--red);
}

.hero__title {
  position: relative;
  font-size: clamp(3rem, 11vw, 10rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 0.92;
}

.hero__title .line {
  display: block;
  overflow: hidden;
}

.hero__title .word {
  display: inline-block;
  transform: translateY(110%);
  animation: heroRise 1s var(--ease) forwards;
}

.hero__title .word.delay-1 { animation-delay: 0.1s; }
.hero__title .word.delay-2 { animation-delay: 0.25s; }
.hero__title .word.delay-3 { animation-delay: 0.4s; }
.hero__title .word.delay-4 { animation-delay: 0.55s; }

.hero__title .accent {
  color: var(--red);
  font-style: italic;
  font-weight: 700;
}

@keyframes heroRise {
  to { transform: translateY(0); }
}

.hero__subtitle {
  position: relative;
  margin-top: 2rem;
  font-size: clamp(1rem, 1.6vw, 1.4rem);
  font-weight: 400;
  color: rgba(255, 255, 255, 0.78);
  max-width: 50ch;
  opacity: 0;
  transform: translateY(30px);
  animation: heroRise 1s var(--ease) 0.8s forwards;
}

.hero__cta {
  position: relative;
  margin-top: 3rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  opacity: 0;
  transform: translateY(20px);
  animation: heroRise 1s var(--ease) 1s forwards;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.95rem 1.6rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid currentColor;
  transition: transform 0.25s var(--ease), background 0.25s var(--ease),
    color 0.25s var(--ease), border-color 0.25s var(--ease);
}

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

.btn--red {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}
.btn--red:hover { background: var(--red-dim); border-color: var(--red-dim); }

.btn--ghost { color: #fff; }
.btn--ghost:hover { background: #fff; color: var(--ink); }

.btn--ink { color: var(--ink); border-color: var(--ink); }
.btn--ink:hover { background: var(--ink); color: var(--bone); }

/* Scroll cue */
.hero__scroll {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.72rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
}

.hero__scroll::after {
  content: "";
  width: 1px;
  height: 40px;
  background: linear-gradient(180deg, var(--red), transparent);
  animation: scrollCue 1.8s ease-in-out infinite;
}

@keyframes scrollCue {
  0% { transform: scaleY(0); transform-origin: top; }
  50% { transform: scaleY(1); transform-origin: top; }
  51% { transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* ---------- Marquee (theme question) ---------- */
.marquee {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--black);
  color: #fff;
  overflow: hidden;
  padding: 1.4rem 0;
}

.marquee__track {
  display: flex;
  gap: 3rem;
  white-space: nowrap;
  animation: marquee 32s linear infinite;
  font-size: clamp(1.4rem, 3vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.01em;
}

.marquee__track span { display: inline-flex; align-items: center; gap: 3rem; }
.marquee__track span::after { content: "·"; color: var(--red); }

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---------- Theme block ---------- */
.theme {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
}

.theme__title {
  font-size: clamp(2.5rem, 6vw, 5rem);
  letter-spacing: -0.03em;
  line-height: 1;
}

.theme__title .em { color: var(--red); font-style: italic; }

.theme__body p {
  font-size: clamp(1.05rem, 1.4vw, 1.2rem);
  line-height: 1.7;
  margin-bottom: 1.2rem;
}

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

@media (max-width: 880px) {
  .theme { grid-template-columns: 1fr; }
}

/* ---------- Homepage event countdown ---------- */
.event-countdown {
  margin-top: 4rem;
  padding: 2.5rem;
  background: var(--ink);
  color: #fff;
  border-radius: 8px;
  display: grid;
  grid-template-columns: 2fr repeat(4, 1fr);
  gap: 1.5rem;
  align-items: center;
}

.event-countdown__label {
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--red);
  font-weight: 700;
}

@media (max-width: 640px) {
  .event-countdown {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem 1rem;
    padding: 1.5rem 1.25rem;
  }

  .event-countdown__label {
    grid-column: 1 / -1;
    margin-bottom: 0.25rem;
  }
}

@media (max-width: 380px) {
  .event-countdown {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.65rem 0.25rem;
    padding: 1.15rem 0.85rem;
  }

  .event-countdown__label {
    letter-spacing: 0.14em;
    font-size: 0.65rem;
  }

  .event-countdown [data-d],
  .event-countdown [data-h],
  .event-countdown [data-m],
  .event-countdown [data-s] {
    font-size: clamp(1.35rem, 7vw, 2rem) !important;
  }
}

/* Homepage — event meta grid */
.home-event-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 2rem 3rem;
  border-top: 1px solid var(--line-dark);
  padding-top: 2.5rem;
}

@media (max-width: 520px) {
  .home-event-grid {
    grid-template-columns: 1fr;
    gap: 1.35rem;
    padding-top: 1.75rem;
  }
}

/* ---------- About TEDx (homepage required block) ---------- */
.about-tedx {
  display: grid;
  grid-template-columns: minmax(0, 0.5fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
}

.about-tedx__title {
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: -0.025em;
}

.about-tedx__title .x { color: var(--red); font-style: italic; }

.about-tedx p {
  font-size: 1.02rem;
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.78);
}

.about-tedx a {
  color: var(--red);
  border-bottom: 1px solid var(--red);
  padding-bottom: 1px;
}

.about-tedx a:hover { color: #fff; background: var(--red); }

@media (max-width: 880px) {
  .about-tedx { grid-template-columns: 1fr; }
}

/* ---------- Speakers ---------- */
.speakers__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
  margin-bottom: 3.5rem;
}

.speakers__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1px;
  background: var(--line-dark);
  border: 1px solid var(--line-dark);
}

.section--dark .speakers__grid {
  background: var(--line);
  border-color: var(--line);
}

.speaker {
  position: relative;
  padding: 2.2rem 1.8rem;
  background: var(--bone);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-height: 320px;
  transition: background 0.3s var(--ease), color 0.3s var(--ease);
  overflow: hidden;
  cursor: pointer;
}

.section--dark .speaker { background: var(--ink); color: #fff; }

.speaker__name {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.05;
}

.speaker__role {
  font-size: 0.88rem;
  color: var(--muted);
  font-weight: 500;
}

.section--dark .speaker__role { color: rgba(255, 255, 255, 0.55); }

.speaker__topic {
  margin-top: auto;
  font-size: 1.05rem;
  font-weight: 500;
  line-height: 1.4;
}

.speaker__arrow {
  position: absolute;
  bottom: 1.4rem;
  right: 1.4rem;
  width: 36px;
  height: 36px;
  border: 1px solid currentColor;
  border-radius: 999px;
  display: grid;
  place-items: center;
  opacity: 0.5;
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease),
    background 0.3s var(--ease), color 0.3s var(--ease);
}

.speaker__arrow svg { width: 14px; height: 14px; }

.speaker:hover {
  background: var(--red);
  color: #fff;
}

.speaker:hover .speaker__role { color: rgba(255, 255, 255, 0.85); }

.speaker:hover .speaker__arrow {
  background: #fff;
  color: var(--red);
  border-color: #fff;
  opacity: 1;
  transform: rotate(-45deg);
}

/* ---------- Schedule ---------- */
.schedule__list {
  display: flex;
  flex-direction: column;
}

.schedule__item {
  display: grid;
  grid-template-columns: 110px 1fr auto;
  gap: 2rem;
  align-items: center;
  padding: 1.6rem 0;
  border-top: 1px solid var(--line-dark);
  transition: padding-left 0.3s var(--ease);
}

.section--dark .schedule__item { border-top-color: var(--line); }

.schedule__item:last-child { border-bottom: 1px solid var(--line-dark); }

.section--dark .schedule__item:last-child { border-bottom-color: var(--line); }

.schedule__item:hover { padding-left: 1rem; }

.schedule__time {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.01em;
}

.schedule__title {
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.schedule__sub {
  font-size: 0.88rem;
  color: var(--muted);
  margin-top: 0.2rem;
}

.section--dark .schedule__sub { color: rgba(255, 255, 255, 0.55); }

.schedule__tag {
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  border: 1px solid currentColor;
  opacity: 0.7;
}

.schedule__item--talk .schedule__tag { color: var(--red); border-color: var(--red); opacity: 1; }

@media (max-width: 720px) {
  .schedule__item { grid-template-columns: 1fr; gap: 0.4rem; }
  .schedule__tag { justify-self: start; }
}

/* ---------- Reveal animations ---------- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}

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

.reveal.delay-1 { transition-delay: 0.1s; }
.reveal.delay-2 { transition-delay: 0.2s; }
.reveal.delay-3 { transition-delay: 0.3s; }
.reveal.delay-4 { transition-delay: 0.4s; }
.reveal.delay-5 { transition-delay: 0.5s; }

/* ---------- Generic page header ---------- */
.page-header {
  padding: 10rem var(--pad) 4rem;
  background: radial-gradient(
      120% 80% at 30% 20%,
      rgba(235, 0, 40, 0.16) 0%,
      transparent 60%
    ),
    linear-gradient(180deg, #050505, #000);
  border-bottom: 1px solid var(--line);
}

.page-header h1 {
  font-size: clamp(2.5rem, 7vw, 6rem);
  letter-spacing: -0.035em;
  line-height: 0.95;
}

.page-header h1 .em { color: var(--red); font-style: italic; }

.page-header p {
  margin-top: 1.4rem;
  font-size: clamp(1rem, 1.4vw, 1.2rem);
  color: rgba(255, 255, 255, 0.7);
  max-width: 60ch;
}

.page-header p.page-header__note {
  margin-top: 1rem;
  max-width: 40ch;
  font-size: clamp(0.8rem, 2.2vw, 0.92rem);
  font-weight: 400;
  letter-spacing: 0.03em;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.52);
}

/* ---------- About page ---------- */
.prose h2 {
  font-size: clamp(1.6rem, 2.6vw, 2.2rem);
  margin-top: 3rem;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

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

.prose h2 .em { color: var(--red); font-style: italic; }

.prose p {
  font-size: 1.05rem;
  line-height: 1.8;
  margin-bottom: 1.2rem;
  color: #2a2a2a;
}

.section--dark .prose p { color: rgba(255, 255, 255, 0.8); }

.prose a {
  color: var(--red);
  border-bottom: 1px solid currentColor;
}

.prose a:hover { background: var(--red); color: #fff; }

.two-col {
  display: grid;
  grid-template-columns: minmax(0, 0.4fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 5rem);
}

.two-col__label {
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--red);
  font-weight: 700;
  position: sticky;
  top: 6rem;
  align-self: start;
}

@media (max-width: 880px) {
  .two-col { grid-template-columns: 1fr; }
  .two-col__label { position: static; }
}

/* ---------- Speakers detail ---------- */
.speaker-detail {
  display: grid;
  grid-template-columns: minmax(0, 0.4fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4rem);
  padding: 3rem 0;
  border-top: 1px solid var(--line-dark);
  align-items: start;
  scroll-margin-top: 6.5rem;
}

.section--dark .speaker-detail { border-top-color: var(--line); }

.speaker-detail:first-of-type { border-top: 0; padding-top: 0; }

.speaker-detail__avatar {
  aspect-ratio: 1 / 1;
  background: linear-gradient(135deg, var(--red) 0%, #1a1a1a 100%);
  border-radius: 6px;
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
  color: #fff;
}

/* Fills the square; crops any aspect ratio to center (no manual trim needed). */
.speaker-detail__photo {
  grid-area: 1 / 1;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  object-fit: cover;
  object-position: center center;
}

.speaker-detail__initials {
  grid-area: 1 / 1;
  font-size: clamp(3rem, 7vw, 6rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  mix-blend-mode: screen;
  opacity: 0.95;
}

.speaker-detail__num {
  position: absolute;
  top: 1rem;
  left: 1rem;
  z-index: 1;
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  color: rgba(255, 255, 255, 0.7);
}

.speaker-detail__title {
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 0.8rem;
}

.speaker-detail__role {
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--red);
  font-weight: 600;
  margin-bottom: 1.4rem;
}

.speaker-detail__talk {
  display: inline-flex;
  align-items: baseline;
  gap: 0.6rem;
  margin-top: 1.5rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--line-dark);
  font-size: 1.1rem;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.section--dark .speaker-detail__talk { border-top-color: var(--line); }

.speaker-detail__talk::before {
  content: "演讲";
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  font-weight: 700;
  color: var(--red);
  background: rgba(235, 0, 40, 0.12);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
}

@media (max-width: 720px) {
  .speaker-detail { grid-template-columns: 1fr; }
}

/* ---------- Footer ---------- */
.footer {
  background: var(--black);
  color: #fff;
  padding: 5rem var(--pad) 2.5rem;
  border-top: 1px solid var(--line);
}

.footer__grid {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 3rem;
  margin-bottom: 4rem;
}

@media (max-width: 880px) {
  .footer__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 540px) {
  .footer__grid { grid-template-columns: 1fr; }
}

.footer__brand .tedx-logo { --logo-size: 1.5rem; }

.footer__brand p {
  margin-top: 1rem;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.92rem;
  max-width: 32ch;
}

.footer__heading {
  font-size: 0.74rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--red);
  font-weight: 700;
  margin-bottom: 1rem;
}

.footer ul { list-style: none; }
.footer li { margin-bottom: 0.6rem; font-size: 0.92rem; }
.footer a { color: rgba(255, 255, 255, 0.7); }
.footer a:hover { color: #fff; }

.footer__bottom {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.55);
}

.footer__license {
  /* Required by TEDx guidelines: footer must include this exact text */
  font-weight: 500;
  color: rgba(255, 255, 255, 0.75);
}

.footer__license-cn {
  font-size: 0.82rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.62);
  margin-top: 0.4rem;
  letter-spacing: 0.02em;
  line-height: 1.45;
}

.footer__license-wrap {
  flex: 1;
  min-width: min(100%, 36rem);
}

.footer__copyright {
  margin: 0;
  flex-shrink: 0;
}

/* ---------- Decorative numbers ---------- */
.bg-figure {
  position: absolute;
  font-size: clamp(20rem, 50vw, 60rem);
  font-weight: 700;
  color: rgba(235, 0, 40, 0.04);
  letter-spacing: -0.05em;
  line-height: 0.8;
  pointer-events: none;
  user-select: none;
  z-index: 0;
}

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

/* ---------- Small phones: homepage + global rhythm ---------- */
@media (max-width: 480px) {
  :root {
    --pad: max(0.85rem, min(4vw, 1.1rem));
  }

  .section {
    padding: clamp(2.6rem, 9vw, 3.75rem) 0;
  }

  .hero {
    min-height: 100vh;
    min-height: 100dvh;
    padding: clamp(5.25rem, 20vw, 6.5rem) var(--pad) 2rem;
  }

  .hero__meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
    margin-bottom: 1.35rem;
    font-size: 0.65rem;
    letter-spacing: 0.12em;
    line-height: 1.45;
  }

  .hero__meta span:not(:last-child)::after {
    content: none;
  }

  .hero__title {
    font-size: clamp(2.35rem, 14vw, 3.6rem);
    line-height: 0.98;
  }

  .hero__subtitle {
    margin-top: 1.35rem;
    max-width: none;
    font-size: clamp(0.95rem, 4.2vw, 1.12rem);
  }

  .hero__cta {
    margin-top: 1.75rem;
    flex-direction: column;
    align-items: stretch;
    gap: 0.65rem;
  }

  .hero__cta .btn {
    justify-content: center;
    width: 100%;
    padding: 0.85rem 1.1rem;
    font-size: 0.78rem;
  }

  .marquee {
    padding: 1rem 0;
  }

  .marquee__track {
    gap: 1.75rem;
    font-size: clamp(1.05rem, 4.5vw, 1.45rem);
  }

  .marquee__track span {
    gap: 1.75rem;
  }

  .theme__title {
    font-size: clamp(2rem, 10vw, 2.75rem);
  }

  .about-tedx__title {
    font-size: clamp(1.55rem, 7vw, 2.1rem);
  }

  .speakers__head {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }

  .speakers__head .btn {
    width: 100%;
    justify-content: center;
  }

  .speaker {
    min-height: 0;
    padding: 1.75rem 1.35rem;
  }

  .speaker__name {
    font-size: clamp(1.35rem, 5vw, 1.5rem);
  }

  .page-header {
    padding: clamp(5.5rem, 18vw, 8rem) var(--pad) 2.75rem;
  }

  .page-header h1 {
    font-size: clamp(1.85rem, 8vw, 2.6rem);
  }

  .page-header p {
    max-width: none;
  }

  .footer__brand .tedx-logo {
    --logo-size: 1.05rem;
  }

  .eyebrow {
    letter-spacing: 0.12em;
    font-size: 0.68rem;
  }

  .eyebrow::before {
    width: 22px;
  }
}

/* ---------- Reduce motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .marquee__track { animation: none; }
}
