/* ==========================================================================
   Brian Vermeer - Personal Website
   Dark & Bold Design System
   ========================================================================== */

/* ---------- 1. Custom Properties ------------------------------------------ */
:root {
  /* Colors */
  --bg-primary: #09090b;
  --bg-surface: #131316;
  --bg-surface-hover: #1c1c21;
  --bg-elevated: #2a2a30;

  --text-primary: #f5f5f5;
  --text-secondary: #a0a0ab;
  --text-muted: #6b6b73;

  /* Oranje - the Dutch wink */
  --orange:        #FF6600;       /* KLM / Royal House orange     */
  --red:           #C8102E;       /* Dutch red (flag & royal)     */
  --white:         #FFFFFF;       /* The white stripe             */
  --blue:          #214586;       /* Dutch deep blue (flag)       */
  --blue-light:    #3A5BA0;

  --accent-start: var(--orange);
  --gradient-primary: linear-gradient(135deg, var(--orange), var(--red));

  --border-subtle: #2a2a30;
  --border-hover: rgba(255, 102, 0, 0.40);   /* orange glow on hover */

  /* Spacing */
  --content-max: min(90vw, 1100px);
  --nav-height: 64px;
  --section-gap: 100px;

  /* Typography Scale (base ratio 1.25) */
  --fs-xs: clamp(0.7rem, 0.75rem, 0.75rem);
  --fs-sm: clamp(0.8rem, 0.85rem, 0.875rem);
  --fs-base: clamp(1rem, 1.05rem, 1rem);
  --fs-md: clamp(1.1rem, 1.15rem, 1.125rem);
  --fs-lg: clamp(1.3rem, 1.4rem, 1.25rem);
  --fs-xl: clamp(1.6rem, 2rem, 1.75rem);
  --fs-2xl: clamp(2.2rem, 4vw, 3rem);
  --fs-3xl: clamp(3rem, 8vw, 5.5rem);

  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  /* Transitions */
  --ease-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --ease-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --ease-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
ul { list-style: none; }

/* Selection */
::selection {
  background: var(--accent-start);
  color: white;
}

/* Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb {
  background: var(--bg-elevated);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ---------- 3. Typography ------------------------------------------------- */
h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.gradient-text {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-title {
  font-size: var(--fs-xl);
  margin-bottom: 48px;
}

/* ---------- 4. Navigation ------------------------------------------------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-height);
  z-index: 100;
  background: rgba(9, 9, 11, 0.75);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-bottom: 1px solid transparent;
  transition: border-color var(--ease-base), background var(--ease-base);
}

.nav.scrolled {
  border-color: var(--border-subtle);
  background: rgba(9, 9, 11, 0.95);
}

.nav-inner {
  max-width: var(--content-max);
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
}

.nav-logo {
  font-size: var(--fs-lg);
  font-weight: 800;
  letter-spacing: -0.03em;
  transition: opacity var(--ease-fast);
}
.nav-logo:hover { opacity: 0.7; }

.nav-links { display: flex; gap: 32px; align-items: center; }

.nav-link {
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--text-secondary);
  position: relative;
  padding: 4px 0;
  transition: color var(--ease-fast);
}
.nav-link:hover,
.nav-link.active { color: var(--text-primary); }

/* Animated underline */
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0;
  width: 100%; height: 2px;
  background: var(--gradient-primary);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform var(--ease-base);
}
.nav-link:hover::after,
.nav-link.active::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* Mobile menu button */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 24px;
  padding: 0;
}
.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all var(--ease-base);
  transform-origin: center;
}

/* ---------- 5. Page System ------------------------------------------------ */
.page {
  display: none;
  opacity: 0;
  transition: opacity var(--ease-slow) ease;
}
.page.active {
  display: block;
  opacity: 1;
}

.main-content {
  padding-top: var(--nav-height);
}

.page-section {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 80px 24px;
}

/* ---------- 6. Hero Section ----------------------------------------------- */
.hero {
  min-height: calc(100vh - var(--nav-height));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 24px;
  position: relative;
}

/* Background glow effect */
.hero::before {
  content: '';
  position: absolute;
  top: 30%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 400px;
  background: radial-gradient(ellipse, rgba(255, 102, 0, 0.08) 0%, transparent 70%);
  pointer-events: none;
  z-index: -1;
}

