:root {
  color-scheme: dark;
  --bg: #0b0f14;
  --surface: #131923;
  --surface-2: #1a2230;
  --text: #ecf2ff;
  --muted: #a9b4ca;
  --accent: #6fa8ff;
  --border: #2a3345;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: radial-gradient(circle at top, #152133, var(--bg) 45%);
  color: var(--text);
  line-height: 1.6;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.15s;
}

a:hover {
  text-decoration: underline;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

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

/* Layout */

.container {
  width: min(1080px, 92vw);
  margin: 0 auto;
}

/* Header */

.topbar {
  position: sticky;
  top: 0;
  backdrop-filter: blur(10px);
  background: rgba(11, 15, 20, 0.75);
  border-bottom: 1px solid var(--border);
  z-index: 10;
}

.topbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
}

.brand {
  font-weight: 700;
  color: var(--text);
}

.brand:hover {
  text-decoration: none;
  color: var(--accent);
}

.nav {
  display: flex;
  gap: 1rem;
}

.nav a {
  color: var(--muted);
  font-size: 0.95rem;
}

.nav a:hover {
  color: var(--text);
}

/* Main content */

.main {
  padding: 3rem 0 4rem;
}

/* Hero */

.hero {
  padding: 2rem;
  background: linear-gradient(160deg, rgba(111, 168, 255, 0.12), rgba(111, 168, 255, 0));
  border: 1px solid var(--border);
  border-radius: 18px;
}

.eyebrow {
  margin: 0;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
}

h1 {
  margin: 0.5rem 0 1rem;
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  line-height: 1.2;
}

.lead {
  margin: 0;
  color: var(--muted);
  max-width: 65ch;
}

.hero-actions {
  margin-top: 1.5rem;
  display: flex;
  gap: 0.8rem;
}

/* About list */

.about-list {
  margin: 0.8rem 0 0;
  padding-left: 1.2rem;
  color: var(--muted);
}

.about-list li {
  margin-bottom: 0.4rem;
}

/* Buttons */

.button {
  display: inline-block;
  background: var(--accent);
  color: #0b1020;
  font-weight: 600;
  padding: 0.65rem 1rem;
  border-radius: 10px;
  transition: filter 0.15s, background 0.15s;
}

.button-secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.button-secondary:hover {
  background: var(--surface-2);
}

.button:hover {
  text-decoration: none;
  filter: brightness(1.08);
}

.button-small {
  font-size: 0.85rem;
  padding: 0.4rem 0.75rem;
}

/* Sections */

.section {
  margin-top: 2.2rem;
  padding: 1.2rem 0;
}

.section h2 {
  margin: 0 0 0.8rem;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
}

.section-note {
  margin: 0 0 1.2rem;
  color: var(--muted);
}

.section-actions {
  margin-bottom: 1.2rem;
}

/* Cards */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.2rem;
  transition: border-color 0.15s;
}

.card:hover {
  border-color: #3a4a63;
}

.card h3 {
  margin-top: 0;
  margin-bottom: 0.35rem;
}

.card p {
  margin: 0;
  color: var(--muted);
}

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

.tag {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.75rem;
  padding: 0.2rem 0.5rem;
  color: var(--muted);
}

.card-links {
  margin-top: 0.9rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

/* Speaking summary cards */

.cards-speaking {
  grid-template-columns: 1fr;
}

.card-speaking-summary {
  display: flex;
  gap: 1.2rem;
  align-items: flex-start;
}

.card-thumb {
  width: 140px;
  height: 100px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.card-body {
  flex: 1;
  min-width: 0;
}

.talk-title {
  color: var(--accent);
  font-style: italic;
  margin: 0;
  font-size: 0.9rem;
}

/* Video embed */

.video-wrapper {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.video-wrapper iframe {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
}

/* Contact */

.contact-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 1.2rem;
  flex-wrap: wrap;
}

/* Footer */

.footer {
  border-top: 1px solid var(--border);
  color: var(--muted);
  padding: 1.4rem 0;
  font-size: 0.85rem;
}

/* Breadcrumb */

.breadcrumb {
  margin-bottom: 1.5rem;
}

.breadcrumb a {
  color: var(--muted);
  font-size: 0.9rem;
}

.breadcrumb a:hover {
  color: var(--accent);
}

/* Talk detail page */

.talk-detail h1 {
  margin-bottom: 0.5rem;
}

.talk-title-detail {
  color: var(--accent);
  font-style: italic;
  font-size: 1.15rem;
  margin: 0 0 0.5rem;
}

.talk-meta {
  color: var(--muted);
  margin: 0 0 1rem;
}

.talk-links {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.talk-video {
  margin-bottom: 2rem;
  max-width: 720px;
}

.local-video {
  width: 100%;
  max-height: 400px;
  border-radius: 10px;
  border: 1px solid var(--border);
  object-fit: contain;
  background: #000;
}

/* Talk description sections */

.talk-section {
  margin-bottom: 1.5rem;
}

.talk-section h2 {
  font-size: 1.2rem;
  margin: 0 0 0.5rem;
}

.talk-section p {
  color: var(--muted);
  max-width: 72ch;
  line-height: 1.7;
}

/* Photo gallery */

.talk-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-top: 0.8rem;
}

.gallery-item {
  background: none;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0;
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.15s;
}

.gallery-item img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.gallery-item:hover {
  border-color: var(--accent);
}

/* Talk not found */

.talk-not-found {
  text-align: center;
  padding: 4rem 1rem;
}

.talk-not-found h1 {
  margin-bottom: 0.5rem;
}

.talk-not-found p {
  color: var(--muted);
  margin-bottom: 1.5rem;
}

/* Lightbox */

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.lightbox[hidden] {
  display: none;
}

.lightbox-img {
  max-width: 90vw;
  max-height: 85vh;
  border-radius: 8px;
}

.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1.2rem;
  background: none;
  border: none;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
  line-height: 1;
  transition: opacity 0.15s;
}

.lightbox-close:hover {
  opacity: 0.7;
}

/* Responsive */

@media (max-width: 720px) {
  .nav {
    display: none;
  }

  .hero-actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .card-speaking-summary {
    flex-direction: column;
  }

  .card-thumb {
    width: 100%;
    height: 160px;
  }

  .talk-gallery {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .talk-gallery {
    grid-template-columns: 1fr;
  }
}
