:root {
  color-scheme: light;
  --ink: #1a1a2e;
  --muted: #4a5568;
  --accent: #4f46e5;
  --accent-dark: #3730a3;
  --accent-light: #818cf8;
  --surface: #ffffff;
  --surface-alt: #f8fafc;
  --surface-dark: #1a1a2e;
  --highlight: #eef2ff;
  --shadow: 0 24px 60px rgba(26, 26, 46, 0.12);
  --shadow-sm: 0 4px 12px rgba(26, 26, 46, 0.08);
  --radius: 16px;
  --radius-lg: 24px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Space Grotesk", system-ui, sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
  line-height: 1.7;
}

h1,
h2,
h3 {
  font-family: "Fraunces", "Georgia", serif;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

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

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

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

.hero {
  padding: 28px 8vw 100px;
  background: linear-gradient(135deg, #f8fafc 0%, #eef2ff 50%, #e0e7ff 100%);
  position: relative;
  overflow: hidden;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 60px;
  position: relative;
  z-index: 10;
}

.logo {
  font-weight: 700;
  font-size: 1.1rem;
  background: var(--accent);
  color: #ffffff;
  padding: 10px 14px;
  border-radius: 12px;
  letter-spacing: 0.05em;
}

.nav-links {
  display: flex;
  gap: 28px;
  font-size: 0.95rem;
  font-weight: 500;
}

.nav-links a {
  color: var(--muted);
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.3s ease;
}

.nav-links a:hover::after {
  width: 100%;
}

.hero-content {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 60px;
  align-items: center;
  position: relative;
  z-index: 5;
}

.eyebrow {
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  color: var(--accent);
  margin-bottom: 12px;
  font-weight: 600;
}

.hero-text h1 {
  font-size: clamp(2.5rem, 4vw, 3.8rem);
  margin-bottom: 20px;
  color: var(--ink);
}

.subtitle {
  font-size: 1.1rem;
  color: var(--muted);
  margin-bottom: 20px;
  line-height: 1.8;
}

.lead {
  font-size: 1rem;
  margin-bottom: 28px;
  color: var(--muted);
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
}

.button {
  padding: 12px 24px;
  border-radius: 10px;
  font-weight: 600;
  border: 2px solid transparent;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
}

.button.primary {
  background: var(--accent);
  color: #ffffff;
  box-shadow: 0 8px 20px rgba(79, 70, 229, 0.3);
}

.button.primary:hover {
  background: var(--accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(79, 70, 229, 0.4);
}

.button.ghost {
  border-color: var(--ink);
  color: var(--ink);
  background: transparent;
}

.button.ghost:hover {
  background: var(--ink);
  color: #ffffff;
  transform: translateY(-2px);
}

.social-links {
  display: flex;
  gap: 16px;
}

.social-links a {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 1.1rem;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
}

.social-links a:hover {
  background: var(--accent);
  color: #ffffff;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(79, 70, 229, 0.3);
}

.hero-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 32px;
  text-align: center;
}

.profile-photo {
  width: 180px;
  height: 180px;
  margin: 0 auto 24px;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(79, 70, 229, 0.2);
  border: 4px solid var(--surface);
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
  position: relative;
}

.profile-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
}

.avatar-fallback {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
  color: #ffffff;
  font-size: 4rem;
  display: grid;
  place-items: center;
  font-family: "Fraunces", serif;
  font-weight: 700;
}

.card-body h2 {
  font-size: 1.2rem;
  margin-bottom: 16px;
  color: var(--ink);
}

.pill-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.pill-list li {
  padding: 6px 14px;
  border-radius: 20px;
  background: var(--highlight);
  font-size: 0.85rem;
  color: var(--accent-dark);
  font-weight: 500;
}

main {
  padding: 0 8vw 80px;
}

.section {
  padding: 80px 0;
}

.section.alt {
  background: var(--surface-alt);
  margin: 0 -8vw;
  padding: 80px 8vw;
}

.section-title {
  max-width: 700px;
  margin-bottom: 48px;
}

.section-title h2 {
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  margin-bottom: 16px;
  color: var(--ink);
}

.section-title p {
  color: var(--muted);
  font-size: 1.05rem;
}

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

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

.panel {
  background: var(--surface);
  padding: 28px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.panel h3 {
  font-size: 1.15rem;
  margin-bottom: 16px;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 10px;
}

.panel h3 i {
  color: var(--accent);
  font-size: 1rem;
}

.clean-list {
  list-style: none;
  display: grid;
  gap: 12px;
  color: var(--muted);
  font-size: 0.95rem;
}

.highlight {
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--accent);
}

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

/* Publication Category Tabs */
.pub-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 32px;
  justify-content: center;
}

.pub-tab {
  background: var(--surface);
  border: 2px solid transparent;
  padding: 12px 24px;
  border-radius: 50px;
  cursor: pointer;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-sm);
}

.pub-tab i {
  font-size: 1rem;
  transition: transform 0.3s ease;
}

