/* ==========================================================================
   Davi Barcia — portfolio
   ========================================================================== */

:root {
  --bg: #0b0c0e;
  --bg-2: #111215;
  --bg-3: #17191d;
  --ink: #ece8df;
  --ink-2: #bdb9b0;
  --mute: #85827b;
  --line: rgba(236, 232, 223, .11);
  --accent: #2b4cff;        /* azul ultra */
  --accent-text: #8c9bff;   /* azul ultra claro, para texto sobre fundo escuro */
  --accent-ink: #ffffff;

  --f-display: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, "Cascadia Code", monospace;

  --gutter: clamp(16px, 4vw, 56px);
  --max: 1360px;
  --radius: 22px;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --ease-in-out: cubic-bezier(.76, 0, .24, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html, body { overflow-x: clip; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-display);
  font-size: 17px;
  line-height: 1.55;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body.is-loading { overflow: hidden; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, p, figure { margin: 0; }
code { font-family: var(--f-mono); font-size: .88em; background: var(--line); padding: .1em .4em; border-radius: 6px; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 4px; border-radius: 6px; }

.mono { font-family: var(--f-mono); font-size: 12.5px; letter-spacing: .02em; text-transform: uppercase; }
.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: clamp(96px, 14vw, 180px) 0; position: relative; }
.skip { position: fixed; left: 16px; top: -60px; z-index: 300; background: var(--accent); color: var(--accent-ink); padding: 10px 16px; border-radius: 10px; }
.skip:focus { top: 16px; }
.line { display: block; overflow: hidden; padding-bottom: .06em; margin-bottom: -.06em; }

/* grain */
body::after {
  content: ""; position: fixed; inset: -50%; z-index: 250; pointer-events: none; opacity: .045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 8s steps(10) infinite;
}
@keyframes grain {
  0%, 100% { transform: translate(0, 0); } 10% { transform: translate(-5%, -10%); } 30% { transform: translate(3%, -15%); }
  50% { transform: translate(12%, 9%); } 70% { transform: translate(9%, 4%); } 90% { transform: translate(-1%, 7%); }
}

/* ---------- loader ---------- */
.loader {
  position: fixed; inset: 0; z-index: 400; background: var(--bg);
  display: grid; place-items: center;
  clip-path: inset(0 0 0 0);
  transition: clip-path 1.1s var(--ease-in-out);
}
.loader.is-done { clip-path: inset(0 0 100% 0); }
.loader__inner { width: min(420px, 80vw); }
.loader__name { display: flex; gap: .3em; font-size: clamp(2rem, 6vw, 3.2rem); font-weight: 700; letter-spacing: -.04em; overflow: hidden; }
.loader__name span { display: inline-block; transform: translateY(105%); animation: rise .9s var(--ease) forwards; }
.loader__name span + span { animation-delay: .08s; color: var(--accent-text); }
.loader__bar { height: 2px; background: var(--line); margin: 22px 0 12px; overflow: hidden; }
.loader__bar i { display: block; height: 100%; width: 100%; background: var(--accent); transform-origin: left; transform: scaleX(var(--p, 0)); }
.loader__count { color: var(--mute); text-align: right; }
@keyframes rise { to { transform: translateY(0); } }

/* ---------- cursor ---------- */
.cursor, .cursor-dot { display: none; }
@media (hover: hover) and (pointer: fine) {
  body.has-cursor, body.has-cursor a, body.has-cursor button { cursor: none; }
  .cursor, .cursor-dot { display: block; position: fixed; left: 0; top: 0; z-index: 350; pointer-events: none; border-radius: 50%; }
  .cursor {
    width: 38px; height: 38px; margin: -19px 0 0 -19px;
    border: 1px solid #fff; mix-blend-mode: difference;
    display: grid; place-items: center;
    transition: width .35s var(--ease), height .35s var(--ease), margin .35s var(--ease), background .35s var(--ease), border-color .35s, opacity .3s;
  }
  .cursor-dot { width: 6px; height: 6px; margin: -3px 0 0 -3px; background: #fff; mix-blend-mode: difference; }
  .cursor__label { font-family: var(--f-mono); font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--accent-ink); opacity: 0; transition: opacity .2s; }
  .cursor.is-hover { width: 64px; height: 64px; margin: -32px 0 0 -32px; border-color: transparent; background: #fff; }
  .cursor.is-label { width: 86px; height: 86px; margin: -43px 0 0 -43px; background: var(--accent); border-color: var(--accent); mix-blend-mode: normal; }
  .cursor.is-label .cursor__label { opacity: 1; }
  .cursor.is-label ~ .cursor-dot, .cursor.is-hidden, .cursor.is-hidden ~ .cursor-dot { opacity: 0; }
}

/* ---------- progress ---------- */
.progress { position: fixed; left: 0; top: 0; right: 0; height: 2px; z-index: 210; pointer-events: none; }
.progress i { display: block; height: 100%; background: var(--accent); transition: background .45s; transform-origin: left; transform: scaleX(var(--s, 0)); }

.progress[data-theme="accent"] i { background: #fff; }

/* ---------- nav ---------- */
.nav {
  /* tema escuro (padrão) — os outros temas só trocam estas variáveis */
  --nav-ink: var(--ink);
  --nav-bg: rgba(11, 12, 14, .72);
  --nav-line: var(--line);
  --nav-pill: rgba(17, 18, 21, .5);
  --nav-link: var(--ink-2);
  --nav-hover-bg: var(--accent);
  --nav-hover-ink: var(--accent-ink);
  --nav-cta-bg: var(--ink);
  --nav-cta-ink: var(--bg);
  --nav-dot: var(--accent-text);

  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 18px var(--gutter);
  color: var(--nav-ink);
  border-bottom: 1px solid transparent;
  transition: background .45s, border-color .45s, color .45s, padding .4s var(--ease);
}
.nav[data-theme="light"] {
  --nav-ink: #10233a;
  --nav-bg: rgba(244, 239, 228, .82);
  --nav-line: rgba(16, 35, 58, .14);
  --nav-pill: rgba(255, 255, 255, .55);
  --nav-link: #3c4f66;
  --nav-hover-bg: #10233a;
  --nav-hover-ink: #f4efe4;
  --nav-cta-bg: #10233a;
  --nav-cta-ink: #f4efe4;
  --nav-dot: var(--accent);
}
.nav[data-theme="accent"] {
  --nav-ink: #fff;
  --nav-bg: rgba(43, 76, 255, .82);
  --nav-line: rgba(255, 255, 255, .28);
  --nav-pill: rgba(255, 255, 255, .1);
  --nav-link: rgba(255, 255, 255, .82);
  --nav-hover-bg: #fff;
  --nav-hover-ink: var(--accent);
  --nav-cta-bg: #fff;
  --nav-cta-ink: var(--accent);
  --nav-dot: var(--bg);
}
.nav.is-scrolled { background: var(--nav-bg); backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%); padding-top: 12px; padding-bottom: 12px; border-bottom-color: var(--nav-line); }
.nav__logo { font-weight: 800; font-size: 22px; letter-spacing: -.04em; display: inline-block; }
.nav__logo em { color: var(--nav-dot); font-style: normal; transition: color .45s; }
.nav__links { display: flex; gap: 6px; padding: 5px; border: 1px solid var(--nav-line); border-radius: 999px; background: var(--nav-pill); transition: background .45s, border-color .45s; }
.nav__links a { font-size: 14px; padding: 7px 14px; border-radius: 999px; color: var(--nav-link); transition: color .3s, background .3s; }
.nav__links a:hover, .nav__links a.is-active { color: var(--nav-hover-ink); background: var(--nav-hover-bg); }
.nav__cta { font-size: 14px; padding: 10px 18px; border-radius: 999px; background: var(--nav-cta-bg); color: var(--nav-cta-ink); font-weight: 600; display: inline-block; transition: background .45s, color .45s; }
.nav__burger { display: none; width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--nav-line); position: relative; transition: border-color .45s; }
.nav__burger i { position: absolute; left: 14px; right: 14px; height: 1.5px; background: var(--nav-ink); transition: transform .45s var(--ease), top .45s var(--ease), background .45s; }
.nav__burger i:first-child { top: 19px; }
.nav__burger i:last-child { top: 26px; }
body.menu-open .nav__burger i:first-child { top: 22.5px; transform: rotate(45deg); }
body.menu-open .nav__burger i:last-child { top: 22.5px; transform: rotate(-45deg); }

.menu {
  position: fixed; inset: 0; z-index: 190; background: var(--bg-2);
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 110px var(--gutter) calc(32px + env(safe-area-inset-bottom));
  clip-path: circle(0 at calc(100% - 46px) 42px);
  transition: clip-path .8s var(--ease-in-out);
  visibility: hidden;
}
body.menu-open .menu { clip-path: circle(150% at calc(100% - 46px) 42px); visibility: visible; }
.menu__links a {
  display: flex; align-items: baseline; gap: 14px;
  font-size: clamp(2.4rem, 11vw, 4rem); font-weight: 600; letter-spacing: -.04em; line-height: 1.12;
  opacity: 0; transform: translateY(30px);
  transition: opacity .5s, transform .6s var(--ease);
}
.menu__links small { font-family: var(--f-mono); font-size: 12px; color: var(--accent-text); letter-spacing: 0; }
body.menu-open .menu__links a { opacity: 1; transform: none; }
body.menu-open .menu__links a:nth-child(1) { transition-delay: .25s; }
body.menu-open .menu__links a:nth-child(2) { transition-delay: .3s; }
body.menu-open .menu__links a:nth-child(3) { transition-delay: .35s; }
body.menu-open .menu__links a:nth-child(4) { transition-delay: .4s; }
body.menu-open .menu__links a:nth-child(5) { transition-delay: .45s; }
body.menu-open .menu__links a:nth-child(6) { transition-delay: .5s; }
.menu__foot { display: flex; flex-direction: column; gap: 6px; color: var(--mute); text-transform: none; }

/* ---------- buttons ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; gap: 12px;
  padding: 16px 26px; border-radius: 999px; font-weight: 600; font-size: 16px;
  overflow: hidden; isolation: isolate; white-space: nowrap;
}
.btn::before {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit;
  transform: translateY(101%); transition: transform .55s var(--ease);
}
.btn:hover::before { transform: translateY(0); }
.btn b { font-weight: 400; transition: transform .45s var(--ease); }
.btn:hover b { transform: translate(3px, -1px) rotate(-12deg); }
.btn--accent { background: var(--accent); color: var(--accent-ink); }
.btn--accent::before { background: var(--ink); }
.btn--accent:hover { color: var(--bg); }
.btn--ghost { border: 1px solid var(--line); color: var(--ink); }
.btn--ghost::before { background: var(--ink); }
.btn--ghost:hover { color: var(--bg); }
.btn--light { background: #f4efe4; color: #10233a; }
.btn--light::before { background: #10233a; }
.btn--light:hover { color: #f4efe4; }
.btn span, .btn b { transition: color .4s; }

/* ---------- section head ---------- */
.sec-head { display: flex; align-items: center; gap: 14px; margin-bottom: clamp(28px, 4vw, 48px); color: var(--mute); }
.sec-head__num { color: var(--accent-text); }
.sec-head::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.sec-head--light { color: rgba(244, 239, 228, .8); }
.sec-head--light::after { background: rgba(244, 239, 228, .25); }
.sec-head--light .sec-head__num { color: #f4efe4; }
.title-xl { font-size: clamp(2.6rem, 7.4vw, 6.4rem); font-weight: 600; letter-spacing: -.045em; line-height: .98; }
.title-xl em { font-style: normal; color: var(--accent-text); }

/* ---------- reveals ---------- */
.reveal { opacity: 0; transform: translateY(36px); transition: opacity 1s var(--ease), transform 1.1s var(--ease); transition-delay: var(--d, 0s); }
.reveal.is-in { opacity: 1; transform: none; }
.reveal-lines .line > span { display: inline-block; transform: translateY(110%); transition: transform 1.2s var(--ease); }
.reveal-lines .line:nth-child(2) > span { transition-delay: .1s; }
.reveal-lines.is-in .line > span { transform: none; }

/* ---------- hero ---------- */
.hero {
  position: relative; min-height: 100svh;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 110px var(--gutter) 40px;
  overflow: hidden;
}
.hero__canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
.hero__glow {
  position: absolute; z-index: 0; width: 70vmax; height: 70vmax; border-radius: 50%;
  left: 60%; top: 30%; transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(70, 100, 255, .10), transparent 60%);
  pointer-events: none; filter: blur(10px);
}
.hero > *:not(canvas):not(.hero__glow):not(.hero__me) { position: relative; z-index: 3; }
.hero__top { display: flex; justify-content: space-between; color: var(--mute); }
.hero__status { display: inline-flex; align-items: center; gap: 10px; }
.hero__pin { color: var(--accent); flex-shrink: 0; }

.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* foto centralizada + nome na frente (canvas), inspirado em lando.com */
.hero { --sh: min(88svh, 1150px, 150vw); --me-bottom: 0px; }
.hero__me {
  position: absolute; z-index: 1; left: 0; right: 0; bottom: var(--me-bottom); margin-inline: auto;
  height: var(--sh); width: auto; max-width: none;
  pointer-events: none; user-select: none; -webkit-user-drag: none;
  -webkit-mask-image: linear-gradient(to bottom, #000 60%, transparent 97%);
          mask-image: linear-gradient(to bottom, #000 60%, transparent 97%);
  opacity: 0; translate: 0 40px;
  transition: opacity 1.2s var(--ease) .15s, translate 1.4s var(--ease) .15s;
}
body.is-ready .hero__me { opacity: 1; translate: 0 0; }
.hero__name { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2; pointer-events: none; }
.split .char { display: inline-block; transform: translateY(105%) rotate(6deg); transform-origin: left bottom; }

.hero__bottom { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.hero__lead { font-size: clamp(1.25rem, 2.2vw, 1.75rem); line-height: 1.3; letter-spacing: -.02em; max-width: 30ch; color: var(--ink-2); }
.rotator { display: inline-grid; vertical-align: bottom; overflow: hidden; color: var(--ink); font-weight: 600; height: 1.3em; }
.rotator__word { display: inline-block; color: var(--accent-text); }
.rotator__word.out { animation: wordOut .5s var(--ease-in-out) forwards; }
.rotator__word.in { animation: wordIn .6s var(--ease) forwards; }
@keyframes wordOut { to { transform: translateY(-100%); opacity: 0; } }
@keyframes wordIn { from { transform: translateY(100%); opacity: 0; } to { transform: none; opacity: 1; } }
.hero__actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero__fade { opacity: 0; transform: translateY(20px); }
body.is-ready .hero__top, body.is-ready .hero__bottom, body.is-ready .hero__scroll { animation: fadeUp 1s var(--ease) .7s backwards; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(24px); } }
.hero__scroll { position: absolute !important; right: var(--gutter); bottom: 40px; display: flex; flex-direction: column; align-items: center; gap: 10px; color: var(--mute); writing-mode: vertical-rl; }
.hero__scroll i { width: 1px; height: 60px; background: var(--line); position: relative; overflow: hidden; }
.hero__scroll i::after { content: ""; position: absolute; left: 0; top: -40%; width: 100%; height: 40%; background: var(--accent); animation: drip 1.8s var(--ease-in-out) infinite; }
@keyframes drip { to { top: 100%; } }

/* ---------- marquee ---------- */
.marquee { border-block: 1px solid var(--line); padding: 26px 0; overflow: hidden; background: var(--bg-2); }
.marquee__track { display: flex; width: max-content; will-change: transform; }
.marquee__group { display: flex; align-items: center; gap: 34px; padding-right: 34px; flex-shrink: 0; }
.marquee span { font-size: clamp(1.6rem, 3.6vw, 3rem); font-weight: 500; letter-spacing: -.03em; white-space: nowrap; }
.marquee span:nth-child(4n+1) { color: transparent; -webkit-text-stroke: 1px var(--ink-2); }
.marquee i { font-style: normal; color: var(--accent-text); font-size: 1.2rem; }

/* ---------- about ---------- */
.about__statement { font-size: clamp(1.7rem, 4vw, 3.4rem); line-height: 1.14; letter-spacing: -.035em; font-weight: 500; max-width: 24ch; margin-bottom: clamp(56px, 8vw, 110px); }
.about__statement .w { opacity: .14; transition: opacity .3s; }
.about__statement .w.on { opacity: 1; }
.about__statement .w.hl.on { color: var(--accent-text); }
.about__grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(24px, 4vw, 64px); align-items: start; }

.terminal { background: #0e0f12; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: 0 40px 80px -40px rgba(0, 0, 0, .8); }
.terminal__bar { display: flex; align-items: center; gap: 7px; padding: 14px 18px; border-bottom: 1px solid var(--line); background: var(--bg-3); }
.terminal__bar i { width: 11px; height: 11px; border-radius: 50%; background: #3a3c42; }
.terminal__bar i:first-child { background: #ff5f57; } .terminal__bar i:nth-child(2) { background: #febc2e; } .terminal__bar i:nth-child(3) { background: #28c840; }
.terminal__bar span { margin-left: 10px; color: var(--mute); text-transform: none; font-size: 12px; }
.terminal__body { margin: 0; padding: 22px; min-height: 360px; font-size: 13px; line-height: 1.7; text-transform: none; color: var(--ink-2); white-space: pre; overflow-x: auto; }
.terminal__body .k { color: #c792ea; } .terminal__body .s { color: var(--accent-text); } .terminal__body .c { color: #5d6068; } .terminal__body .n { color: #82aaff; } .terminal__body .p { color: var(--ink); }
.terminal__body code { background: none; padding: 0; border-radius: 0; font-size: inherit; }
.terminal__caret { display: inline-block; width: 8px; height: 1.1em; background: var(--accent); vertical-align: text-bottom; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.about__facts { display: grid; gap: 0; border-top: 1px solid var(--line); }
.fact { display: grid; grid-template-columns: 110px 1fr; gap: 16px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.fact__k { color: var(--mute); padding-top: 4px; }
.fact__v { font-size: 1.15rem; letter-spacing: -.01em; }
.fact__v small { color: var(--mute); font-size: .85rem; }

/* ---------- tags ---------- */
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tags li { font-size: 11px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink-2); text-transform: none; }

/* ---------- VIZZO ---------- */
.vizzo { position: relative; background: #f4efe4; color: #10233a; overflow: hidden; }
.vizzo__hero { position: relative; min-height: 92svh; display: flex; align-items: flex-end; overflow: hidden; }
.vizzo__bg { position: absolute; inset: -12% 0; }
.vizzo__bg img { width: 100%; height: 100%; object-fit: cover; object-position: 70% 40%; }
.vizzo__shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(16, 35, 58, .25) 0%, rgba(16, 35, 58, 0) 35%, rgba(16, 35, 58, .78) 100%); }
.vizzo__head { position: relative; z-index: 2; padding-bottom: clamp(48px, 7vw, 96px); color: #f4efe4; }
.vizzo__logo { width: clamp(220px, 34vw, 460px); height: auto; margin-bottom: 22px; }
.vizzo__claim { font-size: clamp(1.2rem, 2.2vw, 1.7rem); line-height: 1.3; letter-spacing: -.02em; max-width: 34ch; }
.vizzo__body { padding-top: clamp(64px, 9vw, 120px); padding-bottom: clamp(80px, 11vw, 150px); }
.vizzo__products { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(12px, 2vw, 28px); margin-bottom: clamp(56px, 8vw, 100px); }
.prod { background: #fff; border-radius: 20px; aspect-ratio: 1; position: relative; overflow: hidden; box-shadow: 0 30px 60px -36px rgba(16, 35, 58, .45); transition: transform .6s var(--ease); }
.prod img { width: 100%; height: 100%; object-fit: contain; transform: scale(.92); transition: transform 1s var(--ease); }
.prod:hover img { transform: scale(1) rotate(-3deg); }
.prod figcaption { position: absolute; left: 16px; bottom: 14px; color: #10233a; opacity: .65; font-size: 11px; }
.vizzo__features { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid rgba(16, 35, 58, .15); border-bottom: 1px solid rgba(16, 35, 58, .15); }
.feat { padding: clamp(24px, 3vw, 40px) clamp(16px, 2.4vw, 32px) clamp(24px, 3vw, 40px) 0; display: flex; flex-direction: column; gap: 10px; }
.feat + .feat { padding-left: clamp(16px, 2.4vw, 32px); border-left: 1px solid rgba(16, 35, 58, .15); }
.feat h4 { font-size: 1.35rem; letter-spacing: -.025em; font-weight: 600; line-height: 1.2; }
.feat p { color: #3c4f66; font-size: 15.5px; }
.feat code { background: rgba(16, 35, 58, .08); }
.vizzo__foot { display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap; margin-top: clamp(48px, 6vw, 72px); }
.stats { display: flex; gap: clamp(28px, 5vw, 72px); flex-wrap: wrap; }
.stat b { display: block; font-size: clamp(2.8rem, 6vw, 4.8rem); font-weight: 700; letter-spacing: -.05em; line-height: 1; }
.stat span { color: #56677c; font-size: 11px; }
.vizzo .btn--light { background: #10233a; color: #f4efe4; }
.vizzo .btn--light::before { background: #c58b4e; }
.vizzo .btn--light:hover { color: #10233a; }

/* ---------- GymFlow ---------- */
.gym { background: radial-gradient(80% 60% at 85% 40%, rgba(46, 204, 113, .10), transparent 70%), var(--bg); }
.gym__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 6vw, 100px); align-items: center; }
.gym__text { display: flex; flex-direction: column; gap: 24px; align-items: flex-start; }
.gym__text .sec-head { width: 100%; margin-bottom: 0; }
.gym__logo { width: 120px; height: auto; }
.gym .title-xl em { color: #2ecc71; }
.gym__desc { color: var(--ink-2); max-width: 52ch; }
.gym__list { display: grid; gap: 14px; width: 100%; }
.gym__list li { padding: 16px 18px; border: 1px solid var(--line); border-radius: 16px; color: var(--ink-2); font-size: 15px; background: rgba(17, 18, 21, .6); }
.gym__list b { display: block; color: var(--ink); font-size: 1.05rem; margin-bottom: 2px; }
.gym .tags li { border-color: rgba(46, 204, 113, .25); }

.gym__device { position: sticky; top: 8vh; align-self: start; display: grid; place-items: center; perspective: 1200px; padding: 40px 0; }
.phone {
  width: min(330px, 78vw); aspect-ratio: 9 / 19.2; border-radius: 48px; padding: 12px;
  background: linear-gradient(145deg, #2a2d33, #121317);
  box-shadow: 0 0 0 1px #3a3d44 inset, 0 60px 120px -40px rgba(46, 204, 113, .35), 0 40px 80px -30px rgba(0, 0, 0, .9);
  position: relative; transform-style: preserve-3d;
  transform: rotateY(var(--ry, -10deg)) rotateX(var(--rx, 6deg));
  transition: transform .5s var(--ease);
}
.phone__notch { position: absolute; top: 22px; left: 50%; transform: translateX(-50%); width: 92px; height: 26px; border-radius: 20px; background: #000; z-index: 3; }
.phone__screen { width: 100%; height: 100%; border-radius: 38px; overflow: hidden; background: #0f1923; }
.app { height: 100%; display: flex; flex-direction: column; gap: 12px; padding: 54px 16px 12px; color: #fff; font-size: 12px; }
.app small { color: #8fa3bf; font-size: 10.5px; display: block; }
.app__top { display: flex; justify-content: space-between; align-items: center; }
.app__top b { font-size: 18px; letter-spacing: -.02em; }
.app__avatar { width: 34px; height: 34px; border-radius: 50%; background: #2ecc71; color: #0f1923; display: grid; place-items: center; font-weight: 800; font-size: 11px; }
.app__hero { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 18px; background: linear-gradient(135deg, #1a3a5c, #222e42); }
.ring { width: 78px; height: 78px; transform: rotate(-90deg); flex-shrink: 0; }
.ring__bg { fill: none; stroke: rgba(255, 255, 255, .08); stroke-width: 9; }
.ring__fg { fill: none; stroke: #2ecc71; stroke-width: 9; stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: 100; transition: stroke-dashoffset 1.8s var(--ease) .3s; }
.ring__fg--b { stroke: #3498db; transition-delay: .55s; }
.gym.is-in .ring__fg { stroke-dashoffset: 28; }
.gym.is-in .ring__fg--b { stroke-dashoffset: 46; }
.app__heroTxt b { display: block; font-size: 16px; }
.app__heroTxt span { color: #8fa3bf; font-size: 11px; }
.app__cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.acard { background: #222e42; border-radius: 14px; padding: 10px 12px; }
.acard b { font-size: 17px; }
.app__chart { background: #1a2535; border-radius: 16px; padding: 10px 12px 6px; }
.app__chart svg { width: 100%; height: 60px; margin-top: 6px; }
.chart__line { stroke-dasharray: 100; stroke-dashoffset: 100; transition: stroke-dashoffset 2s var(--ease) .6s; }
.chart__area { opacity: 0; transition: opacity 1s 1.6s; }
.gym.is-in .chart__line { stroke-dashoffset: 0; }
.gym.is-in .chart__area { opacity: 1; }
.app__list { display: flex; flex-direction: column; gap: 6px; }
.ex { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 12px; background: #1e293b; opacity: 0; transform: translateY(10px); transition: opacity .6s, transform .6s var(--ease); }
.ex i { width: 16px; height: 16px; border-radius: 50%; border: 2px solid #2ecc71; flex-shrink: 0; }
.ex span { flex: 1; } .ex em { font-style: normal; color: #8fa3bf; font-family: var(--f-mono); font-size: 10px; }
.gym.is-in .ex { opacity: 1; transform: none; }
.gym.is-in .ex:nth-child(1) { transition-delay: 1s; } .gym.is-in .ex:nth-child(2) { transition-delay: 1.15s; } .gym.is-in .ex:nth-child(3) { transition-delay: 1.3s; }
.gym.is-in .ex:nth-child(1) i { background: #2ecc71; transition: background .3s 2.2s; }
.app__nav { margin-top: auto; display: flex; justify-content: space-around; padding: 10px 0 4px; border-top: 1px solid rgba(255, 255, 255, .06); }
.app__nav i { width: 20px; height: 20px; border-radius: 6px; background: rgba(255, 255, 255, .1); }
.app__nav i.on { background: #2ecc71; }
.gym__orbit { position: absolute; inset: 0; pointer-events: none; }
.gym__orbit span { position: absolute; font-family: var(--f-mono); font-size: 11px; text-transform: uppercase; padding: 8px 12px; border-radius: 999px; background: rgba(17, 18, 21, .85); border: 1px solid rgba(46, 204, 113, .3); color: #8ff0b6; backdrop-filter: blur(6px); animation: bob 5s ease-in-out infinite; }
.gym__orbit span:nth-child(1) { left: 2%; top: 22%; }
.gym__orbit span:nth-child(2) { right: 0; top: 50%; animation-delay: -1.6s; }
.gym__orbit span:nth-child(3) { left: 8%; bottom: 14%; animation-delay: -3.2s; }
@keyframes bob { 50% { transform: translateY(-14px); } }

/* ---------- more projects ---------- */
.more .title-xl { margin-bottom: clamp(40px, 6vw, 72px); }
.more__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.pcard {
  position: relative; display: flex; flex-direction: column; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line); background: var(--bg-2);
  transition: transform .6s var(--ease), border-color .4s;
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
}
.pcard::before {
  content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none; opacity: 0; transition: opacity .4s;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(70, 100, 255, .10), transparent 45%);
}
.pcard:hover { border-color: rgba(70, 100, 255, .3); }
.pcard:hover::before { opacity: 1; }
.pcard__viz { height: 190px; position: relative; background: var(--bg-3); border-bottom: 1px solid var(--line); overflow: hidden; }
.pcard__body { padding: 24px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.pcard__k { color: var(--accent-text); font-size: 11px; }
.pcard h3 { font-size: 1.7rem; letter-spacing: -.035em; font-weight: 600; line-height: 1.1; }
.pcard p { color: var(--ink-2); font-size: 15px; margin-bottom: 8px; }
.pcard .tags { margin-top: auto; }
.pcard__arrow { position: absolute; right: 18px; top: 18px; z-index: 3; width: 42px; height: 42px; border-radius: 50%; background: var(--bg); border: 1px solid var(--line); display: grid; place-items: center; transition: transform .5s var(--ease), background .3s, color .3s; }
.pcard:hover .pcard__arrow { transform: rotate(45deg); background: var(--accent); color: var(--accent-ink); }

.pcard__viz--park { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; padding: 26px 22px; }
.pcard__viz--park i { border: 1.5px dashed rgba(236, 232, 223, .2); border-radius: 6px; position: relative; }
.pcard__viz--park i::after { content: ""; position: absolute; inset: 4px; border-radius: 4px; background: rgba(70, 100, 255, .18); border: 1px solid var(--accent); }
.pcard__viz--park i.busy::after { background: rgba(255, 95, 87, .18); border-color: #ff5f57; animation: park 4s ease-in-out infinite; }
.pcard__viz--park i.busy:nth-child(4)::after { animation-delay: -1s; } .pcard__viz--park i.busy:nth-child(8)::after { animation-delay: -2.4s; }
@keyframes park { 0%, 60% { background: rgba(255, 95, 87, .18); border-color: #ff5f57; } 70%, 100% { background: rgba(70, 100, 255, .18); border-color: var(--accent); } }
.pcard__viz--park::after { content: ""; position: absolute; left: 0; right: 0; height: 30%; top: -30%; background: linear-gradient(transparent, rgba(70, 100, 255, .14), transparent); animation: scan 3s linear infinite; }
@keyframes scan { to { top: 100%; } }

.pcard__viz--anom { color: var(--ink-2); padding: 30px 20px; }
.pcard__viz--anom svg { width: 100%; height: 100%; overflow: visible; }
.pcard__viz--anom polyline { stroke-dasharray: 100; stroke-dashoffset: 100; transition: stroke-dashoffset 2.2s var(--ease); }
.pcard.is-in .pcard__viz--anom polyline { stroke-dashoffset: 0; }
.pcard__viz--anom b { position: absolute; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%; border: 2px solid #ff5f57; opacity: 0; }
.pcard.is-in .pcard__viz--anom b { animation: ping 2s 1.6s infinite; }
@keyframes ping { 0% { opacity: 1; transform: scale(.6); } 100% { opacity: 0; transform: scale(2.4); } }

.pcard__viz--f1 { display: flex; align-items: flex-end; gap: 10px; padding: 28px 22px 0; }
.pcard__viz--f1 i { flex: 1; height: var(--h); background: linear-gradient(var(--accent), rgba(70, 100, 255, .12)); border-radius: 6px 6px 0 0; transform: scaleY(0); transform-origin: bottom; transition: transform 1.2s var(--ease); }
.pcard__viz--f1 i:nth-child(2n) { background: linear-gradient(#e10600, rgba(225, 6, 0, .12)); }
.pcard.is-in .pcard__viz--f1 i { transform: scaleY(1); }
.pcard__viz--f1 i:nth-child(2) { transition-delay: .08s; } .pcard__viz--f1 i:nth-child(3) { transition-delay: .16s; } .pcard__viz--f1 i:nth-child(4) { transition-delay: .24s; } .pcard__viz--f1 i:nth-child(5) { transition-delay: .32s; } .pcard__viz--f1 i:nth-child(6) { transition-delay: .4s; } .pcard__viz--f1 i:nth-child(7) { transition-delay: .48s; } .pcard__viz--f1 i:nth-child(8) { transition-delay: .56s; }

/* ---------- experience ---------- */
.exp .title-xl { margin-bottom: clamp(40px, 6vw, 72px); }
.timeline { position: relative; padding-left: 0; }
.timeline__line { position: absolute; left: 220px; top: 8px; bottom: 8px; width: 1px; background: var(--line); }
.timeline__line i { position: absolute; left: 0; top: 0; width: 100%; height: 100%; background: var(--accent); transform-origin: top; transform: scaleY(var(--t, 0)); }
.tl { display: grid; grid-template-columns: 220px 1fr; gap: 0; padding: 0 0 clamp(36px, 5vw, 60px); position: relative; }
.tl::before { content: ""; position: absolute; left: 220px; top: 10px; width: 11px; height: 11px; margin-left: -5px; border-radius: 50%; background: var(--bg); border: 1.5px solid var(--accent); }
.tl__when { color: var(--mute); padding-top: 6px; padding-right: 24px; }
.tl__body { padding-left: clamp(28px, 4vw, 56px); max-width: 760px; }
.tl h3 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); letter-spacing: -.035em; font-weight: 600; line-height: 1.15; margin-bottom: 10px; }
.tl h3 small { display: block; font-size: .95rem; font-weight: 400; color: var(--accent-text); letter-spacing: 0; margin-top: 4px; }
.tl p { color: var(--ink-2); }

.skills { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: clamp(40px, 6vw, 80px); }
.skills__col { padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-2); }
.skills__col h4 { color: var(--accent-text); margin-bottom: 12px; font-weight: 500; }
.skills__col p { color: var(--ink-2); font-size: 15.5px; }

/* ---------- contact ---------- */
.contact { position: relative; padding-top: clamp(100px, 14vw, 200px); background: var(--accent); color: var(--accent-ink); overflow: hidden; }
.contact ::selection { background: var(--bg); color: var(--accent-text); }
.contact__k { display: block; margin-bottom: 24px; }
.contact__title { font-size: clamp(3.4rem, 12vw, 11.5rem); font-weight: 700; letter-spacing: -.06em; line-height: .88; margin-bottom: clamp(40px, 6vw, 72px); }
.contact__title em { font-style: normal; font-weight: 300; }
.contact.is-in .split .char { transform: none; transition: transform 1.1s var(--ease); transition-delay: calc(var(--ci) * .03s); }
.contact__mail { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; text-align: left; margin-bottom: 40px; }
.contact__mailTxt { font-size: clamp(1.5rem, 4.4vw, 3.4rem); font-weight: 500; letter-spacing: -.035em; background: linear-gradient(currentColor, currentColor) 0 100% / 0 2px no-repeat; transition: background-size .6s var(--ease); word-break: break-all; }
.contact__mail:hover .contact__mailTxt { background-size: 100% 2px; }
.contact__mailHint { opacity: .6; font-size: 11px; }
.contact__links { display: flex; flex-wrap: wrap; gap: 10px; }
.contact__links a { display: inline-flex; align-items: center; gap: 10px; padding: 14px 22px; border-radius: 999px; border: 1.5px solid var(--accent-ink); font-weight: 600; transition: background .3s, color .3s; }
.contact__links a:hover { background: var(--accent-ink); color: var(--accent); }

.footer { margin-top: clamp(80px, 12vw, 160px); background: var(--bg); color: var(--ink); position: relative; overflow: hidden; }
.footer__big { font-size: clamp(3.4rem, 15vw, 15rem); font-weight: 800; letter-spacing: -.035em; line-height: .78; white-space: nowrap; text-align: center; padding-top: 40px; color: transparent; -webkit-text-stroke: 1px rgba(236, 232, 223, .18); transform: translateY(var(--fy, 20%)); }
.footer__row { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-top: 28px; padding-bottom: calc(28px + env(safe-area-inset-bottom)); color: var(--mute); border-top: 1px solid var(--line); position: relative; background: var(--bg); }
.footer__row a:hover { color: var(--accent-text); }

.toast { position: fixed; left: 50%; bottom: 28px; z-index: 320; transform: translate(-50%, 140%); background: var(--ink); color: var(--bg); padding: 12px 18px; border-radius: 999px; transition: transform .5s var(--ease); pointer-events: none; }
.toast.is-on { transform: translate(-50%, 0); }

[data-magnetic] { will-change: transform; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1100px) {
  .nav__links { display: none; }
  .nav__cta { display: none; }
  .nav__burger { display: block; }
  .hero__scroll { display: none; }
  .skills { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  body { font-size: 16px; }
  .hide-sm { display: none; }
  .hero { padding-top: 96px; padding-bottom: 32px; }
  .hero { --sh: min(62svh, 140vw); --me-bottom: 24svh; }
  .hero__me { -webkit-mask-image: linear-gradient(to bottom, #000 55%, transparent 88%); mask-image: linear-gradient(to bottom, #000 55%, transparent 88%); }
  .hero__actions { width: 100%; }
  .hero__actions .btn { flex: 1; justify-content: center; }

  .about__grid { grid-template-columns: 1fr; }
  .terminal__body { min-height: 300px; font-size: 11px; padding: 16px; }
  .fact { grid-template-columns: 90px 1fr; }



  .vizzo__hero { min-height: 80svh; }
  .vizzo__products { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .prod { border-radius: 14px; }
  .prod figcaption { display: none; }
  .vizzo__features { grid-template-columns: 1fr; }
  .feat, .feat + .feat { padding-left: 0; padding-right: 0; border-left: 0; }
  .feat + .feat { border-top: 1px solid rgba(16, 35, 58, .15); }

  .gym__grid { grid-template-columns: 1fr; }
  .gym__device { order: -1; position: relative; top: auto; }
  .more__grid { grid-template-columns: 1fr; }

  .timeline__line, .tl::before { left: 5px; }
  .tl { grid-template-columns: 1fr; padding-left: 30px; }
  .tl__when { padding: 0 0 6px; color: var(--accent-text); }
  .tl__body { padding-left: 0; }
  .tl h3 small { color: var(--mute); }
}

@media (max-width: 560px) {
  .skills { grid-template-columns: 1fr; }
  .footer__row { flex-direction: column; align-items: flex-start; gap: 8px; }
  .gym__orbit span:nth-child(2) { right: -4px; }
  .contact__links a { flex: 1 1 calc(50% - 10px); justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .reveal, .reveal-lines .line > span, .split .char { opacity: 1 !important; transform: none !important; }
  .hero__me { opacity: 1; translate: none; }
  .about__statement .w { opacity: 1; }
  .ex { opacity: 1 !important; transform: none !important; }
}
