/* =========================================================
   v3 layer — loads after styles.css and only adds or overrides.
   v1 (index.html + styles.css + script.js) is untouched.
   ========================================================= */

@property --beam { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@property --hx { syntax: "<percentage>"; inherits: false; initial-value: 78%; }
@property --hy { syntax: "<percentage>"; inherits: false; initial-value: 18%; }

/* ---------- Header: reading progress + active section ---------- */
.scroll-progress {
  position: absolute; left: 0; bottom: -1px;
  width: 100%; height: 1px;
  background: var(--accent);
  transform-origin: 0 50%;
  transform: scaleX(var(--p, 0));
}
.nav-links a { position: relative; }
.nav-links a.active { color: var(--ink); }
.nav-links a::after {
  content: ""; position: absolute; left: 50%; bottom: -.4rem;
  width: 4px; height: 4px; border-radius: 50%;
  background: var(--accent);
  transform: translateX(-50%) scale(0);
  transition: transform .35s var(--ease);
}
.nav-links a.active::after { transform: translateX(-50%) scale(1); }

/* ---------- Hero: signal field background ---------- */
.signal-field {
  position: absolute; top: 0; left: 0; z-index: -1;
  width: 100%; height: min(100vh, 58rem);
  pointer-events: none;
  -webkit-mask-image: radial-gradient(ellipse 75% 70% at 50% 38%, #000 25%, transparent 78%);
  mask-image: radial-gradient(ellipse 75% 70% at 50% 38%, #000 25%, transparent 78%);
  opacity: 0;
  transition: opacity 1.4s var(--ease) .4s;
}
.signal-field.ready { opacity: 1; }

/* Photo haze drifts slowly */
.photo-frame {
  background:
    radial-gradient(55% 45% at var(--hx) var(--hy), color-mix(in oklab, var(--accent) var(--ph-haze), transparent), transparent 72%),
    radial-gradient(50% 40% at 12% 62%, color-mix(in oklab, var(--accent) var(--ph-haze-2), transparent), transparent 70%),
    radial-gradient(70% 55% at 40% 108%, color-mix(in oklab, var(--ink) 10%, transparent), transparent 70%),
    conic-gradient(from 210deg at 65% 35%, var(--ph-base-1), var(--ph-base-2), var(--ph-base-3), var(--ph-base-1));
  animation: haze-drift 16s ease-in-out infinite;
}
@keyframes haze-drift {
  0%, 100% { --hx: 78%; --hy: 18%; }
  50% { --hx: 58%; --hy: 34%; }
}

/* Magnetic primary buttons (offset set by JS) */
.btn-primary { translate: var(--mgx, 0px) var(--mgy, 0px); transition: transform .3s var(--ease), translate .4s var(--ease); }

/* ---------- Tools strip ---------- */
.toolbelt {
  position: relative;
  padding-block: 1.5rem;
  border-top: 1px solid var(--line);
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.toolbelt-track {
  display: flex; width: max-content;
  animation: marquee 60s linear infinite;
}
.toolbelt:hover .toolbelt-track { animation-play-state: paused; }
.toolbelt-list { display: flex; gap: 2.75rem; padding-right: 2.75rem; }
.tool {
  display: inline-flex; align-items: center; gap: .6rem;
  font-family: var(--font-mono); font-size: .75rem; letter-spacing: .06em;
  color: var(--faint); white-space: nowrap;
  transition: color .2s;
}
.tool svg { width: 1rem; height: 1rem; flex-shrink: 0; }
.tool:hover { color: var(--ink); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Section titles: word-by-word blur in ---------- */
.js .section-title .tw {
  display: inline-block;
  opacity: 0; filter: blur(8px); transform: translateY(.3em);
  transition: opacity .7s var(--ease), filter .7s var(--ease), transform .7s var(--ease);
  transition-delay: calc(var(--i, 0) * 55ms + .1s);
}
.js .in .section-title .tw { opacity: 1; filter: blur(0); transform: none; }

/* ---------- Cards: light travels around the border on hover ---------- */
.card::after {
  content: ""; position: absolute; inset: -1px; z-index: 1;
  border-radius: inherit; padding: 1px; pointer-events: none;
  background: conic-gradient(from var(--beam),
    transparent 0 62%,
    color-mix(in oklab, var(--accent) 85%, transparent) 78%,
    transparent 94%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  opacity: 0;
  transition: opacity .45s var(--ease);
  animation: beam 3.6s linear infinite paused;
}
.card:hover::after { opacity: 1; animation-play-state: running; }
.list-view .card::after { display: none; }
@keyframes beam { to { --beam: 360deg; } }

/* ---------- Process ---------- */
.process {
  list-style: none;
  position: relative;
  margin-top: 3rem;
  display: grid; gap: 2.5rem;
  padding-left: 2rem;
  counter-reset: step;
}
.process-line {
  position: absolute; left: .3rem; top: .4rem; bottom: .4rem;
  width: 1px; background: var(--line);
}
.process-fill {
  position: absolute; inset: 0;
  background: linear-gradient(var(--accent), color-mix(in oklab, var(--accent) 40%, transparent));
  transform-origin: 50% 0;
  transform: scaleY(var(--progress, 0));
}
.step { position: relative; }
.step-node {
  position: absolute; left: -2rem; top: .2rem;
  width: .65rem; height: .65rem; border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: var(--bg);
  transition: background-color .4s var(--ease), border-color .4s var(--ease), box-shadow .6s var(--ease);
}
.step.lit .step-node {
  background: var(--accent); border-color: var(--accent);
  box-shadow: 0 0 0 5px color-mix(in oklab, var(--accent) 16%, transparent);
}
.step-index { font-family: var(--font-mono); font-size: .6875rem; letter-spacing: .18em; color: var(--faint); transition: color .4s; }
.step.lit .step-index { color: var(--accent); }
.step-title { margin-top: .35rem; font-size: 1.25rem; font-weight: 500; letter-spacing: -.01em; }
.step-text { margin-top: .4rem; font-size: .875rem; line-height: 1.625; color: var(--muted); max-width: 30rem; }

@media (min-width: 768px) {
  .process {
    grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr);
    gap: 1.5rem; padding-left: 0; padding-top: 2.25rem;
  }
  .process-line { left: 0; right: 0; top: .3rem; bottom: auto; width: auto; height: 1px; }
  .process-fill {
    background: linear-gradient(90deg, var(--accent), color-mix(in oklab, var(--accent) 40%, transparent));
    transform-origin: 0 50%;
    transform: scaleX(var(--progress, 0));
  }
  .step-node { left: 0; top: -2.25rem; }
}

/* Bubble that hops from step to step */
.process-bubble {
  position: absolute; left: 0; top: 0; z-index: 2;
  width: .8rem; height: .8rem; margin: -.4rem 0 0 -.4rem;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in oklab, var(--accent) 18%, transparent),
              0 0 18px color-mix(in oklab, var(--accent) 55%, transparent);
  pointer-events: none; opacity: 0; will-change: transform;
}
.step-title { transition: color .4s var(--ease); }
.step.here .step-title { color: var(--accent); }
.step.hit .step-node { animation: node-hit .7s var(--ease); }
@keyframes node-hit {
  from { box-shadow: 0 0 0 0 color-mix(in oklab, var(--accent) 55%, transparent); }
  to   { box-shadow: 0 0 0 14px transparent; }
}

/* ---------- About + numbers ---------- */
.about-grid { display: grid; gap: 3rem; align-items: start; }
.about-grid .about-body { margin-top: 2rem; }
.numbers { margin-top: 2rem; border-top: 1px solid var(--line); }
.numbers > div { padding-block: 1.1rem; border-bottom: 1px solid var(--line); }
.numbers dt {
  font-family: var(--font-mono); font-size: 2.25rem; font-weight: 500; line-height: 1;
  letter-spacing: -.04em; color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.numbers dd { margin-top: .45rem; font-size: .8125rem; line-height: 1.5; color: var(--muted); }
@media (min-width: 900px) {
  .about-grid { grid-template-columns: minmax(0, 1fr) 15rem; column-gap: 4rem; }
  .numbers { position: sticky; top: 6rem; }
}

/* ---------- Footer wordmark ---------- */
.wordmark {
  margin: 0 0 2.5rem;
  text-align: center;
  font-size: clamp(4.5rem, 19vw, 13rem);
  font-weight: 500; line-height: .85; letter-spacing: -.06em;
  color: transparent;
  -webkit-text-stroke: 1px var(--line-strong);
  background: linear-gradient(100deg, var(--ink) 0 var(--fill, 0%), transparent calc(var(--fill, 0%) + .01%));
  -webkit-background-clip: text; background-clip: text;
  user-select: none;
}
.wordmark .dot { color: var(--accent); -webkit-text-stroke: 0; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html:not(.force-motion) .toolbelt-track { animation: none; }
  html:not(.force-motion) .toolbelt { overflow-x: auto; }
  html:not(.force-motion) .photo-frame { animation: none; }
  html:not(.force-motion) .card::after { display: none; }
  html.js:not(.force-motion) .section-title .tw { opacity: 1; filter: none; transform: none; }
  html:not(.force-motion) .signal-field { opacity: 1; }
}

/* A real link inside a clickable card (e.g. a product's live site) */
.card-link { position: relative; z-index: 2; text-decoration: none; color: inherit; transition: color .15s; }
.card-link:hover, .card-link:focus-visible { color: var(--accent) !important; }

/* ---------- Portrait: photo by default, illustration on hover or tap ---------- */
.hero-photo { cursor: pointer; }
.hero-photo:focus-visible { outline: none; }
.hero-photo:focus-visible .photo-frame { outline: 2px solid var(--accent); outline-offset: 4px; }
.photo-frame .portrait-main, .photo-frame .portrait-alt { transition: opacity .45s var(--ease), transform .6s var(--ease); }
.photo-frame .portrait-alt { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; }
.hero-photo.swapped .portrait-alt { opacity: 1; }
.hero-photo.swapped .portrait-main { opacity: 0; }
.words .w-art { display: none; }
.hero-photo.swapped .w-photo { display: none; }
.hero-photo.swapped .w-art { display: inline; }
@media (hover: hover) {
  .hero-photo:hover .portrait-alt { opacity: 1; }
  .hero-photo:hover .portrait-main { opacity: 0; }
  .hero-photo:hover .w-photo { display: none; }
  .hero-photo:hover .w-art { display: inline; }
  /* once tapped/clicked into the illustration, hovering shows the photo again */
  .hero-photo.swapped:hover .portrait-alt { opacity: 0; }
  .hero-photo.swapped:hover .portrait-main { opacity: 1; }
  .hero-photo.swapped:hover .w-art { display: none; }
  .hero-photo.swapped:hover .w-photo { display: inline; }
}
/* Preview: ?portrait=illustrated shows only the illustration */
.portrait-illustrated .hero-photo { cursor: default; }
.portrait-illustrated .photo-frame .portrait-main { opacity: 0 !important; }
.portrait-illustrated .photo-frame .portrait-alt { opacity: 1 !important; }
.portrait-illustrated .words .w-art { display: none !important; }
.portrait-illustrated .words .w-photo { display: inline !important; }

/* Cards with a live site show two actions: the site link and the details panel */
.card-actions { display: inline-flex; align-items: center; gap: 1.1rem; flex-shrink: 0; }
.card-actions .card-link { font: inherit; letter-spacing: inherit; }
.list-view .card-actions { display: contents; }
.list-view .card-actions .card-link { display: none; }

/* "details" sits top-right on cards that also have a live site link bottom-right */
.card-head .card-more-top {
  flex-shrink: 0; margin-top: .45rem;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; color: var(--faint);
}
.card:hover .card-more-top { color: var(--ink); }

/* ---------- Hero, portrait edition: large cutout on the right, glow behind, fading into the page ---------- */
.hero { position: relative; isolation: isolate; display: block !important; }
.hero-text { position: relative; z-index: 2; max-width: 40rem; }
.hero-portrait {
  position: absolute; z-index: 1; right: -3rem; bottom: 0;
  width: min(36rem, 52%); margin: 0; pointer-events: none;
}
.hero-portrait::before {
  content: ""; position: absolute; z-index: -1;
  left: 50%; top: 14%; width: 120%; aspect-ratio: 1; transform: translate(-50%, -25%);
  background: radial-gradient(circle, color-mix(in oklab, var(--accent) 34%, transparent) 0%, color-mix(in oklab, var(--accent) 12%, transparent) 35%, transparent 65%);
  filter: blur(10px);
}
.hero-portrait img {
  display: block; width: 100%; height: auto;
  -webkit-mask-image: linear-gradient(to bottom, #000 62%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 62%, transparent 100%);
}
.hero-name { font-size: clamp(2.9rem, 7.5vw, 5.4rem); }
.hero-intro { font-size: clamp(1.125rem, 1.6vw, 1.3rem); max-width: 36rem; }
@media (min-width: 900px) {
  .hero { min-height: min(52rem, 100vh); padding-bottom: 6rem; }
}
/* Light mode: soften the glow so it reads as a tint, not a spotlight */
html:not(.dark) .hero-portrait::before {
  background: radial-gradient(circle, color-mix(in oklab, var(--accent) 22%, transparent) 0%, transparent 62%);
}
/* Phones and small tablets: portrait sits above the text, still fading out at the bottom */
@media (max-width: 899px) {
  .hero { padding-top: 5.5rem; }
  .hero-portrait { position: relative; right: auto; width: min(22rem, 78%); margin: 0 0 -3.5rem auto; }
  .hero-portrait img { -webkit-mask-image: linear-gradient(to bottom, #000 55%, transparent 96%); mask-image: linear-gradient(to bottom, #000 55%, transparent 96%); }
}
@keyframes portrait-in { from { opacity: 0; transform: translateY(24px); filter: blur(6px); } }
.hero-portrait img { animation: portrait-in 1.1s var(--ease) .35s both; }
/* Fade the photo's cut-off sides as well as the bottom */
.hero-portrait img {
  -webkit-mask-image: linear-gradient(to bottom, #000 58%, transparent 98%), linear-gradient(to right, transparent 0%, #000 16%, #000 86%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to bottom, #000 58%, transparent 98%), linear-gradient(to right, transparent 0%, #000 16%, #000 86%, transparent 100%);
  mask-composite: intersect;
}
.hero-portrait::before {
  width: 135%; top: 10%;
  background: radial-gradient(circle, color-mix(in oklab, var(--accent) 42%, transparent) 0%, color-mix(in oklab, var(--accent) 14%, transparent) 38%, transparent 66%);
}
/* Breathing room: text keeps to the left half, portrait to the right, with a clear gap between */
@media (min-width: 900px) {
  .hero-text { max-width: min(34rem, 50%); }
  .hero-name { font-size: clamp(2.9rem, 5.4vw, 4.4rem); }
  .hero-intro { font-size: clamp(1.0625rem, 1.25vw, 1.2rem); max-width: 31rem; }
  .hero-portrait { width: min(31rem, 40%); right: -2.5rem; }
}
@media (min-width: 900px) { .hero-text .hero-cta { flex-wrap: nowrap; width: max-content; } }
/* Keep the glow from pushing the page wider than the screen */
html, body { overflow-x: clip; }
/* Lift the portrait so the head lines up with the name */
@media (min-width: 900px) { .hero-portrait { bottom: var(--portrait-lift, 4.5rem); } }
@media (min-width: 900px) { .hero-portrait { bottom: auto; top: 12.25rem; } }

/* ---------- Hero v3: wider columns and a broad teal wash (replaces the round glow) ---------- */
.hero-portrait::before { display: none; }
.hero::before {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  top: -3.5rem; bottom: 0; left: 50%; width: 100vw; transform: translateX(-50%);
  background:
    radial-gradient(ellipse 34% 60% at 76% 40%, rgb(34 150 160 / .30), transparent 70%),
    radial-gradient(ellipse 62% 95% at 80% 45%, rgb(14 88 100 / .42), rgb(10 52 60 / .18) 50%, transparent 78%);
}
html:not(.dark) .hero::before {
  background:
    radial-gradient(ellipse 34% 60% at 76% 40%, rgb(34 150 160 / .16), transparent 70%),
    radial-gradient(ellipse 62% 95% at 80% 45%, rgb(14 116 144 / .14), transparent 78%);
}
@media (min-width: 900px) {
  .hero {
    width: min(76rem, calc(100vw - 2 * var(--gutter)));
    margin-left: calc(50% - min(38rem, 50vw - var(--gutter)));
  }
  .hero-text { max-width: min(37rem, 50%); }
  .hero-name { font-size: clamp(2.9rem, 5.2vw, 4.8rem); }
  .hero-intro { max-width: 34rem; }
  .hero-portrait { width: min(35rem, 42%); right: -1.5rem; }
}
/* Hero width: a little wider than the page (68rem), not the 76rem first tried */
@media (min-width: 900px) {
  .hero {
    width: min(68rem, calc(100vw - 2 * var(--gutter)));
    margin-left: calc(50% - min(34rem, 50vw - var(--gutter)));
  }
  .hero-text { max-width: min(35rem, 50%); }
  .hero-name { font-size: clamp(2.9rem, 5.2vw, 4.6rem); }
  .hero-intro { max-width: 32rem; }
  .hero-portrait { width: min(32rem, 41%); right: -2rem; }
}

/* Variant: the new portrait inside the rounded frame, beside the text */
.hero::before { display: none; }
@media (min-width: 640px) {
  html .hero { display: grid !important; grid-template-columns: minmax(0, 1fr) auto; column-gap: 3.5rem; align-items: start; }
  .hero-text { max-width: none; }
  .hero-photo { padding-top: .5rem; }
}
.photo-frame { width: 9rem; }
@media (min-width: 640px) { .photo-frame { width: clamp(13rem, 26vw, 21rem); } }
.photo-frame img { object-position: center top; }
/* Back to the page's normal width (the container's 64rem), aligned with the header and other sections */
@media (min-width: 900px) {
  .hero { width: auto; margin-left: 0; }
  .hero-name { font-size: clamp(2.9rem, 5.2vw, 4.4rem); }
  .photo-frame { width: clamp(13rem, 24vw, 19rem); }
}
/* Bigger name: up to 84px, still leaving 75px+ before the photo */
@media (min-width: 900px) { .hero .hero-name { font-size: clamp(2.9rem, 7.2vw, 5.25rem); letter-spacing: -.045em; } }
/* Match the reference site exactly: clamp(2.9rem, 9vw, 4.75rem), tracking -0.04em, line-height 1.02 */
.hero .hero-name { font-size: clamp(2.9rem, 9vw, 4.75rem); letter-spacing: -.04em; line-height: 1.02; }
@media (min-width: 900px) { .hero .hero-name { font-size: clamp(2.9rem, 9vw, 4.75rem); letter-spacing: -.04em; } }
/* Desktop: start the third line at "automation" so the paragraph tapers inward */
.br-desktop { display: none; }
@media (min-width: 900px) { .br-desktop { display: inline; } }
/* Longer handwritten notes wrap instead of overflowing the card */
@media (max-width: 639px) { .card-note { flex-shrink: 1; min-width: 0; max-width: 62%; text-align: right; text-wrap: balance; } }

/* Risk notes, service proof links and hero additions */

/* Risk note under the Products label */
.risk-note {
  margin-top: .5rem; margin-bottom: 1.25rem; max-width: 40rem;
  font-size: .8125rem; line-height: 1.6; color: var(--faint);
}

/* "See it in action" link at the end of each service */
.service-inner .service-proof { margin-top: 1rem; }
.service-proof .text-link { display: inline-flex; align-items: center; gap: .35rem; }

/* The longer ScalpGOD tagline wraps instead of pushing the title */
.card[data-project="scalpgod"] .card-note {
  flex-shrink: 1; min-width: 0; max-width: 55%;
  text-align: right; text-wrap: balance;
}

/* EvBella's two-line note sits flush right */
.card[data-project="evbella"] .card-note { text-align: right; }

/* Footer risk note */
.footer-risk {
  margin: 2rem auto 0; max-width: 40rem; text-align: center;
  font-family: var(--font-mono); font-size: 11px; line-height: 1.7; letter-spacing: .04em;
  color: var(--faint);
}

/* "Developer in Lagos" scrawl above the name, same component as "that's me" */
.name-wrap { display: inline-flex; flex-direction: column; margin-top: 1.25rem; }
.name-wrap .name-note { align-self: flex-end; margin: 0 .5rem -1rem 0; }
.name-wrap .hero-name { margin-top: 0; }

/* Hero intro keywords */
.hero-intro strong { font-weight: 600; color: var(--ink); }

/* Frontend / Backend / AI Layer tags */
.hero-tags {
  margin-top: 1rem; display: flex; flex-wrap: wrap; gap: .5rem;
  list-style: none; padding: 0;
}
.hero-tags li {
  padding: .3rem .75rem; border: 1px solid var(--line); border-radius: 999px;
  font-family: var(--font-mono); font-size: .75rem; letter-spacing: .04em;
  color: var(--muted); background: var(--surface);
}
