/* ============================================================
   RODRIGO ESTRELLA — PORTFOLIO 2026
   Design system: Dark premium, glassmorphism, editorial type
   Standalone build (no Quarto / no Bootstrap)
   Theme: dark default on :root · light via <html class="light">
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Righteous&family=Space+Grotesk:wght@300;400;500;600&family=Space+Mono:wght@400;700&display=swap');

/* ─── CSS Variables ─────────────────────────────────────── */
:root {
  color-scheme: dark;
  /* Dark theme defaults */
  --bg:          #080c14;
  --bg2:         #0e1625;
  --surface:     rgba(255,255,255,0.04);
  --surface-hov: rgba(255,255,255,0.08);
  --border:      rgba(255,255,255,0.09);
  --accent:      #7c9ef5;
  --accent2:     #b48cf5;
  --accent-glow: rgba(124,158,245,0.25);
  --gold:        #e8c35a;
  --text-hi:     #eef1f8;
  --text-mid:    #8898b8;
  --text-lo:     #6e81a6;
  --font-display: 'Righteous', sans-serif;
  --font-body:    'Space Grotesk', system-ui, sans-serif;
  --font-mono:    'Space Mono', monospace;
  --radius:       12px;
  --radius-lg:    20px;
  --transition:   0.35s cubic-bezier(0.4,0,0.2,1);
}

html.light {
  color-scheme: light;
  --bg:          #f4f6fb;
  --bg2:         #e8ecf5;
  --surface:     rgba(255,255,255,0.88);
  --surface-hov: rgba(255,255,255,0.98);
  --border:      rgba(30,58,138,0.18);
  --accent:      #1d4ed8;
  --accent2:     #6d28d9;
  --accent-glow: rgba(29,78,216,0.15);
  --gold:        #b8860b;
  --text-hi:     #0a0f1e;
  --text-mid:    #1e293b;
  --text-lo:     #475569;
}

/* ─── Reset / Base ──────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text-hi);
  overflow-x: hidden;
}
@media (pointer: fine) {
  body, body a, body button { cursor: none; }
}

a { text-decoration: none; color: inherit; }
a:hover { color: var(--accent); }

/* ─── Focus visible (teclado) ───────────────────────────── */
:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ─── Skip link ─────────────────────────────────────────── */
.skip-link {
  position: fixed;
  top: -80px;
  left: 1rem;
  z-index: 2000;
  padding: 0.8rem 1.4rem;
  background: var(--accent);
  color: var(--bg);
  font-weight: 600;
  font-size: 0.85rem;
  border-radius: 0 0 10px 10px;
  transition: top 0.2s ease;
}
.skip-link:focus { top: 0; color: var(--bg); }
html.light .skip-link, html.light .skip-link:focus { color: #fff; }

/* ─── Screen-reader only ────────────────────────────────── */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

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

button { font-family: inherit; }

/* Language toggle — EN hidden by default */
[data-lang-en] { display: none !important; }
.lang-en [data-lang-en] { display: inline !important; }
.lang-en [data-lang-es] { display: none !important; }
.lang-hidden { display: none !important; }

/* ─── Custom cursor ─────────────────────────────────────── */
#cursor-dot {
  position: fixed;
  width: 8px; height: 8px;
  background: var(--accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: transform 0.1s ease;
}
#cursor-ring {
  position: fixed;
  width: 36px; height: 36px;
  border: 1.5px solid rgba(124,158,245,0.5);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  transition: all 0.12s ease;
}
html.light #cursor-ring { border-color: rgba(30,58,138,0.5); }
body:has(a:hover) #cursor-ring,
body:has(button:hover) #cursor-ring {
  width: 56px; height: 56px;
  border-color: var(--accent);
  background: var(--accent-glow);
}
@media (pointer: coarse) {
  #cursor-dot, #cursor-ring { display: none; }
}

/* ─── Canvas background ─────────────────────────────────── */
#portfolio-canvas {
  position: fixed;
  inset: 0;
  width: 100%; height: 100%;
  z-index: -2;
  opacity: 0.7;
}
html.light #portfolio-canvas { opacity: 0.6; }
.bg-gradient-overlay {
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(124,158,245,0.07) 0%, transparent 60%),
              radial-gradient(ellipse 60% 40% at 80% 80%, rgba(180,140,245,0.06) 0%, transparent 50%);
  z-index: -1;
  pointer-events: none;
}
html.light .bg-gradient-overlay {
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(29,78,216,0.04) 0%, transparent 60%),
              radial-gradient(ellipse 60% 40% at 80% 80%, rgba(109,40,217,0.03) 0%, transparent 50%);
}

