/* =========================================
   1. VARIABLES & RESET
   ========================================= */
:root {
  /* Color Palette - Deep Slate & Modern Indigo */
  --bg-body: #0f172a;
  --bg-surface: #1e293b;
  --bg-card: #263345;
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --accent-primary: #38bdf8; /* Sky Blue */
  --accent-secondary: #818cf8; /* Indigo */
  --border-color: #334155;
  
  /* Typography */
  --font-main: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  
  /* Spacing */
  --container-width: 1200px;
  --section-padding: 5rem 0;
  
  /* Effects */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.3);
  --radius-md: 12px;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-main);
  background-color: var(--bg-body);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color 0.2s ease;
}

ul {
  padding-left: 1.2rem;
}

/* =========================================
   2. UTILITIES
   ========================================= */
.container {
  width: 92%;
  max-width: var(--container-width);
  margin: 0 auto;
}

.section {
  padding: var(--section-padding);
}

.section-alt {
  background-color: #162032; /* Slightly lighter band */
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.section-head {
  margin-bottom: 3rem;
  max-width: 700px;
}

.section-head h2 {
  font-size: 2rem;
  color: var(--accent-primary);
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}

.section-head p {
  color: var(--text-muted);
  font-size: 1.1rem;
}

.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 50px;
  font-weight: 500;
  font-size: 0.95rem;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--accent-primary);
  color: #0f172a;
}
.btn-primary:hover {
  background: #7dd3fc;
  transform: translateY(-2px);
}

.btn-outline {
  border-color: var(--text-muted);
  color: var(--text-main);
}
.btn-outline:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

/* =========================================
   3. NAVIGATION
   ========================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  padding: 0.8rem 0;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.brand-logo {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  border-radius: 8px;
  color: #0f172a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.1rem;
}

.brand-name {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.1;
}

.brand-tagline {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: block;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
}

.nav-links a:hover {
  color: var(--accent-primary);
}

.btn-nav {
  padding: 0.4rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: 20px;
  color: var(--text-main) !important;
}

/* Mobile Nav Toggle */
.nav-toggle { display: none; }
.nav-icon { display: none; cursor: pointer; }

/* =========================================
   4. HERO SECTION
   ========================================= */
.hero-section {
  padding: 5rem 0 6rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 4rem;
  align-items: center;
}

.badge {
  display: inline-block;
  background: rgba(56, 189, 248, 0.1);
  color: var(--accent-primary);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.hero-title {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  margin: 0 0 0.5rem;
  background: linear-gradient(to right, #fff, #94a3b8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.1;
}

.hero-subtitle {
  font-size: 1.1rem;
  color: var(--accent-secondary);
  margin-bottom: 1.5rem;
}

.hero-bio {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: 2rem;
  max-width: 65ch;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
}

.stats-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  padding: 2rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
}

.stats-header {
  margin-top: 0;
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.stats-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.kpi-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.kpi-item {
  background: rgba(15, 23, 42, 0.6);
  padding: 1rem;
  border-radius: 8px;
  text-align: center;
  border: 1px solid var(--border-color);
}

.kpi-number {
  display: block;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--accent-primary);
}

.kpi-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

/* =========================================
   5. RESEARCH CARDS
   ========================================= */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 2rem;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.card:hover {
  transform: translateY(-5px);
  border-color: var(--accent-primary);
}

.card-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.card h3 {
  margin: 0 0 0.8rem;
  font-size: 1.25rem;
}

.card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

.tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.tags span {
  font-size: 0.75rem;
  background: rgba(148, 163, 184, 0.1);
  color: var(--text-main);
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
}

/* =========================================
   6. EXPERIENCE TIMELINE
   ========================================= */
.timeline {
  position: relative;
  max-width: 800px;
  margin-top: 2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border-color);
}

.timeline-item {
  position: relative;
  padding-left: 2.5rem;
  padding-bottom: 3rem;
}

.timeline-marker {
  position: absolute;
  left: -5px;
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent-primary);
  border: 2px solid var(--bg-body);
  box-shadow: 0 0 0 2px var(--accent-primary);
}