.pub-tab:hover {
  color: var(--accent);
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.pub-tab:hover i {
  transform: scale(1.2);
}

.pub-tab.active {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
  box-shadow: 0 4px 20px rgba(79, 70, 229, 0.4);
}

.pub-tab.active i {
  transform: scale(1.1);
}

/* Publication List - Categorized */
.pub-list.categorized {
  display: grid;
  gap: 20px;
}

.pub-card {
  position: relative;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 24px;
  padding-left: 28px;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(79, 70, 229, 0.08);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.pub-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--accent);
  transition: width 0.3s ease;
}

.pub-card[data-category="ml"]::before {
  background: linear-gradient(180deg, #8b5cf6, #a78bfa);
}

.pub-card[data-category="opt"]::before {
  background: linear-gradient(180deg, #10b981, #34d399);
}

.pub-card[data-category="ctrl"]::before {
  background: linear-gradient(180deg, #f59e0b, #fbbf24);
}

.pub-card:hover {
  transform: translateY(-4px) translateX(4px);
  box-shadow: var(--shadow);
  border-color: rgba(79, 70, 229, 0.15);
}

.pub-card:hover::before {
  width: 6px;
}

.pub-card.hidden {
  display: none;
}

/* Category Badge */
.pub-category-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 6px;
}

.pub-category-badge.ml {
  background: rgba(139, 92, 246, 0.1);
  color: #8b5cf6;
}

.pub-category-badge.opt {
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
}

.pub-category-badge.ctrl {
  background: rgba(245, 158, 11, 0.1);
  color: #f59e0b;
}

.pub-category-badge i {
  font-size: 0.65rem;
}

/* Publication Card Content */
.pub-card h3 {
  font-size: 1.05rem;
  line-height: 1.5;
  margin-bottom: 10px;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 600;
  padding-right: 80px;
}

.pub-card h3 a {
  color: var(--ink);
  transition: color 0.2s ease;
}

.pub-card h3 a:hover {
  color: var(--accent);
}

.pub-authors {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 12px;
  line-height: 1.5;
}

.pub-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
}

.pub-venue {
  font-size: 0.85rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.pub-venue i {
  color: var(--accent);
  font-size: 0.8rem;
}

.pub-status {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.pub-status.submitted {
  background: rgba(59, 130, 246, 0.1);
  color: #3b82f6;
}

.pub-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.pub-link {
  font-size: 0.8rem;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 8px;
  background: var(--highlight);
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.pub-link:hover {
  background: var(--accent);
  color: white;
  transform: translateY(-2px);
}

.pub-link i {
  font-size: 0.75rem;
}

/* Legacy pub-list styles (keep for compatibility) */
.pub-list:not(.categorized) {
  display: grid;
  gap: 20px;
}

.pub-list:not(.categorized) article {
  border-left: 3px solid var(--accent);
  padding: 16px 0 16px 20px;
  background: var(--surface);
  border-radius: 0 var(--radius) var(--radius) 0;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease;
}

.pub-list:not(.categorized) article:hover {
  transform: translateX(4px);
}

.pub-list:not(.categorized) article h3 {
  font-size: 1rem;
  margin-bottom: 6px;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 600;
}

.section-actions {
  margin-top: 32px;
  text-align: center;
}

/* Software Section */
.software-panel {
  border-top: 3px solid var(--accent);
}

.software-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.software-header i {
  font-size: 1.5rem;
  color: var(--accent);
}

.software-header h3 {
  margin-bottom: 0;
}

.software-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.software-tags span {
  padding: 4px 12px;
  border-radius: 20px;
  background: var(--highlight);
  font-size: 0.8rem;
  color: var(--accent-dark);
  font-weight: 500;
}

/* Contact Section */
.contact-card {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
  padding: 32px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
  margin-bottom: 32px;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.contact-item i {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--highlight);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-size: 1.1rem;
  flex-shrink: 0;
}

.contact {
  font-weight: 600;
  color: var(--ink);
}

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

.contact a:hover {
  text-decoration: underline;
}

.profile-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.profile-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 10px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  font-weight: 500;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.profile-link:hover {
  background: var(--accent);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(79, 70, 229, 0.3);
}

.profile-link i {
  font-size: 1.1rem;
}

/* Footer */
.footer {
  background: var(--surface-dark);
  color: rgba(255, 255, 255, 0.8);
  padding: 40px 8vw;
}

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

.footer-content p {
  font-size: 0.9rem;
}

.footer-links {
  display: flex;
  gap: 16px;
}

.footer-links a {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.8);
  transition: all 0.3s ease;
}

.footer-links a:hover {
  background: var(--accent);
  color: #ffffff;
}

/* ============================================
   SKILLS SECTION
   ============================================ */
.skills-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
  margin-top: 24px;
}

.skill-category {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(79, 70, 229, 0.08);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.skill-category::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-light));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s ease;
}

.skill-category:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
  border-color: rgba(79, 70, 229, 0.2);
}

.skill-category:hover::before {
  transform: scaleX(1);
}

.skill-category-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--highlight);
}

.skill-category-header i {
  font-size: 1.2rem;
  color: var(--accent);
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--highlight), rgba(79, 70, 229, 0.1));
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.skill-category:hover .skill-category-header i {
  background: var(--accent);
  color: white;
  transform: rotate(-5deg) scale(1.1);
}

.skill-category-header h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
}

