/* ==========================================================================
   Tokens
   ========================================================================== */
:root {
  --ink: #060d17;
  --ink-soft: #0c1726;
  --paper: #eef3f9;
  --paper-muted: #9fb0c2;
  --line: rgba(180, 203, 224, .14);
  --lime: #c9ff5c;
  --accent: #c9ff5c;
  --cyan: #6be4ff;
  --coral: #ff8e74;
  --violet: #a796ff;

  --glass-bg: linear-gradient(145deg, rgba(255, 255, 255, .075), rgba(255, 255, 255, .02));
  --glass-solid: rgba(10, 21, 35, .62);
  --glass-border: rgba(255, 255, 255, .1);
  --glass-highlight: rgba(255, 255, 255, .16);
  --glass-shadow: 0 24px 60px -24px rgba(0, 0, 0, .7);
  --glass-blur: blur(18px) saturate(160%);
  --aurora-opacity: .5;
  --grid-opacity: .5;
  --spot: rgba(201, 255, 92, .12);

  --mono: 'DM Mono', ui-monospace, monospace;
  --sans: 'Manrope', system-ui, sans-serif;
  --gutter: clamp(1.25rem, 4vw, 5.5rem);
  --content: 1240px;
  --radius: 24px;
  --radius-sm: 14px;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
}

body[data-theme="light"] {
  --ink: #edf2f8;
  --ink-soft: #ffffff;
  --paper: #07111d;
  --paper-muted: #4d5e70;
  --line: rgba(7, 17, 29, .11);
  --lime: #b6ef3f;
  --accent: #4b8600;
  --cyan: #0788ad;
  --coral: #e2614b;
  --violet: #6a56d6;

  --glass-bg: linear-gradient(145deg, rgba(255, 255, 255, .78), rgba(255, 255, 255, .45));
  --glass-solid: rgba(255, 255, 255, .72);
  --glass-border: rgba(7, 17, 29, .08);
  --glass-highlight: rgba(255, 255, 255, .95);
  --glass-shadow: 0 24px 50px -28px rgba(20, 45, 80, .35);
  --aurora-opacity: .38;
  --grid-opacity: .35;
  --spot: rgba(75, 134, 0, .1);
}

/* ==========================================================================
   Base
   ========================================================================== */
* { box-sizing: border-box; }
html.lenis { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }
.lenis.lenis-scrolling iframe { pointer-events: none; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--ink); color: var(--paper); font-family: var(--sans); -webkit-font-smoothing: antialiased; overflow-x: hidden; transition: background-color .5s ease, color .5s ease; }
::selection { background: var(--lime); color: #07111d; }
a { color: inherit; text-decoration: none; }
button { color: inherit; font: inherit; }
img { max-width: 100%; }
h1, h2, h3, p { margin-top: 0; }
ul { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; border-radius: 6px; }

.section-shell { width: min(var(--content), calc(100% - (var(--gutter) * 2))); margin-inline: auto; }
.section-space { padding-top: clamp(7rem, 13vw, 11rem); }
main { position: relative; z-index: 1; overflow-x: clip; }

/* Glass primitive */
.glass {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  box-shadow: inset 0 1px 0 var(--glass-highlight), var(--glass-shadow);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}

/* ==========================================================================
   Ambient background
   ========================================================================== */
.bg-layers { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.bg-grid {
  position: absolute; inset: -2px; opacity: var(--grid-opacity);
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 20%, transparent 75%);
}
.aurora { position: absolute; border-radius: 50%; filter: blur(90px); opacity: var(--aurora-opacity); will-change: transform; }
.aurora-a { width: 46vw; height: 46vw; left: -12vw; top: -14vw; background: radial-gradient(circle, rgba(107, 228, 255, .55), transparent 65%); animation: drift-a 22s ease-in-out infinite alternate; }
.aurora-b { width: 40vw; height: 40vw; right: -10vw; top: 18vh; background: radial-gradient(circle, rgba(167, 150, 255, .5), transparent 65%); animation: drift-b 26s ease-in-out infinite alternate; }
.aurora-c { width: 34vw; height: 34vw; left: 30vw; top: 60vh; background: radial-gradient(circle, rgba(201, 255, 92, .32), transparent 65%); animation: drift-c 30s ease-in-out infinite alternate; }
@keyframes drift-a { to { transform: translate3d(14vw, 10vh, 0) scale(1.15); } }
@keyframes drift-b { to { transform: translate3d(-12vw, 22vh, 0) scale(.9); } }
@keyframes drift-c { to { transform: translate3d(-18vw, -24vh, 0) scale(1.2); } }
.cursor-glow { position: absolute; left: 0; top: 0; width: 560px; height: 560px; margin: -280px 0 0 -280px; border-radius: 50%; background: radial-gradient(circle, var(--spot), transparent 62%); opacity: 0; transition: opacity .6s ease; will-change: transform; }
.cursor-glow.is-active { opacity: 1; }
.site-noise { position: fixed; inset: 0; z-index: 60; pointer-events: none; opacity: .04; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.45'/%3E%3C/svg%3E"); }
body[data-theme="light"] .site-noise { opacity: .025; }
.scroll-progress { position: fixed; z-index: 70; left: 0; right: 0; top: 0; height: 2px; pointer-events: none; }
.scroll-progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--cyan), var(--lime), var(--violet)); transform: scaleX(0); transform-origin: left; box-shadow: 0 0 12px var(--lime); }

