/* ============================================================
   FINISH LAYER — "Ember Nocturne"
   A custom theme extension of the existing Resilient Systems
   identity: charcoal, parchment, ember. No new fonts, no new
   imagery — only true italics, sharper hierarchy, light,
   texture and motion.

   Loaded after styles.css and cinematic.css, so it refines
   rather than replaces the base system.
   ============================================================ */

:root {
  /* surface scale (additive — existing --ink/--ink-2/--ink-3 stay intact) */
  --ink-0:      #090A0C;
  --ink-lift:   #171A1F;
  --ink-card:   #14171B;

  /* ember scale */
  --ember-soft: rgba(224, 122, 69, 0.12);
  --ember-line: rgba(224, 122, 69, 0.42);
  --ember-glow: rgba(243, 144, 88, 0.16);
  --bone:       #F7F2E8;
  /* slightly lifted from the base token so the smallest metadata clears AA
     without losing the muted hierarchy */
  --text-faint: #8F897C;

  /* motion + shape */
  --ease:       cubic-bezier(.2, .7, .2, 1);
  --ease-out:   cubic-bezier(.16, 1, .3, 1);
  --r-sm:       3px;
  --r-md:       6px;
  --nav-h:      70px;
}

html { color-scheme: dark; }

body {
  background-color: var(--ink-0);
  scrollbar-color: var(--ember-deep) var(--ink-0);
}

/* text rendering discipline */
h1, h2, h3, blockquote { text-wrap: balance; }
p, li, figcaption { text-wrap: pretty; }

::selection { background: var(--ember); color: var(--ink-0); }

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

/* page-level frame: a barely-there warm edge light */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(224,122,69,.045), transparent 18%),
    linear-gradient(270deg, rgba(147,180,155,.025), transparent 22%);
}

img { background: var(--ink-2); }

/* ---------- skip link ---------- */
.skip {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 200;
  transform: translateY(-160%);
  padding: .8em 1.1em;
  background: var(--ember);
  color: var(--ink-0);
  font: 500 .74rem/1 var(--mono);
  letter-spacing: .04em;
  border-radius: var(--r-sm);
  transition: transform .2s var(--ease);
}
.skip:focus-visible { transform: none; }

/* ============================================================
   NAV — progress, active state, monogram
   ============================================================ */
.nav {
  background: rgba(9, 10, 12, .78);
  border-bottom-color: rgba(236, 231, 220, .09);
  box-shadow: 0 12px 40px -28px rgba(0, 0, 0, .9);
}
.nav__progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, var(--ember-deep), var(--ember-br) 65%, var(--bone));
  transform: scaleX(0);
  transform-origin: left center;
  opacity: .9;
  pointer-events: none;
}
.nav__mark {
  transition: background .3s var(--ease), color .3s var(--ease),
              border-color .3s var(--ease), transform .3s var(--ease);
}
.nav__brand:hover .nav__mark {
  background: var(--ember);
  border-color: var(--ember);
  color: var(--ink-0);
  transform: rotate(-4deg);
}
.nav__name { transition: color .25s; }
.nav__brand:hover .nav__name { color: var(--ember-br); }

.nav__links a {
  position: relative;
  padding-block: .4rem;
  transition: color .2s var(--ease);
}
.nav__links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--ember);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .28s var(--ease);
}
.nav__links a:hover::after,
.nav__links a:focus-visible::after,
.nav__links a.is-active::after { transform: scaleX(1); }
.nav__links a.is-active { color: var(--text); }

.nav__links { font-size: .78rem; }
.nav__social { font-size: .75rem; }
.nav__cta {
  display: inline-flex;
  align-items: center;
  gap: .42em;
  padding: .58em .85em;
  margin-right: .25rem;
  border: 1px solid var(--ember-line);
  border-radius: 2px;
  font-family: var(--mono);
  font-size: .7rem;
  letter-spacing: .06em;
  color: var(--ember-br);
  transition: background .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease);
}
.nav__cta:hover {
  background: var(--ember);
  border-color: var(--ember);
  color: var(--ink-0);
}
.nav__cta span { transition: transform .25s var(--ease); }
.nav__cta:hover span { transform: translate(2px, -2px); }
@media (max-width: 1100px) { .nav__social .nav__cta { display: none; } }
.nav__social a:hover .ico { transform: translateY(-1px); }
.nav__social .nav__cta:hover { color: var(--ink-0); }
.nav__social .ico { transition: transform .25s var(--ease); }

