/* =============================================
   JORGELINA ANTONIOLI — PORTFOLIO
   ============================================= */

/* Trap font — place your downloaded Trap files in /fonts/
   Rename the file to match or update the src path below */
@font-face {
  font-family: 'Trap';
  src: url('fonts/Trap-Black.otf') format('opentype');
  font-weight: 900;
  font-style: normal;
}
@font-face {
  font-family: 'Trap';
  src: url('fonts/Trap-SemiBold.otf') format('opentype');
  font-weight: 600;
  font-style: normal;
}
@font-face {
  font-family: 'Trap';
  src: url('fonts/Trap-ExtraBold.otf') format('opentype');
  font-weight: 800;
  font-style: normal;
}
@font-face {
  font-family: 'Trap';
  src: url('fonts/Trap-Bold.otf') format('opentype');
  font-weight: 700;
  font-style: normal;
}

/* Google Fonts — Poppins (requiere conexión a internet) */
@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300;1,400&display=swap');

/* ---- Variables ---- */
:root {
  --bg: #ffffff;
  --text: #0a0a0a;
  --text-secondary: #6b6b6b;
  --text-faint: rgba(10, 10, 10, 0.3);
  --accent: #005AFF;
  --accent-light: #eef3ff;
  --border: #e8e8e8;
  --gray-bg: #f5f5f5;
  --nav-bg: rgba(255, 255, 255, 0.92);
  --card-bg: #ffffff;
  --nav-h: 68px;
  --max-w: 1200px;
  --font-body: 'Poppins', sans-serif;
  --font-display: 'Trap', 'Poppins', sans-serif;
}

/* ---- Dark theme ----
   Sigue la preferencia del sistema salvo que el usuario elija "light";
   la elección explícita (data-theme) siempre gana. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e0d0c;
    --text: #f2f0ec;
    --text-secondary: rgba(242, 240, 236, 0.62);
    --text-faint: rgba(242, 240, 236, 0.32);
    --accent: #5b8def;
    --accent-light: rgba(91, 141, 239, 0.16);
    --border: rgba(242, 240, 236, 0.16);
    --gray-bg: #171614;
    --nav-bg: rgba(14, 13, 12, 0.85);
    --card-bg: #141312;
  }
}
:root[data-theme="dark"] {
  --bg: #0e0d0c;
  --text: #f2f0ec;
  --text-secondary: rgba(242, 240, 236, 0.62);
  --text-faint: rgba(242, 240, 236, 0.32);
  --accent: #5b8def;
  --accent-light: rgba(91, 141, 239, 0.16);
  --border: rgba(242, 240, 236, 0.16);
  --gray-bg: #171614;
  --nav-bg: rgba(14, 13, 12, 0.85);
  --card-bg: #141312;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  transition: background 0.3s ease, color 0.3s ease;
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; object-fit: cover; }
ul { list-style: none; }
button { border: none; background: none; cursor: pointer; font-family: var(--font-body); }

/* ---- Language helpers ---- */
.hidden { display: none !important; }

/* =============================================
   NAVIGATION
   ============================================= */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  padding: 0 40px;
  background: var(--nav-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  z-index: 100;
  transition: border-color 0.3s, background 0.3s ease;
}
.nav.scrolled { border-color: var(--border); }

.nav-logo {
  justify-self: start;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: 0.01em;
  color: var(--text);
  white-space: nowrap;
}

.nav-links {
  justify-self: center;
  display: flex;
  gap: 36px;
}
.nav-links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.2s;
  white-space: nowrap;
}
.nav-links a:hover { color: var(--accent); }

.nav-actions {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-cv-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  border: 1.5px solid var(--border);
  border-radius: 20px;
  padding: 6px 14px;
  transition: all 0.2s;
  white-space: nowrap;
}
.nav-cv-btn:hover { border-color: var(--accent); color: var(--accent); }
.nav-cv-btn svg { width: 12px; height: 12px; flex-shrink: 0; }

.lang-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  border: 1.5px solid var(--border);
  border-radius: 20px;
  padding: 6px 14px;
  transition: all 0.2s;
  cursor: pointer;
}
.lang-toggle:hover { border-color: var(--accent); color: var(--accent); }

