:root {
  --bg: #131b24;
  --bg-subtle: #1b2633;
  --bg-card: #1b2633;
  --bg-elevated: #233142;
  --text: #e6edf3;
  --text-muted: #b8c5d3;
  --text-light: #8fa3b8;
  --heading: #f0f6fc;
  --section-heading: #8ecae6;
  --accent: #7cc4fa;
  --accent-hover: #bae0fd;
  --accent-soft: #1f3247;
  --accent-border: #364f6b;
  --highlight: #f6bd60;
  --border: #2a394a;
  --max-width: 960px;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif: "Source Serif 4", Georgia, Cambria, "Times New Roman", Times, serif;
  --font-mono: "JetBrains Mono", "Fira Code", Consolas, Monaco, monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  color-scheme: dark;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* Header & Navigation — minimalist style inspired by Daniel Fadel & Udhav Fowdar */
.site-header {
  border-bottom: 1px solid var(--border);
  background-color: rgba(19, 27, 36, 0.94);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
}

.nav-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.95rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.site-brand {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--heading);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.site-brand:hover {
  color: var(--accent);
}

.site-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem 1.35rem;
}

.site-nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.site-nav a.nav-cv-btn {
  background-color: var(--accent-soft);
  color: var(--accent);
  border: 1px solid var(--accent-border);
  padding: 0.28rem 0.72rem;
  border-radius: 4px;
  font-size: 0.88rem;
  font-weight: 600;
}

.site-nav a.nav-cv-btn:hover {
  background-color: var(--accent);
  color: #0d1520;
  border-color: var(--accent);
}

/* Main Content Container */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}

/* Typography */
h1, h2, h3, h4 {
  font-family: var(--font-serif);
  line-height: 1.3;
  margin-top: 0;
}

h1 {
  color: var(--heading);
  font-size: 2.15rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
  letter-spacing: -0.015em;
}

h2 {
  color: var(--section-heading);
  font-size: 1.45rem;
  font-weight: 700;
  margin-top: 2.4rem;
  margin-bottom: 1rem;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid var(--border);
}

h3 {
  color: var(--heading);
  font-size: 1.15rem;
  font-weight: 600;
  margin-top: 1.5rem;
  margin-bottom: 0.55rem;
}

p {
  margin-top: 0;
  margin-bottom: 1rem;
}

a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: rgba(124, 196, 250, 0.38);
  text-underline-offset: 3px;
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
}

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

/* Home Hero Layout */
.hero-grid {
  display: grid;
  grid-template-columns: 1fr 295px;
  gap: 2.75rem;
  align-items: start;
}

.subtitle {
  font-size: 1.06rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 1.25rem;
}

.profile-card {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1.15rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.22);
}

.profile-photo {
  width: 100%;
  height: auto;
  border-radius: 4px;
  display: block;
  margin-bottom: 0.5rem;
  border: 1px solid var(--border);
}

.photo-caption {
  font-size: 0.78rem;
  color: var(--text-light);
  text-align: center;
  margin-bottom: 1rem;
  line-height: 1.4;
}

.contact-block {
  font-size: 0.89rem;
  line-height: 1.55;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  padding-top: 0.85rem;
  margin-top: 0.6rem;
}

.contact-block strong {
  color: var(--heading);
  display: block;
  margin-bottom: 0.2rem;
}

.profile-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.9rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border);
}

.profile-links a {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--accent);
  background: var(--bg-elevated);
  border: 1px solid var(--accent-border);
  padding: 0.24rem 0.6rem;
  border-radius: 4px;
  transition: all 0.15s ease;
}

.profile-links a:hover {
  background: var(--accent);
  color: #0d1520;
  border-color: var(--accent);
}

/* Specialties / Research Pillars Grid */
.specialties-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  margin-top: 1rem;
}

.specialty-card {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 4px;
  padding: 1.15rem 1.25rem;
}

.specialty-card h3 {
  color: var(--section-heading);
  margin-top: 0;
  margin-bottom: 0.45rem;
  font-size: 1.05rem;
}

.specialty-card p {
  font-size: 0.92rem;
  color: var(--text-muted);
  margin-bottom: 0;
}

/* Badges & Pills for Publications and Talks */
.badge-row {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-left: 0.3rem;
  vertical-align: baseline;
}

.badge {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.2;
  padding: 0.2rem 0.54rem;
  border-radius: 3px;
  text-decoration: none !important;
  border: 1px solid var(--accent-border);
  background-color: var(--bg-elevated);
  color: var(--accent);
  transition: all 0.15s ease;
}

.badge:hover {
  background-color: var(--accent);
  color: #0d1520 !important;
  border-color: var(--accent);
}

