/* ===============================================================
   layout.css — the index page. Gutter, spine, sticky labels.
   A project page does NOT load this; it loads article.css.
   =============================================================== */

header { margin-bottom: 4rem; padding-left: calc(var(--gutter) + var(--spine)); }

h1 {
  margin: 0 0 .35rem;
  font-family: var(--font-mono);
  font-size: 1.375rem;
  font-weight: 400;
  letter-spacing: -.01em;
}

.tagline {
  margin: 0;
  color: var(--muted);
  font-family: var(--font-micro);
  font-size: .8125rem;
  letter-spacing: .02em;
}

/* The signature: label sticks in the gutter, content column carries a
   left border. Stacked sections make one continuous spine. */
section { display: grid; grid-template-columns: var(--gutter) 1fr; }

section > h2 {
  position: sticky;
  top: 2rem;
  align-self: start;
  margin: 0;
  padding-right: var(--spine);
  text-align: right;
  color: var(--muted);
  font-family: var(--font-micro);
  font-size: .75rem;
  font-weight: 400;
  letter-spacing: .1em;
  text-transform: uppercase;
}

section > .body {
  border-left: 1px solid var(--rule);
  padding: 0 0 3.25rem var(--spine);
}
section:last-of-type > .body { padding-bottom: 2rem; }

.project { margin-bottom: 1.75rem; }
.project:last-child { margin-bottom: 0; }

.project h3 {
  margin: 0 0 .25rem;
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 400;
}
.project p { margin: 0 0 .35rem; }

/* Description list: label column + value column, baseline-aligned so
   the small mono <dt> sits level with its <dd>. */
.contact {
  display: grid;
  grid-template-columns: 4rem 1fr;
  align-items: baseline;
  gap: .45rem .875rem;
  font-size: .9375rem;
}
.contact dt {
  color: var(--muted);
  font-family: var(--font-micro);
  font-size: .75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.contact dd { margin: 0; }

footer { padding-left: calc(var(--gutter) + var(--spine)); }

/* Narrow: the gutter can't survive a phone. Collapse, and the :: returns. */
@media (max-width: 40rem) {
  :root { --gutter: 0rem; --spine: 0rem; }

  header, footer { padding-left: 0; }
  section { display: block; margin-bottom: 2.5rem; }

  section > h2 {
    position: static;
    text-align: left;
    padding: 0 0 .5rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--rule);
  }
  section > h2::before { content: ":: "; }

  section > .body { border-left: 0; padding: 0; }
}