.skill-items {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.skill-item {
  display: grid;
  grid-template-columns: 28px 1fr;
  grid-template-rows: auto auto;
  gap: 4px 10px;
  align-items: center;
  padding: 8px;
  border-radius: 8px;
  background: var(--surface-alt);
  transition: all 0.3s ease;
  opacity: 0;
  transform: translateX(-20px);
  animation: skillSlideIn 0.5s ease forwards;
}

.skill-item:nth-child(1) { animation-delay: 0.1s; }
.skill-item:nth-child(2) { animation-delay: 0.2s; }
.skill-item:nth-child(3) { animation-delay: 0.3s; }
.skill-item:nth-child(4) { animation-delay: 0.4s; }
.skill-item:nth-child(5) { animation-delay: 0.5s; }

@keyframes skillSlideIn {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.skill-item:hover {
  background: var(--highlight);
  transform: translateX(4px);
}

.skill-icon {
  grid-row: span 2;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-size: 0.85rem;
  box-shadow: 0 2px 6px rgba(79, 70, 229, 0.12);
  transition: all 0.3s ease;
}

.skill-item:hover .skill-icon {
  background: var(--accent);
  color: white;
  transform: scale(1.1);
}

.skill-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.skill-name {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--ink);
}

.skill-level {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 2px 6px;
  border-radius: 3px;
  background: rgba(79, 70, 229, 0.1);
  color: var(--accent);
}

.skill-item[data-level="50"] .skill-level {
  background: rgba(245, 158, 11, 0.15);
  color: #d97706;
}

.skill-bar {
  grid-column: 2;
  height: 4px;
  background: rgba(79, 70, 229, 0.1);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}

.skill-progress {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--accent), var(--accent-light));
  border-radius: 3px;
  transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.skill-progress::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.4),
    transparent
  );
  animation: skillShine 2s infinite;
}

