/* ============================================================
   Design 2 — Swiss Typography / Apple Newsroom
   ============================================================ */

:root {
  --white: #FFFFFF;
  --black: #1D1D1F;
  --secondary: #6E6E73;
  --muted: #AEAEB2;
  --accent: #0055D4;
  --accent-light: #EBF2FF;
  --warm: #F9F6F2;
  --rule: rgba(0, 0, 0, 0.08);
  --font: system-ui, -apple-system, 'SF Pro Display', 'Helvetica Neue', sans-serif;
}

/* ---- Reset ---- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 100%;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font);
  font-size: 17px;
  font-weight: 300;
  line-height: 1.65;
  color: var(--black);
  background: var(--white);
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
  display: block;
}

ul,
ol {
  list-style: none;
}

hr {
  border: none;
  border-top: 1px solid var(--rule);
  margin: 0;
}

/* ---- Typography ---- */
h1 {
  font-size: clamp(42px, 6vw, 80px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: var(--black);
}

h2 {
  font-size: clamp(28px, 3.5vw, 48px);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.1;
}

h3 {
  font-size: clamp(22px, 2.5vw, 36px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

h4 {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

p {
  margin-bottom: 1em;
}

p:last-child {
  margin-bottom: 0;
}

.subtitle {
  font-size: clamp(18px, 2vw, 24px);
  font-weight: 300;
  color: var(--secondary);
  line-height: 1.4;
}

.text-muted {
  color: var(--muted);
}

.text-secondary {
  color: var(--secondary);
}

/* ---- Layout ---- */
.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 32px;
}

.container-wide {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px;
}

.section {
  padding: 80px 0 60px;
}

.section+.section {
  padding-top: 0;
}

/* ---- Navigation ---- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--rule);
}

.nav-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 52px;
}

.nav-brand {
  font-size: 17px;
  font-weight: 600;
  color: var(--black);
  text-decoration: none;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.nav-brand:hover {
  text-decoration: none;
  opacity: 0.7;
}

.nav-links {
  display: flex;
  gap: 28px;
  align-items: center;
}

.nav-links a {
  font-size: 14px;
  font-weight: 400;
  color: var(--secondary);
  text-decoration: none;
  transition: color 0.2s;
  white-space: nowrap;
}

.nav-links a:hover {
  color: var(--black);
  text-decoration: none;
}

.nav-links a.active {
  color: var(--black);
  font-weight: 500;
}

/* ---- Nav Dropdown ---- */
.nav-dropdown {
  position: relative;
  display: flex;
  align-items: center;
}

.nav-dropdown>a,
.nav-dropdown-row>a {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.nav-dropdown>a::after,
.nav-dropdown-row>a::after {
  content: '';
  width: 0;
  height: 0;
  border-left: 3.5px solid transparent;
  border-right: 3.5px solid transparent;
  border-top: 4px solid currentColor;
  opacity: 0.5;
  transition: transform 0.25s, opacity 0.25s;
  margin-top: 1px;
}

.nav-dropdown:hover>a::after,
.nav-dropdown:hover .nav-dropdown-row>a::after,
.nav-dropdown.open>a::after,
.nav-dropdown.open .nav-dropdown-row>a::after {
  opacity: 0.8;
  transform: rotate(180deg);
}

.nav-dropdown-menu::before {
  content: '';
  position: absolute;
  top: -16px;
  left: 0;
  right: 0;
  height: 16px;
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 14px);
  left: 50%;
  transform: translateX(-50%);
  min-width: 220px;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border: 1px solid var(--rule);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1), 0 2px 8px rgba(0, 0, 0, 0.04);
  padding: 6px;
  opacity: 0;
  visibility: hidden;
  transform: translateX(-50%) translateY(4px);
  transition: opacity 0.2s, visibility 0.2s, transform 0.2s;
  z-index: 300;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown.open .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.nav-dropdown-menu a {
  display: block;
  font-size: 13px !important;
  font-weight: 400 !important;
  color: var(--secondary) !important;
  padding: 9px 14px;
  border-radius: 8px;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}

.nav-dropdown-menu a:hover {
  background: var(--accent-light);
  color: var(--accent) !important;
}

.nav-dropdown-menu a.active {
  color: var(--accent) !important;
  font-weight: 500 !important;
  background: var(--accent-light);
}

/* ---- Hero + About ---- */
.hero-about {
  padding: 60px 0 0;
}

.hero-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 64px;
  align-items: center;
  animation: hero-in 0.8s ease-out both;
}

.hero-photo-col {
  position: sticky;
  top: 72px;
  align-self: start;
}

.bio-photo-wrap {
  width: 100%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
}

.bio-photo {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center 10%;
}

.hero-info-col {
  padding-top: 0;
}

.hero-overline {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 12px;
}

.hero-name {
  font-size: clamp(44px, 5.5vw, 76px);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 0.95;
  margin-bottom: 20px;
}

.hero-title {
  font-size: clamp(17px, 1.8vw, 22px);
  font-weight: 400;
  color: var(--black);
  line-height: 1.4;
  max-width: 480px;
  letter-spacing: -0.01em;
  text-align: justify;
}

.bio-tagline {
  font-size: clamp(14px, 1.4vw, 16px);
  font-weight: 300;
  line-height: 1.65;
  color: var(--secondary);
  max-width: 480px;
  margin-top: 16px;
  margin-bottom: 0;
  text-align: justify;
}

.profile-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 32px;
}

.profile-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--secondary);
  padding: 7px 14px;
  border: 1px solid var(--rule);
  border-radius: 100px;
  text-decoration: none;
  background: linear-gradient(180deg, #FFFFFF, #F7F8FA);
  box-shadow: 0 3px 8px rgba(15, 23, 42, 0.04);
  transition: all 0.25s;
}

.profile-link svg {
  flex-shrink: 0;
  opacity: 0.55;
  transition: opacity 0.25s;
}

.profile-link:hover {
  color: var(--accent);
  border-color: rgba(0, 85, 212, 0.22);
  background: var(--accent-light);
  box-shadow: 0 3px 12px rgba(0, 85, 212, 0.08);
  text-decoration: none;
}

.profile-link:hover svg {
  opacity: 1;
}

@keyframes hero-in {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---- Bio Section ---- */
.bio-section {
  padding-top: 64px;
}

.bio-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--rule);
}

.bio-col p {
  font-size: 15px;
  font-weight: 300;
  color: var(--secondary);
  line-height: 1.75;
  text-align: justify;
}

.section-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 20px;
}

.section-heading {
  font-size: clamp(24px, 3vw, 40px);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.15;
  max-width: 640px;
  margin-bottom: 40px;
}

/* ---- Research Area Cards ---- */
.area-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.area-card {
  position: relative;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--white);
  border-radius: 16px;
  overflow: hidden;
  background: #1a1a2e;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.06);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.area-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 60px rgba(0, 85, 212, 0.15), 0 8px 24px rgba(0, 0, 0, 0.1);
  text-decoration: none;
}

.area-card-img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.area-card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.area-card:hover .area-card-img-wrap img {
  transform: scale(1.06);
}

.area-card-body {
  position: relative;
  padding: 20px 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
}

.area-card-body h3 {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.3;
  margin-bottom: 4px;
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.area-card-body h3::after {
  content: '\2192';
  font-size: 18px;
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 0.3s, transform 0.3s;
  flex-shrink: 0;
  color: rgba(255, 255, 255, 0.7);
}

.area-card:hover .area-card-body h3::after {
  opacity: 1;
  transform: translateX(0);
}

.area-card-body p {
  font-size: 13px;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.5;
  margin-bottom: 0;
}

.area-card--text-only {
  background: var(--accent-light);
  justify-content: flex-end;
}

.area-card--text-only .area-card-body {
  padding: 32px 24px;
}


/* ---- Application Cards (Research Page) ---- */
.app-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.app-card {
  position: relative;
  display: grid;
  grid-template-columns: 150px 1fr;
  text-decoration: none;
  color: var(--black);
  border-radius: 12px;
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--rule);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1),
    border-color 0.4s;
}

.app-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 36px rgba(0, 85, 212, 0.1), 0 4px 16px rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 85, 212, 0.18);
  text-decoration: none;
}

.app-card-img-wrap {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 130px;
  overflow: hidden;
  background: #1a1a2e;
}

.app-card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.app-card:hover .app-card-img-wrap img {
  transform: scale(1.05);
}

.app-card-body {
  position: relative;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.app-card-number {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 6px;
  font-variant-numeric: tabular-nums;
}

.app-card-body h3 {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 4px;
  color: var(--black);
  transition: color 0.3s;
}

.app-card:hover .app-card-body h3 {
  color: var(--accent);
}

.app-card-body p {
  font-size: 13px;
  font-weight: 300;
  color: var(--secondary);
  line-height: 1.5;
  margin-bottom: 0;
}

.app-card-arrow {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  margin-top: 8px;
  transition: color 0.3s, gap 0.3s;
}

.app-card:hover .app-card-arrow {
  color: var(--accent);
  gap: 8px;
}

/* ---- Two Column Layout ---- */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
}

.two-col-date {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 40px;
  padding: 28px 0;
  border-bottom: 1px solid var(--rule);
}

.two-col-date:first-child {
  border-top: 1px solid var(--rule);
}

.date-label {
  font-size: 15px;
  font-weight: 500;
  color: var(--secondary);
  padding-top: 2px;
}

/* ---- Stats Strip ---- */
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  padding: 48px 0;
  border-bottom: 1px solid var(--rule);
  text-align: center;
}

.stat-number {
  font-size: clamp(48px, 5vw, 72px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  background: linear-gradient(135deg, #0055D4 0%, #4B8BF5 40%, #7B61FF 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-item {
  position: relative;
}

.stat-item+.stat-item::before {
  content: '';
  position: absolute;
  left: -20px;
  top: 0;
  height: 100%;
  width: 1px;
  background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.1) 30%, rgba(0, 0, 0, 0.1) 70%, transparent);
}

.stat-label {
  font-size: 15px;
  font-weight: 400;
  color: var(--secondary);
  margin-top: 8px;
}

/* ---- Research Blocks ---- */
.research-block {
  padding: 48px 0;
  border-bottom: 1px solid var(--rule);
}

.research-block:first-of-type {
  border-top: 1px solid var(--rule);
}

.research-block h3 a {
  color: var(--black);
  text-decoration: none;
}

.research-block h3 a:hover {
  color: var(--accent);
  text-decoration: none;
}

.research-block p {
  font-weight: 300;
  color: var(--secondary);
  max-width: 720px;
  margin-top: 12px;
}

/* ---- Page Top Section ---- */
.section-page-top {
  padding-top: 120px;
}

