@font-face {
  font-family: "Interop";
  src: url("https://cdn.jsdelivr.net/gh/payw-org/Interop@main/web/fonts/Interop-Regular.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Interop";
  src: url("https://cdn.jsdelivr.net/gh/payw-org/Interop@main/web/fonts/Interop-Medium.woff2") format("woff2");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Interop";
  src: url("https://cdn.jsdelivr.net/gh/payw-org/Interop@main/web/fonts/Interop-SemiBold.woff2") format("woff2");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Interop";
  src: url("https://cdn.jsdelivr.net/gh/payw-org/Interop@main/web/fonts/Interop-Bold.woff2") format("woff2");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

/* ===========================================================
   KNU Viral Pathogenesis & Vaccine Lab — shared styles
   Aesthetic: refined scientific editorial
   =========================================================== */

:root {
  --paper: #f9f9f7;
  --paper-2: #edeff4;
  --ink: #171c24;
  --ink-soft: #414b5a;
  --muted: #79828f;
  --primary: #1b3a63;      /* 곤색 navy */
  --primary-dk: #0f2340;
  --primary-lt: #3c6396;
  --accent: #c0873f;       /* warm brass */
  --hi: #a9c6ea;           /* light highlight (hero eyebrow / em / motif / footer) */
  --line: #e0e3e9;
  --white: #ffffff;
  --shadow: 0 18px 40px -24px rgba(27, 58, 99, 0.45);
  --radius: 14px;
  --maxw: 1140px;
  --serif: "Fraunces", "Interop", Georgia, serif;
  --sans: "DM Sans", "Interop", system-ui, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

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

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(250, 249, 245, 0.88);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  height: 74px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand .mark {
  width: 38px; height: 38px; flex: none;
  object-fit: contain;
  display: block;
}
.brand .name { font-family: var(--serif); font-weight: 600; font-size: 17px; line-height: 1.15; letter-spacing: .2px; }
.brand .name small { display: block; font-family: var(--sans); font-weight: 400; font-size: 11.5px; color: var(--muted); letter-spacing: .6px; text-transform: uppercase; }

.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; }
.nav-links a {
  display: inline-block; padding: 9px 14px; border-radius: 8px;
  font-size: 14.5px; font-weight: 500; color: var(--ink-soft);
  transition: background .18s, color .18s;
}
.nav-links a:hover { background: var(--paper-2); color: var(--primary); }
.nav-links a.active { color: var(--primary); font-weight: 600; }

.nav-toggle {
  display: none; background: none; border: 0; cursor: pointer;
  width: 42px; height: 42px; border-radius: 9px;
}
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--ink); margin: 4px auto; transition: .25s; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(1100px 480px at 78% -10%, color-mix(in srgb, var(--primary-lt) 30%, transparent), transparent 60%),
    radial-gradient(700px 380px at 0% 110%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 55%),
    var(--primary-dk);
  color: #eef2f8;
}
.hero .wrap { position: relative; z-index: 2; padding: 92px 24px 104px; }
.hero .eyebrow {
  display: inline-block; font-size: 12.5px; letter-spacing: 2.5px;
  text-transform: uppercase; color: var(--hi); margin-bottom: 22px;
  border-left: 3px solid var(--accent); padding-left: 12px;
}
.hero h1 {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(34px, 5.4vw, 62px); line-height: 1.06;
  letter-spacing: -.5px; max-width: 16ch;
}
.hero h1 em { font-style: italic; color: var(--hi); }
.hero p.lead {
  margin-top: 26px; max-width: 56ch; font-size: 18px;
  color: #c6d4e6;
}
.hero-cta { margin-top: 36px; display: flex; gap: 14px; flex-wrap: wrap; }

/* decorative helix lines */
.helix {
  position: absolute; inset: 0; z-index: 1; opacity: .5;
  pointer-events: none; color: var(--hi);
}

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 24px; border-radius: 999px; font-weight: 600; font-size: 14.5px;
  transition: transform .15s, box-shadow .15s, background .15s;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 24px -12px rgba(192,135,63,.8); }
