@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap');

/* ========================================
   DESIGN TOKENS
   ======================================== */
:root {
  --bg:       #0d1117;
  --surface:  #161b22;
  --surface2: #1c2128;
  --border:   #30363d;
  --text:     #e6edf3;
  --muted:    #8b949e;
  --accent:   #38d9c0;
  --accent2:  #58a6ff;
  --scarlet:  #ba0c2f;
  --nav-height: 64px;
  --max-width:  1100px;
  --radius:     8px;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.7;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

strong { font-weight: 600; }

/* ========================================
   NAVIGATION
   ======================================== */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-height);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  z-index: 100;
  display: flex;
  align-items: center;
  padding: 0 2rem;
}

.nav-inner {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text);
  white-space: nowrap;
  flex-shrink: 0;
}
.nav-brand:hover { color: var(--accent); text-decoration: none; }

.nav-links {
  display: flex;
  list-style: none;
  gap: 0.25rem;
}

.nav-links a {
  color: var(--muted);
  font-size: 0.9rem;
  padding: 0.4rem 0.75rem;
  border-radius: 4px;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
  display: block;
}
.nav-links a:hover { color: var(--text); text-decoration: none; }
.nav-links a.active { color: var(--text); border-bottom-color: var(--accent); }

/* Hamburger */
.nav-hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 5px;
  padding: 6px;
  background: none;
  border: none;
}
.nav-hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  transition: all 0.3s;
}

/* ========================================
   LAYOUT
   ======================================== */
.page-wrapper { padding-top: var(--nav-height); min-height: 100vh; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
}

.section { padding: 4rem 0; }

.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 2rem;
  color: var(--text);
  border-left: 3px solid var(--accent);
  padding-left: 0.75rem;
}

.section-intro {
  max-width: 780px;
  color: var(--text);
  line-height: 1.8;
  margin-bottom: 2rem;
}

/* ========================================
   HERO
   ======================================== */
.hero {
  padding: 4rem 0 3rem;
  border-bottom: 1px solid var(--border);
}

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

.hero-photo-placeholder {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: var(--surface2);
  border: 3px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 0.85rem;
  text-align: center;
  line-height: 1.4;
}

.hero-photo {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--border);
}

.hero-name {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
  margin-bottom: 0.75rem;
}

.hero-titles {
  list-style: none;
  margin-bottom: 1.25rem;
}
.hero-titles li {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.7;
}
.hero-titles li strong { color: var(--text); }

.hero-tagline {
  color: var(--muted);
  font-size: 1rem;
  margin-bottom: 1.5rem;
  max-width: 600px;
  line-height: 1.7;
}

.hero-buttons {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* ========================================
   BUTTONS
   ======================================== */
.btn {
  display: inline-block;
  padding: 0.5rem 1.2rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.15s;
  cursor: pointer;
}
.btn:hover { text-decoration: none; }

.btn-primary { background: var(--accent); color: #0d1117; }
.btn-primary:hover { background: #2ec4ae; color: #0d1117; }

.btn-secondary {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}
.btn-secondary:hover { background: rgba(56, 217, 192, 0.1); }

.btn-sm { font-size: 0.82rem; padding: 0.3rem 0.8rem; }

/* ========================================
   STATS ROW
   ======================================== */
.stat-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 2rem;
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  justify-content: space-around;
}

.stat { text-align: center; padding: 0.5rem 1rem; }
.stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}
.stat-label {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 0.3rem;
}

/* ========================================
   PILLAR CARDS (home page)
   ======================================== */
.pillar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.pillar-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  transition: transform 0.15s, box-shadow 0.15s;
  display: flex;
  flex-direction: column;
}
.pillar-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 24px rgba(0,0,0,0.4);
  text-decoration: none;
}
.pillar-card.geo { border-top: 3px solid var(--accent2); }
.pillar-card.ai  { border-top: 3px solid var(--accent); }

.pillar-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}
.pillar-card.geo h3 { color: var(--accent2); }
.pillar-card.ai  h3 { color: var(--accent); }

.pillar-card p {
  color: var(--muted);
  line-height: 1.7;
  font-size: 0.95rem;
  flex: 1;
}

.pillar-card .card-link {
  margin-top: 1.25rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
}

/* ========================================
   NEWS LIST
   ======================================== */
