/* ==========================================================================
   jamesnoja.com 2.0 — single stylesheet
   Order: tokens → fonts → reset/base → chrome (nav/eye/footer) → components
          → home sections → project pages → privacy pages → 404 → motion
   ========================================================================== */

/* ---------- Tokens ---------- */

:root {
  /* Brand accents (theme-invariant) */
  --orange: #ff751a;
  --blue: #1a5fff;
  --green: #13b879;
  --ink: #1a1a1a;

  /* App tile colors (work cards + project heroes share these) */
  --tile-hits-and-blows: #263238;
  --tile-cash-clock: #009456;
  --tile-vending-tracker: #9abcc7;
  --tile-hurl: #006a2f;
  --tile-dotal: #e9c46a;

  /* Type */
  --font-display: "Urbanist", system-ui, -apple-system, sans-serif;
  --font-display2: "Bricolage Grotesque", "Urbanist", system-ui, sans-serif;
  --font-accent: "Space Grotesk", ui-monospace, "SF Mono", monospace;
  --text-hero: clamp(3.5rem, 9vw + 1rem, 10rem);
  --text-h2: clamp(2.6rem, 5.5vw + 0.5rem, 6rem);
  --text-h3: 1.35rem;
  --text-body: 1.0625rem;
  --text-small: 0.875rem;

  /* Space / shape */
  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 40px;
  --space-5: 64px;
  --space-6: 104px;
  --radius-card: 24px;
  --radius-btn: 14px;
  --radius-pill: 999px;
  --container: 1140px;

  /* Motion — 200ms and 450ms are deliberate echoes of site 1.0 */
  --ease: cubic-bezier(0.33, 1, 0.68, 1);
  --dur-fast: 200ms;
  --dur-med: 300ms;
  --dur-slow: 450ms;
  --dur-reveal: 600ms;
}

/* Accent ingredients — picked by the footer swatches via [data-accent].
   :root carries orange so pages are never accent-less before JS runs. */
:root,
[data-accent="orange"] {
  --accent-core: #ff751a;
  --accent-ink-light: #943308;
  --accent-ink-dark: #ffd0ae;
}

[data-accent="blue"] {
  --accent-core: #1a5fff;
  --accent-ink-light: #133a9e;
  --accent-ink-dark: #8fb0ff;
}

[data-accent="green"] {
  --accent-core: #13b879;
  --accent-ink-light: #0a613f;
  --accent-ink-dark: #9cedcc;
}

[data-accent="plum"] {
  --accent-core: #8b5cf6;
  --accent-ink-light: #5721bb;
  --accent-ink-dark: #c8b1ff;
}

[data-accent="rose"] {
  --accent-core: #f43f5e;
  --accent-ink-light: #900d2d;
  --accent-ink-dark: #ffacbb;
}

