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

:root {
  --bg: #f2faf7;
  --bg-alt: #e8f5f0;
  --surface: #ffffff;
  --surface2: #d6f0e8;
  --border: rgba(0,0,0,0.08);
  --accent: #00897b;
  --accent2: #26a69a;
  --accent3: #00695c;
  --teal: #00bcd4;
  --coral: #ff7043;
  --coral-light: #ff8a65;
  --pink: #ff7043;
  --text: #00352e;
  --text-muted: #1a4a42;
  --text-dim: #4a7a72;
  --radius: 12px;
  --radius-lg: 20px;
  --shadow: 0 2px 16px rgba(0,137,123,0.08);
  --shadow-lg: 0 8px 40px rgba(0,137,123,0.12);
  --font: 'Inter', sans-serif;
  --font-head: 'Space Grotesk', sans-serif;
  --nav-h: 64px;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: #f8fffe;
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
}

a { color: var(--accent); text-decoration: none; transition: color .2s; }
a:hover { color: var(--accent3); }

strong { color: var(--text); font-weight: 600; }

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #80cbc4; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ===== NAVBAR ===== */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 1000;
  background: rgba(242,250,247,0.82);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  transition: background .3s, box-shadow .3s;
}
#navbar.scrolled {
  background: rgba(255,255,255,0.97);
  box-shadow: 0 1px 20px rgba(0,137,123,0.08);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-logo {
  font-family: var(--font-head);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent) !important;
  letter-spacing: 0.05em;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 4px;
  margin-left: auto;
}

.nav-links a {
  color: var(--text-dim);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 6px;
  transition: all .2s;
}
.nav-links a:hover, .nav-links a.active {
  color: var(--accent);
  background: #e0f2f1;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  margin-left: auto;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-dim);
  border-radius: 2px;
  transition: all .3s;
}

/* ===== HERO ===== */
#hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow: hidden;
  background: transparent;
  padding-bottom: 60px;
}

#graphCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  gap: 52px;
  max-width: 1060px;
  padding: 110px 24px 40px;
  width: 100%;
}

.hero-photo-wrap {
  position: sticky;
  top: 110px;
  flex-shrink: 0;
  align-self: flex-start;
}

.hero-photo {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  object-fit: cover;
  object-position: top center;
  border: 3px solid rgba(0,137,123,0.3);
  box-shadow: 0 0 40px rgba(0,137,123,0.15), 0 8px 32px rgba(0,0,0,0.1);
  display: block;
}

.photo-ring {
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  border: 1px solid rgba(0,137,123,0.2);
  animation: spin 20s linear infinite;
}
.photo-ring::after {
  content: '';
  position: absolute;
  top: -3px; left: 50%;
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
  transform: translateX(-50%);
  box-shadow: 0 0 10px var(--accent);
}

@keyframes spin { to { transform: rotate(360deg); } }

.hero-text { flex: 1; }

.hero-name {
  font-family: var(--font-head);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 12px;
  background: linear-gradient(135deg, #00352e 0%, var(--accent) 55%, var(--coral) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-role {
  color: var(--text-muted);
  font-size: 1rem;
  margin-bottom: 20px;
  font-weight: 400;
}

.hero-affiliations {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.affil-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 500;
  padding: 5px 12px;
  border-radius: 20px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

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

.hero-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--accent);
  color: #fff !important;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: 8px;
  transition: all .2s;
  border: 1px solid transparent;
  box-shadow: 0 2px 12px rgba(0,137,123,0.25);
}
.hero-btn:hover {
  background: var(--accent3);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0,137,123,0.35);
}

.hero-btn-outline {
  background: #fff;
  border-color: var(--border);
  color: var(--text-muted) !important;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.hero-btn-outline:hover {
  background: #e0f2f1;
  border-color: var(--accent);
  color: var(--accent) !important;
  box-shadow: 0 2px 12px rgba(0,137,123,0.12);
}

/* Bio text block inside hero */
.hero-bio {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid rgba(0,137,123,0.15);
}
.hero-bio p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.8;
  margin-bottom: 12px;
}
.hero-bio p:last-child { margin-bottom: 0; }
.hero-bio strong { color: var(--text); font-weight: 600; }
.hero-bio a { color: var(--accent); font-weight: 500; }
.hero-bio a:hover { color: var(--accent3); text-decoration: underline; }
.hero-bio em { color: var(--text); font-style: italic; }

.hero-scroll-hint {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--text-dim);
  font-size: 0.75rem;
  animation: bounce 2s ease-in-out infinite;
  z-index: 2;
}
@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(6px); }
}

/* ===== SECTIONS ===== */
.section { padding: 96px 0; position: relative; z-index: 1; background: rgba(255,255,255,0.72); }
.section-alt { background: rgba(240,252,248,0.68); }

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

