/* =========================================================================
   PerrisDavis.com — dark, monospaced, refined-technical (not brutalist)
   type:    Recursive (variable, pinned to MONO=1 CASL=0)
   palette: near-black bg / off-white / signature rust
   ========================================================================= */

:root {
  /* ---- palette ---- */
  --bg:       #0F0E0D;             /* near-black, slightly warm */
  --bg-2:     #161412;             /* card / panel */
  --bg-3:     #1F1C19;             /* row hover, deeper card */
  --fg:       #ECE7DA;             /* off-white, warm */
  --fg-2:     #B8AE9C;             /* secondary */
  --fg-3:     #6E6557;             /* tertiary, dim */
  --rule:     rgba(236, 231, 218, 0.12);
  --rule-2:   rgba(236, 231, 218, 0.06);
  --accent:   #FF5A30;             /* rust, punched up for dark bg */
  --accent-2: #FFB347;             /* amber, used sparingly */
  --accent-3: #6BC5A8;             /* a single quiet cool, for variety */

  /* ---- type ---- */
  --mono: "Recursive", ui-monospace, "SF Mono", "JetBrains Mono", Menlo, monospace;

  /* Variable axes — pin everywhere except where overridden:
     MONO=1  (full monospace), CASL=0 (linear/technical), slnt=0, wght varies */
  --vf-base: "MONO" 1, "CASL" 0, "slnt" 0;
  --vf-italic: "MONO" 1, "CASL" 0, "slnt" -8;

  /* ---- rhythm ---- */
  --gutter: clamp(20px, 4vw, 56px);
  --max:    1280px;

  /* ---- motion ---- */
  --ease: cubic-bezier(.2,.7,.2,1);
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--mono);
  font-variation-settings: var(--vf-base);
  font-weight: 420;
  font-size: clamp(15px, .55vw + 13px, 17px);
  line-height: 1.55;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  /* film grain — dimmer for dark bg */
  background-image:
    radial-gradient(1200px 600px at 80% -10%, rgba(255,90,48,.06), transparent 60%),
    radial-gradient(900px 500px at 0% 100%, rgba(255,179,71,.04), transparent 55%),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 .95  0 0 0 .05 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  background-attachment: fixed, fixed, fixed;
  background-size: auto, auto, 160px 160px;
}

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

a { color: inherit; }

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

em {
  font-style: normal;
  font-variation-settings: "MONO" 1, "CASL" 0, "slnt" -8;
  color: var(--fg);
}

code {
  font-family: var(--mono);
  font-variation-settings: var(--vf-base);
  font-size: .92em;
  background: var(--bg-2);
  padding: 0 .35em;
  border: 1px solid var(--rule);
  color: var(--accent);
}

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--accent); color: var(--bg);
  padding: .6rem 1rem;
  font-family: var(--mono);
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .1em;
}
.skip:focus { left: 12px; top: 12px; z-index: 999; }


/* =========================================================================
   MASTHEAD  +  RESPONSIVE NAV  (hamburger on narrow viewports)
   ========================================================================= */
.masthead {
  padding: clamp(14px, 2vw, 24px) var(--gutter);
  max-width: var(--max);
  margin: 0 auto;
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(15, 14, 13, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.5vw, 36px);
  font-size: .78rem;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.nav__brand {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  text-decoration: none;
  color: var(--fg);
  font-weight: 600;
  letter-spacing: .03em;
  margin-right: auto;
  transition: color .25s var(--ease);
}
.nav__brand:hover { color: var(--accent); }
.nav__brand-mark {
  color: var(--accent);
  font-weight: 700;
  letter-spacing: .02em;
}
.nav__brand-name {
  font-size: .72rem;
  letter-spacing: .12em;
  color: var(--fg-2);
  text-transform: uppercase;
}

/* The hamburger button — hidden on desktop, becomes the only control on mobile. */
.nav__toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--rule);
  background: transparent;
  cursor: pointer;
  padding: 0;
  position: relative;
  color: var(--fg);
}
.nav__toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.nav__toggle-bars {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}
.nav__toggle-bars span {
  position: absolute;
  left: 11px;
  right: 11px;
  height: 1.5px;
  background: currentColor;
  transition: transform .3s var(--ease), opacity .2s var(--ease), top .3s var(--ease);
}
.nav__toggle-bars span:nth-child(1) { top: 14px; }
.nav__toggle-bars span:nth-child(2) { top: 21px; }
.nav__toggle-bars span:nth-child(3) { top: 28px; }
.nav__toggle[aria-expanded="true"] .nav__toggle-bars span:nth-child(1) { top: 21px; transform: rotate(45deg); }
.nav__toggle[aria-expanded="true"] .nav__toggle-bars span:nth-child(2) { opacity: 0; }
.nav__toggle[aria-expanded="true"] .nav__toggle-bars span:nth-child(3) { top: 21px; transform: rotate(-45deg); }

