:root {
  --paper: #efe7d7;
  --paper-light: #faf6ec;
  --ink: #0d1117;
  --muted: #67635c;
  --accent: #aa3f32;
  --blue: #2d4fd7;
  --acid: #dcefb2;
  --line: rgba(13, 17, 23, 0.22);
}

[data-theme="moon"] {
  color-scheme: dark;
  --paper: #090d14;
  --paper-light: #151d2a;
  --ink: #f4efe6;
  --muted: #aab4c3;
  --accent: #e06a56;
  --blue: #8297ff;
  --acid: #cfe49b;
  --line: rgba(214, 224, 238, 0.2);
}

[data-theme="moon"] body {
  background:
    radial-gradient(circle at 12% 2%, rgba(130, 151, 255, 0.14), transparent 31rem),
    radial-gradient(circle at 88% 22%, rgba(224, 106, 86, 0.08), transparent 28rem),
    linear-gradient(rgba(221, 229, 241, 0.032) 1px, transparent 1px),
    linear-gradient(90deg, rgba(221, 229, 241, 0.032) 1px, transparent 1px),
    var(--paper);
  background-size: auto, auto, 32px 32px, 32px 32px, auto;
}

[data-theme="moon"] .directory-brand span { background: #f4efe6; color: #090d14; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background:
    linear-gradient(rgba(120, 105, 82, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120, 105, 82, 0.045) 1px, transparent 1px),
    var(--paper);
  background-size: 32px 32px;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  margin: 0;
}

a { color: inherit; }
a:focus-visible { box-shadow: 0 0 0 3px var(--paper-light), 0 0 0 6px var(--blue); outline: 0; }
.skip-link { background: var(--ink); color: var(--paper); left: 16px; padding: 12px 16px; position: fixed; top: -80px; z-index: 100; }
.skip-link:focus { top: 14px; }

.directory-header {
  align-items: center;
  backdrop-filter: blur(16px);
  background: color-mix(in srgb, var(--paper) 90%, transparent);
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  min-height: 76px;
  padding: 0 4vw;
  position: sticky;
  top: 0;
  z-index: 20;
}

.directory-brand { align-items: center; display: flex; gap: 12px; text-decoration: none; }
.directory-brand span { align-items: center; background: var(--ink); box-shadow: 3px 3px 0 var(--accent); color: var(--paper); display: flex; font: 800 0.72rem/1 ui-monospace, monospace; height: 38px; justify-content: center; width: 42px; }
.directory-brand strong { font-size: 0.82rem; letter-spacing: 0.07em; text-transform: uppercase; }
.directory-header nav { display: flex; gap: 28px; }
.directory-header nav a { font: 750 0.7rem/1 ui-monospace, monospace; letter-spacing: 0.08em; text-decoration: none; text-transform: uppercase; }
.directory-header nav a:hover { color: var(--accent); }

