:root {
  color-scheme: dark;
  --bg: #12181b;
  --bg-hover: #172125;
  --text: #edf1e7;
  --muted: #bbc7c1;
  --quiet: #8ea69b;
  --eyebrow: #adc3b4;
  --accent: #b5e8c2;
  --line: #3c4d46;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, sans-serif;
}

main {
  max-width: 1050px;
  margin: auto;
  padding: 72px 28px 32px;
}

.eyebrow {
  margin: 0;
  color: var(--eyebrow);
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

h1 {
  margin: 48px 0 24px;
  font-size: clamp(42px, 8vw, 78px);
  line-height: 1.05;
  letter-spacing: -0.045em;
}

.intro {
  max-width: 640px;
  margin: 0 0 72px;
  color: var(--muted);
  font-size: 20px;
  line-height: 1.6;
}

.group {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 0 32px;
  margin-bottom: 56px;
}

h2 {
  display: flex;
  gap: 10px;
  margin: 0;
  padding-top: 26px;
  border-top: 1px solid var(--line);
  color: var(--eyebrow);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.index {
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.projects {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

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

.project {
  display: grid;
  grid-template-columns: minmax(0, 17.5rem) minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 10px 32px;
  margin: 0 -14px;
  padding: 24px 14px;
  border-radius: 6px;
  color: inherit;
  text-decoration: none;
}

.title {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.name {
  font-size: 22px;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.host {
  overflow-wrap: anywhere;
  color: var(--quiet);
  font-family: ui-monospace, "SF Mono", "Cascadia Mono", "DejaVu Sans Mono", monospace;
  font-size: 12px;
}

.description {
  color: var(--muted);
  line-height: 1.6;
}

.tag {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--eyebrow);
  font-size: 12.5px;
  line-height: 1.6;
  white-space: nowrap;
}

.open {
  color: var(--accent);
  white-space: nowrap;
}

.project:hover {
  background: var(--bg-hover);
}

.project:hover .name,
.project:focus-visible .name {
  text-decoration: underline;
  text-underline-offset: 5px;
}

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

footer {
  margin-top: 80px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

footer p {
  margin: 0;
  color: var(--eyebrow);
  font-size: 14px;
}

@media (max-width: 860px) {
  .group {
    grid-template-columns: minmax(0, 1fr);
  }

  h2 {
    padding: 0 0 16px;
    border-top: 0;
  }

  .project {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .description {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .open {
    grid-column: 2;
    grid-row: 1;
  }
}

@media (max-width: 560px) {
  main {
    padding: 32px 16px;
  }

  h1 {
    margin-top: 40px;
  }

  .intro {
    margin-bottom: 56px;
    font-size: 18px;
  }

  .project {
    margin: 0;
    padding: 22px 0;
    border-radius: 0;
  }

  .project:hover {
    background: none;
  }

  .name {
    font-size: 20px;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .project {
    transition: background-color 120ms ease;
  }
}
