/* Homepage (Blue Pill v2). Values from design_handoff_portfolio_v2. */
:root {
  --black: #000;
  --ink: #1d1d1f;
  --grey-bg: #f5f5f7;
  --white: #fff;
  --text-2: #424245;
  --text-3: #6e6e73;
  --text-4: #86868b;
  --on-dark: #f5f5f7;
  --on-dark-2: #a1a1a6;
  --line-dark: rgba(255, 255, 255, .07);
  --pill-line: rgba(255, 255, 255, .14);
  --link: #0066cc;
  --link-dark: #2997ff;
  --link-dark-hover: #4aa8ff;
  --button: #0071e3;
  --button-hover: #0077ed;
  --matrix: #34e87a;
  --matrix-hover: #5dff96;
  --gizmo: #f5a524;
  --gizmo-hover: #ffb84a;
  --gizmo-text: #b45f00;
  --gizmo-text-hover: #8a4800;
  --wip: #b64400;
  --ease-out: cubic-bezier(.22, 1, .36, 1);
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--black); color: var(--on-dark); font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Inter Tight", "Helvetica Neue", sans-serif; -webkit-font-smoothing: antialiased; }
html { scroll-padding-top: 48px; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--link-dark-hover); }
h1, h2, h3, p { margin: 0; }
::selection { background: rgba(41, 151, 255, .3); }
:focus-visible { outline: 2px solid var(--link-dark); outline-offset: 3px; border-radius: 4px; }
.page { min-height: 100vh; background: var(--black); overflow-x: clip; }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

@keyframes bpMarquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes bpHands { 0% { transform: rotate(0); } 50% { transform: rotate(.6deg) translateY(.5px); } 100% { transform: rotate(-.9deg) translateY(-1.2px); } }
@keyframes bpDraw { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-1.3deg) translate(-1px, .6px); } 50% { transform: rotate(.5deg) translate(.7px, -.4px); } 75% { transform: rotate(-.9deg) translate(-.6px, .3px); } }
@keyframes bpFlicker { 0%, 100% { opacity: .55; } 8% { opacity: .85; } 10% { opacity: .4; } 52% { opacity: .8; } 54% { opacity: .5; } }
@keyframes bpGlitch { 0%, 41%, 47%, 87%, 93%, 100% { text-shadow: 0 0 6px rgba(52, 232, 122, .5); transform: none; } 43% { text-shadow: -2px 0 rgba(93, 255, 150, .75), 2px 0 rgba(20, 150, 80, .6); transform: translate(1px, -1px) skewX(-8deg); } 45% { text-shadow: 2px 0 rgba(93, 255, 150, .75), -2px 0 rgba(20, 150, 80, .6); transform: translate(-1px, 1px) skewX(4deg); } 89% { transform: translate(-1px, 0) skewX(6deg); } }

/* Buttons */
.btn { display: inline-block; white-space: nowrap; padding: 13px 24px; border-radius: 999px; font-weight: 500; font-size: 17px; letter-spacing: -.01em; }
.btn-solid { background: var(--button); color: var(--white); }
.btn-solid:hover { background: var(--button-hover); color: var(--white); }
.btn-outline { border: 1px solid var(--link-dark); color: var(--link-dark); }
.btn-outline:hover { background: rgba(41, 151, 255, .1); color: var(--link-dark-hover); }
.btn-outline-alt:hover { background: none; border-color: var(--white); color: var(--white); }

/* Section labels */
.label { font-size: clamp(17px, 1.6vw, 21px); font-weight: 600; letter-spacing: -.01em; color: var(--link-dark); }
.h2 { font-size: clamp(32px, 4vw, 52px); line-height: 1; font-weight: 600; letter-spacing: -.03em; color: var(--on-dark); }

