:root {
  --accent: #1e5fa3;       /* Hanyang blue, lifted for the dark background */
  --accent-soft: #1d2a3a;
  --text: #dbe2ea;
  --muted: #9aa6b2;
  --line: #26303b;
  --band: #151b22;
  --bg: #0f1419;
  --surface: #151b22;
  --link: #8cc0f5;
  --disabled: #55606b;
  --max: 1080px;
  color-scheme: dark;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Open Sans", "Noto Sans KR", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.65;
}

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: var(--max); margin: 0 auto; padding: 0 24px; }

/* ---------- Header ---------- */
#site-header { border-bottom: 1px solid var(--line); background: var(--surface); position: sticky; top: 0; z-index: 10; }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.logo { display: flex; align-items: center; }
.logo:hover { text-decoration: none; }
/* The logo file is black on white: invert it to white on black, and screen drops the black. */
.logo-img { display: block; height: 46px; width: auto; filter: invert(1); mix-blend-mode: screen; }
.nav { display: flex; }
.nav a {
  color: var(--text);
  padding: 4px 14px;
  border-left: 1px solid var(--line);
}
.nav a:first-child { border-left: 2px solid var(--accent); }
.nav a.active { color: var(--link); }
.nav a:hover { color: var(--link); text-decoration: none; }
.header-actions { display: flex; align-items: center; gap: 6px; }
.nav-toggle { display: none; background: none; border: 0; font-size: 22px; cursor: pointer; color: var(--text); }

/* ---------- Hero ---------- */
.hero {
  --hero-bg: 8, 26, 48;
  position: relative;
  overflow: hidden;
  background: rgb(var(--hero-bg));
  color: #d6e2f0;
  padding: 72px 0;
  min-height: 460px;
  cursor: crosshair;
}
#hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hero-fade {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, rgba(var(--hero-bg), 0.94) 0%, rgba(var(--hero-bg), 0.8) 38%, rgba(var(--hero-bg), 0) 62%);
}
.hero-inner { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.hero h1 { color: #fff; font-size: 28px; line-height: 1.3; margin: 0 0 18px; font-weight: 600; }
.hero strong { color: #fff; }
.hero a { color: #8cc8ff; }
.hero-img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 4px; }

/* ---------- Placeholders ---------- */
.placeholder {
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--accent) 0%, #3a78b5 100%);
  color: rgba(255, 255, 255, 0.9);
  font-weight: 600; letter-spacing: 0.04em; text-align: center; padding: 12px;
}

/* ---------- Sections ---------- */
section { padding: 28px 0; }
h2 { font-size: 20px; font-weight: 600; margin: 0 0 18px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.page-title { font-size: 28px; color: var(--link); font-weight: 600; margin: 40px 0 0; }

.news ul { list-style: none; padding: 0; margin: 0; }
.news li { padding: 6px 0; }
.news .date { display: inline-block; min-width: 90px; color: var(--link); font-weight: 600; }

/* ---------- Projects ---------- */
.project { display: grid; grid-template-columns: 320px 1fr; gap: 32px; padding: 24px 0; border-bottom: 1px solid var(--line); }
.project:last-child { border-bottom: 0; }
.project-img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.project-anim { display: block; background: #0b1f36; border-radius: 4px; cursor: crosshair; touch-action: pan-y; }
.project h3 { margin: 0 0 10px; font-size: 18px; font-weight: 600; }
.project p { margin: 0 0 10px; }

/* ---------- People ---------- */
.people-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 28px; }
.people-grid.faculty { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.person { text-align: center; }
.avatar { width: 140px; height: 140px; border-radius: 6px; object-fit: cover; margin: 0 auto 12px; font-size: 28px; }
.faculty .avatar { width: 180px; height: 180px; }
img.avatar { display: block; } /* no inline-image baseline gap, so photo and placeholder cards line up */
.person-name { font-weight: 600; }
.person-name-en { font-size: 14px; }
.person-role, .person-email { color: var(--muted); font-size: 14px; }
.person-email { font-size: 13px; overflow-wrap: anywhere; }
.person-interests { color: var(--text); opacity: 0.85; font-size: 13px; line-height: 1.45; margin: 4px 0; }

/* ---------- Research ↔ People links ---------- */
.project, .person { scroll-margin-top: 90px; }
.project:target h3, .person:target .person-name { color: var(--link); }
.person:target .avatar { box-shadow: 0 0 0 3px var(--link); }
.project-members { font-size: 14px; display: flex; flex-wrap: wrap; gap: 4px 12px; }
.project-members span { color: var(--muted); }
.person-interests a { color: inherit; }
.person-interests a:hover { color: var(--link); }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 40px; align-items: start; margin-top: 12px; }
.contact-grid h2 { margin-top: 24px; }
.contact-grid h2:first-child { margin-top: 0; }
.contact-ko { color: var(--muted); }
.contact-label { display: inline-block; min-width: 96px; color: var(--muted); }
.contact-map { width: 100%; aspect-ratio: 4 / 3; border: 0; border-radius: 6px; }

/* ---------- Publications ---------- */
.pubs { list-style: none; padding: 0; margin: 0; }
.pubs li { padding: 14px 0 14px 16px; border-left: 3px solid var(--accent-soft); margin-bottom: 10px; }
.pubs li:hover { border-left-color: var(--accent); }
.pub-title { font-weight: 600; }
.pub-authors { color: var(--muted); }
.pub-venue { font-style: italic; }
.pub-links { font-size: 14px; margin-top: 2px; }
.pub-links .disabled { color: var(--disabled); }
.empty { color: var(--muted); }

/* ---------- Footer ---------- */
#site-footer { margin-top: 48px; background: var(--band); border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.footer-inner { display: flex; justify-content: space-between; gap: 24px; padding: 28px 24px; }
.footer-right { text-align: right; }

/* ---------- Mobile ---------- */
@media (max-width: 760px) {
  .container { padding: 0 16px; }
  .nav-toggle { display: block; }
  .nav { display: none; position: absolute; top: 72px; left: 0; right: 0; background: var(--surface); flex-direction: column; border-bottom: 1px solid var(--line); }
  .nav.open { display: flex; }
  .nav a, .nav a:first-child { border-left: 0; padding: 12px 16px; border-top: 1px solid var(--line); }
  .hero-inner, .project, .contact-grid { grid-template-columns: 1fr; gap: 20px; }
  .hero { padding: 48px 0 64px; }
  .hero-fade { background: rgba(var(--hero-bg), 0.72); }
  .footer-inner { flex-direction: column; padding: 24px 16px; }
  .footer-right { text-align: left; }
}