/* ═══════════════════════════════════════════════════════
   NAVBAR (custom, no Bootstrap)
   ═══════════════════════════════════════════════════════ */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  transition: background var(--transition), border-color var(--transition), backdrop-filter var(--transition);
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: rgba(7,11,18,0.85);
  border-bottom-color: var(--border);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
html.light .site-header.scrolled {
  background: rgba(244,246,251,0.96);
  border-bottom-color: rgba(30,58,138,0.15);
}
.site-navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.1rem 2rem;
  max-width: 1500px;
  margin: 0 auto;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.navbar-brand {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  color: var(--text-hi);
  white-space: nowrap;
  text-transform: none;
}
.navbar-brand span { color: var(--accent); }
.navbar-brand:hover { color: var(--text-hi); }

.nav-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 1;
  gap: 1.5rem;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 1.6rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: none;
  border: none;
  padding: 0.3rem 0;
  color: var(--text-mid);
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: color var(--transition);
}
.nav-link:hover, .nav-link.active { color: var(--accent); }

.nav-dropdown { position: relative; }
.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 0.6rem);
  left: -0.75rem;
  min-width: 200px;
  list-style: none;
  margin: 0;
  padding: 0.5rem;
  background: rgba(13,18,32,0.97);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(16px);
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: all 0.25s ease;
  box-shadow: 0 16px 40px rgba(0,0,0,0.4);
}
html.light .nav-dropdown-menu {
  background: rgba(255,255,255,0.98);
  box-shadow: 0 16px 40px rgba(30,58,138,0.12);
}
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown.is-open .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.nav-dropdown-menu a {
  display: block;
  padding: 0.55rem 0.85rem;
  border-radius: 8px;
  color: var(--text-mid);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  transition: all 0.2s ease;
}
.nav-dropdown-menu a:hover { background: var(--surface-hov); color: var(--accent); }

.nav-tools {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}
.nav-icon {
  display: inline-flex;
  padding: 8px;
  margin: -8px -2px;
  color: var(--text-mid);
  transition: color var(--transition), transform var(--transition);
}
.nav-icon:hover { color: var(--accent); transform: translateY(-2px); }

#lang-toggle {
  display: inline-flex;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 3px;
  font-family: var(--font-mono);
}
html.light #lang-toggle { background: rgba(255,255,255,0.85); border-color: rgba(30,58,138,0.2); }
#lang-toggle button {
  background: transparent;
  border: none;
  color: var(--text-lo);
  padding: 4px 10px;
  border-radius: 16px;
  transition: all 0.2s ease;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
}
html.light #lang-toggle button { color: #1e293b; }
#lang-toggle button.active { background: var(--accent); color: var(--bg); font-weight: 700; }
html.light #lang-toggle button.active { color: #fff; }

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px; height: 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--text-mid);
  transition: all var(--transition);
}
.theme-toggle:hover { color: var(--accent); border-color: var(--accent); }
.theme-toggle .icon-moon { display: none; }
html.light .theme-toggle .icon-moon { display: block; }
html.light .theme-toggle .icon-sun { display: none; }

