/* ==========================================================================
   webworx.solutions
   Hand-written CSS. No framework, no build step, no preprocessor.
   Organised as: tokens → reset → primitives → layout → components → utilities.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Design tokens
   Light is the base palette. Dark is redefined twice — once for the system
   preference, once for an explicit toggle — so the toggle wins in both
   directions and no colour is ever defined only inside a media query.
   -------------------------------------------------------------------------- */

:root {
  /* Surfaces */
  --bg:            #faf9f7;
  --bg-sunk:       #f2f0ec;
  --surface:       #ffffff;
  --surface-alt:   #f6f4f1;

  /* Ink */
  --ink:           #16181d;
  --ink-soft:      #3d434c;
  /* muted and faint are both held above 4.5:1 against --bg and --bg-sunk;
     see the contrast note in README.md before lightening either. */
  --ink-muted:     #5a6068;
  --ink-faint:     #6b7178;

  /* Lines */
  --rule:          #e4e1dc;
  --rule-strong:   #d2cec7;

  /* Accent — burnt copper */
  --accent:        #a8471a;
  --accent-hover:  #8c3a14;
  --accent-wash:   #fbeee7;
  --accent-line:   #eccdb9;

  /* Secondary — slate, used for stack metadata */
  --slate:         #3a5570;
  --slate-wash:    #eef2f6;
  --slate-line:    #d5dfe8;

  /* Effects */
  --shadow-sm:     0 1px 2px rgba(22, 24, 29, .05);
  --shadow-md:     0 2px 4px rgba(22, 24, 29, .04), 0 8px 24px rgba(22, 24, 29, .06);
  --shadow-lg:     0 4px 8px rgba(22, 24, 29, .05), 0 16px 48px rgba(22, 24, 29, .09);

  /* Type */
  --font-sans: "Space Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI",
               Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-text: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, "SF Mono", Menlo,
               Consolas, "Liberation Mono", monospace;

  /* Metrics */
  --measure:       68ch;
  --wrap:          1140px;
  --wrap-narrow:   860px;
  --gutter:        clamp(1.25rem, 4vw, 3rem);
  --radius:        10px;
  --radius-sm:     6px;
  --radius-lg:     16px;

  /* Motion */
  --ease:          cubic-bezier(.2, .7, .3, 1);
  --dur:           .32s;

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg:            #0e1013;
    --bg-sunk:       #0a0c0f;
    --surface:       #15181d;
    --surface-alt:   #1a1e24;

    --ink:           #e9eaec;
    --ink-soft:      #c3c7cd;
    --ink-muted:     #a7adb6;
    --ink-faint:     #838a94;

    --rule:          #242930;
    --rule-strong:   #333a43;

    --accent:        #ff9257;
    --accent-hover:  #ffab7c;
    --accent-wash:   #26170f;
    --accent-line:   #4a2c1a;

    --slate:         #9dbde0;
    --slate-wash:    #141c25;
    --slate-line:    #27353f;

    --shadow-sm:     0 1px 2px rgba(0, 0, 0, .4);
    --shadow-md:     0 2px 4px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .4);
    --shadow-lg:     0 4px 8px rgba(0, 0, 0, .3), 0 16px 48px rgba(0, 0, 0, .5);

    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg:            #0e1013;
  --bg-sunk:       #0a0c0f;
  --surface:       #15181d;
  --surface-alt:   #1a1e24;

  --ink:           #e9eaec;
  --ink-soft:      #c3c7cd;
  --ink-muted:     #a7adb6;
  --ink-faint:     #838a94;

  --rule:          #242930;
  --rule-strong:   #333a43;

  --accent:        #ff9257;
  --accent-hover:  #ffab7c;
  --accent-wash:   #26170f;
  --accent-line:   #4a2c1a;

  --slate:         #9dbde0;
  --slate-wash:    #141c25;
  --slate-line:    #27353f;

  --shadow-sm:     0 1px 2px rgba(0, 0, 0, .4);
  --shadow-md:     0 2px 4px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .4);
  --shadow-lg:     0 4px 8px rgba(0, 0, 0, .3), 0 16px 48px rgba(0, 0, 0, .5);

  color-scheme: dark;
}

/* --------------------------------------------------------------------------
   2. Reset
   -------------------------------------------------------------------------- */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 6rem;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, svg { max-width: 100%; height: auto; display: block; }
[hidden] { display: none !important; }

h1, h2, h3, h4 {
  font-family: var(--font-sans);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -.022em;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0 0 1.1em; max-width: var(--measure); }
p:last-child { margin-bottom: 0; }

ul, ol { margin: 0; padding: 0; }

a {
  color: var(--accent);
  text-decoration-color: var(--accent-line);
  text-underline-offset: .22em;
  text-decoration-thickness: 1px;
  transition: color var(--dur) var(--ease), text-decoration-color var(--dur) var(--ease);
}
a:hover { color: var(--accent-hover); text-decoration-color: currentColor; }

button { font: inherit; color: inherit; }

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

::selection { background: var(--accent); color: var(--bg); }

