:root {
  --bg: #FFFFFF;
  --bg-alt: #F3F4F8;
  --ink: #0E0F14;
  --muted: #5F6472;
  --line: #E4E6EE;
  --violet: #5B3CFF;
  --cyan: #00B8FF;
  --pink: #FF5FA8;
  --grad: linear-gradient(120deg, var(--violet), var(--cyan));
  --dark: #0D0E14;
  --dark-ink: #F2F3F8;
  --dark-muted: #A2A7B8;
  --font: "Pretendard Variable", Pretendard, -apple-system, system-ui, "Apple SD Gothic Neo", "Noto Sans KR", "Segoe UI", sans-serif;
  --ease: cubic-bezier(.2,.7,.2,1);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --bg: #0B0C11; --bg-alt: #13151D; --ink: #F2F3F8; --muted: #A2A7B8; --line: #242734; }
}
:root[data-theme="dark"] { --bg: #0B0C11; --bg-alt: #13151D; --ink: #F2F3F8; --muted: #A2A7B8; --line: #242734; }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font); font-size: 17px; line-height: 1.65;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
:lang(ko) { word-break: keep-all; }
.nw { white-space: nowrap; }
a { color: inherit; }
img, svg { display: block; }
:focus-visible { outline: 2px solid var(--violet); outline-offset: 3px; border-radius: 6px; }
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 700px) { .container { padding: 0 40px; } }

/* Nav */
.nav { position: fixed; inset: 0 0 auto; z-index: 50; transition: background .4s var(--ease), border-color .4s var(--ease); border-bottom: 1px solid transparent; }
.nav.scrolled {
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: saturate(160%) blur(16px); -webkit-backdrop-filter: saturate(160%) blur(16px);
  border-color: var(--line);
}
.nav .container { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 1rem; }
.brand { font-weight: 800; letter-spacing: -0.02em; text-decoration: none; font-size: 1.05rem; display: flex; align-items: center; gap: .6rem; white-space: nowrap; }
.brand i { width: 26px; height: 26px; border-radius: 8px; background: var(--grad); display: inline-block; flex: none; }
.nav ul { display: none; list-style: none; margin: 0; padding: 0; gap: 2rem; }
.nav ul a { text-decoration: none; font-size: .95rem; font-weight: 500; color: var(--muted); transition: color .2s; }
.nav ul a:hover { color: var(--ink); }
@media (min-width: 980px) { .nav ul { display: flex; } }
.nav-right { display: flex; align-items: center; gap: .6rem; }
.lang { display: flex; padding: 3px; border-radius: 999px; border: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 70%, transparent); }
.lang a { padding: .32rem .7rem; border-radius: 999px; font-size: .82rem; font-weight: 600; text-decoration: none; color: var(--muted); transition: color .2s, background .2s; }
.lang a:hover { color: var(--ink); }
.lang a[aria-current="page"] { background: var(--ink); color: var(--bg); }
@media (max-width: 560px) { .nav .pill { display: none; } }

.pill {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .7rem 1.25rem; border-radius: 999px; font-weight: 600; font-size: .95rem;
  text-decoration: none; transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s, border-color .25s;
}
.pill.solid { background: var(--ink); color: var(--bg); }
.pill.solid:hover { transform: translateY(-2px); box-shadow: 0 10px 30px -10px color-mix(in srgb, var(--violet) 70%, transparent); }
.pill.ghost { border: 1.5px solid var(--line); color: var(--ink); }
.pill.ghost:hover { border-color: var(--ink); transform: translateY(-2px); }
.pill.small { padding: .55rem 1rem; font-size: .9rem; }

/* Hero */
.hero { position: relative; min-height: 100svh; display: flex; align-items: center; padding: 120px 0 90px; overflow: hidden; isolation: isolate; }
.aurora { position: absolute; inset: -20%; z-index: -1; pointer-events: none; }
.aurora span { position: absolute; border-radius: 50%; filter: blur(80px); animation: float 18s ease-in-out infinite alternate; }
.aurora span:nth-child(1) { width: 46vw; height: 46vw; min-width: 320px; min-height: 320px; left: 48%; top: 8%; background: var(--violet); opacity: .32; }
.aurora span:nth-child(2) { width: 38vw; height: 38vw; min-width: 260px; min-height: 260px; left: 66%; top: 34%; background: var(--cyan); opacity: .32; animation-duration: 22s; }
.aurora span:nth-child(3) { width: 26vw; height: 26vw; min-width: 200px; min-height: 200px; left: 36%; top: 50%; background: var(--pink); opacity: .2; animation-duration: 26s; }
@keyframes float { 0% { transform: translate(0,0) scale(1); } 50% { transform: translate(-6%, 5%) scale(1.08); } 100% { transform: translate(4%, -4%) scale(.95); } }
.fadeout { position: absolute; inset: 0; z-index: -1; background: linear-gradient(to bottom, transparent 65%, var(--bg)); }