.nav-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px; height: 40px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px;
}
.nav-burger span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--text-hi);
  border-radius: 2px;
  transition: all 0.3s ease;
}
.nav-burger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger.is-open span:nth-child(2) { opacity: 0; }
.nav-burger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 920px) {
  .nav-burger { display: flex; }
  .nav-panel {
    position: fixed;
    top: 64px; left: 0; right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 1.25rem;
    padding: 1.5rem 2rem 2rem;
    background: rgba(7,11,18,0.97);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    transform: translateY(-12px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
  }
  html.light .nav-panel { background: rgba(244,246,251,0.98); }
  .nav-panel.is-open { transform: translateY(0); opacity: 1; visibility: visible; }
  .nav-links { flex-direction: column; align-items: flex-start; gap: 1.1rem; }
  .nav-link { font-size: 0.95rem; }
  .nav-dropdown-menu {
    position: static;
    opacity: 1; visibility: visible; transform: none;
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0.4rem 0 0 1rem;
    display: none;
  }
  .nav-dropdown:hover .nav-dropdown-menu { display: none; }
  .nav-dropdown.is-open .nav-dropdown-menu { display: block; }
}
@media (max-width: 600px) {
  .site-navbar { padding: 0.9rem 1.25rem; }
  .navbar-brand { font-size: 1.05rem; }
}

/* ═══════════════════════════════════════════════════════
   HERO
   ═══════════════════════════════════════════════════════ */
.intro {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
}
.hero-inner {
  padding: 0 6vw;
  max-width: 1000px;
}
.hero-label {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  opacity: 0;
  animation: fadeUp 0.8s 0.2s forwards;
}
.hero-name {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 9vw, 8rem);
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.01em;
  color: var(--text-hi);
  margin: 0 0 1.5rem;
  /* Sin opacity:0 — es el elemento LCP; ocultarlo retrasa el paint ~1.3s */
  animation: slideUpIn 0.7s ease-out;
}
@keyframes slideUpIn { from { transform: translateY(24px); } to { transform: translateY(0); } }
.hero-name-wide { font-size: clamp(2.8rem, 7vw, 6rem); }
.hero-name em {
  font-style: normal;
  white-space: nowrap;
  background: linear-gradient(120deg, var(--accent) 20%, var(--accent2) 80%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--accent);
}
.hero-tagline {
  font-size: clamp(1rem, 2vw, 1.3rem);
  color: var(--text-mid);
  font-weight: 300;
  line-height: 1.6;
  max-width: 700px;
  margin-bottom: 1.75rem;
  opacity: 0;
  animation: fadeUp 1s 0.6s forwards;
}
.hero-tagline .tag-accent { color: var(--text-hi); font-weight: 500; }
.cursor-blink {
  display: inline-block;
  width: 3px;
  height: 1.1em;
  background: var(--accent);
  vertical-align: middle;
  margin-left: 4px;
  animation: blink 1.1s step-end infinite;
}

/* Credential chips — creator badges */
.hero-creds {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 2.5rem;
  opacity: 0;
  animation: fadeUp 1s 0.7s forwards;
}
.cred-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.95rem;
  border: 1px solid var(--border);
  border-radius: 100px;
  background: var(--surface);
  backdrop-filter: blur(10px);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--text-mid);
  transition: all var(--transition);
}
.cred-chip:hover {
  border-color: var(--accent);
  color: var(--text-hi);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--accent-glow);
}
.cred-chip .cred-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 8px var(--gold);
}
.cred-chip .cred-dot.violet { background: var(--accent2); box-shadow: 0 0 8px var(--accent2); }
.cred-chip strong { color: var(--text-hi); font-weight: 700; }

.hero-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeUp 1s 0.8s forwards;
}
.btn-primary-custom {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 2rem;
  background: var(--accent);
  color: var(--bg);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: none;
  border-radius: var(--radius);
  transition: all var(--transition);
}
.btn-primary-custom:hover {
  background: #a8beff;
  color: var(--bg);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px var(--accent-glow);
}
html.light .btn-primary-custom { background: #1d4ed8; color: #fff; }
html.light .btn-primary-custom:hover { background: #1e40af; color: #fff; }
.btn-primary-custom svg { width: 15px; height: 15px; }
.btn-ghost-custom {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 2rem;
  background: transparent;
  color: var(--text-hi);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all var(--transition);
}
.btn-ghost-custom:hover {
  border-color: rgba(255,255,255,0.3);
  background: var(--surface-hov);
  color: var(--text-hi);
  transform: translateY(-2px);
}
html.light .btn-ghost-custom { border-color: rgba(30,58,138,0.4); color: #0a0f1e; }
html.light .btn-ghost-custom:hover { background: rgba(29,78,216,0.06); border-color: rgba(30,58,138,0.6); color: #0a0f1e; }

/* ═══════════════════════════════════════════════════════
   SECTION SHARED
   ═══════════════════════════════════════════════════════ */
.section-wrapper {
  position: relative;
  padding: 9rem 6vw;
}
.section-header {
  margin-bottom: 4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}
.section-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent);
  letter-spacing: 0.25em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 0.75rem;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.5vw, 3.8rem);
  font-weight: 400;
  color: var(--text-hi);
  line-height: 1.05;
  margin: 0;
  letter-spacing: 0.02em;
}
.section-title em { font-style: normal; color: var(--accent); }
.section-sub {
  margin: 1.25rem 0 0;
  max-width: 620px;
  color: var(--text-mid);
  font-size: 1.02rem;
  line-height: 1.7;
}

/* ═══════════════════════════════════════════════════════
   FEATURED PROJECT — FULBITO
   ═══════════════════════════════════════════════════════ */
.project-feature {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 0;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(232,195,90,0.06) 0%, var(--surface) 35%);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  overflow: hidden;
  margin-bottom: 1.5rem;
  transition: all var(--transition);
}
.project-feature:hover {
  border-color: rgba(232,195,90,0.4);
  transform: translateY(-4px);
  box-shadow: 0 28px 70px rgba(0,0,0,0.45), 0 0 0 1px rgba(232,195,90,0.15);
}
html.light .project-feature {
  background: linear-gradient(135deg, rgba(184,134,11,0.07) 0%, rgba(255,255,255,0.92) 35%);
  box-shadow: 0 4px 24px rgba(30,58,138,0.07);
}
html.light .project-feature:hover { box-shadow: 0 16px 48px rgba(30,58,138,0.13); }