.nav__menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: clamp(14px, 2vw, 28px);
}
.nav__menu a {
  position: relative;
  text-decoration: none;
  padding: .25rem 0;
  display: inline-block;
  transition: color .35s var(--ease);
  color: var(--fg);
}
.nav__menu a[data-num]::before {
  content: attr(data-num);
  font-size: .62rem;
  color: var(--accent);
  margin-right: .45em;
  font-weight: 550;
  letter-spacing: .05em;
}
.nav__menu a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -4px;
  height: 1px; background: var(--accent);
  transform: scaleX(0); transform-origin: right center;
  transition: transform .35s var(--ease);
}
.nav__menu a:hover::after,
.nav__menu a:focus-visible::after { transform: scaleX(1); transform-origin: left center; }
.nav__menu a:hover { color: var(--accent); }

/* --- Mobile breakpoint --- */
@media (max-width: 720px) {
  .nav { flex-wrap: wrap; }
  .nav__toggle { display: block; }
  .nav__menu {
    flex-basis: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height .35s var(--ease), margin-top .25s var(--ease);
    margin-top: 0;
  }
  .nav__toggle[aria-expanded="true"] ~ .nav__menu {
    max-height: 540px;
    margin-top: 1rem;
    border-top: 1px solid var(--rule);
  }
  .nav__menu li { border-bottom: 1px solid var(--rule); }
  .nav__menu a {
    padding: 1rem .25rem;
    display: block;
    font-size: .9rem;
  }
  .nav__menu a::after { display: none; }
  /* Stop body scroll when menu is open. */
  body.nav-open { overflow: hidden; }
}


/* =========================================================================
   HERO
   ========================================================================= */
.hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(48px, 8vw, 112px) var(--gutter) clamp(40px, 6vw, 72px);
  position: relative;
}

.hero__overline {
  display: flex; align-items: center; gap: .9rem;
  font-size: .72rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--fg-3);
  margin-bottom: clamp(28px, 4vw, 44px);
}
.hero__overline .dot {
  width: 6px; height: 6px; background: var(--accent);
  display: inline-block;
}
.kicker { white-space: nowrap; }

.hero__name {
  font-family: var(--mono);
  font-variation-settings: "MONO" 1, "CASL" 0, "slnt" 0;
  font-weight: 600;
  font-size: clamp(40px, 11vw, 168px);  /* sized for "Wikipedia" — the longer word */
  line-height: .92;
  letter-spacing: -.045em;
  margin: 0;
  color: var(--fg);
}
.hero__first { display: block; }
.hero__last {
  display: block;
  margin-left: clamp(40px, 8vw, 140px);
  color: var(--accent);
}
.hero__last em {
  font-variation-settings: "MONO" 1, "CASL" 0, "slnt" -12;
  font-weight: 500;
  color: var(--accent);
}

.hero__lede {
  margin: clamp(36px, 5vw, 56px) 0 0;
  max-width: 64ch;
  font-family: var(--mono);
  font-variation-settings: var(--vf-base);
  font-weight: 400;
  font-size: clamp(15px, .6vw + 12px, 18px);
  line-height: 1.6;
  color: var(--fg-2);
}
.hero__lede em {
  font-variation-settings: "MONO" 1, "CASL" 0, "slnt" -10;
  color: var(--accent);
}
.mark {
  background: rgba(255,179,71,0.2);
  padding: 0 .15em;
  color: var(--fg);
}

