:root {
  color-scheme: light;
  --paper: #f7f9f8;
  --white: #fff;
  --ink: #14201e;
  --muted: #4d5e5a;
  --accent: #005949;
  --line: #cbd6d2;
  --tint: #e8efec;
  --page-width: 70rem;
  --side: clamp(1rem, 4vw, 3rem);
  --sans: system-ui, "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Consolas, monospace;
}

* {
  box-sizing: border-box;
}

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

::selection {
  color: var(--ink);
  background: #c2e9db;
}

a {
  color: var(--accent);
  text-underline-offset: .2em;
  text-decoration-thickness: 1px;
}

a:hover {
  text-decoration-thickness: .12em;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

h1, h2, h3, h4, h5, h6, p {
  margin: 0;
}

.wrap {
  width: min(var(--page-width), calc(100% - var(--side) * 2));
  margin-inline: auto;
}

.skip {
  position: fixed;
  z-index: 1;
  inset: .75rem auto auto .75rem;
  padding: .75rem 1rem;
  color: var(--white);
  background: var(--accent);
  transform: translateY(-200%);
}

.skip:focus {
  transform: none;
}

.masthead {
  border-top: .25rem solid var(--accent);
  border-bottom: 1px solid var(--line);
}

.masthead-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.25rem;
}

.wordmark, .masthead nav a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  text-decoration: none;
}

.wordmark:hover, .masthead nav a:hover {
  text-decoration: underline;
}

.wordmark {
  gap: .25em;
  color: var(--ink);
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -.055em;
  white-space: nowrap;
}

.wordmark span {
  color: var(--accent);
}

.masthead nav {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(.5rem, 3vw, 1.6rem);
}

.masthead nav a {
  color: var(--muted);
  font-size: .875rem;
  font-weight: 650;
}

.home-intro {
  display: flex;
  align-items: end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .75rem 2rem;
  padding-block: clamp(2.5rem, 8vw, 5rem) 1.5rem;
  border-bottom: 2px solid var(--ink);
}

.home-intro h1 {
  font-size: clamp(2.9rem, 8.5vw, 6.15rem);
  font-weight: 830;
  line-height: 1.05;
  letter-spacing: -.075em;
  word-break: keep-all;
}

.dateline, .entry-date, .article-meta {
  color: var(--muted);
  font-size: .875rem;
  font-variant-numeric: tabular-nums;
}

.latest, .archive {
  padding-block: 1.5rem clamp(2rem, 6vw, 4rem);
}

.latest h2, .archive h2 {
  font-size: 1.25rem;
  line-height: 1.35;
  letter-spacing: -.035em;
}

.current-list, .archive-list {
  list-style-type: "";
  padding: 0;
  margin: 0;
}

.current-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 1.25rem;
  border-block: 1px solid var(--line);
}

.current-entry {
  display: flex;
  flex-direction: column;
  gap: .65rem;
  min-width: 0;
  padding: clamp(1rem, 3vw, 1.6rem);
  background: var(--white);
}

.current-entry + .current-entry {
  border-inline-start: 1px solid var(--line);
}

.current-entry h3 {
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  line-height: 1.4;
  letter-spacing: -.035em;
}

.current-entry h3 a, .archive-entry a {
  color: var(--ink);
  text-decoration-color: var(--line);
}

.current-entry h3 a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
}

.current-entry h3 a:hover, .archive-entry a:hover {
  color: var(--accent);
  text-decoration-color: currentColor;
}

.entry-category {
  color: var(--accent);
  font-size: .875rem;
  font-weight: 750;
}

.awaiting, .entry-description {
  color: var(--muted);
}

.entry-date {
  margin-top: auto;
  padding-top: .3rem;
}

.archive {
  border-top: 2px solid var(--ink);
}

.archive > .awaiting {
  margin-top: 1rem;
}

.archive-day {
  display: grid;
  grid-template-columns: minmax(10rem, 1.25fr) minmax(0, 4fr);
  gap: .4rem 1.5rem;
  padding-block: .6rem;
  border-bottom: 1px solid var(--line);
}

.archive-day:first-of-type {
  margin-top: .65rem;
}

.archive-day h3 {
  padding-top: .6rem;
  color: var(--muted);
  font-size: .9375rem;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.archive-entry {
  display: grid;
  grid-template-columns: minmax(9rem, 1fr) minmax(0, 3fr);
  align-items: baseline;
  gap: .5rem 1rem;
}

.archive-entry a {
  display: block;
  min-height: 2.75rem;
  padding-block: .55rem;
}

.article-page {
  max-width: 52rem;
  padding-block: clamp(2rem, 7vw, 4rem) clamp(2rem, 6vw, 4rem);
}

.article-head {
  border-bottom: 2px solid var(--ink);
  padding-bottom: 1.25rem;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .2rem 1rem;
  margin-bottom: .8rem;
}

.article-head h1 {
  font-size: clamp(2rem, 5vw, 3.75rem);
  line-height: 1.15;
  letter-spacing: -.055em;
}

.prose {
  padding-block: 1.5rem;
  font-size: clamp(1rem, 2vw, 1.08rem);
}

.prose > * + * {
  margin-top: 1em;
}

.prose h2, .prose h3, .prose h4, .prose h5, .prose h6 {
  margin-top: 1.6em;
  line-height: 1.35;
  letter-spacing: -.025em;
}

.prose h2 {
  font-size: 1.5em;
}

.prose h3 {
  font-size: 1.25em;
}

.prose > :first-child {
  margin-top: 0;
}

.prose ul, .prose ol {
  padding-inline-start: 1.5em;
}

.prose li + li {
  margin-top: .25em;
}

.prose li > p + p {
  margin-top: .5em;
}

.prose blockquote {
  margin-inline: 0;
  padding: .65em .9em;
  border-inline-start: .2em solid var(--accent);
  color: var(--muted);
  background: var(--tint);
}

.prose pre {
  overflow: auto;
  padding: .85em 1em;
  background: var(--tint);
}

.prose code {
  padding: .08em .2em;
  background: var(--tint);
  font: .9em var(--mono);
}

.prose pre code {
  padding: 0;
  background: none;
}

.prose table {
  display: block;
  max-width: 100%;
  width: fit-content;
  overflow-x: auto;
  border-collapse: collapse;
  font-size: .95em;
}

.prose th, .prose td {
  padding: .45em .65em;
  min-width: 7em;
  border: 1px solid var(--line);
  text-align: start;
  vertical-align: top;
}

.prose th {
  background: var(--tint);
}

.prose img {
  display: block;
  max-width: 100%;
  height: auto;
}

.prose hr {
  border: 0;
  border-top: 1px solid var(--line);
}

.article-back {
  border-top: 1px solid var(--line);
  padding-top: .25rem;
}

.article-back a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
}

.site-footer {
  padding-block: 1.25rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .875rem;
}

@media (max-width: 46rem) {
  .current-list, .archive-day {
    grid-template-columns: minmax(0, 1fr);
  }

  .current-entry + .current-entry {
    border-inline-start: 0;
    border-top: 1px solid var(--line);
  }

  .archive-day h3 {
    padding-top: .25rem;
  }
}

@media (max-width: 30rem) {
  .archive-entry {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  .archive-entry a {
    padding-block-start: .2rem;
  }
}