main { margin: 0 auto; max-width: 1540px; padding: 0 4vw 80px; }
.breadcrumbs { align-items: center; color: var(--muted); display: flex; flex-wrap: wrap; font-size: 0.8rem; gap: 10px; padding: 26px 0; }
.breadcrumbs a { text-underline-offset: 3px; }
.directory-hero { align-items: end; border-bottom: 1px solid var(--line); display: grid; gap: 56px; grid-template-columns: minmax(0, 1.5fr) minmax(240px, 0.5fr); padding: 54px 0 48px; }
.eyebrow { color: var(--accent); font: 800 0.72rem/1.3 ui-monospace, monospace; letter-spacing: 0.13em; margin: 0 0 18px; text-transform: uppercase; }
.directory-hero h1 { font: 500 clamp(3.1rem, 7.5vw, 7.6rem)/0.92 Georgia, "Times New Roman", serif; letter-spacing: -0.06em; margin: 0; max-width: 1100px; }
.directory-hero > div > p:last-child { color: var(--muted); font-size: clamp(1rem, 1.5vw, 1.2rem); line-height: 1.7; margin: 28px 0 0; max-width: 820px; }
.directory-hero aside { border-left: 1px solid var(--line); display: grid; gap: 8px; padding-left: 28px; }
.directory-hero aside strong { font: 500 clamp(3rem, 7vw, 5.5rem)/0.9 Georgia, serif; letter-spacing: -0.05em; }
.directory-hero aside span { color: var(--muted); font: 750 0.68rem/1.4 ui-monospace, monospace; letter-spacing: 0.08em; text-transform: uppercase; }
.directory-hero aside a { font-weight: 750; margin-top: 14px; text-underline-offset: 5px; }
.directory-note { background: var(--acid); border: 1px solid var(--line); color: #0d1117; line-height: 1.6; margin: 28px 0; padding: 15px 18px; }

.directory-results { border-top: 1px solid var(--line); }
.directory-card { align-items: center; border-bottom: 1px solid var(--line); contain-intrinsic-size: auto 145px; content-visibility: auto; display: grid; gap: 32px; grid-template-columns: minmax(0, 1fr) auto; min-height: 128px; padding: 24px 18px; transition: background 160ms ease, padding 160ms ease; }
.directory-card:hover { background: var(--paper-light); padding-inline: 26px; }
.directory-card-copy > span { color: var(--accent); font: 800 0.64rem/1.4 ui-monospace, monospace; letter-spacing: 0.1em; text-transform: uppercase; }
.directory-card h2 { font: 500 clamp(1.35rem, 2.3vw, 2.25rem)/1.08 Georgia, "Times New Roman", serif; letter-spacing: -0.025em; margin: 8px 0; }
.directory-card h2 a { color: inherit; text-decoration: none; text-decoration-thickness: 1px; text-underline-offset: 0.14em; }
.directory-card h2 a:hover { text-decoration: underline; }
.directory-card h2 a:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
.directory-card p { color: var(--muted); margin: 0; }
.language-links { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; max-width: 520px; }
.language-links a { border: 1px solid var(--line); font: 800 0.68rem/1 ui-monospace, monospace; min-width: 78px; padding: 11px 12px; text-align: center; text-decoration: none; text-transform: uppercase; }
.language-links a:hover { background: var(--ink); color: var(--paper); }

.directory-pagination { display: grid; gap: 12px; grid-template-columns: repeat(3, 1fr); margin-top: 34px; }
.directory-pagination a, .directory-pagination span { border: 1px solid var(--line); font-weight: 750; padding: 15px; text-align: center; text-decoration: none; }
.directory-pagination a:hover { background: var(--ink); color: var(--paper); }
.directory-pagination span { color: var(--muted); opacity: 0.55; }
.page-directory { border: 1px solid var(--line); margin-top: 28px; padding: 24px; }
.page-directory > strong { display: block; font: 800 0.7rem/1 ui-monospace, monospace; letter-spacing: 0.09em; margin-bottom: 18px; text-transform: uppercase; }
.page-directory div { display: grid; gap: 7px; grid-template-columns: repeat(auto-fill, minmax(46px, 1fr)); }
.page-directory a { border: 1px solid var(--line); padding: 9px 4px; text-align: center; text-decoration: none; }
.page-directory a:hover { background: var(--accent); color: white; }

footer { border-top: 1px solid var(--line); color: var(--muted); display: flex; gap: 20px; justify-content: space-between; padding: 28px 4vw; }

@media (max-width: 820px) {
  .directory-header nav a:nth-child(n+3) { display: none; }
  .directory-hero { gap: 30px; grid-template-columns: 1fr; padding-top: 34px; }
  .directory-hero aside { border-left: 0; border-top: 1px solid var(--line); padding: 24px 0 0; }
  .directory-card { align-items: start; grid-template-columns: 1fr; }
  .language-links { justify-content: flex-start; }
  footer { flex-direction: column; }
}

@media (max-width: 520px) {
  .directory-header { padding-inline: 18px; }
  .directory-brand strong { display: none; }
  .directory-header nav { gap: 16px; }
  main { padding-inline: 18px; }
  .directory-hero h1 { font-size: clamp(2.8rem, 14vw, 4.8rem); }
  .directory-card { padding-inline: 4px; }
  .directory-card:hover { padding-inline: 8px; }
  .language-links a { flex: 1 1 42%; }
  .directory-pagination { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; }
}
