/* =========================================================================
   akoirala.com
   Palette: deep violet-ink ground, warm bone type, molten amber→ember accent.
   Sections are ordered top-to-bottom to match index.html.
   ========================================================================= */

/* ---------- 1. Tokens ---------- */
:root {
  /* ground */
  --ink-900: #0D0A13;
  --ink-850: #120E1A;
  --ink-800: #171223;
  --ink-750: #1E1830;
  --ink-700: #272040;

  /* type */
  --bone:    #F3EEE7;
  --bone-dim:#CFC7BE;
  --muted:   #9A91AC;
  --muted-2: #6F667F;

  /* accent */
  --amber:   #FFB14D;
  --ember:   #FF6A3D;
  --iris:    #8B7BFF;
  --accent-grad: linear-gradient(100deg, var(--amber), var(--ember));

  /* lines */
  --line:      rgba(255,255,255,.075);
  --line-soft: rgba(255,255,255,.045);
  --line-hard: rgba(255,255,255,.14);

  /* type stacks */
  --font-display: "Bricolage Grotesque", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-body: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  /* rhythm */
  --shell: 1200px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --section-y: clamp(5.5rem, 12vw, 10rem);
  --radius: 20px;
  --radius-sm: 12px;

  --ease-out: cubic-bezier(.16,1,.3,1);
  --header-h: 72px;
}

/* ---------- 2. Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1.5rem);
}

body {
  margin: 0;
  background: var(--ink-900);
  color: var(--bone);
  font-family: var(--font-body);
  font-size: clamp(1rem, .96rem + .2vw, 1.075rem);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* A single warm wash so the page never reads as flat near-black. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(120% 80% at 82% -10%, rgba(255,106,61,.10), transparent 55%),
    radial-gradient(90% 70% at 5% 8%, rgba(139,123,255,.09), transparent 60%),
    linear-gradient(180deg, var(--ink-900), var(--ink-850) 45%, var(--ink-900));
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -.02em;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0; text-wrap: pretty; }
ul { margin: 0; padding: 0; list-style: none; }
img { max-width: 100%; height: auto; display: block; }
strong { color: var(--bone); font-weight: 600; }

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

/* ---------- 3. Focus & a11y ---------- */
:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
  border-radius: 4px;
}

.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: 0; left: 50%;
  transform: translate(-50%, -120%);
  z-index: 200;
  background: var(--amber); color: #1A1206;
  font-weight: 600; padding: .7rem 1.25rem;
  border-radius: 0 0 10px 10px;
  transition: transform .18s var(--ease-out);
}
.skip-link:focus { transform: translate(-50%, 0); }

/* ---------- 4. Layout primitives ---------- */
.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: var(--section-y); position: relative; }

.section__head { max-width: 46rem; margin-bottom: clamp(3rem, 6vw, 4.5rem); }

.section__index {
  font-family: var(--font-mono);
  font-size: .78rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--amber);
  display: flex;
  align-items: center;
  gap: .85rem;
  margin-bottom: 1.35rem;
}
.section__index::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(255,177,77,.5), transparent);
}

.section__title { font-size: clamp(2rem, 1.35rem + 3vw, 3.5rem); }
.section__title--sm { font-size: clamp(1.75rem, 1.3rem + 2.2vw, 2.75rem); }

.section__sub {
  margin-top: 1.35rem;
  color: var(--muted);
  font-size: clamp(1.02rem, .98rem + .3vw, 1.18rem);
  max-width: 40rem;
}

/* ---------- 5. Buttons ---------- */
.btn {
  --btn-py: .9rem;
  --btn-px: 1.5rem;
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  padding: var(--btn-py) var(--btn-px);
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: .97rem;
  line-height: 1;
  border: 1px solid transparent;
  cursor: pointer;
  position: relative;
  transition: transform .25s var(--ease-out), box-shadow .25s var(--ease-out),
              background-color .25s var(--ease-out), border-color .25s var(--ease-out),
              color .25s var(--ease-out);
}
.btn svg {
  width: 15px; height: 15px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.6;
  stroke-linecap: round; stroke-linejoin: round;
  transition: transform .25s var(--ease-out);
}
.btn:hover svg { transform: translateX(3px); }
.btn--sm { --btn-py: .62rem; --btn-px: 1.05rem; font-size: .88rem; }
.btn--lg { --btn-py: 1.05rem; --btn-px: 1.9rem; font-size: 1.03rem; }

