/* Studio identity ("Bench Plate", direction 4a — see game-studio/Occams-Garage-Style-Guide.html).
   Shared by the home page and /comics, /games, /software, /work-with-me via
   _includes/layouts/studio.njk. The blog (The Razor) keeps its own cream styles.

   Color tiers, per the style guide:
     structure — ground / panel / midtone / body text (most of any screen)
     working   — green, orange, cream (headings, buttons, rules)
     glow      — live green, light sources only: never text, never a fill */

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --ground: #0C1410;
  --panel: #17281D;
  --mid: #2F4436;
  --body: #9AA894;
  --green: #8FBF4E;
  --orange: #D9662B;
  --orange-hot: #FF6B1A;
  --cream: #E8DFC9;
  --live: #7CFF3F;
  --max-w: 1080px;
  --gutter: clamp(1.1rem, 4vw, 3rem);
}

html { scroll-behavior: smooth; }
body {
  background: var(--ground);
  color: var(--body);
  font-family: 'Barlow', sans-serif;
  font-size: 1.05rem;
  line-height: 1.65;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
/* Halftone dot field over the ground, as in the style guide panels. */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: radial-gradient(var(--green) 1.1px, transparent 1.3px);
  background-size: 7px 7px;
  opacity: 0.045;
  pointer-events: none;
  z-index: 0;
}
body > * { position: relative; z-index: 1; }
main { flex: 1; }
img { max-width: 100%; display: block; }
a { color: var(--green); }
a:hover { color: var(--cream); }
:focus-visible { outline: 2px solid var(--live); outline-offset: 3px; }
::selection { background: var(--orange); color: var(--ground); }

.wrap { width: 100%; max-width: var(--max-w); margin: 0 auto; padding: 0 var(--gutter); }

.mono {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

/* ---- Wordmark plate ---------------------------------------------------- */
.plate {
  position: relative;
  display: inline-block;
  border: 5px solid var(--green);
  background: var(--ground);
  padding: 1.5rem 2rem 1.7rem;
  box-shadow: 0 0 54px rgba(124, 255, 63, 0.14), inset 0 0 44px rgba(0, 0, 0, 0.6);
  font-family: 'Bungee', sans-serif;
  line-height: 0.94;
  text-align: center;
  color: var(--cream);
  text-shadow: 6px 5px 0 var(--orange), -4px -3px 0 var(--mid);
}
.plate-top { display: block; font-size: clamp(1.9rem, 7.4vw, 3rem); letter-spacing: 0.02em; }
.plate-main { display: block; font-size: clamp(3.1rem, 12vw, 4.9rem); }
/* The one light source: a live LED on the plate corner. */
.plate::before {
  content: '';
  position: absolute;
  right: -9px; top: -9px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--live);
  box-shadow: 0 0 12px rgba(124, 255, 63, 0.95), 0 0 32px rgba(124, 255, 63, 0.5);
  animation: breathe 3.4s infinite;
}
/* The drip. */
.plate::after {
  content: '';
  position: absolute;
  left: 15%; bottom: -22px;
  width: 13px; height: 28px;
  border-radius: 0 0 7px 7px;
  background: var(--orange);
  box-shadow: 2px 18px 0 -2px var(--orange);
}
@keyframes breathe { 0%, 100% { opacity: 0.55; } 50% { opacity: 1; } }

/* ---- Site nav (inner pages) -------------------------------------------- */
.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  padding: 1rem var(--gutter);
  border-bottom: 2px solid var(--mid);
  background: var(--ground);
}
.site-nav-mark {
  font-family: 'Bungee', sans-serif;
  font-size: 1.05rem;
  line-height: 1;
  color: var(--cream);
  text-decoration: none;
  border: 3px solid var(--green);
  padding: 0.45rem 0.7rem 0.4rem;
  text-shadow: 2px 2px 0 var(--orange);
  white-space: nowrap;
}
.site-nav-home { display: flex; align-items: center; gap: 0.7rem; text-decoration: none; }
.site-nav-home img { width: 44px; height: 44px; }
.site-nav-home:hover .site-nav-mark { border-color: var(--live); }
.site-nav-links { display: flex; align-items: center; flex-wrap: wrap; gap: 0.4rem 1.6rem; }
.site-nav-links a {
  font-family: 'Big Shoulders Display', sans-serif;
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--body);
  padding: 0.25rem 0;
  border-bottom: 3px solid transparent;
}
.site-nav-links a:hover { color: var(--cream); }
.site-nav-links a[aria-current="page"] { color: var(--cream); border-bottom-color: var(--green); }
.site-nav-links a.is-cta { color: var(--orange); }
.site-nav-links a.is-cta:hover { color: var(--orange-hot); }
.site-nav-links a.is-cta[aria-current="page"] { border-bottom-color: var(--orange); }