/* hand-drawn feel without the emoji-font menu glyph */
.mobile-menu-toggle {
  padding: 0;
  align-items: center;
  justify-content: center;
}
.burger {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 20px;
  height: 14px;
}
.burger i {
  display: block;
  height: 1.5px;
  width: 100%;
  background: currentColor;
  transition: transform .3s var(--ease), opacity .2s;
}
.mobile-menu-toggle[aria-expanded="true"] .burger i:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.mobile-menu-toggle[aria-expanded="true"] .burger i:nth-child(2) { opacity: 0; }
.mobile-menu-toggle[aria-expanded="true"] .burger i:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

.mobile-menu {
  background:
    radial-gradient(70% 50% at 100% 0%, rgba(224, 122, 69, .12), transparent 65%),
    var(--ink-0);
  border-radius: var(--r-md);
}
.mobile-menu nav a {
  transition: color .2s, padding-left .25s var(--ease);
}
.mobile-menu nav a:hover { color: var(--ember); padding-left: .35rem; }

/* No-JS mobile: the injected menu button cannot exist, so surface the links
   instead of hiding navigation entirely. */
@media (max-width: 920px) {
  html:not(.js) body { padding-top: 0; }
  html:not(.js) header.nav {
    position: static;
    height: auto;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: .55rem 1rem;
    padding: .9rem var(--pad);
  }
  html:not(.js) .nav__links {
    display: flex;
    flex-wrap: wrap;
    order: 3;
    width: 100%;
    gap: .4rem 1rem;
    font-size: .7rem;
  }
  html:not(.js) .nav__social { display: none; }
}

/* ============================================================
   HERO — spotlight, technical field, portrait framing
   ============================================================ */
