/* ===== Reset & Variables ===== */
:root {
  /* --bg: #f8f9fb; */
  --bg: #f7f5f3;
  --white: #ffffff;
  --text: #1a1a2e;
  --text-secondary: #555770;
  --text-muted: #8b8da3;
  --accent: #4361ee;
  --accent-muted: #7086eb;
  --accent-light: #eef1ff;
  --border: #e6e8f0;
  --border-light: #f0f1f5;
  --pink: #fce4ec;
  --pink-dark: #e91e63;
  --green: #e8f5e9;
  --green-dark: #2e7d32;
  --blue-card: #4361ee;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.08);
  --max-w: 800px;
  --nav-h: 72px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: "DM Serif Display", Georgia, serif;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Page-specific background: home keeps warm tone, all others white */
body:not([data-page="home"]) {
  --bg: #ffffff;
}

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}
body {
  font-family: var(--font);
  font-size: 15px;
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  overflow-x: hidden;
}
a {
  color: inherit;
  text-decoration: none;
}
ul {
  list-style: none;
}
img {
  max-width: 100%;
  display: block;
}

/* ===== Top Navigation — Floating Rounded Square ===== */
.top-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 18px 20px 0;
  z-index: 1000;
  pointer-events: none;
  transform: translateY(30px);
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.top-nav.scrolled {
  transform: translateY(0);
}
.nav-pill {
  display: flex;
  align-items: center;
  gap: 2px;
  background: var(--white);
  border-radius: 18px;
  padding: 7px 8px;
  box-shadow:
    0 2px 24px rgba(0, 0, 0, 0.07),
    0 0 0 1px rgba(0, 0, 0, 0.04);
  pointer-events: all;
  transition: box-shadow var(--transition);
  position: relative;
}
.top-nav.scrolled .nav-pill {
  box-shadow:
    0 4px 30px rgba(0, 0, 0, 0.1),
    0 0 0 1px rgba(0, 0, 0, 0.05);
}
/* Sliding indicator */
.nav-indicator {
  position: absolute;
  top: 7px;
  left: 0;
  height: calc(100% - 14px);
  background: #fef4e4;
  border-radius: 12px;
  transition:
    left 0.4s cubic-bezier(0.4, 0, 0.15, 1),
    width 0.4s cubic-bezier(0.4, 0, 0.15, 1);
  z-index: 0;
  pointer-events: none;
}
.nav-link {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-muted);
  padding: 10px 20px;
  border-radius: 12px;
  transition: color var(--transition);
  white-space: nowrap;
  position: relative;
  z-index: 1;
}
.nav-link:hover {
  color: var(--text);
}
.nav-link.active {
  color: #6b5318;
  font-weight: 600;
}
/* Resume button — separate pill, same height as nav */
.resume-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  color: #213286;
  background: #ced6ff;
  border-radius: 12px;
  padding: 10px 10px;
  pointer-events: all;
  transition: all var(--transition);
  white-space: nowrap;
}
.resume-btn-wrap {
  display: inline-flex;
  align-items: center;
  background: var(--white);
  border-radius: 18px;
  padding: 7px 8px;
  margin-left: 10px;
  box-shadow:
    0 2px 24px rgba(0, 0, 0, 0.07),
    0 0 0 1px rgba(0, 0, 0, 0.04);
  pointer-events: all;
  align-self: stretch;
}
.resume-btn:hover {
  color: #213286;
  background: #8a9dff;
}
.resume-icon {
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes bounce-down {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(4px);
  }
}
.resume-btn:hover .resume-icon {
  animation: bounce-down 0.6s ease 1;
}

.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  pointer-events: all;
  position: fixed;
  top: 18px;
  right: 20px;
  z-index: 1001;
  background: var(--white);
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}
.mobile-menu-btn span {
  width: 20px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all var(--transition);
}
.mobile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 999;
  opacity: 0;
  transition: opacity var(--transition);
}
.mobile-overlay.visible {
  opacity: 1;
  pointer-events: all;
}

