:root {
  --bg: #f7f5f0;
  --surface: #ffffff;
  --ink: #1b1f24;
  --muted: #5f6670;
  --line: #e4e0d6;
  --accent: #1f4e79;
  --accent-soft: #e6eef6;
  --on-accent: #ffffff;
  --bar: rgba(247, 245, 240, .82);
  --serif: "Fraunces", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #12151a;
    --surface: #1a1e25;
    --ink: #eceae4;
    --muted: #9aa1ab;
    --line: #2a3039;
    --accent: #8fb8e0;
    --accent-soft: #1d2a38;
    --on-accent: #12151a;
    --bar: rgba(18, 21, 26, .82);
  }
}
:root[data-theme="dark"] {
  --bg: #12151a;
  --surface: #1a1e25;
  --ink: #eceae4;
  --muted: #9aa1ab;
  --line: #2a3039;
  --accent: #8fb8e0;
  --accent-soft: #1d2a38;
  --on-accent: #12151a;
  --bar: rgba(18, 21, 26, .82);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
  transition: background-color .25s, color .25s;
}

[hidden] { display: none !important; }

.wrap {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 24px;
}

a { color: var(--accent); }

/* Top bar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bar);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.topbar { padding-top: env(safe-area-inset-top, 0px); }
.topbar-inner {
  max-width: 880px;
  margin: 0 auto;
  padding: 10px max(24px, env(safe-area-inset-right, 0px)) 10px max(24px, env(safe-area-inset-left, 0px));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--ink);
  text-decoration: none;
}
.avatar[data-for="personal"] { box-shadow: 0 0 0 2px #f59e0b, 0 0 24px rgba(245, 158, 11, .35); }
.brand-mark { transition: transform .4s ease; filter: drop-shadow(0 3px 8px rgba(59, 130, 246, .4)); }
.brand:hover .brand-mark { transform: scale(1.08); }
.brand-text { font: 700 16px/1 "Space Grotesk", var(--sans); letter-spacing: .12em; }
.brand-text span { color: #3b82f6; animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* Splash screen */
.splash {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  background: #070a10;
  color: #eceae4;
  overflow: hidden;
  transition: opacity .6s ease, visibility .6s;
}
.splash:not(.go) *, .splash:not(.go) *::before, .splash:not(.go) *::after { animation-play-state: paused !important; }
.splash.out { opacity: 0; visibility: hidden; }
.splash.out .splash-inner { transform: scale(1.08); filter: blur(4px); }