/* --------------------------------------------------------------------------
   3. Primitives
   -------------------------------------------------------------------------- */

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

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 200;
  padding: .7rem 1.1rem;
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius-sm);
  font-weight: 600;
  text-decoration: none;
  transition: top .2s var(--ease);
}
.skip-link:focus { top: 1rem; color: #fff; }

/* Mono eyebrow label — used for section numbers and metadata */
.label {
  font-family: var(--font-mono);
  font-size: .6875rem;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.lede {
  font-size: clamp(1.0625rem, 1.6vw, 1.25rem);
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 62ch;
}

/* --------------------------------------------------------------------------
   4. Header
   -------------------------------------------------------------------------- */

.masthead {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.6) blur(14px);
  -webkit-backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.masthead[data-stuck="true"] { border-bottom-color: var(--rule); }

.masthead__inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  min-height: 4.25rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: .95rem;
  letter-spacing: -.01em;
  color: var(--ink);
  text-decoration: none;
  margin-right: auto;
  white-space: nowrap;
}
.brand:hover { color: var(--ink); }
.brand__mark { width: 22px; height: 22px; flex: none; color: var(--accent); }
.brand__dim { color: var(--ink-faint); font-weight: 400; }

.nav {
  display: flex;
  align-items: center;
  gap: .15rem;
  padding: .25rem;
  border: 1px solid var(--rule);
  border-radius: 100px;
  background: color-mix(in srgb, var(--surface) 70%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
@media (max-width: 900px) { .nav { display: none; } }

.nav__link {
  display: inline-block;
  padding: .4rem .78rem;
  border-radius: 100px;
  font-family: var(--font-mono);
  font-size: .74rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-muted);
  text-decoration: none;
  transition: color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.nav__link:hover { color: var(--ink); background: var(--surface-alt); }
.nav__link[aria-current="true"] { color: var(--accent); background: var(--accent-wash); }

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 2.3rem;
  height: 2.3rem;
  flex: none;
  border: 1px solid var(--rule);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink-muted);
  cursor: pointer;
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease),
              background var(--dur) var(--ease);
}
.icon-btn:hover { color: var(--ink); border-color: var(--rule-strong); }
.icon-btn svg { width: 17px; height: 17px; }

.theme-toggle .icon-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: none; }
  :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: block; }
}

/* --------------------------------------------------------------------------
   5. Hero — bento layout, aurora backdrop, instrument readout
   -------------------------------------------------------------------------- */

.hero {
  position: relative;
  padding-block: clamp(3rem, 7vw, 5.5rem) clamp(3rem, 6vw, 5rem);
  overflow: clip;
  isolation: isolate;
}

/* Aurora: three slow-drifting colour fields. Purely decorative. */
.hero__aurora {
  position: absolute;
  inset: -20% -10% auto -10%;
  height: 130%;
  z-index: -2;
  filter: blur(72px);
  opacity: .5;
  pointer-events: none;
}
:root[data-theme="dark"] .hero__aurora { opacity: .38; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .hero__aurora { opacity: .38; }
}

.hero__blob {
  position: absolute;
  border-radius: 50%;
  will-change: transform;
}
.hero__blob--a {
  width: 46vw; height: 46vw; min-width: 380px; min-height: 380px;
  left: -6%; top: -12%;
  background: radial-gradient(circle, var(--accent) 0%, transparent 68%);
  opacity: .34;
  animation: drift-a 26s var(--ease) infinite alternate;
}
.hero__blob--b {
  width: 40vw; height: 40vw; min-width: 320px; min-height: 320px;
  right: -4%; top: -6%;
  background: radial-gradient(circle, var(--slate) 0%, transparent 68%);
  opacity: .3;
  animation: drift-b 32s var(--ease) infinite alternate;
}
.hero__blob--c {
  width: 34vw; height: 34vw; min-width: 280px; min-height: 280px;
  left: 42%; bottom: -18%;
  background: radial-gradient(circle, var(--accent) 0%, transparent 70%);
  opacity: .2;
  animation: drift-c 38s var(--ease) infinite alternate;
}

@keyframes drift-a { to { transform: translate3d(9%, 7%, 0) scale(1.14); } }
@keyframes drift-b { to { transform: translate3d(-11%, 10%, 0) scale(1.1); } }
@keyframes drift-c { to { transform: translate3d(7%, -9%, 0) scale(1.18); } }