/* Page hero (non-home pages) */
.page-hero {
  text-align: center;
  /* padding-top: 10px; */
  /* padding-bottom: 10px; */
}
.page-hero-title {
  font-family: var(--font);
  /* font-size: 2rem; */
  font-weight: 400;
  color: var(--text);
  /* margin-bottom: 12px; */
}
.page-hero-desc {
  font-size: 0.9rem;
}

/* Statement text (About page) */
.statement-text p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.85;
  margin-bottom: 16px;
}
.statement-text p:last-child {
  margin-bottom: 0;
}
.statement-placeholder {
  color: var(--text-muted);
}

/* Web Featured (Beyond page) */
.web-featured {
  margin-bottom: 20px;
}
.web-featured-title {
  font-size: 0.92rem;
  font-weight: 500;
  margin-bottom: 12px;
  line-height: 1.4;
}
.web-featured-card {
  background: #f6f6f6;
  border-radius: 14px;
  padding: 18px 18px 0;
  overflow: hidden;
  height: 360px;
}
.web-featured-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.web-featured-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
}
.web-featured-visit {
  display: inline-flex;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--accent);
  padding: 2px 10px;
  border: 1px solid #a3b1ee;
  border-radius: 12px;
  text-decoration: none;
  transition: all var(--transition);
  white-space: nowrap;
}
.web-featured-visit:hover {
  border-color: #c0caf4;
  color: var(--accent-muted);
}
.web-featured-screens {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.web-featured-img {
  border-radius: 10px 10px 0 0;
  display: block;
}
.web-featured-desktop {
  flex: 7;
  min-width: 0;
}
.web-featured-mobile {
  flex: 2.5;
  min-width: 0;
}

/* Alt variant — inverted layout */
.web-featured-screens-alt {
  align-items: flex-end;
}

/* Project showcase (Beyond page) */
.project-showcase {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.project-showcase .project-link-card {
  flex-direction: row;
  align-items: center;
}
.project-showcase .project-link-card h3 {
  font-size: 0.92rem;
  font-weight: 600;
  margin-bottom: 2px;
}
.project-showcase .project-link-card p {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 0;
}

/* ===== Main Content ===== */
.main-content {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: calc(var(--nav-h) + 40px) 24px 0;
}

/* ===== Sections ===== */
.section {
  padding-top: 30px;
  padding-bottom: 10px;
}
.section-header {
  margin-bottom: 10px;
}
.section-title {
  font-family: var(--font);
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}
.section-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
}

/* .section-alt {
  background: var(--white);
  margin: 0 -24px;
  padding: 60px 24px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
} */

/* ===== Hero ===== */
.hero {
  padding-top: 40px;
  padding-bottom: 40px;
  text-align: center;
}
.hero-profile {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 6px 16px 6px 6px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 50px;
  margin-bottom: 24px;
  text-align: left;
  box-shadow: var(--shadow-sm);
}
.profile-pic-placeholder {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent-light);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.profile-info {
  display: flex;
  flex-direction: column;
}
.profile-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.2;
}
.profile-role {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.4;
}
.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 10px;
}
.hero-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 12px;
  min-width: 120px;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  border: none;
  font-family: inherit;
}
.btn-primary {
  background: var(--text);
  color: var(--white);
}
.btn-primary:hover {
  background: #000;
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}
.btn-secondary {
  background: var(--white);
  color: var(--text);
  /* border: 1px solid var(--border); */
}
.btn-secondary:hover {
  background: var(--bg);
  border-color: #d1d5db;
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}
.hero-title {
  font-family: var(--font);
  font-size: 2.5rem;
  font-weight: 400;
  line-height: 1.2;
  color: var(--text);
  margin-bottom: 20px;
  letter-spacing: -0.02em;
  max-width: 700px;
  margin-inline: auto;
}
.hero-title em {
  font-style: italic;
  color: var(--accent);
}
.hero-subtitle {
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 40px;
  line-height: 1.8;
}
.hero-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 20px;
}
.hero-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  text-align: left;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}
.hero-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  border-radius: var(--radius) var(--radius) 0 0;
}
.card-research::before {
  background: linear-gradient(90deg, #4361ee, #7c3aed);
}
.card-ml::before {
  background: linear-gradient(90deg, #f59e0b, #ef4444);
}
.card-bio::before {
  background: linear-gradient(90deg, #10b981, #06b6d4);
}
.hero-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}
.card-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.card-research .card-icon {
  background: #eef1ff;
  color: #4361ee;
}
.card-ml .card-icon {
  background: #fef3c7;
  color: #f59e0b;
}
.card-bio .card-icon {
  background: #d1fae5;
  color: #10b981;
}
.card-icon svg {
  width: 20px;
  height: 20px;
}
.hero-card h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 6px;
}
.hero-card p {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ===== About Grid ===== */
.about-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.about-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  transition: all var(--transition);
}
.about-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.about-card-icon {
  font-size: 1.5rem;
  margin-bottom: 14px;
}
.about-card h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 10px;
}
.about-card p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.75;
}

