/* ===== Custom Properties ===== */
:root {
  --bg-primary: #ffffff;
  --bg-alt: #f7f8fb;
  --text-primary: #1a1a2e;
  --text-secondary: #5a6578;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-soft: rgba(37,99,235,0.06);
  --award-amber: #d97706;
  --award-amber-bg: #fffbeb;
  --award-green: #047857;
  --award-green-bg: #ecfdf5;
  --border-subtle: rgba(0,0,0,0.05);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.10);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --max-width: 1000px;
  --nav-height: 56px;
}

/* ===== Reset ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ===== Base ===== */
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.65;
  color: var(--text-primary);
  background: var(--bg-primary);
  -webkit-font-smoothing: antialiased;
}

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

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

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

/* ===== Container ===== */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== Sticky Nav ===== */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255,255,255,0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  transform: translateY(-100%);
  transition: transform 0.3s ease;
}

.site-nav.visible {
  transform: translateY(0);
}

.site-nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-height);
}

.nav-name {
  font-weight: 600;
  font-size: 16px;
  color: var(--text-primary);
}

.nav-links {
  display: flex;
  gap: 24px;
  list-style: none;
}

.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.2s;
}

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

/* ===== Sections ===== */
section {
  padding: 28px 0;
}

section.alt-bg {
  background: var(--bg-alt);
}

.section-heading {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 24px;
  letter-spacing: -0.02em;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--accent);
  display: inline-block;
}

/* ===== Hero ===== */
.hero {
  padding: 60px 0 20px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 40px;
  align-items: start;
}

.hero-photo {
  width: 220px;
  height: 220px;
  border-radius: var(--radius-lg);
  object-fit: cover;
  box-shadow: 0 4px 20px rgba(0,0,0,0.10);
}

.hero-name {
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 6px;
  line-height: 1.2;
}

.hero-title {
  font-size: 17px;
  color: var(--text-secondary);
  margin-bottom: 20px;
  font-weight: 400;
}

.hero-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.hero-links a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  color: var(--accent);
  background: var(--accent-soft);
  transition: background 0.2s, color 0.2s;
}

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

.hero-links a svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
  flex-shrink: 0;
}

.hero-bio {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 0;
}

.hero-bio p + p {
  margin-top: 14px;
}

.hero-bio a {
  font-weight: 500;
}

/* ===== News ===== */
#news .section-heading {
  margin-bottom: 20px;
}

.news-list {
  display: grid;
}

.news-item {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 12px;
  padding: 10px 0 10px 16px;
  border-left: 2px solid var(--border-subtle);
  font-size: 14px;
  transition: border-color 0.2s;
}

.news-item:hover {
  border-left-color: var(--accent);
}

.news-extra {
  display: none;
}

.news-list.expanded .news-extra {
  display: grid;
}

.news-date {
  font-weight: 600;
  color: var(--accent);
  font-size: 13px;
  white-space: nowrap;
}

.news-text {
  color: var(--text-secondary);
  line-height: 1.5;
}

.news-text a {
  font-weight: 500;
}

.news-new {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--award-amber);
  background: var(--award-amber-bg);
  padding: 1px 6px;
  border-radius: 4px;
  letter-spacing: 0.05em;
  vertical-align: middle;
}

.news-toggle {
  display: inline-block;
  margin-top: 16px;
  padding: 6px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--accent);
  background: var(--accent-soft);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.2s;
}

.news-toggle:hover {
  background: rgba(37,99,235,0.12);
}

/* ===== Affiliations ===== */
.affil-timeline {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 20px;
}

.affil-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.affil-logo {
  width: 80px;
  height: 80px;
  object-fit: contain;
  margin-bottom: 12px;
  transition: transform 0.25s ease;
}

.affil-item:hover .affil-logo {
  transform: translateY(-3px);
}

.affil-role {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
}