/* Nav */
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 60; height: 48px; display: flex; align-items: center; justify-content: center; background: rgba(22, 22, 23, .8); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); border-bottom: 1px solid rgba(255, 255, 255, .06); }
.nav-inner { width: 100%; max-width: 1024px; padding: 0 22px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.nav-name { font-size: 15px; font-weight: 600; letter-spacing: -.01em; color: var(--on-dark); white-space: nowrap; }
.nav-links { display: none; position: absolute; top: 48px; left: 0; right: 0; flex-direction: column; padding: 8px 22px 16px; background: #161617; border-bottom: 1px solid rgba(255, 255, 255, .1); }
.nav.is-open .nav-links { display: flex; }
.nav-links > a { display: flex; align-items: center; min-height: 48px; font-size: 17px; color: #d2d2d7; }
.nav-links a:hover { color: var(--white); }
.nav-links-social { display: none; gap: 4px; margin: 8px 0 0 -10px; }
.nav-toggle { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; width: 44px; height: 44px; margin: 0 -10px 0 2px; padding: 0; border: 0; background: none; color: #d2d2d7; cursor: pointer; }
.nav-toggle:hover { color: var(--white); }
.nav-toggle span { width: 18px; height: 1.5px; background: currentColor; transition: transform 150ms ease-out; }
.nav.is-open .nav-toggle span:first-child { transform: translateY(3.75px) rotate(45deg); }
.nav.is-open .nav-toggle span:last-child { transform: translateY(-3.75px) rotate(-45deg); }
.no-fade, .no-fade * { transition: none !important; }
.nav-right { display: flex; align-items: center; gap: 4px; }
.nav-icon { display: flex; align-items: center; justify-content: center; width: 36px; height: 44px; color: #d2d2d7; transition: color 150ms ease-out; }
.nav-icon:hover { color: var(--white); }
.nav-right .nav-matrix { margin-left: 8px; }
@media (max-width: 480px) {
  .nav-right > .nav-icon { display: none; }
  .nav-links-social { display: flex; }
  .nav-links-social .nav-icon { width: 44px; }
}
.nav-matrix { font-size: 12.5px; font-weight: 600; color: var(--matrix); white-space: nowrap; display: inline-block; animation: bpGlitch 3.6s linear infinite; }
.nav-matrix:hover { color: var(--matrix-hover); }
@media (min-width: 1025px) {
  .nav-links { position: static; display: flex; flex-direction: row; align-items: center; gap: 30px; padding: 0; background: none; border: 0; }
  .nav-links > a { min-height: 0; font-size: 12.5px; }
  .nav-links-social, .nav-toggle { display: none; }
}

/* Hero */
.hero { position: relative; padding: clamp(130px, 18vh, 190px) 20px clamp(80px, 12vh, 140px); overflow: hidden; }
.hero-glow { position: absolute; left: 50%; top: 58%; width: min(1400px, 140vw); height: 900px; transform: translate(-50%, -50%); pointer-events: none; background: radial-gradient(50% 50% at 50% 50%, rgba(41, 151, 255, .16), rgba(142, 124, 255, .08) 45%, rgba(0, 0, 0, 0) 72%); }
.hero-text { position: relative; max-width: 980px; margin: 0 auto; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 26px; }
.hero h1 { font-size: clamp(38px, 5.4vw, 80px); line-height: 1.04; font-weight: 600; letter-spacing: -.04em; text-wrap: balance; }
.hero-hi { background: linear-gradient(92deg, #2997ff 0%, #8e7cff 55%, #d36bff 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-sub { max-width: 620px; font-size: clamp(17px, 1.7vw, 21px); line-height: 1.5; color: var(--on-dark-2); text-wrap: pretty; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }

/* Device stage */
.stage { position: relative; max-width: 1180px; margin: clamp(24px, 4vh, 48px) auto 0; transform-origin: 50% 0; will-change: transform; }
.stage-link { display: block; position: relative; aspect-ratio: 16 / 8; overflow: hidden; }
.slide { position: absolute; inset: 0; opacity: 0; transition: opacity .9s ease; pointer-events: none; }
.slide.is-on { opacity: 1; }
.slide-text { position: absolute; left: 2%; top: 8%; max-width: 34%; display: flex; flex-direction: column; gap: 10px; transform: translateY(18px); opacity: 0; transition: transform 1s var(--ease-out), opacity 1s ease; }
.slide.is-on .slide-text { transform: none; opacity: 1; }
.slide-title { font-size: clamp(28px, 5.6vw, 76px); line-height: .95; font-weight: 700; letter-spacing: -.04em; color: var(--white); }
.slide-ind { display: flex; align-items: center; gap: 10px; font-size: clamp(13px, 1.5vw, 20px); color: rgba(255, 255, 255, .72); }
.slide-rule { flex: none; width: 22px; height: 2px; background: var(--hi); }
.slide img { position: absolute; height: auto; }
.slide-laptop { right: 3%; bottom: 6%; width: 60%; transform: translateY(10%) scale(.95); transition: transform 1.1s var(--ease-out); }
.slide-laptop.has-phone { right: 11%; width: 56%; }
.slide.is-on .slide-laptop { transform: none; }
.slide-phone { right: 4%; bottom: 3%; width: 14%; transform: translateY(40%) rotate(10deg); transition: transform 1.2s var(--ease-out) .15s; }
.slide.is-on .slide-phone { transform: rotate(4deg); }
.fan { width: 17%; transition: transform 1.2s var(--ease-out); }
.fan-1 { right: 38%; bottom: 6%; transform: translateY(45%) rotate(-16deg); }
.fan-2 { right: 21%; bottom: 11%; transform: translateY(45%) rotate(-6deg); transition-delay: .1s; }
.fan-3 { right: 4%; bottom: 16%; transform: translateY(45%) rotate(8deg); transition-delay: .2s; }
.slide.is-on .fan-1 { transform: rotate(-8deg); }
.slide.is-on .fan-2 { transform: rotate(-3deg); }
.slide.is-on .fan-3 { transform: rotate(4deg); }

/* Intro */
.intro { padding: clamp(80px, 14vh, 160px) 24px clamp(60px, 9vh, 100px); border-top: 1px solid var(--line-dark); }
.intro-text { max-width: 1000px; margin: 0 auto; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 22px; }
.intro-kicker { font-size: clamp(17px, 1.6vw, 21px); font-weight: 600; letter-spacing: -.01em; color: var(--text-4); }
.intro-big { font-size: clamp(28px, 4vw, 54px); line-height: 1.12; font-weight: 500; letter-spacing: -.028em; text-wrap: balance; }
.intro-big .intro-two { color: var(--text-4); }
.intro-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin-top: 16px; }
.trusted { margin-top: clamp(70px, 10vh, 110px); display: flex; flex-direction: column; gap: 22px; align-items: center; }
.trusted-label { font-size: 12.5px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--text-4); }
.marquee { width: 100%; 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); }
.marquee-track { display: flex; width: max-content; animation: bpMarquee 38s linear infinite; }
.marquee-set { display: flex; align-items: center; gap: clamp(48px, 6vw, 96px); padding-right: clamp(48px, 6vw, 96px); font-size: clamp(24px, 2.6vw, 36px); font-weight: 700; letter-spacing: -.02em; color: #d2d2d7; white-space: nowrap; }

/* Work */
.work { padding: clamp(80px, 12vh, 140px) clamp(12px, 2vw, 24px); background: var(--grey-bg); color: var(--ink); }
.work-inner { max-width: 1280px; margin: 0 auto; }
.work-head { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px; margin: 0 auto clamp(44px, 7vh, 72px); max-width: 1100px; padding: 0 12px; }
.work-label { font-size: clamp(17px, 1.6vw, 21px); font-weight: 600; letter-spacing: -.01em; color: var(--link); }
.work-h2 { font-size: clamp(40px, 5.6vw, 80px); line-height: 1.02; font-weight: 600; letter-spacing: -.04em; }
.work-sub { margin-top: 6px; font-size: clamp(15px, 1.45vw, 19px); line-height: 1.45; color: var(--text-2); text-wrap: balance; }
.work-nda { font-size: 13px; line-height: 1.5; color: var(--text-3); }
.work-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 500px), 1fr)); gap: 16px; }
.card { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; background: var(--white); border-radius: 28px; overflow: hidden; padding: clamp(36px, 4vw, 56px) clamp(24px, 3vw, 48px) clamp(24px, 3vw, 40px); color: var(--ink); transition: transform .5s var(--ease-out), box-shadow .5s; }
.card:hover { transform: translateY(-4px); box-shadow: 0 20px 50px rgba(0, 0, 0, .08); color: var(--ink); }
.card-wip { position: absolute; top: 18px; left: 28px; line-height: 24px; font-size: 14px; font-weight: 600; color: var(--wip); }
.card-ind { font-size: 14px; font-weight: 600; color: var(--text-3); }
.card h3 { margin-top: 8px; font-size: clamp(32px, 3.4vw, 44px); line-height: 1.08; font-weight: 600; letter-spacing: -.03em; }
.card-sub { margin-top: 8px; font-size: 17px; font-weight: 600; color: var(--text-3); }
.card-p { margin-top: 12px; max-width: 460px; font-size: 17px; line-height: 1.47; color: var(--text-2); text-wrap: pretty; }
.card-more { margin-top: 16px; margin-bottom: clamp(28px, 3vw, 40px); font-size: 17px; color: var(--link); }
.card-wrap { position: relative; display: flex; transition: transform .5s var(--ease-out); }
.card-wrap .card { flex: 1; min-width: 0; }
.card-wrap:hover { transform: translateY(-4px); }
.card-wrap .card:hover { transform: none; }
.card-wrap:hover .card { box-shadow: 0 20px 50px rgba(0, 0, 0, .08); }
.card-chips { position: absolute; top: 18px; right: 18px; display: flex; gap: 6px; }
.card-chips a { position: relative; padding: 5px 10px; border-radius: 999px; background: var(--ink); color: var(--white); font-size: 11.5px; font-weight: 600; letter-spacing: .01em; white-space: nowrap; }
.card-chips a::after { content: ""; position: absolute; inset: -10px -3px; }
.card-chips a:hover { background: var(--text-2); color: var(--white); }
.card-chips a, .chip-disabled { display: inline-flex; align-items: center; gap: 5px; }
@media (max-width: 560px) { .card-wrap .card, .card:has(.card-wip) { padding-top: 64px; } }
.chip-icon { width: 12px; height: 12px; flex: none; }
.chip-disabled { padding: 5px 10px; border-radius: 999px; background: var(--text-3); color: var(--white); font-size: 11.5px; font-weight: 600; cursor: not-allowed; }
.shot { margin-top: auto; width: 100%; }
.shot-laptop { position: relative; display: flex; justify-content: center; padding: 0 2%; }
.shot-laptop img:first-child { width: 100%; height: auto; display: block; }
.shot-laptop .shot-phone { position: absolute; right: 0; bottom: -2%; width: 22%; height: auto; }
.shot-fan { display: flex; justify-content: center; align-items: flex-end; padding: 0 4%; }
.shot-fan img { height: auto; width: 30%; }
.shot-fan img:nth-child(1) { margin-right: -6%; transform: translateY(-4%) rotate(-4deg); }
.shot-fan img:nth-child(2) { position: relative; z-index: 2; width: 36%; }
.shot-fan img:nth-child(3) { margin-left: -6%; transform: translateY(-4%) rotate(4deg); }
.shot-four { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: clamp(16px, 2vw, 28px); align-items: end; }
.shot-pair { position: relative; }
.shot-pair img:first-child { width: 100%; height: auto; display: block; }
.shot-pair .shot-phone { position: absolute; right: -2%; bottom: -4%; width: 26%; height: auto; }
.shot-pair .shot-tablet { position: absolute; right: -3%; bottom: -4%; width: 36%; height: auto; }

/* Gizmo */
.gizmo { padding: clamp(80px, 12vh, 140px) 24px; background: var(--white); color: var(--ink); }
.gizmo-inner { max-width: 1240px; margin: 0 auto; display: flex; flex-direction: column; gap: clamp(40px, 6vh, 64px); }
.gizmo-top { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 32px clamp(40px, 6vw, 96px); align-items: start; }
.gizmo-title, .gizmo-copy { display: flex; flex-direction: column; }
.gizmo-title { gap: 16px; }
.gizmo-copy { gap: 22px; }
.gizmo-label { font-size: clamp(17px, 1.6vw, 21px); font-weight: 600; letter-spacing: -.01em; color: var(--gizmo-text); }
.gizmo h2 { font-size: clamp(48px, 7vw, 96px); line-height: 1; font-weight: 600; letter-spacing: -.04em; }
.gizmo-tag { font-size: clamp(22px, 2.4vw, 30px); line-height: 1.2; font-weight: 500; letter-spacing: -.02em; }
.gizmo-p { font-size: clamp(16px, 1.5vw, 18px); line-height: 1.6; color: var(--text-3); text-wrap: pretty; }
.gizmo-actions { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.btn-gizmo { background: var(--gizmo); color: var(--black); }
.btn-gizmo:hover { background: var(--gizmo-hover); color: var(--black); }
.gizmo-link { font-size: 17px; color: var(--gizmo-text); }
.gizmo-link:hover { color: var(--gizmo-text-hover); }
.gizmo-shot { width: 100%; height: auto; display: block; }

/* About */
.about, .skills, .services { border-top: 1px solid var(--line-dark); }
.about { padding: clamp(80px, 12vh, 140px) 24px; }
.about-inner { max-width: 1240px; margin: 0 auto; display: flex; flex-direction: column; gap: clamp(28px, 4vw, 40px); }
.about-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: clamp(28px, 4vw, 40px); }
.about-row-2 { margin-top: clamp(40px, 6vh, 80px); }
.about-art { border-radius: 28px; padding: clamp(28px, 4vw, 48px); display: flex; flex-direction: column; justify-content: space-between; gap: 32px; min-height: 420px; }
.about-head { display: flex; flex-direction: column; gap: 12px; }
.label-personal { color: #c49be6; }
.art { position: relative; width: min(300px, 80%); align-self: center; }
.art > img { width: 100%; height: auto; display: block; }
.art-hand { position: absolute; left: 42.26%; top: 50.64%; width: 10.77%; height: 9.17%; background: url("assets/desk-hand.png") center / 100% 100% no-repeat; transform-origin: 15% 85%; image-rendering: pixelated; animation: bpDraw 1.7s ease-in-out infinite; pointer-events: none; }
.art-screen { position: absolute; left: 35.49%; top: 27.51%; width: 43.46%; height: 26.71%; overflow: hidden; pointer-events: none; }
.art-screen div { position: absolute; inset: 0; background: radial-gradient(120% 90% at 60% 45%, rgba(120, 200, 255, .22), rgba(120, 200, 255, 0) 60%); mix-blend-mode: screen; animation: bpFlicker 3.2s ease-in-out infinite; }
.art-arms { position: absolute; left: 43.06%; top: 58.85%; width: 16.75%; height: 13.96%; background: url("assets/gaming-arms.png") center / 100% 100% no-repeat; transform-origin: 12% 40%; image-rendering: pixelated; animation: bpHands .85s ease-in-out infinite alternate; pointer-events: none; }
.about-copy { display: flex; flex-direction: column; gap: 20px; padding: clamp(8px, 2vw, 24px) 0; font-size: clamp(16px, 1.5vw, 18px); line-height: 1.7; color: var(--on-dark-2); }
.about-copy p { text-wrap: pretty; }
.about-lead { font-size: clamp(22px, 2.4vw, 30px); line-height: 1.25; font-weight: 600; color: var(--on-dark); letter-spacing: -.02em; }
.about-mid { margin-top: 8px; font-size: clamp(18px, 1.8vw, 21px); font-weight: 600; color: var(--on-dark); letter-spacing: -.012em; }
.about-copy p a { color: var(--link-dark); font-weight: 600; }
.about-copy em { color: var(--on-dark); }
.about-copy strong { color: var(--on-dark); font-weight: 600; }

/* Capabilities */
.skills { padding: clamp(70px, 10vh, 120px) 24px; }
.skills-inner { max-width: 1240px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 32px 60px; align-items: start; }
.skills-head { display: flex; flex-direction: column; gap: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { padding: 11px 18px; border-radius: 999px; border: 1px solid var(--pill-line); font-size: 15px; font-weight: 500; }
.chip:hover { border-color: var(--link-dark); color: var(--link-dark-hover); }
.chip-tool { border: none; background: rgba(255, 255, 255, .06); color: var(--on-dark-2); }
.chip-tool:hover { color: var(--on-dark-2); }

/* Work with me */
.services { padding: clamp(80px, 12vh, 140px) 24px; }
.services-inner { max-width: 1240px; margin: 0 auto; display: flex; flex-direction: column; gap: clamp(40px, 6vh, 64px); }
.services-head { display: flex; flex-direction: column; gap: 18px; max-width: 860px; }
.services-head h2 { font-size: clamp(32px, 4.4vw, 58px); line-height: 1.04; font-weight: 600; letter-spacing: -.03em; text-wrap: balance; }
.services-p { font-size: clamp(16px, 1.5vw, 18px); line-height: 1.65; color: var(--on-dark-2); max-width: 700px; text-wrap: pretty; }
.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 16px; }
.service { padding: clamp(26px, 3vw, 36px); border-radius: 24px; background: #161617; border: 1px solid var(--line-dark); display: flex; flex-direction: column; gap: 14px; min-height: 260px; }
.service:hover { border-color: rgba(41, 151, 255, .5); }
.service-n { font-size: 15px; font-weight: 600; color: var(--link-dark); }
.service h3 { margin-top: auto; font-size: 22px; font-weight: 700; letter-spacing: -.02em; }
.service p { font-size: 15px; line-height: 1.58; color: var(--on-dark-2); }

/* Contact */
.contact { padding: clamp(100px, 16vh, 180px) 24px; border-top: 1px solid var(--line-dark); background: radial-gradient(70% 60% at 50% 100%, rgba(41, 151, 255, .12), rgba(8, 9, 11, 0) 70%); }
.contact-inner { max-width: 1240px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; text-align: center; gap: clamp(40px, 6vh, 64px); }
.contact-head { display: flex; flex-direction: column; gap: 18px; align-items: center; }
.contact h2 { font-size: clamp(44px, 8vw, 120px); line-height: .95; font-weight: 700; letter-spacing: -.045em; text-wrap: balance; }
.contact-sub { margin-top: 6px; font-size: clamp(18px, 2vw, 24px); color: var(--on-dark-2); }
.btn-start { padding: 18px 32px; font-size: 19px; border: none; font-family: inherit; cursor: pointer; }
.contact-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.contact-links a { padding: 12px 20px; border-radius: 999px; border: 1px solid var(--pill-line); font-size: 15px; font-weight: 600; }
.contact-links a:hover { border-color: var(--white); color: var(--white); }

/* Footer */
.footer { border-top: 1px solid var(--line-dark); padding: 32px 24px 40px; }
.footer-inner { max-width: 1240px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.footer-copy { font-size: 13.5px; color: var(--text-4); }
.footer-matrix { display: inline-flex; align-items: center; gap: 9px; font-size: 13.5px; font-weight: 600; color: var(--on-dark-2); padding: 9px 15px; border-radius: 999px; border: 1px solid var(--pill-line); }
.footer-matrix:hover { color: var(--matrix-hover); border-color: var(--matrix); }
.footer-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--matrix); box-shadow: 0 0 10px rgba(52, 232, 122, .7); }

/* Password gate (behaviour in gate.js) */
.gate-overlay { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; padding: 24px; background: rgba(0, 0, 0, .6); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); opacity: 0; pointer-events: none; transition: opacity .24s ease; }
.gate-overlay[hidden] { display: none; }
.gate-overlay.open { opacity: 1; pointer-events: auto; }
.gate-card { position: relative; width: 100%; max-width: 400px; background: #131418; border: 1px solid rgba(255, 255, 255, .1); border-radius: 22px; padding: 30px 28px 26px; box-shadow: 0 30px 80px rgba(0, 0, 0, .6); display: flex; flex-direction: column; gap: 8px; }
.gate-card.shake { animation: gate-shake .4s var(--ease-out); }
@keyframes gate-shake { 0%, 100% { transform: none; } 20% { transform: translateX(-7px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(3px); } }
.gate-x { position: absolute; top: 14px; right: 14px; width: 32px; height: 32px; border-radius: 999px; border: none; background: rgba(255, 255, 255, .06); color: var(--on-dark-2); font-size: 18px; cursor: pointer; }
.gate-card h2 { font-size: 20px; font-weight: 700; letter-spacing: -.02em; padding-right: 36px; }
.gate-sub { font-size: 14px; line-height: 1.5; color: var(--on-dark-2); }
.gate-form { margin-top: 14px; display: flex; flex-direction: column; gap: 10px; }
.gate-form[hidden], .gate-success[hidden] { display: none; }
.gate-input { width: 100%; padding: 13px 16px; font-size: 15px; font-family: inherit; color: var(--on-dark); background: #0b0c0f; border: 1px solid var(--pill-line); border-radius: 12px; }
.gate-input:focus { border-color: var(--link-dark); }
.gate-field { position: relative; width: 100%; }
.gate-field .gate-input { padding-right: 52px; }
.gate-eye { position: absolute; top: 50%; right: 2px; transform: translateY(-50%); width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; padding: 0; border: 0; border-radius: 10px; background: transparent; color: inherit; opacity: .7; cursor: pointer; }
.gate-eye:hover { opacity: 1; }
.gate-eye:focus-visible { opacity: 1; outline: 2px solid currentColor; outline-offset: -4px; }
.gate-input.err { border-color: #ff6b7a; }
.gate-err { min-height: 16px; font-size: 13px; color: #ff6b7a; }
.gate-submit, .gate-download { display: block; padding: 13px 18px; border-radius: 999px; border: none; background: var(--button); color: var(--white); font-weight: 500; font-size: 15px; font-family: inherit; cursor: pointer; text-align: center; }
.gate-download:hover { color: var(--white); }
.gate-success { display: flex; flex-direction: column; gap: 14px; }

/* Project inquiry form */
.inquiry-overlay { position: fixed; inset: 0; z-index: 200; display: flex; align-items: flex-start; justify-content: center; padding: 24px; overflow-y: auto; background: rgba(0, 0, 0, .6); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); opacity: 0; pointer-events: none; transition: opacity .24s ease; }
.inquiry-overlay[hidden] { display: none; }
.inquiry-overlay.open { opacity: 1; pointer-events: auto; }
.inquiry-card { position: relative; width: 100%; max-width: 560px; margin: auto; background: #131418; border: 1px solid rgba(255, 255, 255, .1); border-radius: 22px; padding: 30px 28px 26px; box-shadow: 0 30px 80px rgba(0, 0, 0, .6); }
.inquiry-card h2 { font-size: 20px; font-weight: 700; letter-spacing: -.02em; padding-right: 36px; }
.inquiry-intro { margin-top: 8px; font-size: 14px; line-height: 1.5; color: var(--on-dark-2); }
.inquiry-fields { margin-top: 20px; display: flex; flex-direction: column; gap: 14px; }
.inquiry-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 14px; }
.inquiry-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.inquiry-label { font-size: 13px; font-weight: 500; color: var(--on-dark-2); }
.inquiry-input, .inquiry-select, .inquiry-textarea { width: 100%; padding: 13px 16px; font-size: 15px; font-family: inherit; color: var(--on-dark); background: #0b0c0f; border: 1px solid var(--pill-line); border-radius: 12px; }
.inquiry-input:focus, .inquiry-select:focus, .inquiry-textarea:focus { border-color: var(--link-dark); }
.inquiry-textarea { min-height: 96px; resize: vertical; }
.inquiry-err { min-height: 16px; font-size: 13px; color: #ff6b7a; }
.inquiry-submit:disabled { opacity: .7; cursor: default; }
.inquiry-toast { position: fixed; left: 50%; bottom: 28px; z-index: 210; transform: translate(-50%, 20px); display: flex; align-items: center; gap: 8px; padding: 12px 20px; border-radius: 999px; background: var(--on-dark); color: var(--ink); font-size: 15px; font-weight: 500; box-shadow: 0 10px 30px rgba(0, 0, 0, .3); opacity: 0; pointer-events: none; transition: opacity .24s ease, transform .24s ease; }
.inquiry-toast.show { opacity: 1; transform: translate(-50%, 0); }
.inquiry-toast svg { width: 16px; height: 16px; }

@media (prefers-reduced-motion: reduce) {
  .nav-matrix, .marquee-track, .art-hand, .art-arms, .art-screen div { animation: none; }
  .marquee { overflow-x: auto; }
  .slide, .slide-text, .slide-laptop, .slide-phone, .fan, .card, .card-wrap, .inquiry-overlay, .inquiry-toast { transition: none; }
}
/* Shadows sit beside the images, never as a filter on them, so browsers keep the images at full resolution */
.shot-phone, .shot-fan img, .fan, .slide-phone { border-radius: 15% / 7.2%; box-shadow: 0 18px 36px rgba(0, 0, 0, .24); }
.shot-pair .shot-tablet { border-radius: 3%; box-shadow: 0 14px 28px rgba(0, 0, 0, .22); }
.shot-laptop::before, .shot-pair::before { content: ""; position: absolute; left: 6%; right: 6%; bottom: -3%; height: 12%; background: radial-gradient(closest-side, rgba(0, 0, 0, .22), transparent); }
.shot-laptop img:first-child, .shot-pair img:first-child { position: relative; }

/* Wide screens: two large cards in a row so the designs stay crisp */
@media (min-width: 1100px) {
  .work-inner { max-width: min(1760px, 100%); }
  .work-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stage { max-width: min(1680px, 92vw); }
  .shot-four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* arriving from the blue pill: the page glitches out of black */
html.wake-in body { animation: wake-twitch 0.5s steps(1) both; }
html.wake-in::after { content: ""; position: fixed; inset: 0; z-index: 300; background: #000; pointer-events: none; animation: wake-in 0.5s steps(1) forwards; }
html.wake-in::before { content: ""; position: fixed; inset: 0; z-index: 301; background: url("assets/glitch.svg") 0 0 / 100% 100%; pointer-events: none; animation: wake-snow 0.5s steps(1) forwards; }
@keyframes wake-in { 0% { opacity: 1; } 20% { opacity: 0.45; } 32% { opacity: 1; } 48% { opacity: 0.2; } 60% { opacity: 0.7; } 76% { opacity: 0.08; } 88%, 100% { opacity: 0; visibility: hidden; } }
@keyframes wake-snow { 0% { opacity: 1; background-position: 0 0; } 20% { opacity: 0.8; background-position: 0 52%; } 48% { opacity: 0.6; background-position: 0 23%; } 76% { opacity: 0; } 100% { opacity: 0; visibility: hidden; } }
@keyframes wake-twitch { 0% { transform: translateX(-2%); } 20% { transform: translateX(2.5%) skewX(-2deg); } 48% { transform: translateX(-1.5%); } 76% { transform: translateX(0.8%); } 88%, 100% { transform: none; } }
@media (prefers-reduced-motion: reduce) { html.wake-in body { animation: none; } html.wake-in::before, html.wake-in::after { display: none; } }

/* Work cards float in on scroll. Uses opacity and translate so the hover lift on transform keeps working */
.reveal-wait { opacity: 0; }
.reveal-in { animation: card-float-in 1.1s var(--ease-out) both; }
.reveal-in .shot { animation: shot-float-in 1.4s var(--ease-out) both; }
@keyframes card-float-in { from { opacity: 0; translate: 0 56px; } to { opacity: 1; translate: 0 0; } }
@keyframes shot-float-in { from { translate: 0 64px; } to { translate: 0 0; } }
@media (min-width: 1100px) {
  .work-grid > .reveal-in:nth-child(even), .work-grid > .reveal-in:nth-child(even) .shot { animation-delay: .14s; }
}

/* About copy writes itself in like enchanted ink, one letter at a time */
.wand-wait { opacity: 0; }
.wand-char { animation: wand-ink .75s ease-out both; animation-delay: var(--ink-delay); }
@keyframes wand-ink {
  0% { opacity: 0; color: #ffe9a8; text-shadow: 0 0 14px #ffc95c, 0 0 4px #fff3cf; }
  35% { opacity: 1; color: #ffe9a8; text-shadow: 0 0 10px #ffc95c; }
  100% { opacity: 1; text-shadow: 0 0 0 transparent; }
}

/* Capabilities and Work with me slide in from the sides */
.skills, .services { overflow-x: clip; }
.side-wait { opacity: 0; }
.side-left { animation: side-left 1s var(--ease-out) both; }
.side-right { animation: side-right 1s var(--ease-out) .12s both; }
@keyframes side-left { from { opacity: 0; translate: -64px 0; } to { opacity: 1; translate: 0 0; } }
@keyframes side-right { from { opacity: 0; translate: 64px 0; } to { opacity: 1; translate: 0 0; } }

/* Service cards get laid down one at a time */
.deal-wait { opacity: 0; }
.deal-in { animation: deal-down .8s var(--ease-out) both; transform-origin: 50% 100%; }
@keyframes deal-down {
  from { opacity: 0; transform: perspective(1100px) translateY(-36px) rotateX(38deg) rotate(-3deg) scale(1.06); }
  to { opacity: 1; transform: none; }
}
@media (min-width: 980px) {
  .services-grid > :nth-child(2) { animation-delay: .24s; }
  .services-grid > :nth-child(3) { animation-delay: .48s; }
}

/* Contact words ripple outward from the middle, with rings spreading behind them */
.contact { overflow: clip; isolation: isolate; }
.contact-head { position: relative; }
.contact-head::before, .contact-head::after {
  content: ""; position: absolute; left: 50%; top: 50%; z-index: -1; width: min(70vw, 560px); aspect-ratio: 1;
  margin: calc(min(70vw, 560px) / -2) 0 0 calc(min(70vw, 560px) / -2);
  border: 1px solid var(--link-dark); border-radius: 50%; opacity: 0; pointer-events: none;
}
.contact-head.is-rippling::before { animation: ripple-ring 7s ease-out infinite; }
.contact-head.is-rippling::after { animation: ripple-ring 7s ease-out .35s infinite; }
@keyframes ripple-ring {
  0% { opacity: 0; transform: scale(.15); }
  3% { opacity: .55; }
  24%, 100% { opacity: 0; transform: scale(2.3); }
}
.ripple-word { display: inline-block; white-space: nowrap; }
.ripple-char { display: inline-block; }
.is-rippling .ripple-char { animation: ripple-char 7s ease-out infinite; animation-delay: var(--ripple-delay); }
@keyframes ripple-char {
  0%, 8%, 100% { transform: none; }
  3% { transform: translateY(-.14em) scale(1.08); color: var(--link-dark); }
  5.5% { transform: translateY(.04em); }
}

/* Soft neon pixel stars in the open space above each illustration */
.about-art { position: relative; }
.about-art .about-head, .about-art .art { position: relative; z-index: 1; }
.art-stars { position: absolute; inset: 120px 0 0; overflow: hidden; pointer-events: none; }
.art-stars svg { position: absolute; width: 18px; height: 18px; color: #7cc4ff; opacity: .55; filter: drop-shadow(0 0 4px currentColor) drop-shadow(0 0 12px currentColor); animation: star-glow 3.6s ease-in-out infinite alternate; }
.art-stars svg:nth-child(1) { left: 12%; top: 14%; }
.art-stars svg:nth-child(2) { left: 34%; top: 56%; width: 27px; height: 27px; color: #c89bff; animation-delay: -1.1s; }
.art-stars svg:nth-child(3) { left: 58%; top: 20%; width: 14px; height: 14px; color: #ff9be0; animation-delay: -2.3s; animation-duration: 2.8s; }
.art-stars svg:nth-child(4) { left: 78%; top: 62%; color: #7cc4ff; animation-delay: -.6s; animation-duration: 4.2s; }
.art-stars svg:nth-child(5) { left: 88%; top: 16%; width: 27px; height: 27px; color: #c89bff; animation-delay: -3s; }
.art-stars svg:nth-child(6) { left: 6%; top: 74%; width: 14px; height: 14px; color: #ff9be0; animation-delay: -1.8s; animation-duration: 3s; }
.art-stars svg:nth-child(7) { left: 46%; top: 82%; width: 14px; height: 14px; color: #7cc4ff; animation-delay: -2.7s; animation-duration: 4.6s; }
.art-stars svg:nth-child(8) { left: 66%; top: 40%; width: 18px; height: 18px; color: #c89bff; animation-delay: -.3s; animation-duration: 2.6s; }
.about-row-2 .art-stars svg:nth-child(1) { left: 70%; top: 10%; }
.about-row-2 .art-stars svg:nth-child(2) { left: 18%; top: 34%; }
.about-row-2 .art-stars svg:nth-child(3) { left: 42%; top: 66%; }
.about-row-2 .art-stars svg:nth-child(4) { left: 8%; top: 76%; }
.about-row-2 .art-stars svg:nth-child(5) { left: 84%; top: 58%; }
.about-row-2 .art-stars svg:nth-child(6) { left: 52%; top: 14%; }
.about-row-2 .art-stars svg:nth-child(7) { left: 30%; top: 6%; }
.about-row-2 .art-stars svg:nth-child(8) { left: 64%; top: 80%; }
@keyframes star-glow {
  from { opacity: .3; transform: scale(.82); }
  to { opacity: .9; transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) { .art-stars svg { animation: none; } }


/* iPad and smaller: Personal reads like About, with the header and image before its text */
@media (max-width: 1024px) {
  .about-row-2 .about-art { order: -1; }
}

/* The two intro sentences take turns: one pops and glows while the other rests */
.turn-word { display: inline-block; }
.is-taking-turns .intro-one .turn-word { animation: turn-one 9s ease-in-out infinite; animation-delay: var(--turn-delay); }
.is-taking-turns .intro-two .turn-word { animation: turn-two 9s ease-in-out infinite; animation-delay: var(--turn-delay); }
@keyframes turn-one {
  0% { transform: none; text-shadow: 0 0 0 transparent; color: var(--on-dark); }
  7% { transform: translateY(-.05em) scale(1.03); text-shadow: 0 0 22px rgba(255, 255, 255, .6), 0 0 48px rgba(41, 151, 255, .5); color: var(--white); }
  15% { transform: none; text-shadow: 0 0 16px rgba(255, 255, 255, .4), 0 0 36px rgba(41, 151, 255, .3); color: var(--white); }
  24% { transform: none; text-shadow: 0 0 0 transparent; color: var(--on-dark); }
  31%, 47% { color: var(--text-4); }
  56%, 100% { transform: none; text-shadow: 0 0 0 transparent; color: var(--on-dark); }
}
@keyframes turn-two {
  0%, 26% { transform: none; text-shadow: 0 0 0 transparent; color: var(--text-4); }
  33% { transform: translateY(-.05em) scale(1.03); text-shadow: 0 0 22px rgba(255, 255, 255, .6), 0 0 48px rgba(41, 151, 255, .5); color: var(--white); }
  41% { transform: none; text-shadow: 0 0 16px rgba(255, 255, 255, .4), 0 0 36px rgba(41, 151, 255, .3); color: var(--white); }
  52%, 100% { transform: none; text-shadow: 0 0 0 transparent; color: var(--text-4); }
}

/* Hi, I'm Pauline does a stadium wave: each letter rises and glows in its own gradient color */
.wave-word { display: inline-block; white-space: nowrap; }
.wave-letter {
  display: inline-block; padding: 0 .08em .14em 0; margin: 0 -.08em -.14em 0;
  background-image: linear-gradient(92deg, #2997ff 0%, #8e7cff 55%, #d36bff 100%); background-repeat: no-repeat;
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-hi.is-waving { background: none; }
.hero-hi.is-waving .wave-letter { animation: letter-wave 5.5s ease-in-out infinite; animation-delay: var(--wave-delay); }
@keyframes letter-wave {
  0%, 11%, 100% { transform: none; filter: drop-shadow(0 0 .04em transparent); }
  4% { transform: translateY(-.2em); filter: drop-shadow(0 0 .2em var(--wave-glow)); }
  7% { transform: translateY(.02em); filter: drop-shadow(0 0 .1em var(--wave-glow)); }
}

/* Work with me: the heading comes in first, then the paragraph right after */
.services-p.side-left { animation-delay: .45s; }

/* Gizmo: the title ripples into dragon scales, and the dragons live beside it */
.gizmo-heading { display: flex; align-items: flex-end; gap: clamp(10px, 1.6vw, 24px); }
.scale-letter {
  display: inline-block; padding: 0 .08em .12em 0; margin: 0 -.08em -.12em 0;
  background: url("assets/gizmo-scales.svg") 0 0 / .26em .26em; -webkit-background-clip: text; background-clip: text;
}
.gizmo h2.is-scaling .scale-letter {
  animation: scale-in .9s ease-out var(--scale-delay) both, scale-sway 8s ease-in-out calc(var(--scale-delay) + 3s) infinite;
}
@keyframes scale-in {
  0% { color: var(--ink); transform: none; }
  30% { color: var(--ink); transform: translateY(-.14em) scale(1.08); }
  65% { color: transparent; transform: translateY(.02em); }
  100% { color: transparent; transform: none; }
}
@keyframes scale-sway {
  0%, 8%, 100% { transform: none; }
  3% { transform: translateY(-.09em) rotate(-2deg); }
  5.5% { transform: translateY(.015em) rotate(1deg); }
}
.gizmo-pets { flex: 1; min-width: 0; display: flex; align-items: flex-end; gap: clamp(0px, .4vw, 6px); padding-bottom: .4em; }
.gizmo-pet { flex: 1 1 0; min-width: 0; max-width: 92px; padding: 0; border: 0; background: none; cursor: pointer; line-height: 0; border-radius: 12px; }
.gizmo-pet img { width: 100%; height: auto; display: block; transform-origin: 50% 100%; user-select: none; }
.gizmo-pets.wait-in .gizmo-pet { opacity: 0; }
.gizmo-pets.is-in .gizmo-pet { animation: pet-in .7s cubic-bezier(.34, 1.56, .64, 1) both; }
.gizmo-pets.is-in .gizmo-pet:nth-child(2) { animation-delay: .14s; }
.gizmo-pets.is-in .gizmo-pet:nth-child(3) { animation-delay: .28s; }
.gizmo-pets.is-in .gizmo-pet:nth-child(4) { animation-delay: .42s; }
@keyframes pet-in { from { opacity: 0; transform: translateY(40px) scale(.5); } to { opacity: 1; transform: none; } }
.gizmo-pets.is-awake .pet-happy img { animation: pet-hop 5.2s ease-in-out infinite; }
.gizmo-pets.is-awake .pet-thinking img { animation: pet-ponder 5.2s ease-in-out .9s infinite; }
.gizmo-pets.is-awake .pet-alert img { animation: pet-hop 5.2s ease-in-out 1.8s infinite; }
.gizmo-pets.is-awake .pet-sleeping img { animation: pet-breathe 3.4s ease-in-out infinite; }
@keyframes pet-hop {
  0%, 16%, 100% { transform: none; }
  4% { transform: translateY(0) scale(1.08, .9); }
  9% { transform: translateY(-26%) scale(.96, 1.05); }
  13% { transform: translateY(0) scale(1.06, .94); }
}
@keyframes pet-ponder { 0%, 22%, 100% { transform: none; } 7% { transform: rotate(-8deg); } 15% { transform: rotate(6deg); } }
@keyframes pet-breathe { 0%, 100% { transform: scale(1, 1); } 50% { transform: scale(1.03, 1.07); } }
.gizmo-pets .gizmo-pet img.is-jumping { animation: pet-jump .75s cubic-bezier(.3, .7, .4, 1); }
@keyframes pet-jump {
  0% { transform: none; }
  15% { transform: scale(1.14, .82); }
  50% { transform: translateY(-62%) rotate(-12deg) scale(1.08); }
  80% { transform: scale(1.1, .88); }
  100% { transform: none; }
}

/* Each image has different empty space under the feet, so pull them onto one ground line */
.pet-happy img { margin-bottom: -4.7%; }
.pet-thinking img { margin-bottom: -3.1%; }
.pet-alert img { margin-bottom: -2.6%; }
.pet-sleeping img { margin-bottom: -9.4%; }