/* ---- Methods List ---- */
.methods-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 60px;
}

.methods-list--spaced {
  margin-bottom: 80px;
}

.methods-list li {
  font-size: 15px;
  font-weight: 400;
  padding: 6px 0;
  color: var(--black);
}

.research-tagline {
  margin-bottom: 16px;
  font-weight: 500;
}

/* ---- Research Overview Grid (desktop two-column) ---- */
.research-overview-grid {
  display: grid;
  grid-template-columns: 1fr 1px 1fr;
  gap: 48px;
  margin-bottom: 80px;
  padding: 48px 0 0;
  position: relative;
}

/* Animated center divider with gradient pulse */
@keyframes divider-glow {
  0%, 100% { opacity: 0.08; }
  50% { opacity: 0.2; }
}

.research-overview-grid::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 10%;
  bottom: 10%;
  width: 1px;
  background: linear-gradient(180deg, transparent, var(--accent), transparent);
  animation: divider-glow 3s ease-in-out infinite;
  pointer-events: none;
}

.research-overview-grid::before {
  content: '';
  grid-column: 2;
  grid-row: 1;
  width: 1px;
  justify-self: center;
  background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.08) 15%, rgba(0, 0, 0, 0.08) 85%, transparent 100%);
}

.research-overview-col:first-child {
  grid-column: 1;
}

.research-overview-col:last-child {
  grid-column: 3;
}

.research-overview-grid .section-subtitle {
  margin-bottom: 24px;
}

.research-overview-grid .research-tagline {
  font-size: 15px;
  font-style: italic;
  color: var(--secondary);
  margin-bottom: 28px;
  line-height: 1.6;
}

/* Research Interests — numbered cards */
.interests-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.interests-list li {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px 20px;
  border-radius: 12px;
  border: 1px solid var(--rule);
  background: linear-gradient(135deg, #FAFBFD 0%, #FFFFFF 100%);
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.interests-list li:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 20px rgba(0, 85, 212, 0.08), 0 1px 3px rgba(0, 0, 0, 0.04);
}

.interests-num {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-light);
  border-radius: 10px;
  letter-spacing: -0.02em;
  transition: background 0.35s cubic-bezier(0.16, 1, 0.3, 1), color 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.interests-list li:hover .interests-num {
  background: var(--accent);
  color: var(--white);
}

.interests-text {
  font-size: 15px;
  font-weight: 600;
  color: var(--black);
  letter-spacing: -0.01em;
  line-height: 1.3;
}

/* Tools & Methods — grouped pill clusters */
.tools-cluster {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.tools-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tools-group-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  padding-left: 2px;
}

.tools-pills {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tools-pills li {
  font-size: 13px;
  font-weight: 500;
  color: var(--black);
  padding: 7px 16px;
  border-radius: 100px;
  border: 1px solid var(--rule);
  background: linear-gradient(180deg, #FFFFFF 0%, #F7F8FA 100%);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: default;
}

.tools-pills li:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-light);
  box-shadow: 0 2px 8px rgba(0, 85, 212, 0.1);
  transform: translateY(-1px);
}

/* ---- Research Group ---- */
.group-member {
  padding: 16px 0;
  border-bottom: 1px solid var(--rule);
}

.group-member:first-child {
  border-top: 1px solid var(--rule);
}

.group-member strong {
  font-weight: 600;
  color: var(--black);
}

.group-member strong a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.group-member strong a::after {
  content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%231D1D1F' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6'%3E%3C/path%3E%3Cpolyline points='15 3 21 3 21 9'%3E%3C/polyline%3E%3Cline x1='10' y1='14' x2='21' y2='3'%3E%3C/line%3E%3C/svg%3E");
  opacity: 1;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.group-member strong a:hover {
  color: var(--accent);
  text-decoration: none;
}

.group-member strong a:hover::after {
  content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%230055D4' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6'%3E%3C/path%3E%3Cpolyline points='15 3 21 3 21 9'%3E%3C/polyline%3E%3Cline x1='10' y1='14' x2='21' y2='3'%3E%3C/line%3E%3C/svg%3E");
  opacity: 1;
  transform: translate(1px, -1px);
}

.group-member span {
  color: var(--secondary);
  font-weight: 300;
  font-size: 15px;
}

/* ---- Breadcrumb ---- */
.breadcrumb {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 24px;
  font-weight: 400;
}

.breadcrumb a {
  color: var(--secondary);
}

.breadcrumb a:hover {
  color: var(--black);
}

.breadcrumb .sep {
  margin: 0 8px;
}

/* ---- Research Subpage ---- */
.section-research-sub {
  padding-top: 48px;
}

.research-subpage-title {
  margin-bottom: 32px;
}

.research-overview {
  font-size: clamp(17px, 1.5vw, 20px);
  font-weight: 300;
  color: var(--secondary);
  max-width: 800px;
  line-height: 1.6;
  margin-bottom: 64px;
}

.research-figure-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  margin-bottom: 64px;
}

.research-figure-grid img {
  border: 1px solid var(--rule);
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

/* ---- Page Hero Banner ---- */
.page-hero {
  position: relative;
  min-height: 52vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.page-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}

.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(10, 20, 40, 0.15) 0%, rgba(10, 20, 40, 0.6) 70%, rgba(10, 20, 40, 0.85) 100%),
    linear-gradient(to right, rgba(0, 15, 50, 0.4) 0%, transparent 60%);
  z-index: 1;
}

.page-hero-content {
  position: relative;
  z-index: 2;
  max-width: 1080px;
  margin: 0 auto;
  padding: 80px 32px 48px;
  width: 100%;
}

.page-hero+.section {
  border-top: none;
}

.page-hero-label {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: rgba(255, 255, 255, 0.85);
  background: rgba(0, 85, 212, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 5px 14px;
  border-radius: 100px;
  margin-bottom: 16px;
}

.page-hero-title {
  font-size: clamp(40px, 6vw, 72px);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--white);
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.3);
  margin-bottom: 12px;
}

.page-hero-subtitle {
  font-size: clamp(15px, 1.6vw, 19px);
  font-weight: 400;
  color: rgba(255, 255, 255, 0.85);
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.25);
  letter-spacing: 0.02em;
  margin-bottom: 0;
}

/* ---- Redesigned Research Section Blocks ---- */
.research-section-block {
  position: relative;
  margin-bottom: 0;
  padding: 48px 0;
  border-bottom: 1px solid var(--rule);
}

.research-section-block:last-of-type {
  border-bottom: none;
  padding-bottom: 0;
}

.research-section-block:first-of-type {
  border-top: 1px solid var(--rule);
}

.research-section-header {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 36px;
}

.research-section-number {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), #4B8BF5);
  color: var(--white);
  font-size: 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 4px;
  box-shadow: 0 4px 12px rgba(0, 85, 212, 0.2);
}

.research-section-block h3 {
  margin-bottom: 0;
  font-size: clamp(22px, 2.5vw, 32px);
}

.research-section-block>p {
  font-weight: 300;
  color: var(--secondary);
  max-width: 800px;
  line-height: 1.7;
  font-size: 16px;
  text-align: justify;
}

/* ---- Side-by-Side Split Layout ---- */
.research-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  margin-top: 4px;
}

.research-split--text-only {
  grid-template-columns: 1fr;
}

.research-split-media {
  position: relative;
}

.research-split-media .research-gallery {
  margin-top: 0;
  margin-bottom: 0;
}

.research-split-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 16px 0 0 0;
  position: relative;
  text-align: justify;
}

.research-split-text::before {
  content: '';
  position: absolute;
  left: -24px;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--accent), #4B8BF5 50%, rgba(75, 139, 245, 0.15));
  opacity: 0.6;
  transition: opacity 0.4s;
}

.research-section-block:hover .research-split-text::before {
  opacity: 1;
}

.research-split-text p {
  font-weight: 300;
  color: var(--secondary);
  line-height: 1.75;
  font-size: 16px;
  margin-bottom: 1em;
}

.research-split-text p:last-of-type {
  margin-bottom: 0;
}

.research-split--text-only .research-split-text::before {
  display: none;
}

/* ---- Image Gallery / Carousel ---- */
.research-gallery {
  position: relative;
  margin-top: 28px;
  margin-bottom: 12px;
}

.research-gallery-track {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  background: #f5f5f7;
  border: 1px solid var(--rule);
}

.research-gallery-slide {
  width: 100%;
  position: relative;
  display: none;
}

.research-gallery-slide.active {
  display: block;
}

.research-gallery-slide img {
  width: 100%;
  max-height: 480px;
  object-fit: contain;
  display: block;
  cursor: zoom-in;
  background: #f5f5f7;
}

.research-gallery-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 32px 20px 14px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.55), transparent);
  color: var(--white);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.4;
  pointer-events: none;
}

.gallery-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  transition: transform 0.2s, box-shadow 0.2s;
  color: var(--black);
}

.gallery-arrow:hover {
  transform: translateY(-50%) scale(1.08);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.18);
}

.gallery-arrow--prev {
  left: 12px;
}

.gallery-arrow--next {
  right: 12px;
}

.gallery-arrow svg {
  width: 18px;
  height: 18px;
}

.gallery-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
}

.gallery-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: var(--muted);
  opacity: 0.35;
  cursor: pointer;
  padding: 0;
  transition: opacity 0.25s, transform 0.25s, background 0.25s;
}

.gallery-dot.active {
  opacity: 1;
  background: var(--accent);
  transform: scale(1.25);
}

.gallery-dot:hover {
  opacity: 0.7;
}

/* Single image — no carousel controls needed */
.research-gallery--single .gallery-arrow,
.research-gallery--single .gallery-dots {
  display: none;
}

/* ---- Fullscreen Lightbox ---- */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s, visibility 0.35s;
}

.lightbox-overlay.active {
  opacity: 1;
  visibility: visible;
}

.lightbox-content {
  position: relative;
  max-width: 92vw;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lightbox-content img {
  max-width: 92vw;
  max-height: 82vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 16px 64px rgba(0, 0, 0, 0.4);
  transform: scale(0.95);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.lightbox-overlay.active .lightbox-content img {
  transform: scale(1);
}

.lightbox-caption {
  color: rgba(255, 255, 255, 0.75);
  font-size: 14px;
  font-weight: 400;
  margin-top: 16px;
  text-align: center;
  max-width: 600px;
  line-height: 1.5;
}

.lightbox-counter {
  color: rgba(255, 255, 255, 0.4);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  margin-top: 6px;
}

.lightbox-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.15);
  color: white;
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: background 0.2s, transform 0.2s, border-color 0.2s;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.28);
  border-color: rgba(255, 255, 255, 0.45);
  transform: scale(1.08);
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.15);
  color: white;
  font-size: 22px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: background 0.2s, transform 0.2s, border-color 0.2s;
}

.lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.28);
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-50%) scale(1.08);
}

.lightbox-nav svg {
  width: 22px;
  height: 22px;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.4));
}

.lightbox-nav--prev {
  left: 16px;
}

.lightbox-nav--next {
  right: 16px;
}

/* Lightbox slide transition */
.lightbox-content img {
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
}

.lightbox-content img.lb-slide-out-left {
  opacity: 0;
  transform: translateX(-40px) scale(0.97);
}

.lightbox-content img.lb-slide-out-right {
  opacity: 0;
  transform: translateX(40px) scale(0.97);
}

.lightbox-content img.lb-slide-in {
  opacity: 1;
  transform: translateX(0) scale(1);
}

/* ---- Collapsible References ---- */
.research-ref-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 20px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  font-family: var(--font);
  color: var(--accent);
  background: transparent;
  border: none;
  border-radius: 100px;
  cursor: pointer;
  transition: color 0.3s, background 0.3s, box-shadow 0.3s;
  z-index: 0;
}

.research-ref-toggle::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 100px;
  padding: 1.5px;
  background: linear-gradient(135deg, #0055D4 0%, #4d8de8 40%, #00B4D8 70%, #0055D4 100%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  transition: padding 0.3s, opacity 0.3s, background 0.3s;
}

.research-ref-toggle:hover {
  color: #fff;
  background: linear-gradient(135deg, #0055D4 0%, #4d8de8 40%, #00B4D8 70%, #0055D4 100%);
  box-shadow: 0 2px 12px rgba(0, 85, 212, 0.25);
}

.research-ref-toggle:hover::before {
  opacity: 0;
}

.research-ref-toggle svg {
  width: 14px;
  height: 14px;
  transition: transform 0.3s;
  flex-shrink: 0;
}

.research-ref-toggle.open svg {
  transform: rotate(180deg);
}

.research-code-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 20px;
  margin-left: 8px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  font-family: var(--font);
  color: var(--accent);
  background: transparent;
  border: none;
  border-radius: 100px;
  cursor: pointer;
  transition: color 0.3s, background 0.3s, box-shadow 0.3s;
  z-index: 0;
}

.research-code-toggle::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 100px;
  padding: 1.5px;
  background: linear-gradient(135deg, #0055D4 0%, #4d8de8 40%, #00B4D8 70%, #0055D4 100%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  transition: padding 0.3s, opacity 0.3s, background 0.3s;
}

.research-code-toggle:hover {
  color: #fff;
  background: linear-gradient(135deg, #0055D4 0%, #4d8de8 40%, #00B4D8 70%, #0055D4 100%);
  box-shadow: 0 2px 12px rgba(0, 85, 212, 0.25);
}

.research-code-toggle:hover::before {
  opacity: 0;
}

.research-code-toggle svg {
  width: 14px;
  height: 14px;
  transition: transform 0.3s;
  flex-shrink: 0;
}

.research-code-toggle.open svg {
  transform: rotate(180deg);
}

.research-code-content {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s, margin 0.3s;
  margin-top: 0;
}

.research-code-content.open {
  max-height: 500px;
  opacity: 1;
  margin-top: 16px;
}

.research-code-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px 20px;
  background: #f9f9fb;
  border-radius: 10px;
  border: 1px solid var(--rule);
}

.research-code-links a {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 14px;
  font-size: 13px;
  color: var(--secondary);
  text-decoration: none;
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 8px;
  line-height: 1.5;
  transition: background 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.research-code-links a:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 8px rgba(0, 85, 212, 0.1);
  background: #f0f6ff;
}

.research-code-links a svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  stroke: var(--accent);
  margin-top: 2px;
}

.research-code-links a strong {
  color: var(--accent);
  font-weight: 600;
}

.research-ref-content {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s, margin 0.3s;
  margin-top: 0;
}

.research-ref-content.open {
  max-height: 2000px;
  opacity: 1;
  margin-top: 16px;
}

.research-ref {
  font-size: 14px;
  color: var(--secondary);
  line-height: 1.7;
  padding: 16px 20px;
  background: #f9f9fb;
  border-radius: 10px;
  border: 1px solid var(--rule);
}

.research-refs-list {
  list-style: decimal;
  padding-left: 24px;
  font-size: 14px;
  color: var(--secondary);
  line-height: 1.7;
}

.research-refs-list li {
  margin-bottom: 8px;
}

/* ---- Publications Search & Filters ---- */
.pub-search-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--black);
  padding: 12px 0;
  margin-bottom: 32px;
  max-width: 560px;
}

.pub-search-bar svg {
  width: 18px;
  height: 18px;
  color: var(--muted);
  flex-shrink: 0;
}

.pub-search-bar input {
  border: none;
  background: none;
  outline: none;
  font-size: 17px;
  font-family: var(--font);
  font-weight: 300;
  color: var(--black);
  width: 100%;
}

.pub-search-bar input::placeholder {
  color: var(--muted);
}

.pub-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 64px;
}

.pub-filter {
  padding: 7px 18px;
  border: 1px solid var(--rule);
  border-radius: 100px;
  font-size: 14px;
  font-weight: 400;
  font-family: var(--font);
  color: var(--secondary);
  background: transparent;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.pub-filter:hover {
  color: var(--black);
  border-color: var(--black);
}

.pub-filter.active {
  color: var(--white);
  background: var(--black);
  border-color: var(--black);
}

.pub-search {
  border: none;
  border-bottom: 1px solid var(--black);
  font-size: 17px;
  font-family: var(--font);
  font-weight: 300;
  padding: 12px 0;
  width: 100%;
  max-width: 480px;
  outline: none;
  background: transparent;
  color: var(--black);
  margin-bottom: 80px;
}

.pub-search::placeholder {
  color: var(--muted);
}

.pub-year-group {
  margin-bottom: 64px;
}

.pub-year {
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--black);
  position: sticky;
  top: 60px;
  background: var(--white);
  padding: 16px 0 12px;
  z-index: 5;
}

.pub-entry {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 32px;
  padding: 24px 0;
  border-bottom: 1px solid var(--rule);
}

.pub-entry:first-of-type {
  border-top: 1px solid var(--rule);
}

.pub-entry-full {
  padding: 20px 0 20px 36px;
  position: relative;
  border-bottom: 1px solid var(--rule);
}

.pub-entry-full::before {
  content: "[" attr(data-pub-index) "]";
  position: absolute;
  left: 0;
  top: 20px;
  font-weight: 600;
  font-size: 16px;
  color: var(--black);
}

.pub-entry-full:first-of-type {
  border-top: 1px solid var(--rule);
}

.pub-title-text {
  font-weight: 600;
  font-size: 16px;
  line-height: 1.4;
  color: var(--black);
}

.pub-authors-text {
  font-size: 15px;
  font-weight: 400;
  color: var(--black);
  margin-top: 4px;
}

.pub-venue-text {
  font-size: 14px;
  font-weight: 300;
  color: var(--secondary);
  margin-top: 4px;
}

.pub-links-list {
  display: flex;
  gap: 12px;
  margin-top: 6px;
  flex-wrap: wrap;
}

.pub-links-list a {
  font-size: 13px;
  font-weight: 500;
  color: var(--accent);
}

.pub-badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 4px;
  padding: 2px 8px;
  margin-left: 8px;
  vertical-align: middle;
}

.pub-section-heading {
  font-size: clamp(24px, 3.5vw, 32px);
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.2;
  position: relative;
  z-index: 1;
  padding: 16px 28px;
  margin-bottom: 40px;
  margin-top: 80px;
  display: flex;
  align-items: center;
  /* Sophisticated Gradient starting with signature blue */
  background: linear-gradient(135deg, var(--accent) 0%, #006ED4 50%, #0088EE 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: var(--accent);
}

.pub-section-heading::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  /* Sophisticated glass-like gradient background */
  background: linear-gradient(90deg, rgba(0, 85, 212, 0.07) 0%, rgba(0, 85, 212, 0.02) 50%, transparent 100%);
  border-left: 5px solid var(--accent);
  border-radius: 0 16px 16px 0;
  z-index: -1;
}

.no-results {
  text-align: center;
  color: var(--muted);
  padding: 80px 0;
  font-size: 17px;
  font-weight: 300;
  display: none;
}

/* ---- Teaching ---- */
.teaching-entry {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 40px;
  padding: 24px 0;
  border-bottom: 1px solid var(--rule);
}

.teaching-entry:first-of-type {
  border-top: 1px solid var(--rule);
}

.teaching-period {
  font-size: 15px;
  font-weight: 500;
  color: var(--secondary);
}

.teaching-course {
  font-weight: 600;
  font-size: 17px;
}

.teaching-detail {
  font-weight: 300;
  font-size: 15px;
  color: var(--secondary);
  margin-top: 2px;
}

.teaching-tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 500;
  color: var(--accent);
  border: 1px solid rgba(0, 85, 212, 0.2);
  background: var(--accent-light);
  border-radius: 4px;
  padding: 2px 8px;
  margin-left: 8px;
}

.teaching-heading {
  margin-bottom: 0;
}

.teaching-heading-row {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 32px;
}

.teaching-heading-row .teaching-heading {
  padding-left: 20px;
  border-left: 2px solid var(--rule);
}

.teaching-logo {
  height: 68px;
  width: auto;
  object-fit: contain;
  flex-shrink: 0;
}

.teaching-logo-dark {
  filter: brightness(0) saturate(100%) invert(13%) sepia(10%) saturate(500%) hue-rotate(180deg);
}

/* ---- Activities ---- */
.activity-row {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 40px;
  padding: 24px 0;
  border-bottom: 1px solid var(--rule);
}

.activity-row:first-of-type {
  border-top: 1px solid var(--rule);
}

.award-year {
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #0055D4 0%, #4B8BF5 40%, #7B61FF 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.activity-date {
  font-size: 15px;
  font-weight: 500;
  color: var(--secondary);
}

.activity-title {
  font-weight: 600;
  font-size: 17px;
}

.activity-detail {
  font-weight: 300;
  font-size: 15px;
  color: var(--secondary);
  margin-top: 2px;
}

/* ---- CV ---- */
.cv-entry {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 40px;
  padding: 24px 0;
  border-bottom: 1px solid var(--rule);
}

.cv-entry:first-of-type {
  border-top: 1px solid var(--rule);
}

.cv-date {
  font-size: 15px;
  font-weight: 500;
  color: var(--secondary);
}

.cv-title {
  font-weight: 600;
  font-size: 17px;
}