/* ---- Theme toggle ---- */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  color: var(--text-secondary);
  border: 1.5px solid var(--border);
  border-radius: 50%;
  transition: all 0.2s;
  cursor: pointer;
  flex-shrink: 0;
}
.theme-toggle:hover { border-color: var(--accent); color: var(--accent); }
.theme-toggle svg { width: 16px; height: 16px; display: block; }
.theme-toggle .icon-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: none; }
  :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: block; }
}

.nav-menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
}
.nav-menu-btn span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: 0.3s;
}

/* Mobile nav overlay */
.nav-mobile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 99;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;
}
.nav-mobile-overlay.open { display: flex; }
.nav-mobile-overlay a {
  font-size: 2rem;
  font-weight: 600;
  color: var(--text);
  transition: color 0.2s;
}
.nav-mobile-overlay a:hover { color: var(--accent); }

/* =============================================
   SECTION ANCHORS (sidebar)
   ============================================= */
.section-anchors {
  position: fixed;
  right: 28px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 14px;
  z-index: 50;
}
.section-anchors .anchor {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-faint);
  letter-spacing: 0.05em;
  transition: color 0.2s;
  writing-mode: horizontal-tb;
}
.section-anchors .anchor:hover,
.section-anchors .anchor.active { color: var(--accent); }

/* =============================================
   SECTIONS — SHARED
   ============================================= */
section {
  padding: 100px 40px 100px 80px;
  max-width: var(--max-w);
  margin: 0 auto;
}
section.section-gray {
  max-width: 100%;
  background: var(--gray-bg);
}
section.section-gray > * {
  max-width: var(--max-w);
  margin-left: max(0px, calc((100vw - var(--max-w)) / 2));
  margin-right: auto;
}

.section-header {
  display: flex;
  align-items: baseline;
  gap: 18px;
  margin-bottom: 60px;
}
.section-num {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.1em;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* =============================================
   HERO
   ============================================= */
#hero {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: calc(var(--nav-h) + 40px);
  padding-bottom: 40px;
  position: relative;
  max-width: 100%;
}
.hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: var(--max-w);
  margin: 0 auto;
  padding-left: 80px;
  padding-right: 80px;
}
.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 720px;
}
.hero-specialties {
  flex: 0 0 240px;
  padding-top: 8px;
}
.hero-spec-title {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 20px;
}
.hero-specialties-inline {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  margin-top: 8px;
}
.hero-spec-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}
.hero-spec-tag {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text);
  padding: 6px 14px;
  border: 1.5px solid var(--border);
  white-space: nowrap;
}

.location-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  border: 1.5px solid var(--border);
  border-radius: 20px;
  padding: 6px 14px;
  margin-bottom: 32px;
}
.dot {
  width: 8px; height: 8px;
  background: #22c55e;
  border-radius: 50%;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* El tamaño/tipografía del nombre ahora los da .contact-heading (misma clase,
   compartida con el heading de Contacto, para que midan igual). Acá solo
   ajustamos lo propio del hero: negro, sin cursiva, ancho completo y sin
   cortar palabras con guión. */
.hero-name.contact-heading {
  color: var(--text);
  max-width: none;
  width: 100%;
  margin-bottom: 8px;
  hyphens: none;
  -webkit-hyphens: none;
  overflow-wrap: normal;
  word-break: normal;
}

.hero-desc {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text);
  width: 100%;
  max-width: none;
  margin-bottom: 40px;
}

.hero-stats {
  display: flex;
  justify-content: center;
  width: 100%;
  gap: 48px;
  margin-bottom: 16px;
  padding: 28px 0;
  border-top: 1px solid var(--text);
}
.stat { display: flex; flex-direction: column; gap: 4px; }
.stat-num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 2rem;
  letter-spacing: -0.03em;
  color: var(--text);
}
.stat-label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.hero-ctas {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: white;
  padding: 14px 28px;
  border-radius: 0;
  font-size: 0.875rem;
  font-weight: 600;
  transition: all 0.2s;
  letter-spacing: 0.01em;
}
.btn-primary:hover { background: #003fcc; transform: translateY(-2px); }
.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1.5px solid var(--text);
  color: var(--text);
  padding: 14px 28px;
  border-radius: 0;
  font-size: 0.875rem;
  font-weight: 600;
  transition: all 0.2s;
}
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }

.hero-scroll-hint {
  position: absolute;
  bottom: 48px;
  left: 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--text-secondary);
  text-transform: uppercase;
}
.scroll-line {
  width: 1px;
  height: 60px;
  background: linear-gradient(to bottom, var(--border), transparent);
  animation: scrollAnim 2s ease-in-out infinite;
}
@keyframes scrollAnim {
  0% { transform: scaleY(0); transform-origin: top; }
  50% { transform: scaleY(1); transform-origin: top; }
  51% { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* =============================================
   PORTFOLIO
   ============================================= */
#portfolio {
  max-width: 100%;
  overflow: hidden;
}
#portfolio .section-header,
#portfolio .category-tabs {
  max-width: var(--max-w);
  margin-left: auto;
  margin-right: auto;
  padding-left: 40px;
}
#portfolio .section-header { margin-bottom: 32px; padding-left: 80px; }

.category-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 48px;
  padding-left: 80px !important;
}
.tab {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 400;
  padding: 8px 18px;
  border-radius: 20px;
  border: 1.5px solid var(--border);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
}
.tab:hover, .tab.active {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

.projects-carousel-wrapper { position: relative; }
.projects-carousel {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  padding: 0 80px 32px;
}
.carousel-arrows { display: none; }

.project-card {
  display: flex;
  flex-direction: column;
  border-radius: 0;
  overflow: hidden;
  border: 1.5px solid var(--border);
  transition: all 0.3s;
  cursor: pointer;
}
.project-card:hover {
  border-color: var(--accent);
  transform: translateY(-6px);
  box-shadow: 0 20px 60px rgba(0, 90, 255, 0.12);
}

.project-card-image {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--gray-bg);
  border-radius: 0;
}
.project-card-image img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.project-card:hover .project-card-image img { transform: scale(1.04); }
.project-card-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 90, 255, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 600;
  color: white;
  opacity: 0;
  transition: opacity 0.3s;
  letter-spacing: 0.02em;
}
.project-card:hover .project-card-overlay { opacity: 1; }

.project-card-info {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.project-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.tag {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 12px;
  background: var(--accent-light);
  color: var(--accent);
  letter-spacing: 0.03em;
}
.project-title {
  font-size: 1.2rem;
  font-weight: 500;
  letter-spacing: -0.02em;
}
.project-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ---- Curaduría: destacados vs "ver todos" ---- */
.project-card.is-extra { display: none; }
.view-all-wrap {
  display: flex;
  justify-content: center;
  padding: 8px 80px 40px;
}
.btn-view-all {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border: 1.5px solid var(--border);
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: all 0.2s;
}
.btn-view-all:hover { border-color: var(--accent); color: var(--accent); }

.carousel-scroll-hint {
  padding: 0 80px 16px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.carousel-arrows {
  display: flex;
  gap: 10px;
  padding: 0 80px 32px;
}
.carousel-arrow {
  width: 44px; height: 44px;
  border: none;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: var(--text-secondary);
  transition: color 0.2s;
  border-radius: 0;
  padding: 0;
}
.carousel-arrow:hover { color: var(--text); }
.carousel-arrow:disabled { opacity: 0.25; cursor: default; }
@media (max-width: 900px) {
  .carousel-arrows { padding: 0 24px 24px; }
}

/* =============================================
   EXPERIENCE
   ============================================= */
.experience-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 80px;
}
.exp-item {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 40px;
  padding: 40px 0;
  border-bottom: 1px solid var(--border);
}
.exp-item:first-child { border-top: 1px solid var(--border); }

.exp-period {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  padding-top: 4px;
  letter-spacing: 0.02em;
}
.exp-role {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 4px;
  letter-spacing: -0.01em;
}
.exp-company {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 8px;
}
.exp-desc + .exp-desc { margin-top: 10px; }
.exp-desc {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* =============================================
   ABOUT
   ============================================= */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}
.about-bio p {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: 24px;
}
.about-bio blockquote {
  font-size: 1.1rem;
  font-style: italic;
  font-weight: 500;
  color: var(--text);
  border-left: 3px solid var(--accent);
  padding-left: 20px;
  margin-top: 32px;
  line-height: 1.6;
}

.about-details { display: flex; flex-direction: column; gap: 32px; }
.about-block h4 {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}
.about-block ul li {
  font-size: 0.875rem;
  color: var(--text-secondary);
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
}
.about-block ul li:last-child { border-bottom: none; }

.tools-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.tool {
  font-size: 0.75rem;
  font-weight: 400;
  padding: 6px 12px;
  border: 1.5px solid var(--border);
  border-radius: 0;
  color: var(--text-secondary);
  transition: all 0.2s;
}
.tool:hover { border-color: var(--accent); color: var(--accent); }

/* =============================================
   CONTACT
   ============================================= */
.contact-content {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.section-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  margin-bottom: 24px;
  border: 1.5px solid var(--border);
  border-radius: 20px;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
}
#contacto .section-badge { border-color: #9a9890; }
/* Dentro de grillas de varias filas, el espacio entre filas lo maneja
   solo el `gap` del contenedor flex — el margin-bottom de .section-badge
   es para cuando el badge va solo, y sumado al gap duplicaba el espacio. */
.hero-spec-tags .section-badge,
.tools-grid .section-badge { margin-bottom: 0; }

.contact-heading {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2rem, 4.5vw, 4rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  max-width: 18ch;
  margin-bottom: 20px;
}
.contact-heading em { color: var(--accent); font-style: italic; }

.contact-subtitle {
  font-family: var(--font-body);
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--text-secondary);
  margin-bottom: 56px;
}
/* "juntos" va igual que el resto del texto, sin acento de color */
.contact-subtitle em { font-style: normal; color: inherit; font-weight: inherit; }
/* En el hero hace falta más aire antes del párrafo largo; en Contacto, menos
   antes del mail (va enseguida después del subtítulo). */
