/* impforge.com — one stylesheet, no framework, no build step.
   Dark by default because the mark is; a light scheme is honoured when the
   reader's system asks for one. */

:root {
  --bg: #0b1114;
  --bg-lift: #111a1f;
  --panel: #131e24;
  --ink: #e2edf2;
  --ink-soft: #b9cdd7;
  --muted: #7e99a6;
  --glow: #35efdd;
  --glow-deep: #10a396;
  --glow-wash: rgba(53, 239, 221, 0.09);
  --rule: #1e2d36;
  --rule-soft: #17242b;
  --measure: 38rem;
  --page: 78rem;
  /* How wide a preformatted block may grow before it scrolls. Prose stays at
     --measure so it is still readable; ASCII diagrams and code get the room
     they need, because a diagram that scrolls sideways is a diagram nobody
     reads. */
  --figure: 72rem;
  --serif: ui-serif, Georgia, "Iowan Old Style", "Palatino Linotype", serif;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Inter, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "JetBrains Mono", Menlo, monospace;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #fbfcfc;
    --bg-lift: #ffffff;
    --panel: #ffffff;
    --ink: #101d24;
    --ink-soft: #2d4450;
    --muted: #5d7986;
    --glow: #0a7d73;
    --glow-deep: #0a5f58;
    --glow-wash: rgba(10, 125, 115, 0.07);
    --rule: #dde6ea;
    --rule-soft: #eaf0f2;
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  background-image:
    radial-gradient(60rem 32rem at 78% -12%, var(--glow-wash), transparent 70%),
    radial-gradient(44rem 26rem at 8% 4%, var(--glow-wash), transparent 72%);
  background-repeat: no-repeat;
  color: var(--ink);
  font: 400 1.0625rem/1.68 var(--serif);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

main {
  max-width: var(--page);
  margin: 0 auto;
  padding: 0 1.75rem 6rem;
}

a {
  color: var(--glow);
  text-decoration: none;
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 0% 1px;
  background-repeat: no-repeat;
  background-position: 0 100%;
  transition: background-size 180ms ease, color 180ms ease;
}
a:hover,
a:focus-visible { background-size: 100% 1px; }

:focus-visible {
  outline: 2px solid var(--glow);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---------- navigation ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 2rem;
  padding: 0.5rem 1.75rem;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(150%) blur(10px);
  -webkit-backdrop-filter: saturate(150%) blur(10px);
  border-bottom: 1px solid var(--rule-soft);
  font-family: var(--sans);
}
.nav > * { max-width: var(--page); }
.nav::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--glow-deep), transparent);
  opacity: 0.4;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--sans);
  font-weight: 750;
  font-size: 1.1rem;
  letter-spacing: 0.1em;
  background-image: none;
  margin-right: auto;
  padding-left: max(0px, calc((100vw - var(--page)) / 2 - 1.75rem));
}
.brand-imp {
  width: 6.5rem;
  height: 6.5rem;
  object-fit: contain;
  transition: transform 220ms ease;
}
.brand:hover .brand-imp { transform: translateY(-2px); }

/* The home hero now leads with words; the mark lives in the navigation. */
.hero-home {
  display: block;
  max-width: 46rem;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.6rem;
  font-size: 0.875rem;
  /* Pulled in from the right edge so the menu sits nearer the middle of the
     bar than hard against the window. */
  padding-right: max(1.5rem, calc((100vw - var(--page)) / 2 + 2.5rem));
}
.nav-links a { color: var(--muted); }
.nav-links a:hover { color: var(--ink); }
.nav-links a[aria-current="page"] { color: var(--glow); }

/* ---------- hero ---------- */

.hero {
  padding: 4rem 0 2rem;
  border-bottom: 1px solid var(--rule-soft);
  margin-bottom: 3rem;
}

.hero-home {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.85fr);
  align-items: center;
  gap: 3rem;
  border-bottom: 0;
  padding: 4.5rem 0 3rem;
  margin-bottom: 1rem;
}
.hero-text { min-width: 0; }

