/* Style tokens follow DeSIGN.md: night nav and footer, dark home, light reading pages,
   one indigo action, translucent secondary pills, light type weights. Inter stands in
   for the proprietary fonts named there. */
@font-face { font-family: Inter; src: url(../fonts/inter-latin.woff2) format("woff2"); font-weight: 300 600; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: Inter; src: url(../fonts/inter-latin-ext.woff2) format("woff2"); font-weight: 300 600; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: Inter; src: url(../fonts/inter-greek.woff2) format("woff2"); font-weight: 300 600; font-display: swap;
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF; }

:root {
  --primary: #5266eb; --on-primary: #fff; --periwinkle: #9cb4e8;
  --canvas: #fbfcfd; --surface: #fff; --lavender: #edecfb;
  --night: #171721; --night-raised: #1e1e2a;
  --ink: #28253b; --ink-2: #554e7b; --on-dark: #ededf3; --fog: #c3c3cc; --slate: #70707d;
  --md: 12px; --pill: 40px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; font: 400 16px/1.55 Inter, -apple-system, "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif; }
:lang(ko) { word-break: keep-all; overflow-wrap: anywhere; }
body.dark { background: var(--night); color: var(--on-dark); }
body.light-page { background: var(--canvas); color: var(--ink); }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { font-weight: 480; line-height: 1.2; letter-spacing: .01em; text-wrap: balance; }
h1 { font-size: clamp(2.1rem, 5vw, 3.25rem); line-height: 1.1; margin: 0 0 20px; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.6rem); margin: 0 0 32px; }
h3 { font-size: 1.35rem; margin: 0 0 8px; }
a { color: var(--primary); text-underline-offset: 3px; }
.dark a, .nav a, .foot a { color: var(--periwinkle); }
a:focus-visible, button:focus-visible, .menu-box:focus-visible + label { outline: 2px solid var(--periwinkle); outline-offset: 3px; }
ul { list-style: none; margin: 0; padding: 0; }
.wrap { width: min(1160px, 100% - 40px); margin-inline: auto; }
.wrap.narrow { width: min(860px, 100% - 40px); }
.center { text-align: center; }
.skip { position: absolute; left: -999px; z-index: 20; background: var(--primary); color: #fff !important; padding: 10px 16px; border-radius: 8px; }
.skip:focus { left: 12px; top: 12px; }

/* Buttons */
.button, .pill { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 4px 20px; border: 0; font: 420 16px/1.2 inherit; font-family: inherit; text-decoration: none; cursor: pointer; background: transparent; }
.button { border-radius: 32px; background: var(--primary); color: var(--on-primary) !important; }
.button:hover { filter: brightness(1.1); }
.pill { border-radius: var(--pill); }
.nav a.pill, .dark a.pill, .glass { color: var(--on-dark); }
.glass { background: rgba(175, 178, 206, .2); box-shadow: inset 0 0 0 1px rgba(175, 178, 206, .36); }
.tint { background: rgba(82, 102, 235, .1); color: var(--ink) !important; }
.dark .tint { background: rgba(156, 180, 232, .2); color: var(--on-dark) !important; }
.dark .light .tint { background: rgba(82, 102, 235, .1); color: var(--ink) !important; }
.pill:hover { background-color: rgba(156, 180, 232, .28); }
.eyebrow { margin: 0 0 12px; font-size: 14px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--fog); }

/* Navigation */
.nav { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 16px; min-height: 72px; padding: 12px 32px; background: var(--night); color: var(--on-dark); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 500; letter-spacing: .08em; text-decoration: none; white-space: nowrap; }
.nav a.brand { color: var(--on-dark); }
.brand img { border-radius: 50%; background: #fff; }
.nav nav { margin-inline: auto; }
.nav nav ul { display: flex; gap: 4px; }
.nav [aria-current="page"] { background: rgba(175, 178, 206, .2); }
.nav-actions { display: flex; gap: 8px; }
.menu-box, .menu-label, .phone-only { display: none; }

/* Home */
.hero { padding: 48px 0 64px; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 32px; align-items: center; }
.hero h1 { font-size: clamp(2.4rem, 5.4vw, 4rem); }
.hero-sub { font-size: 18px; font-weight: 360; color: var(--fog); margin: 0 0 32px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 0; }
.viewer { margin: 0; }
.stage { position: relative; aspect-ratio: 1; width: 100%; max-width: 620px; margin-inline: auto; }
.stage::before { content: ""; position: absolute; inset: 8%; border-radius: 50%; background: radial-gradient(closest-side, rgba(82, 102, 235, .22), transparent); }
.stage img, .stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.stage canvas { opacity: 0; }
.viewer.live canvas { opacity: 1; }
.viewer.live .stage img { visibility: hidden; }
.viewer figcaption { display: flex; justify-content: space-between; align-items: center; gap: 16px; font-size: 14px; color: var(--fog); max-width: 620px; margin: 12px auto 0; }
.band { padding: 80px 0; }
.band h2, .band > .wrap > .eyebrow { text-align: center; }
.light { background: var(--canvas); color: var(--ink); }
.light a { color: var(--primary) !important; }
.light a.pill { color: var(--ink) !important; }
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.card { background: var(--night-raised); border-radius: var(--md); padding: 32px; display: flex; flex-direction: column; gap: 20px; }
.card h3 { font-size: 1.5rem; }
.card p { color: var(--fog); font-weight: 360; font-size: 18px; margin: 0 0 24px; }
.card-art img { width: 100%; max-width: 340px; margin-inline: auto; aspect-ratio: 1; }
.gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.gallery li { background: var(--night-raised); border-radius: var(--md); padding: 24px; }
.gallery h3 { font-size: 1.1rem; margin-top: 16px; }
.gallery p { margin: 0; font-size: 14px; color: var(--fog); }
.banner img { width: min(100%, 1600px); margin-inline: auto; }
.contact { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.contact div { border-top: 1px solid var(--slate); padding-top: 20px; }
.contact h3 { font-size: 14px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--fog); }
.contact address { font-style: normal; }
.contact p { margin: 0; overflow-wrap: anywhere; }

/* Reading pages */
.page-head { padding: 64px 0 32px; text-align: center; }
.light-page main { padding-bottom: 96px; }
.light-page section + section { margin-top: 64px; }
.light-page h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); margin-bottom: 20px; }
.prose { font-size: 18px; font-weight: 380; line-height: 1.75; max-width: 70ch; }
.plate { float: right; width: min(340px, 100%); margin: 4px 0 20px 28px; background: var(--night); color: var(--fog); border-radius: var(--md); padding: 16px; font-size: 13px; }
.plate a { color: var(--periwinkle); }
.research-topic { display: flow-root; }