.btn--primary {
  background: var(--accent-grad);
  color: #24140A;
  box-shadow: 0 10px 30px -12px rgba(255,106,61,.7);
}
.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 40px -14px rgba(255,106,61,.85);
}

.btn--ghost {
  background: rgba(255,255,255,.035);
  border-color: var(--line-hard);
  color: var(--bone);
  backdrop-filter: blur(6px);
}
.btn--ghost:hover {
  transform: translateY(-2px);
  border-color: rgba(255,177,77,.55);
  background: rgba(255,177,77,.08);
  color: #FFD9A8;
}
.btn--ghost:hover svg { transform: translateY(2px); }
.btn--ghost.btn--lg:hover svg,
.hero__actions .btn--ghost:hover svg { transform: translateY(2px); }

/* ---------- 6. Chips & pill ---------- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  padding: .48rem 1rem .48rem .8rem;
  border: 1px solid rgba(255,177,77,.32);
  background: rgba(255,177,77,.07);
  border-radius: 999px;
  font-size: .84rem;
  font-weight: 500;
  letter-spacing: .01em;
  color: #FFD9A8;
  margin-bottom: 1.75rem;
}
.pill__dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #6BE38A;
  box-shadow: 0 0 0 0 rgba(107,227,138,.6);
  animation: ping 2.4s ease-out infinite;
}
@keyframes ping {
  0%   { box-shadow: 0 0 0 0 rgba(107,227,138,.55); }
  70%  { box-shadow: 0 0 0 8px rgba(107,227,138,0); }
  100% { box-shadow: 0 0 0 0 rgba(107,227,138,0); }
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}
.chips li {
  font-family: var(--font-mono);
  font-size: .76rem;
  letter-spacing: .02em;
  padding: .4rem .7rem;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.03);
  color: var(--bone-dim);
}
.chips--quiet li { color: var(--muted); }

/* ---------- 7. Scroll progress ---------- */
.scroll-progress {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 2px;
  z-index: 120;
  pointer-events: none;
}
.scroll-progress span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--accent-grad);
  transform-origin: left;
}

/* ---------- 8. Header ---------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  transition: background-color .3s var(--ease-out), border-color .3s var(--ease-out),
              backdrop-filter .3s var(--ease-out);
  border-bottom: 1px solid transparent;
}
.site-header.is-stuck {
  background: rgba(13,10,19,.78);
  backdrop-filter: blur(14px) saturate(1.4);
  border-bottom-color: var(--line);
}

.site-header__inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand { display: flex; align-items: center; gap: .75rem; }
.brand__mark {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: 11px;
  background: var(--accent-grad);
  color: #24140A;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: .92rem;
  letter-spacing: -.02em;
  box-shadow: 0 6px 18px -8px rgba(255,106,61,.8);
}
.brand__text { display: flex; flex-direction: column; line-height: 1.2; }
.brand__name { font-weight: 600; font-size: .95rem; letter-spacing: -.01em; }
.brand__role {
  font-family: var(--font-mono);
  font-size: .68rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.nav__list { display: flex; gap: .35rem; }
.nav__list a {
  display: block;
  padding: .5rem .8rem;
  border-radius: 8px;
  font-size: .92rem;
  color: var(--muted);
  position: relative;
  transition: color .2s var(--ease-out), background-color .2s var(--ease-out);
}
.nav__list a:hover { color: var(--bone); background: rgba(255,255,255,.05); }
.nav__list a.is-active { color: var(--bone); }
.nav__list a.is-active::after {
  content: "";
  position: absolute;
  left: .8rem; right: .8rem; bottom: .18rem;
  height: 2px;
  border-radius: 2px;
  background: var(--accent-grad);
}

.site-header__actions { display: flex; align-items: center; gap: .6rem; }

.nav-toggle {
  display: none;
  width: 42px; height: 42px;
  border-radius: 11px;
  border: 1px solid var(--line-hard);
  background: rgba(255,255,255,.04);
  color: var(--bone);
  cursor: pointer;
  place-items: center;
}
.nav-toggle__bars { display: block; width: 18px; }
.nav-toggle__bars i {
  display: block;
  height: 1.7px;
  background: currentColor;
  border-radius: 2px;
  transition: transform .28s var(--ease-out), opacity .2s;
}
.nav-toggle__bars i:first-child { margin-bottom: 5px; }
.nav-toggle[aria-expanded="true"] i:first-child { transform: translateY(3.4px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] i:last-child  { transform: translateY(-3.3px) rotate(-45deg); }

.mobile-nav {
  border-top: 1px solid var(--line);
  background: rgba(13,10,19,.96);
  backdrop-filter: blur(14px);
  padding: .5rem var(--gutter) 1.25rem;
}
.mobile-nav[hidden] { display: none; }
.mobile-nav a {
  display: block;
  padding: .9rem .25rem;
  border-bottom: 1px solid var(--line-soft);
  font-size: 1.05rem;
  color: var(--bone-dim);
}
.mobile-nav li:last-child a { border-bottom: 0; color: var(--amber); font-weight: 600; }

/* =========================================================================
   9. HERO — signature moment
   ========================================================================= */