/* Faint engineering grid, masked so it fades out downward */
.hero__grid-lines {
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(to right, var(--rule) 1px, transparent 1px),
    linear-gradient(to bottom, var(--rule) 1px, transparent 1px);
  background-size: 68px 68px;
  opacity: .5;
  -webkit-mask-image: radial-gradient(120% 78% at 50% 0%, #000 12%, transparent 74%);
          mask-image: radial-gradient(120% 78% at 50% 0%, #000 12%, transparent 74%);
  pointer-events: none;
}

.hero__inner {
  display: grid;
  gap: clamp(2.25rem, 5vw, 3.5rem);
  align-items: start;
}
@media (min-width: 1040px) {
  .hero__inner { grid-template-columns: minmax(0, 1.08fr) minmax(320px, .92fr); }
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  margin-bottom: 1.5rem;
  padding: .34rem .8rem .34rem .6rem;
  border: 1px solid var(--rule-strong);
  border-radius: 100px;
  background: color-mix(in srgb, var(--surface) 70%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.hero__eyebrow::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-wash);
  animation: pulse 2.6s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 3px var(--accent-wash); }
  50%      { box-shadow: 0 0 0 6px transparent; }
}

.hero__title {
  /* Capped so the name always fits the left grid column — above ~1040px the
     column is roughly half the wrapper, not the full viewport, so a vw-only
     scale overshoots and runs under the readout panel. */
  font-size: clamp(2.5rem, 5.4vw, 4.25rem);
  font-weight: 700;
  letter-spacing: -.042em;
  line-height: .96;
  margin-bottom: 1.15rem;
}

.hero__role {
  font-family: var(--font-sans);
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  font-weight: 500;
  line-height: 1.35;
  color: var(--ink-soft);
  letter-spacing: -.018em;
  margin-bottom: 1.5rem;
  max-width: 36ch;
}

.hero__thesis {
  font-size: clamp(1rem, 1.5vw, 1.125rem);
  line-height: 1.65;
  color: var(--ink-soft);
  max-width: 58ch;
  margin-bottom: 2rem;
}

/* Gradient emphasis — falls back to the accent colour where unsupported */
.grad {
  font-weight: 600;
  color: var(--accent);
  background: linear-gradient(100deg, var(--accent) 8%, var(--slate) 96%);
  -webkit-background-clip: text;
          background-clip: text;
}
@supports (-webkit-background-clip: text) or (background-clip: text) {
  .grad { -webkit-text-fill-color: transparent; }
}

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem 1.4rem;
  margin-bottom: 2.25rem;
}
.hero__meta li {
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  font-family: var(--font-mono);
  font-size: .765rem;
  color: var(--ink-muted);
}
.hero__meta svg { width: 14px; height: 14px; color: var(--accent); flex: none; opacity: .75; }

.hero__actions { display: flex; flex-wrap: wrap; gap: .7rem; }

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .78rem 1.3rem;
  border-radius: 100px;
  border: 1px solid transparent;
  font-family: var(--font-sans);
  font-size: .9rem;
  font-weight: 500;
  letter-spacing: -.005em;
  text-decoration: none;
  cursor: pointer;
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease),
              color var(--dur) var(--ease), transform var(--dur) var(--ease),
              box-shadow var(--dur) var(--ease);
}
.btn svg { width: 15px; height: 15px; flex: none; transition: transform var(--dur) var(--ease); }
.btn:hover { transform: translateY(-2px); }
.btn:hover svg { transform: translateX(3px); }

.btn--primary {
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 72%, var(--slate)));
  color: #fff;
  box-shadow: 0 4px 14px color-mix(in srgb, var(--accent) 30%, transparent);
}
.btn--primary:hover {
  color: #fff;
  box-shadow: 0 8px 26px color-mix(in srgb, var(--accent) 40%, transparent);
}
:root[data-theme="dark"] .btn--primary { color: #1a0d06; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .btn--primary { color: #1a0d06; }
}

.btn--ghost {
  background: color-mix(in srgb, var(--surface) 76%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-color: var(--rule-strong);
  color: var(--ink);
}
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }

/* --- Instrument readout ------------------------------------------------- */

.readout {
  position: relative;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius-lg);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(16px) saturate(1.3);
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
/* Sweep: a slow highlight passing down the panel */
.readout::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 0%,
              color-mix(in srgb, var(--accent) 12%, transparent) 50%, transparent 100%);
  transform: translateY(-100%);
  animation: sweep 7s ease-in-out infinite;
  pointer-events: none;
}
@keyframes sweep {
  0%, 62%  { transform: translateY(-100%); }
  100%     { transform: translateY(100%); }
}

