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

:root {
  --navy:    #1a2a4a;
  --accent:  #2563eb;
  --accent2: #1e40af;
  --light:   #f8fafc;
  --border:  #e2e8f0;
  --text:    #1e293b;
  --muted:   #64748b;
  --card-bg: #ffffff;
  --nav-h:   58px;
  --radius:  10px;
  --max-w:   960px;
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, sans-serif;
  color: var(--text);
  background: #ffffff;
  line-height: 1.65;
}

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

/* ============================================================
   Navigation
   ============================================================ */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #ffffff;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-inner {
  width: 100%;
  max-width: var(--max-w);
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  border-bottom: 1px solid var(--border);
  height: 100%;
}

.nav-name {
  color: var(--text);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  white-space: nowrap;
  text-decoration: none;
}
.nav-name:hover { text-decoration: none; color: var(--muted); }

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

.nav-links a {
  color: var(--muted);
  font-size: 1.35rem;
  padding: 0.35rem 0.65rem;
  border-radius: 6px;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}

.nav-links a:hover {
  background: var(--border);
  color: var(--text);
  text-decoration: none;
}

/* hamburger (mobile) */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--muted);
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}

/* ============================================================
   Main content wrapper
   ============================================================ */
main {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}

/* ============================================================
   Section headings
   ============================================================ */
.section-title {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 1.25rem;
  padding-bottom: 0.45rem;
  border-bottom: 2px solid var(--accent);
  display: inline-block;
}

section { margin-bottom: 3.5rem; scroll-margin-top: calc(var(--nav-h) + 1rem); }

/* ============================================================
   About Section
   ============================================================ */
.about-grid {
  display: grid;
  grid-template-columns: 230px 1fr;
  gap: 2.5rem;
  align-items: start;
}

.about-photo {
  width: 100%;
  max-width: 810px;
  border-radius: var(--radius);
  box-shadow: 0 4px 18px rgba(0,0,0,0.12);
  display: block;
}

.about-name {
  font-size: 2rem;
  font-weight: 800;
  color: var(--navy);
  line-height: 1.2;
  margin-bottom: 0.25rem;
}

.about-title {
  font-size: 1rem;
  color: var(--muted);
  margin-bottom: 1rem;
  font-weight: 500;
}

.about-bio {
  font-size: 0.98rem;
  color: var(--text);
  margin-bottom: 1.1rem;
  line-height: 1.75;
}

.about-advisors {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 1.25rem;
  line-height: 1.6;
}
.about-advisors a { color: var(--accent); }

/* social links row */
.social-links {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.4rem;
}

.social-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: var(--navy);
  color: #fff !important;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.3rem 0.55rem;
  border-radius: 20px;
  text-decoration: none !important;
  transition: background 0.15s, transform 0.1s;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.social-btn:hover { background: var(--accent); transform: translateY(-1px); }
.social-btn svg { width: 14px; height: 14px; fill: currentColor; flex-shrink: 0; }

/* ============================================================
   News Section
   ============================================================ */
.news-scroll {
  max-height: 300px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.25rem 0;
  background: #fff;
}

.news-item {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 0.75rem;
  padding: 0.65rem 1.1rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.92rem;
  line-height: 1.55;
  align-items: baseline;
}
.news-item:last-child { border-bottom: none; }

.news-date {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
  padding-top: 0.05rem;
}

/* ============================================================
   Education Section
   ============================================================ */
.edu-list { display: flex; flex-direction: column; gap: 1.25rem; }

.edu-item {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 1.1rem;
  align-items: start;
}

.company-logo {
  width: 80px;
  height: 80px;
  object-fit: contain;
}

.edu-logo-placeholder {
  width: 60px;
  height: 60px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  font-size: 1.1rem;
}

.edu-degree { font-weight: 700; font-size: 1rem; color: var(--navy); }
.edu-school { font-size: 0.92rem; color: var(--muted); }
.edu-year   { font-size: 0.85rem; color: var(--muted); font-style: italic; }
.edu-note   { font-size: 0.88rem; color: var(--muted); margin-top: 0.15rem; }

/* ============================================================
   Experience Section
   ============================================================ */
.exp-list { display: flex; flex-direction: column; gap: 1.5rem; }