.btn-ghost { border: 1px solid rgba(255,255,255,.4); color: #eef2f8; }
.btn-ghost:hover { background: rgba(255,255,255,.1); }

/* ---------- Sections ---------- */
section { padding: 76px 0; }
.section-head { margin-bottom: 40px; max-width: 62ch; }
.section-head .kicker {
  font-size: 12.5px; letter-spacing: 2.2px; text-transform: uppercase;
  color: var(--accent); font-weight: 600;
}
.section-head h2 {
  font-family: var(--serif); font-weight: 500; letter-spacing: -.4px;
  font-size: clamp(26px, 3.6vw, 40px); line-height: 1.12; margin-top: 10px;
}
.section-head p { margin-top: 14px; color: var(--ink-soft); font-size: 17px; }
.alt-bg { background: var(--paper-2); }

/* ---------- Cards / grids ---------- */
.grid { display: grid; gap: 22px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 28px;
  transition: transform .18s, box-shadow .18s, border-color .18s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: transparent; }
.card h3 { font-family: var(--serif); font-weight: 600; font-size: 20px; margin-bottom: 10px; }
.card .num { font-family: var(--serif); font-size: 13px; color: var(--accent); font-weight: 600; letter-spacing: 1px; }
.card p { color: var(--ink-soft); font-size: 15px; }

/* ---------- About blocks ---------- */
.prose-block { margin-bottom: 14px; }
.prose-block h3 { font-family: var(--serif); font-weight: 600; color: var(--primary); font-size: 22px; margin-bottom: 8px; }
.prose-block p { color: var(--ink-soft); font-size: 16.5px; }
.focus-list { list-style: none; display: grid; gap: 14px; }
.focus-list li {
  background: var(--white); border: 1px solid var(--line); border-left: 4px solid var(--primary);
  border-radius: 10px; padding: 16px 20px; font-size: 15.5px; color: var(--ink-soft);
}
.focus-list li b { color: var(--ink); }

/* ---------- Members ---------- */
/* Tab bar (pill style) */
.tab-bar {
  display: flex; flex-wrap: wrap; gap: 12px;
  margin: 0 0 34px;
}
.tab-btn {
  font-family: var(--sans); font-size: 15px; font-weight: 600;
  color: var(--ink-soft); background: var(--white);
  border: 1px solid var(--line); border-radius: 999px;
  padding: 12px 26px; cursor: pointer;
  transition: background .18s, color .18s, border-color .18s, box-shadow .18s;
}
.tab-btn:hover { border-color: var(--primary-lt); color: var(--primary); }
.tab-btn[aria-selected="true"] {
  background: var(--primary-dk); border-color: var(--primary-dk);
  color: #fff; box-shadow: var(--shadow);
}
.tab-panel[hidden] { display: none; }
.tab-panel { animation: tabIn .28s ease both; }
@keyframes tabIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (max-width: 620px) {
  .tab-bar { gap: 8px; }
  .tab-btn { font-size: 14px; padding: 10px 18px; }
}

.member-section-title {
  font-family: var(--serif); font-weight: 600; font-size: 22px;
  color: var(--primary); margin: 44px 0 22px; display: flex; align-items: center; gap: 10px;
}
.member-section-title:first-child { margin-top: 0; }
.member-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 22px; }
.member {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; transition: transform .18s, box-shadow .18s;
}
.member:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.member .photo {
  aspect-ratio: 1/1; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--primary-lt), var(--primary-dk));
  color: #fff; font-family: var(--serif); font-size: 44px; font-weight: 500;
}
.member .photo img { width: 100%; height: 100%; object-fit: cover; }
.member .body { padding: 20px; }
.member .body h4 { font-family: var(--serif); font-size: 19px; font-weight: 600; }
.member .role { color: var(--accent); font-weight: 600; font-size: 13.5px; margin: 2px 0 10px; }
.member .body p { font-size: 13.5px; color: var(--ink-soft); line-height: 1.5; }
.member .body a { color: var(--primary); font-weight: 600; word-break: break-all; }
.member ul { list-style: none; margin-top: 10px; display: grid; gap: 4px; }
.member ul li { font-size: 12.8px; color: var(--muted); padding-left: 12px; position: relative; }
.member ul li::before { content: "·"; position: absolute; left: 0; color: var(--accent); }

.alumni-box { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 30px; }
.alumni-box li { padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: 15px; color: var(--ink-soft); list-style: none; }
.alumni-box li:last-child { border: 0; }

