:root {
  color-scheme: light;
  --paper: #faf9f5;
  --ink: #102d40;
  --cobalt: #254e87;
  --muted: #4c5d68;
  --rule: #c6cdc9;
  --wash: #edf1f3;
  --focus: #1a5ead;
  --serif: 'Baskerville', 'Iowan Old Style', Georgia, 'AppleMyungjo', 'Batang', serif;
  --sans: 'Helvetica Neue', 'Arial', 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  --gutter: clamp(1rem, 4.3vw, 4rem);
  --width: 78rem;
}

* { box-sizing: border-box; }

html {
  scroll-padding-block-start: 1.25rem;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 1rem/1.55 var(--sans);
}

h1, h2, h3, p, figure { margin: 0; }
h1, h2, h3 { overflow-wrap: anywhere; }
img { max-inline-size: 100%; block-size: auto; }
input, button { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

a {
  color: var(--cobalt);
  text-decoration-thickness: .065em;
  text-underline-offset: .2em;
}

a:hover { text-decoration-thickness: .12em; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
::selection { color: var(--ink); background-color: #d6e2ed; }

.skip {
  position: absolute;
  inset: .5rem auto auto .5rem;
  z-index: 1;
  transform: translateY(-175%);
  background: var(--ink);
  color: white;
  padding: .7rem 1rem;
}

.skip:focus { transform: none; }

.wide, .reading, .mast-inner, .footer {
  width: calc(100% - 2 * var(--gutter));
  max-width: var(--width);
  margin-inline: auto;
}

.reading { max-width: 49rem; }
main:focus { outline: none; }

/* Identity and navigation */
.masthead {
  border-block-start: 4px solid var(--ink);
  border-block-end: 1px solid var(--rule);
}

.mast-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .5rem 1.25rem;
  padding-block: 1rem;
}

.identity {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: .55rem;
  color: var(--ink);
  text-decoration: none;
}

.identity .brand-lockup {
  display: block;
  width: clamp(11.5rem, 18vw, 14.35rem);
  height: auto;
  aspect-ratio: 784 / 124;
}

.masthead nav {
  display: flex;
  flex-wrap: wrap;
  gap: .25rem clamp(.5rem, 2.2vw, 2.2rem);
  align-items: center;
}

.masthead nav a, .article-tools a, .text-link, .back-link, .jump-ko {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  color: var(--ink);
  font-size: .94rem;
  font-weight: 600;
  text-decoration: none;
}

.masthead nav a:hover, .masthead nav a[aria-current="page"],
.article-tools a:hover, .text-link:hover, .back-link:hover, .jump-ko:hover {
  text-decoration: underline;
  text-underline-offset: .3em;
}

.masthead .nav-telegram {
  min-height: 44px;
  padding: .4rem .95rem;
  border: 1px solid var(--ink);
}

.masthead .nav-telegram:hover {
  color: white;
  background: var(--ink);
  text-decoration: none;
}

/* Front page */
.hero {
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(0, 1.08fr);
  gap: clamp(2rem, 4.5vw, 5rem);
  align-items: center;
  padding-block: clamp(2.15rem, 4.2vw, 4.5rem);
}

.hero-copy { min-width: 0; }

.eyebrow {
  color: var(--cobalt);
  font-size: .875rem;
  font-weight: 700;
  letter-spacing: .07em;
  line-height: 1.45;
  text-transform: uppercase;
}

.eyebrow time, .eyebrow span {
  color: var(--muted);
  font-weight: 500;
  letter-spacing: .025em;
}

.hero h1, .page-intro h1 {
  font: 500 clamp(2.75rem, 5.2vw, 5.25rem)/1.03 var(--serif);
  letter-spacing: -.045em;
  margin: .7rem 0 1rem;
}

.hero h1 em, .page-intro h1 em { color: var(--cobalt); }
.hero-deck, .page-intro > p:not(.eyebrow) {
  max-width: 49ch;
  color: var(--muted);
  font-size: clamp(1.05rem, 1.4vw, 1.25rem);
  line-height: 1.55;
}

.button, .cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: .65rem 1.15rem;
  background: var(--ink);
  border: 1px solid var(--ink);
  color: white;
  text-decoration: none;
  font: 650 .94rem/1.4 var(--sans);
}

.button:hover, .cta:hover { background: var(--cobalt); border-color: var(--cobalt); }
.hero-copy .button { margin-block-start: 1.4rem; }

.hero-meta {
  color: var(--muted);
  margin-top: .8rem;
  font-size: .875rem;
}

.hero-picture {
  position: relative;
  margin: 0;
  width: 100%;
}

.hero-picture img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 2;
  height: auto;
  object-fit: cover;
  background: var(--wash);
}

.hero-picture figcaption {
  margin-top: .4rem;
  color: var(--muted);
  font-size: .8125rem;
}

