/* SDE Lab site
   Layout concept: left-aligned, one memorable visual (the hexagon tissue map) on the home page,
   everything else quiet. Palette comes from the lab logo (navy, teal, violet). */

:root {
  --ink: #141d4a;
  --text: #2b3558;
  --muted: #5b6585;
  --line: #dde4f0;
  --bg: #fbfcfe;
  --tint: #eff3fa;
  --teal: #2a9d98;
  --teal-deep: #1a7a76;
  --violet: #6f5fb0;
  --blue: #3f63b0;
  --figure-bg: #fdfdfc;
  --grad: linear-gradient(90deg, #1b2a6b 0%, #2a9d98 55%, #7667b5 100%);
  --font-display: "Sora", "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  --font-body: "IBM Plex Sans", "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1.0625rem/1.65 var(--font-body);
}
img, svg { max-width: 100%; }
img { height: auto; display: block; }
a { color: var(--teal-deep); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; border-radius: 3px; }

.wrap {
  width: 100%;
  max-width: 1160px;
  margin-inline: auto;
  padding-inline: 20px;
}
@media (min-width: 900px) { .wrap { padding-inline: 32px; } }

.skip {
  position: absolute; left: -999px; top: 8px;
  background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 6px; z-index: 10;
}
.skip:focus { left: 8px; }

/* Header */
.site-header { border-bottom: 1px solid var(--line); background: var(--bg); }
.bar {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 8px 24px; min-height: 72px; padding-block: 12px;
}
.brand {
  font-family: var(--font-display); font-weight: 700; font-size: 1.4rem; letter-spacing: -.01em;
  text-decoration: none; color: var(--ink);
  background: var(--grad); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.brand:hover { color: var(--ink); }
.nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 24px; list-style: none; margin: 0; padding: 0; }
.nav a {
  color: var(--text); text-decoration: none; font-weight: 500; font-size: .98rem;
  padding: 6px 1px; border-bottom: 2px solid transparent;
}
.nav a:hover { border-bottom-color: var(--line); color: var(--ink); }
.nav a[aria-current="page"] { border-bottom-color: var(--teal); color: var(--ink); }
.nav a.join {
  background: var(--ink); color: #fff; padding: 9px 18px; border-radius: 6px; border: 0;
}
.nav a.join:hover { background: var(--teal-deep); color: #fff; }
.nav a.join[aria-current="page"] { background: var(--teal-deep); }

/* Headings and text */
h1, h2, h3 { font-family: var(--font-display); color: var(--ink); text-wrap: balance; }
h1 {
  font-weight: 600; font-size: clamp(2.05rem, 4.6vw, 3.3rem); line-height: 1.12;
  letter-spacing: -.015em; margin: 0 0 20px;
}
h2 { font-weight: 600; font-size: clamp(1.5rem, 3vw, 2rem); line-height: 1.2; letter-spacing: -.01em; margin: 0 0 10px; }
h3 { font-weight: 600; font-size: 1.15rem; line-height: 1.3; margin: 0; }
.lead { font-size: 1.18rem; max-width: 58ch; margin: 0 0 28px; }
.muted { color: var(--muted); }
.section { padding-block: 56px; }
.section-intro { color: var(--muted); max-width: 62ch; margin: 0 0 28px; }

/* Buttons */
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.btn {
  display: inline-block; padding: 13px 22px; border-radius: 6px; font-weight: 600;
  font-size: 1rem; text-decoration: none; border: 2px solid var(--ink); line-height: 1.2;
}
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: var(--teal-deep); border-color: var(--teal-deep); color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--tint); color: var(--ink); }
.fineprint { margin: 18px 0 0; color: var(--muted); font-size: .95rem; }

/* Home hero */
.hero {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: 40px; align-items: center; padding-block: 56px 48px;
}
.hero-art img { width: 100%; max-width: 540px; margin-inline: auto; }
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; gap: 28px; padding-block: 40px 32px; }
  .hero-art img { max-width: 420px; }
}