.splash-grid {
  position: absolute;
  inset: -50%;
  background-image:
    linear-gradient(rgba(59, 130, 246, .09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(59, 130, 246, .09) 1px, transparent 1px);
  background-size: 44px 44px;
  transform: perspective(600px) rotateX(55deg);
  animation: grid-move 3s linear infinite;
  mask-image: radial-gradient(circle at 50% 40%, #000 20%, transparent 60%);
  -webkit-mask-image: radial-gradient(circle at 50% 40%, #000 20%, transparent 60%);
}
@keyframes grid-move { to { background-position: 0 44px; } }

.splash-glow {
  position: absolute;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(59, 130, 246, .35), rgba(168, 85, 247, .12) 45%, transparent 70%);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse { 50% { transform: scale(1.12); opacity: .7; } }

.splash-inner {
  position: relative;
  text-align: center;
  padding: 0 16px;
  transition: transform .6s ease, filter .6s ease;
}

.splash-mark {
  width: 132px;
  height: 132px;
  filter: drop-shadow(0 0 18px rgba(59, 130, 246, .55));
}
.draw { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw .9s cubic-bezier(.6, 0, .2, 1) forwards; }
.d1 { animation-duration: 1s; }
.d3 { animation-delay: .75s; animation-duration: .9s; }
.arrow-in { opacity: 0; transform-box: fill-box; transform-origin: 0 50%; animation: arrow-pop .4s cubic-bezier(.2, .8, .2, 1.4) forwards 1.55s; }
@keyframes arrow-pop { from { opacity: 0; transform: translate(-10px, 6px) scale(.4); } to { opacity: 1; transform: none; } }
@keyframes draw { to { stroke-dashoffset: 0; } }
.tile-fill { opacity: 0; animation: fade .6s ease forwards .3s; }
.nodes > * { opacity: 0; transform-origin: center; transform-box: fill-box; animation: pop .4s ease forwards .45s; }

/* The logo's pixel dot breathes */
.lm-dot { animation: dot-breathe 2.4s ease-in-out infinite; }
@keyframes dot-breathe { 50% { opacity: .65; } }
@keyframes pop { from { opacity: 0; transform: scale(0); } 70% { transform: scale(1.6); } to { opacity: 1; transform: scale(1); } }

.splash-name {
  position: relative;
  margin: 26px 0 8px;
  font: 700 clamp(22px, 5vw, 34px)/1.1 "Space Grotesk", var(--sans);
  letter-spacing: .18em;
  background: linear-gradient(90deg, #22d3ee, #3b82f6 45%, #a855f7);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.splash-name.glitch::before,
.splash-name.glitch::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  -webkit-background-clip: text;
  background-clip: text;
}
.splash-name.glitch::before { color: rgba(34, 211, 238, .7); animation: glitch-a .35s steps(2) 2; }
.splash-name.glitch::after { color: rgba(168, 85, 247, .7); animation: glitch-b .35s steps(2) 2; }
@keyframes glitch-a { 0% { transform: translate(-3px, 1px); clip-path: inset(0 0 60% 0); } 100% { transform: translate(2px, -1px); clip-path: inset(40% 0 0 0); } }
@keyframes glitch-b { 0% { transform: translate(3px, -1px); clip-path: inset(50% 0 0 0); } 100% { transform: translate(-2px, 1px); clip-path: inset(0 0 50% 0); } }

.splash-sub {
  margin: 0;
  font: 400 14px/1.4 "JetBrains Mono", Consolas, monospace;
  color: #8a93a3;
  letter-spacing: .08em;
  opacity: 0;
  animation: fade .5s ease forwards 1.2s;
}
.caret { color: #3b82f6; animation: blink 1s steps(1) infinite; }

.splash-bar {
  width: 180px;
  height: 2px;
  margin: 26px auto 0;
  background: rgba(255, 255, 255, .08);
  border-radius: 2px;
  overflow: hidden;
}
.splash-bar span {
  display: block;
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #22d3ee, #3b82f6, #a855f7);
  transform-origin: left;
  transform: scaleX(0);
  animation: load 2.1s cubic-bezier(.5, 0, .2, 1) forwards;
  box-shadow: 0 0 10px #3b82f6;
}
@keyframes load { to { transform: scaleX(1); } }

.switch {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, auto);
  padding: 4px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
}
.switch button {
  position: relative;
  z-index: 1;
  border: 0;
  background: none;
  padding: 7px 18px;
  font: 500 14px/1 var(--sans);
  color: var(--muted);
  cursor: pointer;
  transition: color .2s;
}
.switch button[aria-selected="true"] { color: var(--on-accent); }
.switch-pill {
  position: absolute;
  top: 4px; bottom: 4px; left: 4px;
  width: var(--pill-w, 25%);
  border-radius: 999px;
  background: var(--accent);
  transform: translateX(var(--pill-x, 0px));
  transition: transform .45s cubic-bezier(.3, .7, .2, 1), width .45s cubic-bezier(.3, .7, .2, 1);
}

/* Hero and footer belong to the inner pages */
body[data-view="home"] .hero,
body[data-view="home"] footer { display: none; }

/* Home */
.home {
  position: relative;
  min-height: calc(100vh - 59px);
  min-height: calc(100svh - 59px);
  display: flex;
  align-items: center;
  overflow: hidden;
}
.home-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(600px circle at 20% 20%, rgba(34, 211, 238, .14), transparent 60%),
    radial-gradient(700px circle at 85% 80%, rgba(168, 85, 247, .14), transparent 60%);
}
.home-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(59, 130, 246, .08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(59, 130, 246, .08) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(circle at 50% 45%, #000 15%, transparent 70%);
  -webkit-mask-image: radial-gradient(circle at 50% 45%, #000 15%, transparent 70%);
}
.home-inner { position: relative; width: 100%; padding-top: 48px; padding-bottom: 64px; }

.home-kicker {
  margin: 0 0 16px;
  font: 400 14px/1.4 "JetBrains Mono", Consolas, monospace;
  color: var(--muted);
  letter-spacing: .06em;
}
.home-title {
  margin: 0 0 40px;
  font: 700 clamp(34px, 6vw, 60px)/1.08 "Space Grotesk", var(--sans);
  letter-spacing: -0.02em;
}
.grad {
  background: linear-gradient(90deg, #22d3ee, #3b82f6 50%, #a855f7);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.doors { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; perspective: 1000px; }
.home .wrap.home-inner { max-width: 1080px; }

/* Portfolio card: the three product icons drift and float */
.door-portfolio {
  background:
    radial-gradient(circle at 50% 30%, rgba(168, 85, 247, .28), transparent 60%),
    linear-gradient(rgba(168, 85, 247, .1) 1px, transparent 1px) 0 0 / 32px 32px,
    linear-gradient(90deg, rgba(168, 85, 247, .1) 1px, transparent 1px) 0 0 / 32px 32px,
    #0b0f17;
}
.door-portfolio .door-title { margin-top: 0; }
.door-floaters { position: absolute; left: 0; right: 0; top: 0; height: 58%; pointer-events: none; }
.mini {
  position: absolute;
  width: 62px;
  height: 62px;
  border-radius: 17px;
  display: grid;
  place-items: center;
  overflow: hidden;
  box-shadow: 0 14px 30px rgba(0, 0, 0, .45), inset 0 0 0 1px rgba(255, 255, 255, .1);
  animation: drift 7s ease-in-out infinite;
}
.mini img { display: block; }
.m-neom { left: 8%; top: 12%; background: radial-gradient(circle at 30% 20%, #1c1a4a, #05002c 70%); rotate: 5deg; animation-delay: -1.2s; animation-duration: 7.5s; }
.m-neom img { width: 74%; }
.door-portfolio:is(:hover, .inview) .m-neom { rotate: 11deg; }
.m-mag { left: 30%; top: 34%; background: radial-gradient(circle at 30% 20%, #2a2f3a, #0d1016 70%); rotate: -8deg; }
.m-mag img { width: 70%; }
.m-gifted { left: 52%; top: 10%; background: linear-gradient(150deg, #fff7d6, #ffe07a); rotate: 6deg; animation-delay: -2.3s; animation-duration: 6s; }
.m-gifted img { width: 56%; }
.m-cme { left: 72%; top: 36%; background: #000; rotate: -4deg; animation-delay: -4.6s; animation-duration: 8s; }
.m-cme img { width: 100%; height: 100%; object-fit: cover; }
@keyframes drift {
  0%, 100% { translate: 0 0; }
  33% { translate: 4px -10px; }
  66% { translate: -4px -4px; }
}
.door-portfolio:is(:hover, .inview) .mini { scale: 1.08; transition: scale .4s cubic-bezier(.2, .7, .2, 1); }
.door-portfolio:is(:hover, .inview) .m-mag { rotate: -14deg; }
.door-portfolio:is(:hover, .inview) .m-gifted { rotate: 12deg; }
.door-portfolio:is(:hover, .inview) .m-cme { rotate: -10deg; }
.mini { transition: scale .4s cubic-bezier(.2, .7, .2, 1), rotate .5s cubic-bezier(.2, .7, .2, 1); }
.home.play .door-portfolio { animation-delay: .55s; }
.door {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 320px;
  padding: 28px;
  border-radius: 22px;
  overflow: hidden;
  isolation: isolate;
  color: #f2f4f8;
  text-decoration: none;
  background: #0b0f17;
  border: 1px solid rgba(255, 255, 255, .08);
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform .25s ease, box-shadow .3s ease;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .12);
}
.door:is(:hover, .inview) { box-shadow: 0 18px 50px rgba(59, 130, 246, .28); }
.door::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.5px;
  background: linear-gradient(135deg, #22d3ee, #3b82f6, #a855f7);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity .3s;
  pointer-events: none;
}
.door:is(:hover, .inview)::after, .door:focus-visible::after { opacity: 1; }

.door-career {
  background:
    linear-gradient(rgba(59, 130, 246, .12) 1px, transparent 1px) 0 0 / 32px 32px,
    linear-gradient(90deg, rgba(59, 130, 246, .12) 1px, transparent 1px) 0 0 / 32px 32px,
    radial-gradient(circle at 80% 10%, rgba(34, 211, 238, .25), transparent 55%),
    #0b0f17;
}
.door-photo {
  position: absolute;
  inset: 0;
  z-index: -1;
  transition: transform .8s cubic-bezier(.2, .7, .2, 1);
}
.door-career .door-photo {
  background:
    linear-gradient(to top, rgba(7, 10, 16, .95) 18%, rgba(7, 10, 16, .35) 65%, rgba(7, 10, 16, .15)),
    linear-gradient(rgba(59, 130, 246, .14) 1px, transparent 1px) 0 0 / 32px 32px,
    linear-gradient(90deg, rgba(59, 130, 246, .14) 1px, transparent 1px) 0 0 / 32px 32px,
    url("career/portrait.jpg") center 18% / cover;
}
.door-personal .door-photo {
  background:
    linear-gradient(to top, rgba(7, 10, 16, .95) 18%, rgba(7, 10, 16, .3) 65%, rgba(7, 10, 16, .1)),
    url("personal/alula.jpg") center 38% / cover;
}
.door:is(:hover, .inview) .door-photo { transform: scale(1.06); }

.door-glow {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(59, 130, 246, .3), transparent 45%);
  opacity: 0;
  transition: opacity .3s;
}
.door:is(:hover, .inview) .door-glow { opacity: 1; }

.door-num {
  position: absolute;
  top: 24px;
  right: 28px;
  font: 500 13px/1 "JetBrains Mono", Consolas, monospace;
  color: rgba(255, 255, 255, .5);
  letter-spacing: .1em;
}
.door-title { margin-top: 28px; font: 700 34px/1.1 "Space Grotesk", var(--sans); letter-spacing: -0.01em; }
.door-text { margin-top: 8px; color: rgba(242, 244, 248, .75); font-size: 15px; max-width: 26em; }
.door-go {
  margin-top: 20px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font: 500 14px/1 "JetBrains Mono", Consolas, monospace;
  color: #8fd3ff;
  letter-spacing: .06em;
}
.door-go span { transition: transform .25s ease; }
.door:is(:hover, .inview) .door-go span { transform: translateX(6px); }

/* Home entrance, after the splash and whenever you come back */
.home .home-kicker, .home .home-title, .home .door, .home .home-powered { opacity: 0; }
.home.play .home-powered { animation: rise .6s ease forwards .85s; }
.home.play .home-kicker { animation: rise .6s ease forwards; }
.home.play .home-title { animation: rise .7s ease forwards .1s; }
.home.play .door { animation: door-in .8s cubic-bezier(.2, .8, .2, 1) forwards; }
.home.play .door-career { animation-delay: .25s; }
.home.play .door-personal { animation-delay: .4s; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes door-in {
  from { opacity: 0; translate: 0 48px; scale: .94; }
  to { opacity: 1; translate: 0 0; scale: 1; }
}

.theme-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  display: grid;
  place-items: center;
  cursor: pointer;
}
.theme-btn .moon { display: none; }
:root[data-theme="dark"] .theme-btn .sun { display: none; }
:root[data-theme="dark"] .theme-btn .moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .theme-btn .sun { display: none; }
  :root:not([data-theme]) .theme-btn .moon { display: block; }
}

/* Hero */
.hero { padding: 72px 24px 56px; }

.avatar {
  display: block;
  width: 112px;
  height: 112px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--surface);
  box-shadow: 0 0 0 2px #3b82f6, 0 0 24px rgba(59, 130, 246, .35);
  margin-bottom: 28px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 14px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font: 600 clamp(40px, 7vw, 68px)/1.05 var(--serif);
  letter-spacing: -0.02em;
}

.lede {
  max-width: 34em;
  margin: 24px 0 32px;
  font-size: clamp(18px, 2.4vw, 21px);
  color: var(--muted);
  animation: fade .4s ease;
}

.actions { display: flex; flex-wrap: wrap; gap: 12px; }

.btn {
  display: inline-block;
  padding: 11px 20px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  transition: border-color .15s, transform .15s;
}
.btn:hover { border-color: var(--accent); transform: translateY(-1px); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }

.view { animation: fade .35s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* Stats */
.stats.wrap {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  padding: 0;
  max-width: 832px;
}
.stats div { background: var(--surface); padding: 22px 20px; }
.stats strong {
  display: block;
  font: 600 28px/1.1 var(--serif);
  color: var(--accent);
  margin-bottom: 6px;
}
.stats span { font-size: 14px; line-height: 1.45; color: var(--muted); }

/* Sections */
.block { padding: 72px 0 0; }

h2 {
  margin: 0 0 28px;
  font: 600 13px/1 var(--sans);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

h3 { margin: 0; font-size: 18px; font-weight: 600; line-height: 1.35; }
h3 small { font-weight: 400; color: var(--muted); font-size: 15px; margin-left: 6px; }

.prose p { margin: 0 0 16px; max-width: 40em; }
.prose b { font-weight: 600; }

.org { margin: 2px 0 12px; color: var(--muted); font-size: 15px; }

/* Scroll reveal */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
/* Experience filter */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: -8px 0 24px; }
.chip-btn {
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font: 500 14px/1 var(--sans);
  cursor: pointer;
  transition: background-color .15s, color .15s, border-color .15s;
}
.chip-btn:hover { border-color: var(--accent); }
.chip-btn.is-on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }

/* Timeline */
.timeline { list-style: none; margin: 0; padding: 0; }

.timeline > li {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 28px;
  padding: 28px 0;
  border-top: 1px solid var(--line);
}
.timeline > li:first-child { border-top: 0; padding-top: 0; }
.timeline > li.is-hidden { display: none; }

.meta { display: flex; flex-direction: column; gap: 2px; font-size: 14px; }

/* Company logos, under the dates and location: a gentle float and an occasional light sweep */
.co-badge {
  position: relative;
  display: block;
  width: 84px;
  height: 84px;
  margin-top: 16px;
  border-radius: 20px;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 8px 20px rgba(0, 0, 0, .1);
  animation: badge-float 5s ease-in-out infinite;
  transition: box-shadow .35s ease;
}
.co-badge::after {
  content: "";
  position: absolute;
  inset: -20%;
  background: linear-gradient(115deg, transparent 40%, rgba(255, 255, 255, .55) 50%, transparent 60%);
  translate: -100% 0;
  animation: badge-shine 6s ease-in-out infinite;
  pointer-events: none;
}
.co-logo { display: block; width: 100%; height: 100%; object-fit: contain; padding: 6px; }
.co-logo[src$="lenzo.png"], .co-logo[src$="luna-lights.png"], .co-logo[src$="taurus.png"] { padding: 0; object-fit: cover; }
@keyframes badge-float { 50% { translate: 0 -4px; box-shadow: 0 14px 26px rgba(0, 0, 0, .14); } }
@keyframes badge-shine { 0%, 70% { translate: -100% 0; } 100% { translate: 100% 0; } }
/* each logo moves slightly out of step with the others */
.timeline > li:nth-child(2) .co-badge, .timeline > li:nth-child(2) .co-badge::after { animation-delay: -1.2s; }
.timeline > li:nth-child(3) .co-badge, .timeline > li:nth-child(3) .co-badge::after { animation-delay: -2.4s; }
.timeline > li:nth-child(4) .co-badge, .timeline > li:nth-child(4) .co-badge::after { animation-delay: -3.6s; }
.timeline > li:nth-child(5) .co-badge, .timeline > li:nth-child(5) .co-badge::after { animation-delay: -4.8s; }
.timeline > li:is(:hover, .inview) .co-badge { box-shadow: 0 14px 30px rgba(59, 130, 246, .3); }
.timeline > li:is(:hover, .inview) .co-logo { scale: 1.06; transition: scale .4s cubic-bezier(.2, .7, .2, 1); }
.co-logo { transition: scale .4s cubic-bezier(.2, .7, .2, 1); }
/* pop in when the row scrolls into view */
.timeline > li.reveal .co-badge { scale: .6; opacity: 0; transition: box-shadow .35s ease, scale .6s cubic-bezier(.2, .8, .2, 1.3) .2s, opacity .4s ease .2s; }
.timeline > li.reveal.in .co-badge { scale: 1; opacity: 1; }
.date { font-weight: 500; font-variant-numeric: tabular-nums; }
.place { color: var(--muted); }

.role ul { margin: 0; padding-left: 18px; }
.role li { margin-bottom: 8px; }
.role li::marker { color: var(--accent); }

.place.tag {
  align-self: flex-start;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 12px;
  font-weight: 600;
  margin-top: 4px;
}

/* Skills */
.skill-groups { display: grid; gap: 28px; }
.skill-groups h3 { font-size: 15px; margin-bottom: 12px; }

.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li {
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 14px;
  transition: border-color .15s, transform .15s;
}
.chips li:hover { border-color: var(--accent); transform: translateY(-1px); }

/* Education */
.edu { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.edu .org { margin-bottom: 0; }

/* Education as a small timeline: university, high school, primary */
.edu-list { list-style: none; margin: 0; padding: 0 0 0 82px; position: relative; }
.edu-list::before {
  content: "";
  position: absolute;
  left: 28px; top: 28px; bottom: 28px;
  width: 2px;
  border-radius: 2px;
  background: linear-gradient(#22d3ee, #3b82f6, #a855f7);
  opacity: .5;
}
.edu-list > .edu { position: relative; min-height: 56px; padding: 0 0 30px; }
.edu-list > .edu:last-child { padding-bottom: 0; }
/* each school's logo sits on the line, floating gently like the company badges */
.edu-logo {
  position: absolute;
  left: -82px; top: -6px;
  width: 58px; height: 58px;
  display: grid;
  place-items: center;
  padding: 6px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--line);
  box-shadow: 0 6px 16px rgba(0, 0, 0, .1);
  animation: badge-float 5s ease-in-out infinite;
  transition: border-color .3s, box-shadow .3s, scale .35s cubic-bezier(.2, .7, .2, 1);
}
.edu-list > .edu:nth-child(2) .edu-logo { animation-delay: -1.6s; }
.edu-list > .edu:nth-child(3) .edu-logo { animation-delay: -3.2s; }
.edu-logo img { width: 100%; height: 100%; object-fit: contain; }
/* the Al-Majd crest is already round, so let it fill its badge */
.edu-logo:has(img[src*="al-majd"]) { padding: 2px; }
.edu-logo img[src*="al-majd"] { border-radius: 50%; }
.edu-list > .edu:is(:hover, .inview) .edu-logo { border-color: var(--accent); box-shadow: 0 0 0 5px var(--accent-soft), 0 10px 22px rgba(59, 130, 246, .25); scale: 1.06; }
.edu h3 a, .edu .org a { color: inherit; text-decoration: none; background-image: linear-gradient(var(--accent), var(--accent)); background-size: 0 1px; background-position: 0 100%; background-repeat: no-repeat; transition: background-size .35s ease, color .2s; }
.edu h3 a:hover, .edu .org a:hover { color: var(--accent); background-size: 100% 1px; }
.edu-list .date { white-space: nowrap; color: var(--muted); }
.edu-list > .edu:first-child .date { color: var(--ink); }
.quals { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 0; padding: 0; }
.quals li {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 13px;
  color: var(--muted);
}
.quals b { color: var(--accent); font-weight: 600; margin-right: 4px; }
.langs { margin: 20px 0 0; color: var(--muted); font-size: 15px; }

/* Personal */
.motto {
  margin: 8px 0 0;
  padding: 0;
  font: 400 clamp(26px, 4.4vw, 40px)/1.25 var(--serif);
  font-style: italic;
  letter-spacing: -0.01em;
  max-width: 20em;
}

.interests {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.interest {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px;
  transition: transform .2s, border-color .2s;
}
.interest:is(:hover, .inview) { transform: translateY(-3px); border-color: var(--accent); }
.interest .icon { font-size: 26px; display: block; margin-bottom: 10px; }
.interest p { margin: 6px 0 0; color: var(--muted); font-size: 15px; }

.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 260px;
  gap: 12px;
}
.shot {
  position: relative;
  padding: 0;
  border: 0;
  border-radius: 14px;
  overflow: hidden;
  cursor: zoom-in;
  background: var(--line);
}
.shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .5s ease;
}
.shot:is(:hover, .inview) img { transform: scale(1.05); }
.shot::after {
  content: attr(data-caption);
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 28px 14px 12px;
  background: linear-gradient(transparent, rgba(0, 0, 0, .55));
  color: #fff;
  font: 500 14px/1.3 var(--sans);
  text-align: left;
  opacity: 0;
  transition: opacity .25s;
}
.shot:is(:hover, .inview)::after, .shot:focus-visible::after { opacity: 1; }

.ig { margin: 20px 0 0; font-weight: 500; }
.shot.tall { grid-row: span 2; }

/* About with portrait */
/* label across the top, then photo left and bio right, starting and ending together */
.about {
  display: grid;
  grid-template-columns: 280px 1fr;
  grid-template-rows: auto 1fr;
  column-gap: 44px;
  align-items: stretch;
}
.about h2 { grid-column: 1 / -1; grid-row: 1; }
.about .prose { grid-column: 2; grid-row: 2; align-self: start; }
.about .prose p:last-child { margin-bottom: 0; }
.about-photo {
  grid-column: 1;
  grid-row: 2;
  position: relative;
  margin: 0;
  min-height: 320px;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .18);
}
.about-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 18%; display: block; }

/* Images unveil from the bottom when their section scrolls in */
.reveal .img-reveal { clip-path: inset(100% 0 0 0 round 14px); }
.reveal.in .img-reveal { animation: unveil 1s cubic-bezier(.7, 0, .2, 1) forwards; }
.reveal.in .img-reveal > img { animation: settle 1.4s cubic-bezier(.2, .7, .2, 1); }
.gallery .img-reveal:nth-child(2) { animation-delay: .08s; }
.gallery .img-reveal:nth-child(3) { animation-delay: .16s; }
.gallery .img-reveal:nth-child(4) { animation-delay: .24s; }
.gallery .img-reveal:nth-child(5) { animation-delay: .32s; }
.about-photo.img-reveal { animation-delay: .15s; }
@keyframes unveil { to { clip-path: inset(0 0 0 0 round 14px); } }
@keyframes settle { from { scale: 1.25; } to { scale: 1; } }

/* Ambient light that shifts colour with each page */
.ambient { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.blob {
  position: absolute;
  width: 60vmax;
  height: 60vmax;
  border-radius: 50%;
  filter: blur(80px);
  opacity: .16;
  transition: background-color 1.4s ease, transform 1.8s cubic-bezier(.4, 0, .2, 1), opacity 1.4s ease;
}
.b1 { top: -25vmax; left: -20vmax; background: #22d3ee; }
.b2 { bottom: -30vmax; right: -20vmax; background: #a855f7; }
body[data-view="career"] .b1 { background: #3b82f6; transform: translate(10vmax, 5vmax); }
body[data-view="career"] .b2 { background: #22d3ee; transform: translate(-5vmax, -10vmax); opacity: .1; }
body[data-view="personal"] .b1 { background: #f59e0b; transform: translate(30vmax, 0); opacity: .12; }
body[data-view="personal"] .b2 { background: #a855f7; transform: translate(-20vmax, -5vmax); }
.home-bg { background: none; }

/* Portfolio */
.project {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 40px;
  align-items: center;
  padding: 36px 0;
  border-top: 1px solid var(--line);
}
.project:first-of-type { border-top: 0; padding-top: 0; }
/* Every project alternates: visual left on odd ones, right on even ones */
.project:nth-of-type(even) > :first-child { order: 2; }

.shot-frame {
  position: relative;
  display: block;
  border-radius: 14px;
  overflow: hidden;
  background: #0b0f17;
  border: 1px solid var(--line);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .22);
  transform: perspective(1000px) rotateY(0) rotateX(0);
  transition: transform .5s cubic-bezier(.2, .7, .2, 1), box-shadow .5s;
}
.project:nth-of-type(odd) .shot-frame:hover { transform: perspective(1000px) rotateY(4deg) rotateX(2deg) translateY(-4px); }
.project:nth-of-type(even) .shot-frame:hover { transform: perspective(1000px) rotateY(-4deg) rotateX(2deg) translateY(-4px); }
.shot-frame:hover { box-shadow: 0 30px 70px rgba(59, 130, 246, .3); }
.frame-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 12px;
  background: #161b24;
  border-bottom: 1px solid rgba(255, 255, 255, .06);
}
.frame-bar i { width: 9px; height: 9px; border-radius: 50%; background: #3a4150; }
.frame-bar i:nth-child(1) { background: #ff5f57; }
.frame-bar i:nth-child(2) { background: #febc2e; }
.frame-bar i:nth-child(3) { background: #28c840; }
.frame-bar span {
  margin-left: 10px;
  padding: 3px 12px;
  border-radius: 6px;
  background: rgba(255, 255, 255, .06);
  color: #9aa1ab;
  font: 400 12px/1.2 "JetBrains Mono", Consolas, monospace;
}
.shot-frame img { display: block; width: 100%; aspect-ratio: 16 / 11; object-fit: cover; object-position: top; transition: transform .8s ease; }
.shot-frame:hover img { transform: scale(1.03); }

.project-meta {
  margin: 0 0 8px;
  font: 500 12px/1.4 "JetBrains Mono", Consolas, monospace;
  letter-spacing: .04em;
  color: var(--accent);
}
.project-body h3 { font: 700 26px/1.15 "Space Grotesk", var(--sans); margin-bottom: 10px; }
.project-sum { margin: 0 0 14px; color: var(--muted); }
.project-body > ul:not(.tags) { margin: 0 0 16px; padding-left: 18px; }
.project-body > ul:not(.tags) li { margin-bottom: 6px; }
.project-body > ul:not(.tags) li::marker { color: var(--accent); }
.tags { list-style: none; margin: 0 0 18px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.tags li {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12.5px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 500;
}
.project-link { font-weight: 600; text-decoration: none; }
.project-link:hover { text-decoration: underline; }

/* Portfolio header: the three product logos orbit the IS mark */
body[data-view="portfolio"] .hero { display: none; }
.pf-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 32px;
  min-height: min(calc(100svh - 59px), 760px);
  padding-top: 40px;
  padding-bottom: 40px;
}
.pf-kicker {
  margin: 0 0 16px;
  font: 400 14px/1.4 "JetBrains Mono", Consolas, monospace;
  color: var(--muted);
  letter-spacing: .06em;
}
.pf-title {
  margin: 0;
  font: 700 clamp(38px, 5.6vw, 62px)/1.04 "Space Grotesk", var(--sans);
  letter-spacing: -0.03em;
}
.pf-sub { margin: 20px 0 32px; max-width: 26em; font-size: 18px; color: var(--muted); }
.pf-index { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); max-width: 380px; }
.pf-index a {
  display: grid;
  grid-template-columns: 26px 1fr auto;
  align-items: center;
  column-gap: 12px;
  padding: 13px 4px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
  font: 600 18px/1.2 "Space Grotesk", var(--sans);
  transition: padding-left .3s cubic-bezier(.2, .7, .2, 1), color .2s;
}
.pf-index a span { font: 500 12px/1 "JetBrains Mono", Consolas, monospace; color: var(--accent); }
.pf-index a em { justify-self: end; font: 400 13px/1 var(--sans); font-style: normal; color: var(--muted); text-align: right; }
.pf-index a:hover, .pf-index a.lit { padding-left: 14px; color: var(--accent); }

.orbit { position: relative; width: min(100%, 500px); aspect-ratio: 1; margin: 0 auto; }
.ring { stroke-width: 1.4; }
.orbit-lines { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.ring { transform-origin: 200px 200px; animation: spin 60s linear infinite; }
.r2 { animation-direction: reverse; animation-duration: 40s; }
@keyframes spin { to { transform: rotate(360deg); } }
.sat { transform-origin: 200px 200px; animation: spin 14s linear infinite; }
.sat.s2 { animation-duration: 9s; animation-direction: reverse; }
.link { stroke: url(#og); stroke-width: 2; stroke-opacity: .85; stroke-dasharray: 1; stroke-dashoffset: 1; }
.pulse { stroke: #fff; stroke-width: 2.5; stroke-linecap: round; stroke-dasharray: .06 1; stroke-dashoffset: 0; opacity: 0; filter: drop-shadow(0 0 4px #3b82f6); }

.orbit-core {
  position: absolute;
  left: 50%; top: 50%;
  width: 104px; height: 104px;
  translate: -50% -50%;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(59, 130, 246, .28), transparent 70%);
}
.orbit-core::before {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  border: 1px solid rgba(59, 130, 246, .45);
  animation: ping 2.8s ease-out infinite;
}
@keyframes ping { from { transform: scale(.7); opacity: 1; } to { transform: scale(1.7); opacity: 0; } }

.tile {
  position: absolute;
  translate: -50% -50%;
  width: 30%;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 24px;
  text-decoration: none;
  box-shadow: 0 18px 40px rgba(0, 0, 0, .25), inset 0 0 0 1px rgba(255, 255, 255, .08);
  transition: scale .35s cubic-bezier(.2, .7, .2, 1), box-shadow .35s;
  animation: float 6s ease-in-out infinite;
}
.tile:is(:hover, .inview), .tile.lit { scale: 1.08; box-shadow: 0 24px 60px rgba(59, 130, 246, .45), inset 0 0 0 1px rgba(255, 255, 255, .2); }
@keyframes float { 50% { transform: translateY(-10px); } }
.t-mag { left: 22%; top: 24%; background: radial-gradient(circle at 30% 20%, #2a2f3a, #0d1016 70%); }
.t-neom { left: 76%; top: 78%; background: radial-gradient(circle at 30% 20%, #1c1a4a, #05002c 70%); animation-delay: -3s; }
.t-neom img { width: 70%; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .4)); }
.t-mag::after { content: ""; position: absolute; left: 22%; right: 22%; bottom: 18%; height: 3px; border-radius: 3px; background: #f26b21; }
.t-mag img { width: 66%; }
.t-gifted { left: 78%; top: 26%; background: linear-gradient(150deg, #fff7d6, #ffe07a); animation-delay: -2s; }
.t-gifted img { width: 52%; }
.t-cme { left: 24%; top: 76%; background: #000; animation-delay: -4s; }
.t-cme img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.tile-tag {
  position: absolute;
  bottom: -11px;
  left: 50%;
  translate: -50% 0;
  padding: 3px 10px;
  border-radius: 999px;
  font: 500 11px/1.4 "JetBrains Mono", Consolas, monospace;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  white-space: nowrap;
}

/* Entrance: lines draw out from the core, tiles pop in one by one, then pulses start travelling */
.pf-hero.play .pf-kicker { animation: rise .6s ease both; }
.pf-hero.play .pf-title { animation: rise .7s ease .08s both; }
.pf-hero.play .pf-sub { animation: rise .7s ease .16s both; }
.pf-hero.play .pf-index li { animation: rise .6s ease both; }
.pf-hero.play .pf-index li:nth-child(1) { animation-delay: .26s; }
.pf-hero.play .pf-index li:nth-child(2) { animation-delay: .34s; }
.pf-hero.play .pf-index li:nth-child(3) { animation-delay: .42s; }
.pf-hero.play .orbit-core { animation: core-in .7s cubic-bezier(.2, .8, .2, 1.3) .1s both; }
@keyframes core-in { from { scale: 0; opacity: 0; } }
.pf-hero.play .link { animation: draw .8s cubic-bezier(.6, 0, .2, 1) .35s forwards; }
.pf-hero.play .pulse { animation: travel 2.6s ease-in-out 1.4s infinite; }
@keyframes travel { 0% { stroke-dashoffset: .06; opacity: 0; } 15% { opacity: 1; } 85% { opacity: 1; } 100% { stroke-dashoffset: -1; opacity: 0; } }
.pf-hero.play .tile { animation: tile-in .7s cubic-bezier(.2, .8, .2, 1.25) both, float 6s ease-in-out infinite; }
.pf-hero.play .t-neom { animation-delay: .65s, -3s; }
.pf-hero.play .t-mag { animation-delay: .8s, 1.4s; }
.pf-hero.play .t-gifted { animation-delay: .95s, -.6s; }
.pf-hero.play .t-cme { animation-delay: 1.1s, -2.6s; }
.pf-hero.play .pf-index li:nth-child(4) { animation-delay: .5s; }

/* NEOM: a "classified" card instead of a screenshot */
.classified {
  position: relative;
  aspect-ratio: 16 / 11;
  border-radius: 14px;
  overflow: hidden;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 22px;
  background:
    radial-gradient(circle at 50% 40%, rgba(59, 130, 246, .25), transparent 60%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, .025) 0 1px, transparent 1px 4px),
    #05002c;
  border: 1px solid rgba(255, 255, 255, .08);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .22);
}
.cl-emblem { width: 26%; filter: drop-shadow(0 0 24px rgba(143, 184, 224, .35)); animation: emblem-turn 30s linear infinite; }
@keyframes emblem-turn { to { rotate: 360deg; } }
.cl-logo { width: 34%; opacity: .9; margin-top: -8px; }
.cl-redact { display: grid; gap: 9px; width: 52%; justify-items: center; }
.cl-redact i { display: block; height: 9px; border-radius: 2px; background: rgba(255, 255, 255, .14); }
.cl-stamp {
  position: absolute;
  bottom: 12%;
  right: 7%;
  padding: 5px 12px;
  border: 2px solid #ef4444;
  border-radius: 6px;
  color: #ef4444;
  font: 700 13px/1 "JetBrains Mono", Consolas, monospace;
  letter-spacing: .2em;
  text-transform: uppercase;
  rotate: -8deg;
  opacity: .9;
  mix-blend-mode: screen;
}
.cl-corner { position: absolute; width: 18px; height: 18px; border: 2px solid rgba(143, 184, 224, .5); }
.cl-corner.tl { top: 14px; left: 14px; border-right: 0; border-bottom: 0; }
.cl-corner.tr { top: 14px; right: 14px; border-left: 0; border-bottom: 0; }
.cl-corner.bl { bottom: 14px; left: 14px; border-right: 0; border-top: 0; }
.cl-corner.br { bottom: 14px; right: 14px; border-left: 0; border-top: 0; }
.cl-scan {
  position: absolute;
  left: 0; right: 0;
  height: 30%;
  top: -30%;
  background: linear-gradient(to bottom, transparent, rgba(34, 211, 238, .16), transparent);
  border-bottom: 1px solid rgba(34, 211, 238, .5);
  animation: scan 3.6s linear infinite;
}
@keyframes scan { to { top: 100%; } }
.cl-note { display: inline-flex; align-items: center; gap: 8px; margin: 0; color: var(--muted); font-size: 14px; font-weight: 500; }
@keyframes tile-in { from { opacity: 0; scale: .3; translate: -50% -50%; } }
/* Branded stages for MAG and Gifted Wallet, matching the NEOM and CMe cards */
.brand-stage {
  position: relative;
  display: block;
  aspect-ratio: 16 / 11;
  border-radius: 14px;
  overflow: hidden;
  isolation: isolate;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .22);
  border: 1px solid rgba(255, 255, 255, .08);
}
.stage-browser {
  position: absolute;
  right: -6%;
  bottom: -10%;
  width: 72%;
  border-radius: 10px;
  overflow: hidden;
  background: #0b0f17;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .45);
  transform: perspective(1200px) rotateY(-10deg) rotateX(4deg) rotateZ(-2deg);
  transform-origin: 100% 100%;
  transition: transform .8s cubic-bezier(.2, .7, .2, 1);
}
.stage-browser img { display: block; width: 100%; aspect-ratio: 16 / 11; object-fit: cover; object-position: top; }
.brand-stage:is(:hover, .inview) .stage-browser { transform: perspective(900px) rotateY(-4deg) rotateX(2deg) translate(-4%, -6%); }
.stage-logo { position: absolute; top: 9%; left: 7%; }
.stage-chip {
  position: absolute;
  left: 7%;
  bottom: 9%;
  padding: 6px 12px;
  border-radius: 999px;
  font: 500 12px/1.2 "JetBrains Mono", Consolas, monospace;
  letter-spacing: .02em;
  z-index: 2;
}

/* MAG: charcoal, orange glow, drifting diamond motif */
.mag-stage { background: linear-gradient(150deg, #1b1f27, #0b0d12 70%); }
.ms-pattern {
  position: absolute;
  inset: -20%;
  z-index: -1;
  opacity: .22;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56' viewBox='0 0 56 56'%3E%3Cpath d='M28 4 52 28 28 52 4 28z' fill='none' stroke='%23f26b21' stroke-width='1.2'/%3E%3C/svg%3E");
  background-size: 56px 56px;
  animation: diamond-drift 22s linear infinite;
  mask-image: radial-gradient(circle at 30% 30%, #000 10%, transparent 65%);
  -webkit-mask-image: radial-gradient(circle at 30% 30%, #000 10%, transparent 65%);
}
@keyframes diamond-drift { to { background-position: 56px 56px; } }
.ms-glow { position: absolute; right: -10%; bottom: -20%; width: 70%; height: 80%; z-index: -1; background: radial-gradient(circle, rgba(242, 107, 33, .45), transparent 65%); }
.ms-logo { width: 26%; }
.mag-stage .stage-browser {
  left: 6%; right: 6%; top: 27%; bottom: auto; width: auto;
  transform: perspective(1200px) rotateX(5deg);
  transform-origin: 50% 0;
}
.mag-stage:is(:hover, .inview) .stage-browser { transform: perspective(1200px) rotateX(0deg) translateY(-3%); }
.mag-stage .mag-demo { aspect-ratio: 2.35 / 1; }
.mag-stage .stage-chip { left: auto; right: 6%; bottom: auto; top: 10%; }
.ms-sweep { position: absolute; top: calc(9% + 13%); left: 7%; width: 30%; height: 3px; border-radius: 3px; background: #f26b21; overflow: hidden; }
.ms-sweep::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, #fff, transparent); translate: -100% 0; animation: sweep 2.8s ease-in-out infinite; }
@keyframes sweep { 60%, 100% { translate: 100% 0; } }
/* MAG's projects map, recreated live: the list highlights down, the pin flies to each place */
.mag-demo {
  display: grid;
  grid-template-columns: 42% 58%;
  grid-template-rows: minmax(0, 1fr);
  aspect-ratio: 16 / 10;
  background: #0b0d12;
  overflow: hidden;
  container-type: inline-size;
}
.md-list {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 0;
  overflow: hidden;
  padding: 0 3.2cqw;
  background: #ececec;
}
.md-title { font: 700 1.9cqw/1 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: #f26b21; margin-bottom: 1.4cqw; }
.md-item {
  display: block;
  padding: .75cqw 0;
  border-bottom: 1px solid #c9c9c9;
  font: 500 1.75cqw/1.25 var(--sans);
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #6b6b6b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color .35s ease, transform .35s ease, font-weight .35s;
  transform-origin: left center;
}
.md-item.on { color: #f26b21; font-weight: 700; transform: scale(1.06); }
.md-map { position: relative; display: grid; place-items: center; overflow: hidden; }
.md-stage { position: relative; display: block; height: 100%; aspect-ratio: 630 / 712; }
.md-stage img { display: block; width: 100%; height: 100%; aspect-ratio: auto; object-fit: cover; }
.md-pin, .md-marker { position: absolute; left: var(--x); top: var(--y); }
.md-pin {
  width: 7px; height: 7px;
  margin: -3.5px 0 0 -3.5px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 6px rgba(255, 255, 255, .8);
  opacity: .85;
}
.md-marker {
  width: 0; height: 0;
  transition: left .9s cubic-bezier(.6, 0, .2, 1), top .9s cubic-bezier(.6, 0, .2, 1);
}
.md-marker::before {
  content: "";
  position: absolute;
  left: -7px; top: -17px;
  width: 14px; height: 14px;
  border-radius: 50% 50% 50% 0;
  rotate: -45deg;
  background: #f26b21;
  box-shadow: 0 0 12px rgba(242, 107, 33, .9);
}
.md-marker i {
  position: absolute;
  left: -10px; top: -10px;
  width: 20px; height: 20px;
  border-radius: 50%;
  border: 2px solid #f26b21;
  animation: ping-orange 1.8s ease-out infinite;
}
@keyframes ping-orange { from { scale: .3; opacity: 1; } to { scale: 2.2; opacity: 0; } }
.ms-chip { background: rgba(242, 107, 33, .14); color: #ffb185; border: 1px solid rgba(242, 107, 33, .5); }

/* Gifted Wallet: warm yellow, purple blobs, twinkling stars */
.gw-stage { background: linear-gradient(160deg, #ffe46b, #fdc62a 60%, #f6a91d); }
.gw-blob { position: absolute; z-index: -1; border-radius: 50%; background: #4b2a8f; opacity: .9; }
.gb1 { width: 46%; aspect-ratio: 1; right: -12%; top: -18%; }
.gb2 { width: 30%; aspect-ratio: 1; left: -10%; bottom: -14%; opacity: .25; }
.gw-star { position: absolute; fill: #fff; animation: twinkle 2.6s ease-in-out infinite; }
.st1 { width: 22px; top: 12%; left: 46%; }
.st2 { width: 14px; top: 30%; left: 38%; animation-delay: -.9s; fill: #4b2a8f; }
.st3 { width: 18px; bottom: 26%; left: 22%; animation-delay: -1.7s; }
@keyframes twinkle { 50% { scale: .55; opacity: .5; rotate: 45deg; } }
.gw-logo-card {
  position: absolute;
  top: 9%;
  left: 7%;
  width: 24%;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 14px 30px rgba(75, 42, 143, .3);
  rotate: -6deg;
  transition: rotate .6s cubic-bezier(.2, .7, .2, 1);
}
.gw-logo-card img { width: 66%; }
.gw-stage:is(:hover, .inview) .gw-logo-card { rotate: 0deg; }
.gw-chip { background: #4b2a8f; color: #fff; }
/* Gifted Wallet concept flow: each step lights up in turn */
.gw-flow {
  position: absolute;
  right: 7%;
  top: 50%;
  translate: 0 -50%;
  width: 50%;
  display: grid;
  gap: 8px;
  counter-reset: none;
}
.gw-step {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .92);
  color: #2b1a57;
  font: 600 13px/1.2 var(--sans);
  box-shadow: 0 8px 18px rgba(75, 42, 143, .18);
  animation: gw-step 8s ease-in-out infinite;
}
.gw-step b { flex: none; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 8px; background: #f3edff; color: #4b2a8f; font: 700 11px/1 "JetBrains Mono", Consolas, monospace; transition: background .3s; }
.gw-step + .gw-step::before {
  content: "";
  position: absolute;
  left: 23px;
  top: -9px;
  width: 2px;
  height: 9px;
  background: rgba(75, 42, 143, .35);
}
.gw-step:nth-child(2) { animation-delay: 2s; }
.gw-step:nth-child(3) { animation-delay: 4s; }
.gw-step:nth-child(4) { animation-delay: 6s; }
@keyframes gw-step {
  0%, 30%, 100% { background: rgba(255, 255, 255, .92); color: #2b1a57; translate: 0 0; }
  6%, 22% { background: #4b2a8f; color: #fff; translate: -6px 0; box-shadow: 0 12px 26px rgba(75, 42, 143, .45); }
}
/* Portfolio view switch: Product work | Digital & social, right under the nav bar */
.pf-switch-wrap { display: flex; justify-content: center; padding: 28px 16px 0; scroll-margin-top: 80px; }
.pf-switch-wrap + .pf-hero { min-height: min(calc(100svh - 140px), 700px); padding-top: 24px; }

/* Digital & social orbit: three client tiles in a triangle */
.orbit-digital .link { stroke: url(#og2); }
.t-moneydo { left: 50%; top: 18.5%; background: #000; animation-delay: -1s; }
.t-tree { left: 79.5%; top: 71%; background: #0b3d33; animation-delay: -3s; }
.t-mayam { left: 20.5%; top: 71%; background: linear-gradient(160deg, #f6f1e9, #e7dccb); animation-delay: -5s; }
.t-crop { display: block; background-repeat: no-repeat; }
.t-crop-md { width: 64px; height: 64px; background-image: url("portfolio/social/moneydo-grid-2.webp"); background-size: 361px auto; background-position: -248px -183px; }
.t-crop-tree { width: 90px; height: 36px; background-image: url("portfolio/social/tree-motor.jpg"); background-size: 1240px auto; background-position: -32px -13px; }
.t-mayam-word { font: 400 15px/1 Georgia, serif; letter-spacing: .3em; padding-left: .3em; color: #9a7b4f; }
.pf-hero.play .t-moneydo { animation-delay: .7s, -1s; }
.pf-hero.play .t-tree { animation-delay: .85s, -3s; }
.pf-hero.play .t-mayam { animation-delay: 1s, -5s; }

/* Digital & social gets its own warmer colour, so the two views feel different */
body[data-pf="digital"] #view-portfolio { --accent: #c0266d; --accent-soft: #fde7f1; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) body[data-pf="digital"] #view-portfolio { --accent: #f9a8d4; --accent-soft: #3a1730; }
}
:root[data-theme="dark"] body[data-pf="digital"] #view-portfolio { --accent: #f9a8d4; --accent-soft: #3a1730; }
body[data-pf="digital"] #view-portfolio .grad { background-image: linear-gradient(90deg, #f59e0b, #ec4899 50%, #8b5cf6); }
body[data-pf="digital"] .pf-pill { background: linear-gradient(120deg, #f59e0b, #ec4899 50%, #8b5cf6); box-shadow: 0 6px 18px rgba(236, 72, 153, .4); }
body[data-view="portfolio"][data-pf="digital"] .b1 { background: #ec4899; transform: translate(25vmax, 0); opacity: .14; }
body[data-view="portfolio"][data-pf="digital"] .b2 { background: #f59e0b; transform: translate(-10vmax, -15vmax); opacity: .12; }
body[data-pf="digital"] .orbit-digital .orbit-core { background: radial-gradient(circle, rgba(236, 72, 153, .28), transparent 70%); }
body[data-pf="digital"] .orbit-digital .orbit-core::before { border-color: rgba(236, 72, 153, .45); }
#view-portfolio .project-meta, #view-portfolio .tags li, #view-portfolio .pf-index a span { transition: color .5s ease, background-color .5s ease; }
.pf-switch {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 5px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .12);
}
.pf-switch button {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  border: 0;
  background: none;
  font: 600 15px/1 var(--sans);
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
  transition: color .3s;
}
.pf-switch button[aria-selected="true"] { color: #fff; }
.pf-pill {
  position: absolute;
  top: 5px; bottom: 5px; left: 5px;
  width: calc(50% - 5px);
  border-radius: 999px;
  background: linear-gradient(120deg, #22d3ee, #3b82f6 50%, #a855f7);
  box-shadow: 0 6px 18px rgba(59, 130, 246, .4);
  transition: transform .5s cubic-bezier(.3, .7, .2, 1);
}
.pf-switch[data-active="digital"] .pf-pill { transform: translateX(100%); }
.projects[data-pf-panel] { padding-top: 48px; }

/* Digital marketing & social section */
.section-intro { margin: -14px 0 8px; color: var(--muted); max-width: 40em; }
.pf-index { border-top: 0; }
.pf-index-label {
  padding: 18px 4px 8px;
  font: 500 11px/1 "JetBrains Mono", Consolas, monospace;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
}
.pf-hero.play .pf-index li:nth-child(5) { animation-delay: .5s; }
.pf-hero.play .pf-index li:nth-child(6) { animation-delay: .56s; }
.pf-hero.play .pf-index li:nth-child(7) { animation-delay: .62s; }
.pf-hero.play .pf-index li:nth-child(8) { animation-delay: .68s; }
.pf-hero.play .pf-index li:nth-child(9) { animation-delay: .74s; }
.pf-index li:first-child.pf-index-label { padding-top: 0; }
/* clear gap before the second group (Digital & social) */
.pf-index li.pf-index-label:not(:first-child) { padding-top: 40px; }

/* MoneyDo: navy stage with three Instagram grids fanned out like the CMe phones */
.mdo-stage { background: linear-gradient(150deg, #13264f, #070f24 70%); }
.mdo-glow { position: absolute; inset: auto -10% -30% 30%; height: 80%; z-index: -1; background: radial-gradient(circle, rgba(56, 120, 255, .45), transparent 65%); }
.mdo-logo {
  position: absolute;
  top: 9%; left: 7%;
  z-index: 3;
  width: 52px; height: 52px;
  border-radius: 14px;
  background: #000 url("portfolio/social/moneydo-grid-2.webp") no-repeat;
  background-size: 293px auto;
  background-position: -201px -148px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .4);
}
/* the phone scrolls slowly down through the three post grids and back */
.ig-phone {
  position: absolute;
  right: 6%; top: 8%; bottom: 8%;
  aspect-ratio: 4 / 5;
  border-radius: 18px;
  overflow: hidden;
  background: #000;
  border: 3px solid #1d2433;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .5);
  transform: rotate(4deg);
  transition: transform .6s cubic-bezier(.2, .7, .2, 1);
}
.mdo-stage:is(:hover, .inview) .ig-phone { transform: rotate(0deg) translateY(-3%); }
.ig-bar { display: flex; align-items: center; gap: 6px; padding: 7px 9px; font: 600 9px/1 var(--sans); color: #fff; background: #000; }
.ig-bar i { width: 14px; height: 14px; border-radius: 50%; background: conic-gradient(#feda75, #fa7e1e, #d62976, #962fbf, #4f5bd5, #feda75); }
.ig-feed { position: relative; display: block; height: calc(100% - 28px); overflow: hidden; }
.ig-scroll { display: block; animation: feed-scroll 18s ease-in-out infinite; }
.ig-feed img { display: block; width: 100%; height: auto; aspect-ratio: auto; }
@keyframes feed-scroll { 0%, 8% { translate: 0 0; } 28%, 34% { translate: 0 -27%; } 52%, 60% { translate: 0 -54%; } 100% { translate: 0 0; } }
.ad-chips { position: absolute; left: 7%; top: 40%; display: grid; gap: 7px; }
.ad-chips b {
  justify-self: start;
  padding: 5px 11px;
  border-radius: 999px;
  font: 600 11px/1.2 var(--sans);
  color: #fff;
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .2);
  animation: chip-pulse 6s ease-in-out infinite;
}
.ad-chips b:nth-child(2) { animation-delay: 2s; }
.ad-chips b:nth-child(3) { animation-delay: 4s; }
@keyframes chip-pulse { 0%, 30%, 100% { background: rgba(255, 255, 255, .1); translate: 0 0; } 8%, 22% { background: #2f6bff; translate: 6px 0; } }
.mdo-chip { background: #fff; color: #0d1b3e; z-index: 3; }

/* Tree: green stage, the live page plus a search result showing the SEO angle */
.tree-stage { background: linear-gradient(150deg, #0e4a3c, #072a22 70%); }
.tree-leaf { position: absolute; left: -12%; top: -25%; width: 60%; aspect-ratio: 1; z-index: -1; border-radius: 0 60% 0 60%; background: rgba(61, 255, 197, .12); rotate: 20deg; }
.tree-browser { right: 5%; bottom: auto; top: 9%; width: 70%; }
.serp {
  position: absolute;
  left: 6%; bottom: 20%;
  width: 62%;
  display: grid;
  gap: 3px;
  padding: 11px 13px;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 16px 36px rgba(0, 0, 0, .4);
  font-family: Arial, var(--sans);
  animation: serp-rise 6s cubic-bezier(.2, .7, .2, 1) infinite;
}
@keyframes serp-rise { 0% { translate: 0 18px; opacity: 0; } 12%, 85% { translate: 0 0; opacity: 1; } 100% { translate: 0 -6px; opacity: 0; } }
.serp-q { display: flex; align-items: center; gap: 6px; padding: 4px 9px; margin-bottom: 4px; border-radius: 999px; border: 1px solid #dfe1e5; color: #3c4043; font-size: 10px; }
.serp-url { color: #202124; font-size: 9px; }
.serp-title { color: #1a0dab; font-size: 12.5px; font-weight: 500; }
.serp-desc { color: #4d5156; font-size: 9.5px; line-height: 1.35; }
.tree-chip { background: #3dffc5; color: #072a22; left: 6%; top: 9%; bottom: auto; }
.tree-browser { top: 18%; }

/* Mayam: warm cream stage, real posts, inquiry to appointment status bubbles */
.mayam-stage { background: linear-gradient(160deg, #f6f1e9, #e7dccb); }
.mayam-word { position: absolute; top: 7%; left: 7%; font: 400 22px/1 Georgia, serif; letter-spacing: .35em; color: #9a7b4f; }
.mayam-posts { position: absolute; left: 7%; right: 7%; top: 19%; border-radius: 12px; overflow: hidden; box-shadow: 0 16px 34px rgba(110, 82, 40, .25); }
.mayam-posts img { display: block; width: 100%; height: auto; }
.dm-stack { position: absolute; right: 7%; bottom: 7%; width: 50%; height: 28px; }
.dm {
  position: absolute;
  right: 0; bottom: 0;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 11px;
  border-radius: 14px 14px 4px 14px;
  background: #fff;
  color: #5b4630;
  font: 600 11px/1.2 var(--sans);
  box-shadow: 0 6px 14px rgba(110, 82, 40, .18);
  opacity: 0;
  animation: dm-step 6s ease-in-out infinite;
}
.dm i { width: 7px; height: 7px; border-radius: 50%; background: #c9a46a; }
.dm:nth-child(2) { animation-delay: 2s; }
.dm:nth-child(3) { animation-delay: 4s; }
/* one status at a time: inquiry, then booked, then follow-up */
@keyframes dm-step { 0%, 33%, 100% { opacity: 0; translate: 0 8px; } 5%, 28% { opacity: 1; translate: 0 0; } }
.mayam-chip { background: #9a7b4f; color: #fff; }
/* App showcase: three phone screens fanned out */
.app-stage {
  position: relative;
  display: block;
  aspect-ratio: 16 / 13;
  border-radius: 18px;
  overflow: hidden;
  background:
    radial-gradient(circle at 70% 110%, #111 0 30%, transparent 30.5%),
    linear-gradient(160deg, #f6c94a, #eea21b);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .22);
}
.app-stage .phone {
  position: absolute;
  bottom: -18%;
  left: 50%;
  width: 34%;
  border-radius: 14px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, .35);
  transition: transform .7s cubic-bezier(.2, .7, .2, 1);
}
.app-stage .p-mid { transform: translateX(-50%); z-index: 2; bottom: -10%; }
.app-stage .p-left { transform: translateX(-118%) rotate(-9deg); }
.app-stage .p-right { transform: translateX(18%) rotate(9deg); }
.app-stage:is(:hover, .inview) .p-mid { transform: translateX(-50%) translateY(-4%); }
.app-stage:is(:hover, .inview) .p-left { transform: translateX(-135%) rotate(-13deg) translateY(-2%); }
.app-stage:is(:hover, .inview) .p-right { transform: translateX(35%) rotate(13deg) translateY(-2%); }

.app-title { display: flex; align-items: center; gap: 12px; }
.app-title img { border-radius: 10px; box-shadow: 0 4px 12px rgba(0, 0, 0, .2); }
.project-links { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px 8px 13px;
  border-radius: 12px;
  background: #000;
  color: #fff;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, .18);
  transition: transform .2s, box-shadow .2s;
}
.store-badge:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(0, 0, 0, .3); }
.store-badge span { display: flex; flex-direction: column; font: 600 16px/1.05 var(--sans); }
.store-badge small { font-size: 10px; font-weight: 400; opacity: .85; }

.more-soon {
  margin-top: 12px;
  padding: 22px;
  border: 1px dashed var(--line);
  border-radius: 16px;
  text-align: center;
  color: var(--muted);
  font: 400 14px/1.4 "JetBrains Mono", Consolas, monospace;
}

.cta-portfolio {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 56px;
  padding: 22px 26px;
  border-radius: 18px;
  text-decoration: none;
  color: #f2f4f8;
  background: linear-gradient(115deg, #0b0f17, #172554 60%, #3b0764);
  border: 1px solid rgba(255, 255, 255, .08);
  transition: transform .25s ease, box-shadow .3s ease;
}
.cta-portfolio:hover { transform: translateY(-2px); box-shadow: 0 16px 40px rgba(59, 130, 246, .3); }
.cta-portfolio strong { color: #8fd3ff; white-space: nowrap; font-family: "Space Grotesk", var(--sans); }

.shot.wide { grid-column: span 2; }
.gallery { grid-auto-flow: dense; }
body[data-view="portfolio"] .b1 { background: #a855f7; transform: translate(25vmax, 0); opacity: .12; }
body[data-view="portfolio"] .b2 { background: #3b82f6; transform: translate(-10vmax, -15vmax); }

/* Page transition pieces */
.word { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .08em; margin-bottom: -.08em; }
.word > span { display: inline-block; }

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(10, 12, 15, .92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: fade .2s ease;
}
.lightbox figure { margin: 0; text-align: center; }
.lightbox img {
  max-width: min(90vw, 560px);
  max-height: 78vh;
  border-radius: 12px;
  display: block;
  margin: 0 auto;
}
.lightbox figcaption { color: #eceae4; margin-top: 12px; font-size: 15px; }
.lb-close, .lb-nav {
  position: absolute;
  border: 0;
  background: rgba(255, 255, 255, .12);
  color: #fff;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}
.lb-close { top: calc(16px + env(safe-area-inset-top, 0px)); right: calc(16px + env(safe-area-inset-right, 0px)); }
.lb-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 16px; top: 50%; transform: translateY(-50%); }

/* Footer: a dark closing band, the same in light and dark mode */
.site-footer {
  position: relative;
  margin-top: 120px;
  padding-top: 96px;
  background: #070a10;
  color: #eceae4;
  overflow: hidden;
  isolation: isolate;
}
.site-footer::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, #22d3ee 25%, #3b82f6 50%, #a855f7 75%, transparent);
  background-size: 200% 100%;
  animation: shine 6s linear infinite;
  box-shadow: 0 0 18px rgba(59, 130, 246, .6);
}
@keyframes shine { to { background-position: -200% 0; } }
.footer-glow {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(600px circle at 15% 0%, rgba(34, 211, 238, .16), transparent 60%),
    radial-gradient(700px circle at 90% 30%, rgba(168, 85, 247, .16), transparent 60%);
}
.footer-grid {
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(59, 130, 246, .07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(59, 130, 246, .07) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, #000, transparent 85%);
  -webkit-mask-image: linear-gradient(to bottom, #000, transparent 85%);
}
.footer-inner { position: relative; }
.footer-kicker {
  margin: 0 0 14px;
  font: 400 14px/1.4 "JetBrains Mono", Consolas, monospace;
  color: #8a93a3;
  letter-spacing: .06em;
}
.footer-title {
  margin: 0 0 28px;
  font: 700 clamp(40px, 7.5vw, 84px)/1.02 "Space Grotesk", var(--sans);
  letter-spacing: -0.03em;
  text-transform: none;
  color: #f2f4f8;
}
.footer-mail {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  font: 500 clamp(20px, 3.6vw, 34px)/1.2 "Space Grotesk", var(--sans);
  color: #eceae4;
  text-decoration: none;
  position: relative;
  padding-bottom: 6px;
  max-width: 100%;
}
.footer-mail > span:first-child { overflow-wrap: anywhere; }
.footer-mail::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, #22d3ee, #3b82f6, #a855f7);
  transform: scaleX(.25);
  transform-origin: left;
  transition: transform .5s cubic-bezier(.2, .7, .2, 1);
}
.footer-mail:hover::after { transform: scaleX(1); }
.footer-arrow {
  flex: none;
  display: grid;
  place-items: center;
  width: 1.6em;
  height: 1.6em;
  border-radius: 50%;
  font-size: .8em;
  background: linear-gradient(135deg, #22d3ee, #3b82f6, #a855f7);
  color: #fff;
  transition: transform .4s cubic-bezier(.2, .7, .2, 1);
}
.footer-mail:hover .footer-arrow { transform: translateX(6px) rotate(-45deg); }

.footer-links { display: flex; flex-wrap: wrap; gap: 10px; margin: 40px 0 72px; }
.social {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .12);
  background: rgba(255, 255, 255, .04);
  color: #d6dae2;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: border-color .2s, background-color .2s, transform .2s, color .2s;
}
.social:hover { border-color: #3b82f6; background: rgba(59, 130, 246, .14); color: #fff; transform: translateY(-2px); }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 0;
  border-top: 1px solid rgba(255, 255, 255, .08);
  font-size: 13px;
  color: #8a93a3;
}
.footer-brand { display: inline-flex; align-items: center; gap: 10px; }
.footer-loc { font-family: "JetBrains Mono", Consolas, monospace; letter-spacing: .04em; }
.to-top {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .14);
  background: rgba(255, 255, 255, .04);
  color: #eceae4;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform .25s, border-color .25s, background-color .25s;
}
.to-top:hover { transform: translateY(-3px); border-color: #3b82f6; background: rgba(59, 130, 246, .18); }

.footer-giant {
  margin: 0;
  text-align: center;
  font: 700 clamp(110px, 27vw, 360px)/.78 "Space Grotesk", var(--sans);
  letter-spacing: -0.04em;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(143, 184, 224, .28);
  background: linear-gradient(180deg, rgba(59, 130, 246, .22), rgba(168, 85, 247, .05) 70%);
  -webkit-background-clip: text;
  background-clip: text;
  user-select: none;
  pointer-events: none;
  transform: translateY(14%);
  transition: transform 1.4s cubic-bezier(.2, .7, .2, 1), opacity 1.4s ease;
}
.footer-giant.reveal { opacity: 0; transform: translateY(40%); }
.footer-giant.reveal.in { opacity: 1; transform: translateY(14%); }
.powered {
  position: absolute;
  left: 50%;
  bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  translate: -50% 0;
  z-index: 1;
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(7, 10, 16, .72);
  border: 1px solid rgba(255, 255, 255, .1);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font: 500 11.5px/1 "JetBrains Mono", Consolas, monospace;
  letter-spacing: .08em;
  text-transform: uppercase;
  white-space: nowrap;
  color: #8a93a3;
}
.home-powered {
  position: static;
  translate: none;
  display: flex;
  width: fit-content;
  margin: 40px auto 0;
}
.powered b {
  font-weight: 700;
  background: linear-gradient(90deg, #22d3ee, #3b82f6 50%, #a855f7);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Phone */
@media (max-width: 720px) {
  body { font-size: 16px; }
  .wrap, .hero { padding-left: 16px; padding-right: 16px; }
  .topbar-inner { padding: 8px max(16px, env(safe-area-inset-right, 0px)) 8px max(16px, env(safe-area-inset-left, 0px)); }
  .site-footer .footer-bottom { padding-bottom: calc(22px + env(safe-area-inset-bottom, 0px)); }
  .switch button { padding: 7px 10px; font-size: 13px; }
  .brand-text { display: none; }
  .doors { grid-template-columns: 1fr; gap: 14px; }
  .mini { width: 50px; height: 50px; border-radius: 14px; }
  .door-floaters { left: 22%; top: -6%; height: 62%; }
  .cl-stamp { font-size: 11px; }
  .pf-switch button { padding: 10px 14px; font-size: 13.5px; gap: 6px; }
  .pf-switch-wrap { padding-top: 18px; }
  .t-crop-md { width: 48px; height: 48px; background-size: 271px auto; background-position: -186px -137px; }
  .t-crop-tree { width: 64px; height: 26px; background-size: 880px auto; background-position: -23px -10px; }
  .t-mayam-word { font-size: 11px; }
  .ad-chips b { font-size: 9.5px; padding: 4px 8px; }
  .serp { width: 70%; padding: 8px 10px; }
  .serp-title { font-size: 10.5px; }
  .serp-desc { display: none; }
  .mayam-word { font-size: 15px; }
  .dm { font-size: 9.5px; padding: 4px 8px; }
  .gw-flow { width: 54%; gap: 6px; }
  .gw-step { padding: 6px 9px; font-size: 11px; gap: 7px; }
  .gw-step b { width: 19px; height: 19px; font-size: 10px; }
  .gw-step + .gw-step::before { left: 18px; top: -7px; height: 7px; }
  .door { min-height: 220px; padding: 22px; }
  .door-title { font-size: 28px; margin-top: 18px; }
  .home-title { margin-bottom: 28px; }
  .home-inner { padding-top: 32px; padding-bottom: 40px; }
  .hero { padding-top: 40px; padding-bottom: 40px; }
  .stats.wrap { grid-template-columns: 1fr 1fr; margin: 0 16px; padding: 0; }
  .stats div { padding: 18px 16px; }
  .stats strong { font-size: 24px; }
  .block { padding-top: 56px; }
  .timeline > li { grid-template-columns: 1fr; gap: 8px; }
  .meta { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
  .edu-list { padding-left: 64px; }
  .edu-list::before { left: 22px; top: 22px; bottom: 22px; }
  .edu-logo { left: -64px; width: 46px; height: 46px; padding: 5px; }
  .co-badge { flex: 0 0 auto; width: 68px; height: 68px; margin: 10px calc(100% - 68px) 2px 0; border-radius: 17px; }
  .edu { flex-direction: column; gap: 4px; }
  h3 small { display: block; margin-left: 0; }
  .interests { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: 1fr 1fr; grid-auto-rows: 170px; gap: 8px; }
    .shot::after { opacity: 1; }
  .pf-hero { grid-template-columns: 1fr; min-height: 0; padding-top: 32px; gap: 8px; }
  .orbit { width: min(100%, 340px); order: -1; }
  .tile { border-radius: 18px; }
  .project { grid-template-columns: 1fr; gap: 20px; padding: 28px 0; }
  .project:nth-of-type(even) > :first-child { order: 0; }
  .project-body h3 { font-size: 22px; }
  .cta-portfolio { flex-direction: column; align-items: flex-start; }
  .switch button { padding: 7px 8px; font-size: 12.5px; }
  .site-footer { margin-top: 88px; padding-top: 64px; }
  .footer-links { margin: 28px 0 48px; }
  .footer-bottom { flex-wrap: wrap; }
  .footer-loc { order: 3; width: 100%; }
  .about { grid-template-columns: 1fr; grid-template-rows: auto; }
  .about h2 { grid-row: auto; order: -1; }
  .about-photo { grid-column: 1; grid-row: auto; min-height: 0; aspect-ratio: 1 / 1; margin-bottom: 24px; }
  .about .prose { grid-column: 1; grid-row: auto; }
  .lb-nav { top: auto; bottom: 20px; transform: none; }
}