.hero__cues {
  list-style: none; padding: 0;
  margin: clamp(40px, 5vw, 56px) 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
}
.hero__cues li {
  background: var(--bg);
  padding: 1.1rem 1.25rem;
  font-size: .78rem;
  line-height: 1.55;
  color: var(--fg-2);
}
.hero__cues em {
  font-variation-settings: "MONO" 1, "CASL" 0, "slnt" -8;
  color: var(--fg);
}
.cue-label {
  display: block;
  font-size: .62rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: .4rem;
  font-weight: 550;
}

.hero__scroll {
  position: absolute;
  right: var(--gutter);
  bottom: 8px;
  display: flex; flex-direction: column; align-items: center; gap: .5rem;
  font-size: .62rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--fg-3);
  animation: float 3.5s ease-in-out infinite;
}
@keyframes float { 50% { transform: translateY(6px); } }


/* ---------- ASCII Mac mini (CSS 3D rotation) ----------
   Hand-drawn ASCII Mac mini sits in the top-right of the hero. CSS rotates
   it on its Y axis with real perspective — the GPU foreshortens the text. */
/* ASCII Mac mini — converted from a real M4 product photo via Python.
   Static art with a CRT-style glow + subtle scan lines + slow pulse.        */
.hero__ascii {
  position: absolute;
  top: clamp(72px, 7vw, 116px);
  right: var(--gutter);
  margin: 0;
  font-family: var(--mono);
  font-variation-settings: "MONO" 1, "CASL" 0, "slnt" 0;
  font-weight: 500;
  font-size: clamp(8px, 0.78vw, 10.5px);
  line-height: 1.05;
  color: var(--accent);
  letter-spacing: 0;
  white-space: pre;
  user-select: none;
  pointer-events: none;
  opacity: .9;
  /* CRT glow */
  filter:
    drop-shadow(0 0 4px rgba(255, 90, 48, .35))
    drop-shadow(0 0 18px rgba(255, 90, 48, .18));
  text-shadow:
    0 0 1px rgba(255, 90, 48, .65),
    0 0 6px rgba(255, 90, 48, .35),
    0 0 18px rgba(255, 90, 48, .2);
  /* A subtle CRT-scanline overlay drifts down; cheap, GPU-driven background. */
  background:
    repeating-linear-gradient(180deg,
      transparent 0, transparent 2px,
      rgba(255, 90, 48, .04) 2px, rgba(255, 90, 48, .04) 3px);
  background-size: 100% 200%;
  animation: scanlineDrift 4s linear infinite;
}
@keyframes scanlineDrift {
  from { background-position-y: 0; }
  to   { background-position-y: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .hero__ascii { animation: none; opacity: .95; background: none; }
}
@media (max-width: 980px) { .hero__ascii { display: none; } }


/* ---------- Per-page hero ASCII art ----------
   Photo-derived ASCII (typewriter on /blog/, envelope on /contact/). The
   actual animation is frame-by-frame in JS (typing reveal). CSS only
   styles the static canvas + scanline drift backdrop.                       */
.page-ascii {
  display: block;
  margin: clamp(20px, 3vw, 40px) auto clamp(36px, 5vw, 64px);
  max-width: 60ch;
  padding: 1.25rem;
  font-family: var(--mono);
  font-variation-settings: "MONO" 1, "CASL" 0, "slnt" 0;
  font-weight: 500;
  font-size: clamp(7px, 0.7vw, 10px);
  line-height: 1.05;
  color: var(--accent);
  letter-spacing: 0;
  white-space: pre;
  user-select: none;
  pointer-events: none;
  text-align: left;
  filter:
    drop-shadow(0 0 4px rgba(255, 90, 48, .35))
    drop-shadow(0 0 18px rgba(255, 90, 48, .18));
  text-shadow:
    0 0 1px rgba(255, 90, 48, .65),
    0 0 6px rgba(255, 90, 48, .35),
    0 0 18px rgba(255, 90, 48, .2);
  background:
    repeating-linear-gradient(180deg,
      transparent 0, transparent 2px,
      rgba(255, 90, 48, .04) 2px, rgba(255, 90, 48, .04) 3px);
  background-size: 100% 200%;
  animation: scanlineDrift 4s linear infinite;
  min-height: 18em;
}
@media (prefers-reduced-motion: reduce) {
  .page-ascii { animation: none; opacity: .95; background: none; }
}
@media (max-width: 640px) {
  .page-ascii { font-size: 6px; padding: .75rem; }
}


/* ---------- Posts list (blog index + home preview) ---------- */
.posts {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--rule);
}
.posts__item {
  padding: 1.4rem 0;
  border-bottom: 1px solid var(--rule);
}
.posts__link {
  display: inline-block;
  font-family: var(--mono);
  font-variation-settings: var(--vf-base);
  font-weight: 600;
  font-size: clamp(18px, 1vw + 10px, 24px);
  line-height: 1.3;
  text-decoration: none;
  letter-spacing: -.005em;
  color: var(--fg);
  background-image: linear-gradient(var(--accent), var(--accent));
  background-size: 0 1px;
  background-repeat: no-repeat;
  background-position: 0 100%;
  transition: background-size .45s var(--ease), color .35s var(--ease);
}
.posts__link:hover { background-size: 100% 1px; color: var(--accent); }
.posts__summary {
  margin: .5rem 0 0;
  font-size: .92rem;
  line-height: 1.55;
  color: var(--fg-2);
  max-width: 64ch;
}
.posts__empty {
  font-size: .92rem;
  color: var(--fg-2);
  padding: 1.4rem 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.notes-preview__all {
  margin: 1.6rem 0 0;
}


/* ---------- Individual post page ---------- */
.post {
  max-width: 78ch;
  margin: 0 auto;
  padding: clamp(48px, 7vw, 96px) var(--gutter);
}
.post__head {
  margin: 0 0 clamp(32px, 4vw, 56px);
  padding-bottom: clamp(20px, 2.5vw, 32px);
  border-bottom: 1px solid var(--rule);
}
.post__kicker {
  margin: 0 0 1rem;
  font-size: .72rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--fg-3);
}
.post__kicker a { color: inherit; text-decoration: none; }
.post__kicker a:hover { color: var(--accent); }
.post__title {
  margin: 0;
  font-family: var(--mono);
  font-weight: 600;
  font-size: clamp(32px, 4.4vw, 56px);
  line-height: 1.08;
  letter-spacing: -.025em;
  color: var(--fg);
}
.post__summary {
  margin: 1.2rem 0 0;
  font-size: clamp(16px, .55vw + 13px, 19px);
  color: var(--fg-2);
  line-height: 1.55;
  max-width: 60ch;
}
.post__body {
  font-size: clamp(15px, .5vw + 13px, 17px);
  line-height: 1.7;
  color: var(--fg);
}
.post__body p { margin: 0 0 1.3em; }
.post__body a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.post__body code { font-size: .9em; }
.post__foot {
  margin-top: clamp(40px, 5vw, 64px);
  padding-top: clamp(20px, 2.5vw, 32px);
  border-top: 1px solid var(--rule);
}
.post__back {
  font-size: .82rem;
  text-decoration: none;
  color: var(--fg-3);
  letter-spacing: .04em;
}
.post__back:hover { color: var(--accent); }