.hero {
  position: relative;
  isolation: isolate;
  background:
    radial-gradient(560px circle at var(--mx, 76%) var(--my, 30%),
      rgba(243, 144, 88, .085), transparent 62%);
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(46% 44% at 76% 36%, rgba(224, 122, 69, .16), transparent 70%),
    radial-gradient(32% 38% at 94% 78%, rgba(194, 86, 42, .09), transparent 72%);
  filter: blur(10px);
}
.hero::after {
  content: "";
  position: absolute;
  z-index: 0;
  top: 8%;
  right: 0;
  width: 44%;
  height: 84%;
  pointer-events: none;
  opacity: .5;
  background-image:
    linear-gradient(rgba(236, 231, 220, .075) 1px, transparent 1px),
    linear-gradient(90deg, rgba(236, 231, 220, .075) 1px, transparent 1px);
  background-size: 52px 52px;
  -webkit-mask-image: radial-gradient(ellipse at 58% 46%, #000 6%, transparent 66%);
          mask-image: radial-gradient(ellipse at 58% 46%, #000 6%, transparent 66%);
}
.hero > * { position: relative; z-index: 1; }

.hero__title {
  letter-spacing: -.032em;
  font-variation-settings: "opsz" 120;
}
.hero__title-em {
  text-shadow: 0 0 70px rgba(224, 122, 69, .16);
}
.hero__sub { max-width: 44ch; }

/* credibility line directly under the CTA — above-the-fold proof */
.hero__proof {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .45rem 1.35rem;
  margin-top: 1.8rem;
  padding-top: 1.15rem;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: .68rem;
  line-height: 1.5;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.hero__proof span { display: inline-flex; align-items: baseline; gap: .42em; white-space: nowrap; }
.hero__proof b {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: -.01em;
  color: var(--ember-br);
}

/* desktop scroll cue — a quiet invitation, not a button */
.hero__scroll {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  margin-top: 1.8rem;
  font: .64rem/1 var(--mono);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-faint);
  transition: color .25s;
}
.hero__scroll::before {
  content: "";
  width: 34px;
  height: 1px;
  background: linear-gradient(90deg, var(--ember), transparent);
  transition: width .35s var(--ease);
}
.hero__scroll:hover { color: var(--text); }
.hero__scroll:hover::before { width: 52px; }

/* portrait: contact-sheet frame, warm edge, settle-in motion */
.hero__media {
  border: 1px solid rgba(236, 231, 220, .18);
  border-radius: var(--r-sm);
  overflow: hidden;
  box-shadow:
    18px 18px 0 -1px var(--ink-0),
    18px 18px 0 0 rgba(224, 122, 69, .38),
    0 40px 90px -40px rgba(0, 0, 0, .95);
}
.hero__media::before {
  content: "";
  position: absolute;
  inset: 10px;
  z-index: 2;
  pointer-events: none;
  opacity: .8;
  background:
    linear-gradient(var(--bone), var(--bone)) left top / 16px 1px no-repeat,
    linear-gradient(var(--bone), var(--bone)) left top / 1px 16px no-repeat,
    linear-gradient(var(--bone), var(--bone)) right top / 16px 1px no-repeat,
    linear-gradient(var(--bone), var(--bone)) right top / 1px 16px no-repeat,
    linear-gradient(var(--bone), var(--bone)) left bottom / 16px 1px no-repeat,
    linear-gradient(var(--bone), var(--bone)) left bottom / 1px 16px no-repeat,
    linear-gradient(var(--bone), var(--bone)) right bottom / 16px 1px no-repeat,
    linear-gradient(var(--bone), var(--bone)) right bottom / 1px 16px no-repeat;
  mix-blend-mode: screen;
}
.hero__media img {
  filter: saturate(1.03) contrast(1.03);
  animation: portrait-settle 2.4s var(--ease-out) backwards;
  transition: transform 1.6s var(--ease-out);
}
.hero__media:hover img { transform: scale(1.012); }
@keyframes portrait-settle {
  from { transform: scale(1.055); }
  to   { transform: scale(1); }
}
.hero__media figcaption {
  z-index: 3;
  font-size: .64rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  background: linear-gradient(to top, rgba(7, 8, 9, .96) 20%, rgba(7, 8, 9, .55) 60%, transparent);
}

/* ============================================================
   STATS — instrument strip
   ============================================================ */
.stats {
  border-top-color: var(--line-2);
  border-bottom-color: var(--line-2);
  background:
    linear-gradient(180deg, rgba(224, 122, 69, .035), transparent 42%),
    var(--ink-0);
}
.stat {
  position: relative;
  padding: 2rem 1.3rem 1.9rem;
  transition: background .35s var(--ease);
}
.stat:first-child { padding-left: 0; }
.stat::before {
  content: "";
  position: absolute;
  top: 0;
  left: 1.3rem;
  width: 26px;
  height: 1px;
  background: var(--ember);
  transform: scaleX(.45);
  transform-origin: left center;
  transition: transform .4s var(--ease);
}
.stat:first-child::before { left: 0; }
.stat:hover { background: linear-gradient(180deg, rgba(224, 122, 69, .06), transparent 70%); }
.stat:hover::before { transform: scaleX(1); }
.stat__n {
  font-variant-numeric: tabular-nums;
  font-variation-settings: "opsz" 72;
}
.stat__u { color: var(--ember-br); }
.stat__l { color: var(--text-dim); }

/* ============================================================
   SECTION HEADERS — ghost ordinals and sharper kickers
   ============================================================ */
.section { position: relative; }
.section-ghost {
  position: absolute;
  top: clamp(1.6rem, 4.5vw, 3.2rem);
  right: var(--pad);
  z-index: 0;
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(6rem, 15vw, 13rem);
  line-height: .72;
  letter-spacing: -.07em;
  color: rgba(236, 231, 220, .02);
  -webkit-text-stroke: 1px rgba(236, 231, 220, .045);
  pointer-events: none;
  user-select: none;
}
.contact .section-ghost { display: none; }
.section > :not(.section-ghost) { position: relative; z-index: 1; }

.kicker::before {
  content: "";
  width: 6px;
  height: 6px;
  flex: none;
  background: var(--ember);
  transform: rotate(45deg);
  box-shadow: 0 0 12px rgba(224, 122, 69, .45);
}
.kicker { letter-spacing: .22em; }

.h2 {
  letter-spacing: -.025em;
  font-variation-settings: "opsz" 96;
}

/* ============================================================
   ABOUT — now-list, framed portrait, gradient quote rule
   ============================================================ */
.about__portrait {
  border-color: rgba(236, 231, 220, .18);
  box-shadow:
    12px 12px 0 -1px var(--ink-0),
    12px 12px 0 0 rgba(236, 231, 220, .12);
  transition: box-shadow .4s var(--ease), transform .4s var(--ease);
}
.about__portrait:hover {
  transform: translateY(-2px);
  box-shadow:
    12px 12px 0 -1px var(--ink-0),
    12px 12px 0 0 rgba(224, 122, 69, .4),
    0 30px 60px -40px rgba(0, 0, 0, .9);
}
.about__portrait img { transition: transform 1.4s var(--ease-out); }
.about__portrait:hover img { transform: scale(1.015); }

.now {
  list-style: none;
  margin: 2.1rem 0 0;
  border-top: 1px solid var(--line);
}
.now li {
  display: grid;
  grid-template-columns: 8.6rem 1fr;
  gap: 1rem;
  padding: .78rem 0;
  border-bottom: 1px solid var(--line);
}
.now__k {
  font: .62rem/1.7 var(--mono);
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--ember);
}
.now__v { color: var(--text); font-size: .92rem; line-height: 1.45; }

.quote {
  position: relative;
  border-left: 0;
  padding-left: 1.6rem;
  margin-top: 2.2rem;
}
.quote::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--ember), rgba(224, 122, 69, .06));
}
.quote blockquote {
  font-variation-settings: "opsz" 24;
  letter-spacing: -.01em;
}
.quote figcaption { font-size: .68rem; letter-spacing: .05em; }