.cv-subtitle {
  font-weight: 300;
  font-size: 15px;
  color: var(--secondary);
  margin-top: 2px;
}

.cv-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cv-skill {
  font-size: 14px;
  font-weight: 400;
  padding: 4px 12px;
  border: 1px solid rgba(0, 85, 212, 0.15);
  background: var(--accent-light);
  border-radius: 4px;
  transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
}

.cv-skill:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 85, 212, 0.1);
  border-color: rgba(0, 85, 212, 0.3);
}

.cv-skill small {
  font-size: 12px;
  color: var(--secondary);
}

/* ---- Timeline ---- */
.timeline {
  position: relative;
  padding-left: 32px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--rule);
}

/* Animated gradient shimmer overlay on timeline line */
.timeline::after {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(180deg,
      transparent 0%,
      rgba(0, 85, 212, 0.6) 15%,
      rgba(75, 139, 245, 0.9) 30%,
      rgba(123, 97, 255, 0.6) 45%,
      transparent 60%);
  background-size: 100% 300%;
  animation: timeline-shimmer 4s ease-in-out infinite;
  opacity: 0;
  transition: opacity 0.6s ease;
}

.timeline.visible::after {
  opacity: 1;
}

@keyframes timeline-shimmer {
  0% {
    background-position: 0% 100%;
  }

  50% {
    background-position: 0% 0%;
  }

  100% {
    background-position: 0% 100%;
  }
}

.timeline-item {
  position: relative;
  padding: 24px 0;
  border-bottom: 1px solid var(--rule);
}

.timeline-item:first-child {
  border-top: 1px solid var(--rule);
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -32px;
  top: 30px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  transform: translateX(-4px) scale(1);
  box-shadow: 0 0 0 3px var(--white);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.4s ease;
  z-index: 2;
}

/* Ripple ring on timeline dots */
.timeline-item::after {
  content: '';
  position: absolute;
  left: -32px;
  top: 30px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  transform: translateX(-4px) scale(1);
  box-shadow: 0 0 0 0 rgba(0, 85, 212, 0.4);
  z-index: 1;
  opacity: 0;
  pointer-events: none;
}

.timeline-item.visible::after {
  animation: dot-ripple 1.2s cubic-bezier(0, 0.5, 0.5, 1) forwards;
}

@keyframes dot-ripple {
  0% {
    box-shadow: 0 0 0 0 rgba(0, 85, 212, 0.45);
    opacity: 1;
  }

  70% {
    box-shadow: 0 0 0 14px rgba(0, 85, 212, 0);
    opacity: 0.5;
  }

  100% {
    box-shadow: 0 0 0 18px rgba(0, 85, 212, 0);
    opacity: 0;
  }
}

.timeline-item:hover::before {
  transform: translateX(-4px) scale(1.35);
  box-shadow: 0 0 0 4px rgba(0, 85, 212, 0.15);
}

.timeline-content {
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.timeline-item:hover .timeline-content {
  transform: translateX(4px);
}

.timeline-date {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  margin-bottom: 6px;
}

.timeline-content h4 {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--black);
  margin-bottom: 2px;
}

.timeline-content p {
  font-size: 15px;
  font-weight: 300;
  color: var(--secondary);
  margin-bottom: 0;
}

.timeline-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.timeline-pill {
  display: inline-block;
  font-size: 13px;
  font-weight: 400;
  color: var(--secondary);
  padding: 4px 12px;
  border: 1px solid var(--rule);
  border-radius: 100px;
  transition: color 0.3s, border-color 0.3s, background 0.3s, transform 0.3s, box-shadow 0.3s;
}

.timeline-pill:hover {
  color: var(--accent);
  border-color: rgba(0, 85, 212, 0.2);
  background: var(--accent-light);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 85, 212, 0.1);
}