.hero-name {
  font-size: var(--fs-3xl);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.04em;
  margin-bottom: 24px;
}
.hero-name .hero-line:last-child {
  display: block;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-badges {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 32px;
}

.badge {
  padding: 6px 18px;
  border-radius: var(--radius-full);
  font-size: var(--fs-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  transition: all var(--ease-base);
}
.badge:hover {
  border-color: var(--accent-start);
  color: var(--accent-start);
}

.hero-desc {
  max-width: 520px;
  font-size: var(--fs-lg);
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 48px;
}

.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; }

.btn {
  padding: 14px 32px;
  border-radius: var(--radius-sm);
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: all var(--ease-base);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* Dutch Oranje glow */
.btn-primary {
  background: var(--gradient-primary);
  color: var(--white);
  box-shadow: 0 4px 24px rgba(255, 102, 0, 0.20);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(255, 102, 0, 0.30);
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
}
.btn-secondary:hover {
  border-color: var(--text-muted);
  transform: translateY(-2px);
}

/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: var(--fs-xs);
  animation: float 3s ease-in-out infinite;
}
.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--accent-start), transparent);
}

/* ---------- 7. Cards & Components ------------------------------------------ */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 32px;
  position: relative;
  overflow: hidden;
  transition: all var(--ease-base);
  cursor: pointer;
}
.card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--gradient-primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--ease-base);
}
.card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(255, 102, 0, 0.06), 0 16px 48px rgba(0, 0, 0, 0.3);
}
.card:hover::before { transform: scaleX(1); }

.card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.card-date {
  font-size: var(--fs-xs);
  color: var(--text-muted);
  font-weight: 500;
}

.card-tag {
  font-size: var(--fs-xs);
  padding: 3px 10px;
  border-radius: var(--radius-full);
  background: rgba(255, 103, 25, 0.1);
  color: var(--accent-start);
  font-weight: 600;
}

.card-title {
  font-size: var(--fs-lg);
  font-weight: 700;
  margin-bottom: 12px;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.card-excerpt {
  font-size: var(--fs-sm);
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 24px;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 20px;
  border-top: 1px solid var(--border-subtle);
}

.read-more {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--accent-start);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: gap var(--ease-fast);
}
.card:hover .read-more { gap: 10px; }

/* ---------- Speaking Timeline (single-column, all dates) --------------- */
.year-label {
  font-size: var(--fs-2xl);
  font-weight: 800;
  margin: 64px 0 32px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--border-subtle);
  position: relative;
}
.year-label::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0;
  width: 80px; height: 2px;
  background: var(--gradient-primary);
}

.timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
  padding-left: 4px;
}

/* Vertical timeline line */
.timeline::before {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  left: 0;
  width: 2px;
  background: linear-gradient(to bottom, transparent, var(--border-subtle) 40px, var(--border-subtle) calc(100% - 40px), transparent);
}

.timeline-item {
  position: relative;
  padding: 24px 32px 24px 48px;
  border-left: 2px solid var(--border-subtle);
  background: transparent;
  transition: all var(--ease-base);
}
.timeline-item:hover {
  border-left-color: var(--orange);
  background: var(--bg-surface);
  padding-left: calc(48px + 4px);
}

/* Timeline dot */
.timeline-item::before {
  content: '';
  position: absolute;
  top: 30px; left: -7px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--bg-primary);
  border: 2px solid var(--border-subtle);
  transition: all var(--ease-base);
}
.timeline-item:hover::before {
  border-color: var(--orange);
  background: var(--orange);
  box-shadow: 0 0 0 4px rgba(255, 102, 0, 0.15);
}

/* Talk header row */
.talk-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

/* Timeline item with a video thumbnail: text left, thumbnail right */
.talk-row.has-video {
  display: flex;
  align-items: flex-start;
  gap: 24px;
}
.talk-text { flex: 1; min-width: 0; }

.talk-thumb {
  position: relative;
  flex: 0 0 240px;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  transition: transform var(--ease-base), border-color var(--ease-base), box-shadow var(--ease-base);
}
.talk-thumb img {
  display: block;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform var(--ease-base);
}
.talk-thumb-play {
  position: absolute;
  right: 10px; bottom: 10px;
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  font-size: var(--fs-xs);
  padding-left: 2px;
  transition: background var(--ease-fast), transform var(--ease-fast);
}
.talk-thumb:hover {
  border-color: var(--orange);
  box-shadow: 0 0 0 4px rgba(255, 102, 0, 0.15);
}
.talk-thumb:hover img { transform: scale(1.05); }
.talk-thumb:hover .talk-thumb-play { background: var(--orange); transform: scale(1.1); }

