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

:root {
  --primary: #1a3a5c;
  --accent: #0d7abf;
  --accent-light: #e8f4fd;
  --text: #1f2937;
  --text-muted: #6b7280;
  --border: #e5e7eb;
  --bg: #ffffff;
  --bg-alt: #f9fafb;
  --max-w: 960px;
}

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

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── NAV ── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--primary);
  padding: 0 2rem;
}

nav ul {
  display: flex;
  list-style: none;
  max-width: var(--max-w);
  margin: 0 auto;
  gap: 0;
}

nav a {
  display: block;
  padding: 1rem 1.1rem;
  color: rgba(255,255,255,0.78);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: color 0.2s;
}

nav a:hover,
nav a.active {
  color: #fff;
}

nav a.active {
  border-bottom: 2px solid rgba(255,255,255,0.6);
}

/* ── HERO PHOTO (img) ── */
.hero-photo-img {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(255,255,255,0.3);
  flex-shrink: 0;
}

/* ── ABOUT PHOTO ── */
.about-top {
  display: flex;
  gap: 2.5rem;
  align-items: flex-start;
  margin-bottom: 0.5rem;
}

.about-photo {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--border);
  flex-shrink: 0;
}

.about-intro {
  flex: 1;
}

.about-intro p {
  font-size: 0.95rem;
  color: var(--text);
  margin-bottom: 0.85rem;
}

.about-intro p:last-child { margin-bottom: 0; }

/* ── PUBLICATIONS NAV ── */
.pub-nav {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.pub-nav a {
  padding: 0.35rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--accent);
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s;
}

.pub-nav a:hover {
  background: var(--accent-light);
  border-color: var(--accent);
}

/* ── PAGE HEADER ── */
.page-header {
  background: var(--primary);
  padding: 2rem 2rem 1.75rem;
  color: #fff;
}

.back-home {
  display: inline-block;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.55);
  text-decoration: none;
  letter-spacing: 0.03em;
  margin-bottom: 0.4rem;
}

.back-home:hover { color: rgba(255,255,255,0.9); }

.page-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
}

/* ── HOME SUMMARY CARDS ── */
.home-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.home-card {
  display: block;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem;
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.home-card:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 8px rgba(13,122,191,0.1);
}

.home-card-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.4rem;
}

.home-card p {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ── HERO ── */
#hero {
  background: var(--primary);
  color: #fff;
  padding: 5rem 2rem 4rem;
}

.hero-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 3rem;
}

.hero-photo {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(255,255,255,0.25);
  flex-shrink: 0;
  background: rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.5rem;
}

.hero-text h1 {
  font-size: 2.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.hero-text .role {
  margin-top: 0.5rem;
  font-size: 1.05rem;
  color: rgba(255,255,255,0.75);
  font-weight: 400;
}

.hero-text .affiliation {
  margin-top: 0.25rem;
  font-size: 0.9rem;
  color: rgba(255,255,255,0.6);
}

.hero-links {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.hero-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 1rem;
  border: 1px solid rgba(255,255,255,0.35);
  border-radius: 6px;
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  font-size: 0.85rem;
  transition: background 0.2s, border-color 0.2s;
}

.hero-links a:hover {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.6);
  color: #fff;
}

/* ── SECTIONS ── */
section {
  padding: 4rem 2rem;
}

section:nth-child(even) {
  background: var(--bg-alt);
}

.section-inner {
  max-width: var(--max-w);
  margin: 0 auto;
}

h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 2rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--accent);
  letter-spacing: -0.01em;
}

/* ── ABOUT ── */
.about-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 3rem;
}

.about-bio p {
  color: var(--text);
  margin-bottom: 1rem;
  font-size: 0.975rem;
}

.about-bio p:last-child { margin-bottom: 0; }

.info-block h3 {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  margin-top: 1.5rem;
}

.info-block h3:first-child { margin-top: 0; }

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tag {
  background: var(--accent-light);
  color: var(--accent);
  padding: 0.25rem 0.65rem;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 500;
}

