/* ==========================================================================
   Luís Mendes — Portfolio
   ========================================================================== */

:root {
  --bg: #FAFAFA;
  --bg-elev: #FFFFFF;
  --bg-tint: #F2F2F3;
  --bg-sunken: #F6F6F7;
  --fg: #0A0A0A;
  --fg-soft: #3A3A3A;
  --fg-muted: #8A8A8A;
  --fg-faint: #C4C4C4;
  --line: rgba(10, 10, 10, 0.07);
  --line-strong: rgba(10, 10, 10, 0.14);
  --accent: #7C5CFF;
  --accent-soft: #B4A1FF;
  --accent-tint: #EFEBFF;
  --accent-deep: #4C36B8;

  --font-sans: 'Geist', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'Geist Mono', 'JetBrains Mono', ui-monospace, monospace;
  --font-serif: 'Instrument Serif', 'Cormorant Garamond', Georgia, serif;

  /* Easings — premium is the "iOS-like" smooth one used for everything
     that the user directly interacts with. ease-out is kept for compat. */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-premium: cubic-bezier(0.16, 1, 0.3, 1);

  /* Radius system — sm for chips, md for controls, lg for cards,
     xl for big surfaces (modal/portrait), pill for CTAs. */
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-pill: 999px;

  /* Shadow system — layered depth. Each level includes a subtle 1px
     inset-like border via 0 0 0 1px so we can retire hard 1px borders. */
  --shadow-sm:
    0 1px 2px rgba(10,10,10,0.04),
    0 0 0 1px rgba(10,10,10,0.04);
  --shadow-md:
    0 6px 20px -8px rgba(10,10,10,0.10),
    0 2px 6px -2px rgba(10,10,10,0.04),
    0 0 0 1px rgba(10,10,10,0.04);
  --shadow-lg:
    0 24px 48px -12px rgba(10,10,10,0.14),
    0 8px 16px -6px rgba(10,10,10,0.06),
    0 0 0 1px rgba(10,10,10,0.05);
  --shadow-xl:
    0 40px 80px -16px rgba(10,10,10,0.22),
    0 16px 32px -8px rgba(10,10,10,0.10);

  --max-w: 1440px;
  --gutter: 32px;
}

[data-theme="dark"] {
  --bg: #0A0A0C;
  --bg-elev: #131316;
  --bg-tint: #17171B;
  --bg-sunken: #0F0F12;
  --fg: #F5F5F5;
  --fg-soft: #C9C9C9;
  --fg-muted: #7A7A7A;
  --fg-faint: #3A3A3A;
  --line: rgba(245, 245, 245, 0.08);
  --line-strong: rgba(245, 245, 245, 0.16);
  --accent: #9B82FF;
  --accent-soft: #7C5CFF;
  --accent-tint: rgba(124, 92, 255, 0.12);
  --accent-deep: #C4B5FD;
  --shadow-sm:
    0 1px 2px rgba(0,0,0,0.3),
    0 0 0 1px rgba(245,245,245,0.06);
  --shadow-md:
    0 6px 20px -8px rgba(0,0,0,0.5),
    0 2px 6px -2px rgba(0,0,0,0.3),
    0 0 0 1px rgba(245,245,245,0.06);
  --shadow-lg:
    0 24px 48px -12px rgba(0,0,0,0.6),
    0 8px 16px -6px rgba(0,0,0,0.35),
    0 0 0 1px rgba(245,245,245,0.08);
  --shadow-xl:
    0 40px 80px -16px rgba(0,0,0,0.7),
    0 16px 32px -8px rgba(0,0,0,0.45);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--fg);
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: -0.011em;
  line-height: 1.5;
  overflow-x: hidden;
  cursor: none;
  transition: background 0.4s var(--ease-out), color 0.4s var(--ease-out);
}

@media (max-width: 900px) {
  body { cursor: auto; }
  .cursor-dot, .cursor-ring { display: none !important; }
}

::selection {
  background: var(--accent);
  color: white;
}

a, button {
  color: inherit;
  text-decoration: none;
  background: none;
  border: none;
  font-family: inherit;
  cursor: none;
}

@media (max-width: 900px) {
  a, button { cursor: pointer; }
}