.research-section {
  padding-block: clamp(1.6rem, 3vw, 2.8rem) clamp(2rem, 3.8vw, 4rem);
  border-top: 2px solid var(--ink);
}

.section-head, .closing {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem 2rem;
  flex-wrap: wrap;
}

.section-head h2, .closing h2 {
  font: 500 clamp(2rem, 3.85vw, 3.6rem)/1.08 var(--serif);
  letter-spacing: -.035em;
}

.section-head .text-link, .jump-ko, .article-tools .jump-ko { color: var(--cobalt); }
.section-head .eyebrow { margin-bottom: .4rem; }
.section-caption { margin-block: .6rem 1rem; color: var(--muted); }
.featured-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 1.35rem;
  border-top: 1px solid var(--rule);
}

.research-entry { min-width: 0; }
.featured-list .research-entry { padding: 1.25rem 1.45rem .5rem; }
.featured-list .research-entry:first-child { padding-left: 0; }
.featured-list .research-entry + .research-entry { border-left: 1px solid var(--rule); }
.featured-list .research-entry:last-child { padding-right: 0; }

.entry-content h2, .entry-content h3 {
  margin: .55rem 0;
  font: 500 clamp(1.55rem, 2.15vw, 2.2rem)/1.18 var(--serif);
  letter-spacing: -.025em;
}

.entry-content h2 a, .entry-content h3 a {
  color: inherit;
  text-decoration: none;
}
.entry-content h2 a:hover, .entry-content h3 a:hover { text-decoration: underline; }
.entry-content > p:not(.eyebrow) { max-width: 67ch; color: var(--muted); }
.entry-content .eyebrow { text-transform: none; letter-spacing: .02em; }
.entry-content time { font-variant-numeric: tabular-nums; }

.closing {
  padding: clamp(1.5rem, 3.6vw, 3.5rem);
  margin-block: 0 clamp(2.5rem, 5vw, 5rem);
  background: var(--ink);
  color: var(--paper);
}