/* ===== Education Timeline ===== */
.edu-timeline {
  position: relative;
}
.edu-item {
  display: grid;
  grid-template-columns: 12px 120px 1fr;
  gap: 20px;
  padding-bottom: 20px;
  position: relative;
}
.edu-item:last-child {
  padding-bottom: 0;
}
.edu-marker {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 6px;
}
.edu-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--white);
  border: 3px solid var(--accent);
  z-index: 1;
  flex-shrink: 0;
}
.edu-line {
  width: 2px;
  flex: 1;
  background: var(--border);
  margin-top: 4px;
}
.edu-item:last-child .edu-line {
  display: none;
}
.edu-date {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  font-family: "SF Mono", "Fira Code", monospace;
  padding-top: 2px;
}
.edu-content h3 {
  font-size: 0.92rem;
  font-weight: 400;
  margin-bottom: 4px;
  line-height: 1.4;
}
.edu-content p {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* ===== Publications ===== */
.pub-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.pub-item {
  /* background: #f6f6f6; */
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 20px;
}

.edu-content p {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.pub-title {
  font-size: 0.92rem;
  font-weight: 400;
  margin-bottom: 4px;
  line-height: 1.8;
}
.pub-status {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 2px 10px;
  border-radius: 12px;
  margin-left: 6px;
  vertical-align: middle;
  position: relative;
  top: -1px;
}
.status-pipeline {
  /* background: #edf7ef; */
  color: #2e7d32;
  border: 1px solid #c8e6c9;
}
.status-published {
  /* background: #e8f4fd; */
  color: #1565c0;
  border: 1px solid #bbdefb;
}
.pub-authors {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 16px;
  line-height: 1.6;
}
.pub-author-highlight {
  color: var(--text-secondary);
  font-weight: 500;
}
.pub-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.pub-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--accent);
  padding: 2px 10px;
  border: 1px solid #a3b1ee;
  border-radius: 12px;
  transition: all var(--transition);
  text-decoration: none;
}
.pub-link:hover {
  border-color: #c0caf4;
  color: var(--accent-muted);
}

/* ===== Research ===== */
.research-featured {
  margin-bottom: 16px;
}
.research-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 28px;
  transition: all var(--transition);
}
/* .research-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
} */
.research-featured-title {
  font-size: 0.92rem;
  font-weight: 500;
  margin-bottom: 12px;
  line-height: 1.4;
}
.research-featured-card {
  background: #f6f6f6;
  border-radius: 14px;
  padding: 18px 20px;
}
.research-featured-img {
  width: 100%;
  border-radius: 10px;
  margin-bottom: 14px;
  display: block;
}
.research-featured-card p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 12px;
}
.research-featured-card .research-period {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
}
.research-featured-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.research-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}
.research-card h3 {
  font-size: 0.92rem;
  font-weight: 600;
  margin-bottom: 8px;
  line-height: 1.4;
}
.research-card p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 12px;
}
.research-period {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
}