/* ==========================================================================
   Header
   ========================================================================== */
.site-header { position: fixed; z-index: 50; top: 14px; left: 0; right: 0; width: min(var(--content), calc(100% - (var(--gutter) * 2))); margin: 0 auto; transition: transform .45s var(--ease-out); }
.site-header.is-hidden { transform: translateY(-130%); }
.header-inner { height: 66px; padding: 0 .7rem 0 1.1rem; border-radius: 999px; display: flex; align-items: center; justify-content: space-between; position: relative; transition: background .4s ease; }
.brand { display: inline-flex; align-items: center; gap: .75rem; font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; font-weight: 800; }
.brand-mark { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 10px; color: #07111d; background: linear-gradient(135deg, var(--lime), var(--cyan)); font-size: 1rem; letter-spacing: 0; transform: rotate(-7deg); box-shadow: 0 6px 22px -6px var(--lime); transition: transform .4s var(--ease-out); }
.brand:hover .brand-mark { transform: rotate(8deg) scale(1.06); }
.brand-copy b { color: var(--accent); font-weight: 500; padding: 0 .2rem; }
.site-nav { display: flex; align-items: center; gap: clamp(.4rem, 1.4vw, 1.2rem); font-family: var(--mono); font-size: .66rem; text-transform: uppercase; letter-spacing: .06em; color: var(--paper-muted); }
.nav-link { position: relative; padding: .6rem .75rem; border-radius: 999px; transition: color .25s ease, background .25s ease; }
.nav-link:hover { color: var(--paper); background: rgba(127, 150, 175, .1); }
.nav-link.is-active { color: var(--paper); }
.nav-link.is-active::after { content: ''; position: absolute; left: 50%; bottom: 2px; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 8px var(--lime); }
.nav-link-cta { color: #07111d; background: var(--lime); padding: .7rem 1rem; display: inline-flex; gap: .55rem; align-items: center; font-weight: 500; }
.nav-link-cta:hover { color: #07111d; background: var(--paper); }
body[data-theme="light"] .nav-link-cta:hover { color: #fff; background: #07111d; }
.nav-link-cta span { font-size: .95rem; }
.theme-toggle { display: inline-flex; align-items: center; gap: .45rem; margin-left: auto; margin-right: .6rem; border: 1px solid var(--line); background: transparent; color: var(--paper-muted); padding: .55rem .8rem; border-radius: 999px; cursor: pointer; font-family: var(--mono); font-size: .58rem; text-transform: uppercase; letter-spacing: .06em; transition: color .3s ease, background-color .3s ease, border-color .3s ease; }
.theme-icon { color: var(--accent); font-size: 1rem; line-height: 1; }
.theme-toggle:hover { color: var(--paper); border-color: var(--lime); }
.menu-toggle { display: none; border: 0; background: none; padding: .7rem; cursor: pointer; }
.menu-toggle span { display: block; width: 22px; height: 1.5px; background: var(--paper); margin: 5px 0; transition: transform .3s var(--ease-out); }
.menu-toggle[aria-expanded="true"] span:first-child { transform: translateY(3.25px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:last-child { transform: translateY(-3.25px) rotate(-45deg); }

/* ==========================================================================
   Buttons & shared bits
   ========================================================================== */
.eyebrow { display: inline-flex; align-items: center; gap: .65rem; margin: 0 0 1.6rem; font-family: var(--mono); text-transform: uppercase; letter-spacing: .12em; font-size: .64rem; color: var(--paper-muted); }
.eyebrow.pill { padding: .55rem 1rem .55rem .8rem; border-radius: 999px; }
.eyebrow-dot { display: inline-block; flex: none; width: 7px; height: 7px; background: var(--lime); border-radius: 50%; box-shadow: 0 0 0 4px rgba(201, 255, 92, .15), 0 0 14px var(--lime); animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px rgba(201, 255, 92, 0), 0 0 6px var(--lime); } }
.eyebrow-number { color: var(--accent); padding-right: .2rem; }
.grad-text { font-style: normal; background: linear-gradient(100deg, var(--lime) 10%, var(--cyan) 55%, var(--violet) 95%); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: shimmer 8s ease-in-out infinite alternate; }
body[data-theme="light"] .grad-text { background-image: linear-gradient(100deg, #4b8600 10%, #0788ad 55%, #6a56d6 95%); }
@keyframes shimmer { to { background-position: 100% 0; } }
h1 em, h2 em { font-style: normal; }
h2 em { color: var(--accent); }

.button { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: .9rem; border: 1px solid transparent; border-radius: 999px; font-family: var(--mono); font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; padding: 1.05rem 1.2rem 1.05rem 1.45rem; cursor: pointer; overflow: hidden; isolation: isolate; transition: background .3s ease, color .3s ease, border-color .3s ease, box-shadow .3s ease; will-change: transform; }
.button-icon { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; font-size: .9rem; line-height: 1; transition: transform .4s var(--ease-out); }
.button:hover .button-icon { transform: rotate(-45deg); }
.button-primary { color: #07111d; background: var(--lime); box-shadow: 0 10px 34px -10px rgba(201, 255, 92, .7); }
.button-primary .button-icon { background: #07111d; color: var(--lime); }
.button-primary::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .55) 50%, transparent 70%); transform: translateX(-100%); transition: transform .8s var(--ease-out); }
.button-primary:hover::before { transform: translateX(100%); }
.button-glass { color: var(--paper); background: var(--glass-bg); border-color: var(--glass-border); box-shadow: inset 0 1px 0 var(--glass-highlight); backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur); }
.button-glass .button-icon { background: rgba(127, 150, 175, .14); color: var(--accent); }
.button-glass:hover { border-color: var(--lime); }

/* Tech chips — colour and icon come from the [data-tech] map at the end */
.tech { --c: var(--paper-muted); display: inline-flex; align-items: center; gap: .45rem; padding: .38rem .7rem .38rem .5rem; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--c) 34%, transparent); background: color-mix(in srgb, var(--c) 9%, transparent); color: var(--paper); font-family: var(--mono); font-size: .58rem; text-transform: uppercase; letter-spacing: .06em; white-space: nowrap; transition: transform .3s var(--ease-out), box-shadow .3s ease, background .3s ease; }
.tech::before, .tech-icon { content: ''; flex: none; display: inline-block; width: 14px; height: 14px; background: var(--c); -webkit-mask: var(--icon) center / contain no-repeat; mask: var(--icon) center / contain no-repeat; }
.tech:hover { transform: translateY(-2px); background: color-mix(in srgb, var(--c) 18%, transparent); box-shadow: 0 0 0 1px color-mix(in srgb, var(--c) 60%, transparent), 0 8px 24px -8px var(--c); }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero { position: relative; min-height: 100svh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(400px, .95fr); align-items: center; gap: clamp(1.5rem, 4vw, 5rem); padding-top: 110px; padding-bottom: 5rem; }
.hero h1 { margin-bottom: 1.5rem; font-size: clamp(3.2rem, 6.6vw, 6.4rem); line-height: .95; letter-spacing: -.075em; font-weight: 800; max-width: 760px; }
.hero-lede { color: var(--paper-muted); font-size: clamp(.98rem, 1.35vw, 1.1rem); line-height: 1.75; max-width: 520px; margin-bottom: 2.1rem; }
.hero-actions { display: flex; align-items: center; gap: .9rem; flex-wrap: wrap; }
.hero-meta { display: flex; gap: .8rem; margin: clamp(3rem, 6vw, 5rem) 0 0; flex-wrap: wrap; }
.meta-item { display: flex; align-items: center; gap: .75rem; padding: .85rem 1.1rem; border-radius: var(--radius-sm); }
.meta-item dt { font-size: 1.35rem; font-weight: 800; letter-spacing: -.05em; color: var(--paper); font-variant-numeric: tabular-nums; }
.meta-item dd { margin: 0; color: var(--paper-muted); font-family: var(--mono); font-size: .52rem; line-height: 1.4; text-transform: uppercase; letter-spacing: .05em; }

.hero-stage { position: relative; height: min(640px, 78vh); min-height: 520px; perspective: 1100px; }
.hero-canvas { position: absolute; inset: -18% -22%; width: 144%; height: 136%; pointer-events: none; }
.hero-stage::before { content: ''; position: absolute; inset: 15%; border-radius: 50%; background: radial-gradient(circle, rgba(107, 228, 255, .22), rgba(167, 150, 255, .1) 45%, transparent 70%); filter: blur(30px); }
.stage-3d { position: absolute; inset: 0; transform-style: preserve-3d; will-change: transform; }
.hero-photo-wrap { position: absolute; left: 50%; top: 50%; width: clamp(250px, 25vw, 360px); aspect-ratio: 1; translate: -50% -50% 0; border-radius: 50%; transform-style: preserve-3d; }
.photo-ring { position: absolute; inset: -14px; border-radius: 50%; background: conic-gradient(from var(--angle, 0deg), var(--lime), var(--cyan), var(--violet), transparent 70%, var(--lime)); -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 1px)); mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 1px)); animation: spin 6s linear infinite; filter: drop-shadow(0 0 10px rgba(201, 255, 92, .6)); }
@property --angle { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
@keyframes spin { to { --angle: 360deg; } }
.hero-photo { position: relative; display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 50%; filter: saturate(.92) contrast(1.04); box-shadow: 0 0 0 6px rgba(255, 255, 255, .04), 0 40px 80px -20px rgba(0, 0, 0, .7); }
.photo-tag { position: absolute; right: -.4rem; top: 10%; background: var(--lime); color: #07111d; font-family: var(--mono); font-size: .58rem; padding: .45rem .65rem; border-radius: 6px; transform: rotate(90deg); transform-origin: right top; letter-spacing: .1em; }

.code-card { position: absolute; left: 0; bottom: 9%; width: clamp(230px, 21vw, 300px); border-radius: var(--radius-sm); overflow: hidden; translate: 0 0 90px; animation: float 7s ease-in-out infinite; }
.code-top { display: flex; align-items: center; gap: .32rem; height: 32px; padding: 0 .8rem; border-bottom: 1px solid var(--glass-border); }
.code-dot { width: 7px; height: 7px; border-radius: 50%; }
.code-dot.red { background: #ff6b6b; } .code-dot.yellow { background: #f4ce5d; } .code-dot.green { background: #6ee07a; }
.code-file { margin-left: .4rem; font-family: var(--mono); font-size: .52rem; color: var(--paper-muted); }
.code-card pre { margin: 0; padding: .85rem .95rem 1.05rem; color: var(--paper-muted); font-family: var(--mono); font-size: .62rem; line-height: 1.8; min-height: 9.4em; white-space: pre; }
.code-purple { color: var(--violet); } .code-blue { color: var(--cyan); } .code-green { color: var(--accent); } .code-orange { color: var(--coral); } .code-cyan { color: var(--cyan); }
.type-caret { display: inline-block; width: .5em; height: 1.1em; margin-left: 1px; vertical-align: -.2em; background: var(--lime); animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.float-chip { position: absolute; display: inline-flex; align-items: center; gap: .5rem; padding: .55rem .85rem .55rem .65rem; border-radius: 999px; font-family: var(--mono); font-size: .62rem; letter-spacing: .05em; text-transform: uppercase; color: var(--paper); animation: float 6s ease-in-out infinite; }
.float-chip .tech-icon { width: 16px; height: 16px; }
.chip-laravel { left: 6%; top: 14%; translate: 0 0 130px; animation-delay: -1s; }
.chip-react { right: 2%; top: 30%; translate: 0 0 60px; animation-delay: -3s; }
.chip-php { right: 10%; bottom: 14%; translate: 0 0 110px; animation-delay: -2s; }
.chip-js { left: 38%; top: 3%; translate: 0 0 40px; animation-delay: -4.5s; }
@keyframes float { 50% { transform: translateY(-12px); } }
.stage-badge { position: absolute; right: 0; top: 6%; display: flex; align-items: center; gap: .55rem; padding: .55rem .85rem; border-radius: 999px; font-family: var(--mono); font-size: .55rem; text-transform: uppercase; letter-spacing: .06em; color: var(--paper-muted); translate: 0 0 70px; }
.badge-pulse { width: 7px; height: 7px; border-radius: 50%; background: #6ee07a; box-shadow: 0 0 10px #6ee07a; animation: pulse-green 2s ease-in-out infinite; }
@keyframes pulse-green { 50% { box-shadow: 0 0 0 6px rgba(110, 224, 122, 0), 0 0 4px #6ee07a; } }

.scroll-cue { position: absolute; left: 50%; bottom: 1.6rem; width: 24px; height: 38px; margin-left: -12px; border: 1px solid var(--line); border-radius: 999px; }
.scroll-cue span { position: absolute; left: 50%; top: 7px; width: 3px; height: 7px; margin-left: -1.5px; border-radius: 2px; background: var(--lime); animation: cue 1.8s var(--ease-out) infinite; }
@keyframes cue { 0% { transform: translateY(0); opacity: 1; } 80%, 100% { transform: translateY(14px); opacity: 0; } }

/* Split-text heading reveal */
[data-split] { word-spacing: .08em; }
.split-word { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .08em; margin-bottom: -.08em; }
.split-inner { display: inline-block; will-change: transform; }

/* ==========================================================================
   Ticker
   ========================================================================== */
.ticker { position: relative; z-index: 1; overflow: hidden; border-block: 1px solid var(--line); padding: 1.1rem 0; background: color-mix(in srgb, var(--ink) 55%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.ticker-track { display: flex; width: max-content; animation: marquee 45s linear infinite; }
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker-group { display: flex; gap: .8rem; padding-right: .8rem; }
.ticker .tech { font-size: .62rem; padding: .5rem .9rem .5rem .65rem; }
.ticker .tech::before { width: 16px; height: 16px; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ==========================================================================
   Section heading
   ========================================================================== */
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 2rem; margin-bottom: clamp(2.2rem, 4.5vw, 3.6rem); }
.section-heading h2 { margin: 0; font-size: clamp(2.6rem, 5.2vw, 5.2rem); line-height: .95; letter-spacing: -.075em; }
.section-heading h2 > span:not(.split-word) { color: var(--accent); }
.heading-note { color: var(--paper-muted); line-height: 1.6; font-size: .86rem; margin: 0 0 .3rem; text-align: right; }
.heading-note span { color: var(--paper); }

/* ==========================================================================
   Projects
   ========================================================================== */
.filter-bar { position: relative; display: inline-flex; flex-wrap: wrap; gap: .2rem; padding: .35rem; margin-bottom: clamp(2rem, 4vw, 3rem); border-radius: 999px; }
.filter-indicator { position: absolute; z-index: 0; left: 0; top: 0; height: 0; width: 0; border-radius: 999px; background: var(--lime); box-shadow: 0 6px 24px -8px var(--lime); transition: transform .5s var(--ease-out), width .5s var(--ease-out), height .5s var(--ease-out); }
.filter-button { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: .45rem; border: 0; background: transparent; border-radius: 999px; padding: .7rem 1rem; cursor: pointer; color: var(--paper-muted); font-family: var(--mono); font-size: .62rem; text-transform: uppercase; letter-spacing: .06em; transition: color .3s ease; }
.filter-button:hover { color: var(--paper); }
.filter-button.is-active { color: #07111d; }
.filter-count { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 .3rem; border-radius: 999px; font-size: .52rem; background: rgba(127, 150, 175, .16); }
.filter-button.is-active .filter-count { background: rgba(7, 17, 29, .14); }
.no-filter-js .filter-indicator { display: none; }
.no-filter-js .filter-button.is-active { background: var(--lime); }

.projects-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(1.4rem, 3vw, 2.4rem); }
.project-card { position: relative; padding: .8rem .8rem 1.4rem; transform-style: preserve-3d; transform: perspective(1200px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); }
.project-card.tilt-ready { transition: transform .6s var(--ease-out); }
.project-card.tilt-ready.is-tilting { transition: transform .12s linear; }
.project-card.is-filtered-out { display: none; }
.card-surface { position: absolute; inset: 0; border-radius: var(--radius); overflow: hidden; transition: border-color .4s ease; }
.card-surface::after { content: ''; position: absolute; inset: 0; background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), var(--spot), transparent 60%); opacity: 0; transition: opacity .4s ease; }
.project-card:hover .card-surface { border-color: color-mix(in srgb, var(--lime) 40%, transparent); }
.project-card:hover .card-surface::after { opacity: 1; }
.project-visual { position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden; border-radius: calc(var(--radius) - 8px); isolation: isolate; translate: 0 0 40px; box-shadow: 0 30px 50px -30px rgba(0, 0, 0, .8); background: var(--ink-soft); }
.project-screenshot { position: absolute; left: 0; top: -8%; width: 100%; height: 116%; object-fit: cover; object-position: var(--focus, top center); filter: saturate(.92) contrast(1.03); transition: scale .9s var(--ease-out), filter .9s ease; }
.project-card:hover .project-screenshot { scale: 1.05; filter: saturate(1.08) contrast(1.05); }
.project-visual::before { content: ''; position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, rgba(6, 13, 23, .55), transparent 28%, transparent 62%, rgba(6, 13, 23, .75)); pointer-events: none; }
.glare { position: absolute; inset: 0; z-index: 2; pointer-events: none; background: radial-gradient(600px circle at var(--gx, 50%) var(--gy, 0%), rgba(255, 255, 255, .28), transparent 45%); mix-blend-mode: overlay; opacity: 0; transition: opacity .5s ease; }
.project-card:hover .glare { opacity: 1; }
.visual-topline, .visual-caption { position: absolute; z-index: 3; left: .9rem; right: .9rem; display: flex; justify-content: space-between; align-items: center; font-family: var(--mono); font-size: .56rem; letter-spacing: .08em; text-transform: uppercase; color: rgba(255, 255, 255, .92); background: rgba(6, 13, 23, .42); border: 1px solid rgba(255, 255, 255, .18); border-radius: 999px; padding: .38rem .4rem .38rem .8rem; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.visual-topline { top: .9rem; }
.visual-caption { bottom: .9rem; padding: .55rem .85rem; }
.visual-caption span:last-child { color: rgba(255, 255, 255, .72); font-size: .52rem; }
.visual-arrow { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: .9rem; background: rgba(255, 255, 255, .12); transition: transform .4s var(--ease-out), background .3s ease, color .3s ease; }
.project-card:hover .visual-arrow { transform: rotate(45deg); background: var(--lime); color: #07111d; }
.project-info { position: relative; padding: 1.3rem .7rem 0; translate: 0 0 24px; }
.project-title-row { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; padding-bottom: .7rem; border-bottom: 1px solid var(--line); }
.project-title-row h3 { font-size: 1.5rem; letter-spacing: -.05em; margin: 0; }
.project-type { color: var(--paper-muted); font-family: var(--mono); font-size: .55rem; text-transform: uppercase; letter-spacing: .08em; white-space: nowrap; }
.project-info > p { color: var(--paper-muted); font-size: .84rem; line-height: 1.65; margin: 1rem 0 1.1rem; max-width: 520px; }
.tech-list { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1.3rem; }
.project-link { display: inline-flex; align-items: center; gap: .4rem; color: var(--accent); font-family: var(--mono); font-size: .62rem; text-transform: uppercase; letter-spacing: .06em; }
.project-link span { font-size: .95rem; transition: transform .35s var(--ease-out); }
.project-link:hover span { transform: translate(3px, -3px); }

/* ==========================================================================
   Stack
   ========================================================================== */
.stack-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1rem, 2vw, 1.4rem); }
.stack-group { position: relative; padding: 1.5rem; border-radius: var(--radius); }
.stack-label { margin: 0 0 1.2rem; font-family: var(--mono); font-size: .64rem; text-transform: uppercase; letter-spacing: .12em; color: var(--paper-muted); }
.stack-label span { color: var(--accent); }
.stack-list { display: grid; gap: .5rem; }
.stack-tile { --c: var(--paper-muted); position: relative; display: grid; grid-template-columns: 38px 1fr auto; align-items: center; gap: .85rem; padding: .6rem .8rem .6rem .6rem; border-radius: var(--radius-sm); border: 1px solid transparent; background: rgba(127, 150, 175, .06); transition: border-color .3s ease, background .3s ease, transform .4s var(--ease-out); }
.stack-tile .tech-icon { width: 38px; height: 38px; -webkit-mask: none; mask: none; background: color-mix(in srgb, var(--c) 14%, transparent); border-radius: 10px; position: relative; }
.stack-tile .tech-icon::after { content: ''; position: absolute; inset: 9px; background: var(--c); -webkit-mask: var(--icon) center / contain no-repeat; mask: var(--icon) center / contain no-repeat; }
.stack-tile strong { font-size: .88rem; letter-spacing: -.02em; }
.stack-tile small { font-family: var(--mono); font-size: .52rem; text-transform: uppercase; letter-spacing: .05em; color: var(--paper-muted); white-space: nowrap; }
.stack-tile:hover { transform: translateX(4px); border-color: color-mix(in srgb, var(--c) 45%, transparent); background: color-mix(in srgb, var(--c) 10%, transparent); }
.stack-tile:hover .tech-icon { box-shadow: 0 0 22px -4px var(--c); }

/* Spotlight border that follows the cursor across a group of cards */
[data-spotlight] { position: relative; }
[data-spotlight]::before { content: ''; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; background: radial-gradient(320px circle at var(--mx, -100px) var(--my, -100px), var(--lime), transparent 55%); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); opacity: 0; transition: opacity .4s ease; pointer-events: none; }
[data-spotlight-group]:hover [data-spotlight]::before { opacity: .9; }

/* ==========================================================================
   About
   ========================================================================== */
.about-layout { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(2.5rem, 7vw, 7rem); align-items: end; }
.about-copy h2 { font-size: clamp(2.8rem, 5vw, 5rem); letter-spacing: -.08em; line-height: .95; margin-bottom: 1.7rem; }
.about-lede { color: var(--paper); font-size: 1.12rem; line-height: 1.7; max-width: 600px; }
.about-body { color: var(--paper-muted); line-height: 1.75; font-size: .9rem; max-width: 600px; margin-bottom: 0; }
.values-list { display: grid; gap: .8rem; }
.value-card { display: grid; grid-template-columns: 34px 1fr; gap: .3rem .8rem; padding: 1.15rem 1.3rem; border-radius: var(--radius-sm); transition: translate .4s var(--ease-out); }
.value-card:hover { translate: -6px 0; }
.value-card span { grid-row: span 2; font-family: var(--mono); font-size: .62rem; color: var(--accent); padding-top: .15rem; }
.value-card strong { font-size: .9rem; }
.value-card p { margin: 0; font-size: .76rem; color: var(--paper-muted); line-height: 1.5; }

/* ==========================================================================
   Process
   ========================================================================== */
.process-grid { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(.8rem, 1.6vw, 1.2rem); padding-top: 2.2rem; }
.process-track { position: absolute; left: 0; right: 0; top: .6rem; height: 1px; background: var(--line); }
.process-track span { position: absolute; inset: 0; background: linear-gradient(90deg, var(--cyan), var(--lime)); transform: scaleX(0); transform-origin: left; box-shadow: 0 0 10px var(--lime); }
.process-item { padding: 1.5rem 1.3rem 1.8rem; min-height: 250px; border-radius: var(--radius); transition: translate .5s var(--ease-out); }
.process-item:hover { translate: 0 -6px; }
.process-item::after { content: ''; position: absolute; left: 1.3rem; top: calc(-1.6rem - 4px); width: 9px; height: 9px; border-radius: 50%; background: var(--ink); border: 1px solid var(--lime); box-shadow: 0 0 10px var(--lime); }
.process-index { color: var(--accent); font-family: var(--mono); font-size: .6rem; }
.process-icon { display: grid; place-items: center; width: 52px; height: 52px; margin: 1.8rem 0 1.2rem; border-radius: 16px; background: rgba(107, 228, 255, .1); color: var(--cyan); font-size: 1.5rem; }
.process-item:nth-child(3) .process-icon { background: rgba(255, 142, 116, .1); color: var(--coral); }
.process-item:nth-child(4) .process-icon { background: rgba(167, 150, 255, .12); color: var(--violet); }
.process-item:nth-child(5) .process-icon { background: rgba(201, 255, 92, .12); color: var(--accent); }
.process-item h3 { font-size: 1.12rem; margin-bottom: .7rem; letter-spacing: -.03em; }
.process-item p { color: var(--paper-muted); font-size: .78rem; line-height: 1.65; margin: 0; }

/* ==========================================================================
   Contact
   ========================================================================== */
.contact { padding-bottom: clamp(6rem, 11vw, 10rem); }
.contact-card { position: relative; min-height: 540px; padding: clamp(2rem, 7vw, 6rem); border-radius: calc(var(--radius) + 8px); overflow: hidden; isolation: isolate; background: var(--glass-solid); backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur); box-shadow: inset 0 1px 0 var(--glass-highlight), var(--glass-shadow); }
.contact-card::before { content: ''; position: absolute; inset: 0; z-index: 3; border-radius: inherit; padding: 1.5px; background: conic-gradient(from var(--angle, 0deg), transparent 0deg, var(--lime) 60deg, var(--cyan) 120deg, transparent 180deg, transparent 360deg); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); animation: spin 7s linear infinite; pointer-events: none; }
.contact-glow { position: absolute; z-index: -1; width: 70%; aspect-ratio: 1; right: -18%; top: -40%; border-radius: 50%; background: radial-gradient(circle, rgba(201, 255, 92, .38), rgba(107, 228, 255, .12) 45%, transparent 70%); filter: blur(30px); animation: drift-b 18s ease-in-out infinite alternate; }
.contact-orb { position: absolute; z-index: -1; border-radius: 50%; border: 1px solid var(--line); }
.orb-left { width: 480px; height: 480px; right: -80px; top: -160px; }
.orb-left::after, .orb-right::after { content: ''; position: absolute; border: 1px solid var(--line); inset: 35px; border-radius: 50%; }
.orb-right { width: 340px; height: 340px; right: 22%; bottom: -250px; }
.contact-card h2 { font-size: clamp(3rem, 7vw, 6.6rem); line-height: .92; letter-spacing: -.085em; margin: 0 0 1.8rem; }
.contact-copy { max-width: 480px; font-size: .96rem; line-height: 1.7; color: var(--paper-muted); }
.contact-actions { display: flex; align-items: center; gap: 1rem 1.2rem; flex-wrap: wrap; margin-top: 2.5rem; }
.phone-button { display: inline-flex; align-items: center; gap: .45rem; border-radius: 999px; padding: .95rem 1.2rem; cursor: pointer; color: var(--paper); font-family: var(--mono); font-size: .66rem; text-transform: uppercase; letter-spacing: .05em; transition: border-color .3s ease; }
.phone-button:hover { border-color: var(--lime); }
.phone-button small { opacity: .55; font-size: .52rem; margin-left: .3rem; }
.phone-icon { font-size: 1.1rem; color: var(--accent); transform: rotate(-20deg); }
.email-link { display: inline-flex; align-items: center; gap: .45rem; color: var(--paper-muted); border-bottom: 1px solid var(--line); padding: .8rem 0 .45rem; font-family: var(--mono); font-size: .66rem; letter-spacing: .02em; transition: color .25s ease, border-color .25s ease; }
.email-link span { font-size: 1rem; color: var(--accent); }
.email-link:hover { color: var(--paper); border-color: var(--lime); }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer { position: relative; z-index: 1; min-height: 92px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; color: var(--paper-muted); }
.site-footer p { font-family: var(--mono); font-size: .53rem; text-transform: uppercase; letter-spacing: .07em; margin: 0; text-align: center; }
.back-top { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: var(--accent); transition: transform .4s var(--ease-out), background .3s ease; }
.back-top:hover { transform: translateY(-4px); }

/* GSAP handles visibility once it loads; without JS everything stays visible */
.js .reveal { visibility: hidden; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1080px) {
  .hero { grid-template-columns: 1fr; padding-top: 130px; min-height: auto; }
  .hero-stage { height: 560px; min-height: 0; max-width: 640px; width: 100%; margin-inline: auto; }
  .scroll-cue { display: none; }
  .stack-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stack-group:last-child { grid-column: span 2; }
  .stack-group:last-child .stack-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .about-layout { grid-template-columns: 1fr; align-items: start; }
  .process-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .process-track { display: none; }
  .process-item::after { display: none; }
  .process-grid { padding-top: 0; }
}

@media (max-width: 820px) {
  .projects-grid { grid-template-columns: 1fr; }
  .section-heading { display: block; }
  .heading-note { margin-top: 1.4rem; text-align: left; }
}

@media (max-width: 900px) {
  .menu-toggle { display: block; }
  .site-nav { position: absolute; left: 0; right: 0; top: calc(100% + 8px); flex-direction: column; align-items: stretch; gap: .2rem; padding: .6rem; border-radius: 22px; background: var(--ink-soft); border: 1px solid var(--glass-border); box-shadow: var(--glass-shadow); opacity: 0; visibility: hidden; transform: translateY(-8px) scale(.98); transition: opacity .3s ease, transform .3s var(--ease-out), visibility .3s; }
  .site-nav.is-open { opacity: 1; visibility: visible; transform: none; }
  .nav-link { padding: .95rem .9rem; font-size: .7rem; }
  .nav-link.is-active::after { left: auto; right: 1rem; top: 50%; bottom: auto; margin: -2px 0 0; }
  .nav-link-cta { margin-top: .3rem; justify-content: space-between; }
  .theme-toggle { margin-right: .1rem; padding: .55rem .65rem; }
  .theme-label { display: none; }
}

@media (max-width: 680px) {
  :root { --gutter: 1rem; --radius: 20px; }
  .site-header { top: 10px; }
  .header-inner { height: 60px; padding: 0 .4rem 0 .9rem; }
  .brand-copy { font-size: .72rem; }

  .hero { padding-top: 110px; padding-bottom: 3rem; }
  .hero h1 { font-size: clamp(2.9rem, 13.5vw, 4.6rem); }
  .hero-lede { font-size: .95rem; }
  .hero-actions .button { flex: 1 1 auto; }
  .hero-meta { gap: .5rem; flex-wrap: nowrap; }
  .meta-item { flex: 1; flex-direction: column; align-items: flex-start; gap: .25rem; padding: .75rem .8rem; }
  .meta-item dt { font-size: 1.15rem; }
  .meta-item dd { font-size: .47rem; }
  .hero-stage { height: 440px; perspective: none; }
  .hero-photo-wrap { width: min(58vw, 250px); }
  .code-card { width: 215px; bottom: 2%; left: 0; }
  .code-card pre { font-size: .56rem; }
  .chip-laravel { left: 0; top: 8%; }
  .chip-react { right: -2%; top: 34%; }
  .chip-php { right: 2%; bottom: 22%; }
  .chip-js { display: none; }
  .stage-badge { top: 0; right: 0; }
  .float-chip { font-size: .55rem; padding: .45rem .7rem .45rem .5rem; }

  .section-heading h2 { font-size: clamp(2.6rem, 12.5vw, 4rem); }
  .filter-bar { display: flex; flex-wrap: nowrap; overflow-x: auto; border-radius: 22px; scrollbar-width: none; max-width: 100%; }
  .filter-bar::-webkit-scrollbar { display: none; }
  .filter-button { flex: none; padding: .65rem .85rem; }
  .project-card { padding: .6rem .6rem 1.2rem; }
  .project-title-row h3 { font-size: 1.3rem; }
  .project-info { padding-inline: .5rem; }

  .stack-grid { grid-template-columns: 1fr; }
  .stack-group:last-child { grid-column: auto; }
  .stack-group:last-child .stack-list { grid-template-columns: 1fr; }
  .stack-group { padding: 1.2rem; }

  .about-copy h2 { font-size: clamp(2.8rem, 12.5vw, 4.2rem); }
  .process-grid { grid-template-columns: 1fr; }
  .process-item { min-height: 0; }
  .process-icon { margin: 1.2rem 0 1rem; }
  .contact-card { min-height: 0; padding: 2.4rem 1.4rem; }
  .contact-card h2 { font-size: clamp(2.8rem, 13vw, 4.6rem); }
  .contact-actions { align-items: stretch; flex-direction: column; }
  .contact-actions .button, .phone-button { justify-content: space-between; }
  .email-link { font-size: .6rem; align-self: flex-start; }
  .site-footer { padding-block: 1.8rem; flex-wrap: wrap; }
  .site-footer p { order: 3; width: 100%; text-align: left; line-height: 1.5; }
  .back-top { margin-left: auto; }
}

@media (hover: none) {
  .project-card { transform: none; }
  [data-spotlight]::before { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; }
  .js .reveal { visibility: visible; }
  .project-card { transform: none; }
}

/* ==========================================================================
   Tech map — brand colour (tuned for contrast) + Simple Icons glyph
   ========================================================================== */
[data-tech="html5"] { --c: #f06529; --icon: url("https://cdn.jsdelivr.net/npm/simple-icons@13.21.0/icons/html5.svg"); }
[data-tech="css3"] { --c: #2b8fe0; --icon: url("https://cdn.jsdelivr.net/npm/simple-icons@13.21.0/icons/css3.svg"); }
[data-tech="javascript"] { --c: #f7df1e; --icon: url("https://cdn.jsdelivr.net/npm/simple-icons@13.21.0/icons/javascript.svg"); }
[data-tech="typescript"] { --c: #4a9bf0; --icon: url("https://cdn.jsdelivr.net/npm/simple-icons@13.21.0/icons/typescript.svg"); }
[data-tech="react"] { --c: #61dafb; --icon: url("https://cdn.jsdelivr.net/npm/simple-icons@13.21.0/icons/react.svg"); }
[data-tech="tailwindcss"] { --c: #22c3e6; --icon: url("https://cdn.jsdelivr.net/npm/simple-icons@13.21.0/icons/tailwindcss.svg"); }
[data-tech="inertia"] { --c: #a273f2; --icon: url("https://cdn.jsdelivr.net/npm/simple-icons@13.21.0/icons/inertia.svg"); }
[data-tech="vite"] { --c: #8b91ff; --icon: url("https://cdn.jsdelivr.net/npm/simple-icons@13.21.0/icons/vite.svg"); }
[data-tech="php"] { --c: #8f93d6; --icon: url("https://cdn.jsdelivr.net/npm/simple-icons@13.21.0/icons/php.svg"); }
[data-tech="laravel"] { --c: #ff2d20; --icon: url("https://cdn.jsdelivr.net/npm/simple-icons@13.21.0/icons/laravel.svg"); }
[data-tech="mysql"] { --c: #5b9bd5; --icon: url("https://cdn.jsdelivr.net/npm/simple-icons@13.21.0/icons/mysql.svg"); }
[data-tech="postgresql"] { --c: #6b8cf0; --icon: url("https://cdn.jsdelivr.net/npm/simple-icons@13.21.0/icons/postgresql.svg"); }
[data-tech="supabase"] { --c: #3fcf8e; --icon: url("https://cdn.jsdelivr.net/npm/simple-icons@13.21.0/icons/supabase.svg"); }
[data-tech="sqlite"] { --c: #5fb3e6; --icon: url("https://cdn.jsdelivr.net/npm/simple-icons@13.21.0/icons/sqlite.svg"); }
[data-tech="googleappsscript"] { --c: #4c8df6; --icon: url("https://cdn.jsdelivr.net/npm/simple-icons@13.21.0/icons/googleappsscript.svg"); }
[data-tech="pwa"] { --c: #a27bff; --icon: url("https://cdn.jsdelivr.net/npm/simple-icons@13.21.0/icons/pwa.svg"); }
[data-tech="git"] { --c: #f05032; --icon: url("https://cdn.jsdelivr.net/npm/simple-icons@13.21.0/icons/git.svg"); }
[data-tech="github"] { --c: var(--paper); --icon: url("https://cdn.jsdelivr.net/npm/simple-icons@13.21.0/icons/github.svg"); }
[data-tech="netlify"] { --c: #00c7b7; --icon: url("https://cdn.jsdelivr.net/npm/simple-icons@13.21.0/icons/netlify.svg"); }
[data-tech="cpanel"] { --c: #ff6c2c; --icon: url("https://cdn.jsdelivr.net/npm/simple-icons@13.21.0/icons/cpanel.svg"); }
body[data-theme="light"] [data-tech="javascript"] { --c: #c9a800; }
body[data-theme="light"] [data-tech="react"] { --c: #149eca; }
body[data-theme="light"] [data-tech="tailwindcss"] { --c: #0e9fbf; }

[data-tech="cloudflare"] { --c: #f59b42; --icon: url("https://cdn.jsdelivr.net/npm/simple-icons@13.21.0/icons/cloudflare.svg"); }
[data-tech="mercadopago"] { --c: #49b8ef; --icon: url("https://cdn.jsdelivr.net/npm/simple-icons@13.21.0/icons/mercadopago.svg"); }