/* Open positions */
.roles { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.role {
  display: grid; grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 6px 20px; align-items: center; padding: 22px 0; border-bottom: 1px solid var(--line);
}
.ico {
  width: 44px; height: 44px; display: grid; place-items: center;
  color: var(--teal-deep); background: var(--tint); border-radius: 8px;
}
.ico svg, .learn-ico svg {
  width: 24px; height: 24px; fill: none; stroke: currentColor;
  stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round;
}
.role p { margin: 2px 0 0; color: var(--muted); }
.role .more { font-weight: 600; white-space: nowrap; }
@media (max-width: 640px) {
  .role { grid-template-columns: 44px minmax(0, 1fr); gap: 4px 16px; }
  .role .more { grid-column: 2; }
}

/* What you will work on */
.learn { list-style: none; margin: 0; padding: 0; display: grid; gap: 28px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.learn li { border-top: 2px solid var(--line); padding-top: 18px; }
.learn-ico { color: var(--teal-deep); margin-bottom: 10px; }
.learn h3 { font-size: 1.05rem; margin-bottom: 6px; }
.learn p { margin: 0; color: var(--muted); font-size: .97rem; }
@media (max-width: 900px) { .learn { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .learn { grid-template-columns: 1fr; } }

/* Research teaser band and figure */
.band { background: var(--tint); border-block: 1px solid var(--line); }
.figure {
  margin: 0; background: var(--figure-bg); border: 1px solid var(--line);
  border-radius: 10px; padding: 22px 18px;
}
.figure img { width: 100%; }
@media (max-width: 700px) {
  .figure { overflow-x: auto; padding: 16px 12px; }
  .figure img { width: 680px; max-width: none; }
}
.band .actions { margin-top: 24px; }

/* Call to action */
.cta { background: var(--ink); color: #dfe5f7; }
.cta h2 { color: #fff; }
.cta p { max-width: 58ch; margin: 0 0 18px; }
.cta .email {
  font-family: var(--font-display); font-weight: 600; font-size: 1.25rem; color: #fff;
  text-decoration: underline; text-decoration-color: var(--teal); text-decoration-thickness: 2px;
  text-underline-offset: 6px; overflow-wrap: anywhere;
}
.cta .email:hover { color: #bfeeea; }
.cta .todo { color: #3b3000; }
.cta .btn-ghost { border-color: #fff; color: #fff; }
.cta .btn-ghost:hover { background: rgba(255,255,255,.1); color: #fff; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding-block: 36px; color: var(--muted); font-size: .95rem; }
.foot { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 20px 40px; }
.foot strong { font-family: var(--font-display); color: var(--ink); font-weight: 600; }
.foot p { margin: 4px 0 0; }
@media (max-width: 640px) { .foot { grid-template-columns: 1fr; } }

/* Inner pages */
.page-head { padding-block: 52px 8px; }
.page-head .lead { margin-bottom: 0; }

/* Research steps (a real sequence, drawn like the logo's timeline) */
.steps { list-style: none; margin: 0; padding: 0; }
.step {
  position: relative; display: grid; grid-template-columns: minmax(0, 250px) minmax(0, 1fr);
  gap: 6px 32px; padding: 0 0 34px 38px;
}
.step::before {
  content: ""; position: absolute; left: 0; top: .4em; width: 14px; height: 14px;
  border-radius: 50%; background: var(--dot, var(--ink));
}
.step::after {
  content: ""; position: absolute; left: 6px; top: 1.9em; bottom: -.1em; width: 2px; background: var(--line);
}
.step:last-child { padding-bottom: 0; }
.step:last-child::after { display: none; }
.step p { margin: 0; color: var(--text); max-width: 60ch; }
@media (max-width: 720px) { .step { grid-template-columns: 1fr; } }

.two-col { display: grid; gap: 32px 48px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.two-col h3 { margin-bottom: 6px; }
.two-col p { margin: 0; color: var(--text); }
@media (max-width: 720px) { .two-col { grid-template-columns: 1fr; } }

/* Join Us details */
.role-detail { padding-block: 36px; border-top: 1px solid var(--line); scroll-margin-top: 16px; }
.role-detail header { display: flex; align-items: center; gap: 16px; margin-bottom: 14px; }
.facts { display: grid; grid-template-columns: minmax(0, 170px) minmax(0, 1fr); gap: 10px 28px; margin: 0; }
.facts dt { font-weight: 600; color: var(--ink); }
.facts dd { margin: 0; }
@media (max-width: 640px) { .facts { grid-template-columns: 1fr; gap: 2px; } .facts dd { margin-bottom: 12px; } }

.apply { list-style: none; counter-reset: apply; margin: 0; padding: 0; display: grid; gap: 18px; max-width: 62ch; }
.apply li { counter-increment: apply; display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 14px; align-items: start; }
.apply li::before {
  content: counter(apply); display: grid; place-items: center; width: 36px; height: 36px;
  border-radius: 50%; background: var(--ink); color: #fff; font-family: var(--font-display); font-weight: 600;
}

/* People and publications */
.person { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 32px; align-items: start; }
.photo {
  aspect-ratio: 4 / 5; width: 100%; background: var(--tint); border: 1px solid var(--line);
  border-radius: 8px; display: grid; place-items: center; color: var(--muted); font-size: .9rem;
}
.person h2 { margin-bottom: 2px; }
.person .role-line { color: var(--muted); margin: 0 0 14px; }
.person p { max-width: 62ch; }
@media (max-width: 640px) { .person { grid-template-columns: 1fr; } .photo { max-width: 180px; } }
.pub-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.pub-list li { padding: 18px 0; border-bottom: 1px solid var(--line); max-width: 74ch; }
.pub-list .venue { color: var(--muted); }

/* Marks content that still needs the PI's real information */
.todo { background: #fff3bf; outline: 1px dashed #b89500; padding: 0 .25em; border-radius: 2px; color: #3b3000; }

/* Internship notice */
.notice-band { background: var(--tint); border-block: 1px solid var(--line); }
.notice { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px 32px; align-items: center; padding-block: 32px; }
.notice h2 { margin: 0 0 6px; font-size: 1.4rem; }
.notice p { margin: 0; max-width: 64ch; }
@media (max-width: 720px) { .notice { grid-template-columns: 1fr; } }

/* A sentence that states what the lab values */
.principle {
  font-family: var(--font-display); font-weight: 500; font-size: clamp(1.1rem, 2vw, 1.3rem);
  line-height: 1.5; color: var(--ink); max-width: 50ch; margin: 0 0 32px; text-wrap: balance;
}
.badge {
  display: inline-block; margin-left: 10px; padding: 2px 9px; border-radius: 4px;
  background: var(--teal-deep); color: #fff; font: 600 .75rem/1.5 var(--font-body);
  vertical-align: middle; letter-spacing: .02em;
}

/* Research: approaches that work together (no order) */
.harmony-wrap { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 32px 48px; align-items: center; }
.harmony svg { width: 100%; height: auto; display: block; }
.harmony text { font-family: var(--font-display); font-size: 15px; font-weight: 600; fill: var(--ink); }
.approaches { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.approaches li { display: grid; grid-template-columns: 14px minmax(0, 1fr); gap: 2px 14px; }
.approaches li::before { content: ""; width: 12px; height: 12px; border-radius: 50%; background: var(--dot); margin-top: .5em; }
.approaches h3 { font-size: 1.05rem; }
.approaches p { margin: 0; color: var(--muted); grid-column: 2; }
@media (max-width: 860px) { .harmony-wrap { grid-template-columns: 1fr; } }

/* Contact button on dark bands and wide label column */
.btn-light { background: #fff; color: var(--ink); border-color: #fff; }
.btn-light:hover { background: #dff3f1; border-color: #dff3f1; color: var(--ink); }
.cta .contact-line { margin: 18px 0 0; font-size: .98rem; }
.cta .contact-line a { color: #fff; }
.facts.wide { grid-template-columns: minmax(0, 230px) minmax(0, 1fr); }
@media (max-width: 640px) { .facts.wide { grid-template-columns: 1fr; gap: 2px; } .facts.wide dd { margin-bottom: 14px; } }

/* PI strip on the home page */
.pi-strip { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 24px; align-items: start; margin-top: 20px; }
.pi-strip img { width: 112px; height: 140px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.pi-strip h3 { font-size: 1.2rem; }
.pi-strip p { margin: 4px 0 0; max-width: 64ch; }
@media (max-width: 520px) { .pi-strip { grid-template-columns: 88px minmax(0, 1fr); gap: 16px; } .pi-strip img { width: 88px; height: 110px; } }

.tagline { font-family: var(--font-display); font-weight: 500; font-size: 1.1rem; color: var(--teal-deep); margin: 0 0 6px; }
.paths { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 48px; margin-top: 22px; }
.paths h3 { padding-bottom: 8px; border-bottom: 2px solid var(--line); margin-bottom: 12px; }
.paths ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.paths li span { display: block; color: var(--muted); font-size: .92rem; }
@media (max-width: 720px) { .paths { grid-template-columns: 1fr; } }
.honors { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 8px; max-width: 70ch; }
.pub-list li.featured { padding: 22px 0; }
.pub-list li.featured strong { font-size: 1.12rem; }

.photo { overflow: hidden; }
.photo img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }
.facts.compact { gap: 6px 24px; }
.facts.compact dt { font-weight: 500; color: var(--muted); }
.pub-list .tag { display: inline-block; margin-left: 6px; padding: 0 7px; border-radius: 4px; background: var(--tint); color: var(--ink); font-size: .8rem; font-weight: 600; }
.pub-list strong { color: var(--ink); font-weight: 600; }

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

/* What you will gain */
.gains { list-style: none; margin: 28px 0 0; padding: 0; display: grid; gap: 28px 40px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.gains li { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 14px; align-items: start; }
.gains h3 { margin: 2px 0 4px; font-size: 1.05rem; }
.gains p { margin: 0; color: var(--text); font-size: .95rem; }
@media (max-width: 900px) { .gains { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .gains { grid-template-columns: 1fr; } }

.email-link { font-size: 1.2rem; font-weight: 600; color: var(--teal-dark, #1a7a76); }

.two-col.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 720px) { .two-col.cols-3 { grid-template-columns: 1fr; } }

/* Translational loop */
.loop { margin: 28px 0 0; max-width: 640px; }
.loop svg { width: 100%; height: auto; display: block; }
.loop text { font-family: var(--font-display); font-weight: 600; fill: var(--ink); }
.site-footer .tagline, .site-footer strong + p { color: var(--muted, inherit); }

/* Fixed line breaks on wide screens only */
.wide { max-width: none !important; }
.principle.wide { text-wrap: wrap; }
@media (max-width: 1200px) { .dbr { display: none; } }

/* Footer tagline */
.site-footer .tagline { font-style: italic; }

/* Expandable roles on the Join page */
.rd summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 6px 20px; align-items: center; padding: 22px 0; }
.rd summary::-webkit-details-marker { display: none; }
.rd summary h3 { margin: 0; }
.rd summary p { margin: 2px 0 0; color: var(--muted); }
.rd .more { font-weight: 600; color: var(--teal-dark, #1a7a76); text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
.rd .m-close, .rd[open] .m-open { display: none; }
.rd[open] .m-close { display: inline; }
.rd-body { margin: 0 0 26px 68px; }
.rd-note { margin: 0 0 14px; }
.rd { scroll-margin-top: 16px; }
.roles > li { border-bottom: 1px solid var(--line); }
@media (max-width: 640px) { .rd summary { grid-template-columns: 44px minmax(0, 1fr); gap: 4px 16px; } .rd .more { grid-column: 2; } .rd-body { margin-left: 0; } }

/* CV on the People page */
.cv-block { margin-bottom: 44px; }
.cv-block h2 { font-size: 1.35rem; margin-bottom: 14px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.cv { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 12px 28px; margin: 0; }
.cv dt { color: var(--muted); font-variant-numeric: tabular-nums; }
.cv dd { margin: 0; }
.cv dd strong { color: var(--ink); font-weight: 600; }
.cv .sub { color: var(--muted); font-size: .95rem; }
@media (max-width: 640px) { .cv { grid-template-columns: 1fr; gap: 0; } .cv dd { margin-bottom: 14px; } }

/* Publications by year */
.pub-year { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 8px 28px; margin-bottom: 36px; }
.pub-year h2 { font-size: 1.5rem; margin: 18px 0 0; color: var(--teal-dark, #1a7a76); }
.pub-year .pub-list { max-width: none; }
.pub-list .ptitle { color: var(--ink); font-weight: 600; }
.pub-list .authors { color: var(--text); }
.pub-list .me { font-weight: 700; text-decoration: underline; text-underline-offset: 3px; color: var(--ink); }
.pub-list .journal { display: inline-block; margin-top: 4px; font-family: var(--font-display); font-weight: 600; font-size: 1.02rem; color: var(--teal-dark, #1a7a76); }
.pub-list .cite { color: var(--muted); }
@media (max-width: 640px) { .pub-year { grid-template-columns: 1fr; } .pub-year h2 { margin: 0; } }
.pub-year .pub-list { border-top: 0; }
.pub-year .pub-list li { max-width: none; padding: 16px 0; }
.pub-year .pub-list li:first-child { padding-top: 8px; }
.pub-year .pub-list li:last-child { border-bottom: 0; }
.pub-year { padding-bottom: 28px; border-bottom: 1px solid var(--line); }
.pub-year:last-of-type { border-bottom: 0; }

/* Our work so far */
.work h2 { margin-bottom: 12px; }
.work p { margin: 0; }
.cite-link { color: var(--muted); font-size: .95rem; white-space: normal; }
.asks { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.asks li { position: relative; padding-left: 22px; }
.asks li::before { content: ""; position: absolute; left: 0; top: .6em; width: 9px; height: 9px; border-radius: 50%; background: var(--teal, #2a9d98); }

/* Footer tagline: same size as the address, italic */
.site-footer .tagline { font-family: inherit; font-size: inherit; font-weight: 400; font-style: italic; color: var(--muted); margin: 4px 0 0; }

/* Join page: plain role rows */
.roles > li { border-bottom: 0; }
.role { scroll-margin-top: 16px; }

/* CV toggle on the People page */
.cv-toggle summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 10px; padding: 12px 22px; border: 1.5px solid var(--ink); border-radius: 8px; font-weight: 600; color: var(--ink); }
.cv-toggle summary::-webkit-details-marker { display: none; }
.cv-toggle summary::after { content: ""; width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-2px); transition: transform .2s; }
.cv-toggle[open] summary::after { transform: rotate(-135deg) translateY(-2px); }
.cv-toggle summary:hover { background: var(--tint); }
.cv-toggle .m-close, .cv-toggle[open] .m-open { display: none; }
.cv-toggle[open] .m-close { display: inline; }
.cv-body { margin-top: 32px; }

/* Team placeholders */
.team-slots { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; max-width: 760px; }
.slot { aspect-ratio: 4 / 5; border: 2px dashed #b9c4dc; border-radius: 12px; background: rgba(255,255,255,.55); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: #9aa7c4; text-decoration: none; }
.slot .ico-lg svg { width: 44px; height: 44px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.slot-next { color: var(--teal-deep); border-color: var(--teal); background: #fff; font-family: var(--font-display); }
.slot-next:hover { background: var(--tint); }
.slot-next strong { color: var(--ink); font-weight: 600; font-size: 1rem; }
@media (max-width: 640px) { .team-slots { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Mobile header: menu stays on one line under the logo */
@media (max-width: 640px) {
  .bar { gap: 2px 0; min-height: 0; padding-block: 10px 12px; }
  .nav { flex-wrap: nowrap; justify-content: space-between; width: 100%; gap: 0 10px; }
  .nav a { font-size: .9rem; white-space: nowrap; }
  .nav a.join { padding: 7px 14px; }
}
@media (max-width: 330px) { .nav { flex-wrap: wrap; gap: 4px 14px; } }

/* Korean page: keep words together */
:lang(ko) { word-break: keep-all; }