#hero .contact-subtitle { margin-bottom: 28px; }
#contacto .contact-subtitle { margin-bottom: 24px; }

.contact-email-row {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 8px 8px 8px 18px;
  margin-bottom: 20px;
  border: 1.5px solid var(--border);
  border-radius: 40px;
  background: #ffffff;
}
.contact-email-text {
  font-size: 0.9rem;
  font-weight: 500;
  color: #0a0a0a;
}
.btn-copy-email {
  padding: 7px 16px;
  border-radius: 30px;
  background: var(--text);
  color: var(--bg);
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
  transition: opacity 0.2s;
}
.btn-copy-email:hover { opacity: 0.85; }

.contact-btn-row,
.btn-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}
.btn-pill-outline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border: 1.5px solid #9a9890;
  border-radius: 30px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text);
  transition: all 0.2s;
}
.btn-pill-outline:hover { border-color: var(--accent); color: var(--accent); }
.btn-pill-outline svg { width: 11px; height: 11px; flex-shrink: 0; }

/* =============================================
   FOOTER
   ============================================= */
.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 80px;
  border-top: 1px solid var(--border);
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* =============================================
   PROJECT PAGES
   ============================================= */
.project-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 60px;
  background: var(--nav-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
  transition: background 0.3s ease, border-color 0.3s ease;
}
.project-nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.project-nav-back {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: color 0.2s;
}
.project-nav-back:hover { color: var(--accent); }
.project-nav-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
}

.project-hero {
  padding: calc(var(--nav-h) + 80px) 80px 80px;
  max-width: var(--max-w);
  margin: 0 auto;
}
.project-hero-category {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}
.project-hero-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(3rem, 6vw, 6rem);
  letter-spacing: -0.04em;
  line-height: 0.95;
  margin-bottom: 24px;
}
.project-hero-hook {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 640px;
  margin-bottom: 40px;
}
.project-meta {
  display: flex;
  gap: 48px;
  padding: 28px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.project-meta-item { display: flex; flex-direction: column; gap: 6px; }
.project-meta-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-secondary);
}
.project-meta-value {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
}
.project-service-tags {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 32px;
}
.service-tag {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 8px 16px;
  border: 1.5px solid var(--border);
  border-radius: 20px;
  color: var(--text);
  transition: all 0.2s;
}
.service-tag:hover { border-color: var(--accent); color: var(--accent); }