@keyframes skillShine {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.skill-item[data-level="50"] .skill-progress {
  background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

/* Dark mode skills */
body.dark-mode .skill-category {
  background: rgba(30, 30, 50, 0.8);
  border-color: rgba(129, 140, 248, 0.1);
}

body.dark-mode .skill-category:hover {
  border-color: rgba(129, 140, 248, 0.3);
}

body.dark-mode .skill-category-header {
  border-bottom-color: rgba(129, 140, 248, 0.15);
}

body.dark-mode .skill-category-header i {
  background: rgba(129, 140, 248, 0.15);
  color: var(--accent-light);
}

body.dark-mode .skill-category:hover .skill-category-header i {
  background: var(--accent-light);
  color: var(--surface-dark);
}

body.dark-mode .skill-item {
  background: rgba(20, 20, 40, 0.5);
}

body.dark-mode .skill-item:hover {
  background: rgba(129, 140, 248, 0.1);
}

body.dark-mode .skill-icon {
  background: rgba(40, 40, 70, 0.8);
  color: var(--accent-light);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

body.dark-mode .skill-item:hover .skill-icon {
  background: var(--accent-light);
  color: var(--surface-dark);
}

body.dark-mode .skill-name {
  color: #e2e8f0;
}

body.dark-mode .skill-level {
  background: rgba(129, 140, 248, 0.15);
  color: var(--accent-light);
}

body.dark-mode .skill-item[data-level="50"] .skill-level {
  background: rgba(251, 191, 36, 0.15);
  color: #fbbf24;
}

body.dark-mode .skill-bar {
  background: rgba(129, 140, 248, 0.1);
}

body.dark-mode .skill-progress {
  background: linear-gradient(90deg, var(--accent-light), #a5b4fc);
}

body.dark-mode .skill-item[data-level="50"] .skill-progress {
  background: linear-gradient(90deg, #fbbf24, #fcd34d);
}

/* Responsive */
@media (max-width: 900px) {
  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .hero-text {
    order: 2;
  }
  
  .hero-card {
    order: 1;
    max-width: 350px;
    margin: 0 auto;
  }
  
  .social-links {
    justify-content: center;
  }
  
  .hero-cta {
    justify-content: center;
  }
  
  .skills-container {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .nav {
    flex-direction: column;
    gap: 20px;
    padding-bottom: 40px;
  }

  .nav-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
  }
  
  .footer-content {
    flex-direction: column;
    text-align: center;
  }
  
  .skill-category {
    padding: 14px;
  }
  
  .skill-category-header h3 {
    font-size: 0.9rem;
  }
  
  .skill-info {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
  }
  
  .skill-name {
    font-size: 0.78rem;
  }
}

/* Theme Toggle Button */
.theme-toggle {
  background: var(--surface);
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--muted);
  font-size: 1.1rem;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
  margin-left: 8px;
}

.theme-toggle:hover {
  background: var(--accent);
  color: #ffffff;
  transform: translateY(-2px);
}

/* Dark Mode Styles */
body.dark-mode {
  --ink: #e2e8f0;
  --muted: #94a3b8;
  --surface: #1e293b;
  --surface-alt: #0f172a;
  --surface-dark: #0f172a;
  --highlight: #1e3a5f;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.3);
  background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
}

body.dark-mode .hero {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #1e3a5f 100%);
}

body.dark-mode .panel {
  background: var(--surface);
  border: 1px solid rgba(148, 163, 184, 0.1);
}

body.dark-mode .hero-card {
  background: var(--surface);
  border: 1px solid rgba(148, 163, 184, 0.1);
}

body.dark-mode .contact-card {
  background: var(--surface);
  border: 1px solid rgba(148, 163, 184, 0.1);
}

body.dark-mode .profile-link {
  background: var(--surface);
  border: 1px solid rgba(148, 163, 184, 0.1);
}

body.dark-mode .social-links a {
  background: var(--surface);
  border: 1px solid rgba(148, 163, 184, 0.1);
}

body.dark-mode .theme-toggle {
  background: var(--surface);
  border: 1px solid rgba(148, 163, 184, 0.1);
}

body.dark-mode .button.ghost {
  border-color: var(--ink);
  color: var(--ink);
}

body.dark-mode .button.ghost:hover {
  background: var(--ink);
  color: var(--surface-dark);
}

body.dark-mode .pub-list article {
  background: var(--surface);
  border-left-color: var(--accent);
}

/* Dark mode publication tabs and cards */
body.dark-mode .pub-tab {
  background: rgba(30, 41, 59, 0.8);
  color: #94a3b8;
  border-color: transparent;
}

body.dark-mode .pub-tab:hover {
  color: var(--accent-light);
  border-color: var(--accent-light);
  background: rgba(129, 140, 248, 0.1);
}

body.dark-mode .pub-tab.active {
  background: var(--accent-light);
  color: #0f172a;
  border-color: var(--accent-light);
  box-shadow: 0 4px 20px rgba(129, 140, 248, 0.3);
}

body.dark-mode .pub-card {
  background: rgba(30, 41, 59, 0.8);
  border-color: rgba(129, 140, 248, 0.1);
}

body.dark-mode .pub-card:hover {
  border-color: rgba(129, 140, 248, 0.25);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

body.dark-mode .pub-card h3 a {
  color: #e2e8f0;
}

body.dark-mode .pub-card h3 a:hover {
  color: var(--accent-light);
}

body.dark-mode .pub-category-badge.ml {
  background: rgba(139, 92, 246, 0.2);
  color: #a78bfa;
}

body.dark-mode .pub-category-badge.opt {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
}

body.dark-mode .pub-category-badge.ctrl {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
}

body.dark-mode .pub-status.submitted {
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
}

body.dark-mode .pub-link {
  background: rgba(129, 140, 248, 0.15);
  color: var(--accent-light);
}

body.dark-mode .pub-link:hover {
  background: var(--accent-light);
  color: #0f172a;
}

body.dark-mode .pill-list li {
  background: var(--highlight);
  color: var(--accent-light);
}

body.dark-mode .software-tags span {
  background: var(--highlight);
  color: var(--accent-light);
}

body.dark-mode .footer {
  background: #0f172a;
}

body.dark-mode .footer-links a {
  background: rgba(255, 255, 255, 0.05);
}

body.dark-mode .logo {
  background: var(--accent);
}

body.dark-mode a.software-panel:hover {
  border-color: var(--accent);
}

/* Software panel as link */
a.software-panel {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
}

a.software-panel:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: var(--accent);
}

a.software-panel h3 {
  color: var(--ink);
}

/* Hamburger Menu */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 28px;
  height: 20px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1001;
}

.hamburger span {
  display: block;
  width: 100%;
  height: 3px;
  background: var(--ink);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -6px);
}

/* News Section */
.news-list {
  display: grid;
  gap: 16px;
}

.news-item {
  display: flex;
  gap: 20px;
  padding: 20px;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border-left: 3px solid var(--accent);
}

.news-item:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow);
}

.news-date {
  min-width: 90px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.news-content h3 {
  font-size: 1rem;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--ink);
}

.news-content p {
  font-size: 0.9rem;
  color: var(--muted);
  margin: 0;
}

/* Scroll to Top Button */
.scroll-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--accent);
  color: #ffffff;
  border: none;
  cursor: pointer;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(79, 70, 229, 0.4);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.3s ease;
  z-index: 999;
}

.scroll-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.scroll-top:hover {
  background: var(--accent-dark);
  transform: translateY(-3px);
  box-shadow: 0 6px 25px rgba(79, 70, 229, 0.5);
}

/* Dark mode additions */
body.dark-mode .news-item {
  background: var(--surface);
  border: 1px solid rgba(148, 163, 184, 0.1);
  border-left: 3px solid var(--accent);
}

body.dark-mode .hamburger span {
  background: var(--ink);
}

body.dark-mode .scroll-top {
  box-shadow: 0 4px 20px rgba(79, 70, 229, 0.6);
}

/* Mobile Responsive - Hamburger */
@media (max-width: 900px) {
  .hamburger {
    display: flex;
  }
  
  .nav-links {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--surface);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 24px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
  }
  
  .nav-links.active {
    opacity: 1;
    visibility: visible;
  }
  
  .nav-links a {
    font-size: 1.3rem;
  }
  
  body.dark-mode .nav-links {
    background: var(--surface-dark);
  }
}

