/* ===== CSS Variables & Design System ===== */
:root {
  /* Modern Color Palette */
  --orange: #FF6B35;
  --orange-light: #FF8E53;
  --blue-dark: #1a1f36;
  --blue-light: #e3f2fd;
  --neutral-light: #f8fafc;
  --neutral-dark: #0f1419;
  --text-primary: #1a1f36;
  --text-secondary: #64748b;
  
  /* Gradients */
  --gradient-hero: linear-gradient(135deg, #FF6B35 0%, #FF8E53 100%);
  --gradient-accent: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --gradient-subtle: linear-gradient(180deg, rgba(255,107,53,0.05), rgba(255,107,53,0.15));
  
  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --space-2xl: 4rem;
  
  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.12);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.16);
  --shadow-xl: 0 16px 48px rgba(0,0,0,0.2);
  
  /* Border Radius */
  --radius-sm: 0.5rem;
  --radius-md: 1rem;
  --radius-lg: 1.5rem;
  --radius-full: 9999px;
  
  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-base: 0.3s ease;
  --transition-slow: 0.5s ease;
}

/* Dark Theme Variables - Applied via System Preference (unless overridden) OR Manual Toggle */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --neutral-light: #0f1419;
    --neutral-dark: #f8fafc;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --gradient-subtle: linear-gradient(180deg, rgba(255,107,53,0.1), rgba(255,107,53,0.2));
  }
}

[data-theme="dark"] {
  --neutral-light: #0f1419;
  --neutral-dark: #f8fafc;
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --gradient-subtle: linear-gradient(180deg, rgba(255,107,53,0.1), rgba(255,107,53,0.2));
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--neutral-light);
  overflow-x: hidden;
}

/* ===== Typography ===== */
h1 {
  font-size: clamp(2.5rem, 6vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: var(--space-md);
}

h2 {
  font-size: clamp(2rem, 4vw, 2.5rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.2;
  margin-bottom: var(--space-md);
}

h3 {
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: var(--space-sm);
}

p {
  margin-bottom: var(--space-sm);
  color: var(--text-secondary);
}

a {
  color: var(--orange);
  text-decoration: none;
  transition: all var(--transition-base);
  position: relative;
}

a:hover {
  color: var(--orange-light);
}

/* ===== Glass-morphism Utility ===== */
.glass {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px) saturate(180%);
  -webkit-backdrop-filter: blur(10px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: var(--shadow-lg);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .glass {
    background: rgba(15, 20, 25, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
  }
}

[data-theme="dark"] .glass {
  background: rgba(15, 20, 25, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ===== Header & Navigation ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: var(--space-sm) var(--space-lg);
  background: rgba(248, 250, 252, 0.8);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  transition: all var(--transition-base);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .site-header {
    background: rgba(15, 20, 25, 0.8);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }
}

[data-theme="dark"] .site-header {
  background: rgba(15, 20, 25, 0.8);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.brand {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  transition: all var(--transition-base);
}

.brand:hover {
  color: var(--orange);
  transform: translateY(-2px);
}

.site-nav {
  display: flex;
  gap: var(--space-lg);
  align-items: center;
}

.site-nav a {
  position: relative;
  color: var(--text-secondary);
  font-weight: 500;
  padding: var(--space-xs) 0;
}

.site-nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-hero);
  transition: width var(--transition-base);
}

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

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

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid rgba(0, 0, 0, 0.1);
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-sm);
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-primary);
  transition: all var(--transition-base);
}

.nav-toggle:hover {
  background: rgba(0, 0, 0, 0.05);
}

/* Theme Toggle */
.theme-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-xs);
  color: var(--text-secondary);
  transition: all var(--transition-base);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
}

.theme-toggle:hover {
  color: var(--orange);
  background: rgba(0, 0, 0, 0.05);
}

.sun-icon, .moon-icon {
  display: none;
}

/* Logic for showing icons:
   If Light Mode (default or forced): Show Moon (to switch to dark)
   If Dark Mode (system or forced): Show Sun (to switch to light)
*/

/* Default (Light) -> Show Moon */
.moon-icon { display: block; }

/* Dark Mode (System) -> Show Sun, Hide Moon */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .moon-icon { display: none; }
  :root:not([data-theme="light"]) .sun-icon { display: block; }
}