/* ---- Home hero ---------------------------------------------------------- */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: clamp(3rem, 9vh, 6rem) var(--gutter) 3rem;
}
.hero-logo { width: clamp(6.5rem, 22vw, 9rem); height: auto; margin-bottom: 2rem; }
.hero-tag {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  margin: 3.6rem 0 0;
  font-family: 'Big Shoulders Display', sans-serif;
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--body);
}
.hero-tag::before, .hero-tag::after { content: ''; width: 40px; height: 3px; background: var(--mid); flex: none; }
.hero-lede { max-width: 34rem; margin: 1.1rem auto 0; color: var(--body); }

.bench {
  list-style: none;
  width: 100%;
  max-width: 44rem;
  margin: 2.6rem auto 0;
  border: 2px solid var(--mid);
  background: var(--panel);
  text-align: left;
}
.bench li + li { border-top: 2px solid var(--mid); }
.bench a {
  display: grid;
  grid-template-columns: 2.4rem 1fr auto;
  align-items: center;
  gap: 0.2rem 1rem;
  padding: 1.05rem 1.3rem;
  text-decoration: none;
  color: var(--body);
  border-left: 5px solid transparent;
  transition: background 0.15s, border-color 0.15s;
}
.bench a:hover, .bench a:focus-visible { background: var(--ground); border-left-color: var(--green); }
.bench-num { color: var(--green); }
.bench-name {
  font-family: 'Big Shoulders Display', sans-serif;
  font-weight: 900;
  font-size: clamp(1.7rem, 5.5vw, 2.3rem);
  line-height: 1;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--cream);
}
.bench-desc { grid-column: 2; font-size: 0.95rem; line-height: 1.4; }
.bench-go {
  grid-row: 1 / span 2;
  grid-column: 3;
  font-family: 'Bungee', sans-serif;
  font-size: 1.3rem;
  color: var(--mid);
  transition: color 0.15s, transform 0.15s;
}
.bench a:hover .bench-go { color: var(--green); transform: translateX(4px); }
.bench .is-cta a:hover, .bench .is-cta a:focus-visible { border-left-color: var(--orange); }
.bench .is-cta .bench-num, .bench .is-cta a:hover .bench-go { color: var(--orange); }

/* ---- Page header (inner pages) ------------------------------------------ */
.page-head { padding: clamp(2.6rem, 7vw, 4.6rem) 0 clamp(1.8rem, 4vw, 2.6rem); }
.page-eyebrow { color: var(--green); margin-bottom: 0.9rem; }
.page-title {
  font-family: 'Bungee', sans-serif;
  font-weight: 400;
  font-size: clamp(2.5rem, 9vw, 5rem);
  line-height: 0.95;
  color: var(--cream);
  text-shadow: 5px 4px 0 var(--orange);
  text-transform: uppercase;
  overflow-wrap: anywhere;
}
.page-lede { max-width: 40rem; margin-top: 1.5rem; font-size: 1.15rem; color: var(--body); }
.page-lede strong, .prose strong { color: var(--cream); font-weight: 600; }

