/* ============================================================
   VIR Lab — Modern minimal stylesheet
   ============================================================ */

:root {
  --bg: #ffffff;
  --surface: #f6f7fb;
  --text: #15161c;
  --muted: #5d6475;
  --border: #e7e9f0;
  --accent: #3c5a8a;
  --accent-2: #6486b6;
  --radius: 16px;
  --radius-sm: 10px;
  --maxw: 1080px;
  --shadow: 0 1px 2px rgba(20, 22, 40, .04), 0 8px 30px rgba(20, 22, 40, .06);
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Space Grotesk", var(--font-sans);
}

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

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
main { flex: 1 0 auto; }

a { color: inherit; text-decoration: none; }

.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 24px; }

/* Click-to-navigate page switching */
.page { display: none; }
.page.is-active { display: block; }

.lab-intro {
  font-size: clamp(1.15rem, 2.2vw, 1.4rem); line-height: 1.55;
  color: var(--muted); max-width: 62ch; margin-bottom: 44px;
}

/* ===== Navigation ===== */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(246, 247, 251, .85);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s ease, box-shadow .25s ease;
}
.nav.is-scrolled { border-color: var(--border); box-shadow: 0 1px 0 rgba(20,22,40,.03); }
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.nav__brand { display: flex; align-items: baseline; gap: 6px; font-family: var(--font-display); font-weight: 700; }
.nav__logo {
  font-size: 1.25rem;
  letter-spacing: .5px;
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.nav__brandtext { font-size: 1.1rem; color: var(--text); }
.nav__links { display: flex; gap: 32px; }
.nav__links a {
  font-size: .92rem; font-weight: 500; color: var(--muted);
  position: relative; transition: color .2s ease;
}
.nav__links a:hover, .nav__links a.is-active { color: var(--text); }
.nav__links a::after {
  content: ""; position: absolute; left: 0; bottom: -6px; height: 2px; width: 0;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width .25s ease;
}
.nav__links a:hover::after, .nav__links a.is-active::after { width: 100%; }

.nav__toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav__toggle span { width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: transform .25s, opacity .25s; }
.nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===== Hero ===== */
.hero { padding: clamp(72px, 12vw, 140px) 0 0; }
.hero__eyebrow { font-size: .9rem; font-weight: 600; color: var(--accent); letter-spacing: .3px; margin-bottom: 18px; }
.hero__title { font-family: var(--font-display); font-weight: 700; font-size: clamp(2.4rem, 6vw, 4.2rem); line-height: 1.05; letter-spacing: -1.5px; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 22px; border-radius: 6px; font-weight: 600; font-size: .95rem;
  transition: background .2s ease, border-color .2s ease, color .2s ease; cursor: pointer;
}
.btn--primary { background: var(--text); color: #fff; }
.btn--primary:hover { background: #000; }

/* ===== Sections ===== */
.section { padding: clamp(60px, 9vw, 104px) 0; }
.section__head { max-width: 680px; margin-bottom: 56px; }
.section__head--tight { margin-bottom: 10px; }
.section__title { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.8rem, 4vw, 2.6rem); letter-spacing: -1px; line-height: 1.1; }

/* ===== Research ===== */
.research-note { color: #8a8f9c; font-size: 1.02rem; line-height: 1.5; max-width: 62ch; margin-bottom: 48px; }
.research-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; }
.research-card h3 { font-family: var(--font-display); font-size: 1.3rem; margin-bottom: 18px; }
.research-card ul { list-style: none; display: flex; flex-direction: column; gap: 11px; }
.research-card li { position: relative; padding-left: 20px; font-weight: 500; }
.research-card li::before {
  content: "•"; position: absolute; left: 0; top: -1px;
  color: var(--muted); font-size: 1.1rem; line-height: 1.4;
}

/* ===== People ===== */
.people__group, .pub-group, .lecture-term__title {
  font-family: var(--font-display); font-size: 1.15rem; font-weight: 600; color: var(--text);
  letter-spacing: -.2px; padding-bottom: 12px; margin-bottom: 20px; border-bottom: 1px solid var(--border);
}
.pi-card { display: grid; grid-template-columns: 200px 1fr; gap: clamp(44px, 5vw, 68px); align-items: start; }
.pi-card__photo img { width: 100%; aspect-ratio: 3/4; object-fit: cover; border-radius: var(--radius-sm); display: block; }
.pi-card__social { display: inline-flex; align-items: center; gap: 8px; margin-top: 16px; color: var(--text); font-size: .9rem; font-weight: 600; transition: color .15s ease; }
.pi-card__social svg { width: 22px; height: 22px; }
.pi-card__social:hover { color: #0a66c2; }
.pi-card__name { font-family: var(--font-display); font-size: 1.7rem; letter-spacing: -.5px; }
.pi-card__hangul { font-size: 1.1rem; color: var(--muted); font-weight: 500; margin-left: 6px; }
.pi-card__role { color: var(--muted); margin: 8px 0 24px; }
.pi-card__cols { display: grid; grid-template-columns: 1fr; gap: 30px; }
.pi-card__cols h4 { font-size: .8rem; letter-spacing: 1px; text-transform: uppercase; color: var(--accent); margin-bottom: 8px; }
.tl { list-style: none; display: flex; flex-direction: column; }
.tl li { display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: baseline; padding: 12px 0; border-top: 1px solid var(--border); font-size: .96rem; line-height: 1.45; }
.tl li:first-child { border-top: none; padding-top: 0; }
.tl__sub { display: block; color: var(--muted); font-size: .85rem; margin-top: 3px; }
.tl__year { color: var(--muted); font-size: .85rem; white-space: nowrap; }

.join-card {
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  margin-top: clamp(48px, 7vw, 72px);
  padding: 32px 36px; border-radius: var(--radius);
  background: var(--surface); color: var(--text); border: 1px solid var(--border);
}
.join-card h3 { font-family: var(--font-display); font-size: 1.3rem; margin-bottom: 6px; }
.join-card p { color: var(--muted); }
.join-card p strong { color: var(--text); font-weight: 600; }

/* ===== Publications ===== */
.pub-group { margin-top: 48px; }
.pub-group:first-of-type { margin-top: 0; }
.pub-list { list-style: none; display: flex; flex-direction: column; gap: 4px; }
.pub {
  position: relative; padding: 18px 16px 18px 30px; border-radius: var(--radius-sm);
  transition: background .2s ease;
}
.pub:hover { background: var(--surface); }
.pub::before {
  content: "•";
  position: absolute; left: 10px; top: 17px;
  color: var(--muted); font-size: 1.1rem; line-height: 1.4;
}
.pub__title { font-weight: 600; font-size: 1.05rem; line-height: 1.4; }
.pub__authors { color: var(--muted); font-size: .94rem; margin-top: 4px; }
.pub__authors .me { font-weight: inherit; color: inherit; }
.pub__venue { margin-top: 8px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.badge { font-size: .9rem; font-weight: 600; color: var(--text); }
.badge--patent { color: var(--text); }
.award { font-size: .85rem; font-weight: 600; color: var(--accent); }
.pub__note { font-size: .85rem; color: var(--muted); }

/* ===== Lectures ===== */
.lecture-grid { display: grid; grid-template-columns: 1fr; gap: 40px; }
.lecture-term h4 { font-size: .8rem; letter-spacing: 1px; text-transform: uppercase; color: var(--accent); margin: 20px 0 12px; }
.lecture-term h4:first-of-type { margin-top: 0; }
.lecture-term ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.lecture-term li { display: flex; align-items: center; gap: 12px; font-weight: 500; }
.code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: .78rem; color: var(--muted); background: var(--surface); padding: 3px 9px; border-radius: 6px; white-space: nowrap; }

/* ===== Contact ===== */
.contact-lead { color: var(--muted); font-size: 1.1rem; line-height: 1.55; margin-bottom: 40px; }
.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 32px; align-items: stretch; }
.contact-info ul { list-style: none; display: flex; flex-direction: column; gap: 24px; }
.contact-info li { display: flex; flex-direction: column; gap: 4px; }
.contact-label { font-size: .78rem; letter-spacing: 1px; text-transform: uppercase; color: var(--accent); font-weight: 700; }
.contact-info a:hover { color: var(--accent); }
.contact-map { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); min-height: 280px; box-shadow: var(--shadow); }
.contact-map iframe { width: 100%; height: 100%; min-height: 280px; border: 0; display: block; }

/* ===== Footer ===== */
.footer { background: #0f1020; color: #c7c9d6; padding: 56px 0 28px; flex-shrink: 0; }
.footer__inner { display: grid; grid-template-columns: 1.6fr 1fr 1.2fr; gap: 32px; align-items: start; }
.footer__logo { font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; color: #fff; }
.footer__brand p { font-size: .9rem; margin-top: 10px; line-height: 1.6; color: #9da0b3; }
.footer__col h4 { font-size: .76rem; letter-spacing: .12em; text-transform: uppercase; color: #7b7e92; margin-bottom: 12px; font-weight: 600; }
.footer__col p { font-size: .92rem; line-height: 1.85; color: #c7c9d6; }
.footer__col a { color: #c7c9d6; transition: color .15s ease; }
.footer__col a:hover { color: #fff; }
.footer__bottom { margin-top: 40px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.08); }
.footer__copy { color: #7b7e92; font-size: .85rem; }

/* ===== Responsive ===== */
@media (max-width: 860px) {
  .nav__toggle { display: flex; }
  .nav__links {
    position: absolute; top: 68px; left: 0; right: 0;
    flex-direction: column; gap: 0; background: #fff; border-bottom: 1px solid var(--border);
    padding: 8px 24px 16px; box-shadow: var(--shadow);
    transform: translateY(-12px); opacity: 0; pointer-events: none; transition: transform .25s ease, opacity .25s ease;
  }
  .nav__links.is-open { transform: none; opacity: 1; pointer-events: auto; }
  .nav__links a { padding: 12px 0; font-size: 1rem; }
  .nav__links a::after { display: none; }

  .research-grid, .lecture-grid, .contact-grid, .pi-card__cols { grid-template-columns: 1fr; }
  .research-grid { gap: 36px; }
  .pi-card { grid-template-columns: 1fr; gap: 24px; }
  .pi-card__photo { max-width: 180px; }
  .join-card { flex-direction: column; align-items: flex-start; }
  .footer__inner { grid-template-columns: 1fr; gap: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