.news-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

.news-item {
  display: flex;
  gap: 1.25rem;
  padding: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  align-items: flex-start;
}
.news-date {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent);
  white-space: nowrap;
  min-width: 72px;
  padding-top: 0.15rem;
}
.news-text {
  font-size: 0.95rem;
  color: var(--text);
  line-height: 1.65;
}

/* ========================================
   VIDEOS
   ======================================== */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
  gap: 2rem;
}

.video-caption {
  color: var(--muted);
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
}

.video-wrapper {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface2);
}
.video-wrapper iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border: none;
}

/* ========================================
   AFFILIATIONS STRIP
   ======================================== */
.affiliations {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 1.5rem 2rem;
  margin-top: 3rem;
}
.affiliations-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  justify-content: center;
  align-items: center;
}
.affiliations-inner span { font-size: 0.85rem; color: var(--muted); font-weight: 500; }
.affiliations-inner .sep { color: var(--border); }

/* ========================================
   ABOUT TEXT
   ======================================== */
.about-text p {
  color: var(--text);
  line-height: 1.8;
  margin-bottom: 1.25rem;
  max-width: 800px;
}

/* ========================================
   RESEARCH PAGE
   ======================================== */
.pillar-section {
  padding: 3rem 0;
  border-top: 1px solid var(--border);
}
.pillar-section:first-of-type { border-top: none; padding-top: 1rem; }

.pillar-section-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.pillar-label {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.pillar-label.geo { background: rgba(88,166,255,0.15); color: var(--accent2); }
.pillar-label.ai  { background: rgba(56,217,192,0.15); color: var(--accent); }

.pillar-section-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text);
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: transform 0.15s, border-color 0.15s;
}
.project-card:hover { transform: translateY(-2px); border-color: var(--accent); }
.project-card.geo-card { border-left: 3px solid var(--accent2); }
.project-card.ai-card  { border-left: 3px solid var(--accent); }

.project-card h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.6rem;
}
.project-card p {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.65;
}
.pub-ref {
  margin-top: 0.75rem;
  font-size: 0.8rem;
  color: var(--accent2);
  font-style: italic;
}

/* BuckAI highlight box */
.buckai-box {
  background: var(--surface);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  padding: 2rem;
  margin-top: 2rem;
}
.buckai-box h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 0.75rem;
}
.buckai-box p {
  color: var(--text);
  line-height: 1.75;
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
}
.buckai-box p:last-child { margin-bottom: 0; }
.sab-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}
.sab-list li {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.2rem 0.75rem;
  font-size: 0.82rem;
  color: var(--text);
}

/* ========================================
   PUBLICATIONS
   ======================================== */
.pub-stats {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
  font-size: 0.9rem;
  color: var(--muted);
}
.pub-stats a { font-weight: 600; }

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
  padding: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.filter-btn {
  padding: 0.3rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}
.filter-btn:hover { color: var(--text); border-color: var(--accent); }
.filter-btn.active { background: var(--accent); color: #0d1117; border-color: var(--accent); font-weight: 600; }

.pub-section-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  padding: 1.5rem 0 0.75rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0.25rem;
}

.pub-list { list-style: none; }

.pub-item {
  display: flex;
  gap: 1rem;
  padding: 0.875rem 0;
  border-bottom: 1px solid var(--border);
  align-items: flex-start;
}
.pub-item:last-child { border-bottom: none; }
.pub-item.filtered-out { display: none; }

.pub-num {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent);
  min-width: 2.25rem;
  text-align: right;
  padding-top: 0.2rem;
  flex-shrink: 0;
}
.pub-num.review { color: var(--muted); }

.pub-content { flex: 1; }
.pub-content cite {
  font-style: normal;
  font-size: 0.92rem;
  color: var(--text);
  line-height: 1.65;
  display: block;
}
.pub-meta {
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 0.2rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.badge {
  display: inline-block;
  padding: 0.1rem 0.45rem;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 600;
}
.badge-medal { background: rgba(186,12,47,0.15); color: #e05070; }
.badge-cover { background: rgba(88,166,255,0.15); color: var(--accent2); }

/* Patents */
.patent-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
}
.patent-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}
.patent-card h4 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.5rem;
  line-height: 1.5;
}
.patent-card p { font-size: 0.85rem; color: var(--muted); line-height: 1.6; }