.hero {
  position: relative;
  padding-top: calc(var(--header-h) + clamp(3rem, 8vw, 6rem));
  padding-bottom: clamp(3rem, 6vw, 5rem);
  overflow: hidden;
  isolation: isolate;
}

.hero__stage { position: absolute; inset: 0; z-index: -1; pointer-events: none; }

/* Fine engineering dot-matrix, faded toward the edges. */
.hero__grid {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at center, rgba(255,255,255,.16) 1px, transparent 1px);
  background-size: 34px 34px;
  -webkit-mask-image: radial-gradient(120% 85% at 50% 22%, #000 25%, transparent 78%);
          mask-image: radial-gradient(120% 85% at 50% 22%, #000 25%, transparent 78%);
  opacity: .55;
}

/* Receding perspective floor — the "ground" the whole page stands on. */
.hero__floor {
  position: absolute;
  left: -25%; right: -25%; bottom: -8%;
  height: 62%;
  background-image:
    linear-gradient(rgba(255,177,77,.30) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,177,77,.22) 1px, transparent 1px);
  background-size: 74px 74px;
  transform: perspective(520px) rotateX(74deg);
  transform-origin: bottom center;
  -webkit-mask-image: linear-gradient(to top, #000 2%, rgba(0,0,0,.35) 32%, transparent 72%);
          mask-image: linear-gradient(to top, #000 2%, rgba(0,0,0,.35) 32%, transparent 72%);
  opacity: .5;
  animation: floor-drift 22s linear infinite;
}
@keyframes floor-drift {
  from { background-position: 0 0, 0 0; }
  to   { background-position: 0 74px, 0 0; }
}

/* Pointer spotlight — reveals the grid as you move across the hero. */
.hero__spot {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    340px circle at var(--mx, 50%) var(--my, 30%),
    rgba(255,177,77,.13),
    rgba(139,123,255,.07) 45%,
    transparent 70%
  );
  transition: opacity .4s var(--ease-out);
}

/* One slow light shaft — direction and drama, no gradient blobs. */
.hero__beam {
  position: absolute;
  top: -30%; left: 42%;
  width: 46%;
  height: 150%;
  background: linear-gradient(180deg, rgba(255,177,77,.16), rgba(255,106,61,.05) 45%, transparent 75%);
  transform: rotate(18deg);
  filter: blur(46px);
  animation: beam-sway 14s ease-in-out infinite alternate;
}
@keyframes beam-sway {
  from { transform: rotate(15deg) translateX(-3%); opacity: .75; }
  to   { transform: rotate(21deg) translateX(4%);  opacity: 1; }
}

.hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}

