:root {
  --bg: #f4f4f2;
  --fg: #111110;
  --muted: #76766f;
  --line: rgb(17 17 16 / 0.12);
  --hover: rgb(17 17 16 / 0.035);
  --active: #1f9d55;
  --paused: #c7861a;
  --archived: #a3a39c;
  --sans: ui-sans-serif, -apple-system, BlinkMacSystemFont, 'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --mono: ui-monospace, 'SF Mono', SFMono-Regular, Menlo, Consolas, monospace;
  --pad: clamp(20px, 5vw, 72px);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d0d0c;
    --fg: #ededea;
    --muted: #8b8b84;
    --line: rgb(237 237 234 / 0.12);
    --hover: rgb(237 237 234 / 0.04);
    --active: #3ccf7a;
    --paused: #e3a33b;
    --archived: #5c5c57;
  }
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  overflow-x: clip;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  padding: 0 var(--pad);
}

body > * {
  width: 100%;
  max-width: 1280px;
  margin-inline: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

.bar {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 28px 0;
}

.mark {
  font-size: 14px;
}

/* The logo sits on the text baseline: its descenders (g, y) hang below, 22.5% of its height. */
.logo {
  --logo: 22px;
  height: var(--logo);
  width: auto;
  vertical-align: calc(var(--logo) * -0.225);
}

.foot .logo {
  --logo: 14px;
}

.label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Hero */

.hero {
  padding: clamp(72px, 16vh, 176px) 0 clamp(48px, 10vh, 112px);
}

h1 {
  font-size: clamp(52px, 9.5vw, 148px);
  font-weight: 600;
  line-height: 0.9;
  letter-spacing: -0.05em;
  animation: rise 0.9s var(--ease) both;
}

h1 .dim {
  display: block;
  color: var(--muted);
}

.lede {
  margin-top: 32px;
  max-width: 36ch;
  font-size: clamp(15px, 1.2vw, 17px);
  line-height: 1.5;
  color: var(--muted);
  animation: rise 0.9s 0.08s var(--ease) both;
}

/* List */

.list-head,
.row a {
  display: grid;
  grid-template-columns: 64px 1fr minmax(120px, auto) 40px;
  column-gap: 24px;
}

.list-head {
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.list-head-status {
  grid-column: 3;
  text-align: right;
}

.list {
  list-style: none;
}

.row {
  border-bottom: 1px solid var(--line);
  animation: rise 0.8s var(--ease) both;
  animation-delay: calc(var(--i) * 70ms + 160ms);
}

.row a {
  position: relative;
  isolation: isolate;
  align-items: center;
  padding: 32px 0;
}

.row a::before {
  content: '';
  position: absolute;
  inset: 0 calc(50% - 50vw);
  z-index: -1;
  background: var(--hover);
  opacity: 0;
  transition: opacity 0.3s var(--ease);
}

.row a:hover::before,
.row a:focus-visible::before {
  opacity: 1;
}

.row a:focus-visible {
  outline: none;
}

.row a:focus-visible .row-title {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
}

.row-num {
  align-self: start;
  padding-top: 10px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}

.row-main {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.row-title {
  font-size: clamp(28px, 3.4vw, 48px);
  font-weight: 560;
  line-height: 1;
  letter-spacing: -0.035em;
}

.row-blurb {
  max-width: 58ch;
  font-size: 15px;
  line-height: 1.5;
  color: var(--muted);
}

.row-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  text-align: right;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  --dot: var(--archived);
}

.status::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--dot);
}

.status[data-status='active'] {
  --dot: var(--active);
}

.status[data-status='active']::before {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--active) 18%, transparent);
}

.status[data-status='paused'] {
  --dot: var(--paused);
}

.row-date {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
}

.row-arrow {
  justify-self: end;
  font-size: 22px;
  opacity: 0.3;
  transition:
    transform 0.45s var(--ease),
    opacity 0.3s var(--ease);
}

.row a:hover .row-arrow,
.row a:focus-visible .row-arrow {
  opacity: 1;
  transform: translateX(6px);
}

.empty {
  padding: 32px 0;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
}

.foot {
  margin-top: auto;
  padding-top: 96px;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* Phone: meta drops under the title, arrow stays on the right */

@media (max-width: 640px) {
  .list-head {
    display: none;
  }

  .row:first-child {
    border-top: 1px solid var(--line);
  }

  .row a {
    grid-template-columns: 32px 1fr 24px;
    column-gap: 14px;
    row-gap: 14px;
    padding: 26px 0;
  }

  .row-num {
    padding-top: 7px;
  }

  .row-meta {
    grid-column: 2;
    grid-row: 2;
    flex-direction: row;
    align-items: center;
    gap: 14px;
  }

  .row-arrow {
    grid-column: 3;
    grid-row: 1;
    align-self: start;
    padding-top: 2px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before {
    animation: none !important;
    transition: none !important;
  }
}