.readout__bar {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .8rem 1.1rem;
  border-bottom: 1px solid var(--rule);
  background: var(--surface-alt);
}
.readout__led {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #2ea043;
  box-shadow: 0 0 0 3px color-mix(in srgb, #2ea043 22%, transparent);
  flex: none;
}
.readout__name {
  font-family: var(--font-mono);
  font-size: .74rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.readout__state {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: .66rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #2ea043;
}

.readout__body { padding: 1.15rem 1.25rem 1.25rem; }

.readout__cmd {
  font-family: var(--font-mono);
  font-size: .8rem;
  color: var(--ink-soft);
  margin: 0 0 1rem;
  max-width: none;
}
.readout__cmd span { color: var(--accent); margin-right: .5rem; }

.readout__rows { margin: 0; display: grid; gap: .1rem; }
.readout__rows > div {
  display: flex;
  align-items: baseline;
  gap: .5rem;
  padding: .32rem 0;
  border-bottom: 1px dotted var(--rule);
}
.readout__rows > div:last-child { border-bottom: 0; }
.readout__rows dt {
  font-family: var(--font-mono);
  font-size: .755rem;
  color: var(--ink-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.readout__rows dd {
  margin: 0 0 0 auto;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: .95rem;
  color: var(--ink);
  letter-spacing: -.01em;
  font-variant-numeric: tabular-nums;
}
.readout__rows dd.is-accent { color: var(--accent); }

.readout__foot {
  margin: 1rem 0 0;
  padding-top: .85rem;
  border-top: 1px solid var(--rule);
  font-family: var(--font-mono);
  font-size: .7rem;
  line-height: 1.5;
  color: var(--ink-faint);
  max-width: none;
}
.readout__caret {
  display: inline-block;
  width: 7px; height: 1em;
  margin-left: .3rem;
  vertical-align: -2px;
  background: var(--accent);
  animation: blink 1.15s steps(2, start) infinite;
}
@keyframes blink { to { opacity: 0; } }

/* --- Bento stats -------------------------------------------------------- */

.bento {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: .75rem;
  margin-top: clamp(2.5rem, 5vw, 3.75rem);
}
@media (min-width: 720px)  { .bento { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1040px) { .bento { grid-template-columns: repeat(6, 1fr); } }

.bento__tile {
  list-style: none;
  position: relative;
  padding: 1.35rem 1.25rem;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  overflow: hidden;
  transition: border-color var(--dur) var(--ease), transform var(--dur) var(--ease),
              box-shadow var(--dur) var(--ease);
}
.bento__tile:hover {
  border-color: var(--accent-line);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
@media (min-width: 1040px) {
  .bento__tile { grid-column: span 1; }
  .bento__tile--wide { grid-column: span 2; }
}
@media (max-width: 719px) {
  .bento__tile--wide, .bento__tile--accent { grid-column: span 2; }
}

.bento__tile--accent {
  border-color: var(--accent-line);
  background:
    linear-gradient(135deg, var(--accent-wash), transparent 70%),
    color-mix(in srgb, var(--surface) 82%, transparent);
}

.bento__num {
  display: block;
  font-family: var(--font-sans);
  font-size: clamp(1.75rem, 3.2vw, 2.35rem);
  font-weight: 700;
  letter-spacing: -.04em;
  line-height: 1;
  margin-bottom: .5rem;
  font-variant-numeric: tabular-nums;
}
.bento__tile--accent .bento__num { color: var(--accent); }

.bento__label {
  display: block;
  font-family: var(--font-mono);
  font-size: .675rem;
  line-height: 1.5;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

/* --- Technology ticker -------------------------------------------------- */

.ticker {
  position: relative;
  overflow: hidden;
  border-block: 1px solid var(--rule);
  background: var(--bg-sunk);
  padding-block: .85rem;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.ticker__track { display: flex; width: max-content; animation: marquee 58s linear infinite; }
.ticker:hover .ticker__track { animation-play-state: paused; }
.ticker__set { display: flex; align-items: center; }
.ticker__set span {
  font-family: var(--font-mono);
  font-size: .78rem;
  letter-spacing: .04em;
  color: var(--ink-muted);
  padding-inline: 1.35rem;
  white-space: nowrap;
}
.ticker__set span::after {
  content: "";
  display: inline-block;
  width: 4px; height: 4px;
  margin-left: 1.35rem;
  vertical-align: middle;
  border-radius: 50%;
  background: var(--accent);
  opacity: .4;
}
@keyframes marquee { to { transform: translateX(-50%); } }

/* --------------------------------------------------------------------------
   6. Sections
   -------------------------------------------------------------------------- */

.section { padding-block: clamp(3.5rem, 8vw, 6.5rem); }
.section--sunk { background: var(--bg-sunk); border-block: 1px solid var(--rule); }

.section__head {
  display: grid;
  gap: 1rem;
  margin-bottom: clamp(2.25rem, 5vw, 3.5rem);
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule-strong);
}
.section__num {
  font-family: var(--font-mono);
  font-size: .7rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent);
}
.section__title {
  font-size: clamp(1.7rem, 3.6vw, 2.5rem);
  letter-spacing: -.03em;
}
.section__intro { margin-top: .35rem; }

/* --------------------------------------------------------------------------
   7. Method note (provenance)
   -------------------------------------------------------------------------- */

.method {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
  margin-top: 2.25rem;
}
.method__step { background: var(--surface); padding: 1.5rem 1.4rem; }
.method__step h3 {
  font-size: .95rem;
  margin-bottom: .5rem;
  display: flex;
  align-items: baseline;
  gap: .6rem;
}
.method__step h3 span {
  font-family: var(--font-mono);
  font-size: .7rem;
  color: var(--accent);
  letter-spacing: .1em;
}
.method__step p {
  font-size: .9rem;
  line-height: 1.6;
  color: var(--ink-muted);
  margin: 0;
}

.callout {
  border-left: 3px solid var(--accent);
  background: var(--accent-wash);
  padding: 1.15rem 1.35rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-top: 2rem;
}
.callout p { font-size: .93rem; color: var(--ink-soft); margin: 0; max-width: none; }
.callout strong { color: var(--ink); }

/* --------------------------------------------------------------------------
   8. Findings — the through-lines
   -------------------------------------------------------------------------- */

.findings { display: grid; gap: 1.25rem; }
@media (min-width: 860px) { .findings { grid-template-columns: repeat(2, 1fr); } }

.finding {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 1.75rem 1.6rem;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease),
              transform var(--dur) var(--ease);
}
.finding:hover {
  border-color: var(--rule-strong);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.finding__idx {
  font-family: var(--font-mono);
  font-size: .7rem;
  letter-spacing: .12em;
  color: var(--accent);
  display: block;
  margin-bottom: .9rem;
}
.finding__title {
  font-size: 1.2rem;
  letter-spacing: -.02em;
  margin-bottom: .7rem;
}
.finding__body {
  font-size: .945rem;
  line-height: 1.65;
  color: var(--ink-soft);
  margin-bottom: 1.1rem;
  max-width: none;
}
.finding__body strong { color: var(--ink); font-weight: 600; }

.evidence {
  border-top: 1px dashed var(--rule-strong);
  padding-top: .95rem;
  display: grid;
  gap: .5rem;
}
.evidence__label {
  font-family: var(--font-mono);
  font-size: .65rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.evidence li {
  list-style: none;
  position: relative;
  padding-left: 1.05rem;
  font-size: .86rem;
  line-height: 1.55;
  color: var(--ink-muted);
}
.evidence li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .62em;
  width: 5px;
  height: 5px;
  border-radius: 1px;
  background: var(--accent);
  opacity: .55;
}
.evidence code {
  font-family: var(--font-mono);
  font-size: .89em;
  color: var(--slate);
  background: var(--slate-wash);
  padding: .08em .35em;
  border-radius: 3px;
  border: 1px solid var(--slate-line);
}

/* --------------------------------------------------------------------------
   9. Capabilities
   -------------------------------------------------------------------------- */

.caps { display: grid; gap: 1px; background: var(--rule);
        border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; }

.cap { background: var(--surface); }

.cap__btn {
  width: 100%;
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 1.4rem;
  background: none;
  border: 0;
  text-align: left;
  cursor: pointer;
  transition: background var(--dur) var(--ease);
}
.cap__btn:hover { background: var(--surface-alt); }

.cap__icon {
  width: 2.1rem; height: 2.1rem;
  display: grid; place-items: center;
  border-radius: var(--radius-sm);
  background: var(--accent-wash);
  color: var(--accent);
  flex: none;
}
.cap__icon svg { width: 16px; height: 16px; }

.cap__name {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 1.02rem;
  letter-spacing: -.015em;
  color: var(--ink);
}
.cap__sub {
  display: block;
  font-family: var(--font-text);
  font-weight: 400;
  font-size: .85rem;
  color: var(--ink-muted);
  letter-spacing: 0;
  margin-top: .18rem;
}

.cap__depth {
  font-family: var(--font-mono);
  font-size: .68rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--slate);
  background: var(--slate-wash);
  border: 1px solid var(--slate-line);
  padding: .22rem .55rem;
  border-radius: 100px;
  white-space: nowrap;
}
@media (max-width: 700px) { .cap__depth { display: none; } }

.cap__chev {
  width: 16px; height: 16px;
  color: var(--ink-faint);
  transition: transform var(--dur) var(--ease);
}
.cap__btn[aria-expanded="true"] .cap__chev { transform: rotate(180deg); }

.cap__panel {
  padding: 0 1.4rem 1.5rem;
  border-top: 1px dashed var(--rule);
  margin-top: -1px;
}
.cap__panel > * { padding-top: 1.25rem; }
.cap__panel p { font-size: .93rem; color: var(--ink-soft); }

.cap__proof { display: grid; gap: .55rem; padding-top: .25rem; }
.cap__proof li {
  list-style: none;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: .65rem;
  font-size: .88rem;
  line-height: 1.55;
  color: var(--ink-muted);
}
.cap__proof li::before {
  content: "→";
  font-family: var(--font-mono);
  color: var(--accent);
  font-size: .82rem;
  line-height: 1.75;
}
.cap__proof strong { color: var(--ink-soft); font-weight: 600; }

/* --------------------------------------------------------------------------
   10. Work / project cards
   -------------------------------------------------------------------------- */

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--rule);
}

.filter {
  padding: .42rem .85rem;
  border: 1px solid var(--rule-strong);
  border-radius: 100px;
  background: var(--surface);
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .04em;
  color: var(--ink-muted);
  cursor: pointer;
  transition: all var(--dur) var(--ease);
}
.filter:hover { color: var(--ink); border-color: var(--ink-faint); }
.filter[aria-pressed="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
:root[data-theme="dark"] .filter[aria-pressed="true"] { color: #1a0d06; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .filter[aria-pressed="true"] { color: #1a0d06; }
}

.work { display: grid; gap: 1.25rem; }
@media (min-width: 900px) { .work { grid-template-columns: repeat(2, 1fr); } }

.card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 1.6rem;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease),
              transform var(--dur) var(--ease), opacity .25s var(--ease);
}
.card:hover {
  border-color: var(--rule-strong);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.card[data-hidden="true"] { display: none; }

.card--feature { grid-column: 1 / -1; }
@media (min-width: 900px) {
  .card--feature {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    gap: 2.25rem;
    padding: 2rem;
  }
  .card--feature .card__aside { border-top: 0; padding-top: 0; }
}

.card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: .85rem;
}

.card__kind {
  font-family: var(--font-mono);
  font-size: .65rem;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.card__vis {
  font-family: var(--font-mono);
  font-size: .62rem;
  letter-spacing: .09em;
  text-transform: uppercase;
  padding: .18rem .5rem;
  border-radius: 3px;
  white-space: nowrap;
  border: 1px solid var(--rule-strong);
  color: var(--ink-faint);
}
.card__vis[data-vis="private"] {
  color: var(--slate);
  background: var(--slate-wash);
  border-color: var(--slate-line);
}

.card__title { font-size: 1.28rem; letter-spacing: -.024em; margin-bottom: .6rem; }
.card__title a { color: var(--ink); text-decoration: none; }
.card__title a:hover { color: var(--accent); }

.card__desc {
  font-size: .93rem;
  line-height: 1.62;
  color: var(--ink-soft);
  margin-bottom: 1.1rem;
  max-width: none;
}
.card__desc strong { color: var(--ink); font-weight: 600; }

.card__note {
  font-size: .84rem;
  line-height: 1.55;
  color: var(--ink-muted);
  border-left: 2px solid var(--accent-line);
  padding-left: .85rem;
  margin-bottom: 1.15rem;
  max-width: none;
}

.card__aside { margin-top: auto; }

.card__metrics {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem 1.25rem;
  padding-block: .9rem;
  margin-bottom: .9rem;
  border-block: 1px solid var(--rule);
}
.card__metrics div { display: grid; }
.card__metrics dt {
  font-family: var(--font-mono);
  font-size: .62rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.card__metrics dd {
  margin: 0;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: .95rem;
  color: var(--ink);
  letter-spacing: -.01em;
}

.stack { display: flex; flex-wrap: wrap; gap: .35rem; }
.stack li {
  list-style: none;
  font-family: var(--font-mono);
  font-size: .69rem;
  letter-spacing: .02em;
  color: var(--slate);
  background: var(--slate-wash);
  border: 1px solid var(--slate-line);
  padding: .2rem .5rem;
  border-radius: 3px;
}

.card__link {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  margin-top: 1.1rem;
  font-family: var(--font-mono);
  font-size: .74rem;
  letter-spacing: .04em;
  text-decoration: none;
}
.card__link svg { width: 13px; height: 13px; transition: transform var(--dur) var(--ease); }
.card__link:hover svg { transform: translate(2px, -2px); }

.empty-note {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--ink-muted);
  font-family: var(--font-mono);
  font-size: .85rem;
}

/* --------------------------------------------------------------------------
   11. Technology index
   -------------------------------------------------------------------------- */

.tech-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
}
.tech-group { background: var(--surface); padding: 1.4rem; }
.tech-group h3 {
  font-family: var(--font-mono);
  font-size: .7rem;
  font-weight: 500;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: .95rem;
  padding-bottom: .6rem;
  border-bottom: 1px solid var(--rule);
}
.tech-group ul { display: flex; flex-wrap: wrap; gap: .3rem; }
.tech-group li {
  list-style: none;
  font-size: .82rem;
  color: var(--ink-soft);
  background: var(--surface-alt);
  border: 1px solid var(--rule);
  padding: .17rem .5rem;
  border-radius: 3px;
}

/* --------------------------------------------------------------------------
   12. Track record timeline
   -------------------------------------------------------------------------- */

.timeline { position: relative; display: grid; gap: 0; }
.timeline::before {
  content: "";
  position: absolute;
  left: 5px;
  top: .6rem;
  bottom: .6rem;
  width: 1px;
  background: linear-gradient(var(--accent) 0 12%, var(--rule-strong) 40%);
}

.tl-item {
  position: relative;
  padding-left: 2rem;
  padding-block: 1rem;
  border-bottom: 1px solid var(--rule);
}
.tl-item:last-child { border-bottom: 0; }
.tl-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1.5rem;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--bg-sunk);
  border: 2px solid var(--rule-strong);
}
.tl-item[data-current="true"]::before {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-wash);
}