/* Dark Mode (Forced) -> Show Sun, Hide Moon */
[data-theme="dark"] .moon-icon { display: none; }
[data-theme="dark"] .sun-icon { display: block; }

/* Light Mode (Forced) -> Show Moon, Hide Sun (already default, but ensure override) */
[data-theme="light"] .moon-icon { display: block; }
[data-theme="light"] .sun-icon { display: none; }

@media (max-width: 768px) {
  .site-header {
    padding: var(--space-sm);
  }
  
  .nav-toggle {
    display: block;
  }
  
  .site-nav {
    position: fixed;
    top: 0;
    right: -100%;
    height: 100vh;
    width: 280px;
    flex-direction: column;
    gap: var(--space-sm);
    padding: var(--space-2xl) var(--space-lg);
    background: rgba(248, 250, 252, 0.95);
    backdrop-filter: blur(20px);
    border-left: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: var(--shadow-xl);
    transition: right var(--transition-base);
    align-items: flex-start;
  }
  
  .site-nav.open {
    right: 0;
  }
  
  @media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .site-nav {
      background: rgba(15, 20, 25, 0.95);
      border-left: 1px solid rgba(255, 255, 255, 0.1);
    }
  }

  [data-theme="dark"] .site-nav {
    background: rgba(15, 20, 25, 0.95);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
  }
}

/* ===== Container ===== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--space-xl) var(--space-lg);
}

/* ===== Hero Section ===== */
.hero {
  position: relative;
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-2xl) var(--space-lg);
  background: var(--gradient-hero);
  color: white;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
  animation: rotate 20s linear infinite;
}

@keyframes rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
}

.avatar {
  width: 200px;
  height: 200px;
  border-radius: var(--radius-full);
  border: 4px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2), 0 0 0 12px rgba(255, 255, 255, 0.1);
  margin: 0 auto var(--space-lg);
  object-fit: cover;
  animation: float 3s ease-in-out infinite;
}

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

.hero h1 {
  color: white;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.2);
  margin-bottom: var(--space-sm);
}

.hero p {
  font-size: 1.25rem;
  color: rgba(255, 255, 255, 0.95);
  margin-bottom: var(--space-lg);
}

.hero strong {
  color: white;
  font-weight: 600;
}

/* Override Hero text color in Dark Mode (Manual or System) if requested */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .hero h1,
  :root:not([data-theme="light"]) .hero strong {
    color: var(--blue-dark);
    text-shadow: none;
  }
  :root:not([data-theme="light"]) .hero p {
    color: rgba(26, 31, 54, 0.8);
  }
}

[data-theme="dark"] .hero h1,
[data-theme="dark"] .hero strong {
  color: var(--blue-dark);
  text-shadow: none;
}

[data-theme="dark"] .hero p {
  color: rgba(26, 31, 54, 0.8);
}

/* ===== Buttons ===== */
.buttons {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
  justify-content: center;
  margin-top: var(--space-lg);
}

.btn {
  display: inline-flex;
  align-items: center;
  padding: 0.875rem 1.75rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 1rem;
  transition: all var(--transition-base);
  cursor: pointer;
  border: none;
  text-decoration: none;
}

.btn.primary {
  background: white;
  color: var(--orange);
  box-shadow: var(--shadow-md);
}

.btn.primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  color: var(--orange-light);
}

.btn.outline {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(10px);
}

.btn.outline:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.5);
}

/* Dark Mode Button Overrides to "Pop" (Dark buttons on Orange background) */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .btn.primary {
    background: var(--blue-dark);
    color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  }
  :root:not([data-theme="light"]) .btn.primary:hover {
    background: #0f1419;
    color: white;
    transform: translateY(-2px);
  }
  
  :root:not([data-theme="light"]) .btn.outline {
    border-color: var(--blue-dark);
    color: var(--blue-dark);
    background: rgba(26, 31, 54, 0.1);
  }
  :root:not([data-theme="light"]) .btn.outline:hover {
    background: rgba(26, 31, 54, 0.2);
    border-color: #0f1419;
    color: #0f1419;
  }
}

[data-theme="dark"] .btn.primary {
  background: var(--blue-dark);
  color: white;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}
[data-theme="dark"] .btn.primary:hover {
  background: #0f1419;
  color: white;
  transform: translateY(-2px);
}

