@font-face {
  font-family: Asul;
  src: url("./assets/Asul-Regular.ttf") format("truetype");
  font-display: swap;
}

:root {
  color: #234541;
  background: #f7f3e7;
  font: 100%/1.65 system-ui, sans-serif;
  --muted: #4b6259;
  --rule: #c7ccbc;
  --link: #276045;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }

.wrap {
  width: min(66rem, 100% - 2 * clamp(1.25rem, 5vw, 3rem));
  margin-inline: auto;
}

a {
  color: var(--link);
  text-underline-offset: 0.24em;
  overflow-wrap: anywhere;
}

a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--link); outline-offset: 4px; }

.site-header { border-bottom: 1px solid var(--rule); }

.site-header .wrap, .hero .wrap, .site-footer .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand { font: 1.25rem Asul, Georgia, serif; }
.languages { display: flex; flex-wrap: wrap; column-gap: 1rem; font-size: 0.875rem; }
.languages > * { display: inline-flex; align-items: center; min-height: 2.75rem; }
.languages [aria-current] { font-weight: 700; }

.hero {
  background: #e6ebd8;
  border-bottom: 1px solid var(--rule);
}

.hero .wrap { padding-block: clamp(1.75rem, 6vw, 4rem); }
.hero img { width: clamp(4.25rem, 15vw, 9rem); height: auto; flex: none; }
h1, h2 { font-family: Asul, Georgia, serif; font-weight: 400; line-height: 1.13; }
h1 { margin: 0; font-size: clamp(2.125rem, 6vw, 4.25rem); }
.updated { margin: 0.7rem 0 0; color: var(--muted); font-size: 0.9rem; }

.reading {
  display: grid;
  grid-template-columns: minmax(9.5rem, 1fr) minmax(0, 3.5fr);
  align-items: start;
  gap: clamp(1.5rem, 5vw, 4.5rem);
  padding-block: clamp(1.75rem, 5vw, 3.75rem);
}

.contents { position: sticky; top: 1.25rem; font-size: 0.9rem; }
.contents p { margin: 0 0 0.375rem; font-weight: 700; }
.contents ul { list-style: none; margin: 0; padding: 0; }
.contents a { display: block; padding-block: 0.625rem; }
article { max-width: 66ch; min-width: 0; }
article > p:first-child { margin: 0; font-size: 1.125rem; }
section { margin-top: 1.75rem; padding-top: 1.5rem; border-top: 1px solid var(--rule); scroll-margin-top: 1rem; }
h2 { margin: 0 0 0.75rem; font-size: clamp(1.55rem, 3vw, 2rem); }
section p, section ul { margin: 0.75rem 0 0; }
section ul { padding-inline-start: 1.25rem; }
section li + li { margin-top: 0.375rem; }

.site-footer { border-top: 1px solid var(--rule); font-size: 0.875rem; }
.site-footer .wrap { padding-block: 0.5rem; }
.site-footer a { display: inline-flex; align-items: center; min-height: 2.75rem; }

.skip-link { position: absolute; top: 0.5rem; left: 1rem; z-index: 1; padding: 0.5rem; background: #f7f3e7; }
.skip-link:not(:focus) { clip-path: inset(50%); }

@media (max-width: 43rem) {
  .reading { grid-template-columns: minmax(0, 1fr); }
  .contents { position: static; }
  .contents ul { display: flex; flex-wrap: wrap; column-gap: 1.25rem; }
}

@media (max-width: 23rem) {
  .site-header .wrap { flex-wrap: wrap; column-gap: 1rem; row-gap: 0; padding-block-start: 0.375rem; }
  .hero .wrap { gap: 0.625rem; }
  h1 { overflow-wrap: anywhere; }
}
