/* ajacobs.dev: a plain single-page portfolio.
   Cream page, aluminium panels, large Inter Tight headings, sentence-case labels.
   Hardware is accent only: red seven-segment readouts in small black windows (real numbers only),
   small red status dots, one orange primary button per screen.
   Infrastructure is the one section allowed to look like equipment. No photos.
   Spacing on a 4px grid. One easing curve. Fonts are self-hosted
   (Inter Tight, IBM Plex Mono for meta, DSEG7 for seven-segment digits). */

@font-face { font-family: "Inter Tight"; src: url("../fonts/inter-tight-var.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("../fonts/plex-mono-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "DSEG7"; src: url("../fonts/dseg7-bold.woff2") format("woff2"); font-weight: 700; font-display: block; }

:root {
  /* cream page, warm ramp */
  --page: #F1EDE8;
  --ink: #1C1A17;           /* primary text */
  --ink-2: #4A453E;         /* secondary text */
  --muted: #6A645B;         /* meta on cream */
  --line: rgba(28, 26, 23, .1);

  /* aluminium */
  --alu: #D3D3D0;
  --alu-ink-2: #3F3D39;     /* secondary text on aluminium */
  --alu-muted: #55534E;     /* meta on aluminium, AA */
  --alu-line: rgba(28, 26, 23, .12);

  --orange: #D4460F;
  --orange-hover: #BD3D0C;
  --accent-ink: #A2360B;    /* orange as text, AA on cream and aluminium */

  /* the black panel */
  --blk: #171614;
  --blk-2: #1F1E1B;
  --blk-line: rgba(239, 233, 222, .1);
  --on-blk: #EFE9DE;
  --on-blk-2: #B4AEA4;
  --on-blk-muted: #8E887E;

  /* LED windows */
  --win: #0C0B0A;
  --led: #FF3B26;
  --led-off: #5A1F18;
  --ghost: #34130F;

  --sans: "Inter Tight", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --seg: "DSEG7", var(--mono);
  --ease: cubic-bezier(.22, 1, .36, 1);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; }
p, h1, h2, h3, h4, ol, ul, dl, dd, figure { margin: 0; }
ol, ul { padding: 0; list-style: none; }
b, strong { font-weight: 500; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; border-radius: 6px; }

.skip { position: absolute; left: 16px; top: -64px; z-index: 30; background: var(--ink); color: var(--page); padding: 12px 16px; border-radius: 8px; text-decoration: none; }
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: 1200px; margin-inline: auto; padding-inline: 20px; }
@media (min-width: 768px) { .wrap { padding-inline: 40px; } }

/* ---------- type ---------- */
.lab { font-size: 13px; font-weight: 500; line-height: 20px; color: var(--muted); }
.meta { font-family: var(--mono); font-size: 12px; line-height: 16px; color: var(--muted); }
.h2 {
  font-size: clamp(2rem, 1.25rem + 3vw, 3.5rem);
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: -.03em;
  text-wrap: balance;
}
.h3 { font-size: 20px; font-weight: 500; line-height: 28px; letter-spacing: -.01em; }
.lede { margin-top: 16px; font-size: 18px; line-height: 28px; color: var(--ink-2); max-width: 36rem; text-wrap: pretty; }

.ic { width: 16px; height: 16px; fill: currentColor; flex-shrink: 0; }

/* ---------- hardware accents ---------- */
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--led); flex-shrink: 0; }