.hero__title {
  font-size: clamp(2.6rem, 1.2rem + 6vw, 5.4rem);
  font-weight: 800;
  letter-spacing: -.035em;
  line-height: .98;
  margin-bottom: 1.75rem;
}
.hero__title em { font-style: normal; }
/* The gradient is applied to the innermost element so it survives the word
   split in main.js — background-clip:text does not reach through child spans. */
.hero__title em,
.hero__title em .split__inner {
  background: var(--accent-grad);
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
}
.hero__title em .split__word { overflow: visible; }

.hero__lede {
  color: var(--muted);
  max-width: 34rem;
  font-size: clamp(1rem, .96rem + .28vw, 1.12rem);
}
.hero__lede--tight { margin-top: 1rem; color: var(--muted-2); }

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: .85rem;
  margin-top: 2.25rem;
}

/* The device: rises into place, then breathes. */
.hero__device {
  position: relative;
  justify-self: center;
  width: min(320px, 78vw);
}
.hero__device img {
  position: relative;
  z-index: 2;
  filter: drop-shadow(0 44px 70px rgba(0,0,0,.62)) drop-shadow(0 0 60px rgba(255,177,77,.14));
  animation: float 7s ease-in-out infinite alternate;
}
@keyframes float {
  from { transform: translateY(0); }
  to   { transform: translateY(-14px); }
}

.hero__rings {
  position: absolute;
  left: 50%; top: 46%;
  transform: translate(-50%, -50%);
  z-index: 1;
}
.hero__rings i {
  position: absolute;
  left: 50%; top: 50%;
  border: 1px solid rgba(255,177,77,.22);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}
.hero__rings i:nth-child(1) { width: 340px; height: 340px; }
.hero__rings i:nth-child(2) { width: 500px; height: 500px; border-color: rgba(139,123,255,.16); }
.hero__rings i:nth-child(3) { width: 680px; height: 680px; border-color: rgba(255,255,255,.05); }

.hero__device-tag {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: -20px;
  transform: translateX(-50%);
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .04em;
  color: var(--muted);
  background: rgba(23,18,35,.9);
  border: 1px solid var(--line-hard);
  border-radius: 999px;
  padding: .42rem .9rem;
  backdrop-filter: blur(8px);
}
.hero__device-tag span { color: var(--bone); font-weight: 600; }

.hero__stats {
  /* width matches .shell's content box, so the 1px rules that separate the
     cells stop at the text column instead of bleeding into the gutter */
  width: calc(100% - (2 * var(--gutter)));
  max-width: calc(var(--shell) - (2 * var(--gutter)));
  margin: clamp(3.5rem, 8vw, 6rem) auto 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border-block: 1px solid var(--line);
}
.hero__stats li {
  background: var(--ink-900);
  padding: 1.6rem 1.4rem;
  display: flex;
  flex-direction: column;
  gap: .35rem;
}
.hero__stats b {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 1.4rem + 1.6vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -.03em;
  background: var(--accent-grad);
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
  line-height: 1;
}
.hero__stats span {
  font-size: .87rem;
  color: var(--muted);
  line-height: 1.45;
}

/* ---------- 10. Marquee ---------- */
.marquee {
  overflow: hidden;
  padding-block: 1.15rem;
  border-bottom: 1px solid var(--line);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee__track {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  width: max-content;
  animation: scroll-x 42s linear infinite;
}
.marquee__track span {
  font-family: var(--font-mono);
  font-size: .82rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted-2);
  white-space: nowrap;
}
.marquee__track i { color: rgba(255,177,77,.45); font-size: .5rem; font-style: normal; }
@keyframes scroll-x {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* =========================================================================
   11. APPS
   ========================================================================= */
.app {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(160deg, rgba(255,255,255,.045), rgba(255,255,255,.012));
  overflow: hidden;
}
.app + .app { margin-top: clamp(1.5rem, 3vw, 2.25rem); }

/* accent hairline along the top edge of each app card */
.app::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--app-accent, var(--amber)), transparent);
  opacity: .7;
}

.app--feature,
.app--wide {
  display: grid;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center;
  padding: clamp(1.75rem, 4vw, 3.25rem);
}
.app--feature { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); }
.app--wide    { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); }