.tl-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .35rem .85rem;
  margin-bottom: .3rem;
}
.tl-org { font-family: var(--font-sans); font-weight: 600; font-size: 1rem; letter-spacing: -.015em; }
.tl-role { font-size: .88rem; color: var(--ink-muted); }
.tl-when {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: .72rem;
  color: var(--ink-faint);
  white-space: nowrap;
}
@media (max-width: 640px) { .tl-when { margin-left: 0; } }
.tl-what { font-size: .875rem; color: var(--ink-soft); margin: 0; max-width: none; }

/* --------------------------------------------------------------------------
   13. Contact + footer
   -------------------------------------------------------------------------- */

.contact {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  padding: clamp(2rem, 5vw, 3.25rem);
  box-shadow: var(--shadow-lg);
  text-align: center;
}
.contact h2 { font-size: clamp(1.6rem, 3.4vw, 2.2rem); margin-bottom: .9rem; }
.contact p { margin-inline: auto; margin-bottom: 2rem; }
.contact__actions { display: flex; flex-wrap: wrap; gap: .75rem; justify-content: center; }

.site-foot {
  border-top: 1px solid var(--rule);
  padding-block: 2.25rem;
  margin-top: clamp(3rem, 7vw, 5rem);
}
.site-foot__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.site-foot p {
  font-family: var(--font-mono);
  font-size: .72rem;
  color: var(--ink-faint);
  margin: 0;
  line-height: 1.6;
}
.site-foot a { color: var(--ink-muted); }
.site-foot a:hover { color: var(--accent); }