.project-feature-media {
  position: relative;
  padding: 2.5rem 0 2.5rem 2.5rem;
  display: flex;
  align-items: center;
}
.project-feature-body {
  padding: 2.75rem 2.75rem 2.75rem 2.25rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.feature-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  align-self: flex-start;
  padding: 0.35rem 0.85rem;
  border-radius: 100px;
  background: rgba(232,195,90,0.12);
  border: 1px solid rgba(232,195,90,0.35);
  color: var(--gold);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
}
.feature-badge::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 8px var(--gold);
  animation: blink 2s ease-in-out infinite;
}
.project-feature .project-card-tag { margin-bottom: 0.6rem; }
.project-feature-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.5vw, 3rem);
  font-weight: 400;
  color: var(--text-hi);
  line-height: 1.05;
  margin: 0 0 1rem;
  letter-spacing: 0.02em;
}
.project-feature-desc {
  font-size: 0.98rem;
  color: var(--text-mid);
  line-height: 1.7;
  margin: 0 0 1.5rem;
  max-width: 480px;
}
.feature-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.75rem;
}
.feature-chips span {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.06em;
  color: var(--text-mid);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.3rem 0.6rem;
  background: var(--surface);
}
.project-feature-cta {
  display: flex;
  gap: 0.85rem;
  flex-wrap: wrap;
}

/* Browser frame for screenshots */
.browser-frame {
  position: relative;
  width: 100%;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #0d1220;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0,0,0,0.45);
  transition: transform 0.5s ease, box-shadow 0.5s ease;
}
html.light .browser-frame { background: #e8ecf5; box-shadow: 0 18px 44px rgba(30,58,138,0.16); }
.project-feature:hover .browser-frame {
  transform: translateY(-6px) scale(1.015);
  box-shadow: 0 34px 80px rgba(0,0,0,0.55);
}
.browser-frame-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 12px;
  background: rgba(255,255,255,0.05);
  border-bottom: 1px solid var(--border);
}
html.light .browser-frame-bar { background: rgba(30,58,138,0.06); }
.browser-frame-bar i {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--text-lo);
  opacity: 0.7;
}
.browser-frame-bar i:nth-child(1) { background: #f87171; }
.browser-frame-bar i:nth-child(2) { background: #fbbf24; }
.browser-frame-bar i:nth-child(3) { background: #34d399; }
.browser-frame-url {
  margin-left: 8px;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.04em;
  color: var(--text-lo);
}
.browser-frame img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top center;
}

/* ═══════════════════════════════════════════════════════
   PROJECT CARDS
   ═══════════════════════════════════════════════════════ */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}
.project-card {
  position: relative;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  overflow: hidden;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
}
.project-card:hover {
  border-color: rgba(124,158,245,0.3);
  background: var(--surface-hov);
  transform: translateY(-6px);
  box-shadow: 0 24px 60px rgba(0,0,0,0.4), 0 0 0 1px rgba(124,158,245,0.12);
}
html.light .project-card {
  background: rgba(255,255,255,0.9);
  border-color: rgba(30,58,138,0.14);
  box-shadow: 0 4px 24px rgba(30,58,138,0.07);
}
html.light .project-card:hover {
  background: #fff;
  border-color: rgba(30,58,138,0.3);
  box-shadow: 0 16px 48px rgba(30,58,138,0.13);
}
.project-card-shot {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}
.project-card-shot img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top center;
  transition: transform 0.5s ease, filter 0.5s ease;
  filter: brightness(0.92);
}
.project-card:hover .project-card-shot img {
  transform: scale(1.05);
  filter: brightness(1.02);
}
.project-card-shot.is-illustration {
  background: radial-gradient(ellipse at 50% 40%, rgba(124,158,245,0.12), transparent 70%);
}
.project-card-shot.is-illustration img {
  object-fit: contain;
  padding: 1.25rem;
  filter: brightness(0.95);
}
.project-card-body {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.project-card-tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--accent);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}
.project-card-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--text-hi);
  line-height: 1.2;
  margin: 0 0 0.75rem;
  letter-spacing: 0.02em;
}
.project-card-desc {
  font-size: 0.875rem;
  color: var(--text-mid);
  line-height: 1.65;
  flex: 1;
  margin: 0 0 1.5rem;
}
.project-card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  transition: gap var(--transition);
}
.project-card-link:hover { gap: 0.75rem; color: var(--accent); }
.project-card-link svg {
  width: 14px; height: 14px;
  transition: transform var(--transition);
}
.project-card-link:hover svg { transform: translateX(3px); }