/* ============================================================
   STAGE — tape, warmer cards, a real exit
   ============================================================ */
.talks a {
  position: relative;
  transition: padding .35s var(--ease), background .35s var(--ease);
}
.talks a::before {
  content: "";
  position: absolute;
  left: 0;
  top: 18%;
  bottom: 18%;
  width: 2px;
  background: var(--ember);
  transform: scaleY(0);
  transform-origin: top center;
  transition: transform .3s var(--ease);
}
.talks a:hover::before { transform: scaleY(1); }
.talks a:hover {
  padding-left: 1.1rem;
  background: linear-gradient(90deg, rgba(224, 122, 69, .085), transparent 72%);
}
.talk__title { font-variation-settings: "opsz" 32; }
.talks a:hover .talk__go {
  color: var(--ember);
  transform: translate(3px, -3px) rotate(-8deg);
}

.polaroid {
  position: relative;
  box-shadow: 0 22px 48px -24px rgba(0, 0, 0, .85);
}
.polaroid img { height: auto; }
.polaroid::before {
  content: "";
  position: absolute;
  top: -9px;
  left: 50%;
  z-index: 2;
  width: 72px;
  height: 18px;
  transform: translateX(-50%) rotate(-2.5deg);
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .05) 0 2px, transparent 2px 6px),
    rgba(236, 231, 220, .14);
  border-inline: 1px dashed rgba(255, 255, 255, .12);
  backdrop-filter: blur(2px);
  pointer-events: none;
}
.polaroid--offset::before { transform: translateX(-50%) rotate(1.8deg); }
.polaroid:hover { transform: rotate(0) translateY(-6px); }

.stage__all {
  display: inline-flex;
  align-items: center;
  gap: .6em;
  margin-top: 1.6rem;
  padding-bottom: .35rem;
  border-bottom: 1px solid var(--line-2);
  font: .68rem/1 var(--mono);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-dim);
  transition: color .25s, border-color .25s;
}
.stage__all:hover { color: var(--ember); border-color: var(--ember); }

/* ============================================================
   BUILDING — catalogue cards with depth and an accent rail
   ============================================================ */
/* quick index for a 21-product catalogue */
.cluster__index {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  margin: -1.4rem 0 2.4rem;
}
.cluster__index a {
  display: inline-flex;
  align-items: center;
  gap: .55em;
  min-height: 38px;
  padding: .55em .8em;
  border: 1px solid var(--line);
  border-radius: 2px;
  font: .64rem/1 var(--mono);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-dim);
  transition: color .22s var(--ease), border-color .22s var(--ease), background .22s var(--ease);
}
.cluster__index a span {
  color: var(--ember);
  font-size: .9em;
  letter-spacing: .04em;
}
.cluster__index a:hover {
  color: var(--text);
  border-color: var(--ember-line);
  background: var(--ember-soft);
}

.cluster__label {
  display: flex;
  align-items: center;
  gap: .7rem;
  letter-spacing: .18em;
}
.cluster__label::before {
  content: "";
  width: 5px;
  height: 5px;
  background: var(--ember);
  transform: rotate(45deg);
}
.cluster__count {
  margin-left: auto;
  font-size: .62rem;
  letter-spacing: .1em;
  color: var(--text-faint);
}
.cluster__count::before { content: "/ "; color: var(--text-faint); }