[data-theme="dark"] .btn.outline {
  border-color: var(--blue-dark);
  color: var(--blue-dark);
  background: rgba(26, 31, 54, 0.1);
}
[data-theme="dark"] .btn.outline:hover {
  background: rgba(26, 31, 54, 0.2);
  border-color: #0f1419;
  color: #0f1419;
}

/* ===== Grid Layout ===== */
.grid {
  display: grid;
  gap: var(--space-lg);
  margin-top: var(--space-xl);
}

/* Add generous vertical rhythm between major sections */
.container > section {
  margin-top: var(--space-2xl);
}

.container > section:first-of-type {
  margin-top: var(--space-xl);
}

/* On wider screens, open up space between grid items */
@media (min-width: 900px) {
  .grid { gap: var(--space-2xl); }
}

.grid.two {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid.three {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.grid.four {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

/* ===== Cards ===== */
.card {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
}

/* Keep card padding comfortable on small screens */
@media (max-width: 640px) {
  .card { padding: var(--space-lg); }
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .card {
    background: rgba(26, 31, 54, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
  }
}

[data-theme="dark"] .card {
  background: rgba(26, 31, 54, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.card h2 {
  color: var(--text-primary);
}

.card h3 {
  color: var(--text-primary);
}

/* ===== Lists ===== */
ul.tight {
  list-style: none;
  padding: 0;
}

ul.tight li {
  padding: var(--space-xs) 0;
  color: var(--text-secondary);
  position: relative;
  padding-left: 1.5rem;
}

ul.tight li::before {
  content: '▹';
  position: absolute;
  left: 0;
  color: var(--orange);
  font-weight: bold;
}

/* ===== Resume Styles ===== */
.resume-list {
  list-style: none;
  padding: 0;
}

.resume-list li {
  position: relative;
  padding: var(--space-lg);
  padding-left: var(--space-xl);
  margin-bottom: var(--space-lg);
  background: var(--gradient-subtle);
  border-radius: var(--radius-md);
  border-left: 4px solid var(--orange);
  transition: all var(--transition-base);
}

.resume-list li:hover {
  transform: translateX(4px);
  border-left-width: 6px;
}

.resume-list h3 {
  color: var(--text-primary);
  margin-bottom: var(--space-xs);
}

.resume-list em {
  display: inline-block;
  color: var(--orange);
  font-style: normal;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: var(--space-sm);
}

/* ===== Speaking/Talks Styles ===== */
ul.talks {
  list-style: none;
  padding: 0;
  display: grid;
  gap: var(--space-md);
}

.talks li {
  padding: var(--space-md);
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.3);
  transition: all var(--transition-base);
}

.talks li:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  background: rgba(255, 255, 255, 0.7);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .talks li {
    background: rgba(26, 31, 54, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
  }
  
  :root:not([data-theme="light"]) .talks li:hover {
    background: rgba(26, 31, 54, 0.6);
  }
}

[data-theme="dark"] .talks li {
  background: rgba(26, 31, 54, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .talks li:hover {
  background: rgba(26, 31, 54, 0.6);
}

.talks strong {
  color: var(--orange);
  display: block;
  margin-bottom: var(--space-xs);
}

/* ===== Media Grid ===== */
.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-lg);
  margin-top: var(--space-lg);
}

.media-card {
  background: var(--gradient-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  border: 1px solid rgba(255, 255, 255, 0.3);
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.media-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-hero);
  transform: scaleX(0);
  transition: transform var(--transition-base);
}

.media-card:hover::before {
  transform: scaleX(1);
}

.media-card:hover {
  transform: scale(1.02);
  box-shadow: var(--shadow-lg);
}

/* ===== Badge/Pills ===== */
.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  background: var(--gradient-hero);
  color: white;
  font-size: 0.875rem;
  font-weight: 600;
  margin-right: var(--space-xs);
  margin-bottom: var(--space-xs);
}

/* ===== Speaking Page - Zigzag Timeline ===== */

/* Featured Talks Section */
.featured-talks-section {
  margin-bottom: var(--space-2xl);
}

@media (max-width: 640px) {
  .featured-talks-section .grid {
    grid-template-columns: 1fr;
  }
}

/* Filter Buttons */
.filter-buttons {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: var(--space-xl);
}

.filter-btn {
  padding: 0.5rem 1.25rem;
  border: 2px solid var(--orange);
  background: transparent;
  color: var(--orange);
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all var(--transition-base);
}

.filter-btn:hover {
  background: var(--orange);
  color: white;
  transform: translateY(-2px);
}

.filter-btn.active {
  background: var(--gradient-hero);
  color: white;
  border-color: transparent;
  box-shadow: var(--shadow-md);
}

/* Category Badge on Talk Cards */
.category-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: var(--space-xs);
  background: rgba(255, 107, 53, 0.1);
  color: var(--orange);
  border: 1px solid rgba(255, 107, 53, 0.3);
}

/* Gradient Heading */
.gradient-heading {
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-align: center;
  font-size: clamp(2rem, 5vw, 3rem);
  margin-bottom: var(--space-xl);
}

/* Upcoming Section */
.upcoming-section {
  margin-bottom: var(--space-2xl);
}

.upcoming-card {
  position: relative;
  background: var(--gradient-hero);
  color: white;
  padding: var(--space-xl);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%, 100% {
    box-shadow: 0 8px 32px rgba(255, 107, 53, 0.3);
  }
  50% {
    box-shadow: 0 12px 48px rgba(255, 107, 53, 0.5);
  }
}

.upcoming-card::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, transparent 70%);
  animation: rotate 15s linear infinite;
}

.upcoming-badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(10px);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.875rem;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-md);
  border: 2px solid rgba(255, 255, 255, 0.5);
}