.hero h1 { margin: 0; font-weight: 800; }
.who {
  display: inline-flex; align-items: center; gap: .6rem; font-size: 1rem; font-weight: 600;
  padding: .4rem .95rem .4rem .45rem; border-radius: 999px;
  background: color-mix(in srgb, var(--bg) 70%, transparent); border: 1px solid var(--line); backdrop-filter: blur(8px);
}
.who b { background: var(--grad); color: #fff; font-size: .75rem; padding: .2rem .6rem; border-radius: 999px; font-weight: 700; }
.display { display: block; margin-top: 1.6rem; font-size: clamp(2.6rem, 7.2vw, 6.2rem); line-height: 1.02; letter-spacing: -0.045em; font-weight: 800; }
.display:lang(ko) { letter-spacing: -0.03em; line-height: 1.12; }
.display .ln { display: block; overflow: hidden; padding-bottom: .06em; }
.display .ln > span { display: inline-block; }
.display .soft { color: transparent; background: var(--grad); -webkit-background-clip: text; background-clip: text; }
.sub { max-width: 36rem; font-size: clamp(1.08rem, 1.6vw, 1.22rem); color: var(--muted); margin: 1.8rem 0 0; }
.hero .cta { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2.1rem; }
.place { margin-top: 2.4rem; font-size: .9rem; color: var(--muted); display: flex; gap: .55rem; align-items: center; }
.place::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #22C55E; box-shadow: 0 0 0 4px color-mix(in srgb, #22C55E 25%, transparent); }

.scroll-cue { position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%); width: 24px; height: 38px; border: 1.5px solid var(--line); border-radius: 14px; }
.scroll-cue::after { content: ""; position: absolute; left: 50%; top: 7px; width: 3px; height: 7px; margin-left: -1.5px; border-radius: 2px; background: var(--ink); animation: cue 1.8s var(--ease) infinite; }
@keyframes cue { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(12px); } }
@media (max-width: 979px) { .scroll-cue { display: none; } }

/* Marquee */
.marquee { border-block: 1px solid var(--line); overflow: hidden; padding: 1.4rem 0; background: var(--bg); }
.marquee .track { display: flex; width: max-content; animation: slide 40s linear infinite; }
.marquee .track span { font-size: clamp(1.4rem, 3vw, 2.2rem); font-weight: 700; letter-spacing: -0.03em; padding: 0 1.6rem; white-space: nowrap; display: flex; align-items: center; gap: 3.2rem; }
.marquee .track span::after { content: ""; width: 12px; height: 12px; border-radius: 50%; background: var(--grad); flex: none; }
.marquee .track span:nth-child(even) { color: var(--muted); font-weight: 500; }
@keyframes slide { to { transform: translateX(-50%); } }

/* Sections */
.section { padding: clamp(80px, 12vw, 150px) 0; }
.section.alt { background: var(--bg-alt); }
.kicker { font-size: .95rem; font-weight: 600; color: var(--violet); margin: 0 0 1.2rem; display: flex; align-items: center; gap: .7rem; }
.kicker::before { content: ""; width: 28px; height: 2px; background: var(--grad); border-radius: 2px; }
h2.big { font-size: clamp(1.9rem, 4vw, 3.2rem); line-height: 1.12; letter-spacing: -0.035em; font-weight: 800; margin: 0; max-width: 24ch; }
h2.big:lang(ko) { max-width: 20em; font-size: clamp(1.75rem, 3.4vw, 2.7rem); line-height: 1.3; letter-spacing: -0.025em; }