/* ── TIMELINE ── */
.timeline {
  position: relative;
  padding-left: 1.5rem;
  border-left: 2px solid var(--border);
}

.timeline-item {
  position: relative;
  margin-bottom: 1.5rem;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -1.575rem;
  top: 0.35rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px var(--accent);
}

.timeline-year {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.timeline-role {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  margin-top: 0.1rem;
}

.timeline-place {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ── PUBLICATIONS ── */
.pub-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.pub-item {
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0 1rem;
  align-items: start;
}

.pub-item:last-child { border-bottom: none; }

.pub-year {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent);
  min-width: 2.5rem;
  padding-top: 0.1rem;
}

.pub-title {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
}

.pub-authors {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

.pub-venue {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-style: italic;
  margin-top: 0.1rem;
}

.pub-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.1rem 0.4rem;
  border-radius: 3px;
  margin-left: 0.4rem;
  vertical-align: middle;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge-journal { background: #dcfce7; color: #15803d; }
.badge-conf { background: #fef9c3; color: #854d0e; }
.badge-book { background: #ede9fe; color: #6d28d9; }
.badge-patent { background: #fee2e2; color: #b91c1c; }

.pub-section-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.pub-stats {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.stat-box {
  text-align: center;
  background: var(--accent-light);
  border-radius: 8px;
  padding: 1rem 1.5rem;
  min-width: 100px;
}

.stat-number {
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ── TEAM ── */
.team-section-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin: 2rem 0 1rem;
}

.team-section-title:first-child { margin-top: 0; }

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.team-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem;
}

.team-card .name {
  font-size: 0.9rem;
  font-weight: 600;
}

.team-card .role {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

.grad-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.grad-item {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem 1.25rem;
}

.grad-item .name {
  font-size: 0.9rem;
  font-weight: 600;
}

.grad-item .year-honor {
  font-size: 0.78rem;
  color: var(--accent);
  font-weight: 600;
  margin-top: 0.1rem;
}

.grad-item .desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* ── COURSE GROUP ── */
.course-group {
  margin-bottom: 2rem;
}

.course-group-label {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

/* ── TEACHING ── */
.course-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 0.75rem;
}

.course-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 0 8px 8px 0;
  padding: 0.85rem 1rem;
  font-size: 0.875rem;
}

.course-card .level {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 0.2rem;
}

/* ── CONTACT ── */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

.contact-info p {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.contact-detail {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.contact-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
  margin-top: 0.05rem;
}

.contact-detail .label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.contact-detail .value {
  font-size: 0.9rem;
  color: var(--text);
  word-break: break-all;
}

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

.contact-detail a:hover { text-decoration: underline; }

/* ── FOOTER ── */
footer {
  margin-top: auto;
  background: var(--primary);
  color: rgba(255,255,255,0.5);
  text-align: center;
  padding: 1.5rem;
  font-size: 0.8rem;
}

/* ── OTHER PAGE ── */
.other-list {
  display: flex;
  flex-direction: column;
}

.other-item {
  display: grid;
  grid-template-columns: 5.5rem 1fr;
  gap: 1rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--border);
  align-items: start;
}

.other-item:last-child { border-bottom: none; }

.other-year {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent);
  padding-top: 0.1rem;
  white-space: nowrap;
}

.other-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
}

.other-org {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

.other-amount {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  margin-top: 0.15rem;
}

/* ── REPOSITORY ── */
.repo-grid {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.repo-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.2s, background 0.2s;
}

.repo-card:hover {
  border-color: var(--accent);
  background: var(--accent-light);
}

.repo-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
}

.repo-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
}

.repo-type {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ── RESPONSIVE ── */
@media (max-width: 700px) {
  .hero-inner { flex-direction: column; gap: 1.5rem; }
  .about-grid { grid-template-columns: 1fr; }
  .about-top { flex-direction: column; align-items: center; text-align: center; }
  .contact-grid { grid-template-columns: 1fr; }
  nav a { padding: 0.75rem 0.65rem; font-size: 0.78rem; }
  h2 { font-size: 1.25rem; }
  .hero-text h1 { font-size: 1.75rem; }
}