.card a,
.card--app {
  position: relative;
  overflow: hidden;
  border-color: rgba(236, 231, 220, .10);
  border-radius: var(--r-sm);
  background:
    linear-gradient(180deg, rgba(236, 231, 220, .028), transparent 48%),
    var(--ink-card);
  transition: border-color .3s var(--ease), transform .3s var(--ease),
              background .3s var(--ease), box-shadow .3s var(--ease);
}
.card a::before,
.card--app::before {
  content: "";
  position: absolute;
  left: 0;
  top: 16%;
  bottom: 16%;
  width: 2px;
  background: var(--ember);
  transform: scaleY(0);
  transform-origin: top center;
  transition: transform .32s var(--ease);
  z-index: 2;
}
.card a:hover,
.card--app:hover {
  border-color: var(--ember-line);
  transform: translateY(-2px);
  background:
    linear-gradient(180deg, rgba(224, 122, 69, .07), transparent 62%),
    var(--ink-lift);
  box-shadow: 0 18px 40px -26px rgba(0, 0, 0, .95);
}
.card a:hover::before,
.card--app:hover::before { transform: scaleY(1); }
.card a:hover .go,
.card--app:hover .go { color: var(--ember); transform: translate(2px, -2px); }
.card__name { font-variation-settings: "opsz" 32; letter-spacing: -.01em; }
.card__desc { color: var(--text-dim); }
.card__icon {
  border-radius: 14px;
  border-color: rgba(236, 231, 220, .14);
  box-shadow: 0 8px 18px -10px rgba(0, 0, 0, .9);
}

.building__store {
  display: inline-flex;
  align-items: center;
  gap: .55em;
  padding: .7em 1em;
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  text-transform: none;
  letter-spacing: .03em;
  font-size: .72rem;
  color: var(--text-dim);
  transition: color .25s, border-color .25s, background .25s, transform .25s;
}
.building__store:hover {
  color: var(--ember);
  border-color: var(--ember-line);
  background: var(--ember-soft);
  transform: translateY(-1px);
}

/* the catalogue closes on its own arithmetic */
.cluster__tally {
  display: flex;
  align-items: center;
  gap: 1.15rem;
  margin-top: .2rem;
  padding: 1.15rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background:
    radial-gradient(120% 160% at 0% 0%, rgba(224, 122, 69, .09), transparent 58%),
    var(--ink-card);
}
.cluster__tally-n {
  font-family: var(--display);
  font-weight: 600;
  font-size: 3rem;
  line-height: .9;
  letter-spacing: -.05em;
  color: var(--ember);
  font-variation-settings: "opsz" 144;
}
.cluster__tally-label {
  font: .66rem/1.5 var(--mono);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--text);
}
.cluster__tally-meta {
  margin-top: .3rem;
  font: .62rem/1.6 var(--mono);
  letter-spacing: .07em;
  color: var(--text-faint);
}

/* ============================================================
   TRAVEL STRIP — a field-notes plate
   ============================================================ */
.travel-strip {
  position: relative;
  display: grid;
  grid-template-columns: 1.25fr .75fr;
  gap: 2px;
  margin-top: clamp(2.5rem, 6vw, 4rem);
  border: 1px solid var(--line-2);
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--ink-2);
  isolation: isolate;
}
.travel-strip::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(to top, rgba(7, 8, 9, .96) 2%, rgba(7, 8, 9, .55) 38%, transparent 68%);
}
.travel-strip img {
  width: 100%;
  height: clamp(280px, 34vw, 410px);
  aspect-ratio: auto;
  object-fit: cover;
  border: 0;
  border-radius: 0;
  filter: saturate(.86) contrast(1.03);
  transition: transform 1.6s var(--ease-out), filter .8s var(--ease);
}
.travel-strip:hover img { transform: scale(1.022); filter: saturate(1) contrast(1.04); }
.travel-strip figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  grid-column: auto;
  max-width: 68ch;
  margin: 0;
  padding: 2rem clamp(1.2rem, 3.5vw, 2.2rem) 1.6rem;
  font-size: .74rem;
  line-height: 1.6;
  color: var(--text);
}
.travel-strip figcaption::before {
  content: "Field notes / Alaska";
  display: block;
  margin-bottom: .55rem;
  font: .62rem/1 var(--mono);
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ember-br);
}
.travel-strip .tlink {
  color: var(--ember-br);
  border-bottom: 1px solid rgba(243, 144, 88, .35);
  margin-left: .35em;
}
.travel-strip .tlink:hover { color: var(--bone); border-color: var(--bone); }

/* ============================================================
   OPEN SOURCE — language dots, matching plate treatment
   ============================================================ */