.other-projects-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 14px;
}
.project-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.project-link-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  color: var(--text-secondary);
  transition: all var(--transition);
}
/* .project-link-card:hover {
  background: var(--accent-light);
  border-color: var(--accent);
  color: var(--accent);
  transform: translateX(4px);
} */
.project-link-icon {
  font-size: 1.1rem;
}

/* ===== Skills ===== */
.skills-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.skill-group {
  background: #f6f6f6;
  border-radius: 14px;
  padding: 18px 20px;
}
.skill-group-title {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text);
  margin-bottom: 14px;
}
.skill-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.skill-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 0.72rem;
  font-weight: 500;
  background: transparent;
  color: var(--accent);
  border: 1px solid #a3b1ee;
  transition: all var(--transition);
  cursor: default;
}
.skill-pill:hover {
  border-color: #c0caf4;
  color: var(--accent-muted);
}
.pill-exp {
  color: var(--accent);
  border-color: #a3b1ee;
}
.pill-exp:hover {
  border-color: #c0caf4;
  color: var(--accent-muted);
}

/* ===== Services ===== */
.services-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.service-card {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 28px;
  transition: all var(--transition);
}
.service-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.service-year-badge {
  flex-shrink: 0;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-light);
  padding: 6px 14px;
  border-radius: 8px;
  font-family: "SF Mono", "Fira Code", monospace;
}
.service-info h3 {
  font-size: 0.92rem;
  font-weight: 600;
  margin-bottom: 6px;
}
.service-info p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ===== Conferences — Flat Layout ===== */
.conf-section-label {
  font-size: 1.2rem;
  font-weight: 500;
  /* text-transform: uppercase; */
  /* letter-spacing: 0.12em; */
  color: var(--text);
  margin-bottom: 25px;
  /* margin-top: 56px; */
}
.conf-flat-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.conf-flat-item {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 20px;
}
.conf-flat-date {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  font-family: "SF Mono", "Fira Code", monospace;
  padding-top: 2px;
  white-space: nowrap;
}
.conf-flat-content h3 {
  font-size: 0.92rem;
  font-weight: 400;
  color: var(--text);
  margin-bottom: 4px;
  line-height: 1.4;
}
.conf-flat-content p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  /* line-height: 1.8; */
}
.conf-flat-content em {
  font-style: italic;
}

/* Lectures & Workshops subsection */
.conf-workshop-list {
  display: flex;
  flex-direction: column;
}
.conf-workshop-item {
  display: flex;
  align-items: baseline;
  gap: 16px;
  /* padding: 20px 0; */
}
.conf-workshop-item:first-child {
  padding-top: 0;
}
.conf-workshop-dash {
  flex-shrink: 0;
  color: var(--text-muted);
  font-size: 1rem;
}
.conf-workshop-item p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.75;
}

/* ===== Footer ===== */
.footer {
  padding: 60px 0 40px;
  text-align: center;
  border-top: 1px solid var(--border-light);
  margin-top: 40px;
}
.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.footer-logo {
  width: 44px;
  height: 44px;
  background: var(--text);
  color: var(--white);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
}
.footer-text {
  font-size: 0.85rem;
  color: var(--text-secondary);
}
.footer-links {
  display: flex;
  gap: 16px;
}
.footer-link {
  color: var(--text-muted);
  transition: color var(--transition);
  display: flex;
}
.footer-link:hover {
  color: var(--text);
}
.footer-copy {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 8px;
}