@media (max-width: 600px) {
  .news-item {
    flex-direction: column;
    gap: 8px;
  }
  
  .news-date {
    min-width: auto;
  }
  
  .scroll-top {
    bottom: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
  }
  
  /* Publication responsive styles */
  .pub-tabs {
    gap: 8px;
  }
  
  .pub-tab {
    padding: 10px 16px;
    font-size: 0.85rem;
  }
  
  .pub-tab span {
    display: none;
  }
  
  .pub-card {
    padding: 18px;
    padding-left: 22px;
  }
  
  .pub-card h3 {
    font-size: 0.95rem;
    padding-right: 0;
    margin-top: 36px;
  }
  
  .pub-category-badge {
    top: 12px;
    right: 12px;
    padding: 4px 10px;
    font-size: 0.65rem;
  }
  
  .pub-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  
  .pub-venue {
    font-size: 0.8rem;
  }
  
  .pub-links {
    gap: 8px;
  }
  
  .pub-link {
    font-size: 0.75rem;
    padding: 5px 12px;
  }
}

/* ============================================
   PARTICLE NETWORK CANVAS
   ============================================ */
#particles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

.hero {
  position: relative;
  overflow: hidden;
}

.hero .nav,
.hero .hero-content {
  position: relative;
  z-index: 10;
}

/* ============================================
   ANIMATED GRADIENT BACKGROUND
   ============================================ */
.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    45deg,
    #f8fafc,
    #eef2ff,
    #e0e7ff,
    #c7d2fe,
    #e0e7ff,
    #eef2ff,
    #f8fafc
  );
  background-size: 400% 400%;
  animation: gradientShift 15s ease infinite;
  z-index: 0;
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

body.dark-mode .hero::before {
  background: linear-gradient(
    45deg,
    #0f172a,
    #1e293b,
    #1e3a5f,
    #312e81,
    #1e3a5f,
    #1e293b,
    #0f172a
  );
  background-size: 400% 400%;
  animation: gradientShift 15s ease infinite;
}

/* ============================================
   TYPING EFFECT
   ============================================ */
.typing-container {
  font-size: 1.1rem;
  color: var(--accent);
  font-weight: 500;
  min-height: 1.8em;
  margin-bottom: 28px;
}

.typing-text {
  border-right: none;
}

.cursor {
  animation: blink 1s infinite;
  color: var(--accent);
  font-weight: 300;
}

@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

/* ============================================
   STATS COUNTER SECTION
   ============================================ */