/* About */
.about-grid { display: grid; gap: 2.2rem; margin-top: 3.5rem; align-items: start; }
@media (min-width: 900px) { .about-grid { grid-template-columns: 220px minmax(0, 42rem); gap: 4.5rem; } }
.about-photo { margin: 0; width: 100%; max-width: 168px; }
@media (min-width: 900px) { .about-photo { max-width: none; } }
.about-photo img { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 22px; border: 1px solid var(--line); background: #fff; }
.about-grid p { margin: 0 0 1.2rem; color: var(--muted); font-size: 1.08rem; }
.about-grid p strong { color: var(--ink); font-weight: 600; }
.langs { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.6rem; }
.langs span { font-size: .88rem; font-weight: 500; padding: .35rem .85rem; border-radius: 999px; border: 1px solid var(--line); background: var(--bg); }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin-top: 4.5rem; background: var(--line); border: 1px solid var(--line); border-radius: 24px; overflow: hidden; }
@media (min-width: 900px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat { background: var(--bg); padding: 1.8rem 1.5rem; min-height: 170px; display: flex; flex-direction: column; justify-content: space-between; }
.stat .n { font-size: clamp(2.2rem, 4.2vw, 3.2rem); font-weight: 800; letter-spacing: -0.04em; line-height: 1; }
.stat .n em { font-style: normal; color: transparent; background: var(--grad); -webkit-background-clip: text; background-clip: text; }
.stat p { margin: 1rem 0 0; font-size: .92rem; color: var(--muted); line-height: 1.45; }

/* Research */
.research-head { display: grid; gap: 2rem; align-items: end; }
@media (min-width: 900px) { .research-head { grid-template-columns: 1fr 1fr; } }
.icc { width: 100%; max-width: 520px; justify-self: end; }
.icc .axis { stroke: var(--line); stroke-width: 2; }
.icc .guide { stroke: var(--line); stroke-dasharray: 4 6; }
.icc .curve { fill: none; stroke: url(#iccGrad); stroke-width: 5; stroke-linecap: round; stroke-dasharray: 900; stroke-dashoffset: 0; }
.icc .dot { fill: var(--bg); stroke: var(--violet); stroke-width: 4; }
.icc text { fill: var(--muted); font-size: 16px; font-style: italic; font-family: Georgia, serif; }
.js .icc .curve { stroke-dashoffset: 900; transition: stroke-dashoffset 2.2s var(--ease) .2s; }
.js .icc .dot { opacity: 0; transition: opacity .5s ease 2s; }
.js .icc.in .curve { stroke-dashoffset: 0; }
.js .icc.in .dot { opacity: 1; }

.cards { display: grid; gap: 1.2rem; margin-top: 3.5rem; }
@media (min-width: 900px) { .cards { grid-template-columns: repeat(3, 1fr); } }
.card {
  position: relative; border-radius: 28px; padding: 2.2rem 2rem 2rem; background: var(--bg);
  border: 1px solid var(--line); overflow: hidden; min-height: 340px;
  display: flex; flex-direction: column; transition: transform .45s var(--ease), box-shadow .45s var(--ease), border-color .45s;
}
.card::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .4s;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), color-mix(in srgb, var(--violet) 14%, transparent), transparent 60%);
}
.card:hover { transform: translateY(-6px); border-color: color-mix(in srgb, var(--violet) 35%, var(--line)); box-shadow: 0 30px 60px -30px color-mix(in srgb, var(--violet) 45%, transparent); }
.card:hover::before { opacity: 1; }
.card .icon { width: 52px; height: 52px; border-radius: 16px; background: var(--grad); display: grid; place-items: center; color: #fff; }
.card h3 { font-size: 1.5rem; letter-spacing: -0.025em; line-height: 1.25; margin: 1.6rem 0 .8rem; font-weight: 700; }
.card p { margin: 0; color: var(--muted); }
.card .tags { margin-top: auto; padding-top: 1.6rem; display: flex; flex-wrap: wrap; gap: .4rem; }
.card .tags span { font-size: .8rem; font-weight: 500; padding: .3rem .7rem; border-radius: 999px; background: var(--bg-alt); color: var(--muted); }

/* Journey */
.journey { position: relative; margin: 4rem 0 0; list-style: none; padding: 0 0 0 2.2rem; }
@media (min-width: 900px) { .journey { padding-left: 0; } }
.journey::before, .journey .fill { content: ""; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 2px; background: var(--line); border-radius: 2px; }
.journey .fill { background: var(--grad); bottom: auto; height: 0; list-style: none; }
@media (min-width: 900px) { .journey::before, .journey .fill { left: calc(220px + 7px); } }
.step { position: relative; display: grid; gap: .3rem; padding-bottom: 3.2rem; }
.step:last-child { padding-bottom: 0; }
@media (min-width: 900px) { .step { grid-template-columns: 220px 1fr; gap: 0 4rem; } }
.step::before {
  content: ""; position: absolute; left: -2.2rem; top: 4px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--bg); border: 3px solid var(--line); transition: border-color .4s, transform .4s var(--ease);
}
@media (min-width: 900px) { .step::before { left: 220px; } }
.step.on::before { border-color: var(--violet); transform: scale(1.15); }
.step .yr { font-size: clamp(1.6rem, 3vw, 2.4rem); font-weight: 800; letter-spacing: -0.04em; line-height: 1; color: var(--line); transition: color .5s; }
.step.on .yr, .no-js .step .yr { color: var(--ink); }
.step .txt { max-width: 40rem; }
@media (min-width: 900px) { .step .txt { padding-left: 2.6rem; } }
.step h3 { margin: 0 0 .4rem; font-size: 1.3rem; letter-spacing: -0.02em; font-weight: 700; line-height: 1.35; }
.step p { margin: 0; color: var(--muted); }

