:root {
  color-scheme: light;
  --ink: #1d2525;
  --muted: #596565;
  --paper: #f7f4ed;
  --panel: #fffdf8;
  --rule: #d9d2c4;
  --green: #2f6b4f;
  --blue: #235d8a;
  --red: #8f3c35;
  --gold: #b08a32;
  --fley: #8f3c35;
  --ier: #7b506f;
  --pancakes: #2f6b4f;
  --nethack: #235d8a;
  --shadow: 0 18px 50px rgba(29, 37, 37, 0.13);
  font-family:
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
}

a {
  color: inherit;
  text-decoration-color: rgba(35, 93, 138, 0.45);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--blue);
  text-decoration-color: currentColor;
}

.masthead {
  min-height: 88vh;
  display: flex;
  flex-direction: column;
  border-bottom: 1px solid var(--rule);
  background:
    linear-gradient(90deg, rgba(247, 244, 237, 0.96), rgba(247, 244, 237, 0.76)),
    radial-gradient(circle at 82% 24%, rgba(176, 138, 50, 0.2), transparent 28%),
    var(--paper);
}

.compact-masthead {
  min-height: 58vh;
}

.topbar {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  font-weight: 800;
  text-decoration: none;
  letter-spacing: 0;
}

.navlinks {
  display: flex;
  align-items: center;
  gap: 20px;
  color: var(--muted);
  font-size: 0.95rem;
}

.hero {
  width: min(1120px, calc(100% - 40px));
  margin: auto;
  padding: 48px 0 80px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 425px);
  align-items: center;
  gap: 56px;
}

.compact-hero {
  padding-bottom: 56px;
}

.hero-copy {
  max-width: 700px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--red);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  font-size: clamp(3rem, 8vw, 6.8rem);
  line-height: 0.94;
  letter-spacing: 0;
}

h2 {
  margin: 0;
  font-size: 2.1rem;
  line-height: 1.1;
  letter-spacing: 0;
}

h3 {
  margin: 0 0 12px;
  font-size: 1.28rem;
  letter-spacing: 0;
}

.lede {
  max-width: 650px;
  margin: 28px 0;
  color: var(--muted);
  font-size: 1.25rem;
  line-height: 1.55;
}

.terminal-line {
  width: fit-content;
  max-width: 100%;
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 14px 18px;
  border: 1px solid #1d2525;
  background: #101616;
  color: #f3f1df;
  box-shadow: var(--shadow);
  font-size: 1rem;
  overflow-x: auto;
}

.terminal-line span {
  color: #7ecb95;
  font-weight: 800;
}

.terminal-line code {
  white-space: nowrap;
}

.hero-image {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 18px 34px rgba(29, 37, 37, 0.18));
}

main {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}

.status-band {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin: -38px 0 56px;
  border: 1px solid var(--rule);
  background: var(--rule);
  box-shadow: var(--shadow);
}

.status-band div {
  min-height: 86px;
  padding: 18px 20px;
  background: var(--panel);
}

.label,
.repo-meta {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
}

.label {
  margin-bottom: 8px;
}

.content-section {
  padding: 32px 0 64px;
}

.section-heading {
  margin-bottom: 24px;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.project-card {
  min-height: 210px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
  padding: 22px;
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: var(--panel);
}

.small-card-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.small-card {
  min-height: 180px;
  gap: 16px;
  padding: 18px;
}

.small-card h3 {
  margin-bottom: 8px;
  font-size: 1.08rem;
}

.small-card p {
  font-size: 0.94rem;
  line-height: 1.45;
}

.project-card-primary {
  border-top: 6px solid var(--green);
}

.category-fley {
  border-top: 6px solid var(--fley);
  background: linear-gradient(180deg, rgba(143, 60, 53, 0.1), var(--panel) 46%);
}

.category-ier {
  border-top: 6px solid var(--ier);
  background: linear-gradient(180deg, rgba(123, 80, 111, 0.1), var(--panel) 46%);
}

.category-pancakes {
  border-top: 6px solid var(--pancakes);
  background: linear-gradient(180deg, rgba(47, 107, 79, 0.1), var(--panel) 46%);
}

.category-nethack {
  border-top: 6px solid var(--nethack);
  background: linear-gradient(180deg, rgba(35, 93, 138, 0.1), var(--panel) 46%);
}

.category-fley .repo-meta {
  color: var(--fley);
}

.category-ier .repo-meta {
  color: var(--ier);
}

.category-pancakes .repo-meta {
  color: var(--pancakes);
}

.category-nethack .repo-meta {
  color: var(--nethack);
}

.project-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.project-card .repo-meta {
  margin-bottom: 14px;
  color: var(--blue);
}

.project-card a {
  width: fit-content;
  font-weight: 800;
}

.pending-link {
  width: fit-content;
  color: var(--muted);
  font-weight: 800;
}

.link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.split-section {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 40px;
  border-top: 1px solid var(--rule);
}

.split-section p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1.7;
}

@media (max-width: 760px) {
  .masthead {
    min-height: auto;
  }

  .topbar {
    min-height: 86px;
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
  }

  .navlinks {
    width: 100%;
    gap: 14px;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .hero,
  .split-section {
    grid-template-columns: 1fr;
  }

  .hero {
    gap: 32px;
    padding: 34px 0 68px;
  }

  .hero-image {
    max-width: 360px;
  }

  .status-band,
  .project-grid {
    grid-template-columns: 1fr;
  }

  .status-band {
    margin-top: -24px;
  }
}
