/* ---------- Tokens (warm stone palette) ---------- */
:root {
  --bg: #fffdfd;
  --surface: #ffffff;
  --fg: #1c1917;
  --fg-2: #44403b;
  --muted: #79716b;
  --faint: #a6a09b;
  --line: #eee8ea;
  --line-2: #e2d8dc;
  --accent: #9b1b4b;
  --accent-light: #fbe7ee;
  --max: 900px;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.65;
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3 { margin: 0; line-height: 1.25; }
strong { font-weight: 600; }

main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 3.5rem 1.5rem 4rem;
}
section { margin-bottom: 3.75rem; }

/* Section label: small caps, letter-spaced */
h2 {
  position: relative;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--fg);
  margin-bottom: 1.1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--line-2);
}
h2::after {
  content: "";
  position: absolute; left: 0; bottom: -1px;
  width: 28px; height: 2px;
  background: var(--accent);
}
h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--fg);
  margin: 2rem 0 0.4rem;
}
h3:first-of-type { margin-top: 0; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.85rem 1.5rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.brand { font-weight: 700; color: var(--fg); letter-spacing: -0.01em; }
.brand:hover { text-decoration: none; }
.site-header nav { display: flex; gap: 1.4rem; flex-wrap: wrap; font-size: 0.9rem; }
.site-header nav a { color: var(--muted); }
.site-header nav a { padding-bottom: 2px; border-bottom: 1.5px solid transparent; }
.site-header nav a:hover { color: var(--accent); border-bottom-color: var(--accent); text-decoration: none; }

/* Hamburger (mobile only) */
.nav-toggle {
  display: none;
  width: 40px; height: 40px; margin: -8px -8px -8px 0;
  padding: 0; border: 0; background: none; cursor: pointer;
  flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  border-radius: 8px;
}
.nav-toggle span {
  display: block; width: 20px; height: 2px;
  background: var(--fg-2); border-radius: 2px;
  transition: transform .2s ease, opacity .2s ease;
}
.nav-toggle:hover { background: var(--accent-light); }
.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 2.5rem;
  align-items: stretch;
}
.portrait {
  width: 180px; height: 100%; min-height: 200px;
  align-self: stretch;
  object-fit: cover; object-position: center 15%;
  border-radius: 20px;
  border: 1px solid var(--line);
  box-shadow: 0 1px 2px rgba(28,25,23,.04), 0 8px 24px rgba(28,25,23,.06);
}
.hero h1 {
  font-size: 2.1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.25rem;
}
.role { margin: 0 0 1.1rem; color: var(--muted); font-size: 1rem; }
.bio { margin: 0 0 1.4rem; max-width: 62ch; }
.bio strong { color: var(--fg); }

.links { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.links a {
  display: inline-flex; align-items: center; gap: 0.4rem;
  height: 34px; padding: 0 0.85rem;
  border: 1px solid var(--line-2);
  border-radius: 8px;
  background: var(--surface);
  color: var(--fg-2);
  font-size: 0.84rem; font-weight: 500;
  transition: color .15s ease, border-color .15s ease, background .15s ease;
}
.links a svg { width: 15px; height: 15px; fill: currentColor; opacity: .8; }
.links a:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-light); text-decoration: none; }

/* ---------- News ---------- */
.news { list-style: none; padding: 0; margin: 0; }
.news li {
  display: grid; grid-template-columns: 84px 1fr; gap: 1rem;
  padding: 0.4rem 0; align-items: baseline;
}
.news time { color: var(--muted); font-size: 0.85rem; font-weight: 500; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ---------- Publications ---------- */
.pubs { list-style: none; padding: 0; margin: 0; }
.pub { padding: 0.7rem 0; }
.pub:first-child { padding-top: 0.5rem; }
.pub-venue-tag {
  font-size: 0.8rem; font-weight: 600;
  color: var(--accent);
  margin-bottom: 0.15rem;
}
.pub-title { font-size: 1rem; font-weight: 600; line-height: 1.4; color: var(--fg); }
.pub-authors { margin-top: 0.2rem; font-size: 0.9rem; color: var(--fg-2); }
.me { font-weight: 600; color: var(--fg); }
.pub-venue { font-size: 0.85rem; color: var(--muted); margin-top: 0.1rem; }
.award { font-size: 0.78rem; font-weight: 600; color: #a35b00; margin-left: 0.4rem; white-space: nowrap; }
.pub-links { margin-top: 0.45rem; display: flex; gap: 0.4rem; flex-wrap: wrap; }
.pub-links a {
  font-size: 0.76rem; font-weight: 500;
  padding: 0.12rem 0.6rem;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  transition: color .15s ease, border-color .15s ease;
}
.pub-links a:hover { color: var(--accent); border-color: var(--accent); text-decoration: none; }

/* ---------- Projects ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.card {
  display: flex; flex-direction: column; gap: 0.3rem;
  padding: 0.75rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--fg);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.card:hover {
  transform: translateY(-2px);
  border-color: var(--line-2);
  box-shadow: 0 8px 24px rgba(28,25,23,.07);
  text-decoration: none;
}
.card-figure {
  width: 100%; aspect-ratio: 16 / 9; object-fit: cover;
  border-radius: 8px; border: 1px solid var(--line); background: #fff;
  margin-bottom: 0.35rem;
}
.card h3 { margin: 0; font-size: 0.98rem; font-weight: 600; color: var(--fg); }
.card p { margin: 0; font-size: 0.86rem; color: var(--muted); flex: 1; }
.tag { font-size: 0.76rem; color: var(--accent); font-weight: 600; letter-spacing: 0.04em; }

/* ---------- Rows (education / experience / awards) ---------- */
.rows { list-style: none; padding: 0; margin: 0; }
.rows li {
  display: flex; justify-content: space-between; align-items: baseline; gap: 1.5rem;
  padding: 0.45rem 0;
}
.row-title { font-weight: 500; color: var(--fg); }
.row-sub { font-size: 0.88rem; color: var(--muted); margin-top: 0.1rem; }
.rows time { color: var(--muted); font-size: 0.88rem; white-space: nowrap; }

/* ---------- Footer ---------- */
.site-footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.5rem 1.5rem 3rem;
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-size: 0.82rem;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem;
}

/* ---------- Responsive ---------- */
@media (max-width: 720px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  main { padding-top: 2.5rem; }
}
@media (max-width: 600px) {
  .hero { grid-template-columns: 1fr; gap: 1.25rem; }
  .portrait { width: 160px; height: 200px; min-height: 0; align-self: start; }
  .hero h1 { font-size: 1.8rem; }
  .news li { grid-template-columns: 1fr; gap: 0; }
  .rows li { flex-direction: column; gap: 0.15rem; }

  /* Mobile nav: hamburger + dropdown panel */
  .site-header-inner { position: relative; }
  .nav-toggle { display: flex; }
  .site-header nav {
    display: none;
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; gap: 0;
    padding: 0.4rem 0.75rem 0.6rem;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 12px 24px rgba(28,25,23,.08);
    font-size: 0.95rem;
  }
  .nav-open nav { display: flex; }
  .site-header nav a {
    padding: 0.7rem 0.75rem;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
  }
  .site-header nav a:last-child { border-bottom: 0; }
  .site-header nav a:hover { border-bottom-color: var(--line); background: var(--accent-light); }
}
@media (max-width: 460px) {
  .cards { grid-template-columns: 1fr; }
}
