:root {
  --max-width: 1080px;
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-soft: #f1f5f9;
  --text: #0f172a;
  --muted: #475569;
  --line: #e2e8f0;
  --accent: #0284c7;
  --accent-soft: #e0f2fe;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.07);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    "Noto Sans",
    "Noto Sans KR",
    "Apple SD Gothic Neo",
    "Malgun Gothic",
    sans-serif;
  line-height: 1.55;
  padding-top: 62px;
}

a {
  color: inherit;
}

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

nav.top {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
}

nav.top .inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 11px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.nav-brand {
  text-decoration: none;
  white-space: nowrap;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none;
}

.nav-links::-webkit-scrollbar {
  display: none;
}

.nav-links a {
  text-decoration: none;
  color: var(--muted);
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 13px;
  font-weight: 500;
}

.nav-links a:hover {
  color: var(--text);
  background: var(--surface-soft);
  border-color: var(--line);
}

.nav-links a[aria-current="page"] {
  color: var(--accent);
  border-color: #bae6fd;
  background: var(--accent-soft);
}

header.hero,
.page-hero {
  max-width: var(--max-width);
  margin: 18px auto 0;
  padding: 0 20px;
}

.hero-shell,
.surface,
.card,
.link-card,
.contact-card,
.media-card,
.pub-card,
.metric-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
}

.hero-shell {
  padding: 16px;
  box-shadow: var(--shadow-md);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.65fr);
  gap: 14px;
}

.hero-main,
.hero-aside,
.stack {
  display: grid;
  gap: 10px;
}

.hero-kicker {
  margin: 0;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  font-weight: 700;
}

.hero h1,
.page-hero h1 {
  margin: 0;
  font-size: 34px;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.kicker,
.page-hero p,
.hero p {
  margin: 0;
  color: var(--muted);
}

.hero-identity {
  display: flex;
  align-items: center;
  gap: 12px;
}

.hero img.headshot {
  width: 88px;
  height: 88px;
  border-radius: 14px;
  border: 1px solid var(--line);
  object-fit: cover;
  flex-shrink: 0;
}

.hero-actions,
.hero-meta,
.badges,
.media-strip,
.media-links,
.pub-links,
.publication-links,
.pub-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.btn,
.media-strip a,
.media-links a,
.publication-links a,
.link-cta,
.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border-radius: 9px;
  border: 1px solid var(--line);
  padding: 6px 10px;
  font-size: 13px;
  font-weight: 600;
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease;
}