.affil-org {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.affil-dates {
  font-size: 11px;
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* ===== Selected Research ===== */
.research-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
}

.research-item {
  text-align: center;
}

.research-video {
  width: 100%;
  border-radius: var(--radius-sm);
  display: block;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.research-label {
  display: inline-block;
  margin-top: 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  transition: color 0.2s;
}

.research-item:hover .research-label {
  color: var(--accent);
}

/* ===== Publications ===== */
.pub-list {
  display: grid;
  gap: 10px;
}

.pub-card {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 16px;
  background: var(--bg-primary);
  border: none;
  border-left: 3px solid transparent;
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.25s ease, transform 0.25s ease, border-color 0.25s ease;
}

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

.pub-thumb {
  width: 100%;
  border-radius: var(--radius-sm);
}

.pub-title {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.45;
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}

.pub-title a {
  color: var(--text-primary);
}

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

.pub-authors {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 4px;
  line-height: 1.5;
}

.pub-authors strong {
  color: var(--text-primary);
  font-weight: 600;
}

.pub-venue {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 8px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.pub-venue em {
  font-style: italic;
}

.badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  font-style: normal;
  line-height: 1.6;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.badge-amber {
  background: var(--award-amber-bg);
  color: var(--award-amber);
  border: 1px solid rgba(217,119,6,0.15);
}

.badge-green {
  background: var(--award-green-bg);
  color: var(--award-green);
  border: 1px solid rgba(4,120,87,0.15);
}

.badge-blue {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 500;
  text-transform: none;
}

.pub-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pub-actions a {
  display: inline-block;
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  color: var(--accent);
  background: var(--accent-soft);
  transition: background 0.2s, color 0.2s;
  text-transform: capitalize;
}

.pub-actions a:hover {
  background: var(--accent);
  color: #fff;
}

/* ===== Services ===== */
.service-list {
  display: grid;
}

.service-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px;
  padding: 2px 0;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 12px;
}

.service-row:last-child {
  border-bottom: none;
}

.service-name {
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
}

.service-values {
  color: var(--text-secondary);
}

/* ===== Visitors Globe ===== */
.globe-section {
  text-align: center;
}

.globe-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.globe-canvas {
  max-width: 500px;
  width: 100%;
  aspect-ratio: 1 / 1;
  cursor: grab;
}

.globe-canvas:active {
  cursor: grabbing;
}

.globe-stats {
  margin-top: 16px;
  font-size: 14px;
  color: var(--text-secondary);
}

.globe-stats-number {
  font-weight: 600;
  color: var(--accent);
}

/* ===== Media Coverage Logo Cloud ===== */
.media-cloud {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 28px 36px;
}

.media-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 140px;
  height: 40px;
  opacity: 0.7;
  transition: opacity 0.2s;
  filter: grayscale(60%);
}

.media-logo:hover {
  opacity: 1;
  filter: grayscale(0%);
}

.media-logo img {
  max-height: 40px;
  max-width: 140px;
  width: auto;
  height: auto;
  object-fit: contain;
}

/* ===== Scroll Fade-In Animation ===== */
.js-ready .fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

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

/* ===== Responsive & Hamburger Menu ===== */
.nav-hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: var(--text-primary);
}

.nav-hamburger svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

@media (max-width: 768px) {
  .nav-hamburger {
    display: block;
  }

  .nav-links {
    display: block;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-subtle);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }

  .nav-links.active {
    max-height: 300px;
  }

  .nav-links li {
    border-bottom: 1px solid rgba(0,0,0,0.04);
  }

  .nav-links a {
    display: block;
    padding: 12px 24px;
    font-size: 15px;
  }

  .research-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .media-cloud {
    gap: 20px 24px;
  }

  .media-logo {
    width: 110px;
    height: 36px;
  }

  .media-logo img {
    max-height: 36px;
    max-width: 110px;
  }

  .affil-timeline {
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 32px;
    text-align: center;
  }

  .hero-photo {
    margin: 0 auto;
    width: 180px;
    height: 180px;
  }

  .hero-links {
    justify-content: center;
  }

  .hero-bio {
    text-align: left;
  }

  .hero-name {
    font-size: 30px;
  }

  .pub-card {
    grid-template-columns: 1fr;
  }

  .pub-thumb {
    max-width: 100%;
  }

  .news-item {
    grid-template-columns: 80px 1fr;
    gap: 8px;
    padding: 8px 0 8px 12px;
  }

  section {
    padding: 32px 0;
  }

  #news {
    padding: 32px 0;
  }

  .section-heading {
    font-size: 20px;
  }

  .globe-canvas {
    max-width: 320px;
  }
}

@media (max-width: 640px) {
  .hero {
    padding: 40px 0 8px;
  }

  .hero-name {
    font-size: 26px;
  }

  .container {
    padding: 0 16px;
  }

  .pub-card {
    padding: 16px;
  }

  .affil-timeline {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .nav-links {
    gap: 16px;
  }

  .nav-links a {
    font-size: 13px;
  }
}

/* ===== Skip Link (Accessibility) ===== */
.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  z-index: 1100;
  padding: 8px 16px;
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
}

.skip-link:focus {
  top: 8px;
  color: #fff;
}

/* ===== Focus Styles ===== */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ===== Reduced Motion ===== */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .js-ready .fade-in {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .site-nav {
    transition: none;
  }

  .pub-card {
    transition: none;
  }

  .news-item {
    transition: none;
  }

  a, .hero-links a, .pub-actions a {
    transition: none;
  }

  .affil-logo {
    transition: none;
  }

  .research-video {
    transition: none;
  }

  .media-logo {
    transition: none;
  }
}