@media (max-width: 768px) {
  .talk-row.has-video { flex-direction: column-reverse; gap: 16px; }
  .talk-thumb { flex: none; width: 100%; max-width: 360px; }
}
@media (max-width: 480px) {
  .talk-thumb { max-width: none; }
}

/* Date + type row */
.talk-date {
  font-size: var(--fs-sm);
  color: var(--text-muted);
  font-weight: 500;
}

.talk-type {
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: var(--fs-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.talk-type.talk { background: rgba(255, 102, 0, 0.12); color: var(--orange); }
.talk-type.keynote { background: rgba(200, 16, 46, 0.12); color: #C8102E; }
.talk-type.workshop { background: rgba(33, 69, 134, 0.12); color: var(--blue-light); }
.talk-type.panel { background: rgba(160, 160, 171, 0.12); color: var(--text-secondary); }
.talk-type.video-type { display: inline-block; margin-right: 8px; vertical-align: 1px; background: rgba(160, 160, 171, 0.12); color: var(--text-secondary); }
.talk-type.lab { background: rgba(58, 91, 160, 0.12); color: var(--blue-light); }

/* Conference / event name, shown above the title */
.talk-event {
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--orange);
  letter-spacing: 0.02em;
  margin-bottom: 4px;
  line-height: 1.35;
}

/* Talk title + meta */
.talk-title {
  font-size: var(--fs-base);
  font-weight: 600;
  margin-bottom: 8px;
  line-height: 1.45;
  letter-spacing: -0.01em;
}

.talk-meta {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  font-size: var(--fs-sm);
}

.talk-location {
  color: var(--text-muted);
}

/* ---------- Video Card -------------------------------------------------- */
.video-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0;
  overflow: hidden;
  transition: all var(--ease-base);
  display: flex;
  flex-direction: column;
}
.video-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(255, 102, 0, 0.06), 0 16px 48px rgba(0, 0, 0, 0.3);
}

.video-thumb {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 */
  overflow: hidden;
}
.video-thumb img {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform var(--ease-slow);
}
.video-card:hover .video-thumb img {
  transform: scale(1.05);
}

.play-icon {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 48px; height: 48px;
  background: rgba(255, 102, 0, 0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  color: white;
  transition: all var(--ease-base);
}
.video-card:hover .play-icon {
  background: rgba(255, 102, 0, 1);
  transform: translate(-50%, -50%) scale(1.1);
}

.video-title {
  padding: 20px 24px 16px;
  font-size: var(--fs-sm);
  font-weight: 600;
  line-height: 1.4;
}

/* ---------- 8. Section Layouts -------------------------------------------- */
.section-header {
  margin-bottom: 56px;
}

.section-label {
  font-size: var(--fs-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-start);
  margin-bottom: 12px;
  display: block;
}

.section-heading {
  font-size: var(--fs-2xl);
  margin-bottom: 16px;
}

.section-subtitle {
  font-size: var(--fs-base);
  color: var(--text-secondary);
  max-width: 560px;
  line-height: 1.7;
}

/* Stats Row */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 24px;
  margin-top: 64px;
}

.stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 32px 24px;
  text-align: center;
  transition: all var(--ease-base);
}
.stat-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.stat-number {
  font-size: var(--fs-2xl);
  font-weight: 800;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Fix gradient text color conflict */
.gradient-text {
  color: transparent;
}

.stat-label {
  font-size: var(--fs-xs);
  color: var(--text-muted);
  margin-top: 8px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ---------- 9. About Section ---------------------------------------------- */
.about-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 64px;
  align-items: start;
}

.about-bio p {
  font-size: var(--fs-base);
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 20px;
}

.about-sidebar {
  position: sticky;
  top: calc(var(--nav-height) + 40px);
}

.sidebar-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 32px;
  margin-bottom: 24px;
}

.sidebar-title {
  font-size: var(--fs-sm);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.topic-list { display: flex; flex-direction: column; gap: 12px; }
.topic-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: var(--fs-sm);
  color: var(--text-secondary);
  padding: 8px 0;
  border-bottom: 1px solid var(--border-subtle);
}
.topic-item:last-child { border-bottom: none; }
.topic-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent-start);
  flex-shrink: 0;
}

.contact-links { display: flex; flex-direction: column; gap: 8px; }
.contact-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: var(--fs-sm);
  color: var(--text-secondary);
  transition: all var(--ease-fast);
}
.contact-link:hover {
  background: var(--bg-surface-hover);
  color: var(--text-primary);
}