/* ---- Award Timeline ---- */
.award-timeline .timeline-item::before {
  background: linear-gradient(135deg, #D4A017, #F5C842);
  box-shadow: 0 0 0 3px var(--white);
}

.award-timeline .timeline-date {
  color: #B8860B;
}

/* ---- Section Title ---- */
.section-title {
  margin-bottom: 48px;
}

.section-subtitle {
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 16px;
  position: relative;
  padding-bottom: 12px;
  display: inline-block;
}

.section-subtitle::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1.5px;
  background: linear-gradient(90deg, rgba(0, 85, 212, 0.45), transparent);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.section-subtitle.will-animate.visible::after {
  transform: scaleX(1);
}

/* CV page — top section spacing */
.section-cv-top {
  padding-top: 120px;
}

/* CV skills group spacing between categories */
.cv-skills-group {
  margin-bottom: 32px;
}

/* ---- News & Opportunities ---- */
.news-section {
  padding-bottom: 40px;
}

.news-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.news-item {
  border-radius: 14px;
  overflow: hidden;
  background:
    radial-gradient(ellipse 80% 60% at 100% 0%, rgba(0, 85, 212, 0.03) 0%, transparent 60%),
    linear-gradient(165deg, #fafaff 0%, #ffffff 40%, #f8fbff 100%);
  border: 1px solid rgba(0, 85, 212, 0.08);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.news-item:hover {
  box-shadow: 0 4px 20px rgba(0, 85, 212, 0.07);
  border-color: rgba(0, 85, 212, 0.14);
}

.news-item[data-category="opportunity"] {
  background:
    radial-gradient(ellipse 70% 50% at 100% 0%, rgba(0, 168, 107, 0.035) 0%, transparent 55%),
    linear-gradient(165deg, #f6fdf9 0%, #ffffff 40%, #f8fcff 100%);
  border-color: rgba(0, 168, 107, 0.1);
}

.news-item[data-category="opportunity"]:hover {
  border-color: rgba(0, 168, 107, 0.2);
  box-shadow: 0 4px 20px rgba(0, 168, 107, 0.07);
}

.news-item.expanded {
  box-shadow:
    0 6px 28px rgba(0, 85, 212, 0.08),
    0 1px 4px rgba(0, 0, 0, 0.03),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.news-item[data-category="opportunity"].expanded {
  box-shadow:
    0 6px 28px rgba(0, 168, 107, 0.08),
    0 1px 4px rgba(0, 0, 0, 0.03),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

/* Header (always visible, clickable) */
.news-item-header {
  display: grid;
  grid-template-columns: 4px 1fr auto;
  align-items: center;
  width: 100%;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  text-align: left;
  gap: 0;
  transition: background 0.2s ease;
}

.news-item-header:hover {
  background: rgba(0, 85, 212, 0.015);
}

.news-item[data-category="opportunity"] .news-item-header:hover {
  background: rgba(0, 168, 107, 0.015);
}

.news-item-accent {
  width: 4px;
  align-self: stretch;
  background: linear-gradient(180deg, var(--accent) 0%, #7B61FF 100%);
  border-radius: 14px 0 0 14px;
  transition: width 0.3s ease;
}

.news-item[data-category="opportunity"] .news-item-accent {
  background: linear-gradient(180deg, #0055D4 0%, #00A86B 100%);
}

.news-item.expanded .news-item-accent {
  width: 4px;
}

.news-item-summary {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
  min-height: 64px;
}

.news-item-title {
  font-size: clamp(15px, 2vw, 18px);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.3;
  color: var(--black);
  flex: 1;
}

.news-item-chevron {
  width: 20px;
  height: 20px;
  color: var(--muted);
  margin-right: 20px;
  flex-shrink: 0;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), color 0.25s;
}

.news-item.expanded .news-item-chevron {
  transform: rotate(180deg);
  color: var(--accent);
}

.news-item[data-category="opportunity"].expanded .news-item-chevron {
  color: #2e7d32;
}

/* Expandable body */
.news-item-body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.news-item.expanded .news-item-body {
  grid-template-rows: 1fr;
}

.news-item-body-inner {
  overflow: hidden;
  padding: 0 24px 0 44px;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.3s ease 0s, transform 0.3s ease 0s, padding 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.news-item.expanded .news-item-body-inner {
  padding: 0 24px 24px 44px;
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.35s ease 0.1s, transform 0.35s ease 0.1s, padding 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Shared card content styles (kept from original) */
.news-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 4px 12px;
  border-radius: 100px;
  line-height: 1.4;
  flex-shrink: 0;
}

.news-badge--opportunity {
  background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
  color: #2e7d32;
}

.news-badge--news {
  background: var(--accent-light);
  color: var(--accent);
}

.news-date {
  font-size: 13px;
  font-weight: 400;
  color: var(--muted);
  flex-shrink: 0;
  margin-left: auto;
}

.news-card-text {
  font-size: 15px;
  font-weight: 300;
  color: var(--secondary);
  line-height: 1.7;
  max-width: 680px;
  margin-bottom: 16px;
  text-align: justify;
}

.news-card-text strong {
  font-weight: 500;
  color: var(--black);
}

.news-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.news-tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 400;
  color: var(--secondary);
  padding: 3px 12px;
  border: 1px solid var(--rule);
  border-radius: 100px;
  line-height: 1.5;
  transition: border-color 0.25s, color 0.25s;
}

.news-card-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.news-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--accent);
  padding: 6px 16px;
  border: 1px solid var(--accent);
  border-radius: 100px;
  text-decoration: none;
  transition: background 0.25s, color 0.25s;
}

.news-link:hover {
  background: var(--accent);
  color: var(--white);
  text-decoration: none;
}

.news-link svg {
  flex-shrink: 0;
}

/* Show all / collapse toggle */
.news-item.news-item--hidden {
  display: none;
}

.news-grid.news-grid--revealed .news-item.news-item--hidden {
  display: block;
}

.news-show-all {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  padding: 10px 24px;
  font-size: 14px;
  font-weight: 500;
  color: var(--secondary);
  background: none;
  border: 1px solid var(--rule);
  border-radius: 100px;
  cursor: pointer;
  transition: color 0.25s, border-color 0.25s, background 0.25s;
}

.news-show-all:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-light);
}

.news-show-all svg {
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.news-show-all.news-show-all--expanded svg {
  transform: rotate(180deg);
}

.news-show-all.news-show-all--hide {
  display: none;
}

/* ---- Footer ---- */
.footer {
  padding: 40px 0 40px;
  background: var(--white);
  color: var(--black);
  text-align: center;
  border-top: 1px solid var(--rule);
}

.footer-creator {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.creator-label {
  display: block;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--secondary);
  font-weight: 600;
  margin-bottom: 16px;
}

.creator-logo-link {
  display: inline-block;
  transition: transform 0.3s ease, opacity 0.3s ease;
  margin-bottom: 16px;
}

.creator-logo-link:hover {
  transform: translateY(-2px);
  opacity: 0.8;
}

.creator-logo {
  height: 50px;
  width: auto;
  display: block;
}

.footer .copyright {
  font-size: 11px;
  color: var(--muted);
  font-weight: 400;
  margin: 0;
}

/* ---- Contact Grid ---- */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px;
  padding: 24px 0 40px;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.contact-item h4 {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 12px;
}

.contact-item p {
  font-size: 15px;
  font-weight: 300;
  color: var(--secondary);
  line-height: 1.6;
  text-align: justify;
}

/* ---- Page Navigation ---- */
.page-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.page-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 400;
  color: var(--secondary);
  padding: 8px 16px;
  border: 1px solid var(--rule);
  border-radius: 100px;
  text-decoration: none;
  transition: border-color 0.25s, color 0.25s;
}

.page-nav-link:hover {
  text-decoration: none;
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-light);
}

.page-nav-arrow {
  width: 14px;
  height: 14px;
  color: var(--muted);
  transition: color 0.25s, transform 0.25s;
  flex-shrink: 0;
}

.page-nav-link:hover .page-nav-arrow {
  color: var(--accent);
  transform: translateX(2px);
}

/* ---- Collaborations ---- */
.collab-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 60px;
}

.collab-item {
  font-size: 15px;
  padding: 8px 0;
}

.collab-item strong {
  font-weight: 600;
  color: var(--black);
}

.collab-item strong a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.collab-item strong a::after {
  content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%231D1D1F' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6'%3E%3C/path%3E%3Cpolyline points='15 3 21 3 21 9'%3E%3C/polyline%3E%3Cline x1='10' y1='14' x2='21' y2='3'%3E%3C/line%3E%3C/svg%3E");
  opacity: 1;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.collab-item strong a:hover {
  color: var(--accent);
  text-decoration: none;
}

.collab-item strong a:hover::after {
  content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%230055D4' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6'%3E%3C/path%3E%3Cpolyline points='15 3 21 3 21 9'%3E%3C/polyline%3E%3Cline x1='10' y1='14' x2='21' y2='3'%3E%3C/line%3E%3C/svg%3E");
  opacity: 1;
  transform: translate(1px, -1px);
}

.collab-item span {
  font-weight: 300;
  color: var(--secondary);
}

/* ---- Fade In Animation ---- */
.fade-in {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

@media (prefers-reduced-motion: no-preference) {
  .fade-in.will-animate {
    opacity: 0;
    transform: translateY(20px);
  }

  .fade-in.will-animate.visible {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---- Scroll-reveal Animations ---- */
@media (prefers-reduced-motion: no-preference) {

  /* Timeline line grows downward with gradient reveal */
  .timeline.will-animate::before {
    transform: scaleY(0);
    transform-origin: top;
    transition: transform 1s cubic-bezier(0.22, 1, 0.36, 1);
  }

  .timeline.will-animate.visible::before {
    transform: scaleY(1);
  }

  /* Timeline items — alternating slide directions for visual interest */
  .timeline-item.will-animate {
    opacity: 0;
    transform: translateX(-28px) translateY(12px);
    transition: opacity 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94),
      transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  }

  /* Even items slide from the right for alternating effect */
  .timeline-item.will-animate:nth-child(even) {
    transform: translateX(-16px) translateY(16px);
  }

  .timeline-item.will-animate.visible {
    opacity: 1;
    transform: translateX(0) translateY(0);
  }

  /* Timeline dot scales up with spring bounce + glow */
  .timeline-item.will-animate::before {
    transform: translateX(-4px) scale(0);
    transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.15s,
      box-shadow 0.6s ease 0.15s;
  }

  .timeline-item.will-animate.visible::before {
    transform: translateX(-4px) scale(1);
    box-shadow: 0 0 0 3px var(--white), 0 0 12px rgba(0, 85, 212, 0.25);
  }

  /* Timeline date slides in separately with delay */
  .timeline-item.will-animate .timeline-date {
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.4s ease 0.2s, transform 0.4s ease 0.2s;
  }

  .timeline-item.will-animate.visible .timeline-date {
    opacity: 1;
    transform: translateY(0);
  }

  /* Timeline content text reveals with stagger */
  .timeline-item.will-animate .timeline-content h4 {
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.4s ease 0.28s, transform 0.4s ease 0.28s;
  }

  .timeline-item.will-animate.visible .timeline-content h4 {
    opacity: 1;
    transform: translateY(0);
  }

  .timeline-item.will-animate .timeline-content p {
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.4s ease 0.36s, transform 0.4s ease 0.36s;
  }

  .timeline-item.will-animate.visible .timeline-content p {
    opacity: 1;
    transform: translateY(0);
  }

  /* ---- Pill scatter-in animation ---- */
  .timeline-pill.will-animate {
    opacity: 0;
    transform: scale(0.6) translateY(14px) rotate(-3deg);
    transition: opacity 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94),
      transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  }

  .timeline-pill.will-animate:nth-child(even) {
    transform: scale(0.6) translateY(14px) rotate(3deg);
  }

  .timeline-pill.will-animate:nth-child(3n) {
    transform: scale(0.6) translateY(18px) rotate(-1.5deg);
  }

  .timeline-pill.will-animate.visible {
    opacity: 1;
    transform: scale(1) translateY(0) rotate(0deg);
  }

  /* ---- CV skill pill scatter-in animation ---- */
  .cv-skill.will-animate {
    opacity: 0;
    transform: scale(0.6) translateY(14px) rotate(-3deg);
    transition: opacity 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94),
      transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  }

  .cv-skill.will-animate:nth-child(even) {
    transform: scale(0.6) translateY(14px) rotate(3deg);
  }

  .cv-skill.will-animate:nth-child(3n) {
    transform: scale(0.6) translateY(18px) rotate(-1.5deg);
  }

  .cv-skill.will-animate.visible {
    opacity: 1;
    transform: scale(1) translateY(0) rotate(0deg);
  }

  /* ---- Section label floating entrance ---- */
  .section-label.will-animate {
    opacity: 0;
    transform: translateY(14px) translateX(-8px);
    transition: opacity 0.5s ease, transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
  }

  .section-label.will-animate.visible {
    opacity: 1;
    transform: translateY(0) translateX(0);
  }

  /* ---- Section title cinematic reveal ---- */
  .section-title.will-animate {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.1s,
      transform 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.1s;
  }

  .section-title.will-animate.visible {
    opacity: 1;
    transform: translateY(0);
  }

  /* ---- Section subtitle entry ---- */
  .section-subtitle.will-animate {
    opacity: 0;
    transform: translateX(-12px);
    transition: opacity 0.5s ease 0.15s, transform 0.5s ease 0.15s;
  }

  .section-subtitle.will-animate.visible {
    opacity: 1;
    transform: translateX(0);
  }

  /* ---- Timeline pills container entrance ---- */
  .timeline-pills.will-animate {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.5s ease, transform 0.5s ease;
  }

  .timeline-pills.will-animate.visible {
    opacity: 1;
    transform: translateY(0);
  }

  /* Area cards staggered rise */
  .area-card.will-animate {
    opacity: 0;
    transform: translateY(30px) scale(0.97);
    transition: opacity 0.5s ease-out, transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
  }

  .area-card.will-animate.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
  }

  /* Stat numbers scale in */
  .stat-item.will-animate {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
  }

  .stat-item.will-animate.visible {
    opacity: 1;
    transform: translateY(0);
  }

  /* Profile link pills pop in */
  .profile-link.will-animate {
    opacity: 0;
    transform: scale(0.85);
    transition: opacity 0.35s ease-out, transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  }

  .profile-link.will-animate.visible {
    opacity: 1;
    transform: scale(1);
  }

  /* Contact items slide up */
  .contact-item.will-animate {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
  }

  .contact-item.will-animate.visible {
    opacity: 1;
    transform: translateY(0);
  }

  /* Page nav links slide in from right */
  .page-nav-link.will-animate {
    opacity: 0;
    transform: translateX(16px);
    transition: opacity 0.4s ease-out, transform 0.4s ease-out;
  }

  .page-nav-link.will-animate.visible {
    opacity: 1;
    transform: translateX(0);
  }

  /* ---- App Cards: staggered cinematic rise with alternating origins ---- */
  .app-card.will-animate {
    opacity: 0;
    transform: translateY(48px) scale(0.94);
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
      transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  }

  .app-card.will-animate:nth-child(even) {
    transform: translateY(48px) scale(0.94) translateX(12px);
  }

  .app-card.will-animate:nth-child(odd) {
    transform: translateY(48px) scale(0.94) translateX(-12px);
  }

  .app-card.will-animate.visible {
    opacity: 1;
    transform: translateY(0) scale(1) translateX(0);
  }

  /* ---- Interests list items: spring slide-in from left ---- */
  .interests-list li.will-animate {
    opacity: 0;
    transform: translateX(-36px) scale(0.92);
    transition: opacity 0.55s cubic-bezier(0.25, 0.46, 0.45, 0.94),
      transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  }

  .interests-list li.will-animate.visible {
    opacity: 1;
    transform: translateX(0) scale(1);
  }

  /* ---- Tools pills: organic scatter-in ---- */
  .tools-pills li.will-animate {
    opacity: 0;
    transform: scale(0.5) translateY(18px) rotate(-4deg);
    transition: opacity 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
      transform 0.55s cubic-bezier(0.34, 1.56, 0.64, 1);
  }

  .tools-pills li.will-animate:nth-child(even) {
    transform: scale(0.5) translateY(16px) rotate(4deg);
  }

  .tools-pills li.will-animate:nth-child(3n) {
    transform: scale(0.5) translateY(22px) rotate(-2deg);
  }

  .tools-pills li.will-animate.visible {
    opacity: 1;
    transform: scale(1) translateY(0) rotate(0deg);
  }

  /* ---- Tools group labels: slide-in ---- */
  .tools-group-label.will-animate {
    opacity: 0;
    transform: translateX(-16px);
    transition: opacity 0.4s ease, transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
  }

  .tools-group-label.will-animate.visible {
    opacity: 1;
    transform: translateX(0);
  }

  /* ---- Research overview columns: slide in from opposite sides ---- */
  .research-overview-col.will-animate:first-child {
    opacity: 0;
    transform: translateX(-40px);
    transition: opacity 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94),
      transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
  }

  .research-overview-col.will-animate:last-child {
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.15s,
      transform 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.15s;
  }

  .research-overview-col.will-animate.visible {
    opacity: 1;
    transform: translateX(0);
  }

  /* ---- Group members: slide-up reveal ---- */
  .group-member.will-animate {
    opacity: 0;
    transform: translateY(18px) translateX(-8px);
    transition: opacity 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94),
      transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
  }

  .group-member.will-animate.visible {
    opacity: 1;
    transform: translateY(0) translateX(0);
  }

  /* ---- Collaboration items: staggered grid pop-in ---- */
  .collab-item.will-animate {
    opacity: 0;
    transform: translateY(20px) scale(0.96);
    transition: opacity 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94),
      transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
  }

  .collab-item.will-animate.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ---- App Card 3D Tilt Effect ---- */