.section-title {
  font-family: var(--font-head);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--text);
  margin-bottom: 48px;
  position: relative;
  display: inline-block;
}
.section-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 40px;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--teal));
  border-radius: 2px;
}

/* ===== ABOUT ===== */
.about-grid {
  max-width: 760px;
}

.about-text p {
  color: var(--text-muted);
  margin-bottom: 16px;
  font-size: 1rem;
  line-height: 1.8;
}
.about-text p:last-child { margin-bottom: 0; }
.about-text strong { color: var(--text); font-weight: 600; }
.about-text a { color: var(--accent); font-weight: 500; }
.about-text a:hover { color: var(--accent3); text-decoration: underline; }
.about-text em { color: var(--text); font-style: italic; }

.about-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.info-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  transition: border-color .2s, transform .2s, box-shadow .2s;
  box-shadow: var(--shadow);
}
.info-card:hover {
  border-color: rgba(13,148,136,0.25);
  transform: translateX(3px);
  box-shadow: 0 4px 20px rgba(13,148,136,0.1);
}

.info-card-icon { font-size: 1.25rem; flex-shrink: 0; margin-top: 2px; }
.info-card-label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-dim); margin-bottom: 2px; }
.info-card-value { font-size: 0.9rem; font-weight: 600; color: var(--text); }
.info-card-sub { font-size: 0.8rem; color: var(--text-muted); margin-top: 1px; }

/* ===== NEWS ===== */
.news-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.news-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
  transition: background .2s;
}
.news-item:last-child { border-bottom: none; }
.news-item:hover { background: rgba(0,137,123,0.03); }

.news-item p {
  color: var(--text-muted);
  font-size: 0.925rem;
  flex: 1;
}
.news-item a { color: var(--accent); }
.news-item a:hover { color: var(--accent3); }
.news-item strong { color: var(--text); }

.news-badge {
  flex-shrink: 0;
  background: var(--surface2);
  color: var(--text-dim);
  font-size: 0.7rem;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 20px;
  margin-top: 2px;
  letter-spacing: 0.05em;
  border: 1px solid var(--border);
}
.badge-new {
  background: #b2dfdb;
  color: var(--accent3);
  border-color: #80cbc4;
}

/* ===== PUBLICATIONS ===== */
.pub-filter {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 36px;
}

.filter-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 500;
  padding: 6px 16px;
  border-radius: 20px;
  cursor: pointer;
  transition: all .2s;
  font-family: var(--font);
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.filter-btn:hover { border-color: var(--accent); color: var(--accent); background: #e0f2f1; }
.filter-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 2px 10px rgba(0,137,123,0.25);
}

.pub-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.pub-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  position: relative;
  transition: all .25s;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.pub-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--accent), var(--teal));
  opacity: 0;
  transition: opacity .25s;
}
.pub-card:hover {
  border-color: rgba(0,137,123,0.2);
  transform: translateX(4px);
  box-shadow: 0 4px 24px rgba(0,137,123,0.1);
}
.pub-card:hover::before { opacity: 1; }

.pub-card.hidden { display: none; }