.btn-primary,
.cta,
.link-cta {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

.btn-primary:hover,
.cta:hover,
.link-cta:hover {
  background: #0369a1;
  border-color: #0369a1;
}

.btn-secondary,
.media-strip a,
.media-links a,
.publication-links a {
  background: #ffffff;
  color: var(--text);
}

.btn-secondary:hover,
.media-strip a:hover,
.media-links a:hover,
.publication-links a:hover {
  background: var(--surface-soft);
  border-color: #cbd5e1;
}

.chip,
.badge,
.pill,
.pub-year,
.pub-venue {
  display: inline-flex;
  align-items: center;
  border: 1px solid #bae6fd;
  background: var(--accent-soft);
  color: #0369a1;
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 11px;
  font-weight: 700;
}

.role-badge {
  display: inline-flex;
  align-items: center;
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 11px;
  font-weight: 700;
}

.metric-card {
  padding: 11px 12px;
}

.metric-label {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.metric-value {
  margin: 1px 0 0;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 10px 20px 56px;
}

section {
  margin: 24px 0;
}

.section-header,
.section-title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 9px;
  margin-bottom: 10px;
}

h2 {
  margin: 0;
  font-size: 27px;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h3,
h4 {
  margin: 0;
  font-size: 20px;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.section-subtitle,
.section-title span,
.pub-authors,
.media-kicker,
.pub-summary {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.amp {
  font-weight: 700;
}

.surface,
.card,
.link-card,
.contact-card,
.media-card,
.pub-card {
  padding: 14px;
}

.cards-2,
.split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
}

.cards-3,
.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
}

.cards-2 > *,
.cards-3 > * {
  align-self: start;
}

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

ul.clean {
  margin: 0;
  padding-left: 18px;
}

ul.clean li {
  margin: 5px 0;
}

.link-card p,
.card p,
.surface p,
.media-body p,
.contact-card p {
  margin: 0;
  color: var(--muted);
}

.link-grid,
.media-list,
.contact-grid {
  display: grid;
  gap: 12px;
}

.contact-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.media-card {
  display: grid;
  grid-template-columns: minmax(0, 180px) minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.media-thumb {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-soft);
}

.media-thumb--cover {
  object-fit: cover;
}

.pub-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  align-items: start;
  max-width: 1180px;
  margin: 0 auto;
}

.pub-card {
  display: grid;
  grid-template-columns: 148px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.pub-thumb-btn {
  width: 148px;
  max-width: 100%;
  border: 0;
  padding: 0;
  margin: 0;
  background: transparent;
  cursor: zoom-in;
  border-radius: 10px;
  display: block;
}

.pub-thumb-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.pub-thumb {
  display: block;
  width: 148px;
  max-width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-soft);
  transition:
    box-shadow 0.15s ease,
    border-color 0.15s ease;
}

.pub-thumb-btn:hover .pub-thumb {
  box-shadow: var(--shadow-md);
  border-color: #cbd5e1;
}

.pub-main {
  display: grid;
  gap: 7px;
}

.pub-main h3 {
  font-size: 19px;
  line-height: 1.24;
}

.pub-links {
  margin-top: 1px;
}

.demo-link {
  white-space: nowrap;
}

.demo-main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 16px 20px 56px;
}

.demo-panel {
  max-width: 940px;
  margin: 0 auto;
}

.demo-player {
  width: 100%;
  max-width: 940px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #0f172a;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: none;
}

.lightbox.is-open {
  display: block;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.7);
}

.lightbox-content {
  position: relative;
  margin: 4vh auto;
  width: min(92vw, 1180px);
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  padding: 12px;
}

.lightbox-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  color: var(--text);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.lightbox-close:hover {
  background: var(--surface-soft);
}

#lightbox-img {
  display: block;
  width: 100%;
  max-height: 78vh;
  object-fit: contain;
  border-radius: 8px;
  background: var(--surface-soft);
}

#lightbox-cap {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
}

.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.timeline li {
  border-left: 2px solid #bae6fd;
  padding-left: 10px;
}

footer.site {
  border-top: 1px solid var(--line);
  background: #ffffff;
  color: var(--muted);
  text-align: center;
  padding: 16px;
}

.publications-page main,
.publications-page .page-hero,
.publications-page nav.top .inner {
  max-width: 1220px;
}

@media (max-width: 980px) {
  .hero-grid,
  .cards-2,
  .cards-3,
  .grid,
  .grid-3,
  .split,
  .contact-grid,
  .pub-list {
    grid-template-columns: 1fr;
  }

  .media-card,
  .pub-card {
    grid-template-columns: 1fr;
  }

  .pub-thumb {
    width: 100%;
    max-width: 220px;
  }

  .pub-thumb-btn {
    width: 100%;
    max-width: 220px;
  }
}

@media (max-width: 720px) {
  body {
    padding-top: 60px;
  }

  nav.top .inner {
    padding: 10px 12px;
  }

  .nav-brand {
    font-size: 15px;
  }

  .nav-links a {
    font-size: 12px;
    padding: 6px 9px;
  }

  header.hero,
  .page-hero,
  main {
    padding-left: 14px;
    padding-right: 14px;
  }

  .hero h1,
  .page-hero h1 {
    font-size: 30px;
  }

  h2 {
    font-size: 24px;
  }

  h3,
  h4 {
    font-size: 18px;
  }

  .hero-identity {
    align-items: flex-start;
  }
}