/* --------------------------------------------------------------------------
   14. Scroll reveal + motion
   -------------------------------------------------------------------------- */

/* Gated behind .js (set by theme.js before first paint): with scripting
   blocked nothing would ever add .is-in, and every revealed section would
   render invisible. Without the class these rules never apply at all. */
.js .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .6s var(--ease), transform .6s var(--ease);
}
.js .reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  .js .reveal { opacity: 1; transform: none; }
  .btn:hover, .card:hover, .finding:hover, .bento__tile:hover { transform: none; }

  /* Decorative motion is switched off entirely, not merely shortened. */
  .hero__blob,
  .readout::after,
  .readout__caret,
  .hero__eyebrow::before,
  .ticker__track { animation: none !important; }
  .readout::after { opacity: 0; }
  .ticker__track { transform: none; }
}

/* --------------------------------------------------------------------------
   15. Print
   -------------------------------------------------------------------------- */

@media print {
  .masthead, .filters, .hero__actions, .contact__actions, .theme-toggle,
  .ticker, .hero__aurora, .hero__grid-lines, .readout__caret { display: none; }
  .showcase { grid-template-columns: repeat(2, 1fr); }
  .showcase__card, .principal { break-inside: avoid; box-shadow: none; }
  .readout::after, .card::before, .finding::before, .card::after, .finding::after { display: none; }
  .bento { grid-template-columns: repeat(3, 1fr); }
  body { background: #fff; color: #000; font-size: 10.5pt; }
  .section { padding-block: 1.25rem; break-inside: avoid; }
  .card, .finding, .cap { break-inside: avoid; border: 1px solid #ccc; box-shadow: none; }
  .cap__panel { display: block !important; }
  a { color: #000; text-decoration: underline; }
}

/* --------------------------------------------------------------------------
   16. Spacing utilities
   A deliberately tiny set. They exist so the markup carries no style
   attribute and the Content Security Policy can forbid inline style.
   -------------------------------------------------------------------------- */

.u-mt    { margin-top: 1rem; }
.u-mt-lg { margin-top: 2.5rem; }
.u-mb    { margin-bottom: 1rem; }

/* --------------------------------------------------------------------------
   17. Pointer spotlight
   A soft highlight that follows the cursor across a card. --mx/--my are set
   by main.js; with JS off they stay unset and the layer never paints.
   -------------------------------------------------------------------------- */

.card, .finding { position: relative; overflow: hidden; }

.card::before, .finding::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  opacity: 0;
  transition: opacity .35s var(--ease);
  background: radial-gradient(
    16rem circle at var(--mx, 50%) var(--my, 50%),
    color-mix(in srgb, var(--accent) 11%, transparent),
    transparent 62%);
  pointer-events: none;
}
.card:hover::before, .finding:hover::before { opacity: 1; }
.card > *, .finding > * { position: relative; z-index: 1; }

/* Accent hairline that draws in on hover */
.card::after, .finding::after {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 2px;
  z-index: 2;
  background: linear-gradient(90deg, var(--accent), var(--slate));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .45s var(--ease);
  pointer-events: none;
}
.card:hover::after, .finding:hover::after { transform: scaleX(1); }

.card--feature {
  border-color: var(--accent-line);
  background:
    linear-gradient(160deg, var(--accent-wash), transparent 42%),
    var(--surface);
}

/* Capability rows pick up an accent edge when open */
.cap__btn[aria-expanded="true"] { background: var(--surface-alt); }
.cap__btn[aria-expanded="true"] .cap__icon {
  background: var(--accent);
  color: var(--surface);
}
:root[data-theme="dark"] .cap__btn[aria-expanded="true"] .cap__icon { color: #1a0d06; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .cap__btn[aria-expanded="true"] .cap__icon { color: #1a0d06; }
}
.cap__icon { transition: background var(--dur) var(--ease), color var(--dur) var(--ease); }

/* Contact panel gets the same aurora treatment as the hero */
.contact {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(60ch 30ch at 50% -20%, var(--accent-wash), transparent 70%),
    var(--surface);
}

/* --------------------------------------------------------------------------
   18. Showcase — the two flagship products
   -------------------------------------------------------------------------- */

.showcase { display: grid; gap: 1.5rem; }
@media (min-width: 960px) { .showcase { grid-template-columns: repeat(2, 1fr); } }

.showcase__card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: clamp(1.5rem, 3vw, 2.15rem);
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(165deg, var(--accent-wash), transparent 38%),
    var(--surface);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease),
              transform var(--dur) var(--ease);
}
.showcase__card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}
/* Accent rail down the leading edge */
.showcase__card::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 0; bottom: 0;
  width: 3px;
  background: linear-gradient(var(--accent), var(--slate));
}

