:root {
  color-scheme: dark;
  --background: #191b1e;
  --card: #23262a;
  --tint: #202327;
  --ink: #f1f2ed;
  --muted: #b9c0c1;
  --line: #3f4449;
  --control-line: #747d80;
  --accent: #d3e9a3;
  --accent-ink: #21271d;
  --selected: #303b2e;
  --caution: #ecc587;
  --display: Georgia, 'Times New Roman', serif;
  --edge: clamp(1rem, 4vw, 3.25rem);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--background);
  color: var(--ink);
  font-synthesis: none;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }
button, input { font: inherit; }
a { color: inherit; }
button { color: inherit; }

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

.shell {
  width: min(calc(100% - var(--edge) * 2), 71.25rem);
  margin-inline: auto;
}

.visually-hidden, .skip-link:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link:focus {
  position: absolute;
  z-index: 2;
  left: var(--edge);
  top: 0.75rem;
  padding: 0.7rem 0.9rem;
  background: var(--accent);
  border: 1px solid var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
}

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

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

.wordmark {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  gap: 0.65rem;
  font-weight: 750;
  font-size: 0.98rem;
  letter-spacing: -0.022em;
  text-decoration: none;
}

.wordmark-icon {
  display: grid;
  grid-template-columns: repeat(2, 0.32rem);
  grid-template-rows: repeat(2, 0.32rem);
  place-content: center;
  gap: 0.13rem;
  width: 1.8rem;
  height: 1.8rem;
  border-radius: 0.2rem;
  background: var(--card);
}

.wordmark-icon i { background: var(--muted); }
.wordmark-icon i:last-child { background: var(--accent); }

.jump-link {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.85rem;
  font-weight: 700;
  text-underline-offset: 0.24em;
  text-decoration-color: transparent;
}

.jump-link:hover { text-decoration-color: currentColor; }
.jump-link span { font-size: 1rem; }

.intro {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  align-items: center;
  gap: clamp(2rem, 7vw, 6.5rem);
  padding-block: clamp(2.6rem, 5vw, 4.5rem);
}

.intro-copy h1 {
  margin: -0.12em 0 0;
  font: 400 clamp(5rem, 9.9vw, 8.55rem) / 0.84 var(--display);
  letter-spacing: -0.08em;
}

.intro-copy em {
  display: inline-block;
  padding-right: 0.07em;
  letter-spacing: -0.083em;
}

.intro-copy p {
  max-width: 28ch;
  margin: 1.55rem 0 0;
  color: var(--muted);
  font-size: clamp(1.03rem, 1.65vw, 1.27rem);
  line-height: 1.5;
  text-wrap: pretty;
}

.feature {
  display: block;
  min-width: 0;
  border: 1px solid #464e49;
  background: #202b25;
  border-radius: 0.36rem;
  overflow: hidden;
  box-shadow: 0.35rem 0.35rem 0 #101214;
  text-decoration: none;
}

.feature img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1470 / 780;
  object-fit: cover;
}

.feature-caption {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 3.3rem;
  gap: 0.75rem;
  padding: 0.65rem 0.95rem;
  background: #272d29;
  font-size: 0.93rem;
  font-weight: 750;
  transition: background 150ms ease;
}

.feature:hover .feature-caption { background: #30392e; }
.feature-action { display: inline-flex; align-items: center; gap: 0.45rem; color: var(--accent); }
.feature-action span { font-size: 1.14rem; }

.directory {
  border-top: 1px solid var(--control-line);
  padding-top: clamp(1.35rem, 2.7vw, 2rem);
}

.directory-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 0.8rem 1.5rem;
}

.directory-heading h2 {
  margin: 0;
  font: 400 clamp(2.28rem, 4.8vw, 3.5rem) / 1.06 var(--display);
  letter-spacing: -0.055em;
  scroll-margin-top: 1rem;
}

.search {
  position: relative;
  width: min(100%, 19rem);
}

.search::before, .search::after {
  content: '';
  position: absolute;
  left: 0.9rem;
  top: 50%;
  pointer-events: none;
  color: var(--muted);
}

.search::before {
  transform: translateY(-62%);
  width: 0.67rem;
  height: 0.67rem;
  border: 1.6px solid currentColor;
  border-radius: 50%;
}