[data-theme="light"] {
  color-scheme: light;
  --bg: #f9f9f9;
  --bg-raised: #ffffff;
  --bg-sunken: #f4f4f4;
  --fg: #1a1a1a;
  --fg-muted: #3b3b3b;
  --fg-subtle: #5d5d5d;
  --border: rgba(26, 26, 26, 0.1);
  --accent: var(--accent-core);
  --accent-text: var(--accent-ink-light);
  --accent-btn: var(--accent-ink-light);
  --accent-contrast: #ffffff;
  --wash-a: color-mix(in srgb, var(--accent-core) 48%, #f9f9f9);
  --wash-b: color-mix(in srgb, var(--accent-core) 20%, #f9f9f9);
  --link: #1a4fd6;
  --card-shadow: 0 2px 8px rgba(26, 26, 26, 0.06);
  --card-shadow-hover: 0 12px 32px rgba(26, 26, 26, 0.12);
  --eye-sclera: #1a1a1a;
  --eye-iris: #ffffff;
  --glass: rgba(244, 243, 240, 0.65);
  --nav-tab: rgba(255, 255, 255, 0.5);
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #131313;
  --bg-raised: #1f1f1f;
  --bg-sunken: #1a1a1a;
  --fg: #f4f4f4;
  --fg-muted: #c9c9c9;
  --fg-subtle: #9a9a9a;
  --border: rgba(249, 249, 249, 0.12);
  --accent: var(--accent-core);
  --accent-text: var(--accent-ink-dark);
  --accent-btn: var(--accent-ink-light);
  --accent-contrast: #ffffff;
  --wash-a: color-mix(in srgb, var(--accent-core) 56%, #131313);
  --wash-b: color-mix(in srgb, var(--accent-core) 24%, #131313);
  --link: #6f97ff;
  --card-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  --card-shadow-hover: 0 12px 32px rgba(0, 0, 0, 0.55);
  --eye-sclera: #f4f4f4;
  --eye-iris: #1a1a1a;
  --glass: rgba(31, 31, 31, 0.7);
  --nav-tab: rgba(255, 255, 255, 0.14);
}

/* ---------- Fonts ---------- */

@font-face {
  font-family: "Urbanist";
  src: url("/fonts/urbanist-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Space Grotesk";
  src: url("/fonts/space-grotesk-var.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/fonts/bricolage-grotesque-var.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

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

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 150px;
}

body {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--text-body);
  font-weight: 500;
  line-height: 1.65;
  color: var(--fg);
  background: var(--bg);
  transition: background var(--dur-med) var(--ease), color var(--dur-med) var(--ease);
  -webkit-font-smoothing: antialiased;
}

/* Soft gradient wash, tinted by the accent. Fixed pseudo-element rather than
   background-attachment: fixed, which is janky on iOS. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(64rem 40rem at 50% -10rem, var(--wash-a), transparent 70%),
    radial-gradient(48rem 32rem at 88% 36rem, var(--wash-b), transparent 70%),
    var(--bg);
  transition: background var(--dur-med) var(--ease);
}

h1, h2, h3, h4 {
  line-height: 1.15;
  font-weight: 800;
  margin: 0 0 var(--space-2);
  letter-spacing: -0.02em;
}

h1, h2 {
  font-family: var(--font-display2);
  font-weight: 700;
  letter-spacing: -0.01em;
  text-align: center;
}

/* Headings that live inside cards / footer columns stay start-aligned */
.site-footer__heading,
.note-card__body h2,
.work-card__name,
.project-hero__title h1 {
  text-align: start;
}

p {
  margin: 0 0 var(--space-2);
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--link);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--space-3);
}

/* Wider track for the work grid (source site runs ~1320px) */
.container--wide {
  max-width: 1320px;
}

.section {
  padding-block: var(--space-6);
}

.section-title {
  font-size: var(--text-h2);
  text-align: center;
  margin-bottom: var(--space-4);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -48px;
  left: var(--space-2);
  z-index: 100;
  padding: 10px 18px;
  background: var(--fg);
  color: var(--bg);
  border-radius: var(--radius-btn);
  transition: top var(--dur-fast) var(--ease);
}

.skip-link:focus {
  top: var(--space-2);
}

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

/* ---------- Buttons & pills ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 26px;
  border: 0;
  border-radius: var(--radius-btn);
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  background: var(--fg);
  color: var(--bg);
  transition: background var(--dur-fast) var(--ease),
    box-shadow var(--dur-fast) var(--ease),
    transform var(--dur-fast) var(--ease);
}

.btn:hover,
.btn:focus-visible {
  box-shadow: var(--card-shadow-hover);
  transform: translateY(-2px);
}

.btn--accent {
  background: var(--accent-btn);
  color: var(--accent-contrast);
}

.btn--ghost {
  background: transparent;
  color: var(--fg);
  box-shadow: inset 0 0 0 2px var(--border);
}

.btn--ghost:hover,
.btn--ghost:focus-visible {
  box-shadow: inset 0 0 0 2px var(--fg);
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 5px 14px;
  border-radius: var(--radius-pill);
  font-family: var(--font-accent);
  font-size: var(--text-small);
  font-weight: 500;
  background: var(--bg-sunken);
  color: var(--fg-muted);
  border: 1px solid var(--border);
}

.pill--orange { background: color-mix(in srgb, var(--orange) 14%, var(--bg-raised)); }
.pill--blue   { background: color-mix(in srgb, var(--blue) 14%, var(--bg-raised)); }
.pill--green  { background: color-mix(in srgb, var(--green) 14%, var(--bg-raised)); }

.card {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--card-shadow);
  transition: transform var(--dur-med) var(--ease),
    box-shadow var(--dur-med) var(--ease);
}

a.card {
  text-decoration: none;
  color: inherit;
}

.card:hover,
a.card:focus-visible {
  transform: translateY(-4px);
  box-shadow: var(--card-shadow-hover);
}

/* Animated underline links (footer, inline nav) */
.u-link {
  color: inherit;
  text-decoration: none;
  background-image: linear-gradient(var(--accent), var(--accent));
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0% 2px;
  transition: background-size 250ms var(--ease);
  padding-bottom: 2px;
}

.u-link:hover,
.u-link:focus-visible {
  background-size: 100% 2px;
}

/* ---------- Nav (floating centered pill) ---------- */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px var(--space-2) 0;
  pointer-events: none;
}

/* Eye hangs off the pill's left edge without shifting the pill off-center:
   the negative margin cancels its own width (56px) + the 12px gap. */
.site-nav .eye-toggle {
  margin-left: -68px;
  margin-right: 12px;
}

@media (max-width: 480px) {
  .site-nav {
    flex-direction: column;
    gap: 2px;
  }
  .site-nav .eye-toggle {
    margin: 0;
  }
}

/* The eye sits above the pill; re-enable clicks under the header's
   pointer-events: none umbrella. */
.site-nav .eye-toggle {
  pointer-events: auto;
}

/* Transparent at the top of the page; gains glass + blur once scrolled
   (matches seanhalpin.xyz: no border, no shadow, radius 50px, padding 10px). */
.nav-pill {
  pointer-events: auto;
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 12px;
  border-radius: 50px;
  background: transparent;
  transition: background 0.2s linear;
}

.nav-pill.is-scrolled {
  background: var(--glass);
  -webkit-backdrop-filter: blur(20px) saturate(1.7);
  backdrop-filter: blur(20px) saturate(1.7);
}

/* Sliding active-page indicator — injected by main.js, positioned under
   the aria-current link. */
.nav-tab {
  position: absolute;
  z-index: 0;
  background: var(--nav-tab);
  border-radius: 26px;
  transition: left 0.2s ease-in-out, width 0.2s ease-in-out,
    background var(--dur-med) var(--ease);
}

.nav-pill__links {
  display: flex;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-pill__link {
  position: relative;
  z-index: 1;
  display: inline-block;
  padding: 8px 26px;
  border-radius: 26px;
  color: var(--fg-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 1.1875rem;
  transition: color 0.2s ease-in-out;
}

.nav-pill__link:hover,
.nav-pill__link:focus-visible {
  color: var(--fg);
}

@media (max-width: 420px) {
  .nav-pill__link {
    padding: 7px 12px;
    font-size: 0.9375rem;
  }
}

/* ---------- Eye toggle (logo + theme switch) ---------- */

.eye-toggle {
  display: grid;
  place-items: center;
  width: 56px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: var(--radius-btn);
  background: transparent;
  cursor: pointer;
}

.eye-toggle:hover .eye {
  transform: scale(1.08);
}

.eye-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.eye {
  position: relative;
  display: grid;
  place-items: center;
  width: 44px;
  height: 28px;
  border-radius: 50% / 60%;
  background: var(--eye-sclera);
  overflow: hidden;
  transition: background var(--dur-fast) ease-in-out,
    transform var(--dur-fast) var(--ease);
}

.iris {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--eye-iris);
  transform: translate(var(--ix, 0px), var(--iy, 0px));
  transition: background var(--dur-fast) ease-in-out,
    transform 200ms ease-in-out;
}

.lid {
  position: absolute;
  inset: 0;
  background: var(--eye-sclera);
  transform: scaleY(0);
  transform-origin: top;
  transition: background var(--dur-fast) ease-in-out;
}

.eye-toggle.is-blinking .lid {
  animation: lid-blink 280ms var(--ease);
}

@keyframes lid-blink {
  0% { transform: scaleY(0); }
  45% { transform: scaleY(1); }
  60% { transform: scaleY(1); }
  100% { transform: scaleY(0); }
}

/* ---------- Footer (columns + ruler + accent swatches) ---------- */

.site-footer {
  border-top: 1px solid var(--border);
  padding-top: var(--space-5);
  margin-top: var(--space-6);
}

.site-footer__inner {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--space-3);
}

.site-footer__cols {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: var(--space-4) var(--space-6);
}

@media (max-width: 720px) {
  .site-footer__cols {
    grid-template-columns: 1fr 1fr;
  }
  .site-footer__brand {
    grid-column: 1 / -1;
  }
}

.site-footer__name {
  font-family: var(--font-display2);
  font-weight: 700;
  font-size: 1.4rem;
  margin-bottom: 4px;
}

.site-footer__fine {
  font-size: var(--text-small);
  color: var(--fg-subtle);
  margin: 0;
}

.site-footer__heading {
  font-family: var(--font-accent);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-subtle);
  margin-bottom: var(--space-1);
}

.site-footer__col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
  font-weight: 600;
}