/* Project image gallery */
.project-gallery {
  max-width: 100%;
  padding: 0 80px 100px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin: 0 auto;
}
.gallery-full {
  width: 100%;
  border-radius: 0;
  overflow: hidden;
  background: var(--gray-bg);
}
.gallery-full img { width: 100%; height: auto; }
.gallery-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.gallery-row.thirds { grid-template-columns: 1fr 1fr 1fr; }
.gallery-row > div {
  border-radius: 0;
  overflow: hidden;
  background: var(--gray-bg);
}
.gallery-row img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4/3; }

/* Project text blocks */
.project-text-block {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 60px 80px;
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 60px;
  border-top: 1px solid var(--border);
}
.ptb-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  padding-top: 4px;
}
.ptb-content p {
  font-size: 0.95rem;
  line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: 16px;
}
.ptb-content p:last-child { margin-bottom: 0; }

/* Related projects */
.related-section {
  padding: 80px 80px 100px;
  background: var(--gray-bg);
}
.related-title {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 40px;
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: var(--max-w);
  margin: 0 auto;
}
.related-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  border-radius: 0;
  overflow: hidden;
  border: 1.5px solid var(--border);
  background: var(--card-bg);
  transition: all 0.3s;
}
.related-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0, 90, 255, 0.1);
}
.related-card-image {
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--gray-bg);
}
.related-card-image img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}
.related-card:hover .related-card-image img { transform: scale(1.04); }
.related-card-info {
  padding: 20px 24px 24px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  align-items: flex-end;
}
.related-card-name { font-size: 1rem; font-weight: 700; letter-spacing: -0.01em; }
.related-card-cta {
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
  color: var(--accent);
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 900px) {
  :root { --nav-h: 60px; }
  section { padding: 80px 24px; }
  .hero-content { padding: 0 24px; }
  .hero-inner { max-width: 100%; }
  .hero-scroll-hint { left: 24px; }
  .nav { padding: 0 24px; grid-template-columns: auto 1fr; }
  .nav-links { display: none; }
  .nav-cv-btn { display: none; }
  .nav-menu-btn { display: flex; }
  .section-anchors { display: flex; right: 12px; }
  .projects-carousel { padding: 0 24px 24px; grid-template-columns: 1fr 1fr; }
  #portfolio .section-header { padding-left: 24px; }
  .category-tabs { padding-left: 24px !important; }
  .carousel-scroll-hint { padding: 0 24px 16px; }
  .project-card { width: 100%; }
  .about-grid { grid-template-columns: 1fr; gap: 48px; }
  .experience-list,
  .contact-content { padding: 0 24px; }
  .project-text-block { padding: 48px 24px; grid-template-columns: 1fr; gap: 16px; }
  .project-gallery { padding: 0 24px 80px; }
  .gallery-row { grid-template-columns: 1fr; }
  .gallery-row.thirds { grid-template-columns: 1fr; }
  .project-hero { padding: calc(var(--nav-h) + 48px) 24px 48px; }
  .project-nav { padding: 0 24px; }
  .related-section { padding: 60px 24px 80px; }
  .related-grid { grid-template-columns: 1fr; }
  .footer { padding: 24px; flex-direction: column; gap: 8px; text-align: center; }
  .exp-item { grid-template-columns: 1fr; gap: 8px; }
}

@media (max-width: 600px) {
  .section-anchors { display: none; }
  .hero-stats { gap: 28px; flex-wrap: wrap; }
  .btn-row { flex-wrap: nowrap; }
  .project-meta { gap: 24px; }
  .projects-carousel { grid-template-columns: 1fr; }
  .category-tabs { flex-wrap: wrap; }
}

/* =============================================
   GRADIENT BLOBS
   ============================================= */
.blob {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  animation: blobFloat 10s ease-in-out infinite alternate;
}

@keyframes blobFloat {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(20px, -30px) scale(1.05); }
  100% { transform: translate(-15px, 15px) scale(0.97); }
}

/* Hero blobs */
#hero { position: relative; overflow: hidden; }
#hero .hero-inner { position: relative; z-index: 1; }
#hero .hero-scroll-hint { position: absolute; z-index: 1; }

.blob-hero-1 {
  width: 560px; height: 560px;
  top: -120px; right: -80px;
  background: radial-gradient(circle at 40% 40%,
    rgba(123, 47, 255, 0.55) 0%,
    rgba(0, 90, 255, 0.35) 45%,
    transparent 70%);
  filter: blur(70px);
  animation-duration: 12s;
}