/* ═══════════════════════════════════════════════════════
   ARTE / RODRIGUIN STUDIO BANNER
   ═══════════════════════════════════════════════════════ */
.art-banner {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  min-height: 480px;
  display: flex;
  align-items: flex-end;
}
.art-banner img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.8s ease, filter 0.8s ease;
  filter: brightness(0.5) saturate(1.1);
}
.art-banner:hover img {
  transform: scale(1.04);
  filter: brightness(0.65) saturate(1.3);
}
html.light .art-banner img { filter: brightness(0.45) saturate(0.9); }
html.light .art-banner:hover img { filter: brightness(0.55) saturate(1.1); }
.art-banner-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(7,11,18,0.92) 0%, rgba(7,11,18,0.55) 45%, transparent 75%);
}
html.light .art-banner-overlay {
  background: linear-gradient(to right, rgba(255,255,255,0.82) 0%, rgba(255,255,255,0.45) 45%, transparent 75%);
}
.art-banner-content {
  position: relative;
  z-index: 1;
  padding: 3rem 3.5rem;
  width: 100%;
}
.art-banner-content .section-label { margin-bottom: 0.5rem; }
.art-banner-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 400;
  color: #fff;
  line-height: 1.1;
  margin: 0 0 1rem;
  letter-spacing: 0.03em;
}
.art-banner-sub {
  font-size: 1rem;
  color: rgba(255,255,255,0.65);
  max-width: 500px;
  line-height: 1.6;
  margin-bottom: 1.75rem;
}
html.light .art-banner-title { color: #0d1117; }
html.light .art-banner-sub { color: rgba(13,17,23,0.75); }
.art-banner-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.8rem;
  border: 1px solid rgba(255,255,255,0.35);
  border-radius: var(--radius);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #fff;
  backdrop-filter: blur(8px);
  transition: all var(--transition);
}
html.light .art-banner-cta { color: #0d1117; border-color: rgba(13,17,23,0.4); }
.art-banner:hover .art-banner-cta {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg);
}

/* ═══════════════════════════════════════════════════════
   SERVICIOS + CONTACTO
   ═══════════════════════════════════════════════════════ */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 4rem;
}
.service-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 2.25rem 1.9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  backdrop-filter: blur(12px);
  overflow: hidden;
  transition: all var(--transition);
}
.service-card::before {
  content: attr(data-num);
  position: absolute;
  top: 1.1rem; right: 1.4rem;
  font-family: var(--font-display);
  font-size: 3.2rem;
  line-height: 1;
  color: var(--text-hi);
  opacity: 0.06;
  transition: all var(--transition);
}
.service-card:hover {
  border-color: rgba(124,158,245,0.35);
  background: var(--surface-hov);
  transform: translateY(-5px);
  box-shadow: 0 24px 60px rgba(0,0,0,0.35);
}
.service-card:hover::before { opacity: 0.14; color: var(--accent); }
html.light .service-card {
  background: rgba(255,255,255,0.9);
  border-color: rgba(30,58,138,0.14);
}
html.light .service-card:hover {
  background: #fff;
  border-color: rgba(30,58,138,0.3);
  box-shadow: 0 16px 48px rgba(30,58,138,0.13);
}
.service-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px; height: 46px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--accent);
  margin-bottom: 1.4rem;
  transition: all var(--transition);
}
.service-card:hover .service-icon {
  border-color: var(--accent);
  box-shadow: 0 0 24px var(--accent-glow);
}
.service-card h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 400;
  color: var(--text-hi);
  margin: 0 0 0.75rem;
  letter-spacing: 0.03em;
}
.service-card p {
  font-size: 0.875rem;
  color: var(--text-mid);
  line-height: 1.65;
  margin: 0 0 1.25rem;
}
.service-list {
  list-style: none;
  margin: 0 0 1.75rem;
  padding: 0;
  flex: 1;
}
.service-list li {
  position: relative;
  padding-left: 1.1rem;
  margin-bottom: 0.45rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  color: var(--text-mid);
}
.service-list li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--accent);
}
.service-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  transition: gap var(--transition);
}
.service-cta:hover { gap: 0.75rem; color: var(--accent); }
.service-cta svg { width: 14px; height: 14px; }