img, svg, video {
  display: block;
  max-width: 100%;
}

/* ============ CURSOR ============ */
.cursor-dot, .cursor-ring {
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  z-index: 9999;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  mix-blend-mode: difference;
}
.cursor-dot {
  width: 6px; height: 6px;
  background: white;
  transition: transform 0.15s var(--ease-out), width 0.2s, height 0.2s;
}
.cursor-ring {
  width: 36px; height: 36px;
  border: 1px solid rgba(255,255,255,0.6);
  transition: transform 0.35s var(--ease-out), width 0.25s, height 0.25s, border-color 0.25s;
}
body.cursor-hover .cursor-dot {
  width: 0; height: 0;
}
body.cursor-hover .cursor-ring {
  width: 60px; height: 60px;
  border-color: rgba(255,255,255,0.95);
}

/* ============ LAYOUT ============ */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

@media (max-width: 640px) {
  :root { --gutter: 20px; }
}

/* ============ NAV ============ */
/* Floating pill — the wrapper has pointer-events: none so clicks in the
   gap around the pill pass through to the page below. Only the pill
   itself (.nav-inner) captures interactions. */
.nav {
  position: fixed;
  top: 18px;
  left: 0;
  right: 0;
  z-index: 100;
  /* max(...) lets the pill stay well-separated from viewport edges on
     any screen width — floor of 24px on narrow devices, scales on wide. */
  padding: 0 max(24px, 4vw);
  pointer-events: none;
  transition: top 0.3s var(--ease-premium);
}
.nav.scrolled {
  /* Same pill when scrolled — we just nudge the shadow slightly for depth */
}
.nav.scrolled .nav-inner {
  box-shadow:
    0 10px 32px -8px rgba(10,10,10,0.12),
    0 2px 4px rgba(10,10,10,0.05);
}
.nav-inner {
  pointer-events: auto;
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 10px 20px 10px 30px;
  background: color-mix(in oklab, var(--bg-elev) 78%, transparent);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  box-shadow:
    0 4px 24px -6px rgba(10,10,10,0.08),
    0 1px 2px rgba(10,10,10,0.04);
  transition: box-shadow 0.4s var(--ease-premium), background 0.3s var(--ease-premium);
}

@media (max-width: 900px) {
  .nav { top: 12px; }
  .nav-inner { padding: 10px 14px 10px 20px; gap: 12px; }
}

@media (max-width: 480px) {
  .nav-inner { padding: 8px 12px 8px 16px; gap: 8px; }
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
  font-size: 15px;
  letter-spacing: -0.015em;
}
.nav-logo-mark {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--bg-tint);
  display: grid;
  place-items: center;
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
}
.nav-logo-mark img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 20%;
}
.nav-logo-name {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}
.nav-logo-name strong { font-weight: 500; font-size: 14.5px; letter-spacing: -0.01em; }
.nav-logo-name small { font-family: var(--font-mono); font-size: 10px; color: var(--fg-muted); letter-spacing: 0.08em; text-transform: uppercase; }

.nav-links {
  display: flex;
  gap: 28px;
}
.nav-link {
  font-size: 13px;
  color: var(--fg-soft);
  transition: color 0.2s var(--ease-out);
  position: relative;
  padding: 6px 0;
  letter-spacing: -0.005em;
}
.nav-link:hover { color: var(--fg); }
.nav-link::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: var(--fg);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease-out);
}
.nav-link.active::after { transform: scaleX(1); }
.nav-link.active { color: var(--fg); }

.nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
}
.nav-toggle {
  display: flex;
  border: 1px solid var(--line);
  font-size: 12px;
  font-family: var(--font-mono);
  background: var(--bg-elev);
  overflow: hidden;
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-sm);
}
.nav-toggle button {
  padding: 8px 14px;
  color: var(--fg-muted);
  transition: all 0.3s var(--ease-premium);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.nav-toggle button.on {
  background: var(--fg);
  color: var(--bg);
}

.theme-btn {
  width: 36px; height: 36px;
  border: 1px solid var(--line);
  background: var(--bg-elev);
  display: grid;
  place-items: center;
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.25s var(--ease-premium), background 0.25s var(--ease-premium), transform 0.25s var(--ease-premium);
}
.theme-btn:hover { border-color: var(--line-strong); background: var(--bg-tint); transform: scale(1.05); }

.nav-cta {
  padding: 11px 20px;
  background: var(--fg);
  color: var(--bg);
  font-size: 12.5px;
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-md);
  transition: transform 0.3s var(--ease-premium), box-shadow 0.3s var(--ease-premium), background 0.25s;
}
.nav-cta:hover { transform: translateY(-1px) scale(0.98); box-shadow: var(--shadow-lg); }
.nav-cta-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 10px #4ade80;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* ============ MOBILE NAV ============ */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-cta span { display: none; }
}