/* Proceedings (collapsible) */
details.proceedings-details {
  margin-top: 2.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
details.proceedings-details summary {
  cursor: pointer;
  padding: 1rem 1.25rem;
  background: var(--surface);
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  user-select: none;
}
details.proceedings-details summary::before {
  content: '▶';
  font-size: 0.65em;
  color: var(--accent);
  transition: transform 0.2s;
}
details[open].proceedings-details summary::before { transform: rotate(90deg); }
details.proceedings-details summary:hover { color: var(--accent); }
.proceedings-body {
  padding: 1rem 1.25rem 1.25rem;
  border-top: 1px solid var(--border);
}
.proc-list { list-style: none; }
.proc-item {
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.88rem;
  color: var(--text);
  line-height: 1.6;
}
.proc-item:last-child { border-bottom: none; }

/* ========================================
   TEACHING
   ======================================== */
.course-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  margin-bottom: 1.5rem;
}
.course-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}
.course-code {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.course-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin: 0.25rem 0;
}
.course-meta { font-size: 0.85rem; color: var(--muted); margin-bottom: 0.75rem; }
.course-description { font-size: 0.95rem; color: var(--text); line-height: 1.75; }
.sei-badge {
  display: inline-block;
  margin-top: 0.75rem;
  padding: 0.2rem 0.65rem;
  background: rgba(56,217,192,0.1);
  border: 1px solid rgba(56,217,192,0.3);
  border-radius: 999px;
  font-size: 0.78rem;
  color: var(--accent);
  font-weight: 600;
}

.mentoring-section { margin-top: 3.5rem; }
.mentoring-group { margin-bottom: 2.5rem; }
.mentoring-group h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}
.mentee-list { list-style: none; display: flex; flex-direction: column; gap: 0.7rem; }
.mentee-item { display: flex; gap: 1rem; align-items: flex-start; }
.mentee-years {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent2);
  min-width: 90px;
  flex-shrink: 0;
  padding-top: 0.15rem;
}
.mentee-info strong { color: var(--text); font-size: 0.92rem; }
.mentee-info span {
  color: var(--muted);
  font-size: 0.85rem;
  display: block;
}

/* ========================================
   CONTACT
   ======================================== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}
.contact-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
}
.contact-block h3 {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 1.25rem;
}
.contact-row {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  margin-bottom: 0.9rem;
  font-size: 0.92rem;
  color: var(--text);
}
.contact-icon { flex-shrink: 0; color: var(--accent); width: 18px; margin-top: 0.1rem; }

.links-list { list-style: none; display: flex; flex-direction: column; gap: 0.6rem; }
.links-list a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.92rem;
  color: var(--accent);
}
.links-list a:hover { text-decoration: underline; }

.prospective-note {
  margin-top: 3rem;
  padding: 1.75rem;
  background: var(--surface);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
}
.prospective-note h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 0.75rem;
}
.prospective-note p {
  color: var(--text);
  line-height: 1.8;
  font-size: 0.95rem;
}

/* ========================================
   FOOTER
   ======================================== */
footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 2rem 0;
  margin-top: 5rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
}
footer a { color: var(--muted); }
footer a:hover { color: var(--accent); }

/* ========================================
   UTILITY
   ======================================== */
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }
.text-accent  { color: var(--accent); }
.text-accent2 { color: var(--accent2); }
.text-muted   { color: var(--muted); }

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 768px) {
  .nav-hamburger { display: flex; }

  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0; right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 0.75rem 1rem;
    gap: 0.15rem;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 0.6rem 0.75rem; border-bottom: none; border-radius: 4px; }

  .hero-grid { grid-template-columns: 1fr; }
  .hero-photo-placeholder { margin: 0 auto; }
  .hero-name { font-size: 1.75rem; }

  .contact-grid { grid-template-columns: 1fr; }
  .video-grid { grid-template-columns: 1fr; }

  .stat-row { justify-content: center; }
  .pillar-grid { grid-template-columns: 1fr; }
  .project-grid { grid-template-columns: 1fr; }
  .patent-grid { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .container { padding: 0 1.25rem; }
  .nav { padding: 0 1.25rem; }
  .section { padding: 2.5rem 0; }
  .affiliations { padding: 1.25rem; }
}