.app__media { position: relative; display: grid; place-items: center; }
.app__media img {
  position: relative;
  z-index: 1;
  width: min(280px, 70vw);
  filter: drop-shadow(0 30px 55px rgba(0,0,0,.55));
}
.app__media--flat img {
  width: min(440px, 100%);
  border-radius: 14px;
}
.app__glow {
  position: absolute;
  width: 78%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--app-accent, var(--amber));
  opacity: .16;
  filter: blur(72px);
}

.app__head { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.4rem; }
.app__icon {
  width: 62px; height: 62px;
  border-radius: 15px;
  flex: none;
  box-shadow: 0 10px 26px -10px rgba(0,0,0,.8);
}

.app__name {
  font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.35rem);
  letter-spacing: -.025em;
}

.app__meta {
  font-family: var(--font-mono);
  font-size: .76rem;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--app-accent-soft, var(--amber));
  margin-top: .45rem;
}

.app__pitch {
  color: var(--bone-dim);
  font-size: clamp(1rem, .97rem + .25vw, 1.1rem);
  max-width: 40rem;
}

.app__points { margin-top: 1.85rem; display: grid; gap: 1.15rem; }
.app__points--compact { gap: 1rem; }
.app__points li { padding-left: 1.15rem; position: relative; }
.app__points li::before {
  content: "";
  position: absolute;
  left: 0; top: .55em;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--app-accent, var(--amber));
}
.app__points h4 {
  font-family: var(--font-body);
  font-size: .98rem;
  font-weight: 600;
  letter-spacing: -.005em;
  color: var(--bone);
  margin-bottom: .25rem;
}
.app__points p { color: var(--muted); font-size: .95rem; line-height: 1.6; }

.app__body .chips { margin-top: 1.85rem; }
.app__links { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.75rem; }

/* =========================================================================
   12. ABOUT
   ========================================================================= */
.about {
  display: grid;
  grid-template-columns: minmax(0, .68fr) minmax(0, 1.32fr);
  gap: clamp(1.75rem, 4vw, 3.25rem);
  align-items: start;
}

/* Portrait — desaturated, graded into the palette, and masked so the bottom
   edge dissolves into the page instead of sitting on it as a card. */