/* ============ TYPOGRAPHY ============ */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-muted);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: '';
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.section-num {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--fg-muted);
  text-transform: uppercase;
}

h1, h2, h3, h4 {
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.02;
}
h1 { font-size: clamp(48px, 9vw, 140px); }
h2 { font-size: clamp(36px, 6vw, 88px); letter-spacing: -0.03em; }
h3 { font-size: clamp(22px, 2.5vw, 32px); letter-spacing: -0.02em; line-height: 1.15; }

.serif { font-family: var(--font-serif); font-style: italic; font-weight: 400; letter-spacing: -0.02em; }

/* ============ SECTION SHELL ============ */
section {
  padding: 120px 0;
  position: relative;
}
@media (max-width: 640px) {
  section { padding: 80px 0; }
}

.section-header {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 48px;
  margin-bottom: 64px;
  align-items: start;
}
.section-header-label {
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: sticky;
  top: 100px;
}
@media (max-width: 900px) {
  .section-header { grid-template-columns: 1fr; gap: 20px; }
  .section-header-label { position: static; flex-direction: row; align-items: center; gap: 14px; }
}

/* ============ SCROLL REVEAL ============ */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 1s var(--ease-premium), transform 1s var(--ease-premium);
  transition-delay: var(--d, 0ms);
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

.split-char {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.4em);
  transition: opacity 0.9s var(--ease-premium), transform 0.9s var(--ease-premium);
  transition-delay: calc(var(--i, 0) * 18ms);
}
/* Word wrapper: keeps chars atomic (no mid-word break) while still letting
   the browser break on whitespace between words. */
.split-word {
  display: inline-block;
  white-space: nowrap;
}
.split-space {
  /* real break opportunity between words */
  white-space: normal;
  display: inline;
}
.in .split-char { opacity: 1; transform: translateY(0); }

/* ============ HERO ============ */
.hero {
  min-height: 100vh;
  padding: 132px 0 72px;
  position: relative;
  overflow: hidden;
  background: var(--bg);
}
/* Canvas extends slightly beyond the hero bounds + light blur
   → no visible edges, orbs blend into a soft mesh. */
.hero-canvas {
  position: absolute;
  top: -8%;
  left: -8%;
  width: 116%;
  height: 116%;
  z-index: 0;
  display: block;
  pointer-events: none;
  filter: blur(22px) saturate(108%);
  will-change: filter;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, color-mix(in oklab, var(--bg) 50%, transparent) 0%, transparent 20%, transparent 80%, var(--bg) 100%);
  pointer-events: none;
}
.hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
}
.hero-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-muted);
}
.hero-meta > div { display: flex; gap: 10px; align-items: center; }
.hero-meta strong { color: var(--fg); font-weight: 500; }

.hero-title {
  font-size: clamp(44px, 8.4vw, 128px);
  line-height: 0.96;
  letter-spacing: -0.04em;
  font-weight: 500;
  margin-top: 12px;
}
.hero-title .line { display: block; overflow: hidden; }
.hero-title em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
  letter-spacing: -0.025em;
}