.hero-art {
  position: relative;
  display: grid;
  place-items: center;
}
.hero-halo {
  position: absolute;
  width: 78%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, var(--glow-wash), transparent 68%);
  filter: blur(8px);
}
.hero-mark {
  position: relative;
  width: min(100%, 20rem);
  height: auto;
  filter: drop-shadow(0 18px 44px rgba(0, 0, 0, 0.42));
}
@media (prefers-color-scheme: light) {
  .hero-mark { filter: drop-shadow(0 14px 30px rgba(16, 40, 50, 0.16)); }
}

h1 {
  font-family: var(--sans);
  font-size: clamp(2.1rem, 5.4vw, 3.6rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.028em;
  margin: 0.35em 0 0;
}
.hero-home h1 {
  font-size: clamp(2.6rem, 7vw, 4.4rem);
  letter-spacing: -0.035em;
}

.eyebrow {
  font-family: var(--sans);
  text-transform: uppercase;
  letter-spacing: 0.26em;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--glow);
  margin: 0;
}

.lede {
  font-size: clamp(1.15rem, 2.2vw, 1.4rem);
  line-height: 1.5;
  color: var(--ink-soft);
  max-width: var(--measure);
  margin: 0.75em 0 0;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 2rem 0 0;
}

.button {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  padding: 0.7rem 1.25rem;
  border-radius: 6px;
  border: 1px solid var(--glow-deep);
  background: linear-gradient(180deg, var(--glow), var(--glow-deep));
  color: #04201e;
  background-size: auto;
  transition: transform 150ms ease, box-shadow 150ms ease;
}
.button:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 22px -10px var(--glow-deep);
  background-size: auto;
  color: #04201e;
}
.button-quiet {
  background: transparent;
  border-color: var(--rule);
  color: var(--ink-soft);
}
.button-quiet:hover {
  border-color: var(--glow-deep);
  color: var(--glow);
  box-shadow: none;
}

/* ---------- titled bands ---------- */

.band {
  max-width: 46rem;
  margin: 0 0 2rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--rule-soft);
}
.band h2 {
  margin: 0.4rem 0 0;
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  letter-spacing: -0.02em;
}
.band-blurb {
  margin: 0.7rem 0 0;
  font-size: 1.08rem;
  color: var(--muted);
}

/* ---------- the product ---------- */

.product { margin: 3.5rem 0 1rem; }
.product-shot {
  margin: 0;
  max-width: 44rem;
}
.product-shot a {
  display: block;
  border: 1px solid var(--rule);
  border-radius: 10px;
  overflow: hidden;
  background: var(--panel);
  background-image: none;
  box-shadow: 0 22px 60px -28px rgba(0, 0, 0, 0.8);
  transition: border-color 200ms ease, transform 200ms ease;
}
.product-shot a:hover {
  border-color: var(--glow-deep);
  transform: translateY(-2px);
  background-size: auto;
}
.product-shot img { display: block; width: 100%; height: auto; }
.product-shot figcaption {
  margin-top: 1.1rem;
  max-width: 40rem;
  font-size: 1.02rem;
  line-height: 1.6;
  color: var(--ink-soft);
}

/* A picture inside prose breaks out of the reading measure, like a diagram. */
.inline-shot {
  margin: 2.5rem 0 3rem;
  width: min(var(--figure), calc(100vw - 4rem));
  max-width: min(var(--figure), calc(100vw - 4rem));
}
.inline-shot a {
  display: block;
  border: 1px solid var(--rule);
  border-radius: 8px;
  overflow: hidden;
  background: var(--panel);
  background-image: none;
  box-shadow: 0 14px 36px -22px rgba(0, 0, 0, 0.7);
  transition: border-color 200ms ease;
}
.inline-shot a:hover { border-color: var(--glow-deep); background-size: auto; }
.inline-shot img { display: block; width: 100%; height: auto; }
.inline-shot figcaption {
  margin-top: 0.9rem;
  max-width: 42rem;
  font-size: 0.96rem;
  line-height: 1.6;
  color: var(--muted);
}