.win { display: inline-flex; align-items: center; justify-content: flex-end; padding: 8px 12px; background: var(--win); border-radius: 6px; box-shadow: inset 0 1px 3px rgba(0, 0, 0, .7); }
.win--lg { padding: 8px 12px; }
.win--xl { padding: 12px 16px; border-radius: 8px; }
.led {
  position: relative;
  isolation: isolate;
  display: inline-block;
  font-family: var(--seg);
  font-weight: 700;
  font-size: 16px;
  line-height: 1;
  white-space: nowrap;
  color: var(--led);
  text-shadow: 0 0 4px rgba(255, 59, 38, .5);
}
.win--lg .led { font-size: 24px; }
.win--xl .led { font-size: 48px; }
.led::before { content: attr(data-ghost); position: absolute; right: 0; top: 0; z-index: -1; color: var(--ghost); text-shadow: none; }
/* DSEG7 digits share one width, so a window sized in ch fits its unlit 8s exactly */
.led { text-align: right; }
.led[data-ghost="8"] { min-width: 1ch; }
.led[data-ghost="88"] { min-width: 2ch; }
.led[data-ghost="888"] { min-width: 3ch; }
.led[data-ghost="8888"] { min-width: 4ch; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 20px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 15px;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .15s var(--ease), border-color .15s var(--ease), transform .12s var(--ease);
}
.btn:active { transform: scale(.98); }
.btn--primary { background: var(--orange); color: #fff; }
.btn--primary:hover { background: var(--orange-hover); }
.btn--quiet { background: transparent; color: var(--ink); border-color: rgba(28, 26, 23, .2); }
.btn--quiet:hover { border-color: rgba(28, 26, 23, .5); }

/* ---------- panels ---------- */
.panel { background: var(--alu); border-radius: 16px; }
.panel .lab, .panel .meta { color: var(--alu-muted); }

/* ---------- header ---------- */
.top {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(241, 237, 232, .9);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s var(--ease);
}
.top.is-scrolled { border-bottom-color: var(--line); }
.top__in { display: flex; align-items: center; flex-wrap: wrap; column-gap: 24px; min-height: 64px; }
.top__name { font-weight: 600; font-size: 16px; letter-spacing: -.01em; text-decoration: none; margin-right: auto; padding-block: 20px; }
.top__cv { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; text-decoration: none; padding-block: 8px; transition: color .15s var(--ease); }
.top__cv:hover { color: var(--accent-ink); }
.top__nav { order: 3; flex-basis: 100%; display: flex; gap: 4px; margin-inline: -12px; padding-bottom: 8px; overflow-x: auto; scrollbar-width: none; }
.top__nav a { padding: 8px 12px; border-radius: 8px; font-size: 14px; line-height: 20px; color: var(--ink-2); text-decoration: none; white-space: nowrap; transition: color .15s var(--ease), background-color .15s var(--ease); }
.top__nav a:hover { color: var(--ink); }
.top__nav a[aria-current="true"] { color: var(--ink); background: var(--alu); }
@media (min-width: 760px) {
  .top__nav { order: 0; flex-basis: auto; margin-inline: 0; padding-bottom: 0; }
  .top__name { padding-block: 0; }
}

/* ---------- hero ---------- */
.hero {
  display: grid;
  gap: 48px;
  padding-block: 64px 48px;
  align-items: center;
}
@media (min-width: 960px) {
  .hero { grid-template-columns: minmax(0, 1fr) 340px; gap: 64px; padding-block: 112px 80px; min-height: calc(100svh - 64px); max-height: 960px; }
}
.hero__who { display: flex; align-items: center; gap: 12px; font-size: 15px; font-weight: 500; color: var(--ink-2); }
.hero__title {
  margin-top: 24px;
  font-size: clamp(2.5rem, 1.5rem + 3vw, 4rem);
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: -.03em;
  text-wrap: balance;
}
.hero__sub { margin-top: 24px; font-size: 18px; line-height: 28px; color: var(--ink-2); max-width: 36rem; text-wrap: pretty; }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 40px; }

/* the live card */
.live { padding: 24px; display: grid; gap: 20px; }
.live__head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.live__fig { display: flex; align-items: center; gap: 16px; padding-block: 20px; border-block: 1px solid var(--alu-line); }
.live__unit { font-size: 14px; line-height: 20px; color: var(--alu-ink-2); }
.live__by { font-size: 15px; line-height: 22px; color: var(--alu-ink-2); }
.live__by b { color: var(--ink); }
.live__link { display: inline-flex; align-items: center; gap: 8px; justify-self: start; font-size: 14px; font-weight: 500; text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: 2px; transition: color .15s var(--ease); }
.live__link:hover { color: var(--accent-ink); }