/* =========================================================================
   MARQUEE
   ========================================================================= */
.marquee {
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  background: var(--bg-2);
  overflow: hidden;
  padding: 1.1rem 0;
}
.marquee__track {
  display: flex; gap: 2.6rem;
  white-space: nowrap;
  font-family: var(--mono);
  font-variation-settings: "MONO" 1, "CASL" 0, "slnt" 0;
  font-weight: 500;
  font-size: clamp(22px, 3.6vw + 4px, 48px);
  letter-spacing: -.015em;
  color: var(--fg);
  animation: scroll 38s linear infinite;
}
.marquee__track em {
  font-variation-settings: "MONO" 1, "CASL" 0, "slnt" -10;
  color: var(--accent);
}
.marquee__track span[aria-hidden] {
  color: var(--accent);
  font-size: .55em;
  align-self: center;
}
@keyframes scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}


/* =========================================================================
   GENERIC SECTION
   ========================================================================= */
.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(72px, 9vw, 144px) var(--gutter);
  position: relative;
}
.section + .section { padding-top: clamp(48px, 6vw, 96px); }

.section__head {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: clamp(16px, 3vw, 40px);
  row-gap: .5rem;
  align-items: baseline;
  margin-bottom: clamp(40px, 5vw, 72px);
  padding-bottom: clamp(20px, 2.5vw, 32px);
  border-bottom: 1px solid var(--rule);
}
.section__num {
  font-size: .78rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent);
  padding-top: .55rem;
  grid-row: 1 / span 2;
  font-weight: 550;
}
.section__title {
  font-family: var(--mono);
  font-variation-settings: "MONO" 1, "CASL" 0, "slnt" 0;
  font-weight: 600;
  font-size: clamp(34px, 5.2vw, 72px);
  line-height: 1.05;
  letter-spacing: -.03em;
  margin: 0;
}
.section__title em {
  font-variation-settings: "MONO" 1, "CASL" 0, "slnt" -10;
  color: var(--accent);
}
.section__kicker {
  font-size: .76rem;
  letter-spacing: .04em;
  color: var(--fg-3);
  grid-column: 2;
}
.section__kicker a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }


/* =========================================================================
   ABOUT
   ========================================================================= */
.about__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 80px);
  align-items: start;
}
@media (max-width: 840px) {
  .about__grid { grid-template-columns: 1fr; }
}
.about__copy p {
  margin: 0 0 1.4em;
  font-size: clamp(15px, .55vw + 12px, 17.5px);
  line-height: 1.7;
  max-width: 60ch;
  color: var(--fg);
}
.about__copy em {
  font-variation-settings: "MONO" 1, "CASL" 0, "slnt" -10;
  color: var(--accent);
}

.footnote { position: relative; }
.footnote sup { color: var(--accent); font-family: var(--mono); }

.about__sidebar { display: flex; flex-direction: column; gap: 1.5rem; }

.card {
  background: var(--bg-2);
  border: 1px solid var(--rule);
  padding: 1.4rem 1.4rem;
}
.stats { margin: 0; }
.stats div {
  display: flex; justify-content: space-between; gap: 1rem;
  padding: .65rem 0;
  border-bottom: 1px dashed var(--rule);
}
.stats div:last-child { border-bottom: 0; }
.stats dt {
  font-size: .7rem;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--fg-3);
}
.stats dd {
  margin: 0;
  font-size: .85rem;
  color: var(--fg);
  text-align: right;
}

.pull {
  margin: 0;
  border-left: 2px solid var(--accent);
  padding: .25rem 0 .25rem 1.1rem;
  font-variation-settings: "MONO" 1, "CASL" 0, "slnt" -8;
  font-weight: 500;
  font-size: 1.4rem;
  line-height: 1.25;
  color: var(--fg);
}
.pull p { margin: 0 0 .5rem; }
.pull footer {
  font-variation-settings: var(--vf-base);
  font-size: .7rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--fg-3);
  font-weight: 400;
}
.pull cite { font-style: normal; }


/* ---------- Licenses & Certifications card ---------- */
.certs__head {
  font-size: .68rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 1rem;
  font-weight: 550;
}
.certs__list { list-style: none; padding: 0; margin: 0; }
.certs__list li {
  padding: .9rem 0;
  border-bottom: 1px dashed var(--rule);
}
.certs__list li:first-child { padding-top: 0; }
.certs__list li:last-child  { padding-bottom: 0; border-bottom: 0; }
.certs__name {
  margin: 0 0 .25rem;
  font-size: .95rem;
  line-height: 1.3;
  color: var(--fg);
  font-weight: 550;
}
.certs__meta {
  margin: 0 0 .5rem;
  font-size: .68rem;
  letter-spacing: .06em;
  color: var(--fg-3);
}
.certs__link {
  display: inline-block;
  font-size: .68rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 1px solid currentColor;
  transition: color .25s var(--ease);
  font-weight: 550;
}
.certs__link:hover { color: var(--fg); }


/* =========================================================================
   WORK
   ========================================================================= */
.work__list {
  list-style: none; padding: 0; margin: 0;
  border-top: 1px solid var(--rule);
}
.work__item {
  position: relative;
  display: grid;
  grid-template-columns: 60px 1fr auto;
  gap: clamp(14px, 2.5vw, 32px);
  align-items: baseline;
  padding: clamp(22px, 3vw, 36px) 0;
  border-bottom: 1px solid var(--rule);
  transition: background .4s var(--ease);
}
.work__item:hover { background: linear-gradient(90deg, transparent, var(--bg-3), transparent); }
.work__item:hover .work__title { color: var(--accent); }