.exp-item {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 1.5em;
  align-items: start;
}

.exp-logo-placeholder {
  width: 60px;
  height: 60px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  font-size: 0.75rem;
  text-align: center;
  line-height: 1.2;
  padding: 4px;
}

.exp-role   { font-weight: 700; font-size: 1rem; color: var(--navy); }
.exp-org    { font-size: 0.92rem; color: var(--muted); }
.exp-dates  { font-size: 0.85rem; color: var(--muted); font-style: italic; }
.exp-bullets { margin-top: 0.5rem; padding-left: 1.2rem; font-size: 0.9rem; color: var(--text); }
.exp-bullets li { margin-bottom: 0.3rem; }

/* ============================================================
   Publications & Projects Section
   ============================================================ */
.filter-bar {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 0.4rem 1rem;
  border: 2px solid var(--border);
  border-radius: 20px;
  background: #fff;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}
.filter-btn:hover { border-color: var(--accent); color: var(--accent); }
.filter-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.pub-list { display: flex; flex-direction: column; gap: 1.25rem; }

.pub-card {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 1.25rem;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  align-items: start;
  transition: box-shadow 0.15s;
}
.pub-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.08); }
.pub-card.hidden { display: none; }

.pub-thumb {
  width: 100%;
  height: 110px;
  object-fit: cover;
  border-radius: 6px;
  background: var(--border);
  display: block;
}

.pub-thumb-placeholder {
  width: 100%;
  height: 110px;
  border-radius: 6px;
  background: linear-gradient(135deg, #1a2a4a 0%, #2563eb 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
}

.pub-content { display: flex; flex-direction: column; gap: 0.3rem; }

.pub-badges { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-bottom: 0.2rem; }

.badge {
  display: inline-block;
  padding: 0.18rem 0.6rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}
.badge-venue {
  background: #dbeafe;
  color: #1e40af;
}
.badge-venue-alt {
  background: #dcfce7;
  color: #166534;
}
.badge-review {
  background: #fef3c7;
  color: #92400e;
}
.badge-project {
  background: #f1f5f9;
  color: #475569;
}

.pub-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.35;
}

.pub-authors {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.4;
}
.pub-authors strong { color: var(--text); font-weight: 700; }

.pub-desc {
  font-size: 0.88rem;
  color: var(--text);
  line-height: 1.55;
  margin-top: 0.1rem;
}

.pub-links { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.4rem; }

.pub-link {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 12px;
  padding: 0.18rem 0.6rem;
  transition: background 0.12s, color 0.12s;
}
.pub-link:hover {
  background: var(--accent);
  color: #fff;
  text-decoration: none;
}

/* ============================================================
   Footer
   ============================================================ */
footer {
  text-align: center;
  font-size: 0.82rem;
  color: var(--muted);
  padding: 2rem 1rem 1.5rem;
  border-top: 1px solid var(--border);
}
footer a { color: var(--muted); }
footer a:hover { color: var(--accent); }

/* ============================================================
   Mobile
   ============================================================ */
@media (max-width: 768px) {
  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    background: var(--light);
    padding: 0.5rem 1rem 1rem;
    box-shadow: 0 6px 16px rgba(0,0,0,0.08);
    z-index: 99;
  }
  .nav-links.open { display: flex; }
  .nav-links li { width: 100%; }
  .nav-links a { display: block; width: 100%; padding: 0.55rem 0.6rem; font-size: 1rem; color: var(--text); }
  .nav-toggle { display: flex; }

  .about-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .about-photo { margin: 0 auto; max-width: 160px; }
  .social-links { justify-content: center; }
  .about-advisors { text-align: left; }

  .pub-card {
    grid-template-columns: 1fr;
  }
  .pub-thumb, .pub-thumb-placeholder { height: 180px; }

  .edu-item, .exp-item { grid-template-columns: 1fr; }
  .edu-logo, .edu-logo-placeholder,
  .exp-logo, .exp-logo-placeholder { width: 48px; height: 48px; }
}

@media (max-width: 480px) {
  .about-name { font-size: 1.6rem; }
  .section-title { font-size: 1.25rem; }
  main { padding: 1.5rem 1rem 3rem; }
  .news-item { grid-template-columns: 1fr; gap: 0.2rem; }
}
