/* Shared styles for bunkum.us — the home page and /labyrinth.
   Page-specific blocks (home footer/mark, labyrinth grid) are scoped by class,
   so they're simply inert on the page that doesn't use them. */

:root {
  --ink: #1a1a1a;
  --muted: #666;
  --accent: #c1121f;       /* resume red */
  --rule: #e3e3e3;
  --serif: "Merriweather", Georgia, "Times New Roman", serif;
  --sans: "Open Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --measure: 42rem;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--serif);
  color: var(--ink);
  background: #fff;
  line-height: 1.7;
  font-size: 1.0625rem;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ---- Header ---- */
header {
  border-bottom: 2px solid var(--accent);
  margin-bottom: 2.5rem;
}
.masthead {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 2rem 1.5rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
}

/* On wider screens, bias the content column left: left margin gets 1/3 of the
   free space, right margin (auto) takes the other 2/3. Below this, the base
   `margin: 0 auto` keeps it centered. */
@media (min-width: 48rem) {
  .wrap,
  .masthead {
    margin-left: calc((100% - var(--measure)) / 3);
    margin-right: auto;
  }
}

.name {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(1.9rem, 5vw, 2.4rem);
  letter-spacing: -0.01em;
  margin: 0;
  line-height: 1.1;
}
.name a { color: var(--ink); }
.name a:hover { text-decoration: none; }

nav.props {
  font-family: var(--sans);
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}
nav.props a { color: var(--muted); }
nav.props a:hover { color: var(--accent); text-decoration: none; }

/* ---- Body copy ---- */
main { padding-bottom: 1rem; }
main p { margin: 0 0 1.4rem; }

/* ---- Home: footer + generative mark ---- */
footer.wrap {
  margin-top: 3rem;
  padding-top: 1.75rem;
  padding-bottom: 5rem;
  border-top: 1px solid var(--rule);
  font-family: var(--sans);
  font-size: 0.95rem;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
.contact {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.4rem;
}
.contact a { font-weight: 600; }
.mark {
  flex: none;
  width: 64px;
  height: 64px;
  color: var(--accent);
}
.mark svg { display: block; }
.mark-link { flex: none; display: block; }
.mark-link:hover .mark { opacity: 0.72; }

/* ---- /labyrinth page ---- */
.page-title { font-weight: 700; font-size: 1.6rem; margin: 0 0 1.25rem; }
.controls { margin: 2rem 0 1rem; }
.regen {
  font-family: var(--sans);
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.5rem 1rem;
  color: #fff;
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 6px;
  cursor: pointer;
}
.regen:hover { background: #a50f1a; border-color: #a50f1a; }
.mark-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.1rem;
  margin: 0 0 4rem;
}
.mark-grid .m { color: var(--accent); aspect-ratio: 1 / 1; }
.mark-grid .m svg { display: block; width: 100%; height: 100%; }

/* ---- Phones ---- */
@media (max-width: 480px) {
  nav.props {
    flex-wrap: nowrap;
    gap: 0.8rem;
    font-size: 0.72rem;
    letter-spacing: 0.05em;
  }
  .mark-grid { grid-template-columns: repeat(2, 1fr); }
}