.upcoming-content {
  position: relative;
  z-index: 1;
  display: grid;
  gap: var(--space-md);
  grid-template-columns: 200px 1fr;
  align-items: center;
}

.upcoming-image {
  width: 200px;
  min-height: 150px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #FF4500 0%, #FF6B35 50%, #FFA500 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  font-weight: 700;
  color: white;
  box-shadow: var(--shadow-lg);
  border: 3px solid rgba(255, 255, 255, 0.3);
  padding: var(--space-md);
}

.upcoming-details h3 {
  color: white;
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: var(--space-xs);
}

.upcoming-details h4 {
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(1rem, 2vw, 1.25rem);
  font-weight: 500;
  margin-bottom: var(--space-sm);
}

.upcoming-details p {
  color: rgba(255, 255, 255, 0.95);
  margin: 0;
}

@media (max-width: 768px) {
  .upcoming-content {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .upcoming-image {
    margin: 0 auto;
    width: 150px;
    min-height: 150px;
    font-size: 3rem;
  }
}

/* Past Talks Timeline */
.past-talks-section {
  margin-top: var(--space-2xl);
  margin-bottom: var(--space-2xl);
}

.timeline-container {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
}

.timeline-line {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--orange), var(--orange-light));
  transform: translateX(-50%);
}

.talk-item {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  margin-bottom: var(--space-2xl);
  align-items: center;
}

.talk-item.left .talk-image {
  order: 1;
}

.talk-item.left .talk-content {
  order: 2;
}

.talk-item.right .talk-content {
  order: 1;
  text-align: right;
}

.talk-item.right .talk-image {
  order: 2;
}

.timeline-dot {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 20px;
  height: 20px;
  background: var(--orange);
  border: 4px solid var(--neutral-light);
  border-radius: 50%;
  z-index: 10;
  box-shadow: 0 0 0 4px rgba(255, 107, 53, 0.2);
  transition: all var(--transition-base);
}

.talk-item:hover .timeline-dot {
  width: 28px;
  height: 28px;
  box-shadow: 0 0 0 8px rgba(255, 107, 53, 0.3);
}

.talk-image {
  width: 100%;
  min-height: 200px;
  max-width: 300px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  font-weight: 700;
  color: white;
  box-shadow: var(--shadow-lg);
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
  background: var(--neutral-light);
  padding: var(--space-md);
}

.talk-item.left .talk-image {
  margin-left: auto;
  margin-right: var(--space-lg);
}

.talk-item.right .talk-image {
  margin-right: auto;
  margin-left: var(--space-lg);
}

.talk-image::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.1), transparent);
}

.talk-item:hover .talk-image {
  transform: scale(1.05);
  box-shadow: var(--shadow-xl);
}

