@font-face {
  font-family: 'Instrument Sans';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('assets/instrument-sans-latin.woff2') format('woff2');
}

:root {
  color-scheme: light;
  --paper: #fafaf8;
  --ink: #292b2c;
  --muted: #626566;
  --link: #345b83;
  --link-hover: #183d63;
  --visited: #596b7e;
  --line: #dce0dc;
  --surface: #eef0ed;
  --serif: 'Newsreader', Georgia, serif;
  --sans: 'Instrument Sans', Helvetica, sans-serif;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --gutter: max(clamp(22px, 5.5vw, 96px), env(safe-area-inset-left), env(safe-area-inset-right));
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 17px/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 5px; transition: color 240ms var(--ease); -webkit-tap-highlight-color: transparent; }
a:visited { color: var(--visited); }
a:hover { color: var(--link-hover); }
a:focus-visible { outline: 2px solid var(--link); outline-offset: 6px; }
::selection { background: #dfe8ef; }
h1, h2, p { margin: 0; }
main { min-width: 0; }
main:focus { outline: none; }
svg { display: block; }

.ambient-background { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; opacity: .8; }
.ambient-field { display: block; width: 100%; height: 100%; }
.site { position: relative; z-index: 1; width: min(calc(100% - var(--gutter) * 2), 1160px); margin: max(clamp(32px, 6svh, 64px), env(safe-area-inset-top)) auto max(64px, env(safe-area-inset-bottom)); }
.site-header { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px 24px; margin-bottom: 40px; }
.page-title { justify-self: start; font-family: var(--serif); font-size: clamp(88px, 9vw, 120px); font-style: italic; font-weight: 400; line-height: .98; letter-spacing: -.06em; }
.page-title span { color: var(--link); }
.brand { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); font-size: 14px; font-weight: 500; letter-spacing: -.01em; line-height: 1.5; text-decoration: none; }
.brand:hover { color: var(--link); text-decoration: underline; }
.intro-copy { grid-column: 1 / -1; color: var(--muted); font-size: 16px; letter-spacing: -.015em; line-height: 1.6; text-wrap: pretty; }
.site-nav { grid-column: 1 / -1; display: flex; align-items: center; gap: 28px; min-width: 0; margin-top: 14px; border-bottom: 1px solid var(--line); }
.site-nav a { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; margin-bottom: -1px; padding: 8px 0 12px; border-bottom: 2px solid transparent; color: var(--muted); font-size: 15px; font-weight: 500; text-decoration: none; }
.site-nav a:hover { color: var(--ink); }
.site-nav a[aria-current="page"] { border-bottom-color: var(--ink); color: var(--ink); }
.site-nav a:focus-visible { outline-offset: -1px; }
.nav-count { color: var(--muted); font-size: 12px; font-weight: 400; font-variant-numeric: tabular-nums; }