/* ---- Project panel ------------------------------------------------------- */
.spec {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(1.4rem, 4vw, 3rem);
  align-items: start;
  padding: clamp(1.3rem, 3.5vw, 2.4rem);
  margin-bottom: 2rem;
  background: var(--panel);
  border: 2px solid var(--mid);
  border-top: 5px solid var(--green);
}
.spec--flip .spec-art { order: 2; }
.spec--text { grid-template-columns: 1fr; }
.spec-art { border: 6px solid var(--cream); background: var(--ground); }
.spec-art img { width: 100%; height: auto; }
.spec-art figcaption { background: var(--cream); color: var(--ground); padding: 0.5rem 0.2rem 0.1rem; }
.spec-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1rem; }
.tag { padding: 0.3rem 0.55rem; border: 1px solid var(--mid); color: var(--body); }
.tag--live { border-color: var(--green); color: var(--green); }
.tag--hot { border-color: var(--orange); color: var(--orange); }
.spec-title {
  font-family: 'Big Shoulders Display', sans-serif;
  font-weight: 900;
  font-size: clamp(2.3rem, 7vw, 3.6rem);
  line-height: 0.95;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--cream);
}
.spec-line {
  font-family: 'Big Shoulders Display', sans-serif;
  font-weight: 700;
  font-size: 1.35rem;
  line-height: 1.2;
  letter-spacing: 0.03em;
  color: var(--green);
  margin: 0.6rem 0 1.1rem;
}
.prose p + p { margin-top: 0.9rem; }
.prose ul { margin: 0.9rem 0 0 1.1rem; }
.prose li + li { margin-top: 0.35rem; }
.prose li::marker { color: var(--green); }

.facts { margin-top: 1.5rem; border-top: 2px solid var(--mid); }
.facts div { display: grid; grid-template-columns: 7.5rem 1fr; gap: 1rem; padding: 0.6rem 0; border-bottom: 1px solid var(--mid); }
.facts dt { color: var(--green); padding-top: 0.25rem; }
.facts dd { font-size: 0.97rem; line-height: 1.5; color: var(--cream); }

.actions { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 1.6rem; }
.btn {
  display: inline-block;
  font-family: 'Big Shoulders Display', sans-serif;
  font-weight: 900;
  font-size: 1.1rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.7rem 1.4rem;
  background: var(--orange);
  color: var(--ground);
  border: 2px solid var(--orange);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.btn:hover { background: var(--orange-hot); border-color: var(--orange-hot); color: var(--ground); }
.btn--ghost { background: transparent; color: var(--green); border-color: var(--green); }
.btn--ghost:hover { background: var(--green); border-color: var(--green); color: var(--ground); }
.btn[disabled] { opacity: 0.6; cursor: default; }

/* ---- Section heading + card grid (work-with-me) -------------------------- */
.section { padding: clamp(1.5rem, 4vw, 2.6rem) 0; }
.section-label {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  color: var(--green);
  margin-bottom: 1.4rem;
}
.section-label::after { content: ''; flex: 1; height: 2px; background: var(--mid); }
.section-title {
  font-family: 'Big Shoulders Display', sans-serif;
  font-weight: 900;
  font-size: clamp(1.9rem, 5.5vw, 2.8rem);
  line-height: 1;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--cream);
  margin-bottom: 1rem;
}
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.2rem; }
.card { background: var(--panel); border: 2px solid var(--mid); border-top: 5px solid var(--green); padding: 1.4rem 1.3rem 1.5rem; }
.card h3 {
  font-family: 'Big Shoulders Display', sans-serif;
  font-weight: 900;
  font-size: 1.7rem;
  line-height: 1;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--cream);
  margin: 0.5rem 0 0.8rem;
}
.card .mono { color: var(--green); }
.card p { font-size: 0.98rem; }
.card ul { list-style: none; margin-top: 1rem; border-top: 1px solid var(--mid); }
.card li { padding: 0.5rem 0; border-bottom: 1px solid var(--mid); font-size: 0.92rem; line-height: 1.4; color: var(--cream); }

.split { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(1.4rem, 4vw, 3rem); align-items: start; }