.hero-bottom {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: end;
  margin-top: 20px;
}
@media (max-width: 900px) {
  .hero-bottom { grid-template-columns: 1fr; gap: 20px; }
}
@media (max-width: 640px) {
  .hero {
    min-height: auto;
    padding: 96px 0 40px;
  }
  .hero-inner { gap: 18px; }
  .hero-title { margin-top: 8px; }
  .hero-bottom { margin-top: 14px; gap: 14px; }
  .hero-description { font-size: 15.5px; }
  .hero-actions { gap: 10px; }
  .hero-actions .btn { padding: 15px 22px; font-size: 12.5px; }
}
.hero-description {
  max-width: 440px;
  font-size: 17px;
  line-height: 1.5;
  color: var(--fg-soft);
}
.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.magnetic {
  display: inline-block;
  transition: transform 0.3s var(--ease-out);
}
.btn {
  padding: 17px 30px;
  font-size: 13px;
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  border-radius: var(--radius-pill);
  transition: transform 0.35s var(--ease-premium), box-shadow 0.35s var(--ease-premium), background 0.3s var(--ease-premium), color 0.3s;
  white-space: nowrap;
}
.btn-primary {
  background: var(--fg);
  color: var(--bg);
  box-shadow: var(--shadow-md);
}
.btn-primary:hover {
  background: var(--accent);
  color: white;
  box-shadow: 0 20px 40px -12px color-mix(in oklab, var(--accent) 45%, transparent), var(--shadow-md);
  transform: translateY(-1px);
}
.btn-secondary {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  color: var(--fg);
  box-shadow: var(--shadow-sm);
}
.btn-secondary:hover {
  background: var(--bg-tint);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}
.btn-arrow {
  transition: transform 0.35s var(--ease-premium);
}
.btn:hover .btn-arrow { transform: translate(3px, -3px); }

/* ============ MARQUEE ============ */
.marquee {
  overflow: hidden;
  padding: 32px 0;
  mask-image: linear-gradient(90deg, transparent, black 10%, black 90%, transparent);
}
.marquee-track {
  display: flex;
  gap: 64px;
  white-space: nowrap;
  animation: marquee 40s linear infinite;
  width: max-content;
}
.marquee-item {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--fg-muted);
  letter-spacing: 0.02em;
}
.marquee-item svg { color: var(--accent); }
.marquee-item .dot {
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--fg-faint);
}
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ============ SERVICES ============ */
.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
@media (max-width: 900px) { .services-grid { grid-template-columns: 1fr; } }

.service {
  padding: 44px 40px;
  background: var(--bg-elev);
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: transform 0.5s var(--ease-premium), box-shadow 0.5s var(--ease-premium), background 0.3s;
}
.service:hover {
  background: var(--bg-elev);
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}
.service-num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-muted);
  letter-spacing: 0.12em;
  margin-bottom: 32px;
}
.service-title {
  font-size: 28px;
  letter-spacing: -0.02em;
  font-weight: 500;
  margin-bottom: 14px;
}
.service-title em { font-family: var(--font-serif); font-style: italic; color: var(--accent); }
.service-desc {
  color: var(--fg-soft);
  font-size: 15px;
  margin-bottom: 28px;
  max-width: 420px;
}
.service-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.tag {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  background: color-mix(in oklab, var(--fg) 5%, transparent);
  border: 1px solid var(--line);
  color: var(--fg-soft);
  text-transform: uppercase;
  transition: background 0.25s var(--ease-premium), color 0.25s;
}
.tag:hover { background: color-mix(in oklab, var(--fg) 10%, transparent); color: var(--fg); }

/* ============ ABOUT ============ */
.about-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 80px;
  align-items: start;
}
@media (max-width: 900px) { .about-grid { grid-template-columns: 1fr; gap: 48px; } }

.about-text {
  font-size: clamp(22px, 2.2vw, 30px);
  line-height: 1.35;
  letter-spacing: -0.015em;
  color: var(--fg);
  font-weight: 400;
}
.about-text em { font-family: var(--font-serif); font-style: italic; color: var(--accent); font-weight: 400; }
.about-text p + p { margin-top: 24px; }

.about-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 40px;
}
.stat {
  padding: 28px 24px;
  background: var(--bg-elev);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: transform 0.4s var(--ease-premium), box-shadow 0.4s var(--ease-premium);
}
.stat:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.stat-num {
  font-size: 44px;
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 8px;
}
.stat-num em { font-family: var(--font-serif); font-style: italic; color: var(--accent); font-weight: 400; }
.stat-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-muted);
}