.people { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.person { display: flex; gap: 20px; align-items: flex-start; background: var(--lavender); border-radius: var(--md); padding: 24px; }
.person > img, .no-photo { width: 120px; height: 120px; object-fit: cover; border-radius: 8px; flex: none; background: var(--surface); }
.person h3 { margin-bottom: 2px; }
.person p { margin: 0 0 6px; color: var(--ink-2); }
.person .role { color: var(--ink); }
.person .mail { font-size: 14px; overflow-wrap: anywhere; }
.table { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { text-align: left; padding: 12px 16px 12px 0; border-bottom: 1px solid var(--fog); vertical-align: top; font-weight: 400; }
thead th { font-size: 13px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); }
tbody th { font-weight: 500; }

.tabs, .years { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.tabs [aria-current="page"] { background: var(--primary); color: #fff !important; }
.years { margin-top: 20px; gap: 4px 14px; font-size: 14px; }
.year { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 8px; border-top: 1px solid var(--fog); padding-top: 20px; }
.light-page .year + .year { margin-top: 32px; }
.year h2 { font-size: 1.4rem; color: var(--ink-2); }
.papers li { display: flex; gap: 20px; align-items: flex-start; padding: 0 0 20px; }
.papers p { margin: 0; flex: 1; overflow-wrap: anywhere; }
.papers img { width: 84px; border-radius: 4px; flex: none; }
.papers li:target { background: var(--lavender); border-radius: 8px; padding: 12px; }
.band .papers li { border-bottom: 1px solid var(--fog); padding: 16px 0; }

.shot { margin: 0 0 56px; }
.shot-row { display: grid; gap: 12px; justify-content: center; }
.shot-row.n1 { grid-template-columns: minmax(0, 960px); }
.shot-row.n2 { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
.shot img { width: 100%; border-radius: var(--md); }
.shot figcaption { text-align: center; margin-top: 12px; color: var(--ink-2); }

/* Footer */
.foot { background: var(--night); color: var(--fog); padding: 48px 0 32px; font-size: 14px; border-top: 1px solid var(--night-raised); }
.foot-grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 32px; align-items: flex-start; }
.foot-name { color: var(--on-dark); font-size: 16px; margin-top: 0; }
.foot li { margin-bottom: 8px; }
.kaist { background: #fff; border-radius: 8px; padding: 10px 14px; }
.kaist img { width: 132px; }
.legal { margin-top: 32px; margin-bottom: 0; font-size: 12px; letter-spacing: .02em; }

@media (max-width: 1023px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); text-align: center; }
  .actions { justify-content: center; }
  .viewer figcaption { text-align: left; }
  .gallery, .contact { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cards { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
  .nav { flex-wrap: wrap; padding: 12px 16px; gap: 8px; }
  .menu-box { display: block; position: absolute; opacity: 0; pointer-events: none; }
  .menu-label { display: inline-flex; order: 2; color: var(--on-dark); }
  .phone-only { display: list-item; }
  .nav-actions { margin-left: auto; }
  .nav-actions .button { display: none; }
  .nav nav { order: 3; width: 100%; margin: 0; display: none; }
  .menu-box:checked ~ nav { display: block; }
  .nav nav ul { flex-direction: column; }
  .nav nav a.pill { width: 100%; justify-content: flex-start; min-height: 44px; }
  .people { grid-template-columns: minmax(0, 1fr); }
  .band { padding: 56px 0; }
}
@media (max-width: 600px) {
  .gallery, .contact, .shot-row.n2 { grid-template-columns: minmax(0, 1fr); }
  .year { grid-template-columns: minmax(0, 1fr); }
  .plate { float: none; margin: 0 auto 20px; }
  .person { padding: 16px; gap: 14px; }
  .person > img, .no-photo { width: 88px; height: 88px; }
  .card { padding: 24px; }
  .papers img { width: 56px; }
}
@media print { .nav, .foot, .tabs, .years { display: none; } }