.talk-content {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  padding: var(--space-lg);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: var(--shadow-md);
  transition: all var(--transition-base);
}

.talk-item:hover .talk-content {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .talk-content {
    background: rgba(26, 31, 54, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
  }
  
  :root:not([data-theme="light"]) .timeline-dot {
    border-color: var(--neutral-light);
  }
}

[data-theme="dark"] .talk-content {
  background: rgba(26, 31, 54, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .timeline-dot {
  border-color: var(--neutral-light);
}

.talk-content h3 {
  color: var(--orange);
  font-size: 1.25rem;
  margin-bottom: var(--space-xs);
}

.talk-content h4 {
  color: var(--text-primary);
  font-size: 1.125rem;
  margin-bottom: var(--space-sm);
  line-height: 1.4;
}

.talk-year {
  display: inline-block;
  background: var(--gradient-hero);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: var(--space-sm);
}

.talk-link {
  display: inline-block;
  margin-top: var(--space-sm);
  color: var(--orange);
  font-weight: 600;
  text-decoration: none;
  transition: all var(--transition-base);
}

.talk-link:hover {
  color: var(--orange-light);
  transform: translateX(4px);
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .timeline-line {
    display: none;
  }
  
  .talk-item {
    grid-template-columns: 1fr;
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
  }
  
  .talk-item.left .talk-image,
  .talk-item.right .talk-image {
    order: 1;
    margin: 0 auto;
    max-width: 250px;
  }
  
  .talk-item.left .talk-content,
  .talk-item.right .talk-content {
    order: 2;
    text-align: left;
  }
  
  .timeline-dot {
    display: none;
  }
}

/* ===== Modal (Speaking details) ===== */
.modal { position: fixed; inset: 0; z-index: 1000; overflow-y: auto; }
.modal-backdrop { position:absolute; inset:0; background:rgba(0,0,0,.45); backdrop-filter: blur(6px); }
.modal-content {
  position: relative; margin: 5vh auto; max-width: 960px; width: calc(100% - 2rem);
  background: rgba(255,255,255,.85); backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,.4); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl); padding: var(--space-xl);
  max-height: 90vh; overflow-y: auto;
}
@media (prefers-color-scheme: dark){
  :root:not([data-theme="light"]) .modal-content{ background: rgba(20,24,31,.85); border:1px solid rgba(255,255,255,.12); }
}
[data-theme="dark"] .modal-content{ background: rgba(20,24,31,.85); border:1px solid rgba(255,255,255,.12); }
@media (max-width: 768px) {
  .modal-content {
    margin: 2vh auto;
    width: calc(100% - 1rem);
    padding: var(--space-lg);
    max-height: 95vh;
  }
}
.modal-close{ position:absolute; top:.75rem; right:.75rem; font-size:1.75rem; line-height:1; border:none; background:transparent; color:var(--text-secondary); cursor:pointer; z-index: 10; }
.modal-close:hover{ color: var(--orange) }

/* Modal inner layout */
.modal-header{ display:flex; align-items:center; gap: var(--space-lg); margin-bottom: var(--space-lg); flex-wrap: wrap; }
.modal-header .thumb{ width:96px; min-height:96px; border-radius: var(--radius-md); display:flex; align-items:center; justify-content:center; color:white; font-weight:700; font-size:1.5rem; box-shadow: var(--shadow-md); flex-shrink: 0; padding: 0.5rem; background: var(--neutral-light); }
@media (max-width: 640px) {
  .modal-header { gap: var(--space-md); }
  .modal-header .thumb { width: 72px; min-height: 72px; font-size: 1.25rem; }
}
.modal-grid{ display:grid; grid-template-columns: 1fr 1fr; gap: var(--space-lg) }
@media (max-width: 800px){ .modal-grid{ grid-template-columns:1fr } }
.metric{ margin-bottom: .5rem }
.metric .bar{ height:10px; border-radius:999px; background:rgba(0,0,0,.08); overflow:hidden }
@media (prefers-color-scheme: dark){ :root:not([data-theme="light"]) .metric .bar{ background:rgba(255,255,255,.12) } }
[data-theme="dark"] .metric .bar{ background:rgba(255,255,255,.12) }
.metric .fill{ height:100%; background: var(--gradient-hero) }
.quote{ background: rgba(255,255,255,.6); border:1px solid rgba(255,255,255,.4); border-radius: var(--radius-md); padding: var(--space-md); box-shadow: var(--shadow-sm) }
@media (prefers-color-scheme: dark){ :root:not([data-theme="light"]) .quote{ background: rgba(26,31,54,.6); border-color: rgba(255,255,255,.1) } }
[data-theme="dark"] .quote{ background: rgba(26,31,54,.6); border-color: rgba(255,255,255,.1) }

/* ===== Footer ===== */
.site-footer {
  padding: var(--space-xl) var(--space-lg);
  text-align: center;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  color: var(--text-secondary);
  margin-top: var(--space-2xl);
}

@media (prefers-color-scheme: dark) {
  .site-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }
}

