@font-face {
  font-family: "Fira Sans";
  src: url("/fonts/3e38d8c01fe97529fbf0.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Fira Sans";
  src: url("/fonts/55e09735e30d8492afac.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Barlow Condensed";
  src: url("/fonts/3787a5a419171630e689.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  --ink: #112331;
  --blue: #237cbd;
  --link: #165e91;
  --sand: #f4f0e8;
  --orange: #f7b267;
  --muted: #4c6272;
  --line: #d8d8cf;
  color: var(--ink);
  background: var(--sand);
  font-family: "Fira Sans", system-ui, sans-serif;
  line-height: 1.6;
}

*, *::before, *::after { box-sizing: border-box; }
body { display: flex; flex-direction: column; min-height: 100vh; margin: 0; }
main { flex: 1; }
h1, h2, h3 { font-family: "Barlow Condensed", "Arial Narrow", sans-serif; line-height: 1; margin: 0; }
p { margin: 0; }
a { color: inherit; text-underline-offset: .24em; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 4px; }
.wrap { width: min(72rem, calc(100% - clamp(2rem, 8vw, 8rem))); margin-inline: auto; }
.skip { position: absolute; z-index: 4; top: .75rem; left: .75rem; padding: .55rem 1rem; background: white; }
.skip:not(:focus) { clip-path: inset(50%); }

.masthead { background: var(--ink); color: white; border-bottom: 1px solid #ffffff32; }
.masthead-inner, .footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.5rem;
}
.wordmark { display: inline-flex; align-items: center; gap: .65rem; font: 700 1.85rem / 1 "Barlow Condensed", sans-serif; text-decoration: none; }
.mark { width: 1.05rem; height: 1.05rem; border: 2px solid currentColor; border-radius: 50%; position: relative; }
.mark::after { content: ""; position: absolute; width: 45%; height: 45%; bottom: 0; right: 0; border-radius: 50%; background: var(--orange); }
.institute { font-size: .9rem; font-weight: 600; text-decoration-thickness: 1px; }
.masthead :focus-visible { outline-color: var(--orange); }

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  color: white;
  background: linear-gradient(115deg, #112331 28%, #173b54 67%, #20577a 100%);
}
.hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  width: clamp(18rem, 45vw, 44rem);
  aspect-ratio: 1;
  top: 50%;
  right: max(-5rem, calc((100vw - 80rem) / 2));
  transform: translateY(-50%);
  border-radius: 50%;
  background: repeating-radial-gradient(circle, #dbeeff39 0 1px, transparent 1px 1.85rem);
  mask-image: linear-gradient(95deg, transparent 2%, black 42%);
}
.hero-inner { padding-block: clamp(3.25rem, 8vw, 7rem) clamp(3.5rem, 8vw, 6.25rem); }
.hero-label { color: #e1eff9; font-size: .875rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.hero h1 { margin-top: .35rem; font-size: clamp(4.2rem, 14vw, 12rem); letter-spacing: -.025em; }
.hero h1 span { color: var(--orange); }

.archive { padding-block: clamp(2rem, 5vw, 4rem) 3.75rem; }
.archive-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 2rem; margin-bottom: 1.5rem; }
.archive-header h2 { font-size: clamp(2.35rem, 5vw, 3.7rem); }
.filters { display: flex; flex-wrap: wrap; gap: .45rem; }
.filters a, .back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: .38rem .94rem;
  border: 1px solid #879ca8;
  border-radius: 2rem;
  font-size: .9rem;
  font-weight: 600;
  text-decoration: none;
}
.filters a[aria-current], .filters a:hover, .back:hover { background: var(--ink); border-color: var(--ink); color: white; }
.empty { border-top: 1px solid var(--line); padding-top: 1.5rem; color: var(--muted); }

.masonry {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
  gap: 24px;
  padding: 0;
  margin: 0;
  list-style: none;
}
.masonry.is-masonry { grid-auto-rows: 1px; row-gap: 0; }
.card { min-width: 0; }
.card-frame {
  position: relative;
  overflow: hidden;
  background: #fffefa;
  border: 1px solid var(--line);
  border-radius: 1.05rem;
  box-shadow: 0 7px 21px #11233109;
  transition: box-shadow .18s, border-color .18s;
}
.card-frame:not(.has-image) { border-top: 4px solid var(--blue); }
.card:nth-child(3n + 2) .card-frame:not(.has-image) { border-top-color: var(--orange); }
.card:nth-child(3n + 3) .card-frame:not(.has-image) { border-top-color: #537286; }
.card-frame:hover, .card-frame:focus-within { box-shadow: 0 12px 28px #11233118; border-color: var(--blue); }
.card-frame:focus-within { outline: 3px solid var(--blue); outline-offset: 3px; }
.card-copy { display: grid; gap: .8rem; padding: 1.3rem 1.45rem 1.5rem; }
.card-image { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.card:nth-child(even) .card-image { aspect-ratio: 16 / 10; }
.card h3 { font-size: clamp(1.8rem, 4vw, 2.55rem); overflow-wrap: anywhere; }
.article-meta { display: flex; flex-wrap: wrap; gap: .25rem .65rem; color: var(--muted); font-size: .875rem; }
.article-meta time + span::before { content: "·"; padding-right: .65rem; }
.excerpt { color: var(--muted); overflow-wrap: anywhere; }
.read-link { justify-self: start; color: var(--link); font-weight: 600; font-size: .9rem; }
.read-link::after { content: ""; position: absolute; inset: 0; }

.article-shell { width: min(48rem, calc(100% - clamp(2rem, 8vw, 8rem))); padding-block: 2rem 4.25rem; }
.article-shell article { margin-block: clamp(1.8rem, 5vw, 3.75rem); }
.article-heading { display: grid; gap: 1rem; margin-bottom: 1.75rem; }
.article-heading h1 { font-size: clamp(2.75rem, 8vw, 6.5rem); overflow-wrap: anywhere; }
.article-image { border-radius: 1rem; margin-bottom: 2rem; max-height: 38rem; object-fit: contain; }
.prose { max-width: 66ch; font-size: 1.125rem; line-height: 1.75; overflow-wrap: anywhere; }
.prose > * { margin: 0 0 1.2em; }
.prose h2, .attachments h2 { font-size: 2.2rem; }
.prose h3 { font-size: 1.7rem; }
.prose pre { overflow: auto; background: #e7e7e0; padding: 1rem; border-radius: .5rem; }
.prose table { display: block; overflow-x: auto; border-collapse: collapse; }
.prose th, .prose td { border: 1px solid #879ca8; padding: .35em .6em; }
.prose a, .attachments a { color: var(--link); }
.prose blockquote { border-left: 3px solid var(--blue); padding-left: 1rem; }
.attachments, .article-end { border-top: 1px solid var(--line); padding-top: 1.4rem; }
.attachments { margin-top: 2.25rem; }
.footer { border-top: 1px solid var(--line); }
.footer .wordmark { font-size: 1.45rem; }

@media (max-width: 55rem) {
  .masonry { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 37.5rem) {
  .masonry { grid-template-columns: minmax(0, 1fr); }
  .hero::before { opacity: .65; }
}
@media (prefers-reduced-motion: reduce) {
  .card-frame { transition: none; }
}