.about-portrait {
  position: sticky;
  top: 100px;
}
.portrait-card {
  aspect-ratio: 3/4;
  background: var(--bg-tint);
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
}
.portrait-photo {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  filter: grayscale(0.15) contrast(1.02);
  transition: transform 1.2s var(--ease-out), filter 0.6s;
}
.portrait-card:hover .portrait-photo {
  transform: scale(1.04);
  filter: grayscale(0) contrast(1.05);
}
.portrait-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,0.45) 100%);
  pointer-events: none;
}
.portrait-label {
  position: relative;
  z-index: 2;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: white;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  display: flex;
  justify-content: space-between;
  mix-blend-mode: difference;
}
.portrait-caption {
  position: relative;
  z-index: 2;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 22px;
  color: white;
  line-height: 1.25;
  max-width: 260px;
}

/* ============ PROCESS ============ */
.process-list {
  display: flex;
  flex-direction: column;
}
.process-item {
  display: grid;
  grid-template-columns: 80px 1fr 2fr 280px;
  gap: 40px;
  padding: 36px 24px;
  border-top: 1px solid var(--line);
  border-radius: var(--radius-md);
  align-items: start;
  transition: padding 0.5s var(--ease-premium), background 0.4s var(--ease-premium), box-shadow 0.4s var(--ease-premium);
  position: relative;
}
.process-item:last-child { border-bottom: 1px solid var(--line); }
.process-item:hover {
  padding-left: 36px;
  background: var(--bg-elev);
  box-shadow: var(--shadow-sm);
}
.process-item:hover .process-title { color: var(--accent); }
@media (max-width: 900px) {
  .process-item { grid-template-columns: 60px 1fr; gap: 20px; }
  .process-item > *:nth-child(3), .process-item > *:nth-child(4) { grid-column: 2; }
}
.process-num {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--fg-muted);
  letter-spacing: 0.08em;
  padding-top: 4px;
}
.process-title {
  font-size: clamp(24px, 3vw, 40px);
  letter-spacing: -0.025em;
  font-weight: 500;
  line-height: 1.05;
  transition: color 0.3s var(--ease-out);
}
.process-title em { font-family: var(--font-serif); font-style: italic; color: var(--accent); }
.process-desc {
  color: var(--fg-soft);
  font-size: 15.5px;
  line-height: 1.55;
  max-width: 460px;
}
.process-output {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.process-output-label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--fg-muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.process-output-items {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* ============ PROJECTS ============ */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 20px;
}
.project {
  position: relative;
  overflow: hidden;
  background: var(--bg-elev);
  aspect-ratio: 4/3;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: transform 0.6s var(--ease-premium), box-shadow 0.6s var(--ease-premium);
  display: flex;
  flex-direction: column;
  will-change: transform;
}
.project:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}
.project-large { grid-column: span 7; }
.project-small { grid-column: span 5; }
.project-full { grid-column: span 12; aspect-ratio: 21/9; }
.project-half { grid-column: span 6; aspect-ratio: 4/3; }
@media (max-width: 900px) {
  .project-large, .project-small, .project-half, .project-full { grid-column: span 12; aspect-ratio: 4/3; }
}

.project-visual {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.project-content {
  position: relative;
  z-index: 2;
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  color: var(--fg);
}
.project-top {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 16px;
}
.project-tag {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 6px 12px;
  background: color-mix(in oklab, var(--bg) 75%, transparent);
  backdrop-filter: blur(12px) saturate(140%);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  color: var(--fg-soft);
  box-shadow: var(--shadow-sm);
}
.project-year {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-muted);
  letter-spacing: 0.06em;
}
.project-bottom {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}
.project-name {
  font-size: clamp(22px, 2.4vw, 34px);
  letter-spacing: -0.02em;
  font-weight: 500;
  line-height: 1.05;
}
.project-name em { font-family: var(--font-serif); font-style: italic; color: var(--accent); }
.project-arrow {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--fg);
  color: var(--bg);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  transition: transform 0.3s var(--ease-out), background 0.25s;
}
.project:hover .project-arrow {
  background: var(--accent);
  color: white;
  transform: rotate(-45deg);
}