.portrait {
  margin: 0;
  position: sticky;
  top: calc(var(--header-h) + 2rem);
  isolation: isolate;
}
.portrait::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 6% 2% 18%;
  background: radial-gradient(62% 58% at 50% 38%, rgba(255,177,77,.26), transparent 72%);
  filter: blur(52px);
}
.portrait__frame {
  position: relative;
  isolation: isolate;
  border-radius: var(--radius);
  overflow: hidden;
  -webkit-mask-image: linear-gradient(180deg, #000 46%, rgba(0,0,0,.45) 76%, transparent 97%);
          mask-image: linear-gradient(180deg, #000 46%, rgba(0,0,0,.45) 76%, transparent 97%);
}
.portrait img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  /* Nudge this if the crop sits wrong on your photo. */
  object-position: center 28%;
  /* partial desaturation keeps the cold blue of the lake, which the warm
     overlay then grades against — cinematic rather than flat duotone */
  filter: grayscale(.62) contrast(1.04) brightness(.88) saturate(.85);
  transition: filter .7s var(--ease-out), transform .9s var(--ease-out);
}
.portrait__tone {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(155deg, #FFB14D, #FF6A3D 55%, #8B7BFF);
  mix-blend-mode: soft-light;
  opacity: .55;
  transition: opacity .7s var(--ease-out);
}
/* the same dot matrix as the hero, so the photo reads as part of the system */
.portrait__mesh {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background-image: radial-gradient(circle at center, rgba(255,255,255,.16) 1px, transparent 1px);
  background-size: 22px 22px;
  opacity: .3;
  mix-blend-mode: overlay;
}
.portrait__frame:hover img {
  filter: grayscale(0) contrast(1) brightness(.98) saturate(1);
  transform: scale(1.035);
}
.portrait__frame:hover .portrait__tone { opacity: .35; }
.portrait figcaption {
  position: relative;
  z-index: 4;
  margin-top: -1.75rem;
  display: flex;
  flex-direction: column;
  gap: .35rem;
}
.portrait figcaption strong {
  font-family: var(--font-display);
  font-size: 1.08rem;
  letter-spacing: -.015em;
}
.portrait figcaption span {
  font-family: var(--font-mono);
  font-size: .73rem;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1rem, 2vw, 1.35rem);
}
.fact {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.25rem, 2.4vw, 1.65rem);
  background: linear-gradient(160deg, rgba(255,255,255,.04), rgba(255,255,255,.01));
  transition: border-color .3s var(--ease-out), transform .3s var(--ease-out);
}
.fact:hover { border-color: var(--line-hard); transform: translateY(-3px); }
.fact--accent {
  border-color: rgba(255,177,77,.28);
  background: linear-gradient(160deg, rgba(255,177,77,.08), rgba(255,106,61,.02));
}
.fact--accent:hover { border-color: rgba(255,177,77,.5); }
.fact__label {
  font-family: var(--font-mono);
  font-size: .73rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: .8rem;
}
.fact--accent .fact__label { color: #FFD9A8; }
.fact p + p { color: var(--muted); font-size: .95rem; line-height: 1.6; }

/* =========================================================================
   13. SKILLS
   ========================================================================= */
.skills {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.skill-group {
  background: var(--ink-850);
  padding: clamp(1.5rem, 2.6vw, 2.1rem);
}
.skill-group--lead { background: linear-gradient(165deg, rgba(255,177,77,.09), rgba(255,106,61,.02)); }
.skill-group h3 {
  font-family: var(--font-mono);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 1.35rem;
  padding-bottom: .85rem;
  border-bottom: 1px solid var(--line);
}
.skill-group--lead h3 { color: #FFD9A8; }
.skill-group ul { display: grid; gap: .68rem; }
.skill-group li {
  font-size: .95rem;
  color: var(--bone-dim);
  line-height: 1.45;
  padding-left: 1rem;
  position: relative;
}
.skill-group li::before {
  content: "";
  position: absolute;
  left: 0; top: .62em;
  width: 4px; height: 4px;
  border-radius: 1px;
  background: var(--muted-2);
  transform: rotate(45deg);
}
.skill-group--lead li::before { background: var(--amber); }

/* =========================================================================
   14. ROOTS
   ========================================================================= */
.roots {
  padding-top: clamp(2rem, 5vw, 3.5rem);
  border-top: 1px solid var(--line);
}
.roots__body { color: var(--muted); margin-top: 1.35rem; max-width: 36rem; }

.roots__clients {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
  margin-top: 1.85rem;
}
.roots__clients li {
  font-family: var(--font-mono);
  font-size: .8rem;
  padding: .48rem .85rem;
  border-radius: 8px;
  border: 1px solid var(--line);
  color: var(--bone-dim);
  background: rgba(255,255,255,.025);
}
.roots__clients span { color: var(--muted-2); margin-left: .3rem; }

/* =========================================================================
   15. CONTACT
   ========================================================================= */
.section--contact { text-align: center; }
.section--contact .section__index { justify-content: center; max-width: 22rem; margin-inline: auto; }
.section--contact .section__index::after { display: none; }

.contact__title {
  font-size: clamp(2.1rem, 1.3rem + 4vw, 4.25rem);
  font-weight: 800;
  letter-spacing: -.035em;
  max-width: 18ch;
  margin-inline: auto;
}
.contact__sub {
  color: var(--muted);
  margin: 1.5rem auto 0;
  max-width: 34rem;
  font-size: clamp(1rem, .96rem + .28vw, 1.12rem);
}
.contact__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .85rem;
  margin-top: 2.5rem;
}

.contact__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  margin-top: clamp(3rem, 6vw, 4.5rem);
  text-align: left;
}
.contact__grid li {
  background: var(--ink-850);
  padding: 1.5rem 1.35rem;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  min-width: 0;
}
.contact__label {
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted-2);
}
.contact__grid a, .contact__grid span:not(.contact__label) {
  font-size: .95rem;
  color: var(--bone-dim);
  overflow-wrap: anywhere;
}
.contact__grid a {
  transition: color .2s var(--ease-out);
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 4px;
}
.contact__grid a:hover { color: var(--amber); text-decoration-color: currentColor; }