/* Ruler strip — main.js fills it with the accent picker: five sections of
   notches (one per accent) that rise toward the cursor and stay raised at
   the selected spot, mechanic lifted from the source site's hour strip.
   The static tick gradient is the no-JS fallback. */
.footer-ruler {
  position: relative;
  margin-top: var(--space-5);
  height: 120px;
  background-image: repeating-linear-gradient(
    to right,
    var(--border) 0 1px,
    transparent 1px 14px
  );
  background-size: 100% 14px;
  background-position: 0 bottom;
  background-repeat: no-repeat;
}

.footer-ruler.has-notches {
  background-image: none;
}

/* Bottom inset = the blank space beneath the bars */
.footer-notches {
  position: absolute;
  inset: auto 0 28px 0;
  height: 76px;
  display: flex;
  overflow: hidden;
}

.notch-zone {
  flex: 1;
  display: flex;
  align-items: flex-end;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.notch-zone:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
  border-radius: 8px;
}

.notch-zone .notch {
  flex: 1;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  height: 100%;
}

.notch__line {
  width: 3px;
  height: 56px;
  border-radius: 20px;
  background: var(--nc, var(--border));
  transform: translateY(28px);
  transition: transform 0.5s cubic-bezier(0, 0.49, 0, 1.49);
  will-change: transform;
}