/* ============ PROJECT IMAGE (card) ============ */
.project-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ============ PROJECT MODAL ============ */
.project-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: color-mix(in oklab, var(--bg) 60%, transparent);
  backdrop-filter: blur(24px) saturate(140%);
  -webkit-backdrop-filter: blur(24px) saturate(140%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px;
  animation: pm-fade 0.3s var(--ease-out);
  cursor: auto;
}
@media (max-width: 900px) {
  .project-modal-backdrop { padding: 16px; }
}
@keyframes pm-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.project-modal {
  position: relative;
  background: var(--bg-elev);
  width: 100%;
  max-width: 1040px;
  max-height: 90vh;
  overflow-y: auto;
  overflow-x: hidden;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  animation: pm-rise 0.5s var(--ease-premium);
}
@keyframes pm-rise {
  from { opacity: 0; transform: translateY(24px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.project-modal-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--bg-tint);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}
.project-modal-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.project-modal-image svg {
  width: 100%;
  height: 100%;
  display: block;
}

.project-modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-pill);
  background: color-mix(in oklab, var(--bg-elev) 85%, transparent);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  color: var(--fg);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: background 0.3s var(--ease-premium), color 0.3s, transform 0.3s var(--ease-premium), box-shadow 0.3s var(--ease-premium);
  z-index: 2;
}
.project-modal-close:hover {
  background: var(--fg);
  color: var(--bg);
  transform: scale(1.06);
  box-shadow: var(--shadow-md);
}

.project-modal-content {
  padding: 40px 48px 48px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
@media (max-width: 640px) {
  .project-modal-content { padding: 28px 24px 32px; gap: 16px; }
}

.project-modal-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-muted);
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.project-modal-title {
  font-size: clamp(28px, 3.6vw, 48px);
  letter-spacing: -0.03em;
  line-height: 1.03;
  font-weight: 500;
}
.project-modal-title em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
}

.project-modal-desc {
  color: var(--fg-soft);
  font-size: 17px;
  line-height: 1.55;
  max-width: 680px;
}

.project-modal-tech-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}
.project-modal-tech-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-muted);
}
.project-modal-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.project-modal-live {
  align-self: flex-start;
  margin-top: 12px;
}

/* ============ STACK ============ */
.stack-wrapper {
  /* container now just groups the grid — no shared borders */
}
.stack-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
@media (max-width: 900px) { .stack-grid { grid-template-columns: repeat(2, 1fr); } }
.stack-item {
  padding: 28px 24px;
  background: var(--bg-elev);
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 160px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: transform 0.4s var(--ease-premium), box-shadow 0.4s var(--ease-premium), background 0.3s;
}
.stack-item:hover {
  background: var(--bg-elev);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.stack-icon {
  width: 32px; height: 32px;
  color: var(--fg);
  display: grid;
  place-items: center;
}
.stack-name {
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -0.015em;
}
.stack-desc {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-muted);
  letter-spacing: 0.04em;
  margin-top: auto;
}

/* ============ TESTIMONIALS ============ */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
@media (max-width: 900px) { .testimonials-grid { grid-template-columns: 1fr; } }
.testimonial {
  padding: 40px;
  background: var(--bg-elev);
  display: flex;
  flex-direction: column;
  gap: 24px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: transform 0.45s var(--ease-premium), box-shadow 0.45s var(--ease-premium);
}
.testimonial:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.testimonial-quote {
  font-size: 19px;
  line-height: 1.45;
  letter-spacing: -0.012em;
  color: var(--fg);
}
.testimonial-quote em { font-family: var(--font-serif); font-style: italic; color: var(--accent); font-weight: 400; }
.testimonial-author {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.testimonial-avatar {
  width: 44px; height: 44px;
  border-radius: var(--radius-pill);
  background: var(--bg-tint);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  color: var(--fg);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.02em;
  font-family: var(--font-mono);
  box-shadow: var(--shadow-sm);
}
.testimonial-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.testimonial-name { font-size: 14.5px; font-weight: 500; }
.testimonial-role { font-family: var(--font-mono); font-size: 11px; color: var(--fg-muted); letter-spacing: 0.04em; }

/* ============ FAQ ============ */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.faq-item {
  border-radius: var(--radius-md);
  padding: 0 24px;
  background: var(--bg-elev);
  box-shadow: var(--shadow-sm);
  transition: background 0.35s var(--ease-premium), box-shadow 0.35s var(--ease-premium);
}
.faq-item:hover { box-shadow: var(--shadow-md); }
.faq-item.open { box-shadow: var(--shadow-md); }
.faq-q {
  width: 100%;
  text-align: left;
  padding: 28px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  font-size: clamp(18px, 1.8vw, 22px);
  letter-spacing: -0.015em;
  font-weight: 500;
  transition: color 0.3s;
}
.faq-q:hover { color: var(--accent); }
.faq-icon {
  width: 34px; height: 34px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  background: var(--bg);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  transition: transform 0.5s var(--ease-premium), background 0.3s, color 0.3s, border-color 0.3s;
  font-size: 16px;
}
.faq-item.open .faq-icon {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
  transform: rotate(45deg);
}
.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s var(--ease-out);
  color: var(--fg-soft);
  font-size: 16px;
  line-height: 1.55;
}
.faq-item.open .faq-a { max-height: 240px; }
.faq-a-inner { padding: 0 0 28px; max-width: 680px; }

