:root {
  color-scheme: light;
  --bg: #fafaf8;
  --text: #252525;
  --muted: #6c6c67;
  --line: #d8d8d2;
  --link: #315f78;
  --paper: #ffffff;
  --sidebar-width: 210px;
  --content-width: 680px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;
    --bg: #1c1c1a;
    --text: #e8e7e2;
    --muted: #aaa9a2;
    --line: #44443f;
    --link: #9cc4d5;
    --paper: #1c1c1a;
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #1c1c1a;
  --text: #e8e7e2;
  --muted: #aaa9a2;
  --line: #44443f;
  --link: #9cc4d5;
  --paper: #1c1c1a;
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #fafaf8;
  --text: #252525;
  --muted: #6c6c67;
  --line: #d8d8d2;
  --link: #315f78;
  --paper: #ffffff;
}

* {
  box-sizing: border-box;
}

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

body {
  min-width: 320px;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

::selection {
  background: #dce8ed;
  color: #202020;
}

a {
  color: var(--link);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  text-decoration-color: transparent;
}

img {
  display: block;
  max-width: 100%;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
  line-height: 1.3;
}

h2 {
  margin-bottom: 0;
  font-size: 1.55rem;
}

h3 {
  font-size: 1.02rem;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 100;
  padding: 7px 10px;
  background: var(--text);
  color: var(--bg);
  transform: translateY(-180%);
}

.skip-link:focus {
  transform: translateY(0);
}

.theme-toggle {
  position: fixed;
  top: 17px;
  right: 20px;
  z-index: 20;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 1rem;
  cursor: pointer;
}

.theme-toggle:hover {
  color: var(--text);
}

.page-shell {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, var(--content-width));
  gap: 70px;
  width: min(100% - 48px, calc(var(--sidebar-width) + var(--content-width) + 70px));
  margin: 0 auto;
  padding: 64px 0 72px;
}

.sidebar {
  position: sticky;
  top: 40px;
  align-self: start;
}

.profile-block {
  padding: 0;
}

.avatar {
  width: 152px;
  aspect-ratio: 1 / 1;
  margin-bottom: 22px;
  border-radius: 2px;
  object-fit: cover;
  filter: saturate(0.82);
}

.profile-kicker,
.section-kicker,
.eyebrow {
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.profile-block h1 {
  margin-bottom: 2px;
  font-size: 1.65rem;
}

.korean-name {
  margin-bottom: 19px;
  color: var(--muted);
  font-size: 0.84rem;
}

.profile-role {
  margin-bottom: 1px;
  font-weight: 600;
}

.profile-department,
.profile-location,
.email-display {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 0.82rem;
}

.profile-affiliation {
  display: inline-block;
  margin: 1px 0 7px;
  font-size: 0.84rem;
}

.profile-links {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 12px;
  margin: 17px 0 9px;
}

.profile-links a {
  color: var(--link);
  font-size: 0.78rem;
}

.profile-links span {
  margin-right: 3px;
  color: var(--muted);
  font-size: 0.68rem;
}

.email-display {
  margin-bottom: 0;
}

.sidebar-nav {
  display: grid;
  gap: 3px;
  margin-top: 28px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.sidebar-nav a {
  color: var(--muted);
  font-size: 0.8rem;
  text-decoration: none;
}

.sidebar-nav a:hover {
  color: var(--text);
}

.content {
  min-width: 0;
}

.section {
  padding: 0 0 62px;
}

.section + .section {
  padding-top: 0;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 20px;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--text);
}

.section-heading--with-note > p {
  max-width: 270px;
  margin-bottom: 2px;
  color: var(--muted);
  font-size: 0.79rem;
  text-align: right;
}

.research-grid {
  display: grid;
}

.research-card,
.project-card {
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.research-card:first-child {
  padding-top: 2px;
}

.card-index {
  float: left;
  width: 32px;
  padding-top: 2px;
  color: var(--muted);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.76rem;
}

.research-card h3,
.research-card p,
.research-card .tag-list {
  margin-left: 42px;
}

.research-card h3 {
  margin-bottom: 5px;
}

.research-card p,
.project-card p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 13px;
  margin-top: 8px;
}

.tag {
  color: var(--muted);
  font-size: 0.72rem;
}

.tag::before {
  content: "/ ";
}

.news-list {
  border-top: 1px solid var(--line);
}

.news-item {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 18px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}

.news-item time {
  color: var(--muted);
  font-size: 0.78rem;
}

.news-item p {
  margin-bottom: 0;
  font-size: 0.88rem;
}

.publication-list {
  display: grid;
}

.publication-card {
  display: grid;
  grid-template-columns: 142px minmax(0, 1fr);
  gap: 21px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}

.publication-card:first-child {
  padding-top: 2px;
}

.publication-media {
  position: relative;
  overflow: hidden;
  align-self: start;
  aspect-ratio: 16 / 9;
  background: #f0f0ed;
}

.publication-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: saturate(0.7);
}