/* Contact details sit behind a click so scrapers don't harvest them. */
.veil {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .55rem;
  background: none;
  border: 0;
  padding: 0;
  margin: 0;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.veil__blur {
  font-size: .95rem;
  color: var(--bone-dim);
  filter: blur(5px);
  user-select: none;
  transition: filter .3s var(--ease-out);
}
.veil__cta {
  font-family: var(--font-mono);
  font-size: .68rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--amber);
  border: 1px solid rgba(255,177,77,.35);
  border-radius: 999px;
  padding: .3rem .62rem;
  transition: background-color .25s var(--ease-out), border-color .25s var(--ease-out);
}
.veil:hover .veil__blur { filter: blur(3px); }
.veil:hover .veil__cta { background: rgba(255,177,77,.12); border-color: rgba(255,177,77,.6); }

.linklike {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  transition: color .2s var(--ease-out);
}
.linklike:hover { color: var(--amber); }

/* ---------- 16. Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding-block: clamp(2.25rem, 4vw, 3rem) 0;
}
.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: clamp(1.75rem, 4vw, 3.5rem);
  align-items: flex-start;
}

.site-footer__brand p { font-size: .87rem; color: var(--muted); }
.site-footer__geo {
  margin-top: .4rem;
  max-width: 24rem;
  color: var(--muted-2) !important;
}

.site-footer__nav {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(2rem, 5vw, 4rem);
}
.site-footer__title {
  font-family: var(--font-mono);
  font-size: .7rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: .9rem;
}
.site-footer__group ul { display: grid; gap: .6rem; }
.site-footer__group a,
.site-footer__group .linklike {
  font-size: .89rem;
  color: var(--muted);
  transition: color .2s var(--ease-out);
}
.site-footer__group a:hover,
.site-footer__group .linklike:hover { color: var(--amber); }

.site-footer__base {
  margin-top: clamp(2rem, 4vw, 2.75rem);
  padding-top: 1.35rem;
  padding-bottom: 2rem;
  border-top: 1px solid var(--line-soft);
}
.site-footer__base a {
  font-family: var(--font-mono);
  font-size: .74rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted-2);
  transition: color .2s var(--ease-out);
}
.site-footer__base a:hover { color: var(--amber); }

/* =========================================================================
   17. Motion — entrance choreography
   ========================================================================= */

/* Word-by-word mask reveal for split headlines. */
.split__word {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
  /* room for descenders inside the clip */
  padding-bottom: .14em;
  margin-bottom: -.14em;
}
.split__inner {
  display: inline-block;
  transform: translateY(105%) rotate(4deg);
  opacity: 0;
}
.is-lit .split__inner {
  animation: word-rise .95s var(--ease-out) forwards;
  animation-delay: calc(var(--i, 0) * 52ms);
}
@keyframes word-rise {
  to { transform: translateY(0) rotate(0); opacity: 1; }
}

/* Generic scroll reveal. */
[data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .75s var(--ease-out), transform .75s var(--ease-out);
  transition-delay: calc(var(--d, 0) * 90ms);
}
[data-reveal].is-lit { opacity: 1; transform: none; }

/* The device makes its own entrance. */
[data-device] {
  opacity: 0;
  transform: translateY(46px) scale(.94);
  transition: opacity 1.1s var(--ease-out), transform 1.1s var(--ease-out);
  transition-delay: .18s;
}
[data-device].is-lit { opacity: 1; transform: none; }

[data-device] .hero__rings i {
  opacity: 0;
  transition: opacity 1.2s var(--ease-out);
}
[data-device].is-lit .hero__rings i { opacity: 1; }
[data-device].is-lit .hero__rings i:nth-child(1) { transition-delay: .45s; }
[data-device].is-lit .hero__rings i:nth-child(2) { transition-delay: .6s; }
[data-device].is-lit .hero__rings i:nth-child(3) { transition-delay: .75s; }