.blob-hero-2 {
  width: 420px; height: 420px;
  bottom: 60px; right: 180px;
  background: radial-gradient(circle at 50% 50%,
    rgba(255, 45, 120, 0.45) 0%,
    rgba(140, 30, 255, 0.30) 50%,
    transparent 70%);
  filter: blur(80px);
  animation-duration: 15s;
  animation-delay: -4s;
}

.blob-hero-3 {
  width: 300px; height: 300px;
  top: 40%; left: 55%;
  background: radial-gradient(circle at 50% 50%,
    rgba(0, 90, 255, 0.30) 0%,
    transparent 65%);
  filter: blur(60px);
  animation-duration: 18s;
  animation-delay: -8s;
}

/* Contact blobs */
#contacto { position: relative; overflow: hidden; }
#contacto .contact-content { position: relative; z-index: 1; }

.blob-contact-1 {
  width: 600px; height: 600px;
  top: -100px; right: -150px;
  background: radial-gradient(circle at 40% 35%,
    rgba(123, 47, 255, 0.50) 0%,
    rgba(255, 45, 120, 0.30) 50%,
    transparent 70%);
  filter: blur(90px);
  animation-duration: 13s;
}

.blob-contact-2 {
  width: 400px; height: 400px;
  bottom: -80px; left: -100px;
  background: radial-gradient(circle at 50% 60%,
    rgba(0, 90, 255, 0.45) 0%,
    rgba(100, 20, 220, 0.25) 55%,
    transparent 70%);
  filter: blur(75px);
  animation-duration: 16s;
  animation-delay: -6s;
}

.blob-contact-3 {
  width: 280px; height: 280px;
  top: 50%; left: 40%;
  background: radial-gradient(circle at 50% 50%,
    rgba(220, 30, 180, 0.35) 0%,
    transparent 65%);
  filter: blur(60px);
  animation-duration: 11s;
  animation-delay: -2s;
}

@media (max-width: 900px) {
  .blob-hero-1 { width: 320px; height: 320px; }
  .blob-hero-2 { width: 260px; height: 260px; }
  .blob-hero-3 { display: none; }
  .blob-contact-1 { width: 340px; height: 340px; }
  .blob-contact-2 { width: 240px; height: 240px; }
}

/* =============================================
   LOADER INICIAL (solo home)
   ============================================= */
#loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 48px 32px;
  background: #0a0a0a;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}
#loader.is-hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.loader-inner {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 100%;
  max-width: 1000px;
  height: 100%;
}
.loader-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
}
.loader-name,
.loader-role,
.loader-year {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(242, 240, 236, 0.75);
  white-space: nowrap;
}
.loader-name { color: #f2f0ec; }
.loader-role { flex: 1; text-align: center; }
.loader-mid {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
}
.loader-word-wrap { line-height: 1; }
.loader-word {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.6rem, 9vw, 5rem);
  font-style: normal;
  letter-spacing: -0.02em;
  color: #f2f0ec;
}
.loader-foot {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}
.loader-foot-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.68rem;
  color: rgba(242, 240, 236, 0.55);
}
.loader-percent {
  font-variant-numeric: tabular-nums;
  font-size: 1.1rem;
  font-weight: 600;
  color: rgba(242, 240, 236, 0.75);
}
.loader-bar {
  width: 100%;
  height: 2px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
  border-radius: 2px;
}
.loader-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #5b8def, #7b2fff, #ff2d78);
  transition: width 0.3s ease;
}
@media (max-width: 600px) {
  .loader-head { gap: 6px; }
  .loader-name, .loader-role, .loader-year {
    font-size: 0.5rem;
    letter-spacing: 0.01em;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .loader-name { flex: 0 1 auto; min-width: 0; }
  .loader-role { flex: 1 1 auto; min-width: 0; }
  .loader-year { flex: 0 0 auto; }
}
@media (prefers-reduced-motion: reduce) {
  #loader { display: none !important; }
}

/* =============================================
   BOTÓN "PREGUNTAME" (quick-answers, sin IA real)
   ============================================= */
.agent-launch {
  position: fixed;
  right: 28px;
  bottom: 96px;
  z-index: 200;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.agent-launch-badge {
  display: inline-flex;
  align-items: center;
  padding: 13px 20px;
  border-radius: 30px;
  background: #ffffff;
  border: 1.5px solid #d8d6d1;
  color: #0a0a0a;
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
  transition: transform 0.2s, background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}
.agent-launch-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  border-radius: 50%;
  background: #0a0a0a;
  color: #ffffff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s, background 0.3s ease, color 0.3s ease;
}
.agent-launch-badge:hover,
.agent-launch-icon:hover { transform: translateY(-2px); }
.agent-launch-icon svg { width: 18px; height: 18px; flex-shrink: 0; }

/* Modo oscuro: se invierten los colores del badge y del ícono */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .agent-launch-badge {
    background: #0a0a0a;
    border-color: rgba(255, 255, 255, 0.25);
    color: #ffffff;
  }
  :root:not([data-theme="light"]) .agent-launch-icon {
    background: #ffffff;
    color: #0a0a0a;
  }
}
:root[data-theme="dark"] .agent-launch-badge {
  background: #0a0a0a;
  border-color: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}