.stats-section {
  background: var(--accent);
  padding: 50px 8vw;
  margin: 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 30px;
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.stat-item {
  color: #ffffff;
}

.stat-number {
  display: block;
  font-size: 3rem;
  font-weight: 700;
  font-family: "Fraunces", serif;
  line-height: 1.2;
}

.stat-label {
  font-size: 0.9rem;
  opacity: 0.9;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

body.dark-mode .stats-section {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
}

/* ============================================
   SCROLL FADE-IN ANIMATIONS
   ============================================ */
.fade-in {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered fade for children */
.fade-in.visible .panel,
.fade-in.visible .news-item,
.fade-in.visible .pub-list article {
  animation: fadeSlideUp 0.6s ease forwards;
  opacity: 0;
}

.fade-in.visible .panel:nth-child(1),
.fade-in.visible .news-item:nth-child(1),
.fade-in.visible .pub-list article:nth-child(1) { animation-delay: 0.1s; }

.fade-in.visible .panel:nth-child(2),
.fade-in.visible .news-item:nth-child(2),
.fade-in.visible .pub-list article:nth-child(2) { animation-delay: 0.2s; }

.fade-in.visible .panel:nth-child(3),
.fade-in.visible .news-item:nth-child(3),
.fade-in.visible .pub-list article:nth-child(3) { animation-delay: 0.3s; }

.fade-in.visible .panel:nth-child(4),
.fade-in.visible .news-item:nth-child(4),
.fade-in.visible .pub-list article:nth-child(4) { animation-delay: 0.4s; }

.fade-in.visible .pub-list article:nth-child(5) { animation-delay: 0.5s; }
.fade-in.visible .pub-list article:nth-child(6) { animation-delay: 0.6s; }
.fade-in.visible .pub-list article:nth-child(7) { animation-delay: 0.7s; }
.fade-in.visible .pub-list article:nth-child(8) { animation-delay: 0.8s; }
.fade-in.visible .pub-list article:nth-child(9) { animation-delay: 0.9s; }

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

/* ============================================
   GLITCH TEXT EFFECT (subtle)
   ============================================ */
.glitch-text {
  position: relative;
}

.glitch-text:hover {
  animation: glitch 0.3s ease;
}

@keyframes glitch {
  0%, 100% { transform: translate(0); }
  20% { transform: translate(-2px, 2px); }
  40% { transform: translate(-2px, -2px); }
  60% { transform: translate(2px, 2px); }
  80% { transform: translate(2px, -2px); }
}

/* ============================================
   CARD TILT & HOVER EFFECTS
   ============================================ */
.panel,
.hero-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  transform-style: preserve-3d;
}

.panel:hover,
.hero-card:hover {
  box-shadow: var(--shadow);
}

/* ============================================
   PILL ANIMATION
   ============================================ */
.pill-list li {
  transition: all 0.3s ease;
  cursor: default;
}

.pill-list li:hover {
  transform: translateY(-3px) scale(1.05);
  background: var(--accent);
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(79, 70, 229, 0.3);
}

/* ============================================
   SOCIAL LINKS BOUNCE
   ============================================ */
.social-links a {
  animation: bounceIn 0.5s ease forwards;
  opacity: 0;
}

.social-links a:nth-child(1) { animation-delay: 0.1s; }
.social-links a:nth-child(2) { animation-delay: 0.2s; }
.social-links a:nth-child(3) { animation-delay: 0.3s; }
.social-links a:nth-child(4) { animation-delay: 0.4s; }
.social-links a:nth-child(5) { animation-delay: 0.5s; }
.social-links a:nth-child(6) { animation-delay: 0.6s; }

@keyframes bounceIn {
  0% {
    opacity: 0;
    transform: scale(0.3) translateY(20px);
  }
  50% {
    transform: scale(1.1) translateY(-5px);
  }
  70% {
    transform: scale(0.9) translateY(2px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* ============================================
   PUBLICATION CARDS ENHANCED
   ============================================ */
.pub-list article {
  position: relative;
  overflow: hidden;
}

.pub-list article::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 3px;
  background: var(--accent);
  transform: scaleY(0);
  transition: transform 0.3s ease;
  transform-origin: bottom;
}

.pub-list article:hover::before {
  transform: scaleY(1);
  transform-origin: top;
}

.pub-list article h3 a {
  background: linear-gradient(90deg, var(--accent), var(--accent));
  background-size: 0% 2px;
  background-repeat: no-repeat;
  background-position: left bottom;
  transition: background-size 0.3s ease;
}

.pub-list article:hover h3 a {
  background-size: 100% 2px;
}

/* ============================================
   BUTTON SHINE EFFECT
   ============================================ */
.button.primary {
  position: relative;
  overflow: hidden;
}

.button.primary::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    45deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  transform: translateX(-100%) rotate(45deg);
  transition: none;
}

.button.primary:hover::after {
  animation: shine 0.6s ease;
}

@keyframes shine {
  from {
    transform: translateX(-100%) rotate(45deg);
  }
  to {
    transform: translateX(100%) rotate(45deg);
  }
}

/* ============================================
   SOFTWARE CARDS GLOW
   ============================================ */
a.software-panel {
  position: relative;
}

a.software-panel::after {
  content: '';
  position: absolute;
  inset: -2px;
  background: linear-gradient(45deg, var(--accent), var(--accent-light), var(--accent));
  border-radius: var(--radius);
  z-index: -1;
  opacity: 0;
  transition: opacity 0.3s ease;
}

a.software-panel:hover::after {
  opacity: 1;
  animation: borderGlow 2s linear infinite;
}

@keyframes borderGlow {
  0%, 100% { filter: hue-rotate(0deg); }
  50% { filter: hue-rotate(30deg); }
}

/* ============================================
   FLOATING ANIMATION FOR HERO CARD
   ============================================ */
.hero-card {
  animation: float 6s ease-in-out infinite;
}

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

/* Disable float on hover to allow tilt */
.hero-card:hover {
  animation: none;
}

/* ============================================
   LOGO PULSE
   ============================================ */
.logo {
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(79, 70, 229, 0.4); }
  50% { box-shadow: 0 0 0 10px rgba(79, 70, 229, 0); }
}

/* ============================================
   RESPONSIVE ADJUSTMENTS FOR ANIMATIONS
   ============================================ */
@media (max-width: 720px) {
  .stat-number {
    font-size: 2.2rem;
  }
  
  .typing-container {
    font-size: 0.95rem;
    min-height: 2.5em;
  }
  
  .hero-card {
    animation: none; /* Disable float on mobile */
  }
}

/* ============================================
   RESEARCH INTERESTS SECTION
   ============================================ */
.research-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-top: 32px;
}

.research-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(79, 70, 229, 0.08);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.research-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow);
  border-color: var(--accent-light);
}

.research-illustration {
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.research-illustration.training {
  background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
}

.research-illustration.inference {
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
}

.research-illustration.systems {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
}

.research-illustration.optimization {
  background: linear-gradient(135deg, #fce7f3 0%, #fbcfe8 100%);
}

body.dark-mode .research-illustration.training {
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.2) 0%, rgba(99, 102, 241, 0.15) 100%);
}

body.dark-mode .research-illustration.inference {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.2) 0%, rgba(52, 211, 153, 0.15) 100%);
}

body.dark-mode .research-illustration.systems {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2) 0%, rgba(251, 191, 36, 0.15) 100%);
}

body.dark-mode .research-illustration.optimization {
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.2) 0%, rgba(244, 114, 182, 0.15) 100%);
}

.research-svg {
  width: 160px;
  height: auto;
}

.svg-node {
  fill: var(--surface);
  stroke: var(--accent);
  stroke-width: 2;
  transition: all 0.3s ease;
}

.svg-node.accent {
  fill: rgba(79, 70, 229, 0.15);
}

.svg-node-circle {
  fill: var(--surface);
  stroke: var(--accent);
  stroke-width: 2;
}

.svg-node-circle.accent {
  fill: var(--accent);
  stroke: var(--accent);
}

.svg-node-circle.faded {
  opacity: 0.3;
  stroke-dasharray: 3 2;
}