.showcase__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: .3rem;
}

.showcase__kind {
  font-family: var(--font-mono);
  font-size: .66rem;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0 0 .35rem;
  max-width: none;
}

.showcase__title {
  font-size: clamp(1.65rem, 3vw, 2.1rem);
  font-weight: 700;
  letter-spacing: -.035em;
  line-height: 1;
}

.showcase__badge {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  flex: none;
  font-family: var(--font-mono);
  font-size: .62rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #2ea043;
  border: 1px solid color-mix(in srgb, #2ea043 40%, transparent);
  background: color-mix(in srgb, #2ea043 10%, transparent);
  padding: .24rem .6rem;
  border-radius: 100px;
}
.showcase__badge::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #2ea043;
}

.showcase__domain {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  align-self: flex-start;
  margin-bottom: 1.15rem;
  font-family: var(--font-mono);
  font-size: .84rem;
  font-weight: 500;
  letter-spacing: -.01em;
  text-decoration: none;
  color: var(--accent);
  border-bottom: 1px solid var(--accent-line);
  padding-bottom: .1rem;
}
.showcase__domain svg { width: 13px; height: 13px; transition: transform var(--dur) var(--ease); }
.showcase__domain:hover { border-bottom-color: var(--accent); }
.showcase__domain:hover svg { transform: translate(2px, -2px); }

.showcase__desc {
  font-size: .96rem;
  line-height: 1.65;
  color: var(--ink-soft);
  margin-bottom: 1.35rem;
  max-width: none;
}
.showcase__desc strong { color: var(--ink); font-weight: 600; }

.feature-list { display: grid; gap: .75rem; margin-bottom: 1.4rem; }
.feature-list li {
  list-style: none;
  position: relative;
  padding-left: 1.5rem;
  font-size: .885rem;
  line-height: 1.58;
  color: var(--ink-muted);
}
.feature-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .52em;
  width: 9px; height: 9px;
  border-radius: 2px;
  border: 2px solid var(--accent);
  transform: rotate(45deg);
}
.feature-list strong { color: var(--ink); font-weight: 600; }