.app-card {
  transform-style: preserve-3d;
  perspective: 800px;
}

.app-card.tilt-active {
  transition: none !important;
}

.app-card .app-card-img-wrap {
  transform: translateZ(0);
}

.app-card .app-card-body {
  transform: translateZ(20px);
}

/* ---- App Card Shimmer on Hover ---- */
.app-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 40%,
    rgba(255, 255, 255, 0.4) 45%,
    rgba(255, 255, 255, 0.6) 50%,
    rgba(255, 255, 255, 0.4) 55%,
    transparent 60%
  );
  opacity: 0;
  transform: translateX(-100%);
  transition: opacity 0.3s;
  pointer-events: none;
  z-index: 2;
  border-radius: 12px;
}

.app-card:hover::after {
  opacity: 1;
  animation: shimmer-sweep 0.8s ease-out forwards;
}

@keyframes shimmer-sweep {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* ---- Interests List Pulse Glow ---- */
.interests-list li {
  position: relative;
  overflow: hidden;
}

.interests-list li::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(0, 85, 212, 0.08) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.interests-list li:hover::before {
  opacity: 1;
}

/* ---- App Card Number Pulse ---- */
@keyframes number-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

.app-card:hover .app-card-number {
  animation: number-pulse 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ---- Collaboration Grid Connector Lines ---- */
.collab-grid {
  position: relative;
}

/* ---- Mobile Navigation ---- */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  flex-direction: column;
  gap: 5px;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 1.5px;
  background: var(--black);
  transition: transform 0.3s, opacity 0.3s;
}

.nav-toggle.active span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

/* Dropdown toggle chevron button (mobile only) */
.nav-dropdown-toggle {
  display: none;
}

/* Desktop: dropdown row wrapper should act as transparent flex container */
.nav-dropdown-row {
  display: contents;
}

/* ---- Responsive ---- */

/* Tablet */
@media (max-width: 960px) {
  .hero-grid {
    grid-template-columns: 260px 1fr;
    gap: 40px;
  }

  .hero-photo-col {
    position: static;
  }

  .hero-name {
    font-size: clamp(36px, 5vw, 56px);
  }

  .bio-two-col {
    gap: 32px;
  }

  .area-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .app-grid {
    grid-template-columns: 1fr;
  }

  .stats {
    gap: 32px;
    padding: 60px 0;
  }
}

/* Mobile */
@media (max-width: 768px) {

  .container,
  .container-wide {
    padding: 0 20px;
  }

  /* Nav collapses to hamburger */
  .nav-inner {
    padding: 0 20px;
    height: 48px;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-links {
    display: flex;
    position: absolute;
    top: 48px;
    left: 0;
    right: 0;
    z-index: 200;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    flex-direction: column;
    padding: 0 20px;
    gap: 0;
    border-bottom: 1px solid var(--rule);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.25s ease,
                padding 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    border-bottom-color: transparent;
  }

  .nav-links.open {
    max-height: 500px;
    opacity: 1;
    padding: 8px 20px 16px;
    pointer-events: auto;
    border-bottom-color: var(--rule);
  }

  .nav-links>a,
  .nav-dropdown>a,
  .nav-dropdown-row>a {
    font-size: 16px;
    font-weight: 400;
    padding: 14px 0;
    border-bottom: 1px solid var(--rule);
    color: var(--black);
    transition: color 0.2s;
  }

  .nav-links>a:active,
  .nav-dropdown-row>a:active {
    color: var(--accent);
  }

  .nav-links>a.active,
  .nav-dropdown-row>a.active {
    color: var(--accent);
    font-weight: 500;
  }

  .nav-links>a:last-child {
    border-bottom: none;
  }

  .nav-dropdown {
    flex-direction: column;
    align-items: stretch;
    border-bottom: 1px solid var(--rule);
  }

  .nav-dropdown>a,
  .nav-dropdown-row>a {
    border-bottom: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex: 1;
  }

  /* Hide the default CSS chevron on mobile — replaced by JS-injected toggle */
  .nav-dropdown>a::after,
  .nav-dropdown-row>a::after {
    display: none;
  }

  /* Dropdown toggle chevron button */
  .nav-dropdown-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--secondary);
    flex-shrink: 0;
    border-radius: 8px;
    transition: background 0.2s, color 0.2s;
    margin-right: -8px;
  }

  .nav-dropdown-toggle:active {
    background: var(--accent-light);
    color: var(--accent);
  }

  .nav-dropdown-toggle svg {
    width: 16px;
    height: 16px;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .nav-dropdown.open .nav-dropdown-toggle svg {
    transform: rotate(180deg);
  }

  /* Dropdown row layout: link + toggle side by side */
  .nav-dropdown-row {
    display: flex;
    align-items: center;
    padding: 0;
  }

  .nav-dropdown-row>a {
    padding: 14px 0;
    flex: 1;
  }

  .nav-dropdown-menu {
    position: static;
    transform: none;
    opacity: 1;
    visibility: visible;
    border: none;
    border-radius: 0;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: transparent;
    padding: 0 0 0 16px;
    min-width: 0;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.25s ease,
                padding 0.3s ease;
  }

  .nav-dropdown.open .nav-dropdown-menu {
    max-height: 400px;
    opacity: 1;
    padding: 0 0 8px 16px;
    transform: none;
  }

  .nav-dropdown.open>a,
  .nav-dropdown.open .nav-dropdown-row>a {
    padding-bottom: 8px;
  }

  .nav-dropdown-menu a {
    font-size: 15px !important;
    font-weight: 400 !important;
    padding: 10px 0 !important;
    border-bottom: 1px solid var(--rule) !important;
    border-radius: 0 !important;
    color: var(--secondary) !important;
    transition: color 0.2s !important;
  }

  .nav-dropdown-menu a:last-child {
    border-bottom: none !important;
    padding-bottom: 4px !important;
  }

  .nav-dropdown-menu a:hover,
  .nav-dropdown-menu a:active {
    background: transparent !important;
    color: var(--accent) !important;
  }

  .nav-dropdown-menu a.active {
    color: var(--accent) !important;
    font-weight: 500 !important;
  }

  /* Sections */
  .section {
    padding: 56px 0;
  }

  .section-page-top {
    padding-top: 80px;
  }

  .section-subtitle {
    text-align: center;
  }


  .methods-list--spaced {
    margin-bottom: 48px;
  }

  /* Group members — stack name and details */
  .group-member {
    padding: 14px 0;
  }

  .group-member span {
    display: block;
    margin-top: 2px;
    font-size: 14px;
    line-height: 1.5;
  }

  /* Collab items — stack name and affiliation */
  .collab-item {
    padding: 10px 0;
    border-bottom: 1px solid var(--rule);
  }

  .collab-item:last-child {
    border-bottom: none;
  }

  .collab-item span {
    display: block;
    margin-top: 2px;
    font-size: 13px;
    line-height: 1.5;
  }

  .hero-about {
    padding: 32px 0 0;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 24px;
    text-align: center;
  }

  .hero-photo-col {
    position: static;
    max-width: 200px;
    margin: 0 auto;
    order: -1;
  }

  .bio-photo-wrap {
    border-radius: 50%;
    aspect-ratio: 1 / 1;
  }

  .hero-info-col {
    text-align: center;
  }

  .hero-overline {
    margin-bottom: 10px;
  }

  .hero-name {
    font-size: 38px;
    margin-bottom: 14px;
  }

  .hero-name br {
    display: none;
  }

  .hero-title {
    max-width: 100%;
    font-size: 17px;
  }

  .bio-tagline {
    font-size: 15px;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
    max-width: 400px;
  }

  .profile-links {
    margin-top: 20px;
    justify-content: center;
  }

  .bio-section {
    padding-top: 48px;
  }

  .bio-two-col {
    grid-template-columns: 1fr;
    gap: 20px;
    padding-bottom: 40px;
  }

  .area-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .area-card {
    border-radius: 12px;
  }

  .area-card-body {
    padding: 14px 16px;
  }

  .area-card-body h3 {
    font-size: 14px;
    margin-bottom: 2px;
  }

  .area-card-body h3::after {
    display: none;
  }

  .area-card-body p {
    font-size: 11px;
    line-height: 1.4;
  }

  .app-grid {
    grid-template-columns: 1fr;
  }

  .app-card {
    grid-template-columns: 120px 1fr;
  }

  .app-card-img-wrap {
    min-height: 120px;
  }

  .app-card-body {
    padding: 14px 16px;
  }

  .section-heading {
    margin-bottom: 28px;
    font-size: 22px;
  }

  .section-label {
    margin-bottom: 14px;
  }

  /* Contact */
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 20px 0 32px;
  }

  .contact-item h4 {
    margin-bottom: 8px;
  }

  /* Stats */
  .stats {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    padding: 36px 0;
    text-align: center;
  }

  .stat-number {
    font-size: 32px;
  }

  .stat-label {
    font-size: 13px;
  }

  .stat-item+.stat-item::before {
    left: -8px;
  }

  /* News items mobile */
  .news-item-summary {
    padding: 16px 16px;
    gap: 10px;
    flex-wrap: wrap;
  }

  .news-item-title {
    font-size: 15px;
    flex-basis: 100%;
    order: 3;
  }

  .news-item-chevron {
    margin-right: 12px;
  }

  .news-item-body-inner {
    padding: 0 16px 0 28px;
  }

  .news-item.expanded .news-item-body-inner {
    padding: 0 16px 20px 28px;
  }

  .news-card-text {
    font-size: 14px;
  }

  .news-card-tags {
    gap: 6px;
  }

  .news-tag {
    font-size: 11px;
    padding: 2px 10px;
  }

  /* Grids */
  .two-col {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .two-col-date {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .methods-list {
    grid-template-columns: 1fr;
  }

  .collab-grid {
    grid-template-columns: 1fr;
  }

  /* Research Interests — card tiles */
  .methods-list--interests {
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: none;
    padding: 0;
  }

  .methods-list--interests li {
    position: relative;
    padding: 14px 16px;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--black);
    background: var(--white);
    border: 1px solid var(--rule);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    text-align: center;
  }

  /* Tools & Methods — wrapping pill chips */
  .methods-list--pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
  }

  .methods-list--pills li {
    display: inline-block;
    font-size: 13px;
    font-weight: 400;
    color: var(--secondary);
    padding: 6px 14px;
    border: 1px solid var(--rule);
    border-radius: 100px;
    background: linear-gradient(180deg, #FFFFFF, #F7F8FA);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
  }

  /* Tagline between subtitle and pills */
  .research-tagline {
    font-size: 15px;
    font-weight: 400;
    font-style: italic;
    color: var(--secondary);
    line-height: 1.5;
    margin-bottom: 14px;
    text-align: center;
  }

  /* Research Overview Grid — stack on mobile */
  .research-overview-grid {
    grid-template-columns: 1fr;
    gap: 40px;
    padding-top: 0;
    margin-bottom: 48px;
  }

  .research-overview-grid::before,
  .research-overview-grid::after {
    display: none;
  }

  .research-overview-col:first-child,
  .research-overview-col:last-child {
    grid-column: 1;
  }

  .interests-list li {
    padding: 16px 16px;
    justify-content: center;
  }

  .interests-list li:hover {
    transform: none;
  }

  .interests-text {
    font-size: 16px;
  }

  .research-overview-grid .section-subtitle {
    text-align: center;
  }

  .research-overview-grid .research-tagline {
    text-align: center;
  }

  .tools-cluster {
    gap: 16px;
  }

  .tools-group-label {
    text-align: center;
  }

  .tools-pills {
    justify-content: center;
  }

  .tools-pills li {
    font-size: 13px;
    font-weight: 400;
    color: var(--secondary);
    padding: 6px 14px;
  }

  /* Publications */
  .pub-search-bar {
    max-width: 100%;
  }

  .pub-filters {
    gap: 6px;
    margin-bottom: 40px;
  }

  .pub-filter {
    padding: 8px 16px;
    font-size: 13px;
  }

  .pub-section-heading {
    font-size: clamp(20px, 5vw, 28px);
    padding: 12px 20px;
    margin-top: 48px;
    margin-bottom: 28px;
  }

  .pub-year-group {
    margin-bottom: 40px;
  }

  .pub-year {
    font-size: 26px;
    top: 54px;
    padding: 12px 0 8px;
  }

  .pub-entry {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .pub-entry-full {
    padding: 16px 0 16px 30px;
  }

  .pub-entry-full::before {
    font-size: 14px;
    top: 16px;
  }

  .pub-title-text {
    font-size: 15px;
    line-height: 1.45;
  }

  .pub-authors-text {
    font-size: 14px;
  }

  .pub-venue-text {
    font-size: 13px;
  }

  .pub-links-list {
    gap: 10px;
    margin-top: 8px;
  }

  .pub-links-list a {
    font-size: 13px;
    padding: 4px 10px;
    border: 1px solid var(--accent);
    border-radius: 4px;
    display: inline-block;
    line-height: 1;
  }

  .pub-badge {
    display: block;
    margin-left: 0;
    margin-top: 6px;
    width: fit-content;
    font-size: 11px;
  }

  .pub-search {
    margin-bottom: 48px;
    max-width: 100%;
  }

  /* Teaching / Activities / CV */
  .teaching-entry,
  .activity-row,
  .cv-entry {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .teaching-entry {
    padding: 18px 0;
  }

  .teaching-period {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--accent);
  }

  .teaching-course {
    font-size: 16px;
  }

  .teaching-tag {
    display: block;
    width: fit-content;
    margin-left: 0;
    margin-top: 6px;
    font-size: 11px;
  }

  .teaching-detail {
    font-size: 14px;
  }

  .teaching-heading {
    margin-bottom: 0;
  }

  .teaching-heading-row {
    gap: 16px;
    margin-bottom: 24px;
  }

  .teaching-heading-row .teaching-heading {
    padding-left: 16px;
  }

  .teaching-logo {
    height: 56px;
  }

  /* Timeline */
  .timeline {
    padding-left: 24px;
  }

  .timeline-item {
    padding: 18px 0;
  }

  .timeline-item::before {
    left: -24px;
    top: 24px;
  }

  .timeline-item::after {
    left: -24px;
    top: 24px;
  }

  .timeline-content h4 {
    font-size: 16px;
  }

  .timeline-date {
    font-size: 12px;
    margin-bottom: 4px;
  }

  .timeline-pills {
    justify-content: center;
  }

  .timeline-pill {
    font-size: 12px;
    padding: 4px 10px;
  }

  .section-title {
    margin-bottom: 32px;
  }

  /* CV page — reduce top padding for shorter mobile nav */
  .section-cv-top {
    padding-top: 80px;
  }

  /* CV skills — center on mobile */
  .cv-skills {
    justify-content: center;
  }

  .cv-skills-group {
    margin-bottom: 24px;
  }

  .research-figure-grid {
    grid-template-columns: 1fr;
  }

  .page-hero {
    min-height: 34vh;
  }

  .page-hero-content {
    padding: 56px 20px 28px;
  }

  .page-hero-title {
    font-size: 32px;
    margin-bottom: 8px;
  }

  .page-hero-bg {
    background-position: center 30%;
  }

  .page-hero-subtitle {
    font-size: 14px;
    line-height: 1.5;
  }

  .page-hero-label {
    font-size: 11px;
    padding: 4px 12px;
    margin-bottom: 12px;
  }

  .research-section-number {
    width: 34px;
    height: 34px;
    font-size: 14px;
    border-radius: 8px;
  }

  .research-section-header {
    gap: 14px;
    margin-bottom: 20px;
  }

  .section-research-sub {
    padding-top: 40px;
  }

  .research-section-block {
    padding: 32px 0;
  }

  .research-section-block:first-of-type {
    border-top: none;
    padding-top: 0;
  }

  .research-section-block h3 {
    font-size: 19px;
    line-height: 1.3;
  }

  .research-section-block>p {
    font-size: 15px;
    text-align: left;
  }

  .research-overview {
    margin-bottom: 32px;
    font-size: 15px;
    line-height: 1.55;
  }

  .breadcrumb {
    margin-bottom: 16px;
    font-size: 13px;
  }

  .research-split {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .research-split-text::before {
    /* Replace side bar with a top accent line on mobile */
    display: block;
    position: relative;
    left: 0;
    top: 0;
    bottom: auto;
    width: 40px;
    height: 3px;
    border-radius: 3px;
    margin-bottom: 14px;
    opacity: 0.7;
  }

  .research-split-text {
    padding-top: 0;
    text-align: left;
  }

  .research-split-text p {
    font-size: 15px;
    line-height: 1.65;
  }

  /* Gallery — constrain height on mobile */
  .research-gallery-slide img {
    max-height: 300px;
  }

  .research-gallery-caption {
    padding: 24px 14px 10px;
    font-size: 12px;
  }

  .research-ref-toggle {
    margin-top: 16px;
    padding: 7px 14px;
    font-size: 12px;
  }

  .research-ref-toggle svg {
    width: 12px;
    height: 12px;
  }

  .research-code-toggle {
    margin-top: 16px;
    margin-left: 6px;
    padding: 7px 14px;
    font-size: 12px;
  }

  .research-code-toggle svg {
    width: 12px;
    height: 12px;
  }

  .research-code-links {
    padding: 12px 14px;
  }

  .research-code-links a {
    font-size: 12px;
    padding: 5px 12px;
  }

  .research-ref {
    font-size: 13px;
    padding: 12px 14px;
    line-height: 1.6;
    border-radius: 8px;
    overflow-wrap: break-word;
    word-break: break-word;
  }

  .research-ref a {
    word-break: break-all;
  }

  .research-refs-list {
    font-size: 13px;
    padding-left: 20px;
  }

  .research-gallery-track {
    border-radius: 10px;
  }

  .gallery-arrow {
    width: 34px;
    height: 34px;
  }

  .gallery-arrow svg {
    width: 15px;
    height: 15px;
  }

  .gallery-arrow--prev {
    left: 6px;
  }

  .gallery-arrow--next {
    right: 6px;
  }

  /* Gallery dots — bigger touch targets on mobile */
  .gallery-dots {
    margin-top: 12px;
    gap: 10px;
  }

  .gallery-dot {
    width: 10px;
    height: 10px;
  }

  /* Lightbox — mobile-friendly sizing */
  .lightbox-content {
    max-width: 96vw;
  }

  .lightbox-content img {
    max-width: 96vw;
    max-height: 70vh;
    border-radius: 6px;
  }

  .lightbox-nav {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.22);
    border-color: rgba(255, 255, 255, 0.35);
  }

  .lightbox-nav svg {
    width: 20px;
    height: 20px;
  }

  .lightbox-nav--prev {
    left: 6px;
  }

  .lightbox-nav--next {
    right: 6px;
  }

  .lightbox-close {
    top: 10px;
    right: 10px;
    width: 42px;
    height: 42px;
    background: rgba(255, 255, 255, 0.22);
    border-color: rgba(255, 255, 255, 0.35);
    font-size: 22px;
  }

  .lightbox-caption {
    font-size: 13px;
    padding: 0 16px;
    max-width: 90vw;
  }

  .lightbox-counter {
    font-size: 11px;
  }

  /* Page hero subtitle — better wrapping on mobile */
  .page-hero-subtitle {
    line-height: 1.5;
  }

  /* Page nav — full-width stacked links on mobile */
  .page-nav {
    flex-direction: column;
    gap: 0;
  }

  .page-nav-link {
    font-size: 15px;
    padding: 14px 0;
    border: none;
    border-bottom: 1px solid var(--rule);
    border-radius: 0;
    justify-content: space-between;
    width: 100%;
  }

  .page-nav-link:first-child {
    border-top: 1px solid var(--rule);
  }

  .page-nav-link:hover {
    background: transparent;
    border-color: var(--rule);
  }

  /* Footer */
  .footer {
    padding: 32px 0;
  }
}

/* Small phones */
@media (max-width: 480px) {

  .container,
  .container-wide {
    padding: 0 16px;
  }

  .nav-inner {
    padding: 0 16px;
  }

  .nav-links.open {
    padding: 8px 16px 16px;
  }

  .hero-about {
    padding: 24px 0 0;
  }

  .hero-name {
    font-size: 32px;
    margin-bottom: 10px;
  }

  .hero-title {
    font-size: 15px;
  }

  .hero-overline {
    font-size: 11px;
    margin-bottom: 8px;
  }

  .hero-photo-col {
    max-width: 160px;
  }

  .hero-grid {
    gap: 20px;
  }

  .section {
    padding: 36px 0;
  }

  .section-page-top {
    padding-top: 64px;
  }

  /* Page hero — tighter on small phones */
  .page-hero {
    min-height: 28vh;
  }

  .page-hero-content {
    padding: 44px 16px 20px;
  }

  .page-hero-title {
    font-size: 26px;
    margin-bottom: 6px;
  }

  .page-hero-subtitle {
    font-size: 13px;
    line-height: 1.4;
  }

  .page-hero-label {
    font-size: 10px;
    padding: 3px 10px;
    margin-bottom: 10px;
  }

  /* Research subpage — tighter on small phones */
  .section-research-sub {
    padding-top: 32px;
  }

  .research-section-block {
    padding: 28px 0;
  }

  .research-section-header {
    gap: 12px;
    margin-bottom: 18px;
  }

  .research-section-number {
    width: 30px;
    height: 30px;
    font-size: 13px;
    border-radius: 7px;
    margin-top: 2px;
  }

  .research-section-block h3 {
    font-size: 18px;
  }

  .research-overview {
    margin-bottom: 28px;
    font-size: 15px;
    line-height: 1.55;
  }

  .breadcrumb {
    margin-bottom: 14px;
    font-size: 12px;
  }

  .breadcrumb .sep {
    margin: 0 6px;
  }

  .research-split-text::before {
    width: 32px;
    margin-bottom: 10px;
  }

  .research-split-text p {
    font-size: 14px;
    line-height: 1.65;
  }

  .research-ref-toggle {
    margin-top: 14px;
    padding: 6px 12px;
    font-size: 12px;
    gap: 5px;
  }

  .research-code-toggle {
    margin-top: 14px;
    margin-left: 5px;
    padding: 6px 12px;
    font-size: 12px;
    gap: 5px;
  }

  .research-code-toggle svg {
    width: 12px;
    height: 12px;
  }

  .research-code-links {
    padding: 10px 12px;
    gap: 8px;
  }

  .research-code-links a {
    font-size: 11px;
    padding: 4px 10px;
  }

  .research-ref {
    font-size: 12px;
    padding: 12px 14px;
    line-height: 1.6;
    border-radius: 8px;
    overflow-wrap: break-word;
    word-break: break-word;
  }

  .research-ref a {
    word-break: break-all;
  }

  .research-split {
    gap: 16px;
  }

  .research-gallery-slide img {
    max-height: 260px;
  }

  .research-gallery-caption {
    padding: 20px 12px 8px;
    font-size: 11px;
  }

  .gallery-arrow {
    width: 30px;
    height: 30px;
  }

  .gallery-arrow svg {
    width: 13px;
    height: 13px;
  }

  .gallery-arrow--prev {
    left: 4px;
  }

  .gallery-arrow--next {
    right: 4px;
  }

  /* Gallery dots — maintain touch targets on small phones */
  .gallery-dot {
    width: 9px;
    height: 9px;
  }

  /* Lightbox — tighter on small phones */
  .lightbox-content img {
    max-height: 60vh;
  }

  .lightbox-nav {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
  }

  .lightbox-nav svg {
    width: 18px;
    height: 18px;
  }

  .lightbox-nav--prev {
    left: 4px;
  }

  .lightbox-nav--next {
    right: 4px;
  }

  .lightbox-close {
    top: 8px;
    right: 8px;
    width: 38px;
    height: 38px;
    font-size: 20px;
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
  }

  .lightbox-caption {
    font-size: 12px;
    max-width: 94vw;
    margin-top: 12px;
  }

  .lightbox-counter {
    font-size: 10px;
  }

  .methods-list--spaced {
    margin-bottom: 32px;
  }

  /* Research Interests tiles — tighter on small phones */
  .methods-list--interests {
    gap: 8px;
  }

  .methods-list--interests li {
    font-size: 14px;
    padding: 12px 14px;
    border-radius: 10px;
  }

  /* Tools & Methods pills — smaller on small phones */
  .methods-list--pills {
    gap: 6px;
  }

  .methods-list--pills li {
    font-size: 12px;
    padding: 5px 12px;
  }

  .research-tagline {
    font-size: 14px;
    margin-bottom: 12px;
  }

  /* Research overview — tighter on small phones */
  .research-overview-grid {
    gap: 32px;
    margin-bottom: 32px;
  }

  .interests-list {
    gap: 8px;
  }

  .interests-list li {
    padding: 14px 14px;
    border-radius: 10px;
    justify-content: center;
  }

  .interests-text {
    font-size: 15px;
  }

  .tools-pills li {
    font-size: 12px;
    padding: 5px 12px;
  }

  .tools-cluster {
    gap: 14px;
  }

  .tools-group {
    gap: 8px;
  }

  .tools-group-label {
    font-size: 10px;
  }

  /* Publications — tighter on small phones */
  .pub-search-bar input {
    font-size: 15px;
  }

  .pub-filters {
    gap: 5px;
    margin-bottom: 32px;
  }

  .pub-filter {
    padding: 6px 12px;
    font-size: 12px;
  }

  .pub-section-heading {
    font-size: clamp(17px, 4.5vw, 24px);
    padding: 10px 14px;
    margin-top: 36px;
    margin-bottom: 20px;
  }

  .pub-section-heading::before {
    border-left-width: 3px;
    border-radius: 0 10px 10px 0;
  }

  .pub-year-group {
    margin-bottom: 28px;
  }

  .pub-year {
    font-size: 22px;
    padding: 10px 0 6px;
  }

  .pub-entry-full {
    padding: 14px 0 14px 26px;
  }

  .pub-entry-full::before {
    font-size: 12px;
    top: 14px;
  }

  .pub-title-text {
    font-size: 14px;
    line-height: 1.5;
  }

  .pub-authors-text {
    font-size: 13px;
  }

  .pub-venue-text {
    font-size: 12px;
  }

  .pub-links-list a {
    font-size: 12px;
    padding: 3px 8px;
  }

  /* Teaching — tighter on small phones */
  .teaching-entry {
    padding: 14px 0;
  }

  .teaching-course {
    font-size: 15px;
    line-height: 1.4;
  }

  .teaching-detail {
    font-size: 13px;
  }

  .teaching-period {
    font-size: 12px;
  }

  .teaching-heading {
    margin-bottom: 0;
    font-size: clamp(22px, 5vw, 28px);
  }

  .teaching-heading-row {
    gap: 12px;
    margin-bottom: 20px;
  }

  .teaching-heading-row .teaching-heading {
    padding-left: 12px;
  }

  .teaching-logo {
    height: 44px;
  }

  /* App cards — stack vertically on small phones */
  .app-card {
    grid-template-columns: 1fr;
  }

  .app-card-img-wrap {
    min-height: 0;
    height: 140px;
  }

  .app-card-body {
    padding: 16px;
  }

  .app-card-body h3 {
    font-size: 15px;
  }

  .app-card-body p {
    font-size: 13px;
    line-height: 1.55;
  }

  .app-card-number {
    font-size: 10px;
    margin-bottom: 4px;
  }

  /* Group members — tighter spacing */
  .group-member {
    padding: 12px 0;
    font-size: 14px;
  }

  .group-member span {
    font-size: 13px;
  }

  /* Collab items — tighter spacing */
  .collab-item {
    font-size: 14px;
    padding: 8px 0;
  }

  .collab-item span {
    font-size: 12px;
  }

  .bio-tagline {
    font-size: 14px;
  }

  .bio-col p {
    font-size: 14px;
  }

  .bio-two-col {
    padding-bottom: 28px;
    gap: 16px;
  }

  .profile-links {
    gap: 8px;
  }

  .profile-link {
    font-size: 12px;
    padding: 6px 10px;
    gap: 4px;
  }

  .profile-link svg {
    width: 13px;
    height: 13px;
  }

  .area-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .area-card-body {
    padding: 12px 14px;
  }

  .area-card-body h3 {
    font-size: 15px;
  }

  .area-card-body p {
    font-size: 12px;
  }

  .stats {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    padding: 28px 0;
  }

  .stat-number {
    font-size: 24px;
  }

  .stat-label {
    font-size: 11px;
  }

  .stat-item+.stat-item::before {
    left: -4px;
  }

  .section-heading {
    font-size: 20px;
    margin-bottom: 24px;
  }

  .section-label {
    font-size: 11px;
    margin-bottom: 12px;
  }

  .contact-grid {
    gap: 20px;
  }

  .page-nav-link {
    font-size: 14px;
    padding: 12px 0;
  }

  .timeline {
    padding-left: 20px;
  }

  .timeline-item {
    padding: 12px 0;
  }

  .timeline-item::before {
    left: -20px;
    top: 18px;
    width: 7px;
    height: 7px;
  }

  .timeline-item::after {
    left: -20px;
    top: 18px;
    width: 7px;
    height: 7px;
  }

  .timeline-content h4 {
    font-size: 14px;
    line-height: 1.4;
  }

  .timeline-content p {
    font-size: 13px;
    line-height: 1.5;
  }

  .timeline-date {
    font-size: 11px;
    margin-bottom: 3px;
  }

  .timeline-pills {
    gap: 5px;
  }

  .timeline-pill {
    font-size: 11px;
    padding: 3px 8px;
  }

  .section-title {
    margin-bottom: 24px;
  }

  .section-subtitle {
    font-size: 12px;
    margin-bottom: 12px;
  }

  /* CV page — tighter top padding on small phones */
  .section-cv-top {
    padding-top: 64px;
  }

  /* CV skills — smaller pills on small phones */
  .cv-skill {
    font-size: 13px;
    padding: 3px 10px;
  }

  .cv-skill small {
    font-size: 11px;
  }

  .cv-skills-group {
    margin-bottom: 20px;
  }
}

/* ---- Print ---- */
@media print {

  .nav,
  .pub-search,
  .no-results {
    display: none !important;
  }

  body {
    font-size: 11pt;
    color: #000;
  }

  .section {
    padding: 24pt 0;
  }

  .container {
    max-width: 100%;
    padding: 0;
  }

  a {
    color: #000;
    text-decoration: underline;
  }

  .fade-in {
    opacity: 1 !important;
    transform: none !important;
  }

  .pub-year {
    position: static;
  }

  h1 {
    font-size: 24pt;
  }

  h2 {
    font-size: 18pt;
  }

  h3 {
    font-size: 14pt;
  }

  .cv-entry,
  .teaching-entry,
  .activity-row {
    page-break-inside: avoid;
  }

  .section-title {
    page-break-after: avoid;
  }

  h2,
  h3 {
    page-break-after: avoid;
  }
}

/* ---- Reduced Motion ---- */
@media (prefers-reduced-motion: reduce) {
  .fade-in {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .hero-grid {
    animation: none;
    opacity: 1;
  }

  html {
    scroll-behavior: auto;
  }
}