/* =========================================================================
   18. Responsive
   ========================================================================= */
@media (max-width: 1080px) {
  .skills { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .contact__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero__stats { grid-template-columns: repeat(2, 1fr); }
}

/* Tablet and below: every two-column layout stacks, and once content sits in a
   single column it is centred rather than left-aligned against a centred image. */
@media (max-width: 1024px) {
  /* --- stacking --- */
  .hero { padding-top: calc(var(--header-h) + 2.5rem); }
  .hero__inner { grid-template-columns: 1fr; }
  .hero__device { order: -1; width: min(300px, 62vw); margin-bottom: 1rem; }
  .hero__rings i:nth-child(3) { display: none; }

  .app--feature, .app--wide { grid-template-columns: 1fr; }
  .app--wide .app__media { order: -1; }

  .about { grid-template-columns: 1fr; }
  .portrait { position: static; max-width: 320px; margin-inline: auto; }

  /* --- centring --- */
  .hero__copy,
  .section__head,
  .app__body,
  .fact,
  .roots,
  .skill-group,
  .contact__grid,
  .site-footer__inner { text-align: center; }

  .section__head { margin-inline: auto; }
  .hero__lede,
  .section__sub,
  .roots__body { margin-inline: auto; }

  /* the index rule line only works flush left, so drop it and centre the label */
  .section__index { justify-content: center; }
  .section__index::after { display: none; }

  .pill,
  .hero__actions,
  .chips,
  .app__links,
  .roots__clients { justify-content: center; }

  .app__head { flex-direction: column; gap: .85rem; }

  /* bulleted markers hang to the left, which breaks centred text */
  .app__points li,
  .skill-group li { padding-left: 0; }
  .app__points li::before,
  .skill-group li::before { display: none; }

  .skill-group h3 { text-align: center; }

  .hero__stats li { align-items: center; text-align: center; }

  .portrait figcaption { align-items: center; }

  .contact__grid li { align-items: center; }
  /* stack the masked value above its reveal button so short values
     (the phone) don't push the pill out of the cell */
  .veil { flex-direction: column; align-items: center; gap: .7rem; }

  .site-footer__inner { flex-direction: column; align-items: center; }
  .site-footer__brand { order: -1; }
  .site-footer__geo { margin-inline: auto; }
  .site-footer__nav { justify-content: center; text-align: center; }
  .site-footer__base { text-align: center; }
}

@media (max-width: 900px) {
  .nav, .site-header__actions .btn { display: none; }
  .nav-toggle { display: grid; }
  .hero__device { width: min(260px, 62vw); }
}

@media (max-width: 560px) {
  :root { --radius: 16px; }

  .brand__text { display: none; }
  /* keep the device caption inside very narrow viewports */
  .hero__device-tag { font-size: .64rem; padding: .38rem .7rem; max-width: 92vw; }
  .hero__stats { grid-template-columns: 1fr; }
  .hero__stats li { padding: 1.25rem 1.1rem; gap: .35rem; }
  .hero__stats b { font-size: 1.75rem; }

  .skills, .contact__grid, .facts { grid-template-columns: 1fr; }
  .contact__actions .btn { width: 100%; justify-content: center; }
  .site-footer__nav { gap: 2rem 3rem; }
}

/* =========================================================================
   19. Reduced motion — everything settles instantly, nothing loops
   ========================================================================= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }

  [data-reveal], [data-device] { opacity: 1 !important; transform: none !important; }
  .split__inner { opacity: 1 !important; transform: none !important; }
  [data-device] .hero__rings i { opacity: 1 !important; }
  .hero__spot { display: none; }
  .portrait__frame:hover img { transform: none; }
  .marquee__track { animation: none; transform: none; }
  .hero__beam, .hero__floor { animation: none; }
}

/* Print — a clean résumé-adjacent fallback */
@media print {
  body { background: #fff; color: #111; }
  body::before, .hero__stage, .site-header, .scroll-progress, .marquee, .hero__device { display: none; }
  .btn { border: 1px solid #999; color: #111; background: none; box-shadow: none; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: .8em; color: #555; }
}