@media (prefers-reduced-motion: reduce) {
  .notch__line {
    transition: none;
  }
}

/* ---------- Hero (home) ---------- */

.hero {
  padding-block: clamp(72px, 12vh, 140px) var(--space-6);
  text-align: center;
}

.hero__layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-5);
  align-items: center;
}

.hero__title {
  font-size: var(--text-hero);
  margin-bottom: var(--space-3);
}

.hero__title .tw-line {
  display: block;
  min-height: 1.2em;
  color: var(--accent-text);
}

.tw-caret {
  display: inline-block;
  width: 3px;
  height: 0.9em;
  margin-left: 4px;
  vertical-align: -0.08em;
  background: var(--accent);
  animation: caret-blink 1s steps(1) infinite;
}

@keyframes caret-blink {
  50% { opacity: 0; }
}

.hero__sub {
  font-size: 1.1875rem;
  color: var(--fg-muted);
  max-width: 56ch;
  margin-inline: auto;
  margin-bottom: var(--space-4);
}

.hero__ctas {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-2);
}

.hero__portrait {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius-card);
  overflow: hidden;
  background:
    linear-gradient(135deg,
      color-mix(in srgb, var(--orange) 24%, var(--bg-raised)),
      color-mix(in srgb, var(--blue) 18%, var(--bg-raised)) 55%,
      color-mix(in srgb, var(--green) 22%, var(--bg-raised)));
  border: 1px solid var(--border);
  box-shadow: var(--card-shadow);
}

