:root {
  color-scheme: light dark;
  --paper: #fbf5eb;
  --ink: #2e221c;
  --muted: #6b5244;
  --rule: #d8c6b6;
  --accent: #9c3d17;
  --figure: #eddbc9;
  --device-shadow: #35231735;
  --serif: Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #251b16;
    --ink: #f7e9db;
    --muted: #ceb6a6;
    --rule: #5e4537;
    --accent: #ffa66e;
    --figure: #423025;
    --device-shadow: #0c060680;
  }
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 1rem/1.66 var(--sans);
}

h1, h2, p, figure { margin: 0; }
a { color: var(--accent); text-underline-offset: 0.24em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
[id] { scroll-margin-top: 1rem; }

.wrap {
  width: min(100% - clamp(2.3rem, 10vw, 7.2rem), 69rem);
  margin-inline: auto;
  padding-block: clamp(1.5rem, 4.5vw, 3.5rem) clamp(2.3rem, 7vw, 5rem);
}

.skip-link {
  position: absolute;
  z-index: 1;
  inset: 0.8rem auto auto 0.8rem;
  background: var(--paper);
  padding: 0.45rem 0.75rem;
  transform: translateY(-200%);
}

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

.masthead {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1.2rem;
  border-bottom: 1px solid var(--rule);
}

.masthead h1 {
  font: 400 clamp(2.6rem, 7.3vw, 4.65rem)/1 var(--serif);
  letter-spacing: -0.067em;
}

.masthead h1 a { text-decoration: none; }
.about-link { font-size: 0.9375rem; }

.page-layout {
  display: grid;
  grid-template-columns: minmax(9.5rem, 0.75fr) minmax(0, 3fr);
  column-gap: clamp(1.5rem, 5vw, 4rem);
  padding-top: clamp(1.7rem, 4vw, 3rem);
}

.project-index {
  display: grid;
  gap: 0.3rem;
  align-content: start;
  justify-items: start;
}

.project-index h2 {
  margin-bottom: 0.35rem;
  font: 600 0.875rem/1.4 var(--sans);
  color: var(--muted);
}

.project-index a { font-size: 0.9375rem; }

.project-notes {
  max-width: 46rem;
  min-width: 0;
  container-type: inline-size;
}

.project-header {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.project-icon {
  display: block;
  flex: 0 0 auto;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 0.7rem;
}

.project-title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.2rem 0.85rem;
}

.project-notes h2 {
  font: 400 clamp(1.8rem, 4vw, 2.7rem)/1.12 var(--serif);
  letter-spacing: -0.045em;
}

.project-domain { font-size: 0.9375rem; overflow-wrap: anywhere; }

.article-context {
  margin-top: 0.4rem;
  color: var(--muted);
  font-size: 0.875rem;
}

.project-header + p, .project-notes p + p, .about h2 + p { margin-top: 0.85rem; }

.project-notes article + article, .about {
  margin-top: clamp(1.65rem, 4vw, 2.6rem);
  border-top: 1px solid var(--rule);
  padding-top: clamp(1.4rem, 3vw, 2rem);
}

.about h2 { font-size: 1.6rem; }

.macroform-feature {
  display: grid;
  grid-template-columns: minmax(0, 1.22fr) minmax(0, 1fr);
  align-items: start;
  gap: clamp(1rem, 3vw, 1.6rem);
  margin-top: 1rem;
}

.store-link { color: var(--muted); font-size: 0.9375rem; }

.device-screens {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 0.625rem;
  padding: clamp(0.75rem, 2.5vw, 1.4rem);
  border: 1px solid var(--rule);
  border-radius: 0.75rem;
  background: linear-gradient(145deg, var(--figure), var(--paper));
}

.device-screens img {
  display: block;
  width: min(55%, 9.2rem);
  height: auto;
  min-width: 0;
  border-radius: 0.8rem;
  box-shadow: 0 0.48rem 0.9rem var(--device-shadow);
}

.device-screens img + img {
  width: min(38%, 6.85rem);
  margin-bottom: 0.65rem;
  border-radius: 0.75rem;
}

figcaption {
  margin-top: 0.45rem;
  color: var(--muted);
  font-size: 0.875rem;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 1.3rem;
  margin-top: 1.15rem;
  font-size: 0.9375rem;
}

@container (max-width: 34rem) {
  .macroform-feature { grid-template-columns: 1fr; }
}

@media (max-width: 650px) {
  .page-layout { grid-template-columns: 1fr; row-gap: 1.65rem; }
  .project-index { display: flex; flex-wrap: wrap; column-gap: 1rem; }
  .project-index h2 { flex-basis: 100%; margin-bottom: 0; }
}