.pub-venue-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 3px 9px;
  border-radius: 4px;
  margin-bottom: 10px;
  background: var(--surface2);
  color: var(--text-dim);
}
.pub-iclr { background: #b2dfdb; color: #00695c; }
.pub-neurips { background: #cffafe; color: #0e7490; }
.pub-icml { background: #fce4ec; color: #c62828; }
.pub-aaai { background: #fffbeb; color: #d97706; }
.pub-log { background: #f0fdf4; color: #059669; }
.pub-preprint { background: #f1faf8; color: var(--text-dim); }
.pub-patent { background: #fffbeb; color: #d97706; }

.pub-title {
  font-family: var(--font-head);
  font-size: 0.975rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
  line-height: 1.4;
}
.pub-title a { color: var(--text); }
.pub-title a:hover { color: var(--accent); }

.pub-authors {
  font-size: 0.825rem;
  color: var(--text-dim);
  margin-bottom: 6px;
}
.pub-authors strong { color: var(--text-muted); font-weight: 600; }

.pub-venue {
  font-size: 0.8rem;
  color: var(--text-dim);
  font-style: italic;
}

.spotlight-badge {
  display: inline-block;
  background: #f0fdfa;
  color: var(--teal);
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 2px 7px;
  border-radius: 3px;
  margin-left: 6px;
  font-style: normal;
}

/* ===== TIMELINE ===== */
.timeline {
  position: relative;
  padding-left: 32px;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 7px; top: 8px; bottom: 8px;
  width: 2px;
  background: linear-gradient(180deg, var(--accent) 0%, var(--teal) 100%);
  opacity: 0.2;
}

.timeline-item {
  position: relative;
  margin-bottom: 36px;
}
.timeline-item:last-child { margin-bottom: 0; }

.timeline-dot {
  position: absolute;
  left: -29px;
  top: 6px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg-alt);
  box-shadow: 0 0 8px rgba(0,137,123,0.3);
}

.timeline-content {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  transition: border-color .2s, box-shadow .2s;
  box-shadow: var(--shadow);
}
.timeline-content:hover {
  border-color: rgba(0,137,123,0.2);
  box-shadow: 0 4px 20px rgba(0,137,123,0.08);
}

.timeline-year {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 6px;
}

.timeline-content h3 {
  font-family: var(--font-head);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}
.timeline-content h3 a { color: var(--text); }
.timeline-content h3 a:hover { color: var(--accent); }

.timeline-content p {
  font-size: 0.85rem;
  color: var(--text-muted);
}
.timeline-content p a { color: var(--accent); }

/* ===== TEACHING ===== */
.teaching-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.teaching-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: all .2s;
  box-shadow: var(--shadow);
}
.teaching-card:hover {
  border-color: rgba(0,137,123,0.2);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(0,137,123,0.1);
}

.teaching-featured {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, #b2dfdb 0%, #ffd7cc 100%);
  border-color: rgba(0,137,123,0.15);
}

.teaching-role {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 8px;
}

.teaching-card h3 {
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}

.teaching-card p {
  font-size: 0.825rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.teaching-years {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.teaching-years span {
  font-size: 0.775rem;
  color: var(--text-dim);
  padding: 3px 8px;
  background: var(--surface2);
  border-radius: 4px;
  display: inline-block;
  width: fit-content;
}

/* ===== SERVICE ===== */
.service-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.service-badge {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 8px 18px;
  border-radius: 8px;
  transition: all .2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.service-badge:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: #e0f2f1;
}

/* ===== FOOTER ===== */
footer {
  background: rgba(255,255,255,0.9);
  border-top: 1px solid var(--border);
  padding: 32px 0;
  position: relative;
  z-index: 1;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

footer p {
  color: var(--text-dim);
  font-size: 0.85rem;
}

.footer-links {
  display: flex;
  gap: 20px;
}
.footer-links a {
  color: var(--text-dim);
  font-size: 0.85rem;
  transition: color .2s;
}
.footer-links a:hover { color: var(--accent); }

/* ===== ANIMATIONS ===== */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .fade-in { opacity: 1; transform: none; }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .about-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 700px) {
  .hero-content {
    flex-direction: column;
    text-align: center;
    gap: 28px;
    padding-top: 90px;
  }
  .hero-photo-wrap { position: relative; top: 0; align-self: center; }
  .hero-photo { width: 150px; height: 150px; }
  .hero-affiliations, .hero-links { justify-content: center; }
  .hero-bio { text-align: left; }
  .nav-links { display: none; flex-direction: column; position: absolute; top: var(--nav-h); left: 0; right: 0; background: rgba(255,255,255,0.98); padding: 16px; gap: 4px; border-bottom: 1px solid var(--border); }
  .nav-links.open { display: flex; }
  .nav-toggle { display: flex; }
  .about-cards { grid-template-columns: 1fr; }
  .teaching-featured { grid-column: auto; }
}

@media (max-width: 480px) {
  .section { padding: 64px 0; }
  .pub-filter { gap: 6px; }
  .filter-btn { font-size: 0.75rem; padding: 5px 12px; }
}

/* ===== INDUSTRY ===== */
.industry-timeline {
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 860px;
  margin: 0 auto;
}

.industry-card {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  background: rgba(255,255,255,0.82);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px 28px;
  box-shadow: 0 2px 16px rgba(0,137,123,0.06);
  transition: transform 0.2s, box-shadow 0.2s;
}
.industry-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(0,137,123,0.12);
}

.industry-logo {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: 0 1px 6px rgba(0,0,0,0.07);
}
.industry-logo img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  border-radius: 10px;
}

.industry-body { flex: 1; min-width: 0; }

.industry-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.industry-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 4px;
}

.industry-company {
  font-size: 0.88rem;
  color: var(--accent);
  font-weight: 500;
  margin: 0;
}

.industry-date {
  font-size: 0.82rem;
  color: var(--text-dim);
  background: rgba(0,137,123,0.08);
  border: 1px solid rgba(0,137,123,0.15);
  border-radius: 20px;
  padding: 3px 12px;
  white-space: nowrap;
  flex-shrink: 0;
}

.industry-desc {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin: 0 0 14px;
}

.industry-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.industry-tags span {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--accent);
  background: rgba(0,137,123,0.08);
  border: 1px solid rgba(0,137,123,0.18);
  border-radius: 20px;
  padding: 3px 10px;
}

@media (max-width: 600px) {
  .industry-card { flex-direction: column; gap: 14px; padding: 20px; }
  .industry-header { flex-direction: column; gap: 8px; }
}