/* ---------- 10. Footer ---------------------------------------------------- */
.footer {
  border-top: 1px solid var(--border-subtle);
  padding: 48px 24px;
  text-align: center;
}

.footer-inner {
  max-width: var(--content-max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-text {
  font-size: var(--fs-xs);
  color: var(--text-muted);
}

.footer-links { display: flex; gap: 24px; }
.footer-link {
  font-size: var(--fs-sm);
  color: var(--text-muted);
  transition: color var(--ease-fast);
}
.footer-link:hover { color: var(--text-primary); }

/* ---------- 11. Animations ------------------------------------------------ */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes float {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, -8px); }
}

.animate-in {
  animation: slideUp var(--ease-slow) ease forwards;
}

.stagger-1 { animation-delay: 100ms; opacity: 0; }
.stagger-2 { animation-delay: 200ms; opacity: 0; }
.stagger-3 { animation-delay: 300ms; opacity: 0; }
.stagger-4 { animation-delay: 400ms; opacity: 0; }
.stagger-5 { animation-delay: 500ms; opacity: 0; }

/* ---------- 12. Responsive Breakpoints ------------------------------------ */
@media (max-width: 768px) {
  :root { --nav-height: 56px; }

  .nav-links {
    position: fixed;
    top: var(--nav-height);
    left: 0; right: 0; bottom: 0;
    background: rgba(9, 9, 11, 0.98);
    backdrop-filter: blur(24px);
    flex-direction: column;
    justify-content: center;
    gap: 40px;
    transform: translateX(100%);
    transition: transform var(--ease-slow);
  }

  .nav-links.open { transform: translateX(0); }

  .nav-toggle { display: flex; }

  .nav-toggle.open span:nth-child(1) {
    transform: rotate(45deg) translateY(6px);
  }
  .nav-toggle.open span:nth-child(2) { opacity: 0; }
  .nav-toggle.open span:nth-child(3) {
    transform: rotate(-45deg) translateY(-6px);
  }

  .hero-name { font-size: clamp(2.5rem, 12vw, 4rem); }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .about-sidebar { position: static; }

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

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

  .page-section { padding: 48px 20px; }

  .footer-inner { justify-content: center; text-align: center; }
}

@media (max-width: 480px) {
  .talk-event { font-size: var(--fs-xs); }
  .hero-actions { flex-direction: column; width: 100%; max-width: 280px; }
  .btn { justify-content: center; }

  .stats-grid { grid-template-columns: 1fr; }

  .hero-badges { gap: 8px; }
  .badge { padding: 4px 14px; font-size: 0.65rem; }
}

/* ---------- Profile photo & affiliations ---------- */
.hero-photo {
  display: block;
  width: 160px;
  height: 160px;
  margin: 0 auto 24px;
  position: relative;
  border-radius: var(--radius-full);
  object-fit: cover;
  border: 3px solid var(--bg-elevated);
  box-shadow: 0 0 0 2px var(--border-hover), 0 12px 40px rgba(255, 102, 0, 0.18);
}
.sidebar-photo-card { padding: 0; overflow: hidden; }
.profile-photo {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}
.affiliations { margin-top: 48px; }
.affiliation-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  margin-top: 16px;
}
.affiliation-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 160px;
  height: 90px;
  padding: 12px 16px;
  background: #f5f5f5;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.affiliation-dark { background: #000; }
.affiliation-logo:hover {
  transform: translateY(-2px);
  border-color: var(--border-hover);
  box-shadow: 0 8px 24px rgba(255, 102, 0, 0.2);
}
.affiliation-logo img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}
@media (max-width: 768px) {
  .hero-photo { width: 128px; height: 128px; }
  .affiliation-logo { width: calc(33.333% - 11px); min-width: 120px; }
}
@media (max-width: 480px) {
  .hero-photo { width: 104px; height: 104px; }
  .affiliations { margin-top: 32px; }
  .affiliation-logo { width: calc(50% - 8px); height: 76px; min-width: 0; }
}