/* ============ CTA ============ */
.cta {
  padding: 180px 0;
  position: relative;
  overflow: hidden;
  background: var(--bg);
}
/* Same treatment as the hero canvas: overshoot + blur to erase any visible
   edge between the orb falloff and the page background. */
.cta-bg {
  position: absolute;
  top: -8%;
  left: -8%;
  width: 116%;
  height: 116%;
  z-index: 0;
  display: block;
  pointer-events: none;
  filter: blur(22px) saturate(108%);
  will-change: filter;
}
.cta::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, var(--bg) 0%, transparent 15%, transparent 85%, var(--bg) 100%);
  pointer-events: none;
}
.cta-inner {
  position: relative;
  z-index: 2;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
}
.cta-title {
  font-size: clamp(44px, 8vw, 128px);
  letter-spacing: -0.04em;
  line-height: 0.95;
  font-weight: 500;
}
.cta-title em { font-family: var(--font-serif); font-style: italic; color: var(--accent); }
.cta-subtitle {
  font-size: 17px;
  color: var(--fg-soft);
  max-width: 480px;
}
.cta-email {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 22px 32px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  font-size: 17px;
  background: var(--bg-elev);
  letter-spacing: -0.01em;
  box-shadow: var(--shadow-md);
  transition: transform 0.4s var(--ease-premium), box-shadow 0.4s var(--ease-premium), background 0.3s var(--ease-premium), color 0.3s, border-color 0.3s;
}
.cta-email:hover {
  background: var(--fg);
  color: var(--bg);
  border-color: var(--fg);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}
.cta-email-arrow { transition: transform 0.35s var(--ease-premium); }
.cta-email:hover .cta-email-arrow { transform: translate(4px, -4px); }

/* Secondary WhatsApp line beneath the main email CTA */
.cta-whatsapp {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.04em;
  color: var(--fg-muted);
  transition: color 0.25s;
  margin-top: -12px;
}
.cta-whatsapp:hover { color: var(--fg); }
.cta-whatsapp-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #25D366;
  box-shadow: 0 0 8px rgba(37, 211, 102, 0.4);
}

/* ============ FOOTER ============ */
footer {
  padding: 80px 0 40px;
  border-top: 1px solid var(--line);
}
.footer-top {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  padding-bottom: 60px;
  border-bottom: 1px solid var(--line);
}
@media (max-width: 900px) { .footer-top { grid-template-columns: 1fr; } }
.footer-big {
  font-size: clamp(40px, 6vw, 88px);
  letter-spacing: -0.035em;
  line-height: 0.98;
  font-weight: 500;
}
.footer-big em { font-family: var(--font-serif); font-style: italic; color: var(--accent); }
.footer-right {
  display: flex;
  flex-direction: column;
  gap: 24px;
  justify-content: flex-end;
}
.footer-contact-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-muted);
}
.footer-contact-email {
  font-size: 20px;
  letter-spacing: -0.015em;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  align-self: flex-start;
  padding: 10px 16px 10px 0;
  transition: color 0.3s var(--ease-premium), transform 0.3s var(--ease-premium);
}
.footer-contact-email:hover { color: var(--accent); transform: translateX(3px); }
.footer-contact-whatsapp {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--fg-muted);
  transition: color 0.25s;
  margin-top: 4px;
}
.footer-contact-whatsapp:hover { color: var(--fg); }