.gallery {
  display: grid;
  gap: 2.5rem;
  margin-top: 3rem;
}
.gallery-shot { margin: 0; }
.gallery-shot a {
  display: block;
  border: 1px solid var(--rule);
  border-radius: 8px;
  overflow: hidden;
  background: var(--panel);
  background-image: none;
  box-shadow: 0 14px 36px -22px rgba(0, 0, 0, 0.7);
  transition: border-color 200ms ease, transform 200ms ease;
}
.gallery-shot a:hover {
  border-color: var(--glow-deep);
  transform: translateY(-2px);
  background-size: auto;
}
.gallery-shot img { display: block; width: 100%; height: auto; }
.gallery-shot figcaption {
  margin-top: 0.9rem;
  max-width: 42rem;
  font-size: 0.98rem;
  line-height: 1.6;
  color: var(--ink-soft);
}

/* ---------- the demonstration ---------- */

.sequence {
  display: grid;
  gap: 3.5rem;
  margin: 3.5rem 0 4.5rem;
  counter-reset: step;
}
.step { margin: 0; }
.step-head {
  display: grid;
  grid-template-columns: 2.25rem minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
  max-width: 44rem;
  margin-bottom: 1.1rem;
}
.step-n {
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  border: 1px solid var(--glow-deep);
  color: var(--glow);
  font-family: var(--sans);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1;
}
.step figcaption {
  font-size: 1.02rem;
  line-height: 1.6;
  color: var(--ink-soft);
  padding-top: 0.3rem;
}
.step-shot {
  display: block;
  border: 1px solid var(--rule);
  border-radius: 8px;
  overflow: hidden;
  background: var(--panel);
  background-image: none;
  box-shadow: 0 16px 40px -22px rgba(0, 0, 0, 0.7);
  transition: border-color 200ms ease, transform 200ms ease;
}
.step-shot:hover {
  border-color: var(--glow-deep);
  transform: translateY(-2px);
  background-size: auto;
}
.step-shot img {
  display: block;
  width: 100%;
  height: auto;
}
.sequence { margin-top: 1rem; }

/* ---------- prose ---------- */

article { max-width: var(--measure); }
article.essay { max-width: 37rem; }

h2 {
  font-family: var(--sans);
  font-size: 1.45rem;
  font-weight: 680;
  letter-spacing: -0.015em;
  line-height: 1.25;
  margin: 3.25rem 0 0.85rem;
  scroll-margin-top: 5rem;
}
h3 {
  font-family: var(--sans);
  font-size: 1.04rem;
  font-weight: 640;
  letter-spacing: 0.002em;
  margin: 2.1rem 0 0.4rem;
}

p { margin: 0 0 1.25em; }
article > p:first-of-type { color: var(--ink); }

ul, ol { padding-left: 1.15rem; margin: 0 0 1.4em; }
li { margin-bottom: 0.7em; padding-left: 0.2rem; }
li::marker { color: var(--glow-deep); }

strong { font-weight: 640; color: var(--ink); }
em { color: var(--ink-soft); }

code {
  font: 0.875em/1.4 var(--mono);
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 0.12em 0.4em;
  color: var(--glow);
}

/* Preformatted blocks break out of the prose measure: an ASCII wireframe or a
   mermaid-shaped diagram is wide by nature, and narrowing it to the reading
   width turns it into a horizontal scrollbar. It still scrolls if it must, but
   only after it has been given the page. */