.hero__portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__portrait-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--font-accent);
  color: var(--fg-subtle);
  font-size: var(--text-small);
}

@media (max-width: 860px) {
  .hero__portrait {
    max-width: 360px;
  }
}

/* ---------- Page hero (About / Notes / Contact) ---------- */

.page-hero {
  text-align: center;
  padding-block: clamp(56px, 9vh, 110px) var(--space-4);
}

.page-hero h1 {
  font-size: var(--text-hero);
  color: var(--accent-text);
  margin-bottom: var(--space-2);
}

.page-hero p {
  max-width: 56ch;
  margin-inline: auto;
  color: var(--fg-muted);
  font-size: 1.125rem;
}

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

.about-intro {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: var(--space-5);
  align-items: center;
  padding-bottom: var(--space-5);
}

@media (max-width: 860px) {
  .about-intro {
    grid-template-columns: 1fr;
  }
  .about-intro .hero__portrait {
    max-width: 320px;
  }
}

.about-intro__lede {
  font-family: var(--font-display2);
  font-size: clamp(1.4rem, 2.2vw, 1.9rem);
  font-weight: 700;
  line-height: 1.3;
  color: var(--accent-text);
  margin-bottom: var(--space-2);
}

/* ---------- Staircase resume ---------- */

.stair {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.stair > li {
  margin-inline-start: calc(var(--i, 0) * min(7vw, 56px));
  max-width: calc(100% - var(--i, 0) * 0px);
}

.stair__item {
  display: inline-block;
  max-width: 100%;
}

.stair__pill {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 14px;
  padding: 14px 24px;
  border-radius: var(--radius-pill);
  background: var(--bg-raised);
  border: 1px solid var(--border);
  box-shadow: var(--card-shadow);
  cursor: pointer;
  list-style: none;
  transition: transform var(--dur-fast) var(--ease),
    box-shadow var(--dur-fast) var(--ease);
}

.stair__pill::-webkit-details-marker {
  display: none;
}

.stair__pill::after {
  content: "+";
  font-family: var(--font-accent);
  font-weight: 700;
  color: var(--fg-subtle);
  margin-left: 4px;
  transition: transform var(--dur-fast) var(--ease);
}

.stair__item[open] .stair__pill::after {
  transform: rotate(45deg);
}

.stair__pill:hover {
  transform: translateY(-2px);
  box-shadow: var(--card-shadow-hover);
}

.stair__pill:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.stair__org {
  font-weight: 800;
}

.stair__role {
  color: var(--fg-muted);
  font-size: 0.9375rem;
}

.stair__years {
  font-family: var(--font-accent);
  font-size: var(--text-small);
  color: var(--accent-text);
  font-weight: 700;
}

.stair__detail {
  max-width: 620px;
  padding: var(--space-2) var(--space-3) 0;
  color: var(--fg-muted);
}

.stair__detail ul {
  margin: 0;
  padding-left: 1.2em;
}

.stair__detail li {
  margin-bottom: 6px;
}

.stair__item--todo .stair__pill {
  border-style: dashed;
  border-color: color-mix(in srgb, var(--accent) 50%, var(--border));
}

@media (max-width: 720px) {
  .stair > li {
    margin-inline-start: 0;
  }
}

/* ---------- Principles ---------- */

.principles {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-4) var(--space-5);
  counter-reset: principle;
}

.principles h3 {
  font-family: var(--font-display2);
  font-size: var(--text-h3);
  display: flex;
  align-items: baseline;
  gap: 14px;
}

.principles h3::before {
  counter-increment: principle;
  content: "0" counter(principle);
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--accent-text);
}

.principles p {
  margin: 0;
  color: var(--fg-muted);
}

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