/* ---------- Publications ---------- */
.pub-list { list-style: none; counter-reset: pub; }
.pub {
  display: grid; grid-template-columns: 54px 1fr; gap: 20px;
  padding: 24px 0; border-bottom: 1px solid var(--line);
}
.pub .idx {
  font-family: var(--serif); font-size: 26px; color: var(--accent); font-weight: 500; line-height: 1;
}
.pub h3 { font-family: var(--serif); font-weight: 600; font-size: 19px; line-height: 1.3; margin-bottom: 8px; }
.pub h3 a:hover { color: var(--primary); text-decoration: underline; }
.pub .authors { font-size: 14px; color: var(--ink-soft); }
.pub .authors b { color: var(--ink); }
.pub-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.pub .venue,
.pub .impact-factor { display: inline-block; font-size: 13px; font-weight: 600; padding: 3px 12px; border-radius: 999px; }
.pub .venue { color: var(--primary); background: var(--paper-2); }
.pub .impact-factor { color: #8a5c14; background: #f6ecd9; }
.pub-note { font-size: 14px; color: var(--muted); margin-bottom: 28px; }
.pub .authors sup { color: var(--accent); font-size: .75em; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: start; }
.contact-item { display: flex; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.contact-item .ic { font-size: 22px; flex: none; }
.contact-item .k { font-size: 12.5px; text-transform: uppercase; letter-spacing: 1.4px; color: var(--muted); }
.contact-item .v { font-size: 16px; color: var(--ink); }
.contact-item .v a { color: var(--primary); font-weight: 600; }
/* Invitation card (contact.html) */
.invite-card {
  margin-top: 26px;
  background: var(--white);
  border: 1px solid var(--line);
  border-left: 5px solid var(--accent);
  border-radius: var(--radius);
  padding: 30px 34px;
  color: var(--ink);
  box-shadow: 0 14px 34px -28px rgba(27, 58, 99, .45);
}
.invite-card h3 {
  font-family: var(--serif); font-weight: 600; font-size: 22px;
  color: var(--primary); margin-bottom: 12px;
}
.invite-card p { font-size: 15.5px; line-height: 1.7; color: var(--ink-soft); }
.invite-card p + p { margin-top: 10px; }
.invite-card a,
.invite-card .hl { color: #9c6a25; font-weight: 600; }
.invite-card a:hover { text-decoration: underline; }
@media (max-width: 620px) { .invite-card { padding: 24px 22px; } }

.map-card { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); min-height: 320px; }
.map-card iframe { width: 100%; height: 100%; min-height: 320px; border: 0; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--primary-dk); color: #c6d4e6; padding: 54px 0 30px; margin-top: 20px;
}
.footer-top { display: flex; justify-content: space-between; gap: 30px; flex-wrap: wrap; }
.footer-brand { max-width: 420px; }
.footer-brand .name { font-family: var(--serif); font-size: 19px; color: #fff; margin-bottom: 8px; white-space: nowrap; }
@media (max-width: 480px) { .footer-brand .name { white-space: normal; font-size: 17px; } }
.footer-brand p { font-size: 14px; line-height: 1.6; }
.footer-links { display: flex; gap: 50px; flex-wrap: wrap; }
.footer-col h5 { font-size: 12px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--hi); margin-bottom: 14px; }
.footer-col a { display: block; font-size: 14px; padding: 4px 0; color: #c6d4e6; }
.footer-col a:hover { color: #fff; }
.footer-bottom {
  margin-top: 40px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.12);
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-size: 13px; color: #9fb0c6;
}
.social { display: flex; gap: 10px; }
.social a {
  width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center;
  background: rgba(255,255,255,.08); transition: background .18s;
}
.social a:hover { background: var(--accent); }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .grid-3, .member-grid { grid-template-columns: repeat(2,1fr); }
  .contact-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute; top: 74px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--paper); border-bottom: 1px solid var(--line);
    padding: 8px 16px 16px; display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 10px; border-radius: 8px; }
  .grid-3, .grid-2, .member-grid { grid-template-columns: 1fr; }
  .footer-top { flex-direction: column; }
  section { padding: 56px 0; }
}