pre {
  background: var(--panel);
  border: 1px solid var(--rule);
  border-left: 2px solid var(--glow-deep);
  border-radius: 6px;
  padding: 1.1rem 1.2rem;
  overflow-x: auto;
  font-size: 0.86rem;
  line-height: 1.5;
  width: min(var(--figure), calc(100vw - 4rem));
  max-width: min(var(--figure), calc(100vw - 4rem));
}
pre code {
  background: none;
  border: 0;
  padding: 0;
  color: var(--ink-soft);
  font-size: 1em;
}

blockquote {
  position: relative;
  margin: 2.2rem 0;
  padding: 1.1rem 1.4rem;
  background: var(--bg-lift);
  border: 1px solid var(--rule-soft);
  border-left: 2px solid var(--glow);
  border-radius: 0 6px 6px 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.08rem;
  color: var(--ink);
}
blockquote p:last-child { margin-bottom: 0; }
blockquote cite {
  display: block;
  margin-top: 0.7rem;
  font-family: var(--sans);
  font-style: normal;
  font-size: 0.8rem;
  color: var(--muted);
}

/* ---------- measured figures ---------- */

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  border-radius: 8px;
  overflow: hidden;
  margin: 2.5rem 0 3rem;
  max-width: 48rem;
}
.stat {
  background: var(--panel);
  padding: 1.25rem 1.1rem 1.15rem;
  transition: background 200ms ease;
}
.stat:hover { background: var(--bg-lift); }
.stat-value {
  display: block;
  font-family: var(--sans);
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: -0.035em;
  color: var(--glow);
  font-variant-numeric: tabular-nums;
}
.stat-label {
  display: block;
  margin-top: 0.2rem;
  font-family: var(--sans);
  font-size: 0.755rem;
  line-height: 1.35;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- the timeline ---------- */

.era {
  position: relative;
  display: grid;
  grid-template-columns: 9rem minmax(0, 1fr);
  gap: 2rem;
  padding: 1.75rem 0;
  border-top: 1px solid var(--rule-soft);
}
.era:first-of-type { border-top: 0; padding-top: 0.5rem; }
.era-when {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--glow);
  padding-top: 0.55rem;
}
.era-body { min-width: 0; }
.era-body h3 { margin-top: 0; }
.era-body p { margin-bottom: 0; color: var(--ink-soft); }

/* ---------- writing index ---------- */

.cards { list-style: none; padding: 0; margin: 0; max-width: 44rem; }
.card {
  border-top: 1px solid var(--rule-soft);
  padding: 1.9rem 0;
  margin: 0;
}
.card:first-child { border-top: 0; padding-top: 0.5rem; }
.card h2 {
  margin: 0.35rem 0 0.55rem;
  font-size: 1.4rem;
  letter-spacing: -0.02em;
}
.card h2 a { color: var(--ink); }
.card h2 a:hover { color: var(--glow); }
.card p:last-child { color: var(--ink-soft); margin-bottom: 0; }
.card-date {
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0;
}

.back {
  margin-top: 3.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule-soft);
  font-family: var(--sans);
  font-size: 0.9rem;
}

/* ---------- footer ---------- */

.footer {
  max-width: var(--page);
  margin: 0 auto;
  padding: 2.5rem 1.75rem 4rem;
  border-top: 1px solid var(--rule-soft);
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.82rem;
  line-height: 1.6;
}
.footer p { margin: 0 0 0.35em; }
.footer-note { opacity: 0.7; font-style: italic; }

/* ---------- narrow ---------- */

@media (max-width: 52rem) {
  .hero-home {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding-top: 3rem;
  }
  .hero-art { order: -1; justify-items: start; }
  .hero-mark { width: min(62%, 14rem); }
  .brand, .nav-links { padding-left: 0; padding-right: 0; }
}

@media (max-width: 34rem) {
  main { padding: 0 1.25rem 4rem; }
  .nav { padding: 0.9rem 1.25rem; }
  .nav-links { gap: 1.1rem; }
  .era { grid-template-columns: 1fr; gap: 0.5rem; }
  .era-when { padding-top: 0; }
  .stats { grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