.about__grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: var(--space-5);
}

@media (max-width: 860px) {
  .about__grid {
    grid-template-columns: 1fr;
  }
}

.about__lede {
  font-size: 1.25rem;
  color: var(--fg-muted);
}

.about__facts {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--space-2);
  font-family: var(--font-accent);
  font-size: var(--text-small);
  color: var(--fg-subtle);
}

.about__facts strong {
  display: block;
  font-family: var(--font-display);
  font-size: var(--text-body);
  color: var(--fg);
}

/* ---------- Experience timeline ---------- */

.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--border);
}

.timeline__entry {
  position: relative;
  padding: 0 0 var(--space-4) var(--space-4);
}

.timeline__entry::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--bg);
}

.timeline__entry:nth-child(3n + 2)::before { background: var(--blue); }
.timeline__entry:nth-child(3n)::before { background: var(--green); }

.timeline__period {
  font-family: var(--font-accent);
  font-size: var(--text-small);
  color: var(--fg-subtle);
}

.timeline__role {
  font-size: var(--text-h3);
  margin: 4px 0 2px;
}

.timeline__org {
  font-weight: 700;
  color: var(--accent-text);
  margin-bottom: var(--space-1);
}

.timeline__entry ul {
  margin: var(--space-1) 0 0;
  padding-left: 1.2em;
  color: var(--fg-muted);
}

.timeline__entry li {
  margin-bottom: 6px;
}

.timeline__entry--todo {
  border: 2px dashed var(--border);
  border-radius: var(--radius-card);
  padding: var(--space-3) var(--space-3) var(--space-3) var(--space-4);
  margin-left: 0;
}

.timeline__todo-badge {
  display: inline-block;
  font-family: var(--font-accent);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-text);
  border: 1px solid currentColor;
  border-radius: var(--radius-pill);
  padding: 2px 10px;
  margin-bottom: var(--space-1);
}

.creds {
  margin-top: var(--space-4);
  display: grid;
  gap: var(--space-2);
}

.creds__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-1);
}

.creds__label {
  font-family: var(--font-accent);
  font-size: var(--text-small);
  color: var(--fg-subtle);
  margin-right: var(--space-1);
}

/* ---------- Skills ---------- */

.skills__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-3);
}

.skill-card {
  padding: var(--space-3);
}

.skill-card h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: var(--text-h3);
}

.skill-card h3::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: var(--accent);
}

.skill-card--build h3::before { background: var(--blue); }
.skill-card--design h3::before { background: var(--orange); }
.skill-card--platform h3::before { background: var(--green); }

.skill-card ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
}

/* ---------- Work cards (big pastel tiles) ---------- */

/* Asymmetric rows like the source site: 40/60 then 60/40 */
.work-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: var(--space-5) 53px;
}

.work-grid > li:nth-child(4n + 1) { grid-column: span 2; }
.work-grid > li:nth-child(4n + 2) { grid-column: span 3; }
.work-grid > li:nth-child(4n + 3) { grid-column: span 3; }
.work-grid > li:nth-child(4n)     { grid-column: span 2; }

.work-grid > .work-grid__full {
  grid-column: 1 / -1 !important;
}

@media (max-width: 860px) {
  .work-grid {
    grid-template-columns: 1fr;
    gap: var(--space-3);
  }
  .work-grid > li {
    grid-column: auto !important;
  }
  .work-card {
    min-height: 420px;
  }
}

.work-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 550px;
  padding: var(--space-4);
  border-radius: 28px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  background: color-mix(in srgb, var(--tile) 16%, var(--bg-raised));
  border: 1px solid var(--border);
  box-shadow: var(--card-shadow);
  transition: transform var(--dur-med) var(--ease),
    box-shadow var(--dur-med) var(--ease);
}

[data-theme="dark"] .work-card {
  background: color-mix(in srgb, var(--tile) 28%, var(--bg-raised));
}