.footer-bottom {
  padding-top: 28px;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  color: var(--fg-muted);
  text-transform: uppercase;
  flex-wrap: wrap;
}

/* ============ FLOATING WHATSAPP BUTTON ============ */
/* Fixed CTA that stays pinned on screen. Purple (brand) instead of
   WhatsApp green. Double pulse ring for attention. */
.btn-whatsapp-float {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 500;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  text-decoration: none;
  background-color: var(--accent);
  background-image: linear-gradient(135deg, var(--accent-deep) 0%, var(--accent) 50%, var(--accent-soft) 100%);
  background-size: 200% 200%;
  background-position: 0% 0%;
  box-shadow:
    0 12px 28px -6px color-mix(in oklab, var(--accent) 50%, transparent),
    0 6px 12px -4px rgba(10, 10, 10, 0.15);
  transition:
    background-position 0.5s var(--ease-premium),
    transform 0.3s var(--ease-premium),
    box-shadow 0.3s var(--ease-premium);
}
.btn-whatsapp-float:hover {
  background-position: 100% 100%;
  transform: scale(1.06);
  box-shadow:
    0 18px 40px -8px color-mix(in oklab, var(--accent) 60%, transparent),
    0 8px 16px -4px rgba(10, 10, 10, 0.2);
}
.btn-whatsapp-float:active { transform: scale(0.98); }
.btn-whatsapp-float svg {
  width: 28px;
  height: 28px;
  display: block;
}

.btn-whatsapp-float::before,
.btn-whatsapp-float::after {
  content: '';
  position: absolute;
  inset: -18px;
  border-radius: 50%;
  border: 1px solid var(--accent);
  pointer-events: none;
  opacity: 0;
  animation: wa-pulse 1.8s linear infinite;
}
.btn-whatsapp-float::after { animation-delay: 0.5s; }
.btn-whatsapp-float:hover::before,
.btn-whatsapp-float:hover::after {
  border-color: var(--accent-deep);
}

@keyframes wa-pulse {
  0%   { transform: scale(0.55); opacity: 0; }
  50%  { opacity: 0.75; }
  100% { transform: scale(1.25); opacity: 0; }
}

@media (max-width: 640px) {
  .btn-whatsapp-float {
    right: 16px;
    bottom: 16px;
    width: 52px;
    height: 52px;
  }
  .btn-whatsapp-float svg { width: 24px; height: 24px; }
}

/* ============ TWEAKS PANEL ============ */
.tweaks-panel {
  position: fixed;
  bottom: 24px; right: 24px;
  z-index: 200;
  background: color-mix(in oklab, var(--bg-elev) 90%, transparent);
  padding: 18px;
  width: 260px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  font-size: 13px;
  display: none;
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
}
.tweaks-panel.show { display: block; }
.tweaks-title {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin-bottom: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.tweaks-close {
  width: 20px; height: 20px;
  display: grid; place-items: center;
  font-size: 14px;
  color: var(--fg-muted);
}
.tweak-group { margin-bottom: 14px; }
.tweak-group:last-child { margin-bottom: 0; }
.tweak-label {
  font-size: 12px;
  color: var(--fg-soft);
  margin-bottom: 8px;
  display: block;
}
.tweak-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
.tweak-opt {
  padding: 9px 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transition: all 0.25s var(--ease-premium);
  background: var(--bg);
}
.tweak-opt.active {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

/* ============ HERO VARIANTS ============ */
.hero-variant-mesh .hero-canvas { opacity: 1; }
.hero-variant-grid .hero-canvas { opacity: 0.55; filter: blur(0) saturate(100%); top: 0; left: 0; width: 100%; height: 100%; }
.hero-variant-aurora .hero-canvas { opacity: 0.9; }

/* utility */
.mono { font-family: var(--font-mono); }
.muted { color: var(--fg-muted); }
.soft { color: var(--fg-soft); }