/* ---------- Pagination ---------- */
.pager { display: flex; justify-content: center; align-items: center; gap: 6px; margin-top: 46px; flex-wrap: wrap; }
.pager a, .pager span {
  min-width: 42px; height: 42px; padding: 0 14px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 600; border-radius: 10px;
  border: 1px solid var(--line); background: var(--white); color: var(--ink-soft);
  transition: border-color .15s, color .15s, background .15s;
}
.pager a:hover { border-color: var(--primary); color: var(--primary); }
.pager .current { background: var(--primary); color: #fff; border-color: var(--primary); }
.pager .disabled { opacity: .4; }

/* Theme and language controls, matching HaLab / Choi Lab. */
:root { color-scheme: light; }
html[data-theme="dark"] { color-scheme: dark;
  --paper: #0b1320;
  --paper-2: #131f30;
  --ink: #eef3fa;
  --ink-soft: #c0cede;
  --muted: #91a3bb;
  --primary: #91b8ed;
  --primary-dk: #091526;
  --primary-lt: #658fc4;
  --accent: #e3b370;
  --hi: #b8d4f6;
  --line: #2b3d55;
  --white: #142135;
  --shadow: 0 20px 45px -24px rgba(0,0,0,.8);
}
.nav-actions { display: flex; align-items: center; gap: 8px; flex: none; order: 2; }
.language-switch {
  display: inline-flex; align-items: center; padding: 3px;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--paper-2);
}
.language-switch button,
.theme-toggle {
  font-family: var(--sans); color: var(--ink-soft); cursor: pointer;
  border: 0; background: transparent;
}
.language-switch button {
  min-width: 34px; height: 30px; padding: 0 8px; border-radius: 999px;
  font-size: 11px; font-weight: 700; letter-spacing: .4px;
}
.language-switch button.active {
  color: #fff; background: var(--primary); box-shadow: 0 2px 8px rgba(0,0,0,.12);
}
html[data-theme="dark"] .language-switch button.active { color: #08142a; }
.theme-toggle {
  width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 50%;
  display: grid; place-items: center; background: var(--paper-2);
  font-size: 17px; line-height: 1; transition: transform .18s, border-color .18s, background .18s;
}
.theme-toggle:hover { transform: rotate(10deg); border-color: var(--primary-lt); }
.theme-toggle:focus-visible,
.language-switch button:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

html[data-theme="dark"] .site-header { background: color-mix(in srgb, var(--paper) 90%, transparent); }
html[data-theme="dark"] .pager .current,
html[data-theme="dark"] .btn-primary { color: var(--primary-dk); }
html[data-theme="dark"] .card .icon,
html[data-theme="dark"] .pub .impact-factor,
html[data-theme="dark"] .pub .impact-high,
html[data-theme="dark"] .pub .impact-low { color: var(--primary); background: var(--paper-2); }
html[data-theme="dark"] .ql-row.active { background: var(--primary-dk); }
.nav { gap: 12px; }
.brand { order: 0; min-width: 0; }
.nav-links { order: 1; margin-left: auto; }
.nav-toggle { order: 3; flex: none; }
html[lang="ko"] { word-break: keep-all; overflow-wrap: anywhere; }
html[lang="ko"] .hero h1 { line-height: 1.25; }
html[lang="ko"] .hero h1 em { font-style: normal; font-weight: 600; }
.footer-brand .name { white-space: normal; }
@media (max-width: 1100px) {
 .nav-toggle { display: block; }
 .nav-actions { margin-left: auto; }
 .nav-links { position: absolute; top: 74px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; background: var(--paper); border-bottom: 1px solid var(--line); padding: 8px 16px 16px; display: none; margin-left: 0; }
 .nav-links.open { display: flex; }
 .nav-links a { padding: 12px 10px; border-radius: 8px; }
 .dropdown { position: static; min-width: 0; background: var(--paper-2); box-shadow: none; border: 0; display: none; opacity: 1; visibility: visible; transform: none; }
 .has-dropdown.open .dropdown { display: block; }
 .dropdown a { color: var(--ink-soft); }
 .dropdown a:hover, .dropdown a.active { color: var(--primary); background: var(--paper-2); }
}
@media (max-width: 720px) {
 .nav { gap: 8px; }
 .brand .name { font-size: 14px; }
 .brand .name small { font-size: 9.5px; }
 .brand .mark { width: 34px; height: 34px; }
 .nav-actions { gap: 6px; }
 .language-switch button { min-width: 30px; height: 28px; padding: 0 6px; }
 .theme-toggle { width: 36px; height: 36px; }
}
@media (max-width: 480px) {
 .wrap.nav { padding-left: 12px; padding-right: 12px; gap: 5px; }
 .brand { gap: 6px; }
 .brand .name { max-width: 116px; font-size: 12px; white-space: normal; }
 .brand .name small { display: none; }
 .brand .mark { width: 28px; height: 28px; }
 .nav-toggle { width: 30px; }
 .nav-actions { gap: 4px; }
}