/* Contact band */
.contact-band {
  position: relative;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  backdrop-filter: blur(16px);
  overflow: hidden;
  padding: 4rem 3.5rem;
  text-align: center;
}
.contact-band::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 80% at 50% 0%, rgba(124,158,245,0.12) 0%, transparent 60%),
              radial-gradient(ellipse 40% 60% at 85% 100%, rgba(180,140,245,0.10) 0%, transparent 55%);
  pointer-events: none;
}
html.light .contact-band { background: rgba(255,255,255,0.92); }
html.light .contact-band::before {
  background: radial-gradient(ellipse 60% 80% at 50% 0%, rgba(29,78,216,0.07) 0%, transparent 60%),
              radial-gradient(ellipse 40% 60% at 85% 100%, rgba(109,40,217,0.06) 0%, transparent 55%);
}
.contact-band > * { position: relative; }
.contact-kicker {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent);
  letter-spacing: 0.25em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 1rem;
}
.contact-title {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 4vw, 3.2rem);
  font-weight: 400;
  color: var(--text-hi);
  line-height: 1.1;
  margin: 0 0 1.25rem;
  letter-spacing: 0.02em;
}
.contact-title em { font-style: normal; color: var(--accent); }
.contact-sub {
  max-width: 560px;
  margin: 0 auto 2.25rem;
  color: var(--text-mid);
  font-size: 1rem;
  line-height: 1.7;
}
.contact-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.75rem;
}
.btn-whatsapp {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 2rem;
  background: transparent;
  color: #4ade80;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid rgba(74,222,128,0.4);
  border-radius: var(--radius);
  transition: all var(--transition);
}
.btn-whatsapp:hover {
  background: rgba(74,222,128,0.1);
  border-color: #4ade80;
  color: #4ade80;
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(74,222,128,0.2);
}
html.light .btn-whatsapp { color: #15803d; border-color: rgba(21,128,61,0.45); }
html.light .btn-whatsapp:hover { background: rgba(21,128,61,0.07); color: #15803d; }
.btn-whatsapp svg, .contact-actions svg { width: 16px; height: 16px; }
.contact-note {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  color: var(--text-mid);
  margin: 0;
}

/* ═══════════════════════════════════════════════════════
   CV / ABOUT
   ═══════════════════════════════════════════════════════ */
.page-main {
  padding-top: 7rem;
}
.about-wrap {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 6vw 6rem;
}
.about-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 400;
  color: var(--text-hi);
  letter-spacing: 0.02em;
  margin: 0 0 1rem;
}
.about-links {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  margin: 0 0 2.5rem;
}
.about-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: var(--text-mid);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 0.45rem 1rem;
  transition: all var(--transition);
}
.about-links a:hover {
  color: var(--accent);
  border-color: var(--accent);
  transform: translateY(-2px);
}
.about-links svg { width: 14px; height: 14px; }
.cv-intro {
  font-size: 1.1rem;
  color: var(--text-mid);
  line-height: 1.8;
  max-width: 680px;
}
.about-main h2 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--text-hi);
  margin-top: 2.5rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border);
}
.about-main h3 {
  color: var(--text-hi);
  font-size: 1.05rem;
  margin-top: 1.75rem;
}
.about-main p, .about-main li { color: var(--text-mid); line-height: 1.7; }
.about-main strong { color: var(--text-hi); }
.about-main code, code {
  background: rgba(10, 14, 30, 0.85);
  color: #7da8f5;
  border: 1px solid rgba(125, 168, 245, 0.18);
  padding: 0.1em 0.4em;
  border-radius: 4px;
  font-size: 0.88em;
  font-family: var(--font-mono);
}
html.light .about-main code, html.light code {
  background: rgba(255,255,255,0.9);
  color: #1d4ed8;
  border-color: rgba(29,78,216,0.25);
}

/* ═══════════════════════════════════════════════════════
   ARTE ALGORÍTMICO page
   ═══════════════════════════════════════════════════════ */
