/* ===== VARIABLES & RESET ===== */
:root {
  --accent: #0076df;
  --accent-light: rgba(0,118,223,0.08);
  --text: #222;
  --text-light: #555;
  --border: #f0f0f0;
  --bg: #fff;
  --max-width: 860px;
}

* { box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

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

a:hover {
  text-decoration: underline;
}

/* ===== NAVBAR ===== */
.nav {
  position: sticky;
  top: 0;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  z-index: 100;
}

.nav-inner {
  max-width: var(--max-width);
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
}

.nav-left {
  font-weight: 600;
  font-size: 1.05rem;
}

.nav-right a {
  margin-left: 20px;
  color: var(--text-light);
  font-size: 0.92rem;
  transition: color 0.15s;
}

.nav-right a:hover,
.nav-right a.active {
  color: var(--accent);
  text-decoration: none;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
  color: var(--text);
}

/* ===== HERO ===== */
.hero {
  padding: 60px 20px 40px;
}

.hero-inner {
  max-width: var(--max-width);
  margin: auto;
  display: flex;
  gap: 40px;
  align-items: flex-start;
}

.hero-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  width: 165px;
  max-width: 165px;
  overflow: hidden;
}

.hero-photo img {
  width: 165px;
  border-radius: 10px;
}

.graph-container {
  width: 165px;
  height: 165px;
  border: 1px solid #ccc;
  border-radius: 10px;
  overflow: hidden;
}

#nodeGraph {
  display: block;
}

.hero-text h1 {
  margin: 0 0 8px;
  font-size: 1.9rem;
  font-weight: 700;
}

/* ===== EPIGRAPH BOX ===== */
.epigraph-box {
  width: 165px;
  max-width: 165px;
  padding: 10px 12px;
  border: 1px solid #ccc;
  border-radius: 8px;
  background: #fdfcf9;
  text-align: center;
  box-sizing: border-box;
  overflow: hidden;
}

.epigraph-box p {
  margin: 0;
  font-family: "Dancing Script", cursive;
  font-size: 0.68rem;
  line-height: 1.45;
  color: #4a4238;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.epigraph-box .epigraph-cite {
  margin-top: 4px;
  font-family: "Dancing Script", cursive;
  font-size: 0.6rem;
  color: #8a7d6b;
}

.social-row {
  display: flex;
  gap: 16px;
  margin-bottom: 14px;
  font-size: 0.9rem;
}

.social-row a {
  font-weight: 500;
}

.subtitle {
  color: var(--text-light);
  margin: 0 0 12px;
  font-size: 0.95rem;
}

.hero-text p {
  margin: 0 0 10px;
  font-size: 0.95rem;
}

.affiliations {
  color: var(--text-light);
  font-style: italic;
  font-size: 0.9rem;
}

/* ===== SECTIONS ===== */
.section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 40px 20px 20px;
}

h2 {
  font-size: 1.35rem;
  font-weight: 600;
  border-bottom: 2px solid var(--border);
  padding-bottom: 8px;
  margin-bottom: 20px;
}

/* ===== NEWS (scrollable box) ===== */
.news-box {
  border: 1px solid var(--border);
  border-radius: 8px;
  max-height: 220px;
  overflow-y: auto;
  padding: 4px 0;
}

.news-box::-webkit-scrollbar {
  width: 6px;
}

.news-box::-webkit-scrollbar-track {
  background: var(--border);
  border-radius: 3px;
}

.news-box::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--accent), #a855f7);
  border-radius: 3px;
}

.news-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.news-list li {
  padding: 10px 16px;
  font-size: 0.93rem;
  border-bottom: 1px solid var(--border);
}

.news-list li:last-child {
  border-bottom: none;
}

.news-date {
  display: inline-block;
  min-width: 70px;
  font-weight: 700;
  color: var(--text);
}

/* ===== RESEARCH AREAS ===== */
.research-area {
  margin-bottom: 20px;
  padding-left: 15px;
  border-left: 3px solid var(--border);
}

.research-area h3 {
  margin: 0 0 4px;
  font-size: 1.05rem;
  font-weight: 600;
}

.research-area p {
  margin: 0;
  font-size: 0.93rem;
  color: var(--text-light);
}