/* ---- Contact form --------------------------------------------------------- */
.form-panel { background: var(--panel); border: 2px solid var(--mid); border-top: 5px solid var(--orange); padding: clamp(1.3rem, 3.5vw, 2.4rem); }
.field { margin-bottom: 1.6rem; }
.field label, .field .label {
  display: block;
  font-family: 'Big Shoulders Display', sans-serif;
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--cream);
  margin-bottom: 0.2rem;
}
.field .hint { font-size: 0.9rem; margin-bottom: 0.6rem; }
.field input, .field textarea {
  width: 100%;
  padding: 0.8rem 1rem;
  background: var(--ground);
  border: 2px solid var(--mid);
  color: var(--cream);
  font-family: 'Barlow', sans-serif;
  font-size: 1rem;
  line-height: 1.5;
  outline: none;
  transition: border-color 0.15s;
}
.field textarea { min-height: 13rem; resize: vertical; }
.field input:focus, .field textarea:focus { border-color: var(--green); }
.field input::placeholder, .field textarea::placeholder { color: #5f6f62; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1.2rem; }
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chip {
  padding: 0.5rem 0.9rem;
  background: var(--ground);
  border: 2px solid var(--mid);
  color: var(--body);
  font-family: 'Big Shoulders Display', sans-serif;
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  user-select: none;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.chip:hover { border-color: var(--green); color: var(--cream); }
.chip.selected { background: var(--green); border-color: var(--green); color: var(--ground); }
.form-error { display: none; color: var(--orange-hot); font-weight: 600; margin-bottom: 1rem; }
.submit-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; }
.submit-note { font-size: 0.9rem; max-width: 24rem; }
.form-thanks { display: none; text-align: center; padding: 2rem 0; }
.form-thanks h2 { font-family: 'Bungee', sans-serif; font-weight: 400; font-size: clamp(1.8rem, 6vw, 2.6rem); line-height: 1; color: var(--cream); text-shadow: 4px 3px 0 var(--orange); margin-bottom: 1rem; }

/* ---- Footer ---------------------------------------------------------------- */
.site-foot {
  margin-top: 3rem;
  padding: 1.5rem var(--gutter) 1.8rem;
  border-top: 2px solid var(--mid);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.6rem 2rem;
  color: var(--body);
}
.site-foot a { color: var(--body); text-decoration: none; }
.site-foot a:hover { color: var(--green); }
.site-foot nav { display: flex; flex-wrap: wrap; gap: 0.4rem 1.4rem; }

/* ---- 404 --------------------------------------------------------------------- */
.lost { text-align: center; padding: clamp(3rem, 12vh, 7rem) var(--gutter); }
.lost .page-title { font-size: clamp(4rem, 20vw, 8rem); }

@media (max-width: 820px) {
  .spec, .split { grid-template-columns: 1fr; }
  .spec--flip .spec-art { order: 0; }
  .spec-art { max-width: 26rem; }
  .cards { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .plate { padding: 1.1rem 1.2rem 1.3rem; border-width: 4px; text-shadow: 4px 3px 0 var(--orange), -3px -2px 0 var(--mid); }
  .field-row { grid-template-columns: 1fr; }
  .facts div { grid-template-columns: 1fr; gap: 0.1rem; }
  .site-nav-links { gap: 0.3rem 1.1rem; }
  .site-nav-links a { font-size: 0.95rem; }
  .bench a { padding: 0.95rem 0.9rem; grid-template-columns: 1.9rem 1fr auto; gap: 0.2rem 0.7rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .plate::before { animation: none; opacity: 1; }
  * { transition: none !important; }
}

/* ---- Project media: stacked art, game sprites ------------------------------- */
.spec-media { display: grid; gap: 1.2rem; }
.spec--wide { grid-template-columns: 1fr; }
.spec--wide .spec-art { max-width: none; }
.spec-sprite { text-align: center; padding: 0.5rem 0 0; }
.spec-sprite img { width: min(100%, 20rem); height: auto; margin: 0 auto; filter: drop-shadow(0 0 34px rgba(124, 255, 63, 0.18)); }
.spec-sprite figcaption { color: var(--body); margin-top: 0.8rem; }
.roster { list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.6rem; border-top: 2px solid var(--mid); padding-top: 1rem; }
.roster li { text-align: center; }
.roster img { width: 100%; height: auto; }
.roster .mono { display: block; margin-top: 0.4rem; font-size: 0.6rem; letter-spacing: 0.1em; }
.cards--two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 820px) { .cards--two { grid-template-columns: 1fr; } }
.prose ul + p { margin-top: 0.9rem; }
.hero-more { margin-top: 1.6rem; }
.hero-more a { color: var(--body); text-decoration: none; }
.hero-more a:hover { color: var(--green); }

/* ---- Blog: The Razor ---------------------------------------------------------- */
.blog-head { display: flex; align-items: center; gap: clamp(1rem, 4vw, 2.2rem); }
.blog-head img { width: clamp(5rem, 18vw, 9rem); height: auto; flex: none; }
.posts { list-style: none; border-top: 2px solid var(--mid); }
.posts li { border-bottom: 2px solid var(--mid); }
.posts a {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.3rem 1.5rem;
  align-items: center;
  padding: 1.5rem 1rem 1.6rem;
  text-decoration: none;
  color: var(--body);
  border-left: 5px solid transparent;
  transition: background 0.15s, border-color 0.15s;
}
.posts a:hover, .posts a:focus-visible { background: var(--panel); border-left-color: var(--green); }
.post-meta { color: var(--green); display: flex; flex-wrap: wrap; gap: 0.3rem 1rem; }
.post-meta .tag { padding: 0; border: 0; }
.posts h2 {
  font-family: 'Big Shoulders Display', sans-serif;
  font-weight: 900;
  font-size: clamp(1.7rem, 5vw, 2.5rem);
  line-height: 1;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--cream);
  margin: 0.5rem 0 0.4rem;
}
.posts img { grid-column: 2; grid-row: 1; width: 11rem; aspect-ratio: 16 / 10; object-fit: cover; border: 4px solid var(--cream); }
.posts-empty { background: var(--panel); border: 2px dashed var(--mid); padding: 2rem 1.5rem; }
.posts-empty strong { display: block; font-family: 'Big Shoulders Display', sans-serif; font-weight: 900; font-size: 1.6rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--cream); }