.showcase__card .card__metrics { margin-bottom: 1.1rem; }
.showcase__card .stack { margin-bottom: 1.1rem; }

.showcase__note {
  margin: auto 0 0;
  padding-top: 1rem;
  border-top: 1px dashed var(--rule-strong);
  font-family: var(--font-mono);
  font-size: .7rem;
  line-height: 1.55;
  color: var(--ink-faint);
  max-width: none;
}

/* --------------------------------------------------------------------------
   19. Principal
   -------------------------------------------------------------------------- */

.principal {
  display: grid;
  gap: 1.5rem;
  align-items: start;
  padding: clamp(1.5rem, 3.5vw, 2.25rem);
  margin-bottom: clamp(2.5rem, 5vw, 3.5rem);
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(40ch 22ch at 0% 0%, var(--accent-wash), transparent 70%),
    var(--surface);
  box-shadow: var(--shadow-md);
}
@media (min-width: 640px) { .principal { grid-template-columns: auto 1fr; gap: 1.75rem; } }

.principal__id {
  display: grid;
  place-items: center;
  width: 4.5rem;
  height: 4.5rem;
  flex: none;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 60%, var(--slate)));
  color: #fff;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: -.02em;
  box-shadow: 0 6px 20px color-mix(in srgb, var(--accent) 30%, transparent);
}
:root[data-theme="dark"] .principal__id { color: #1a0d06; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .principal__id { color: #1a0d06; }
}

.principal__name {
  font-size: clamp(1.35rem, 2.6vw, 1.7rem);
  letter-spacing: -.03em;
  margin-bottom: .25rem;
}

.principal__title {
  font-family: var(--font-mono);
  font-size: .74rem;
  letter-spacing: .11em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
  max-width: none;
}

.principal__bio {
  font-size: .93rem;
  line-height: 1.65;
  color: var(--ink-soft);
  margin-bottom: 1.25rem;
  max-width: none;
}

.principal__facts {
  display: grid;
  gap: .5rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--rule);
}
.principal__facts li {
  list-style: none;
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  gap: .75rem;
  font-size: .85rem;
  line-height: 1.5;
  color: var(--ink-soft);
}
@media (max-width: 520px) { .principal__facts li { grid-template-columns: 1fr; gap: .1rem; } }
.principal__facts span {
  font-family: var(--font-mono);
  font-size: .66rem;
  letter-spacing: .11em;
  text-transform: uppercase;
  color: var(--ink-faint);
  padding-top: .2em;
}

.record-heading {
  font-family: var(--font-mono);
  font-size: .7rem;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.1rem;
  padding-bottom: .7rem;
  border-bottom: 1px solid var(--rule-strong);
}