.repository-group { display: grid; grid-template-columns: minmax(120px, .28fr) minmax(0, 1fr); gap: 24px; padding: 36px 0; border-bottom: 1px solid var(--line); }
.repository-group:first-of-type { padding-top: 0; }
.repository-group h2 { display: flex; align-items: baseline; gap: 12px; padding-top: 17px; font-size: 17px; font-weight: 500; letter-spacing: -.025em; }
.repository-list { min-width: 0; margin: 0; padding: 0; list-style: none; }
.repository-list li + li { border-top: 1px solid #dce0dc99; }
.repository-link, .repository-locked { display: grid; grid-template-columns: 3ch minmax(0, 1fr); align-items: baseline; column-gap: 16px; min-height: 44px; padding: 15px 0 19px; color: var(--ink); text-decoration: none; }
.repository-link:visited { color: var(--ink); }
.repository-number { grid-column: 1; grid-row: 1 / span 2; color: var(--muted); font: 400 12px/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.repository-heading { grid-column: 2; display: flex; min-width: 0; align-items: baseline; justify-content: space-between; gap: 16px; }
.repository-name { min-width: 0; font-size: 20px; font-weight: 500; line-height: 1.4; letter-spacing: -.03em; overflow-wrap: anywhere; transition: color 240ms var(--ease); }
.repository-status { display: inline-flex; align-items: center; gap: 5px; flex-shrink: 0; color: var(--muted); font-size: 12px; }
.repository-locked .repository-name { color: var(--muted); }
.repository-locked .repository-description { font-size: 12px; }
.repository-description { grid-column: 2; display: block; max-width: 64ch; margin-top: 4px; color: var(--muted); font-size: 15px; line-height: 1.6; overflow-wrap: anywhere; }
.repository-link:hover .repository-name { color: var(--link); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.repository-link:focus-visible { outline-offset: 4px; border-radius: 2px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

.project-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px clamp(28px, 4vw, 56px); align-items: start; }
.project { min-width: 0; }
.project:nth-child(even) { margin-top: 48px; }
.project-preview { position: relative; display: flex; align-items: center; justify-content: center; aspect-ratio: 16 / 11; padding: clamp(16px, 1.75vw, 24px); overflow: hidden; border-radius: 8px; background: var(--surface); text-decoration: none; transition: background-color 550ms var(--ease); }
.project:nth-child(3n + 2) .project-preview { --surface: #edf0f2; }
.project:nth-child(3n) .project-preview { --surface: #f0ede8; }
.project-preview img { display: block; width: auto; max-width: 100%; height: auto; max-height: 100%; object-fit: contain; object-position: top; border-radius: 3px; box-shadow: 0 3px 10px #263c5110, 0 0 0 1px #263c5108; transform: translateY(0) scale(1); transition: transform 750ms var(--ease), box-shadow 750ms var(--ease); }
.project-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 13px; }
.project-heading h2 { min-width: 0; font-size: clamp(20px, 1.85vw, 25px); font-weight: 500; line-height: 1.3; letter-spacing: -.035em; }
.project-title { display: inline-flex; align-items: center; gap: 9px; min-height: 44px; color: var(--ink); text-decoration: none; }
.project-title:hover { color: var(--link); }
.project-source { display: grid; place-items: center; width: 44px; height: 44px; margin-right: -10px; flex-shrink: 0; color: var(--muted); border-radius: 6px; transition: color 240ms var(--ease), transform 350ms var(--ease); }
.project-source:hover { color: var(--link-hover); transform: translateY(-2px); }
.project-description { max-width: 43ch; margin-top: 0; padding-right: 30px; color: var(--muted); font-size: 16px; line-height: 1.65; letter-spacing: -.015em; text-wrap: pretty; }
.brand, .page-title, .project-heading h2 { transform: translate(var(--text-x, 0px), var(--text-y, 0px)); }
.collection { padding-bottom: 48px; border-bottom: 1px solid var(--line); }
.skip-link { position: absolute; z-index: 5; top: -80px; left: var(--gutter); padding: 10px 16px; background: var(--ink); color: white; }
.skip-link:focus { top: 12px; }

@media (hover: hover) and (pointer: fine) {
  .project-preview:hover { background: #e5e9e8; }
  .project-preview:hover img { transform: translateY(-3px) scale(1.025); box-shadow: 0 9px 22px #263c5118, 0 0 0 1px #263c5110; }
}

@media (max-width: 760px) {
  .site { width: min(calc(100% - var(--gutter) * 2), 580px); margin-top: max(28px, env(safe-area-inset-top)); margin-bottom: max(32px, env(safe-area-inset-bottom)); }
  .site-header { gap: 12px 20px; margin-bottom: 30px; }
  .page-title { font-size: 88px; }
  .brand { font-size: 14px; }
  .intro-copy { max-width: 30ch; font-size: 16px; }
  .site-nav { gap: 24px; margin-top: 8px; }
  .repository-group { grid-template-columns: minmax(0, 1fr); gap: 7px; padding: 28px 0; }
  .repository-group h2 { padding-top: 0; font-size: 16px; }
  .repository-name { font-size: 19px; }
  .repository-link, .repository-locked { column-gap: 10px; padding: 15px 0 18px; }
  .project-grid { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .project:nth-child(even) { margin-top: 0; }
  .project-heading { margin-top: 9px; }
  .project-heading h2 { font-size: 22px; }
  .project-preview { aspect-ratio: 16 / 11; padding: 18px; }
  .project-description { font-size: 16px; padding-right: 8px; }
  .collection { padding-bottom: 36px; }
  .ambient-background { opacity: .6; }
}

@media (max-width: 480px) {
  .project-preview { padding: 16px; }
}

@media (max-width: 360px) {
  :root { --gutter: max(20px, env(safe-area-inset-left), env(safe-area-inset-right)); }
  .page-title { font-size: 80px; }
  .project-heading h2 { font-size: 21px; }
  .site-nav { gap: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .project-preview:hover img, .project-source:hover, .brand, .page-title, .project-heading h2 { transform: none; }
}