.work-card:hover,
.work-card:focus-visible {
  transform: translateY(-4px);
  box-shadow: var(--card-shadow-hover);
}

.work-card__label {
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--fg-subtle);
}

.work-card__name {
  font-family: var(--font-display2);
  font-weight: 700;
  font-size: clamp(1.6rem, 2.4vw, 2.1rem);
  margin: 0;
}

.work-card__art {
  margin-block: auto;
  align-self: center;
  width: min(52%, 220px);
  aspect-ratio: 1.15;
  display: grid;
  place-items: center;
  background: var(--tile);
  border-radius: 24px;
  box-shadow: var(--card-shadow);
  transition: transform var(--dur-slow) var(--ease);
}

.work-card__art img {
  width: 44%;
  height: auto;
  object-fit: contain;
}

.work-card:hover .work-card__art,
.work-card:focus-visible .work-card__art {
  transform: translateY(-8px);
}

.work-card__badge {
  position: absolute;
  top: var(--space-3);
  right: var(--space-3);
}

.badge {
  font-family: var(--font-accent);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 2px 10px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  color: var(--fg-subtle);
  background: var(--bg-raised);
}

/* Per-app tint tiles (echo JabTech card colors) */
.tile--hits-and-blows { background: var(--tile-hits-and-blows); }
.tile--cash-clock { background: var(--tile-cash-clock); }
.tile--vending-tracker { background: var(--tile-vending-tracker); }
.tile--hurl { background: var(--tile-hurl); }
.tile--dotal { background: var(--tile-dotal); }

/* ---------- Project pages ---------- */

.project-hero {
  padding-block: var(--space-5);
}

.project-hero__back {
  display: inline-block;
  font-weight: 700;
  text-decoration: none;
  color: var(--fg-subtle);
  margin-bottom: var(--space-4);
  transition: color var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
}

.project-hero__back:hover,
.project-hero__back:focus-visible {
  color: var(--fg);
  transform: translateX(-4px);
}

.project-hero__head {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.project-hero__icon {
  width: 96px;
  height: 96px;
  border-radius: 24px;
  display: grid;
  place-items: center;
  box-shadow: var(--card-shadow);
}

.project-hero__icon img {
  width: 60px;
  height: 60px;
  object-fit: contain;
}

.project-hero__title h1 {
  font-size: clamp(2.2rem, 4vw, 3.4rem);
  margin: 0;
}

.project-hero__title p {
  margin: 4px 0 0;
  font-size: 1.1875rem;
  color: var(--fg-muted);
}

.project-hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
  margin-top: var(--space-3);
}

.project-hero__stores {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-3);
}

.project-hero__stores img {
  height: 48px;
  width: auto;
}

.archive-banner {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  background: color-mix(in srgb, var(--orange) 12%, var(--bg-raised));
  border: 1px solid color-mix(in srgb, var(--orange) 30%, var(--border));
  border-radius: var(--radius-card);
  padding: var(--space-2) var(--space-3);
  margin-bottom: var(--space-4);
  font-weight: 600;
}

.shots {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-3);
}

.shots__frame {
  aspect-ratio: 9 / 19;
  border-radius: 28px;
  border: 1px dashed var(--border);
  background: var(--bg-sunken);
  display: grid;
  place-items: center;
  font-family: var(--font-accent);
  font-size: var(--text-small);
  color: var(--fg-subtle);
  text-align: center;
  padding: var(--space-2);
  overflow: hidden;
}

.shots__frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 24px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-3);
}

.feature-grid .card {
  padding: var(--space-3);
}

.feature-grid h3 {
  font-size: var(--text-h3);
}

.feature-grid p {
  margin: 0;
  color: var(--fg-muted);
}

.policy-link-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-3);
  flex-wrap: wrap;
}

.policy-link-card h3 {
  margin: 0;
}

.policy-link-card p {
  margin: 4px 0 0;
  color: var(--fg-subtle);
}

/* ---------- Notes ---------- */

.note-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--space-2);
  max-width: 820px;
  margin-inline: auto;
}