.repo a {
  position: relative;
  overflow: hidden;
  border-color: rgba(236, 231, 220, .10);
  border-radius: var(--r-sm);
  background:
    linear-gradient(180deg, rgba(236, 231, 220, .025), transparent 48%),
    var(--ink-card);
  transition: border-color .3s var(--ease), transform .3s var(--ease),
              background .3s var(--ease), box-shadow .3s var(--ease);
}
.repo a::before {
  content: "";
  position: absolute;
  left: 0;
  top: 16%;
  bottom: 16%;
  width: 2px;
  background: var(--ember);
  transform: scaleY(0);
  transform-origin: top center;
  transition: transform .32s var(--ease);
}
.repo a:hover {
  border-color: var(--ember-line);
  transform: translateY(-3px);
  background:
    linear-gradient(180deg, rgba(224, 122, 69, .065), transparent 62%),
    var(--ink-lift);
  box-shadow: 0 18px 40px -26px rgba(0, 0, 0, .95);
}
.repo a:hover::before { transform: scaleY(1); }
.repo__ico { transition: fill .25s, transform .25s; }
.repo a:hover .repo__ico { transform: scale(1.08); }
.repo__name { letter-spacing: -.01em; }
.repo__lang {
  display: inline-flex;
  align-items: center;
  gap: .38em;
  border-radius: 2px;
  font-size: .64rem;
  letter-spacing: .05em;
}
.repo__lang::before {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--ember);
  box-shadow: 0 0 6px rgba(224, 122, 69, .6);
}

.repo--more a {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: .4rem;
  min-height: 100%;
  border-style: dashed;
  border-color: var(--line-2);
  background: transparent;
}
.repo--more .repo__top { margin-bottom: 0; }
.repo--more .repo__arrow {
  position: absolute;
  right: 1.2rem;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--mono);
  font-size: 1.2rem;
  color: var(--text-faint);
  transition: color .25s, transform .3s var(--ease);
}
.repo--more a:hover .repo__arrow {
  color: var(--ember);
  transform: translate(3px, calc(-50% - 3px));
}

/* ============================================================
   CONTACT — the closing plate
   ============================================================ */