.closing > div { max-width: 48rem; }
.closing p { color: #d5e1e6; }
.closing h2 { margin-block: .2rem .55rem; }
.closing .button { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.closing .button:hover { background: #d9e5ed; }
.closing a:focus-visible { outline-color: white; }

/* Library */
.page-intro { max-width: 52rem; padding-block: clamp(2.5rem, 6vw, 5.5rem) 1.9rem; }
.page-intro h1 { margin-block: .55rem .85rem; }
.search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .35rem 1.2rem;
  align-items: end;
  padding-block: 1.35rem;
  border-block: 1px solid var(--rule);
}
.search-row label { grid-column: 1 / -1; font-size: .94rem; font-weight: 650; }
.search-box { display: flex; max-width: 35rem; align-items: stretch; gap: .5rem; }
.search-row input {
  min-width: 0;
  width: 100%;
  min-height: 44px;
  padding: .65rem .8rem;
  background-color: white;
  border: 1px solid #6f808a;
  border-radius: 0;
  color: var(--ink);
}
.search-row input::placeholder { color: #596b76; opacity: 1; }
.search-box button {
  min-height: 44px;
  min-width: 44px;
  padding-inline: .7rem;
  border: 1px solid var(--rule);
  background: transparent;
  color: var(--cobalt);
  font-weight: 600;
}
.search-box button:hover { border-color: var(--cobalt); }
#search-status { color: var(--muted); font-size: .94rem; }
.library-list { margin-bottom: 3.5rem; }
.library-list .research-entry { border-bottom: 1px solid var(--rule); padding-block: 1.25rem 1.5rem; }
.library-list .entry-content { max-width: 56rem; }
#no-results { padding-block: 1rem 3rem; color: var(--muted); }

/* Reading surfaces */
.article-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .25rem 1rem;
  margin-top: 1.2rem;
}
.reading > .back-link { margin-top: 1rem; }
.reading { overflow-wrap: anywhere; }

.article {
  padding-top: 1rem;
  font: 1.125rem/1.75 var(--serif);
}

.article h1 {
  margin-bottom: .7rem;
  font: 500 clamp(2.3rem, 4.7vw, 4.4rem)/1.07 var(--serif);
  letter-spacing: -.04em;
}

.article h2, .about-copy h2 {
  font: 500 clamp(1.65rem, 3vw, 2.55rem)/1.18 var(--serif);
  letter-spacing: -.025em;
  margin: 2rem 0 .75rem;
}

.article h3 { font: 550 1.4rem/1.3 var(--serif); margin: 1.6rem 0 .55rem; }
.article h4, .article h5 { font: 650 1.06rem/1.4 var(--sans); margin: 1.4rem 0 .5rem; }
.article p + p, .article p + ul, .article p + ol { margin-top: .9rem; }
.article li + li { margin-top: .38rem; }
.article ul, .article ol { padding-inline-start: 1.6rem; }
.article code, .article pre { font-size: .92em; background: var(--wash); }
.article pre { padding: .8rem; white-space: pre-wrap; }
.article blockquote { margin-inline: 0; padding-inline-start: 1rem; border-left: 3px solid var(--rule); }
.article img { display: block; max-width: 100%; height: auto; margin: 1.5rem auto; }
.article hr { border: none; border-top: 1px solid var(--rule); margin-block: 2.2rem; }
.article .meta { font: .94rem/1.55 var(--sans); color: var(--muted); }
.article .scope-note {
  padding: 1rem 1.2rem;
  margin: 1.35rem 0 1.7rem;
  background: var(--wash);
  border-inline-start: 3px solid var(--cobalt);
  font: 1rem/1.55 var(--sans);
}
.scope-note strong { display: block; margin-bottom: .3rem; }
.article .note { margin-block: 1.4rem; font: .94rem/1.55 var(--sans); color: var(--muted); }
.article .cta { margin-block: 1.5rem .5rem; }
.article .sources, .article [lang="ko"] { font-family: var(--sans); }
.article table { width: 100%; table-layout: fixed; border-collapse: collapse; font: 1rem/1.5 var(--sans); }
.article td, .article th { padding: .5rem; border: 1px solid var(--rule); text-align: start; }
.bottom-back {
  display: flex;
  margin-block: 2rem 2.5rem;
  padding-block: 1rem;
  border-top: 1px solid var(--rule);
}
.about-copy { padding-bottom: 3rem; font-size: 1.075rem; }
.about-copy p { max-width: 69ch; line-height: 1.7; }
.about-copy .button { margin-top: 1.25rem; }
.korean-note { border-top: 1px solid var(--rule); margin-top: 2rem; }
:lang(ko) { line-break: auto; }

/* Colophon */
.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: start;
  gap: .75rem 2rem;
  border-top: 1px solid var(--ink);
  padding-block: 1.6rem 2.5rem;
  color: var(--muted);
  font-size: .94rem;
}
.footer-name { color: var(--ink); font-size: 1.05rem; font-weight: 750; letter-spacing: -.015em; text-decoration: none; }
.footer p { max-width: 76ch; }
.footer .legal { flex-basis: 100%; max-width: 100%; font-size: .875rem; }
.footer nav, .footer > div:nth-child(2) { display: flex; flex-wrap: wrap; gap: .35rem 1.2rem; align-items: center; }
.footer a { display: inline-flex; align-items: center; min-height: 44px; }

@media (max-width: 51rem) {
  .hero { grid-template-columns: minmax(0, 1fr) minmax(0, .95fr); gap: 1.6rem; }
  .featured-list .research-entry { padding-inline: .9rem; }
}

@media (max-width: 43rem) {
  .mast-inner { gap: .3rem .9rem; padding-block: .6rem; }
  .identity .brand-lockup { width: 11rem; }
  .masthead nav { gap: .15rem .8rem; }
  .masthead nav a { font-size: .9rem; }
  .masthead .nav-telegram { padding-inline: .65rem; }
  .hero { grid-template-columns: minmax(0, 1fr); gap: 1.4rem; }
  .hero h1 { font-size: clamp(2.55rem, 10.5vw, 3.75rem); }
  .hero-picture img { aspect-ratio: 16 / 10; }
  .featured-list { grid-template-columns: minmax(0, 1fr); margin-top: .8rem; }
  .featured-list .research-entry { padding: 1.1rem 0; }
  .featured-list .research-entry + .research-entry { border-left: 0; border-top: 1px solid var(--rule); }
  .search-row { grid-template-columns: minmax(0, 1fr); }
  #search-status { margin-top: .3rem; }
  .page-intro { padding-block: 2.2rem 1.15rem; }
  .article { font-size: 1.075rem; }
  .section-head { align-items: baseline; gap: .25rem 1rem; }
  .closing { align-items: flex-start; flex-direction: column; }
  .footer { gap: .5rem 1rem; }
}

@media (max-width: 29rem) {
  .mast-inner { flex-direction: column; align-items: flex-start; gap: 0; }
  .masthead nav { width: 100%; justify-content: space-between; }
  .masthead .nav-telegram { border: 0; padding-inline: .15rem; }
}

@media (prefers-reduced-motion: no-preference) {
  .button, .nav-telegram, .cta { transition: background-color .13s, color .13s; }
}

@media print {
  body { background: white; color: black; }
  .masthead nav, .article-tools, .back-link, .article .cta, .closing, .search-row, .footer nav { display: none; }
  .mast-inner, .wide, .reading, .footer { width: 100%; max-width: none; }
  .masthead { border-top: 0; }
  .article { font: 11pt/1.5 Georgia, serif; }
  .article h1 { font-size: 28pt; }
  .article a { color: black; }
  .scope-note, figure, img { break-inside: avoid; }
}