.post { max-width: 46rem; margin: 0 auto; padding: 0 var(--gutter); }
.post-back { display: inline-block; margin-top: clamp(1.8rem, 5vw, 3rem); color: var(--body); text-decoration: none; }
.post-back:hover { color: var(--green); }
.post-head { padding: 1.4rem 0 2rem; }
.post-title {
  font-family: 'Big Shoulders Display', sans-serif;
  font-weight: 900;
  font-size: clamp(2.4rem, 8vw, 4.2rem);
  line-height: 0.95;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: var(--cream);
  margin: 0.9rem 0 0;
  overflow-wrap: anywhere;
}
.post-sub { font-size: 1.25rem; line-height: 1.45; color: var(--green); margin-top: 1rem; }
.post-hero { border: 6px solid var(--cream); margin-bottom: 2.4rem; }
.post-hero img { width: 100%; height: auto; }

/* Rendered Markdown. */
.article { font-size: 1.12rem; line-height: 1.75; color: #B9C4B2; }
.article > * + * { margin-top: 1.2rem; }
.article h2, .article h3 {
  font-family: 'Big Shoulders Display', sans-serif;
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--cream);
}
.article h2 { font-size: 1.9rem; margin-top: 2.8rem; padding-top: 1.1rem; border-top: 2px solid var(--mid); }
.article h3 { font-size: 1.4rem; margin-top: 2rem; }
.article strong { color: var(--cream); font-weight: 600; }
.article ul, .article ol { padding-left: 1.4rem; }
.article li + li { margin-top: 0.4rem; }
.article li::marker { color: var(--green); }
.article blockquote { border-left: 5px solid var(--orange); background: var(--panel); padding: 1rem 1.2rem; color: var(--cream); }
.article img { height: auto; border: 6px solid var(--cream); }
.article hr { border: 0; border-top: 2px solid var(--mid); margin: 2.4rem 0; }
.article code { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 0.86em; background: var(--panel); border: 1px solid var(--mid); padding: 0.1em 0.35em; color: var(--cream); }
.article pre { background: var(--panel); border: 2px solid var(--mid); padding: 1rem 1.1rem; overflow-x: auto; line-height: 1.5; }
.article pre code { background: none; border: 0; padding: 0; }
.article table { width: 100%; border-collapse: collapse; font-size: 0.98rem; display: block; overflow-x: auto; }
.article th, .article td { text-align: left; padding: 0.55rem 0.7rem; border-bottom: 1px solid var(--mid); }
.article th { color: var(--green); font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; }
.post-foot { margin-top: 3rem; padding-top: 1.5rem; border-top: 2px solid var(--mid); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.8rem 2rem; color: var(--body); }
.post-foot a { color: var(--body); text-decoration: none; }
.post-foot a:hover { color: var(--green); }

@media (max-width: 640px) {
  .posts a { grid-template-columns: 1fr; padding: 1.2rem 0.6rem 1.3rem; }
  .posts img { grid-column: 1; grid-row: auto; width: 100%; margin-top: 0.6rem; }
  .site-nav-home img { width: 36px; height: 36px; }
}