/* ---------- Hero (headshot beside bio), filters, year nav ---------- */
.hero { min-height: auto; padding: 72px 24px 48px; }
.hero-inner {
  display: flex;
  align-items: center;
  gap: 56px;
  max-width: var(--content-max);
  text-align: left;
}
.hero-inner .hero-photo { width: 240px; height: 240px; margin: 0; flex-shrink: 0; }
.hero-inner .hero-name { margin-bottom: 12px; }
.hero-inner .hero-name .hero-line { display: inline; }
.hero-tagline { font-size: var(--fs-md); font-weight: 600; color: var(--text-primary); margin-bottom: 4px; }
.hero-location { font-size: var(--fs-sm); color: var(--text-muted); margin-bottom: 20px; }
.hero-inner .hero-badges { justify-content: flex-start; margin-bottom: 20px; }
.hero-inner .hero-desc { font-size: var(--fs-base); max-width: 560px; margin-bottom: 28px; }
.hero-inner .hero-actions { justify-content: flex-start; }
.about-section { scroll-margin-top: var(--nav-height); }
.section-actions { margin-top: 20px; }

.filter-bar { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 32px; }
.filter-btn {
  font: inherit;
  font-size: var(--fs-sm);
  font-weight: 600;
  padding: 8px 18px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--ease-fast);
}
.filter-btn:hover { border-color: var(--accent-start); color: var(--text-primary); }
.filter-btn.active { background: var(--gradient-primary); border-color: transparent; color: var(--white); }
.filter-count { opacity: 0.7; font-weight: 500; margin-left: 4px; }

.year-nav {
  position: sticky;
  top: var(--nav-height);
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 0;
  background: rgba(9, 9, 11, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
}
.year-nav-link {
  padding: 4px 14px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--text-secondary);
  transition: all var(--ease-fast);
}
.year-nav-link:hover { border-color: var(--accent-start); color: var(--accent-start); }
#speaking-talks .year-label { scroll-margin-top: calc(var(--nav-height) + 64px); margin-top: 40px; }

@media (max-width: 768px) {
  .hero { padding: 40px 20px 24px; }
  .hero-inner { flex-direction: column; text-align: center; gap: 28px; }
  .hero-inner .hero-photo { width: 160px; height: 160px; }
  .hero-inner .hero-badges, .hero-inner .hero-actions { justify-content: center; }
  .hero-inner .hero-desc { margin-left: auto; margin-right: auto; }
}
@media (max-width: 480px) {
  .hero-inner .hero-photo { width: 128px; height: 128px; }
  .hero-inner .hero-actions { margin: 0 auto; }
}

/* Compact About (home) */
.about-compact { max-width: 720px; margin: 0 auto; text-align: center; }
.about-compact p { color: var(--text-secondary); margin-bottom: 16px; }
.about-links { display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: center; margin-top: 8px; }