.work__index {
  font-size: .82rem;
  letter-spacing: .14em;
  color: var(--accent);
  padding-top: .55rem;
  font-weight: 550;
}
.work__title {
  margin: 0 0 .3rem;
  font-family: var(--mono);
  font-variation-settings: "MONO" 1, "CASL" 0, "slnt" 0;
  font-weight: 600;
  font-size: clamp(24px, 2vw + 10px, 36px);
  line-height: 1.1;
  letter-spacing: -.02em;
  transition: color .35s var(--ease);
  color: var(--fg);
}
.work__meta {
  margin: 0 0 .7rem;
  font-size: .68rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--fg-3);
}
.work__desc {
  margin: 0;
  max-width: 64ch;
  font-size: .92rem;
  line-height: 1.65;
  color: var(--fg-2);
}
.work__desc em {
  font-variation-settings: "MONO" 1, "CASL" 0, "slnt" -10;
  color: var(--fg);
}
.work__link {
  align-self: center;
  font-size: .72rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  text-decoration: none;
  padding: .7rem 1rem;
  border: 1px solid var(--fg);
  background: transparent;
  color: var(--fg);
  transition: background .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease);
  white-space: nowrap;
  font-weight: 550;
}
.work__link:hover { background: var(--accent); color: var(--bg); border-color: var(--accent); }
.work__link--quiet { color: var(--fg-3); border-color: var(--fg-3); pointer-events: none; }

@media (max-width: 720px) {
  .work__item { grid-template-columns: 40px 1fr; }
  .work__link { grid-column: 1 / -1; justify-self: start; margin-top: .7rem; }
}


/* =========================================================================
   NOW
   ========================================================================= */
.now__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
}
.now__card {
  background: var(--bg);
  padding: clamp(20px, 2.5vw, 32px);
  position: relative;
}
.now__card::before {
  content: "●";
  position: absolute; top: 16px; right: 18px;
  color: var(--accent);
  font-size: .7rem;
  line-height: 1;
  animation: blink 2.2s var(--ease) infinite;
}
@keyframes blink { 50% { opacity: .3; } }
.now__card h3 {
  font-size: .68rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 .9rem;
  font-weight: 550;
}
.now__card p {
  margin: 0;
  font-size: clamp(15px, .55vw + 12px, 17px);
  line-height: 1.55;
  color: var(--fg);
}
.now__card em {
  font-variation-settings: "MONO" 1, "CASL" 0, "slnt" -10;
  color: var(--accent);
}
.now__card code { font-size: .82em; padding: 0 .25em; }


/* =========================================================================
   NOTES
   ========================================================================= */
.notes__list {
  list-style: none; padding: 0; margin: 0;
  border-top: 1px solid var(--rule);
}
.notes__list li {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: clamp(14px, 2vw, 28px);
  align-items: baseline;
  padding: 1.3rem 0;
  border-bottom: 1px solid var(--rule);
}
.notes__list time {
  font-size: .72rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--fg-3);
}
.notes__list a {
  font-family: var(--mono);
  font-variation-settings: var(--vf-base);
  font-weight: 550;
  font-size: clamp(16px, 1vw + 8px, 22px);
  line-height: 1.3;
  text-decoration: none;
  letter-spacing: -.005em;
  background-image: linear-gradient(var(--accent), var(--accent));
  background-size: 0 1px;
  background-repeat: no-repeat;
  background-position: 0 100%;
  transition: background-size .45s var(--ease), color .35s var(--ease);
  color: var(--fg);
}
.notes__list a:hover { background-size: 100% 1px; color: var(--accent); }
.notes__list em {
  font-variation-settings: "MONO" 1, "CASL" 0, "slnt" -10;
}
.notes__list code { font-size: .8em; padding: 0 .25em; }
@media (max-width: 640px) {
  .notes__list li { grid-template-columns: 1fr; gap: .25rem; }
}


/* =========================================================================
   CONTACT
   ========================================================================= */