.contact { padding-bottom: clamp(3rem, 7vh, 5rem); }
.contact__panel {
  position: relative;
  display: grid;
  grid-template-columns: 1.22fr .78fr;
  gap: clamp(2rem, 4.5vw, 4rem);
  padding: clamp(1.7rem, 4.5vw, 3.4rem);
  border: 1px solid var(--line-2);
  border-radius: var(--r-md);
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(560px circle at var(--mx, 24%) var(--my, 12%),
      rgba(243, 144, 88, .13), transparent 62%),
    linear-gradient(155deg, rgba(224, 122, 69, .07), transparent 46%),
    linear-gradient(180deg, var(--ink-lift), var(--ink-1));
  box-shadow:
    0 1px 0 rgba(236, 231, 220, .05) inset,
    0 50px 120px -70px rgba(0, 0, 0, 1);
}
.contact__panel::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: .45;
  background-image:
    linear-gradient(rgba(236, 231, 220, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(236, 231, 220, .05) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(ellipse at 15% 10%, #000, transparent 62%);
          mask-image: radial-gradient(ellipse at 15% 10%, #000, transparent 62%);
}
.contact__panel::after {
  content: "YR";
  position: absolute;
  right: -1.4rem;
  bottom: -4.6rem;
  z-index: 0;
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(11rem, 22vw, 19rem);
  line-height: .8;
  letter-spacing: -.08em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(236, 231, 220, .055);
  pointer-events: none;
  user-select: none;
}
.contact__copy { position: relative; z-index: 1; }
.contact__status {
  display: inline-flex;
  align-items: center;
  gap: .6em;
  font: .66rem/1 var(--mono);
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.contact__status .status { animation-duration: 3s; }
.contact__title {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(2.6rem, 5.6vw, 4.5rem);
  line-height: .96;
  letter-spacing: -.04em;
  color: var(--text);
  margin: 1.1rem 0 1.15rem;
  font-variation-settings: "opsz" 144;
}
.contact__title em {
  color: var(--ember);
  font-style: italic;
  font-weight: 500;
  text-shadow: 0 0 60px rgba(224, 122, 69, .18);
}
.contact__lead {
  max-width: 42ch;
  color: var(--text-dim);
  font-size: 1.02rem;
}
.contact__links { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.9rem; }
.contact__links .btn { min-height: 44px; }

.contact__side {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 2rem;
  padding-left: clamp(1rem, 3vw, 2.2rem);
  border-left: 1px solid var(--line);
}
.contact__id { display: flex; align-items: center; gap: 1rem; }
.contact__avatar {
  width: 74px;
  height: 74px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(236, 231, 220, .22);
  box-shadow: 0 0 0 6px rgba(236, 231, 220, .03);
  filter: saturate(1.03);
  flex: none;
}
.contact__name {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.12rem;
  line-height: 1.2;
  color: var(--text);
}
.contact__role {
  margin-top: .2rem;
  font: .64rem/1.5 var(--mono);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.contact__facts { margin: 0; display: grid; gap: .55rem; }
.contact__facts > div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-top: .6rem;
  border-top: 1px solid var(--line);
}
.contact__facts dt {
  font: .64rem/1.6 var(--mono);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.contact__facts dd {
  margin: 0;
  font: .72rem/1.6 var(--mono);
  letter-spacing: .02em;
  color: var(--text);
  text-align: right;
}
.contact__facts a {
  color: var(--ember-br);
  border-bottom: 1px solid rgba(243, 144, 88, .28);
  transition: color .2s, border-color .2s;
}
.contact__facts a:hover { color: var(--bone); border-color: var(--bone); }

/* booking error fallback — never leave a visitor at a dead end */
.book__error-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .6rem;
}

/* ============================================================
   FOOTER — a proper sign-off
   ============================================================ */
.foot {
  display: block;
  padding-top: 2rem;
  padding-bottom: 2.4rem;
  border-top: 0;
  background:
    linear-gradient(180deg, transparent, rgba(224, 122, 69, .035)),
    transparent;
}
.foot::before {
  content: "";
  display: block;
  height: 1px;
  margin-bottom: 1.6rem;
  background: linear-gradient(90deg, var(--ember-line), var(--line), transparent 80%);
}
.foot__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.foot__brand {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  font-family: var(--display);
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--text);
}
.foot__brand .nav__mark { font-size: .8rem; }
.foot__nav { display: flex; flex-wrap: wrap; gap: 1.15rem; }
.foot__nav a {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding-block: .35rem;
  font: .68rem/1 var(--mono);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-faint);
  transition: color .2s;
}
.foot__nav a:hover { color: var(--ember); }
.foot__to-top {
  display: inline-flex;
  align-items: center;
  gap: .45em;
  font: .62rem/1 var(--mono);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-dim);
  transition: color .2s;
}
.foot__to-top:hover { color: var(--ember); }
.foot__bottom {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1.8rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--line);
}

/* ============================================================
   MOTION — card choreography (never blocks hover transforms)
   ============================================================ */
@media (prefers-reduced-motion: no-preference) {
  .section.in-view .cards > li,
  .section.in-view .repos > li {
    animation: card-rise .7s var(--ease-out) backwards;
  }
  .section.in-view .cards > li:nth-child(1),
  .section.in-view .repos > li:nth-child(1) { animation-delay: .02s; }
  .section.in-view .cards > li:nth-child(2),
  .section.in-view .repos > li:nth-child(2) { animation-delay: .06s; }
  .section.in-view .cards > li:nth-child(3),
  .section.in-view .repos > li:nth-child(3) { animation-delay: .1s; }
  .section.in-view .cards > li:nth-child(4),
  .section.in-view .repos > li:nth-child(4) { animation-delay: .14s; }
  .section.in-view .cards > li:nth-child(5),
  .section.in-view .repos > li:nth-child(5) { animation-delay: .18s; }
  .section.in-view .cards > li:nth-child(6),
  .section.in-view .repos > li:nth-child(6) { animation-delay: .22s; }
  .section.in-view .cards > li:nth-child(7),
  .section.in-view .repos > li:nth-child(7) { animation-delay: .26s; }
  .section.in-view .cards > li:nth-child(8),
  .section.in-view .repos > li:nth-child(8) { animation-delay: .3s; }
  .section.in-view .cards > li:nth-child(n+9),
  .section.in-view .repos > li:nth-child(n+9) { animation-delay: .34s; }
}
@keyframes card-rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1080px) {
  .hero::after { width: 52%; opacity: .35; }
  .hero__media { box-shadow:
    12px 12px 0 -1px var(--ink-0),
    12px 12px 0 0 rgba(224, 122, 69, .34),
    0 34px 70px -40px rgba(0, 0, 0, .9); }
}