.art-explainer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
  margin-bottom: 0;
}
.art-explainer-text p {
  font-size: 1.05rem;
  color: var(--text-mid);
  line-height: 1.8;
  margin-bottom: 1.2rem;
}
.art-explainer-text strong { color: var(--text-hi); }
.art-quote {
  border-left: 3px solid var(--accent);
  margin: 0;
  padding: 2rem 2rem 2rem 2.5rem;
  background: var(--surface);
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  backdrop-filter: blur(10px);
}
html.light .art-quote { background: rgba(255,255,255,0.9); }
.art-quote p {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2.5vw, 1.8rem);
  font-weight: 400;
  color: var(--text-hi);
  line-height: 1.4;
  margin: 0;
  letter-spacing: 0.01em;
}
.art-process-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}
.art-process-card {
  padding: 2rem 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  backdrop-filter: blur(12px);
  transition: all var(--transition);
}
.art-process-card:hover {
  border-color: rgba(124,158,245,0.3);
  background: var(--surface-hov);
  transform: translateY(-4px);
}
html.light .art-process-card {
  background: rgba(255,255,255,0.9);
  border-color: rgba(30,58,138,0.14);
}
html.light .art-process-card:hover { background: #fff; border-color: rgba(30,58,138,0.3); }
.art-process-icon {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent);
  letter-spacing: 0.2em;
  margin-bottom: 1rem;
}
.art-process-card h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 400;
  color: var(--text-hi);
  margin: 0 0 0.75rem;
  letter-spacing: 0.03em;
}
.art-process-card p {
  font-size: 0.875rem;
  color: var(--text-mid);
  line-height: 1.65;
  margin: 0;
}

@media (max-width: 768px) {
  .art-explainer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .art-process-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .art-process-grid { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════════════════
   ART ARTICLE PAGES (FlowingFields, StrangerEarths, WabiSabi)
   ═══════════════════════════════════════════════════════ */
.flowingFields-title,
.strangerEarths-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 400;
  width: 100%;
  line-height: 1.05;
  letter-spacing: 0.02em;
  color: var(--text-hi);
}
.flowingFieldsPage,
.strangerEarthsPage,
.wabiSabiPage {
  margin: 7rem 12% 4rem;
  padding: 3rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: rgba(13,18,32,0.92);
  backdrop-filter: blur(16px);
  box-shadow: 0 40px 80px rgba(0,0,0,0.5);
}
html.light .flowingFieldsPage,
html.light .strangerEarthsPage,
html.light .wabiSabiPage {
  background: rgba(255,255,255,0.94);
  box-shadow: 0 30px 70px rgba(30,58,138,0.12);
}
.flowingFields-content { text-align: justify; color: var(--text-mid); line-height: 1.75; }
.flowingFields-content h1, .flowingFields-content h2,
.flowingFields-content h3, .flowingFields-content h4 { color: var(--text-hi); font-family: var(--font-body); }
.flowingFields-content strong { color: var(--text-hi); }
.flowingFields-content figcaption,
.flowingFields-content .figure-caption {
  text-align: center;
  font-size: 0.7rem;
  color: var(--text-lo);
  font-family: var(--font-mono);
  margin-top: 0.5rem;
}
.float-left  { float: left; }
.img-right   { float: right; }
.flowfields img { max-height: 600px; width: auto; }

.intro-screen-generative2,
.intro-screen-strangerEarths2,
.intro-screen-wabiSabi { background-size: cover; }

/* ═══════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════ */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 3rem 6vw 2.5rem;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  color: var(--text-lo);
}
.footer-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
  max-width: 1500px;
  margin: 0 auto;
}
.footer-brand { display: flex; flex-direction: column; gap: 0.4rem; }
.footer-name {
  font-family: var(--font-display);
  font-size: 1.05rem;
  letter-spacing: 0.1em;
  color: var(--text-hi);
}
.footer-tag { color: var(--text-lo); }
.footer-links {
  display: flex;
  gap: 1.4rem;
  flex-wrap: wrap;
}
.footer-links a { color: var(--text-mid); transition: color var(--transition); }
.footer-links a:hover { color: var(--accent); }
.footer-meta {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  text-align: right;
}