/* Logo credential badges + social icons */
.badge-logo { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; background: rgba(255,255,255,0.92); color: #222; border-color: transparent; }
.badge-logo img { height: 28px; width: auto; display: block; }
.badge-logo span { font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.04em; }
.badge-logo:hover { color: #222; border-color: var(--accent-start); }
.social-icon { display: inline-flex; width: 44px; height: 44px; align-items: center; justify-content: center; border-radius: 50%; border: 1px solid var(--border-subtle); transition: all var(--ease-base); }
.social-icon span { width: 20px; height: 20px; background: var(--text-secondary); -webkit-mask: var(--icon) center / contain no-repeat; mask: var(--icon) center / contain no-repeat; transition: background var(--ease-base); }
.social-icon:hover { border-color: var(--accent-start); transform: translateY(-2px); }
.social-icon:hover span { background: var(--accent-start); }
.about-links { gap: 12px; }

/* Icon masks (inlined as data URIs so they also work when opened via file://) */
.icon-linkedin { --icon: url("data:image/svg+xml,%3Csvg role=%22img%22 viewBox=%220 0 24 24%22 xmlns=%22http://www.w3.org/2000/svg%22%3E%3Cpath d=%22M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433c-1.144 0-2.063-.926-2.063-2.065 0-1.138.92-2.063 2.063-2.063 1.14 0 2.064.925 2.064 2.063 0 1.139-.925 2.065-2.064 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z%22/%3E%3C/svg%3E"); }
.icon-github { --icon: url("data:image/svg+xml,%3Csvg role=%22img%22 viewBox=%220 0 24 24%22 xmlns=%22http://www.w3.org/2000/svg%22%3E%3Cpath d=%22M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12%22/%3E%3C/svg%3E"); }
.icon-bluesky { --icon: url("data:image/svg+xml,%3Csvg role=%22img%22 viewBox=%220 0 24 24%22 xmlns=%22http://www.w3.org/2000/svg%22%3E%3Cpath d=%22M12 10.8c-1.087-2.114-4.046-6.053-6.798-7.995C2.566.944 1.561 1.266.902 1.565.139 1.908 0 3.08 0 3.768c0 .69.378 5.65.624 6.479.815 2.736 3.713 3.66 6.383 3.364.136-.02.275-.039.415-.056-.138.022-.276.04-.415.056-3.912.58-7.387 2.005-2.83 7.078 5.013 5.19 6.87-1.113 7.823-4.308.953 3.195 2.05 9.271 7.733 4.308 4.267-4.308 1.172-6.498-2.74-7.078a8.741 8.741 0 0 1-.415-.056c.14.017.279.036.415.056 2.67.297 5.568-.628 6.383-3.364.246-.828.624-5.79.624-6.478 0-.69-.139-1.861-.902-2.206-.659-.298-1.664-.62-4.3 1.24C16.046 4.748 13.087 8.687 12 10.8Z%22/%3E%3C/svg%3E"); }
.icon-x { --icon: url("data:image/svg+xml,%3Csvg role=%22img%22 viewBox=%220 0 24 24%22 xmlns=%22http://www.w3.org/2000/svg%22%3E%3Cpath d=%22M18.901 1.153h3.68l-8.04 9.19L24 22.846h-7.406l-5.8-7.584-6.638 7.584H.474l8.6-9.83L0 1.154h7.594l5.243 6.932ZM17.61 20.644h2.039L6.486 3.24H4.298Z%22/%3E%3C/svg%3E"); }
.icon-sessionize { --icon: url("data:image/svg+xml,%3Csvg role=%22img%22 viewBox=%220 0 24 24%22 xmlns=%22http://www.w3.org/2000/svg%22%3E%3Cpath d=%22M12 0c6.628 0 12 5.372 12 12v10c0 1.097-.903 2-2 2h-7.5l-.001-.169c-.049-2.894-1.347-4.902-3.709-5.96L24 12l-.32-.109c-2.858-.999-5.251-2.462-7.18-4.391-1.928-1.928-3.392-4.322-4.391-7.181L12 0 4 18c0 .667.167 1.167.5 1.5.334.334.834.5 1.5.5l.187.001c3.771.04 5.313 1.295 5.313 3.999H2c-1.097 0-2-.903-2-2V2C0 .903.903 0 2 0h10Zm7.207 4.793c-.781-.781-1.73-1.097-2.121-.707-.39.39-.074 1.34.707 2.121.781.781 1.731 1.098 2.121.707.391-.39.074-1.34-.707-2.121Z%22/%3E%3C/svg%3E"); }
.icon-gmail { --icon: url("data:image/svg+xml,%3Csvg role=%22img%22 viewBox=%220 0 24 24%22 xmlns=%22http://www.w3.org/2000/svg%22%3E%3Cpath d=%22M24 5.457v13.909c0 .904-.732 1.636-1.636 1.636h-3.819V11.73L12 16.64l-6.545-4.91v9.273H1.636A1.636 1.636 0 0 1 0 19.366V5.457c0-2.023 2.309-3.178 3.927-1.964L5.455 4.64 12 9.548l6.545-4.91 1.528-1.145C21.69 2.28 24 3.434 24 5.457z%22/%3E%3C/svg%3E"); }

/* Blog search + per-year groups */
.blog-search-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.blog-search { flex: 1 1 280px; max-width: 480px; padding: 12px 18px; border-radius: var(--radius-full); border: 1px solid var(--border-subtle); background: var(--bg-card, rgba(255,255,255,0.04)); color: var(--text-primary); font: inherit; }
.blog-search:focus { outline: none; border-color: var(--accent-start); }
.blog-search-status { color: var(--text-secondary); font-size: var(--fs-sm); }
.no-results { color: var(--text-secondary); padding: 32px 0; }
#blog-posts .year-label { margin-top: 40px; }

.talk-type.opening { background: rgba(160, 160, 171, 0.12); color: var(--text-secondary); }
.talk-type.upcoming { background: rgba(46, 160, 67, 0.15); color: #3fb950; }

/* Several talks at one conference share a card */
.talk-row + .talk-row { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border-subtle); }
.talk-header .talk-location { font-size: var(--fs-sm); }

/* Booking page */
.booking-grid { grid-template-columns: 1fr; }
.booking-list { list-style: disc; padding-left: 20px; color: var(--text-secondary); }
.booking-list li { margin-bottom: 10px; }
.card-excerpt a { color: inherit; text-decoration: underline; }