.timeline-date {
  font-size: 0.85rem;
  color: var(--accent-secondary);
  font-weight: 600;
  margin-bottom: 0.3rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.timeline-title {
  margin: 0;
  font-size: 1.2rem;
  color: var(--text-main);
}

.timeline-role {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 0.8rem;
  font-style: italic;
}

.timeline-content ul {
  margin: 0;
  font-size: 0.95rem;
  color: #cbd5e1;
}

.timeline-content li + li {
  margin-top: 0.5rem;
}

/* =========================================
   7. LISTS (Teaching & Talks)
   ========================================= */
.list-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.list-card {
  background: var(--bg-card);
  padding: 1.5rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.list-card h4 {
  margin: 0 0 0.5rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  text-transform: uppercase;
}

.highlight {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 0.3rem;
  color: var(--text-main);
}

.sub-text {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.talks-grid {
  display: grid;
  gap: 1.5rem;
}

.talk-item {
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  background: var(--bg-surface);
  border-left: 3px solid var(--accent-secondary);
  border-radius: 0 8px 8px 0;
}

.talk-date {
  font-size: 0.8rem;
  color: var(--accent-secondary);
  margin-bottom: 0.4rem;
}

.talk-item h4 {
  margin: 0 0 0.4rem;
  font-size: 1.1rem;
}

.talk-item p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* =========================================
   8. PUBLICATIONS & FOOTER
   ========================================= */
.pub-category {
  margin-bottom: 3rem;
}

.pub-category h3 {
  font-size: 1.4rem;
  color: var(--text-main);
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.5rem;
  margin-bottom: 1.5rem;
}

.pub-list {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 1rem;
}

.pub-list li {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
  padding-left: 1rem;
  border-left: 2px solid var(--border-color);
}

.cta-section {
  text-align: center;
  background: linear-gradient(to bottom, var(--bg-body), var(--bg-surface));
}

.cta-content {
  max-width: 600px;
}

.btn-large {
  margin-top: 1.5rem;
  padding: 1rem 2.5rem;
  font-size: 1.1rem;
  background: var(--text-main);
  color: var(--bg-body);
}

.btn-large:hover {
  background: var(--accent-primary);
  color: #000;
  transform: scale(1.02);
}

.contact-card {
  background: var(--bg-surface);
  padding: 2rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  display: grid;
  gap: 1.5rem;
}

.contact-item strong {
  display: block;
  font-size: 0.8rem;
  color: var(--accent-primary);
  text-transform: uppercase;
  margin-bottom: 0.3rem;
}

.contact-item a, .contact-item span {
  font-size: 1.1rem;
}

footer {
  border-top: 1px solid var(--border-color);
  padding: 2rem 0;
  color: var(--text-muted);
  font-size: 0.9rem;
  background: #0b1120;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-links a {
  margin-left: 1.5rem;
}

/* =========================================
   9. RESPONSIVE DESIGN
   ========================================= */
@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  
  .hero-content {
    order: 1;
  }
  
  .hero-stats {
    order: 2;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none; /* Simple hiding for this exercise. JS toggle needed for full menu */
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: var(--bg-surface);
    flex-direction: column;
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
  }

  /* Hamburger Logic using pure CSS checkbox */
  .nav-toggle:checked ~ .nav-links {
    display: flex;
  }
  
  .nav-icon {
    display: block;
    width: 25px;
    height: 20px;
    position: relative;
  }
  
  .nav-icon span, .nav-icon span::before, .nav-icon span::after {
    display: block;
    background: white;
    height: 2px;
    width: 100%;
    position: absolute;
    border-radius: 2px;
  }
  
  .nav-icon span { top: 9px; }
  .nav-icon span::before { content: ''; top: -8px; }
  .nav-icon span::after { content: ''; top: 8px; }
  
  .hero-title {
    font-size: 2.2rem;
  }
  
  .stats-card {
    padding: 1.5rem;
  }
  
  .kpi-wrapper {
    grid-template-columns: 1fr 1fr; /* Keep 2 cols on mobile for compactness */
  }
}