/* ==========================================================================
   njogued.github.io — landing page design system
   Technical-editorial / Swiss-brutalist, per DESIGN.md.
   Scoped to index.html. Legacy pages still use static/styles.css until they
   are converted. No Bootstrap on this page — plain grid/flex only.
   ========================================================================== */

:root {
  /* --- surfaces --- */
  --white: #ffffff;
  --paper: #f6f3ee;          /* warm paper band */
  --ink: #100b1c;            /* near-black, violet cast, sits with the mark */
  --ink-elevated: #1b1526;
  --ink-border: #2c2438;

  /* --- text --- */
  --body-text: #4a4744;
  --muted: #8a8580;
  --dark-body: #b8b2c2;
  --dark-muted: #79728a;

  /* --- lines --- */
  --hairline: #e4e0d8;       /* light dividers */
  --rule: #d6d2ca;           /* structural card borders */
  --dashed: #c8c5be;         /* dashed meta rows */
  --ghost: #ebe7df;          /* ghost numerals */
  --ghost-dark: #1e1729;

  /* --- accent: taken from static/ed-site.svg, not the spec's blue --- */
  --violet: #4d0da2;
  --violet-lift: #a97fe8;    /* violet legible on the dark band */
  --violet-wash: #f1ebfa;
  --signal: #e8590c;         /* live / status only, never a CTA */

  --radius: 2px;
  --measure: 1328px;

  --sans: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* --------------------------------------------------------------------------
   Reset & base
   -------------------------------------------------------------------------- */

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

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

body {
  margin: 0;
  background: var(--white);
  color: var(--body-text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { max-width: 100%; }

h1, h2, h3, h4 {
  margin: 0;
  color: var(--ink);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1;
}

p { margin: 0; }

a { color: var(--violet); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

ul { margin: 0; padding: 0; list-style: none; }

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

.band--dark :focus-visible { outline-color: var(--violet-lift); }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--ink);
  color: var(--white);
  font-family: var(--mono);
  font-size: 13px;
  padding: 12px 18px;
}
.skip-link:focus { left: 12px; top: 12px; }

/* --------------------------------------------------------------------------
   Layout primitives
   -------------------------------------------------------------------------- */

.wrap {
  max-width: var(--measure);
  margin: 0 auto;
  padding-inline: 56px;
}

.band {
  position: relative;
  overflow: hidden;
  padding-block: 120px;
}

.band--paper { background: var(--paper); }
.band--dark  { background: var(--ink); color: var(--dark-body); }
.band--dark h2, .band--dark h3 { color: var(--white); }

/* Section heading block: eyebrow + title, with the ghost numeral behind it. */

.sec-head {
  position: relative;
  margin-bottom: 64px;
}

.eyebrow {
  display: block;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--violet);
  margin-bottom: 20px;
}

.band--dark .eyebrow { color: var(--signal); }

.sec-title {
  font-size: clamp(34px, 5.4vw, 56px);
  line-height: 1;
  max-width: 20ch;
}

.sec-lead {
  margin-top: 22px;
  max-width: 62ch;
  font-size: 18px;
  line-height: 1.5;
}

.band--dark .sec-lead { color: var(--dark-body); }

/* Ghost numeral — bleeds off the right edge of the section head. */
.numeral {
  position: absolute;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
  font-size: 220px;
  font-weight: 600;
  line-height: 0.85;
  letter-spacing: -0.04em;
  color: var(--ghost);
  pointer-events: none;
  user-select: none;
  z-index: 0;
}

.band--dark .numeral { color: var(--ghost-dark); }
.sec-head > *:not(.numeral) { position: relative; z-index: 1; }

/* --------------------------------------------------------------------------
   Nav
   -------------------------------------------------------------------------- */

.nav {
  border-bottom: 1px solid var(--hairline);
  background: var(--white);
}

.nav__inner {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 20px 56px;
  display: flex;
  align-items: center;
  gap: 32px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--violet);
}
.brand:hover { text-decoration: none; }

.brand__mark { width: 46px; height: 30px; display: block; }
.brand__mark path { fill: currentColor; }

.brand__word {
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--ink);
  white-space: nowrap;
}

.brand--dark { color: var(--violet-lift); }
.brand--dark .brand__word { color: var(--white); }

.nav__links {
  display: flex;
  gap: 28px;
  margin-left: auto;
}