/* ---------- sections ---------- */
.section { padding-block: 64px; }
@media (min-width: 960px) { .section { padding-block: 112px; } }
.section__head { display: grid; gap: 32px; margin-bottom: 48px; align-items: end; }
@media (min-width: 960px) { .section__head { grid-template-columns: 1fr auto; } }

/* role filter */
.filter { display: grid; gap: 8px; }
.filter__row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.seg { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; background: var(--alu); border-radius: 12px; }
.seg button {
  min-height: 36px;
  padding: 0 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  font-size: 14px;
  font-weight: 500;
  color: var(--alu-ink-2);
  cursor: pointer;
  transition: background-color .15s var(--ease), color .15s var(--ease);
}
.seg button:hover { color: var(--ink); }
.seg button[aria-pressed="true"] { background: var(--page); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .06); }

/* project groups as datasheet rows */
.group + .group { margin-top: 64px; }
.group__head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.rows { padding-inline: 24px; }
.row { display: grid; gap: 12px; padding-block: 24px; border-top: 1px solid var(--alu-line); transition: opacity .2s var(--ease); }
.row:first-child { border-top: 0; }
.row__title { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; font-size: 18px; font-weight: 500; line-height: 24px; letter-spacing: -.01em; }
.row__desc { margin-top: 4px; font-size: 15px; line-height: 22px; color: var(--alu-ink-2); max-width: 40rem; text-wrap: pretty; }
.row__link { display: inline-flex; align-items: center; gap: 8px; justify-self: start; font-size: 14px; font-weight: 500; text-decoration: none; transition: color .15s var(--ease); }
a.row__link:hover { color: var(--accent-ink); }
.row.is-off { opacity: .32; }
.tag { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; line-height: 20px; color: var(--alu-muted); }
.tag .dot { width: 6px; height: 6px; }
@media (min-width: 900px) {
  .row { grid-template-columns: minmax(0, 1fr) 240px 120px; gap: 32px; align-items: baseline; }
  .row__link { justify-self: end; }
}

/* ---------- infrastructure (the hardware section) ---------- */
.infra { padding-block: 16px; }
.infra__shell {
  background: var(--blk);
  color: var(--on-blk);
  border-radius: 20px;
  padding: 32px 24px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06);
}
@media (min-width: 768px) { .infra__shell { padding: 56px; } }
.infra .h2 { color: var(--on-blk); }
.lede--dim { color: var(--on-blk-2); }
.infra__head { display: grid; gap: 32px; align-items: end; }
@media (min-width: 960px) { .infra__head { grid-template-columns: minmax(0, 1fr) auto; gap: 64px; } }

.readouts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 960px) { .readouts { grid-template-columns: repeat(3, 104px); } }
.readout { display: grid; gap: 8px; padding: 12px; background: var(--blk-2); border: 1px solid var(--blk-line); border-radius: 12px; }
.readout dt { font-size: 13px; line-height: 20px; color: var(--on-blk-muted); }
.readout .win { display: flex; }