:root[data-theme="dark"] .agent-launch-icon {
  background: #ffffff;
  color: #0a0a0a;
}

.agent-panel {
  position: fixed;
  right: 28px;
  bottom: 156px;
  z-index: 200;
  width: 360px;
  max-width: calc(100vw - 48px);
  max-height: 70vh;
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border: 1.5px solid #d8d6d1;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: all 0.25s ease;
}
.agent-panel.is-open { opacity: 1; visibility: visible; transform: translateY(0); }

.agent-panel-head {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  padding: 16px 16px 16px 14px;
  border-bottom: 1px solid #ece9e3;
}
.agent-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, #5b8def, #7b2fff, #ff2d78);
  color: #fff;
}
.agent-avatar svg { width: 15px; height: 15px; }
.agent-panel-title {
  flex: 1;
  font-size: 0.9rem;
  font-weight: 600;
  color: #0a0a0a;
}
.agent-panel-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  border-radius: 50%;
  color: #6b6b6b;
  transition: all 0.2s;
}
.agent-panel-close:hover { background: #f1efe9; color: #0a0a0a; }

.agent-panel-body {
  flex: 1 1 auto;
  min-height: 80px;
  max-height: 260px;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.agent-msg {
  max-width: 85%;
  padding: 11px 14px;
  border-radius: 14px;
  font-size: 0.82rem;
  line-height: 1.55;
}
.agent-msg-bot {
  align-self: flex-start;
  background: #f1efe9;
  color: #2b2b2b;
  border-radius: 4px 14px 14px 14px;
}
.agent-msg-user {
  align-self: flex-end;
  background: #0a0a0a;
  color: #fff;
  border-radius: 14px 4px 14px 14px;
}

.agent-chips-row {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
  padding: 0 16px 12px;
  overflow-x: auto;
  scrollbar-width: none;
}
.agent-chips-row::-webkit-scrollbar { display: none; }
.agent-chip {
  flex: 0 0 auto;
  white-space: nowrap;
  padding: 9px 14px;
  background: #ffffff;
  border: 1.5px solid #d8d6d1;
  border-radius: 30px;
  font-size: 0.76rem;
  font-weight: 500;
  color: #0a0a0a;
  transition: all 0.2s;
}
.agent-chip:hover { border-color: #0a0a0a; }

.agent-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  padding: 12px 14px;
  border-top: 1px solid #ece9e3;
}
.agent-input {
  flex: 1;
  min-width: 0;
  padding: 11px 14px;
  border: 1.5px solid #d8d6d1;
  border-radius: 30px;
  font-family: var(--font-body);
  font-size: 0.8rem;
  color: #0a0a0a;
  background: #fff;
  transition: border-color 0.2s;
}
.agent-input:focus { border-color: #5b8def; outline: none; }
.agent-send {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: 50%;
  background: #0a0a0a;
  color: #fff;
  transition: opacity 0.2s;
}
.agent-send:hover { opacity: 0.85; }

@media (max-width: 600px) {
  .agent-launch { right: 16px; bottom: 84px; }
  .agent-panel { right: 16px; bottom: 144px; }
}