.note-card {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3);
  text-decoration: none;
  color: inherit;
}

.note-card__body {
  flex: 1;
}

.note-card__body h2 {
  font-size: 1.2rem;
  margin: 0 0 2px;
}

.note-card__body p {
  margin: 0;
  color: var(--fg-muted);
  font-size: 0.9375rem;
}

.note-card__meta {
  display: block;
  margin-top: 6px;
  font-family: var(--font-accent);
  font-size: 0.8125rem;
  color: var(--fg-subtle);
}

.note-card__emoji {
  flex: none;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  font-size: 1.4rem;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 14%, var(--bg-sunken));
}

/* Note post article */
.note {
  max-width: 720px;
  margin-inline: auto;
  padding-block: var(--space-4) var(--space-5);
}

.note > h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  text-align: center;
}

.note__meta {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-accent);
  font-size: var(--text-small);
  color: var(--fg-subtle);
  margin-bottom: var(--space-4);
}

.note__hero {
  margin: 0 0 var(--space-4);
  border-radius: var(--radius-card);
  overflow: hidden;
  border: 1px solid var(--border);
}

.note__hero img {
  width: 100%;
  display: block;
}

.note__hero--placeholder {
  aspect-ratio: 16 / 9;
  display: grid;
  place-items: center;
  font-family: var(--font-accent);
  font-size: var(--text-small);
  color: var(--fg-subtle);
  background: var(--bg-sunken);
  border-style: dashed;
}

/* Small artwork (e.g. the eye) centred instead of full-bleed. The bg matches
   the artwork's own paper colour so it reads as one canvas. */
.note__hero--contain {
  aspect-ratio: 16 / 9;
  display: grid;
  place-items: center;
  background: #fdfaf6;
}

.note__hero--contain img {
  width: auto;
  max-height: 60%;
}

.note h2 {
  font-size: 1.5rem;
  margin-top: var(--space-4);
}

.note p,
.note li {
  color: var(--fg-muted);
}

.note pre {
  background: var(--bg-sunken);
  border: 1px solid var(--border);
  border-radius: var(--radius-btn);
  padding: var(--space-2) var(--space-3);
  overflow-x: auto;
  font-size: 0.875rem;
  line-height: 1.6;
}

.note code {
  font-family: var(--font-accent);
  font-size: 0.9em;
}

.note p code,
.note li code {
  background: var(--bg-sunken);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1px 6px;
}

/* ---------- Privacy pages ---------- */

.policy {
  max-width: 760px;
  margin-inline: auto;
  padding-block: var(--space-5);
}

.policy h1 {
  font-size: clamp(2rem, 3.5vw, 2.8rem);
}

.policy__effective {
  font-family: var(--font-accent);
  font-size: var(--text-small);
  color: var(--fg-subtle);
  margin-bottom: var(--space-4);
}

.policy h2 {
  font-size: 1.45rem;
  margin-top: var(--space-4);
}

.policy ul {
  color: var(--fg-muted);
}

.policy p {
  color: var(--fg-muted);
}

/* ---------- 404 ---------- */

.notfound {
  min-height: 60vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding-block: var(--space-6);
}

.notfound .eye {
  width: 110px;
  height: 70px;
  margin-inline: auto;
  margin-bottom: var(--space-3);
}

.notfound .iris {
  width: 30px;
  height: 30px;
}

.notfound h1 {
  font-size: var(--text-hero);
}

/* ---------- Scroll reveal & motion preferences ---------- */

html.js [data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity var(--dur-reveal) var(--ease),
    transform var(--dur-reveal) var(--ease);
  transition-delay: calc(var(--ri, 0) * 80ms);
}

html.js [data-reveal].is-revealed {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  html.js [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .eye-toggle.is-blinking .lid {
    animation: none;
  }

  .tw-caret {
    animation: none;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

/* No-JS: typewriter shows a static title */
html:not(.js) .tw-word::before {
  content: "a Developer.";
}

html:not(.js) .tw-caret {
  display: none;
}
