:root {
  color-scheme: light dark;
  font-family:
    Inter, -apple-system, "SF Pro Text", "Helvetica Neue", ui-sans-serif,
    system-ui, sans-serif;
  font-synthesis: none;
  --page: #fafafa;
  --card: #ffffff;
  --text: #171717;
  --muted: #737373;
  --quiet: #a3a3a3;
  --line: rgba(0, 0, 0, 0.1);
  --line-hover: rgba(0, 0, 0, 0.3);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  scroll-behavior: smooth;
  background: var(--page);
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background: var(--page);
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

.skip-link {
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 10;
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-80px);
  transition: transform 160ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(100% - 48px, 1024px);
  margin: 0 auto;
  padding: 20px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 650;
  letter-spacing: -0.015em;
  text-decoration: none;
}

.brand img {
  width: 20px;
  height: 20px;
}

nav {
  display: flex;
  gap: 20px;
}

nav a {
  color: #525252;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: color 160ms ease;
}

nav a:hover {
  color: var(--text);
}

main {
  width: min(100% - 48px, 1024px);
  min-height: calc(100vh - 154px);
  margin: 0 auto;
}

.hero {
  padding: 112px 0 92px;
  text-align: center;
  animation: reveal-in 700ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--quiet);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(30px, 4vw, 42px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.hero > p:last-child {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

.repository {
  width: min(100%, 768px);
  margin: 0 auto;
  padding-bottom: 136px;
  animation: reveal-in 700ms 120ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 16px;
}

.section-heading h2 {
  margin: 0;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: -0.025em;
}

.section-heading > span {
  color: var(--quiet);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.source-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 78px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  text-decoration: none;
  transition:
    transform 200ms ease,
    border-color 200ms ease,
    box-shadow 200ms ease;
}

.source-card:hover {
  transform: translateY(-2px);
  border-color: var(--line-hover);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.source-icon {
  display: block;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 11px;
  object-fit: cover;
}

.source-copy {
  min-width: 0;
}

.source-copy strong,
.source-copy > span {
  display: block;
}

.source-copy strong {
  margin-bottom: 4px;
  font-size: 15px;
  font-weight: 650;
}

.source-copy > span {
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.source-card svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: var(--quiet);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  transition: stroke 160ms ease;
}

.source-card:hover svg {
  stroke: var(--text);
}

.manual-source {
  margin: 16px 0 0;
  color: var(--quiet);
  font-size: 12px;
  text-align: center;
}

.manual-source a {
  color: var(--muted);
  text-decoration-color: var(--line-hover);
  text-underline-offset: 3px;
}

footer {
  width: min(100% - 48px, 1024px);
  margin: 0 auto;
  padding: 36px 0;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  color: var(--quiet);
  font-size: 13px;
  text-align: center;
}

footer p {
  margin: 0;
}

footer span {
  margin: 0 7px;
}

footer a {
  color: var(--muted);
  text-decoration-color: #d4d4d4;
  text-underline-offset: 4px;
  transition: color 160ms ease;
}

footer a:hover {
  color: var(--text);
}

a:focus-visible {
  outline: 3px solid rgba(82, 126, 255, 0.45);
  outline-offset: 3px;
}

@keyframes reveal-in {
  from {
    opacity: 0;
    transform: translateY(14px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 640px) {
  .site-header,
  main,
  footer {
    width: min(100% - 32px, 1024px);
  }

  .site-header {
    padding: 16px 0;
  }

  nav {
    gap: 14px;
  }

  nav a {
    font-size: 12px;
  }

  .hero {
    padding: 82px 0 72px;
  }

  .repository {
    padding-bottom: 96px;
  }

  .manual-source a {
    display: block;
    overflow: hidden;
    margin-top: 4px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    --page: #0a0a0a;
    --card: #171717;
    --text: #fafafa;
    --muted: #a3a3a3;
    --quiet: #737373;
    --line: rgba(255, 255, 255, 0.1);
    --line-hover: rgba(255, 255, 255, 0.3);
  }

  .brand img {
    filter: invert(1);
  }

  nav a {
    color: #d4d4d4;
  }

  .source-card:hover {
    box-shadow: none;
  }

  footer {
    border-top-color: rgba(255, 255, 255, 0.05);
  }

  footer a {
    text-decoration-color: #525252;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .hero,
  .repository {
    animation: none;
  }

  .source-card {
    transition: none;
  }
}