.badge-cta {
  font-size: 0.94rem;
  padding: 0.55rem 1.1rem;
  background-color: var(--accent);
  color: #0d1520 !important;
  border-color: var(--accent);
  border-radius: 4px;
}

.badge-cta:hover {
  background-color: var(--highlight);
  color: #0d1520 !important;
  border-color: var(--highlight);
}

.badge-video {
  background-color: #36191d;
  color: #fca5a5;
  border-color: #7f1d1d;
}

.badge-video:hover {
  background-color: #ef4444;
  color: #ffffff !important;
  border-color: #ef4444;
}

.badge-slides {
  background-color: #172b46;
  color: #93c5fd;
  border-color: #2563eb;
}

.badge-slides:hover {
  background-color: #3b82f6;
  color: #ffffff !important;
  border-color: #3b82f6;
}

.badge-award {
  background-color: #362812;
  color: #fcd34d;
  border-color: #92400e;
}

.badge-geoatoms {
  background-color: #132f23;
  color: #86efac;
  border-color: #166534;
}

.badge-geoatoms:hover {
  background-color: #22c55e;
  color: #091912 !important;
  border-color: #22c55e;
}

/* Publication and Talk Lists */
.pub-list,
.talk-list {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.pub-item,
.talk-item {
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--border);
}

.pub-item:last-child,
.talk-item:last-child {
  border-bottom: none;
}

.pub-number {
  font-weight: 600;
  color: var(--text-light);
  margin-right: 0.35rem;
  font-size: 0.92rem;
}

.pub-title {
  font-weight: 600;
  color: var(--heading);
}

.pub-authors {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.pub-venue {
  font-size: 0.93rem;
  color: var(--text-muted);
  margin-top: 0.18rem;
}

.pub-venue strong {
  color: var(--text);
}

.pub-summary {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  background: var(--bg-subtle);
  padding: 0.65rem 0.9rem;
  border-left: 2px solid var(--accent);
  border-radius: 0 4px 4px 0;
}

details.abstract-toggle {
  display: inline;
  margin-left: 0.25rem;
}

details.abstract-toggle summary {
  display: inline-block;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.16rem 0.5rem;
  border-radius: 3px;
  border: 1px solid var(--border);
  background: var(--bg-subtle);
  color: var(--text-muted);
  list-style: none;
  user-select: none;
  transition: all 0.15s ease;
}

details.abstract-toggle summary::-webkit-details-marker {
  display: none;
}

details.abstract-toggle summary:hover {
  border-color: var(--accent);
  color: var(--accent);
}

details.abstract-toggle[open] .pub-summary {
  display: block;
}

/* Filter Bar */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 1.2rem 0 1.5rem;
}

.filter-btn {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 0.4rem 0.88rem;
  border-radius: 4px;
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s ease;
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--accent);
  color: #0d1520;
  border-color: var(--accent);
  font-weight: 600;
}

/* CV Entries */
.cv-entry {
  display: grid;
  grid-template-columns: 155px 1fr;
  gap: 1.25rem;
  padding: 0.78rem 0;
  border-bottom: 1px solid var(--border);
}

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

.cv-date {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--section-heading);
}

.cv-details strong {
  color: var(--heading);
}

.cv-details .cv-sub {
  font-size: 0.92rem;
  color: var(--text-muted);
  margin-top: 0.22rem;
}

/* Code & Callout Boxes */
.callout {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  padding: 1.15rem 1.35rem;
  border-radius: 4px;
  margin: 1.25rem 0;
}

pre {
  background: #0b1017;
  color: #e6edf3;
  border: 1px solid var(--border);
  padding: 1rem 1.25rem;
  border-radius: 6px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.86rem;
  line-height: 1.55;
}

code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: var(--bg-elevated);
  color: #bae0fd;
  padding: 0.15rem 0.38rem;
  border-radius: 3px;
}

pre code {
  background: none;
  color: inherit;
  padding: 0;
}

/* Tables */
.clean-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0 1.5rem;
  font-size: 0.92rem;
}

.clean-table th,
.clean-table td {
  text-align: left;
  padding: 0.7rem 0.85rem;
  border-bottom: 1px solid var(--border);
}

.clean-table th {
  color: var(--section-heading);
  font-weight: 600;
  background: var(--bg-subtle);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-subtle);
  padding: 2rem 1.5rem;
  font-size: 0.88rem;
  color: var(--text-light);
}

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

/* Responsive adjustments */
@media (max-width: 780px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
  .specialties-grid {
    grid-template-columns: 1fr;
  }
  .cv-entry {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }
}