.search::after {
  transform: translate(0.48rem, 0.2rem) rotate(45deg);
  width: 0.35rem;
  height: 1.5px;
  border-radius: 1ex;
  background: currentColor;
}

.search input {
  width: 100%;
  min-height: 2.8rem;
  border: 1px solid var(--control-line);
  border-radius: 0.28rem;
  padding: 0.55rem 0.65rem 0.55rem 2.25rem;
  background: var(--card);
  color: var(--ink);
  font-size: 1rem;
}

.search input::placeholder { color: var(--muted); opacity: 1; }

.project-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.55rem 1rem;
  flex-wrap: wrap;
  margin-top: 1.2rem;
  margin-bottom: 1.2rem;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.filters button, .no-projects button {
  min-height: 2.6rem;
  padding: 0.4rem 0.8rem;
  border: 1px solid var(--control-line);
  border-radius: 0.23rem;
  background: transparent;
  cursor: pointer;
  font-size: 0.84rem;
  font-weight: 650;
}

.filters button:hover, .no-projects button:hover { background: var(--card); }
.filters button[aria-pressed="true"] { border-color: #93a681; background: var(--selected); color: var(--accent); }

#project-count {
  margin: 0;
  color: var(--muted);
  font-size: 0.81rem;
  font-variant-numeric: tabular-nums;
}

.project-section { margin-top: 1.75rem; }
.project-section + .project-section { margin-top: 2.6rem; }

.project-section h3 {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin: 0 0 0.8rem;
  font-size: 1.15rem;
  font-weight: 740;
  letter-spacing: -0.028em;
}

.project-section h3::after {
  content: '';
  flex: 1;
  border-top: 1px solid var(--line);
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.7rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.project-grid li { display: flex; min-width: 0; }

.project-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.52rem;
  width: 100%;
  min-height: 9.35rem;
  border: 1px solid var(--line);
  border-radius: 0.3rem;
  padding: 0.95rem 1rem 0.85rem;
  background: var(--card);
  text-decoration: none;
}

a.project-card { transition: background 150ms ease, border-color 150ms ease; }
a.project-card:hover, a.project-card:focus-visible { border-color: #879878; background: #29302b; }

.project-card h4 {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.25;
  font-weight: 750;
  letter-spacing: -0.023em;
  overflow-wrap: anywhere;
}

a.project-card h4 { padding-right: 1.35rem; }
.project-card h4 .edition {
  display: block;
  margin-top: 0.23rem;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 650;
  letter-spacing: 0;
}

.project-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
  text-wrap: pretty;
}

.project-arrow {
  position: absolute;
  top: 0.88rem;
  right: 0.95rem;
  font-size: 1.1rem;
  line-height: 1;
  color: var(--accent);
}

.project-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.24rem 0.45rem;
  margin-top: auto;
  padding-top: 0.32rem;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 650;
  line-height: 1.35;
}

.project-availability { color: var(--caution); }
.project-card.upcoming { background: var(--tint); }

.no-projects {
  padding: 1.6rem;
  border: 1px dashed var(--control-line);
  border-radius: 0.3rem;
}

.no-projects p { margin: 0 0 0.8rem; }

.site-footer {
  border-top: 1px solid var(--line);
  margin-top: clamp(2.8rem, 7vw, 4.7rem);
  color: var(--muted);
  font-size: 0.85rem;
}

@media (max-width: 54rem) {
  .intro { gap: 1.6rem; }
  .intro-copy h1 { font-size: clamp(4.5rem, 10.8vw, 6rem); }
  .project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 39rem) {
  .masthead-inner, .site-footer { min-height: 3.7rem; }
  .intro { grid-template-columns: 1fr; gap: 1.55rem; padding-block: 2.35rem 2.05rem; }
  .intro-copy h1 { font-size: clamp(4.75rem, 15.4vw, 6.1rem); }
  .intro-copy p { margin-top: 1.2rem; max-width: 32ch; }
  .directory-heading { align-items: stretch; flex-direction: column; }
  .search { width: 100%; }
  .project-controls { margin-top: 0.85rem; }
  .filters button { min-height: 2.75rem; }
}

@media (max-width: 30rem) {
  .project-grid { grid-template-columns: 1fr; }
  .project-card { min-height: 0; }
  .project-section + .project-section { margin-top: 2rem; }
}

@media (prefers-reduced-motion: reduce) {
  .feature-caption, a.project-card { transition: none; }
}
