@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Oswald:wght@400;500;600&display=swap');

:root {
  /* Light Theme Colors */
  --bg-color: #fcfcfc;
  --surface-color: #ffffff;
  --text-primary: #1f2937;
  --text-secondary: #4b5563;
  --accent-color: #2563eb;
  --accent-hover: #1d4ed8;
  --border-color: #e5e7eb;
  --nav-bg: rgba(15, 23, 42, 0.95);
  --nav-border: rgba(255, 255, 255, 0.1);
  --nav-text: #cbd5e1;
  --nav-text-hover: #ffffff;
  --nav-accent: #e01709;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --glass-bg: rgba(255, 255, 255, 0.8);
  --glass-border: rgba(255, 255, 255, 0.3);
}

@media (prefers-color-scheme: dark) {
  :root {
    /* Dark Theme Colors */
    --bg-color: #0f172a;
    --surface-color: #1e293b;
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --accent-color: #3b82f6;
    --accent-hover: #60a5fa;
    --border-color: #334155;
    --nav-bg: rgba(15, 23, 42, 0.95);
    --nav-border: rgba(255, 255, 255, 0.1);
    --nav-text: #cbd5e1;
    --nav-text-hover: #ffffff;
    --nav-accent: #ef4444;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
    --glass-bg: rgba(30, 41, 59, 0.8);
    --glass-border: rgba(255, 255, 255, 0.1);
  }
}

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

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-primary);
  line-height: 1.6;
  transition: background-color 0.3s ease, color 0.3s ease;
}

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

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

h1, h2, h3, h4, h5, h6 {
  font-family: 'Oswald', sans-serif;
  font-weight: 500;
  line-height: 1.2;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

/* Navigation */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--nav-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--nav-border);
  padding: 1rem 0;
  transition: background 0.3s ease;
}

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

.nav-links {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav-links li a {
  font-family: 'Oswald', sans-serif;
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--nav-text);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  position: relative;
}

.nav-links li a:hover,
.nav-links li a.active {
  color: var(--nav-accent);
  text-decoration: none;
}

.nav-links li a.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--nav-accent);
  border-radius: 2px;
}

/* Layout */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.main-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  padding: 3rem 0;
}

@media (min-width: 768px) {
  .main-layout {
    grid-template-columns: 320px 1fr;
  }
}

/* Sidebar Profile */
.profile-card {
  background: var(--surface-color);
  border-radius: 1rem;
  padding: 2rem;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
  text-align: center;
  position: sticky;
  top: 6rem;
}

.profile-card img {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 1.5rem;
  border: 4px solid var(--bg-color);
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s ease;
}

.profile-card img:hover {
  transform: scale(1.05);
}

.profile-card .recognition-strip {
  justify-content: center;
  margin-top: 0;
}

.profile-card h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.profile-card p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.profile-card .social-links {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.5rem;
}

.profile-card .social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--bg-color);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  transition: all 0.2s ease;
}

.profile-card .social-links a:hover {
  background: var(--accent-color);
  color: white;
  border-color: var(--accent-color);
  transform: translateY(-2px);
}

.profile-card .social-links svg {
  width: 26px;
  height: 26px;
  margin: 0;
  fill: currentColor;
}

/* Content Area */
.content-area {
  background: var(--surface-color);
  border-radius: 1rem;
  padding: 2.5rem;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
}

.section-title {
  font-size: 1.75rem;
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--border-color);
  display: inline-block;
}

/* Publication List */
.publication-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.publication-item {
  padding: 1.5rem;
  background: var(--bg-color);
  border-radius: 0.75rem;
  border: 1px solid var(--border-color);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.publication-item:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.publication-title {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.publication-authors {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
}

.publication-venue {
  font-style: italic;
  font-weight: 500;
}

.publication-links {
  margin-top: 0.75rem;
  display: flex;
  gap: 0.75rem;
}

.tag {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: rgba(37, 99, 235, 0.1);
  color: var(--accent-color);
  border-radius: 1rem;
  font-size: 0.85rem;
  font-weight: 500;
  transition: background 0.2s ease;
}

.tag.award {
  background: rgba(220, 38, 38, 0.1);
  color: #dc2626;
}

@media (prefers-color-scheme: dark) {
  .tag.award {
    background: rgba(248, 113, 113, 0.1);
    color: #f87171;
  }
}


/* Software & Projects */
.project-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-color);
  border-radius: 0.75rem;
  border: 1px solid var(--border-color);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  margin-bottom: 2rem;
}

@media (min-width: 768px) {
  .project-card {
    flex-direction: row;
  }
}