/* ===== PUBLICATIONS (card style) ===== */
.pub-note {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 20px;
}

.pub-year {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-light);
  margin: 28px 0 12px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--border);
}

.pub-card {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: box-shadow 0.2s;
  align-items: flex-start;
}

.pub-card:hover {
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.pub-thumb {
  flex-shrink: 0;
  width: 120px;
  min-width: 120px;
  height: 120px;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.pub-thumb img {
  width: 120px;
  height: 120px;
  max-width: 120px;
  max-height: 120px;
  object-fit: cover;
  display: block;
}

.pub-body {
  flex: 1;
}

.pub-title {
  font-weight: 600;
  font-size: 0.97rem;
  margin-bottom: 6px;
  color: var(--accent);
}

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

.pub-title a:hover {
  text-decoration: underline;
}

.pub-venue-badge {
  display: inline-block;
  font-size: 0.78rem;
  padding: 2px 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  color: var(--text-light);
  margin-bottom: 6px;
}

.pub-authors {
  font-size: 0.88rem;
  color: var(--text-light);
  margin-bottom: 4px;
}

.pub-meta {
  font-size: 0.82rem;
  color: #999;
  font-style: italic;
  margin-bottom: 8px;
}

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

.btn-action {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 3px 10px;
  border-radius: 4px;
  background: var(--accent);
  color: #fff !important;
  text-decoration: none !important;
  transition: background 0.15s;
}

.btn-action:hover {
  background: #005bb5;
}

.btn-outline {
  background: transparent;
  color: var(--accent) !important;
  border: 1px solid var(--accent);
}

.btn-outline:hover {
  background: var(--accent-light);
}

.pub-more {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-top: 12px;
}

/* ===== PROJECTS ===== */
.project {
  margin-bottom: 20px;
  padding-left: 15px;
  border-left: 3px solid var(--border);
}

.project h3 {
  margin: 0 0 4px;
  font-size: 1.05rem;
  font-weight: 600;
}

.project p {
  margin: 0;
  font-size: 0.93rem;
  color: var(--text-light);
}

/* ===== CONTACT ===== */
#contact p {
  font-size: 0.93rem;
  margin: 4px 0;
}

/* ===== FOOTER ===== */
.footer {
  text-align: center;
  padding: 40px 20px;
  border-top: 1px solid var(--border);
  margin-top: 40px;
  font-size: 0.85rem;
  color: var(--text-light);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 640px) {
  .hero-inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 24px;
  }

  .hero {
    padding: 36px 16px 24px;
  }

  .social-row {
    justify-content: center;
    flex-wrap: wrap;
  }

  .graph-container {
    display: none;
  }

  .nav-toggle {
    display: block;
  }

  .nav-right {
    display: none;
    flex-direction: column;
    width: 100%;
    text-align: center;
    padding: 10px 0;
  }

  .nav-right.open {
    display: flex;
  }

  .nav-right a {
    margin: 6px 0;
  }

  .nav-inner {
    flex-wrap: wrap;
  }

  .section {
    padding: 28px 16px 16px;
  }

  .pub-card {
    flex-direction: column;
    align-items: center;
    padding: 12px;
  }

  .pub-thumb {
    width: 100%;
    max-width: 200px;
    height: auto;
    aspect-ratio: 1;
    min-width: 0;
  }

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

  .pub-body {
    width: 100%;
    text-align: left;
  }

  .pub-actions {
    justify-content: flex-start;
  }

  .pub-authors,
  .pub-title {
    word-break: break-word;
  }

  .news-list li {
    padding: 10px 12px;
    font-size: 0.88rem;
  }

  .news-date {
    display: block;
    margin-bottom: 2px;
  }

  h2 {
    font-size: 1.2rem;
  }

  .hero-text h1 {
    font-size: 1.5rem;
  }

  .hero-text p,
  .subtitle {
    font-size: 0.9rem;
  }
}

/* ===== COMIC ===== */
.comic-strip-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.comic-strip img {
  width: 100%;
  border-radius: 8px;
  display: block;
  cursor: zoom-in;
  transition: opacity 0.2s;
}

.comic-strip img:hover {
  opacity: 0.9;
}

.comic-strip-caption {
  margin-top: 0.5rem;
  font-size: 0.88rem;
  color: #666;
  text-align: center;
}
