:root {
  --ink: #18211d;
  --muted: #647069;
  --paper: #f7f5ef;
  --surface: #fffdf8;
  --line: #d9ddd7;
  --accent: #0a6647;
  --accent-light: #dcece5;
  --max-width: 1160px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "DM Sans", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

.site-header {
  width: min(calc(100% - 48px), var(--max-width));
  min-height: 76px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 9px;
  font: 500 1.05rem/1 "DM Sans", sans-serif;
  text-decoration: none;
  letter-spacing: -0.02em;
}

.brand strong { font: 600 1.25rem/1 "Newsreader", serif; }
.brand-divider { color: var(--line); font-weight: 400; }
.brand-lab { color: var(--accent); font-size: 0.78rem; font-weight: 600; letter-spacing: 0.01em; }

.site-nav { display: flex; align-items: center; gap: 34px; }

.site-nav a {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 160ms ease;
}

.site-nav a:hover, .site-nav a.active { color: var(--ink); }
.site-nav a.active { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 8px; }
.menu-toggle { display: none; }

main, .site-footer { width: min(calc(100% - 48px), var(--max-width)); margin-inline: auto; }

.hero {
  min-height: 0;
  padding: 28px 0 34px;
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  width: 460px;
  height: 460px;
  right: -90px;
  top: 56px;
  z-index: -1;
  border: 1px solid #c9d6ce;
  border-radius: 50%;
  box-shadow: inset 0 0 0 74px var(--paper), inset 0 0 0 75px #dbe2dd;
}

.eyebrow, .small-label {
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.hero h1, .page-heading h1 {
  margin: 10px 0 14px;
  font: 500 clamp(4.3rem, 9vw, 7.6rem)/0.84 "Newsreader", serif;
  letter-spacing: -0.065em;
}

.hero h1 { font-size: clamp(2.6rem, 4.3vw, 3.7rem); }

.hero h1 span {
  color: var(--accent);
  font-family: "Noto Serif KR", serif;
  font-size: 0.44em;
  font-weight: 500;
  letter-spacing: -0.06em;
}

.hero-intro {
  max-width: 650px;
  margin: 0;
  color: #465149;
  font: 500 clamp(1.2rem, 2vw, 1.55rem)/1.5 "Newsreader", serif;
}

.hero-actions { display: flex; gap: 12px; margin-top: 18px; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 10px 20px;
  border: 1px solid var(--ink);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  transition: transform 160ms ease, background 160ms ease;
}

.button:hover { transform: translateY(-2px); }
.button-primary { color: white; background: var(--ink); }
.button-secondary { background: transparent; }

.home-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 0.82fr;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.feature-card, .contact-card { min-height: 190px; padding: 24px; }
.feature-card { border-right: 1px solid var(--line); }
.feature-card h2 { margin: 6px 0 10px; font: 500 1.8rem "Newsreader", serif; }
.feature-card p { max-width: 340px; color: var(--muted); }
.text-link { display: inline-block; margin-top: 8px; font-weight: 600; text-decoration: none; }
.text-link span { color: var(--accent); margin-left: 6px; }

.contact-card {
  color: white;
  background: var(--accent);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.contact-card .small-label { color: #a9d2c0; }
.contact-card p { margin: 6px 0; }
.contact-card a { font-weight: 600; text-underline-offset: 4px; }

.site-footer {
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.82rem;
}

.page-shell { padding: 20px 0 48px; }
.page-heading { max-width: 800px; margin-bottom: 28px; }
.page-heading h1 { font-size: clamp(2.5rem, 4.2vw, 3.6rem); }
.page-heading > p:last-child { max-width: 620px; color: var(--muted); font-size: 1.12rem; }

.research-section { display: grid; grid-template-columns: 200px 1fr; gap: 32px; padding-top: 18px; border-top: 1px solid var(--ink); }
.research-section + .research-section { margin-top: 40px; }
.research-section > h2 { margin: 0; font: 500 1.6rem "Newsreader", serif; }
.publication-list { margin: 0; padding: 0; list-style: none; }
.publication-list li { display: grid; grid-template-columns: 56px 1fr; gap: 16px; padding: 0 0 16px; margin-bottom: 16px; border-bottom: 1px solid var(--line); }
.pub-year { color: var(--accent); font-size: 0.8rem; font-weight: 600; }
.publication-list h3, .paper-card h3 { margin: -6px 0 8px; font: 500 1.38rem/1.35 "Newsreader", serif; }
.publication-list h3 a { text-decoration: none; transition: color 160ms ease; }
.publication-list h3 a:hover { color: var(--accent); }
.publication-list h3 a span { color: var(--accent); font: 500 0.78rem "DM Sans", sans-serif; }
.publication-list p, .paper-card p { margin: 0; color: var(--muted); font-size: 0.9rem; }

.working-paper-list { display: grid; gap: 14px; }
.paper-card { display: flex; gap: 24px; align-items: center; justify-content: space-between; padding: 18px 20px; background: var(--surface); }
.paper-card .button { flex: 0 0 auto; }
.paper-card .paper-status { display: inline; margin: 0 0 0 4px; padding: 0; border: 0; border-radius: 0; color: #a5aaa7; background: none; font-size: 0.7rem; font-style: normal; font-weight: 400; letter-spacing: 0; text-transform: none; white-space: nowrap; }

.teaching-list { border-top: 1px solid var(--ink); }
.institution { display: grid; grid-template-columns: 250px 1fr; gap: 32px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.institution-heading > span { color: var(--accent); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; }
.institution h2 { margin: 8px 0 0; font: 500 1.65rem "Newsreader", serif; }
.institution ul { margin: 0; padding: 0; list-style: none; }
.institution li { padding: 6px 0; border-bottom: 1px dotted #c7ccc7; }
.institution li:last-child { border: 0; }
.institution li strong { display: inline-block; min-width: 110px; color: var(--accent); font-size: 0.8rem; }
.institution li span { float: right; color: var(--muted); font-size: 0.78rem; }

.lab-heading { max-width: 850px; margin-bottom: 22px; }
.lab-heading h1 { margin: 14px 0 6px; font: 500 clamp(2.5rem, 4.2vw, 3.6rem)/1 "Newsreader", serif; letter-spacing: -0.045em; }
.lab-tagline { margin: 0 0 28px; color: var(--accent); font-size: 0.88rem; font-weight: 600; letter-spacing: 0.04em; }
.lab-introduction { max-width: 680px; margin: 0; color: var(--muted); font-size: 1.08rem; }
.lab-introduction-ko { max-width: 720px; margin-top: 14px; padding: 12px 16px; border-left: 3px solid var(--accent); background: var(--surface); font-family: "Noto Serif KR", serif; word-break: keep-all; }
.lab-introduction-ko p { margin: 0; color: #465149; font-size: 0.94rem; line-height: 1.85; }
.lab-introduction-ko p + p { margin-top: 7px; }
.lab-section { display: grid; grid-template-columns: 180px 1fr; gap: 28px; padding: 18px 0 28px; border-top: 1px solid var(--ink); }
.section-label h2 { margin: 8px 0 0; font: 500 1.65rem "Newsreader", serif; }
.section-label p { margin: 0; }
.focus-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.focus-grid article { min-height: 128px; padding: 16px 18px; background: var(--surface); }
.focus-grid article > span { color: var(--accent); font-size: 0.72rem; font-weight: 600; }
.focus-grid h3 { margin: 10px 0 6px; font: 500 1.08rem/1.22 "Newsreader", serif; }
.focus-grid p { margin: 0; color: var(--muted); font-size: 0.8rem; line-height: 1.5; }
.people-content { display: block; }
.person-card { display: grid; grid-template-columns: 100px 1fr; gap: 22px; padding: 20px 22px; background: var(--surface); }
.person-marker { min-height: 76px; padding-left: 15px; border-left: 3px solid var(--accent); display: flex; flex-direction: column; justify-content: center; }
.person-marker span { color: var(--accent); font: 600 1.45rem "Newsreader", serif; }
.person-marker small { margin-top: 4px; color: var(--muted); font-size: 0.66rem; letter-spacing: 0.08em; text-transform: uppercase; }
.person-role { margin: 0 0 3px; color: var(--accent); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; }
.person-card h3, .students-note h3 { margin: 0 0 5px; font: 500 1.4rem "Newsreader", serif; }
.person-card p, .students-note p { margin: 4px 0; color: var(--muted); }
.person-links { display: flex; gap: 18px; margin-top: 12px; }
.person-links a { font-size: 0.82rem; font-weight: 600; text-underline-offset: 4px; }
.people-groups { display: grid; gap: 12px; margin-top: 12px; }
.student-group { padding: 18px 20px; border: 1px solid var(--line); }
.student-group .small-label { margin: 0 0 6px; }
.student-group h3 { margin: 0 0 12px; font: 500 1.35rem "Newsreader", serif; }
.student-categories { margin: 0; padding: 0; list-style: none; }
.student-categories li { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; padding: 8px 0; border-top: 1px dotted #c7ccc7; }
.student-categories span { font-size: 0.84rem; font-weight: 500; }
.student-categories small { display: block; margin-top: 2px; color: var(--muted); font-size: 0.7rem; font-weight: 400; }
.student-categories em { flex: 0 0 auto; color: var(--muted); font-size: 0.72rem; font-style: normal; }
.student-categories .student-category-with-names { display: block; }
.student-names { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px 24px; margin: 7px 0 0; padding: 0; list-style: none; }
.student-names li { display: block; padding: 0; border: 0; font-size: 0.9rem; }
.student-names li > span { display: flex; gap: 7px; }
.student-names li small { display: inline; margin: 0; font-family: "Noto Serif KR", serif; font-size: 0.82rem; }
.student-names li > em { display: block; margin-top: 2px; font-family: "Noto Serif KR", serif; font-size: 0.73rem; }
.project-list { min-width: 0; }
.empty-state { min-height: 76px; padding: 20px; display: flex; align-items: center; border: 1px solid var(--line); background: var(--surface); }
.empty-state p { margin: 0; color: var(--muted); font-size: 0.82rem; }
.lab-nickname { grid-column: 2; max-width: 700px; margin: -24px 0 0; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.82rem; font-style: italic; }
.lab-nickname span { color: var(--ink); font-weight: 600; }
.research-invitation { grid-column: 2; margin-top: 18px; padding: 18px 20px; border: 1px solid var(--line); background: var(--surface); }
.research-invitation h3 { margin: 0 0 10px; font: 500 1.45rem "Newsreader", serif; }
.research-invitation > p { max-width: 700px; margin: 0; color: var(--muted); font-size: 0.88rem; }
.research-invitation .invitation-email { margin-top: 10px; color: var(--accent); font-weight: 600; }

@media (max-width: 800px) {
  .site-header { min-height: 68px; }
  .menu-toggle { display: block; padding: 9px 0; border: 0; color: var(--ink); background: none; font: 600 0.85rem "DM Sans", sans-serif; }
  .site-nav { display: none; position: absolute; z-index: 10; top: 68px; left: 0; width: 100%; padding: 20px 24px 24px; background: var(--paper); border-bottom: 1px solid var(--line); flex-direction: column; align-items: flex-start; gap: 16px; }
  .site-nav.open { display: flex; }
  .hero { min-height: auto; padding: 22px 0 30px; }
  .hero::after { width: 280px; height: 280px; right: -150px; top: 80px; }
  .hero h1 { font-size: clamp(2.5rem, 11vw, 3.4rem); }
  .home-grid { grid-template-columns: 1fr; }
  .feature-card { border-right: 0; border-bottom: 1px solid var(--line); }
  .page-shell { padding-top: 18px; }
  .page-heading { margin-bottom: 26px; }
  .research-section, .institution { grid-template-columns: 1fr; gap: 30px; }
  .paper-card { align-items: flex-start; flex-direction: column; }
  .lab-section { grid-template-columns: 1fr; gap: 28px; }
  .focus-grid { grid-template-columns: 1fr; }
  .focus-grid article { min-height: auto; }
  .people-content { grid-template-columns: 1fr; }
  .lab-nickname { grid-column: 1; margin-top: -16px; }
  .research-invitation { grid-column: 1; }
}

@media (max-width: 520px) {
  .site-header, main, .site-footer { width: min(calc(100% - 32px), var(--max-width)); }
  .hero-actions { align-items: stretch; flex-direction: column; }
  .feature-card, .contact-card { min-height: 280px; padding: 30px; }
  .publication-list li { grid-template-columns: 1fr; gap: 8px; }
  .institution li strong { display: block; }
  .institution li span { float: none; display: block; margin-top: 3px; }
  .site-footer { align-items: flex-start; flex-direction: column; justify-content: center; gap: 2px; }
  .site-footer p { margin: 0; }
  .lab-heading h1 { font-size: clamp(2.5rem, 11vw, 3.4rem); }
  .person-card { grid-template-columns: 1fr; }
  .person-marker { min-height: 70px; }
  .student-categories li { align-items: flex-start; flex-direction: column; gap: 2px; }
  .student-names { grid-template-columns: 1fr; }
  .brand { gap: 6px; }
  .brand strong { font-size: 1.08rem; }
  .brand-lab { max-width: 94px; font-size: 0.65rem; line-height: 1.15; }
}

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