.nav__links a {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--body-text);
}
.nav__links a:hover { color: var(--ink); text-decoration: none; }

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.btn {
  display: inline-block;
  border-radius: var(--radius);
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 500;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.btn:hover { text-decoration: none; }

.btn--primary {
  background: var(--violet);
  color: var(--white);
  border: 1px solid var(--violet);
  padding: 18px 32px;
}
.btn--primary:hover { background: #3d0880; border-color: #3d0880; }

.btn--ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--ink);
  padding: 17px 30px;
}
.btn--ghost:hover { background: var(--ink); color: var(--white); }

.btn--mono {
  background: var(--ink);
  color: var(--white);
  border: 1px solid var(--ink);
  font-family: var(--mono);
  font-size: 13px;
  padding: 10px 18px;
}
.btn--mono:hover { background: var(--violet); border-color: var(--violet); }

.band--dark .btn--ghost {
  color: var(--white);
  border-color: var(--ink-border);
}
.band--dark .btn--ghost:hover { background: var(--white); color: var(--ink); }

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero { padding-block: 88px 96px; }

.hero__grid {
  display: grid;
  grid-template-columns: 1.26fr 1fr;
  gap: 64px;
  align-items: center;
}

.hero__title {
  font-size: clamp(40px, 6.4vw, 64px);
  line-height: 1;
  letter-spacing: -0.03em;
  max-width: 15ch;
}

.hero__lead {
  margin-top: 28px;
  max-width: 52ch;
  font-size: 18px;
  line-height: 1.5;
}

.hero__actions {
  margin-top: 40px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

/* Verifiable facts, not invented metrics. Spans both hero columns. */
.facts {
  margin-top: 72px;
  border-top: 1px dashed var(--dashed);
  padding-top: 24px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.fact dt {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}

.fact dd {
  margin: 0;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink);
}

/* --------------------------------------------------------------------------
   Signature: the run log
   -------------------------------------------------------------------------- */

.runlog {
  background: var(--ink);
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--dark-body);
}

.runlog__bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--ink-border);
}

.runlog__dots { display: flex; gap: 6px; }
.runlog__dots i {
  width: 9px;
  height: 9px;
  border-radius: 50%;           /* the only circle in the system */
  background: var(--ink-border);
  display: block;
}

.runlog__file {
  color: var(--dark-muted);
  font-size: 12px;
}

.runlog__live {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--signal);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.runlog__live::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--signal);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }

.runlog__body { padding: 20px 18px; }

.runlog__row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: baseline;
  padding: 7px 0;
  opacity: 0;
  animation: stamp 0.42s cubic-bezier(0.4, 0, 0.2, 1) both;
}

.runlog__row:nth-child(1) { animation-delay: 0.25s; }
.runlog__row:nth-child(2) { animation-delay: 0.60s; }
.runlog__row:nth-child(3) { animation-delay: 0.95s; }
.runlog__row:nth-child(4) { animation-delay: 1.30s; }
.runlog__row:nth-child(5) { animation-delay: 1.65s; }

@keyframes stamp {
  from { opacity: 0; transform: translateY(5px); }
  to   { opacity: 1; transform: none; }
}

.runlog__step { color: var(--dark-muted); }
.runlog__node { color: var(--white); }
.runlog__node em { font-style: normal; color: var(--violet-lift); }
.runlog__ms { color: var(--dark-muted); font-size: 11px; }

.runlog__foot {
  border-top: 1px dashed var(--ink-border);
  padding: 14px 18px;
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--dark-muted);
}

.runlog__ok { color: var(--violet-lift); }

/* --------------------------------------------------------------------------
   About
   -------------------------------------------------------------------------- */

.about__grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 64px;
}

.about__body p + p { margin-top: 20px; }

.arc {
  border-top: 1px solid var(--rule);
}

.arc__row {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 24px;
  padding: 20px 0;
  border-bottom: 1px dashed var(--dashed);
}

.arc__when {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}

.arc__what {
  font-size: 15px;
  color: var(--body-text);
}

.arc__what strong {
  display: block;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.01em;
  margin-bottom: 3px;
}

/* --------------------------------------------------------------------------
   Skills — mono pills, grouped
   -------------------------------------------------------------------------- */

.stack {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.stack__group {
  border-top: 1px solid var(--ink);
  padding-top: 22px;
}

.stack__name {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 18px;
}

.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill {
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1;
  padding: 8px 11px;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--body-text);
}

.pill--lead {
  background: var(--violet-wash);
  border-color: #ddcdf3;
  color: var(--violet);
}

/* --------------------------------------------------------------------------
   Card grids — shared hairlines form one table, not separate objects
   -------------------------------------------------------------------------- */