.svg-node-inner {
  fill: rgba(79, 70, 229, 0.2);
  stroke: none;
}

.svg-line {
  stroke: var(--accent);
  stroke-width: 2;
  opacity: 0.6;
}

.svg-line.faded {
  opacity: 0.2;
  stroke-dasharray: 4 3;
}

.svg-line.dashed {
  stroke-dasharray: 4 4;
  opacity: 0.4;
}

.svg-line-vert {
  stroke: var(--accent);
  stroke-width: 1.5;
}

.svg-arrow {
  stroke: var(--accent);
  stroke-width: 2;
  fill: none;
}

.svg-arrow-head {
  fill: var(--accent);
}

.svg-arrow-head.small {
  fill: var(--accent);
}

.svg-gradient-arrow {
  stroke: var(--accent);
  stroke-width: 2;
  fill: none;
}

.svg-label {
  font-family: "Space Grotesk", sans-serif;
  font-size: 10px;
  font-weight: 600;
  fill: var(--accent);
  text-anchor: middle;
}

.svg-label.small {
  font-size: 8px;
}

.svg-label.tiny {
  font-size: 7px;
}

.svg-label.center {
  font-size: 14px;
  fill: white;
}

body.dark-mode .svg-node {
  fill: rgba(30, 41, 59, 0.8);
  stroke: var(--accent-light);
}

body.dark-mode .svg-node.accent {
  fill: rgba(129, 140, 248, 0.25);
}

body.dark-mode .svg-node-circle {
  fill: rgba(30, 41, 59, 0.8);
  stroke: var(--accent-light);
}

body.dark-mode .svg-node-circle.accent {
  fill: var(--accent-light);
}

body.dark-mode .svg-line,
body.dark-mode .svg-arrow,
body.dark-mode .svg-gradient-arrow,
body.dark-mode .svg-line-vert {
  stroke: var(--accent-light);
}

body.dark-mode .svg-arrow-head {
  fill: var(--accent-light);
}

body.dark-mode .svg-label {
  fill: var(--accent-light);
}

.research-content {
  padding: 24px;
}

.research-content h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 10px;
}

.research-content h3 i {
  color: var(--accent);
  font-size: 1rem;
}

.research-content > p {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 16px;
  line-height: 1.5;
}

.research-topics {
  list-style: none;
  padding: 0;
  margin: 0;
}

.research-topics li {
  font-size: 0.85rem;
  color: var(--muted);
  padding: 6px 0;
  border-bottom: 1px solid var(--highlight);
  line-height: 1.4;
}

.research-topics li:last-child {
  border-bottom: none;
}

.research-topics li strong {
  color: var(--ink);
  font-weight: 600;
}

body.dark-mode .research-card {
  background: rgba(30, 41, 59, 0.8);
  border-color: rgba(129, 140, 248, 0.1);
}

body.dark-mode .research-card:hover {
  border-color: var(--accent-light);
}

@media (max-width: 900px) {
  .research-grid {
    grid-template-columns: 1fr;
  }
  
  .research-illustration {
    height: 120px;
  }
}

/* ============================================
   TIMELINE SECTION (Horizontal)
   ============================================ */
.timeline-horizontal {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 20px 0;
  margin-top: 16px;
}

.timeline-h-line {
  position: absolute;
  top: 32px;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-light));
  border-radius: 2px;
}

.timeline-h-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  z-index: 1;
}

.timeline-h-marker {
  width: 14px;
  height: 14px;
  background: var(--accent);
  border-radius: 50%;
  border: 3px solid var(--surface);
  box-shadow: 0 0 0 3px var(--accent-light);
  margin-bottom: 12px;
  transition: all 0.3s ease;
}

.timeline-h-item:hover .timeline-h-marker {
  transform: scale(1.3);
  box-shadow: 0 0 0 4px var(--accent-light), 0 0 12px rgba(79, 70, 229, 0.4);
}

.timeline-h-content {
  background: var(--surface);
  padding: 12px 10px;
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(79, 70, 229, 0.08);
  transition: all 0.3s ease;
  width: 100%;
  max-width: 160px;
}

.timeline-h-item:hover .timeline-h-content {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: var(--accent-light);
}

.timeline-h-date {
  display: block;
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 4px;
}

.timeline-h-content h4 {
  font-size: 0.85rem;
  margin-bottom: 2px;
  color: var(--ink);
  font-weight: 600;
}

.timeline-h-content p {
  font-size: 0.72rem;
  color: var(--muted);
  margin: 0;
  line-height: 1.3;
}

/* Dark mode horizontal timeline */
body.dark-mode .timeline-h-content {
  background: rgba(30, 41, 59, 0.8);
  border-color: rgba(129, 140, 248, 0.1);
}

body.dark-mode .timeline-h-item:hover .timeline-h-content {
  border-color: var(--accent-light);
}

body.dark-mode .timeline-h-marker {
  border-color: var(--surface-dark);
  box-shadow: 0 0 0 3px rgba(129, 140, 248, 0.3);
}