.venue-badge {
  position: absolute;
  right: 5px;
  bottom: 5px;
  padding: 2px 5px;
  background: rgba(30, 30, 28, 0.82);
  color: #fff;
  font-size: 0.58rem;
}

.publication-content {
  align-self: center;
}

.selected-label {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.publication-content h3 {
  margin-bottom: 7px;
  font-size: 1rem;
}

.authors,
.venue {
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 0.8rem;
}

.authors strong {
  color: var(--text);
}

.publication-links {
  display: flex;
  gap: 12px;
  margin-top: 9px;
}

.publication-links a {
  font-size: 0.74rem;
}

.project-grid {
  display: grid;
}

.project-meta {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 0.7rem;
  text-transform: uppercase;
}

.project-card h3 {
  margin-bottom: 5px;
}

.project-subtitle,
.project-organization {
  min-height: 0;
}

.timeline {
  border-top: 1px solid var(--line);
}

.timeline-item {
  padding: 17px 0;
  border-bottom: 1px solid var(--line);
}

.timeline-marker {
  display: none;
}

.timeline-title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
}

.timeline-title-row h3 {
  margin-bottom: 5px;
}

.timeline-title-row time {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 0.76rem;
}

.timeline-body p {
  margin-bottom: 2px;
  color: var(--muted);
  font-size: 0.84rem;
}

.timeline-institution {
  color: var(--text) !important;
  font-weight: 600;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.72rem;
}

.site-footer p {
  margin-bottom: 0;
}

@media (max-width: 820px) {
  .page-shell {
    gap: 42px;
    width: min(100% - 36px, 760px);
  }
}

@media (max-width: 680px) {
  .theme-toggle {
    top: 10px;
    right: 10px;
  }

  .page-shell {
    display: block;
    width: min(100% - 34px, 620px);
    padding: 38px 0 54px;
  }

  .sidebar {
    position: static;
  }

  .profile-block {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    column-gap: 17px;
    align-items: start;
  }

  .avatar {
    grid-row: span 2;
    width: 88px;
    margin-bottom: 0;
  }

  .profile-role,
  .profile-department,
  .profile-affiliation,
  .profile-location,
  .profile-links,
  .email-display {
    grid-column: 1 / -1;
  }

  .profile-role {
    margin-top: 18px;
  }

  .sidebar-nav {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    margin: 20px 0 46px;
    padding: 11px 0 0;
    white-space: nowrap;
  }

  .section {
    padding-bottom: 52px;
  }

  .section-heading,
  .timeline-title-row,
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .section-heading--with-note > p {
    text-align: left;
  }

  .publication-card {
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 16px;
  }

  .site-footer {
    gap: 2px;
  }
}

@media (max-width: 440px) {
  .publication-card {
    grid-template-columns: 1fr;
  }

  .publication-media {
    width: 150px;
  }

  .news-item {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

@media print {
  .theme-toggle,
  .sidebar-nav {
    display: none;
  }

  body {
    background: #fff;
    color: #000;
  }

  .page-shell {
    display: block;
    width: 100%;
    padding: 0;
  }

  .sidebar {
    position: static;
    margin-bottom: 30px;
  }
}