.grid {
  display: grid;
  border-top: 1px solid var(--rule);
  border-left: 1px solid var(--rule);
}

.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }

.cell {
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--white);
  transition: background 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.band--paper .cell { background: transparent; }
.cell:hover { background: var(--violet-wash); }

.cell__index {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.cell__title {
  font-size: 20px;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.cell__title a { color: var(--ink); }
.cell__title a:hover { color: var(--violet); text-decoration: none; }

.cell__text { font-size: 15px; line-height: 1.5; }

.cell__text code {
  font-family: var(--mono);
  font-size: 0.9em;
  color: var(--ink);
}

.cell__tags {
  margin-top: auto;
  padding-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
}

.cell__tags span::after { content: " ·"; }
.cell__tags span:last-child::after { content: ""; }

.grid-note {
  margin-top: 24px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}

/* --- tiers: current work leads, older work drops back to a list --------- */

.tier {
  display: block;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-bottom: 18px;
}

.tier + .tier,
.grid + .tier,
.grid-note + .tier { margin-top: 72px; }

.cell--lead { padding: 40px 36px; gap: 14px; }
.cell--lead .cell__title { font-size: 26px; line-height: 1.2; }
.cell--lead .cell__text { font-size: 16px; }

/* Outbound links get an explicit affordance. */
.cell__title a[target="_blank"]::after {
  content: " ↗";
  font-family: var(--mono);
  font-size: 0.62em;
  color: var(--muted);
}
.cell__title a[target="_blank"]:hover::after { color: var(--violet); }

/* Status chip — the second real job for the orange, after the live dot. */
.status {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  gap: 7px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.status::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.status--building { color: var(--signal); }
.status--shipped { color: var(--violet); }

.archive { border-top: 1px solid var(--rule); }

.archive__row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: baseline;
  padding: 18px 0;
  border-bottom: 1px dashed var(--dashed);
}

.archive__row a {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.archive__row a:hover { color: var(--violet); text-decoration: none; }

.archive__meta {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  text-align: right;
}

/* --------------------------------------------------------------------------
   Document pages (projects/all.html and other long-form subpages)
   -------------------------------------------------------------------------- */

.page-head {
  padding-block: 88px 56px;
  border-bottom: 1px solid var(--ink);
}

.page-title {
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1;
  letter-spacing: -0.035em;
}

.page-lead {
  margin-top: 24px;
  max-width: 58ch;
  font-size: 18px;
  line-height: 1.5;
}

.entries { padding-bottom: 96px; }

.entry {
  padding-block: 56px;
  border-bottom: 1px solid var(--rule);
  scroll-margin-top: 32px;
}

.entry__grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 64px;
  align-items: start;
}

.entry__title {
  margin-top: 14px;
  font-size: clamp(26px, 3vw, 34px);
  line-height: 1.1;
}

.entry__title a { color: var(--ink); }
.entry__title a:hover { color: var(--violet); text-decoration: none; }

.entry__title a[target="_blank"]::after {
  content: " ↗";
  font-family: var(--mono);
  font-size: 0.5em;
  color: var(--muted);
}

.entry__body {
  margin-top: 22px;
  max-width: 66ch;
  font-size: 16px;
  line-height: 1.6;
}

.entry__body p + p { margin-top: 16px; }

.entry__meta { border-top: 1px solid var(--rule); }

.entry__meta > div {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 18px;
  padding: 13px 0;
  border-bottom: 1px dashed var(--dashed);
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.5;
}

.entry__meta dt { color: var(--muted); }
.entry__meta dd { margin: 0; color: var(--ink); }

/* Nested minor projects inside a single entry. */
.subentries { margin-top: 8px; }

.subentry {
  padding: 20px 0;
  border-bottom: 1px dashed var(--dashed);
  max-width: 66ch;
}
.subentry:last-child { border-bottom: 0; }

.subentry h3 {
  font-size: 17px;
  line-height: 1.3;
  letter-spacing: -0.01em;
  margin-bottom: 6px;
}

.subentry p { font-size: 15px; line-height: 1.55; }

.backlink {
  display: inline-block;
  margin-top: 40px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--violet);
}

/* --------------------------------------------------------------------------
   Contact
   -------------------------------------------------------------------------- */

.contact__grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 64px;
  align-items: start;
}

.contact__lead { margin-top: 0; }

/* The mail link is the section's one action, so it gets a slab of its own
   rather than floating under the paragraph. */