/* ===== Newsletter Card ===== */
.newsletter-card {
  text-align: center;
  background: var(--gradient-hero);
  color: white;
}

.newsletter-card h2 {
  color: white;
}

.newsletter-card p {
  color: rgba(255, 255, 255, 0.95);
  max-width: 600px;
  margin: 0 auto var(--space-lg);
}

.newsletter-card .social-link {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.9rem;
}

.newsletter-card a {
  color: white;
  font-weight: 600;
  text-decoration: underline;
}

/* Dark Mode Override for Newsletter Card */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .newsletter-card {
    background: rgba(26, 31, 54, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
  }
  :root:not([data-theme="light"]) .newsletter-card h2 {
    color: var(--orange);
  }
  :root:not([data-theme="light"]) .newsletter-card p,
  :root:not([data-theme="light"]) .newsletter-card .social-link {
    color: var(--text-secondary);
  }
  :root:not([data-theme="light"]) .newsletter-card a {
    color: var(--orange);
  }
}

[data-theme="dark"] .newsletter-card {
  background: rgba(26, 31, 54, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
}
[data-theme="dark"] .newsletter-card h2 {
  color: var(--orange);
}
[data-theme="dark"] .newsletter-card p,
[data-theme="dark"] .newsletter-card .social-link {
  color: var(--text-secondary);
}
[data-theme="dark"] .newsletter-card a {
  color: var(--orange);
}

/* ===== Accessibility ===== */
.skip {
  position: absolute;
  left: -9999px;
  top: auto;
  z-index: 999;
}

.skip:focus {
  left: var(--space-sm);
  top: var(--space-sm);
  background: var(--orange);
  color: white;
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
}

/* ===== Animations ===== */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.6s ease-out forwards;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .container {
    padding: var(--space-lg) var(--space-md);
  }
  
  .hero {
    min-height: 60vh;
    padding: var(--space-xl) var(--space-md);
  }
  
  .avatar {
    width: 150px;
    height: 150px;
  }
  
  .buttons {
    flex-direction: column;
    width: 100%;
  }
  
  .btn {
    width: 100%;
    justify-content: center;
  }
  
  h1 {
    font-size: clamp(2rem, 8vw, 3.5rem);
  }
  
  h2 {
    font-size: clamp(1.5rem, 6vw, 2.5rem);
  }
}

/* ===== Certifications Grid ===== */
.cert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--space-md);
  margin-top: var(--space-lg);
}

.cert-card {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  text-align: center;
  transition: all var(--transition-base);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100%;
  box-shadow: var(--shadow-sm);
}

.cert-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  background: rgba(255, 255, 255, 0.8);
  border-color: var(--orange);
}

.cert-acronym {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--orange);
  margin-bottom: var(--space-xs);
  line-height: 1.2;
}

.cert-name {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
  font-size: 0.95rem;
}

.cert-org {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme=light]) .cert-card {
    background: rgba(26, 31, 54, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
  }
  
  :root:not([data-theme=light]) .cert-card:hover {
    background: rgba(26, 31, 54, 0.6);
    border-color: var(--orange);
  }
  
  :root:not([data-theme=light]) .cert-name {
    color: var(--text-primary);
  }
}

[data-theme=dark] .cert-card {
  background: rgba(26, 31, 54, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme=dark] .cert-card:hover {
  background: rgba(26, 31, 54, 0.6);
  border-color: var(--orange);
}

[data-theme=dark] .cert-name {
  color: var(--text-primary);
}