.contact__body {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(28px, 5vw, 72px);
  align-items: start;
}
@media (max-width: 840px) { .contact__body { grid-template-columns: 1fr; } }
.contact__lede {
  margin: 0;
  font-family: var(--mono);
  font-variation-settings: var(--vf-base);
  font-weight: 550;
  font-size: clamp(20px, 1.4vw + 10px, 28px);
  line-height: 1.35;
  letter-spacing: -.005em;
  color: var(--fg);
  max-width: 30ch;
}
.contact__links {
  list-style: none; margin: 0; padding: 0;
  border-top: 1px solid var(--rule);
}
.contact__links li { border-bottom: 1px solid var(--rule); }
.contact__links a {
  display: flex; align-items: center; gap: .85rem;
  padding: 1rem 0;
  font-size: .9rem;
  letter-spacing: .02em;
  text-decoration: none;
  transition: color .3s var(--ease), padding-left .3s var(--ease);
  color: var(--fg);
}
.contact__links .ix {
  display: inline-block;
  color: var(--accent);
  transition: transform .35s var(--ease);
}
.contact__links a:hover { color: var(--accent); padding-left: .6rem; }
.contact__links a:hover .ix { transform: translateX(4px); }


/* =========================================================================
   FOOTER
   ========================================================================= */
.site-footer {
  max-width: var(--max);
  margin: clamp(40px, 6vw, 96px) auto 0;
  padding: clamp(48px, 5vw, 80px) var(--gutter) clamp(32px, 4vw, 56px);
  border-top: 1px solid var(--rule);
  position: relative;
}
.site-footer::before {
  content: "";
  position: absolute;
  top: -1px; left: 50%;
  transform: translateX(-50%);
  width: 80px; height: 3px;
  background: var(--accent);
}

.site-footer__ascii {
  margin: 0 0 clamp(28px, 3vw, 40px);
  font-family: var(--mono);
  font-size: clamp(9px, 0.78vw, 12px);
  line-height: 1.25;
  color: var(--fg-3);
  white-space: pre;
  user-select: none;
  text-align: center;
  overflow-x: auto;
}
.site-footer__ascii::-webkit-scrollbar { display: none; }

.site-footer__nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(14px, 2.5vw, 32px);
  margin: 0 0 clamp(20px, 2.5vw, 32px);
  font-size: .78rem;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.site-footer__nav a {
  text-decoration: none;
  color: var(--fg);
  padding: .25rem 0;
  border-bottom: 1px solid transparent;
  transition: color .25s var(--ease), border-color .25s var(--ease);
}
.site-footer__nav a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.site-footer__bottom {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  gap: 1rem 2rem;
  flex-wrap: wrap;
  padding-top: clamp(20px, 2.5vw, 32px);
  border-top: 1px dashed var(--rule);
}
.site-footer__elsewhere {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: .55rem;
  font-size: .76rem;
  color: var(--fg-2);
}
@media (max-width: 640px) {
  .site-footer__bottom {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .site-footer__elsewhere { justify-content: center; }
}
.site-footer__elsewhere a {
  color: var(--fg);
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 1px;
  transition: color .25s var(--ease), border-color .25s var(--ease);
}
.site-footer__elsewhere a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
.site-footer__elsewhere span { color: var(--fg-3); }
.site-footer__sig {
  margin: 0;
  font-size: .76rem;
  letter-spacing: .02em;
  color: var(--fg-3);
}


/* =========================================================================
   ENTRY ANIMATIONS
   ========================================================================= */
/* Sections render visible immediately — no scroll-triggered reveals
   (caused invisible sections for fast-scroll and anchor-link navigation). */

.hero__overline,
.hero__first,
.hero__last,
.hero__lede,
.hero__cues,
.hero__scroll {
  opacity: 0;
  transform: translateY(14px);
  animation: rise .9s var(--ease) forwards;
}
.hero__overline { animation-delay: .05s; }
.hero__first    { animation-delay: .18s; transform: translateY(28px); }
.hero__last     { animation-delay: .32s; transform: translateY(28px); }
.hero__lede     { animation-delay: .58s; }
.hero__cues     { animation-delay: .78s; }
.hero__scroll   { animation-delay: 1.1s; }
@keyframes rise { to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0s !important;
  }
  .reveal { opacity: 1; transform: none; }
}