@media (max-width: 920px) {
  .section-ghost { font-size: clamp(5rem, 18vw, 9rem); }
  .stat { padding-left: 1.1rem; padding-right: 1.1rem; }
  .stat:nth-child(3) { padding-left: 0; }
  .stat:nth-child(3)::before { left: 0; }
  .polaroid,
  .polaroid--offset { transform: none; }
  .polaroid--offset { margin-right: 0; }
  .polaroid:hover { transform: translateY(-4px); }
  .contact__panel { grid-template-columns: 1fr; }
  .contact__side {
    border-left: 0;
    border-top: 1px solid var(--line);
    padding-left: 0;
    padding-top: 1.8rem;
    gap: 1.4rem;
  }
  .contact__facts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .contact__facts > div { flex-direction: column; gap: .2rem; }
  .contact__facts dd { text-align: left; }
}

@media (max-width: 650px) {
  .hero { background: none; }
  .hero::before {
    inset: 0;
    background: radial-gradient(70% 60% at 50% 30%, rgba(224, 122, 69, .14), transparent 72%);
  }
  .hero::after { display: none; }
  .hero .eyebrow {
    display: flex;
    margin-bottom: 1rem;
    font-size: .56rem;
    letter-spacing: .12em;
    gap: .35em .5em;
  }
  .hero__proof {
    margin-top: 1.15rem;
    padding-top: .9rem;
    gap: .35rem .9rem;
    font-size: .62rem;
  }
  .hero__proof b { font-size: .86rem; }
  .hero__proof span { white-space: normal; }
  .hero__media {
    box-shadow:
      7px 7px 0 -1px var(--ink-0),
      7px 7px 0 0 rgba(224, 122, 69, .34);
  }
  .hero__media::before { inset: 7px; opacity: .6; }
  .hero__scroll { margin-top: 1rem; }
  .hero__scroll::before { width: 24px; }
  .section-ghost { display: none; }
  .cluster__index { margin-top: -1.4rem; gap: .35rem; }
  .cluster__index a { min-height: 44px; font-size: .6rem; padding-inline: .65em; }
  .about__portrait { box-shadow: 7px 7px 0 -1px var(--ink-0), 7px 7px 0 0 rgba(236, 231, 220, .12); }
  .now li { grid-template-columns: 6.6rem 1fr; gap: .7rem; }
  .now__k { font-size: .56rem; }
  .now__v { font-size: .86rem; }
  .travel-strip { grid-template-columns: 1fr; }
  .travel-strip img { height: 214px; }
  .travel-strip figcaption { position: relative; padding-top: 1.1rem; }
  .travel-strip::after {
    background: linear-gradient(to top, rgba(7, 8, 9, .97) 0%, rgba(7, 8, 9, .6) 52%, transparent 100%);
  }
  .contact__panel { padding: 1.5rem 1.25rem 1.7rem; }
  .contact__title { font-size: clamp(2.3rem, 11vw, 3.2rem); }
  .contact__facts { grid-template-columns: 1fr; gap: .55rem; }
  .contact__facts > div {
    flex-direction: row;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
  }
  .contact__facts > div:last-child { grid-column: auto; }
  .contact__facts dd { text-align: right; }
  .contact__avatar { width: 62px; height: 62px; }
  .foot__top { align-items: flex-start; }
  .foot__nav { order: 3; width: 100%; }
  .foot__to-top { margin-left: auto; }
}

@media (max-width: 420px) {
  .hero__proof span { white-space: normal; }
  .contact__links { gap: .55rem; }
  .contact__links .btn { flex: 1 1 auto; }
}

/* ============================================================
   MOTION PREFERENCES + PRINT
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  /* specificity fix: .js .section must not stay at opacity 0 */
  .js .section,
  .js .stats,
  .js .travel-strip { opacity: 1 !important; transform: none !important; }
  .hero__media img { animation: none; }
  .hero__media:hover img,
  .about__portrait:hover img,
  .travel-strip:hover img { transform: none; }
  .section.in-view .cards > li,
  .section.in-view .repos > li { animation: none; }
  .hero { background: none; }
  .contact__panel { background: var(--ink-lift); }
}

@media print {
  .nav, .grain, .nav__progress, .hero__scroll, .skip, .mobile-menu { display: none !important; }
  body { background: #fff; color: #111; }
  .js .section, .js .stats, .js .travel-strip, .js .reveal { opacity: 1 !important; transform: none !important; }
  .section { break-inside: avoid; }
  .hero__media, .about__portrait { box-shadow: none; }
}
