:root {
  color-scheme: light;
  --field: #c9d1cc;
  --paper: #edf0ed;
  --ink: #15201c;
  --muted: #4e6057;
  --rule: #81948a;
  --link: #145c70;
  --focus: #913c28;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 20rem;
  background: var(--field);
}

body {
  min-height: 100vh;
  margin: 0;
  display: grid;
  place-items: center;
  padding: clamp(1rem, 5vw, 4rem);
  color: var(--ink);
  background:
    linear-gradient(90deg, transparent 0 11%, rgb(21 32 28 / 7%) 11% calc(11% + 1px), transparent calc(11% + 1px)),
    var(--field);
}

.index-card {
  width: min(100%, 52rem);
  padding: clamp(1.5rem, 5vw, 4.25rem);
  background: var(--paper);
  border: 1px solid var(--rule);
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(14rem, 0.65fr);
  gap: clamp(2.5rem, 8vw, 6rem);
}

.identity {
  grid-column: 1 / -1;
  padding-bottom: clamp(2rem, 5vw, 4rem);
  border-bottom: 1px solid var(--rule);
}

.record-label,
footer,
.project-links {
  font-family: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

.record-label {
  margin: 0 0 0.7rem;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0.4rem;
  font-family: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: clamp(3.4rem, 12vw, 7.5rem);
  font-weight: 540;
  letter-spacing: -0.08em;
  line-height: 0.9;
}

h2 {
  margin-bottom: 0.65rem;
  font-size: clamp(1.25rem, 3vw, 1.65rem);
  line-height: 1.15;
}

p {
  max-width: 40rem;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.65;
}

.tagline {
  margin-bottom: 0;
  color: var(--ink);
  font-size: clamp(1.05rem, 2.4vw, 1.35rem);
}

a {
  color: var(--link);
  font-weight: 650;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.2em;
}

a:hover {
  text-decoration-thickness: 0.14em;
}

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

.project h2 a {
  color: var(--ink);
}

.project-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem 1.25rem;
  margin: 1.7rem 0 0;
  font-size: 0.82rem;
}

.open-door {
  padding-left: clamp(1rem, 3vw, 2rem);
  border-left: 1px solid var(--rule);
}

.open-door h2 {
  font-size: 1rem;
}

.open-door p,
.open-door a {
  font-size: 0.9rem;
}

footer {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
}

.index-card--error {
  display: block;
}

.index-card--error .identity {
  padding-bottom: 2rem;
}

.index-card--error h1 {
  font-size: clamp(2.8rem, 10vw, 5.5rem);
}

.return-link {
  margin: 2rem 0 0;
}

@media (max-width: 42rem) {
  body {
    display: block;
    padding: 0;
    background: var(--paper);
  }

  .index-card {
    min-height: 100vh;
    border: 0;
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .identity,
  footer {
    grid-column: 1;
  }

  .open-door {
    padding: 1.5rem 0 0;
    border-top: 1px solid var(--rule);
    border-left: 0;
  }
}

@media (prefers-contrast: more) {
  :root {
    --field: #ffffff;
    --paper: #ffffff;
    --ink: #000000;
    --muted: #202020;
    --rule: #000000;
    --link: #004f68;
    --focus: #9f270d;
  }
}

@media print {
  body {
    display: block;
    padding: 0;
    background: #ffffff;
  }

  .index-card {
    border-color: #000000;
  }
}