.hops { display: grid; gap: 0; margin-top: 48px; }
.hop { position: relative; display: grid; align-content: start; grid-template-columns: 8px 88px 1fr; column-gap: 16px; row-gap: 4px; padding-block: 16px; border-top: 1px solid var(--blk-line); }
.hop__dot { grid-row: 1 / span 2; width: 8px; height: 8px; margin-top: 6px; border-radius: 50%; background: var(--led); box-shadow: 0 0 6px rgba(255, 59, 38, .6); }
.hop__lab { font-size: 13px; line-height: 20px; color: var(--on-blk-muted); }
.hop strong { font-size: 17px; font-weight: 500; line-height: 20px; color: var(--on-blk); }
.hop p { grid-column: 3; font-size: 14px; line-height: 20px; color: var(--on-blk-2); text-wrap: pretty; }
@media (min-width: 960px) {
  .hops { grid-template-columns: repeat(5, 1fr); gap: 24px; padding-top: 0; }
  .hop { grid-template-columns: 1fr; row-gap: 4px; padding-top: 28px; border-top: 0; }
  .hop__dot { grid-row: auto; position: absolute; top: 0; left: 0; margin: 0; }
  .hop p { grid-column: 1; margin-top: 4px; }
  /* the wire: from this dot to the next one */
  .hop::before { content: ""; position: absolute; top: 4px; left: 16px; right: -16px; height: 1px; background: var(--blk-line); }
  .hop:last-child::before { right: 0; }
  .hop__lab { order: -1; }
}
/* a real request passing through: lit by main.js after each /served-by reply */
.hop.is-pass .hop__dot { animation: pass .5s var(--ease) both; }
@keyframes pass { 0% { background: var(--led-off); box-shadow: none; } 40% { background: #FF7A5C; box-shadow: 0 0 10px rgba(255, 90, 60, .9); } 100% { background: var(--led); box-shadow: 0 0 6px rgba(255, 59, 38, .6); } }

.infra__foot { display: flex; gap: 16px; flex-wrap: wrap; align-items: baseline; margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--blk-line); font-size: 14px; line-height: 20px; color: var(--on-blk-2); }
.infra__foot-lab { font-weight: 500; color: var(--on-blk); }

/* ---------- about ---------- */
.about { display: grid; gap: 48px; }
@media (min-width: 960px) { .about { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 80px; align-items: start; } }
.skills { margin-top: 40px; }
.skills > div { display: grid; gap: 4px; padding-block: 16px; border-top: 1px solid var(--line); }
.skills dt { font-size: 13px; font-weight: 500; line-height: 20px; color: var(--muted); }
.skills dd { font-size: 15px; line-height: 22px; color: var(--ink); }
@media (min-width: 600px) { .skills > div { grid-template-columns: 176px 1fr; gap: 16px; align-items: baseline; } }

.facts { padding: 8px 24px; }
.facts > div { display: grid; gap: 4px; padding-block: 20px; border-top: 1px solid var(--alu-line); }
.facts > div:first-child { border-top: 0; }
.facts dt { font-size: 13px; font-weight: 500; line-height: 20px; color: var(--alu-muted); }
.facts dd { display: grid; gap: 4px; }
.facts strong { font-size: 17px; line-height: 24px; }
.facts span { font-size: 15px; line-height: 22px; color: var(--alu-ink-2); }
@media (min-width: 600px) { .facts > div { grid-template-columns: 96px 1fr; gap: 16px; align-items: baseline; } }

/* ---------- contact ---------- */
.contact { display: grid; gap: 40px; padding: 32px 24px; }
@media (min-width: 768px) { .contact { padding: 64px; } }
@media (min-width: 900px) { .contact { grid-template-columns: 1fr 320px; align-items: end; gap: 64px; } }
.contact__title { font-size: clamp(2.5rem, 1.5rem + 4vw, 4.5rem); letter-spacing: -.035em; }
.contact .lede { color: var(--alu-ink-2); }
.contact__ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.copy { font-size: 14px; border-color: rgba(28, 26, 23, .24); }
.copy .copy__i2 { display: none; }
.copy.is-copied .copy__i1 { display: none; }
.copy.is-copied .copy__i2 { display: inline; }
.links li + li { border-top: 1px solid var(--alu-line); }
.links a { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 16px; font-size: 18px; font-weight: 500; text-decoration: none; transition: color .15s var(--ease); }
.links a:hover { color: var(--accent-ink); }

/* ---------- footer ---------- */
.foot { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-block: 32px 48px; font-size: 13px; line-height: 20px; color: var(--muted); }
.foot a { text-decoration: none; transition: color .15s var(--ease); }
.foot a:hover { color: var(--ink); }

/* ---------- 404 ---------- */
.nf { min-height: 100vh; display: grid; place-content: center; justify-items: start; gap: 20px; padding-block: 64px; }
.nf .lede { margin: 0 0 8px; }

/* ---------- one entrance, on load ---------- */
@media (prefers-reduced-motion: no-preference) {
  .hero__copy > *, .live { animation: rise .5s var(--ease) both; }
  .hero__title { animation-delay: .05s; }
  .hero__sub { animation-delay: .1s; }
  .hero__ctas { animation-delay: .15s; }
  .live { animation-delay: .2s; }
}
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