/* ===== Page Transitions ===== */
.main-content {
  transition:
    opacity 0.35s ease,
    transform 0.35s ease;
}
.main-content.slide-out-left {
  opacity: 0;
  transform: translateX(-40px);
  pointer-events: none;
}
.main-content.slide-out-right {
  opacity: 0;
  transform: translateX(40px);
  pointer-events: none;
}
.main-content.slide-in {
  animation: slideIn 0.4s ease forwards;
}
@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Mobile Floating CV Button - Hidden by default on Desktop/Tablet */
.mobile-floating-cv {
  display: none !important;
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .hero-cards,
  .about-grid,
  .research-grid,
  .skills-container {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 20px;
  }

  .page-hero-title {
    font-family: var(--font);
    font-size: 1.2rem;
    font-weight: 400;
    color: var(--text);
  }
  .page-hero-desc {
    font-size: 0.85rem;
  }
  .mobile-menu-btn {
    display: none;
  }
  .top-nav {
    padding: 12px 10px 0;
  }
  .nav-pill {
    border-radius: 14px;
    padding: 5px 5px;
    gap: 1px;
  }
  .nav-link {
    font-size: 0.62rem;
    padding: 7px 12px;
    border-radius: 9px;
  }
  .nav-indicator {
    top: 5px;
    height: calc(100% - 10px);
    border-radius: 9px;
  }
  .resume-btn-wrap {
    border-radius: 14px;
    padding: 5px 5px;
    margin-left: 6px;
  }
  .resume-btn {
    font-size: 0.62rem;
    padding: 7px 8px;
    border-radius: 9px;
    gap: 5px;
  }
  .resume-icon {
    width: 12px;
    height: 12px;
  }
  .edu-item {
    grid-template-columns: 12px 1fr;
  }
  .edu-date {
    grid-column: 2;
    font-size: 0.72rem;
    margin-bottom: -12px;
  }
  .edu-content {
    grid-column: 2;
  }
  .section-alt {
    margin: 0 -16px;
    padding: 40px 16px;
  }
  .statement-card {
    padding: 24px 20px;
  }

  .web-featured-card {
    height: 210px;
  }
}
@media (max-width: 600px) {
  /* Push default/unscrolled position of the nav closer to the top on mobile */
  .top-nav {
    transform: translateY(
      20px
    ); /* Pushes unscrolled nav closer to top (was translateY(30px)) */
    padding: 8px 10px 0; /* Reduces top padding slightly (was 12px) */
  }
  .top-nav.scrolled {
    transform: translateY(0);
  }

  /* Remove CV button from header on mobile */
  .top-nav .resume-btn-wrap {
    display: none !important;
  }

  /* Make the rest of the header 20% bigger on mobile */
  .nav-pill {
    padding: 6px 6px;
    border-radius: 16px;
    gap: 2px;
  }
  .nav-link {
    font-size: 0.8rem; /* ~20% bigger than 0.62rem */
    padding: 8px 14px; /* ~15-20% bigger padding */
    border-radius: 11px;
  }
  .nav-indicator {
    top: 6px;
    height: calc(100% - 12px);
    border-radius: 11px;
  }

  /* Display and position floating CV button at bottom right corner */
  .mobile-floating-cv {
    display: inline-flex !important;
    position: fixed;
    bottom: 24px; /* padding in bottom */
    right: 24px; /* padding in right */
    margin: 0 !important;
    z-index: 1100; /* floats above navigation and other overlays */
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    pointer-events: all;
    animation: floatIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  }
  .mobile-floating-cv .resume-btn {
    font-size: 0.8rem;
    padding: 10px 12px;
    border-radius: 10px;
    gap: 6px;
  }
  .mobile-floating-cv .resume-icon {
    width: 14px;
    height: 14px;
  }

  @keyframes floatIn {
    from {
      transform: translateY(20px) scale(0.9);
      opacity: 0;
    }
    to {
      transform: translateY(0) scale(1);
      opacity: 1;
    }
  }

  .main-content {
    padding: calc(var(--nav-h) + 30px) 16px 0;
  }
  .pub-links {
    justify-content: flex-end;
  }
  .hero-title {
    font-size: 1.6rem;
  }
  .section {
    padding: 10px 0;
  }
  .section-header {
    margin-bottom: 12px;
  }
  .conf-section-label {
    margin-bottom: 12px;
  }
  .conf-flat-item {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .conf-flat-date {
    font-size: 0.8rem;
  }
  .service-card {
    flex-direction: column;
    gap: 10px;
  }
}