/* Publications */
.pubs { list-style: none; padding: 0; margin: 3.5rem 0 0; border-top: 1px solid var(--line); }
.pub { border-bottom: 1px solid var(--line); }
.pub > a, .pub > div { display: grid; gap: .4rem 2rem; padding: 1.8rem .4rem; text-decoration: none; position: relative; transition: padding .35s var(--ease), background .35s; border-radius: 16px; }
@media (min-width: 900px) { .pub > a, .pub > div { grid-template-columns: 90px 1fr 44px; align-items: start; } }
.pub .y { font-weight: 700; color: var(--muted); font-size: .95rem; padding-top: .2rem; }
.pub h3 { margin: 0; font-size: clamp(1.1rem, 1.8vw, 1.35rem); line-height: 1.4; letter-spacing: -0.02em; font-weight: 700; }
.pub .ref { display: block; margin-top: .45rem; color: var(--muted); font-size: .93rem; line-height: 1.5; }
.pub .go { display: none; }
@media (max-width: 899px) { .pub > a h3::after { content: " \2197"; color: var(--violet); font-weight: 600; } }
@media (min-width: 900px) {
  .pub .go { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid var(--line); transition: all .35s var(--ease); }
  .pub > a:hover { padding-left: 1.4rem; background: var(--bg); }
  .pub > a:hover .go { background: var(--ink); border-color: var(--ink); color: var(--bg); transform: rotate(-45deg); }
}

/* Contact */
.contact { background: var(--dark); color: var(--dark-ink); position: relative; overflow: hidden; isolation: isolate; border-radius: 40px 40px 0 0; }
.contact .aurora span { opacity: .4; }
.contact .kicker { color: #9C8BFF; }
.contact h2 { font-size: clamp(3rem, 10vw, 8.5rem); line-height: 1; letter-spacing: -0.05em; font-weight: 800; margin: 0; }
.contact h2:lang(ko) { letter-spacing: -0.035em; font-size: clamp(2.6rem, 8vw, 6.5rem); line-height: 1.15; }
.contact .mail {
  display: inline-block; margin-top: 2.6rem; font-size: clamp(1.25rem, 4vw, 2.6rem); font-weight: 700; letter-spacing: -0.03em;
  text-decoration: none; background: linear-gradient(90deg, #fff, #fff) left bottom / 0 3px no-repeat; transition: background-size .5s var(--ease);
  word-break: break-all; padding-bottom: .2rem;
}
.contact .mail:hover { background-size: 100% 3px; }
.contact p { color: var(--dark-muted); max-width: 34rem; margin: 1.8rem 0 0; font-size: 1.08rem; }
.contact .cta { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2.4rem; }
.contact .pill.solid { background: #fff; color: var(--dark); }
.contact .pill.ghost { border-color: #343848; color: #fff; }
.contact .pill.ghost:hover { border-color: #fff; }
footer { background: var(--dark); color: var(--dark-muted); font-size: .88rem; }
footer .container { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; padding-top: 2rem; padding-bottom: 2.4rem; border-top: 1px solid #23263A; }

/* Motion (only when JS is on) */
.js .reveal { opacity: 0; transform: translateY(36px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }
.js .reveal.d1 { transition-delay: .08s; } .js .reveal.d2 { transition-delay: .16s; } .js .reveal.d3 { transition-delay: .24s; }
.js .display .ln > span { transform: translateY(105%); transition: transform 1.1s var(--ease); }
.js .loaded .display .ln > span { transform: none; }
.js .loaded .display .ln:nth-child(2) > span { transition-delay: .1s; }
.js .loaded .display .ln:nth-child(3) > span { transition-delay: .2s; }
.js .hero .fade { opacity: 0; transform: translateY(16px); transition: opacity .9s var(--ease) .45s, transform .9s var(--ease) .45s; }
.js .loaded .fade { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .js .reveal, .js .hero .fade, .js .display .ln > span { opacity: 1 !important; transform: none !important; }
  .js .icc .curve { stroke-dashoffset: 0 !important; } .js .icc .dot { opacity: 1 !important; }
}