.contact__cta {
  margin-top: 40px;
  border-top: 1px solid var(--ink-border);
  border-bottom: 1px solid var(--ink-border);
  padding-block: 24px;
}

.contact__cta-label {
  display: block;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--dark-muted);
  margin-bottom: 12px;
}

.contact__mail {
  display: inline-flex;
  align-items: baseline;
  gap: 14px;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--white);
  transition: color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.contact__mail::after {
  content: "→";
  font-family: var(--mono);
  font-size: 0.6em;
  color: var(--violet-lift);
}

.contact__mail:hover { color: var(--violet-lift); text-decoration: none; }

.contact__list {
  border-top: 1px solid var(--ink-border);
}

.contact__list div {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 0;
  border-bottom: 1px dashed var(--ink-border);
  font-family: var(--mono);
  font-size: 13px;
}

.contact__list dt { color: var(--dark-muted); }
.contact__list dd { margin: 0; color: var(--white); }
.contact__list dd a { color: var(--white); }
.contact__list dd a:hover { color: var(--violet-lift); }

.socials {
  margin-top: 28px;
  display: flex;
  gap: 18px;
}

.socials a {
  color: var(--dark-muted);
  display: inline-flex;
  transition: color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.socials a:hover { color: var(--white); }
.socials svg { width: 18px; height: 18px; }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.foot {
  background: var(--ink);
  color: var(--dark-body);
  border-top: 1px solid var(--ink-border);
  background-image: radial-gradient(circle, #1e1729 1.2px, transparent 1.2px);
  background-size: 24px 24px;
  padding-block: 72px 32px;
}

.foot__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 56px;
}

.foot__blurb {
  max-width: 34ch;
  font-size: 14px;
  line-height: 1.6;
  color: var(--dark-body);
  margin-top: 18px;
}

.foot__head {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dark-muted);
  margin-bottom: 16px;
}

.foot__col li + li { margin-top: 10px; }
.foot__col a { font-size: 14px; color: var(--dark-body); }
.foot__col a:hover { color: var(--white); }

.foot__meta {
  margin-top: 56px;
  padding-top: 20px;
  border-top: 1px solid var(--ink-border);
  display: flex;
  justify-content: space-between;
  gap: 20px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--dark-muted);
}

/* --------------------------------------------------------------------------
   Responsive — one breakpoint, per DESIGN.md
   -------------------------------------------------------------------------- */

@media (max-width: 900px) {
  .band { padding-block: 80px; }
  .wrap, .nav__inner { padding-inline: 24px; }
  /* Headings run full width below this, leaving the numeral nowhere to sit
     without landing behind the type. */
  .numeral { display: none; }

  .hero__grid,
  .about__grid,
  .entry__grid,
  .contact__grid { grid-template-columns: 1fr; gap: 48px; }

  .page-head { padding-block: 56px 40px; }
  .entry { padding-block: 44px; }
  .entry__grid { gap: 36px; }

  .stack,
  .grid--3,
  .grid--2 { grid-template-columns: repeat(2, 1fr); }

  .facts { grid-template-columns: repeat(2, 1fr); gap: 20px 24px; }

  .nav__inner { flex-wrap: wrap; gap: 14px; }
  .nav__links { margin-left: 0; width: 100%; gap: 20px; flex-wrap: wrap; }

  .foot__grid { grid-template-columns: 1fr 1fr; gap: 40px; }
}

@media (max-width: 600px) {
  .band { padding-block: 64px; }
  .hero { padding-block: 56px 64px; }
  .sec-head { margin-bottom: 44px; }

  .nav__inner { flex-wrap: wrap; gap: 16px; padding-block: 16px; }
  .nav__links { margin-left: 0; width: 100%; gap: 18px; flex-wrap: wrap; }

  .facts { grid-template-columns: 1fr; gap: 18px; }
  .stack,
  .grid--3,
  .grid--2 { grid-template-columns: 1fr; }
  .cell { padding: 28px 24px; }

  .arc__row { grid-template-columns: 1fr; gap: 6px; }
  .cell--lead { padding: 28px 24px; }
  .cell--lead .cell__title { font-size: 22px; }
  .archive__row { grid-template-columns: 1fr; gap: 6px; }
  .archive__meta { text-align: left; }

  .foot__grid { grid-template-columns: 1fr; }
  .foot__meta { flex-direction: column; gap: 8px; }

  .btn--primary, .btn--ghost { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .runlog__row { animation: none; opacity: 1; }
  .runlog__live::before { animation: none; }
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
  }
}