/* ─── Animations ────────────────────────────────────────── */
@keyframes fadeIn  { from { opacity:0; } to { opacity:1; } }
@keyframes fadeUp  { from { opacity:0; transform: translateY(24px); } to { opacity:1; transform: translateY(0); } }
@keyframes blink   { 0%,100% { opacity:1; } 50% { opacity:0; } }
@keyframes scanLine { 0% { left:-100%; } 100% { left:200%; } }
@keyframes floatY  { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

.animFadeIn { animation: fadeIn 1.2s ease both; }
.animSlideIn { animation: fadeUp 0.9s ease both; }

/* ─── Responsive ────────────────────────────────────────── */
@media (max-width: 1024px) {
  .project-feature { grid-template-columns: 1fr; }
  .project-feature-media { padding: 2rem 2rem 0; }
  .project-feature-body { padding: 2rem; }
  .services-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .hero-inner { padding: 0 1.5rem; }
  .section-wrapper { padding: 5rem 1.5rem; }
  .projects-grid { grid-template-columns: 1fr; }
  .art-banner-content { padding: 2rem 1.5rem; }
  .art-banner { min-height: 340px; }
  .contact-band { padding: 3rem 1.5rem; }
  .flowingFieldsPage,
  .strangerEarthsPage,
  .wabiSabiPage { margin: 6rem 2% 2rem; padding: 1.5rem; }
  .footer-inner { flex-direction: column; }
  .footer-meta { text-align: left; }
}
@media (max-width: 600px) {
  .hero-name { font-size: clamp(2.6rem, 13vw, 4rem); }
  .project-feature-media { padding: 1.25rem 1.25rem 0; }
  .project-feature-body { padding: 1.5rem 1.25rem; }
}

/* ═══════════════════════════════════════════════════════
   CAPA WOW
   ═══════════════════════════════════════════════════════ */

/* ─── View transitions entre páginas (Chromium, progresivo) ─ */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation-duration: 0.25s; }
::view-transition-new(root) { animation-duration: 0.25s; }

/* ─── Barra de progreso de scroll ───────────────────────── */
#scroll-progress {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 3px;
  z-index: 1002;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  transform-origin: 0 50%;
  transform: scaleX(0);
  pointer-events: none;
}

/* ─── Grano sutil (textura de imprenta) ─────────────────── */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  opacity: 0.032;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.92' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
html.light body::after { opacity: 0.05; }

/* ─── Hero rotator (typewriter) ─────────────────────────── */
.hero-rotator {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin: 0 0 2rem;
  min-height: 1.5em;
  opacity: 0;
  animation: fadeUp 1s 0.7s forwards;
}
/* En mobile las frases del typewriter hacen wrap a 2 líneas:
   reservar el alto evita el layout shift (CLS 0.35 medido) */
@media (max-width: 640px) {
  .hero-rotator { min-height: 3.2em; }
}
.hero-rotator .rotator-prefix { color: var(--text-lo); }

/* ─── Banda de stats ────────────────────────────────────── */
.stats-section { padding: 0 6vw 2rem; }
.stats-band {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.stat {
  padding: 2.25rem 1.5rem;
  text-align: center;
  position: relative;
}
.stat + .stat::before {
  content: '';
  position: absolute;
  left: 0; top: 25%;
  height: 50%;
  width: 1px;
  background: var(--border);
}
.stat-value {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1;
  color: var(--text-hi);
  letter-spacing: 0.02em;
  margin-bottom: 0.6rem;
}
.stat-value .stat-suffix { color: var(--accent); }
.stat-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-mid);
}
@media (max-width: 768px) {
  .stats-band { grid-template-columns: 1fr 1fr; }
  .stat { padding: 1.5rem 1rem; }
  .stat:nth-child(3)::before { display: none; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--border); }
}

/* ─── Marquee de tecnologías ────────────────────────────── */
.tech-marquee {
  overflow: hidden;
  padding: 1.15rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin: 4rem 0 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.tech-marquee-track {
  display: flex;
  gap: 3rem;
  width: max-content;
  animation: marquee 38s linear infinite;
}
.tech-marquee:hover .tech-marquee-track { animation-play-state: paused; }
.tech-marquee-track span {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-mid);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 3rem;
}
.tech-marquee-track span::after {
  content: '◆';
  font-size: 0.45rem;
  color: var(--accent);
}
@keyframes marquee { to { transform: translateX(-50%); } }

/* ─── Tilt 3D (las cards reciben transform inline por JS) ── */
.projects-grid { perspective: 1200px; }
.project-feature { transform-style: preserve-3d; }
.project-card { transform-style: preserve-3d; }

/* ─── 404 ───────────────────────────────────────────────── */
.page-404 {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
}
.code-404 {
  font-family: var(--font-display);
  font-size: clamp(6rem, 20vw, 14rem);
  line-height: 1;
  margin: 0 0 1rem;
  background: linear-gradient(120deg, var(--accent) 20%, var(--accent2) 80%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--accent);
}
.msg-404 {
  font-size: 1.1rem;
  color: var(--text-mid);
  max-width: 460px;
  line-height: 1.7;
  margin: 0 0 2.5rem;
}

/* ─── Reduced motion: respeto total ─────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
  #portfolio-canvas { display: none; }
  .tech-marquee-track { animation: none; flex-wrap: wrap; width: auto; justify-content: center; }
  .cursor-blink { animation: none; opacity: 1; }
}