.project-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.project-image {
  flex: 0 0 250px;
  background: var(--surface-color);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

@media (min-width: 768px) {
  .project-image {
    border-bottom: none;
    border-right: 1px solid var(--border-color);
  }
}

.project-image img {
  max-width: 100%;
  max-height: 180px;
  object-fit: contain;
}

.project-content {
  padding: 1.5rem;
  flex: 1;
}

.project-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

/* Teaching */
.course-item {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.course-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.course-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

/* Utilities */
.text-bold { font-weight: 600; }
.mt-4 { margin-top: 1rem; }
.mb-4 { margin-bottom: 1rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }

/* ===== Publications page ===== */

.pub-page {
  padding: 2.5rem 0 4rem;
}

.pub-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  padding-bottom: 1.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.pub-header-name {
  font-family: 'Oswald', sans-serif;
  font-size: 1.5rem;
  font-weight: 500;
  margin: 0;
  color: var(--accent-color);
}

.pub-header-links {
  display: flex;
  gap: 0.5rem;
}

.pub-header-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  background: var(--surface-color);
  transition: all 0.2s ease;
}

.pub-header-links a:hover {
  color: var(--accent-color);
  border-color: var(--accent-color);
  text-decoration: none;
  transform: translateY(-1px);
}

.pub-header-links svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

/* ===== CV page ===== */

.cv-toc {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.6rem;
  padding: 1rem 1.25rem;
  margin: 0 0 2rem;
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  font-size: 0.9rem;
}

.cv-toc a {
  color: var(--text-secondary);
  border-bottom: 1px dotted transparent;
}

.cv-toc a:hover {
  color: var(--accent-color);
  border-bottom-color: var(--accent-color);
  text-decoration: none;
}

.cv-toc a + a::before {
  content: "·";
  margin-right: 0.6rem;
  color: var(--border-color);
}

.cv-section {
  margin-bottom: 2.5rem;
  scroll-margin-top: 5.5rem;
}

.cv-section h3 {
  font-family: 'Oswald', sans-serif;
  font-size: 1.3rem;
  font-weight: 500;
  color: var(--accent-color);
  margin-bottom: 1rem;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid var(--border-color);
}

.cv-entry {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border-color);
  line-height: 1.6;
}

.cv-entry:last-child {
  border-bottom: none;
}

.cv-entry-body {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-top: 0.25rem;
}

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

.cv-list > li {
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--border-color);
  line-height: 1.55;
}

.cv-list > li:last-child {
  border-bottom: none;
}

.cv-list-blocks > li {
  padding: 0.85rem 0;
}

.cv-list-blocks ul {
  list-style: disc;
  padding-left: 1.5rem;
  margin-top: 0.4rem;
  color: var(--text-secondary);
}

.cv-list-blocks ul li {
  padding: 0.15rem 0;
}

.cv-date {
  display: inline-block;
  min-width: 7.5rem;
  font-weight: 600;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
  margin-right: 0.5rem;
}

.cv-pubs {
  list-style: decimal;
  padding-left: 2.5rem;
  margin: 0;
}

.cv-pubs li {
  padding: 0.55rem 0 0.55rem 0.4rem;
  border-bottom: 1px solid var(--border-color);
  line-height: 1.55;
  color: var(--text-primary);
}

.cv-pubs li::marker {
  font-weight: 600;
  color: var(--text-secondary);
}

.cv-pubs li:last-child {
  border-bottom: none;
}

.cv-talks {
  list-style: none;
  padding: 0;
  margin: 0;
}

.cv-talks > li {
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--border-color);
  line-height: 1.55;
}

.cv-talks > li:last-child {
  border-bottom: none;
}

.cv-tag {
  display: inline-block;
  padding: 0.1rem 0.5rem;
  background: rgba(37, 99, 235, 0.1);
  color: var(--accent-color);
  border-radius: 0.25rem;
  font-size: 0.8em;
  font-weight: 600;
  font-style: normal;
  margin-left: 0.35rem;
  vertical-align: middle;
}

.cv-tag.award {
  background: rgba(220, 38, 38, 0.1);
  color: #dc2626;
}

@media (prefers-color-scheme: dark) {
  .cv-tag.award {
    background: rgba(248, 113, 113, 0.15);
    color: #f87171;
  }
}

/* ===== Home page redesign ===== */

.page-stack {
  padding: 2.5rem 0 4rem;
}


.recognition-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  position: relative;
  z-index: 1;
}

.recognition-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.9rem;
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: 2rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all 0.2s ease;
}

.recognition-badge:hover {
  border-color: var(--accent-color);
  color: var(--accent-color);
  transform: translateY(-1px);
  text-decoration: none;
  box-shadow: var(--shadow-sm);
}

.recognition-badge .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-color);
  flex-shrink: 0;
}

.recognition-badge.award .dot {
  background: #dc2626;
}

@media (prefers-color-scheme: dark) {
  .recognition-badge.award .dot {
    background: #f87171;
  }
}

/* Section heading */
.eyebrow-heading {
  font-family: 'Oswald', sans-serif;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 0.78rem;
  color: var(--accent-color);
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.content-area .section-title {
  font-size: 1.6rem;
  margin-bottom: 1.25rem;
  border-bottom: none;
  padding-bottom: 0;
  display: block;
  position: relative;
}

.content-area .section-title::after {
  content: '';
  display: block;
  width: 40px;
  height: 3px;
  background: var(--accent-color);
  margin-top: 0.5rem;
  border-radius: 2px;
}

/* Research card grid */
.research-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.1rem;
}

.research-card {
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  border-left: 3px solid var(--accent-color);
  border-radius: 0.75rem;
  padding: 1.5rem 1.5rem 1.4rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-left-color 0.2s ease;
}

.research-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-left-color: var(--nav-accent);
}

.research-card-title {
  font-family: 'Oswald', sans-serif;
  font-size: 1.15rem;
  font-weight: 500;
  margin-bottom: 0.7rem;
  color: var(--text-primary);
  letter-spacing: 0.2px;
}

.research-card p {
  font-size: 0.97rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin: 0;
}

.research-card p + p {
  margin-top: 0.6rem;
}

/* Profile card refinements */
.profile-card .profile-name {
  font-family: 'Oswald', sans-serif;
  font-size: 1.35rem;
  margin-bottom: 0.25rem;
  color: var(--text-primary);
}

.profile-card .profile-meta {
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--text-secondary);
}

.profile-card .profile-meta a {
  color: var(--accent-color);
}

.profile-card .profile-divider {
  height: 1px;
  background: var(--border-color);
  margin: 1.25rem 0;
}