/* Responsive horizontal timeline */
@media (max-width: 720px) {
  .timeline-horizontal {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }
  
  .timeline-h-line {
    top: 0;
    bottom: 0;
    left: 20px;
    right: auto;
    width: 3px;
    height: auto;
    background: linear-gradient(180deg, var(--accent), var(--accent-light));
  }
  
  .timeline-h-item {
    flex-direction: row;
    align-items: flex-start;
    text-align: left;
    padding-left: 50px;
    padding-bottom: 16px;
  }
  
  .timeline-h-marker {
    position: absolute;
    left: 14px;
    margin-bottom: 0;
  }
  
  .timeline-h-content {
    max-width: none;
    padding: 10px 14px;
  }
}

/* ============================================
   TALKS SECTION
   ============================================ */
.talks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}

.talk-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(79, 70, 229, 0.08);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.talk-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--accent);
}

.talk-card.keynote::before { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.talk-card.conference::before { background: linear-gradient(90deg, #8b5cf6, #a78bfa); }
.talk-card.invited::before { background: linear-gradient(90deg, #10b981, #34d399); }

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

.talk-type {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
  margin-bottom: 12px;
}

.talk-type i {
  margin-right: 6px;
}

.talk-card.keynote .talk-type { color: #f59e0b; }
.talk-card.conference .talk-type { color: #8b5cf6; }
.talk-card.invited .talk-type { color: #10b981; }

.talk-card h3 {
  font-size: 1.05rem;
  font-family: "Space Grotesk", sans-serif;
  margin-bottom: 10px;
  line-height: 1.4;
}

.talk-venue {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 10px;
}

.talk-venue i {
  margin-right: 6px;
  color: var(--accent);
}

.talk-desc {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 16px;
}

.talk-links {
  display: flex;
  gap: 10px;
}

.talk-link {
  font-size: 0.8rem;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 8px;
  background: var(--highlight);
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.talk-link:hover {
  background: var(--accent);
  color: white;
}

/* Dark mode talks */
body.dark-mode .talk-card {
  background: rgba(30, 41, 59, 0.8);
  border-color: rgba(129, 140, 248, 0.1);
}

body.dark-mode .talk-link {
  background: rgba(129, 140, 248, 0.15);
  color: var(--accent-light);
}

body.dark-mode .talk-link:hover {
  background: var(--accent-light);
  color: #0f172a;
}

/* ============================================
   CITATION METRICS SECTION
   ============================================ */
.metrics-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
  margin-bottom: 24px;
}

.metric-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 32px 24px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(79, 70, 229, 0.08);
  transition: all 0.3s ease;
  text-decoration: none;
  display: block;
}

.metric-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow);
  border-color: var(--accent);
}

.metric-icon {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin: 0 auto 20px;
  transition: all 0.3s ease;
}

.metric-icon.scholar {
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.1), rgba(129, 140, 248, 0.2));
  color: var(--accent);
}

.metric-icon.citations {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(52, 211, 153, 0.2));
  color: #10b981;
}

.metric-icon.hindex {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(251, 191, 36, 0.2));
  color: #f59e0b;
}

.metric-icon.students {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(96, 165, 250, 0.2));
  color: #3b82f6;
}

.metric-card:hover .metric-icon {
  transform: scale(1.1) rotate(-5deg);
}

.metric-value {
  font-size: 3rem;
  font-weight: 700;
  font-family: "Fraunces", serif;
  color: var(--ink);
  line-height: 1;
  margin-bottom: 8px;
}

.metric-label {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 8px;
}

.metric-source,
.metric-note {
  font-size: 0.75rem;
  color: var(--accent);
  font-weight: 500;
}

.metrics-update {
  text-align: center;
  font-size: 0.85rem;
}

.metrics-update i {
  margin-right: 6px;
}

/* Dark mode metrics */
body.dark-mode .metric-card {
  background: rgba(30, 41, 59, 0.8);
  border-color: rgba(129, 140, 248, 0.1);
}

body.dark-mode .metric-card:hover {
  border-color: var(--accent-light);
}

body.dark-mode .metric-icon.scholar {
  background: linear-gradient(135deg, rgba(129, 140, 248, 0.15), rgba(129, 140, 248, 0.25));
  color: var(--accent-light);
}

body.dark-mode .metric-icon.citations {
  background: linear-gradient(135deg, rgba(52, 211, 153, 0.15), rgba(52, 211, 153, 0.25));
  color: #34d399;
}

body.dark-mode .metric-icon.hindex {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.15), rgba(251, 191, 36, 0.25));
  color: #fbbf24;
}

body.dark-mode .metric-icon.students {
  background: linear-gradient(135deg, rgba(96, 165, 250, 0.15), rgba(96, 165, 250, 0.25));
  color: #60a5fa;
}

/* ============================================
   CV DOWNLOAD BUTTON
   ============================================ */
.button.secondary {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.button.secondary:hover {
  background: linear-gradient(135deg, #059669, #047857);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(16, 185, 129, 0.35);
}

.button.secondary i {
  font-size: 0.9rem;
}

/* ============================================
   RESPONSIVE - NEW SECTIONS
   ============================================ */
@media (max-width: 900px) {
  .metrics-container {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .metrics-container {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .metric-value {
    font-size: 2.2rem;
  }
  
  .talks-grid {
    grid-template-columns: 1fr;
  }
}

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