/* ============================================================
   Christian Ruiz — Landing Page Styles
   ============================================================ */

/* ----- CSS Custom Properties (Theme) ----- */
:root {
  /* Light theme (default) */
  --bg-primary: #f5f1ea;
  --bg-secondary: #ede8df;
  --bg-card: #ffffff;
  --text-primary: #1a1a1a;
  --text-secondary: #4a4a4a;
  --text-muted: #8a8a8a;
  --accent: #14B8A6;
  --accent-hover: #0d9488;
  --accent-glow: rgba(20, 184, 166, 0.15);
  --border: rgba(26, 26, 26, 0.08);
  --navbar-bg: rgba(245, 241, 234, 0.85);
  --shape-color: rgba(20, 184, 166, 0.06);
  --code-bg: rgba(26, 26, 26, 0.04);
  --tag-bg: rgba(20, 184, 166, 0.1);
  --tag-text: #0d9488;
  --footer-bg: #1a1a1a;
  --footer-text: #f5f1ea;
  --footer-muted: #8a8a8a;
  --hero-gradient: linear-gradient(180deg, rgba(245,241,234,0) 0%, rgba(20,184,166,0.04) 100%);
  --error: #D47A6B;
  --error-bg: rgba(212, 122, 107, 0.12);
  --error-border: rgba(212, 122, 107, 0.4);
}

[data-theme="dark"] {
  --bg-primary: #1a1a1a;
  --bg-secondary: #222222;
  --bg-card: #2a2a2a;
  --text-primary: #f5f1ea;
  --text-secondary: #c0bbb4;
  --text-muted: #7a7a7a;
  --accent: #2DD4BF;
  --accent-hover: #14B8A6;
  --accent-glow: rgba(45, 212, 191, 0.12);
  --border: rgba(245, 241, 234, 0.08);
  --navbar-bg: rgba(26, 26, 26, 0.85);
  --error: #E89980;
  --error-bg: rgba(232, 153, 128, 0.12);
  --error-border: rgba(232, 153, 128, 0.4);
  --shape-color: rgba(45, 212, 191, 0.04);
  --code-bg: rgba(245, 241, 234, 0.04);
  --tag-bg: rgba(45, 212, 191, 0.12);
  --tag-text: #2DD4BF;
  --footer-bg: #111111;
  --footer-text: #f5f1ea;
  --footer-muted: #6a6a6a;
  --hero-gradient: linear-gradient(180deg, rgba(26,26,26,0) 0%, rgba(45,212,191,0.03) 100%);
}

/* ----- Reset & Base ----- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  transition: background 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
}

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

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--accent-hover);
}

/* ----- Container ----- */
.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--navbar-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s ease;
}

.navbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.navbar__logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

[data-theme="dark"] .logo--light,
.logo--dark {
  display: none;
}

[data-theme="dark"] .logo--dark,
.logo--light {
  display: block;
}

.navbar__nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-link {
  font-size: 0.925rem;
  font-weight: 500;
  color: var(--text-secondary);
  position: relative;
  padding: 4px 0;
  transition: color 0.2s ease;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  border-radius: 1px;
  transition: width 0.3s ease;
}

.nav-link:hover {
  color: var(--accent);
}

.nav-link:hover::after {
  width: 100%;
}

/* Theme toggle */
.theme-toggle {
  background: none;
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.theme-toggle:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-glow);
}

.theme-toggle svg {
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.theme-toggle:active svg {
  transform: scale(0.8) rotate(45deg);
}

[data-theme="dark"] .icon-sun,
.icon-moon {
  display: none;
}

[data-theme="dark"] .icon-moon,
.icon-sun {
  display: block;
}

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 28px;
  height: 28px;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  padding: 0;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 100vh;
  padding-top: 68px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--hero-gradient);
}

.hero__bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.hero__shape {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.6;
}

.hero__shape--1 {
  width: 500px;
  height: 500px;
  background: var(--accent);
  opacity: 0.05;
  top: -10%;
  right: -10%;
  animation: float 20s ease-in-out infinite;
}

.hero__shape--2 {
  width: 400px;
  height: 400px;
  background: var(--accent);
  opacity: 0.04;
  bottom: -5%;
  left: -5%;
  animation: float 25s ease-in-out infinite reverse;
}

.hero__shape--3 {
  width: 300px;
  height: 300px;
  background: var(--accent);
  opacity: 0.03;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation: float 15s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0); }
  33% { transform: translate(30px, -30px); }
  66% { transform: translate(-20px, 20px); }
}

.hero__inner {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 60px 24px 80px;
}

.hero__avatar-wrapper {
  margin-bottom: 24px;
  display: inline-block;
  position: relative;
}

.hero__avatar-wrapper::after {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  opacity: 0.3;
  animation: pulse-ring 3s ease-in-out infinite;
}

@keyframes pulse-ring {
  0%, 100% { transform: scale(1); opacity: 0.3; }
  50% { transform: scale(1.06); opacity: 0.1; }
}

.hero__avatar {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  object-fit: cover;
  position: relative;
  z-index: 1;
}

.hero__pre {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  color: var(--accent);
  margin-bottom: 16px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.hero__title {
  font-family: 'Fraunces', Georgia, serif;
  font-size: clamp(3rem, 8vw, 5rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 16px;
  letter-spacing: -1px;
}

.accent {
  color: var(--accent);
}

.hero__tagline {
  font-size: 1.2rem;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto 36px;
  line-height: 1.5;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.25s ease;
  border: 2px solid transparent;
}

.btn--primary {
  background: var(--accent);
  color: #ffffff !important;
  border-color: var(--accent);
}

.btn--primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--accent-glow);
}

.btn--outline {
  background: transparent;
  color: var(--text-primary) !important;
  border-color: var(--border);
}

.btn--outline:hover {
  border-color: var(--accent);
  color: var(--accent) !important;
  transform: translateY(-2px);
}

.btn--full {
  width: 100%;
  justify-content: center;
}

.hero__actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ============================================================
   TERMINAL
   ============================================================ */
.terminal {
  display: inline-flex;
  flex-direction: column;
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  text-align: left;
  margin: 0 auto 32px;
  max-width: 480px;
  width: 100%;
  overflow: hidden;
}

.terminal__bar {
  display: flex;
  gap: 6px;
  padding: 10px 14px;
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border);
}

.terminal__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--text-muted);
  opacity: 0.3;
}

.terminal__dot:nth-child(1) { background: #ff5f57; opacity: 1; }
.terminal__dot:nth-child(2) { background: #ffbd2e; opacity: 1; }
.terminal__dot:nth-child(3) { background: #28c840; opacity: 1; }

.terminal__body {
  padding: 14px 18px;
  line-height: 1.7;
  display: flex;
  align-items: center;
  gap: 0;
  min-height: 48px;
}

.terminal__prompt {
  color: var(--accent);
  font-weight: 500;
  margin-right: 10px;
  flex-shrink: 0;
}

.terminal__line {
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
}

.terminal__cursor {
  color: var(--accent);
  animation: blink 0.8s step-end infinite;
  font-size: 0.85rem;
  margin-left: 2px;
  flex-shrink: 0;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* ============================================================
   STATS / COUNTER
   ============================================================ */
.stats {
  background: var(--bg-primary);
  padding: 60px 0;
}

.stats__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.stat-item {
  text-align: center;
  position: relative;
}

.stat-item__number {
  font-family: 'Fraunces', Georgia, serif;
  font-size: clamp(3rem, 6vw, 4.5rem);
  font-weight: 700;
  line-height: 1;
  color: var(--accent);
  display: inline;
}

.stat-item__suffix {
  font-family: 'Fraunces', Georgia, serif;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 700;
  color: var(--accent);
  margin-left: 2px;
  opacity: 0.7;
}

.stat-item__label {
  margin-top: 8px;
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: 500;
}

.hero__scroll-link {
  display: inline-block;
  margin-top: 60px;
  color: var(--text-muted);
  transition: color 0.3s ease, transform 0.3s ease;
  outline: none;
}

.hero__scroll-link:hover {
  color: var(--accent);
}

.hero__scroll-link:focus-visible {
  border-radius: 50%;
  box-shadow: 0 0 0 3px var(--accent-glow);
  color: var(--accent);
}

.hero__scroll {
  color: inherit;
  animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(8px); }
}

/* ============================================================
   SECTIONS (common)
   ============================================================ */
.section {
  padding: 100px 0;
}

.section__header {
  text-align: center;
  margin-bottom: 64px;
}

.section__badge {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: 6px 16px;
  border-radius: 100px;
  margin-bottom: 20px;
}

.section__title {
  font-family: 'Fraunces', Georgia, serif;
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 16px;
}

.section__desc {
  color: var(--text-secondary);
  font-size: 1.1rem;
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ============================================================
   SERVICIOS
   ============================================================ */
.servicios {
  background: var(--bg-secondary);
  transition: background 0.3s ease;
}

.servicios__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.servicio-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 40px 32px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.servicio-card::before {
  content: '>';
  position: absolute;
  top: 16px;
  right: 20px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 2rem;
  color: var(--accent);
  opacity: 0.12;
  font-weight: 700;
}

.servicio-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, var(--accent-glow) 0%, transparent 70%);
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 0.4s ease, transform 0.4s ease;
  z-index: -1;
  pointer-events: none;
}

.servicio-card:hover::after {
  opacity: 1;
  transform: scale(1.2);
}

.servicio-card:hover {
  transform: translateY(-6px);
  border-color: var(--accent);
  box-shadow: 0 16px 48px var(--accent-glow);
}

.servicio-card__icon,
.servicio-card__title,
.servicio-card__desc {
  position: relative;
  z-index: 2;
}

.servicio-card__icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: var(--accent-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  color: var(--accent);
  transition: transform 0.3s ease;
}

.servicio-card:hover .servicio-card__icon {
  transform: scale(1.1);
}

.servicio-card__title {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 12px;
  line-height: 1.3;
}

.servicio-card__desc {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.65;
}

/* ============================================================
   SOBRE MÍ
   ============================================================ */
.sobre-mi__content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: stretch;
}

.sobre-mi__text p {
  font-size: 1.05rem;
  color: var(--text-secondary);
  margin-bottom: 20px;
  line-height: 1.7;
}

.sobre-mi__text p strong {
  color: var(--text-primary);
}

.sobre-mi__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 40px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  padding: 6px 14px;
  border-radius: 100px;
  background: var(--tag-bg);
  color: var(--tag-text);
  transition: all 0.2s ease;
}

.tag:hover {
  background: var(--accent);
  color: #ffffff;
  transform: translateY(-2px);
}

/* Code visual block */
.sobre-mi__code {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  line-height: 1.8;
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.code-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 16px;
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.code-bar__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.code-bar__dot:nth-child(1) { background: #ff5f57; }
.code-bar__dot:nth-child(2) { background: #ffbd2e; }
.code-bar__dot:nth-child(3) { background: #28c840; }

.code-bar__file {
  margin-left: auto;
  font-size: 0.75rem;
  color: var(--text-muted);
  opacity: 0.6;
}

.code-body {
  padding: 20px 24px;
  flex: 1;
}

.code-line {
  white-space: nowrap;
}

.code-indent-1 { padding-left: 16px; }
.code-indent-2 { padding-left: 36px; }
.code-indent-3 { padding-left: 56px; }

.code-keyword { color: var(--accent); }
.code-fn { color: #82aaff; }
.code-boolean { color: #c792ea; }
.code-built { color: #ffcb6b; }
.code-comment { color: var(--text-muted); font-style: italic; }

/* ============================================================
   CONTACTO
   ============================================================ */
.contacto {
  background: var(--bg-secondary);
  transition: background 0.3s ease;
}

.contacto__content {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.contacto__info {
  display: flex;
  gap: 16px;
  justify-content: center;
}

.contacto__card {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px 20px;
  text-decoration: none;
  color: var(--text-primary);
  transition: all 0.25s ease;
}

.contacto__card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px var(--accent-glow);
}

.contacto__card-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--accent-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  flex-shrink: 0;
  transition: transform 0.25s ease;
}

.contacto__card:hover .contacto__card-icon {
  transform: scale(1.1);
}

.contacto__card-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 2px;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-family: 'JetBrains Mono', monospace;
}

.contacto__card-value {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
}

/* Form */
.contacto__form {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 36px;
}

/* Form banner (success / error) */
.form-banner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 20px;
  border-radius: 12px;
  margin-bottom: 20px;
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 500;
  font-variation-settings: 'SOFT' 30, 'WONK' 1, 'opsz' 30;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--text-primary);
  transition: opacity 0.3s ease, transform 0.3s ease;
  opacity: 1;
  transform: translateY(0);
}

.form-banner.is-hiding {
  opacity: 0;
  transform: translateY(-8px);
}

@media (prefers-reduced-motion: reduce) {
  .form-banner,
  .form-banner.is-hiding {
    transition: none;
  }
}

.form-banner--success {
  background: var(--accent-glow);
  border: 1px solid var(--accent);
}

.form-banner--error {
  background: var(--error-bg);
  border: 1px solid var(--error-border);
}

.form-banner__icon {
  flex-shrink: 0;
  margin-top: 2px;
}

.form-banner__body {
  flex: 1;
  min-width: 0;
}

.form-banner__title {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 600;
  font-size: 1.05rem;
  margin: 0 0 4px 0;
  color: var(--text-primary);
}

.form-banner__text {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.5;
}

.form-banner__text a {
  color: var(--accent);
  text-decoration: underline;
}

.form-banner__close {
  flex-shrink: 0;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  padding: 4px;
  border-radius: 6px;
  line-height: 0;
  transition: color 0.2s, background 0.2s;
}

.form-banner__close:hover {
  color: var(--text-primary);
  background: var(--border);
}

.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--text-secondary);
}

.form-input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  transition: all 0.2s ease;
  outline: none;
}

.form-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-input::placeholder {
  color: var(--text-muted);
}

textarea.form-input {
  resize: vertical;
  min-height: 100px;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: var(--footer-bg);
  color: var(--footer-text);
  padding: 48px 0 32px;
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
}

.footer__tagline {
  font-size: 0.85rem;
  color: var(--footer-muted);
  margin-top: 8px;
}

.footer__links {
  display: flex;
  gap: 16px;
}

.footer__link {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--footer-muted);
  transition: all 0.2s ease;
}

.footer__link:hover {
  background: var(--accent);
  color: #ffffff;
  transform: translateY(-2px);
}

.footer__copy {
  font-size: 0.85rem;
  color: var(--footer-muted);
  text-align: center;
  border-top: 1px solid rgba(255,255,255,0.06);
  padding-top: 24px;
}

/* Blinking code cursor */
.code-cursor {
  color: var(--accent);
  margin-left: 2px;
  animation: blink 0.8s step-end infinite;
  font-weight: bold;
}

/* ============================================================
   CÓMO TRABAJO
   ============================================================ */
.proceso {
  background: var(--bg-primary);
  transition: background 0.3s ease;
}

.proceso__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.proceso-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 40px 32px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.proceso-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, var(--accent-glow) 0%, transparent 70%);
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 0.4s ease, transform 0.4s ease;
  z-index: -1;
  pointer-events: none;
}

.proceso-card:hover::after {
  opacity: 1;
  transform: scale(1.2);
}

.proceso-card:hover {
  transform: translateY(-6px);
  border-color: var(--accent);
  box-shadow: 0 16px 48px var(--accent-glow);
}

.proceso-card__number {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 3rem;
  font-weight: 700;
  color: var(--accent);
  opacity: 0.15;
  line-height: 1;
  margin-bottom: 16px;
  transition: opacity 0.3s ease;
}

.proceso-card:hover .proceso-card__number {
  opacity: 0.8;
}

.proceso-card__title {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 12px;
  line-height: 1.3;
  color: var(--text-primary);
}

.proceso-card__desc {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.65;
}

/* ============================================================
   PREGUNTAS FRECUENTES (FAQ)
   ============================================================ */
.faq {
  background: var(--bg-secondary);
  transition: background 0.3s ease;
}

.faq__wrapper {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.faq__item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.faq__item[open] {
  border-color: var(--accent);
  box-shadow: 0 8px 32px var(--accent-glow);
}

.faq__question {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.15rem;
  font-weight: 600;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
  color: var(--text-primary);
  list-style: none; /* Hide summary marker */
  outline: none;
  transition: color 0.2s ease;
}

.faq__question::-webkit-details-marker {
  display: none; /* Hide summary marker Safari */
}

.faq__question:hover {
  color: var(--accent);
}

.faq__question:focus-visible {
  background: var(--accent-glow);
}

.faq__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), color 0.3s ease;
  flex-shrink: 0;
}

.faq__question:hover .faq__icon {
  color: var(--accent);
}

.faq__item[open] .faq__icon {
  transform: rotate(180deg);
  color: var(--accent);
}

.faq__answer {
  padding: 0 24px 20px;
  border-top: 1px solid transparent;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.65;
  animation: slideDown-accordion 0.3s ease forwards;
}

.faq__item[open] .faq__answer {
  border-top-color: var(--border);
}

@keyframes slideDown-accordion {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   VALIDACIÓN DE FORMULARIOS Y CARGA
   ============================================================ */
.form-input:user-invalid,
.form-input.is-invalid {
  border-color: var(--error);
  box-shadow: 0 0 0 3px var(--error-bg);
}

.form-input:user-invalid:focus,
.form-input.is-invalid:focus {
  border-color: var(--error);
  box-shadow: 0 0 0 3px var(--error-bg);
}

.btn--loading {
  position: relative;
  color: transparent !important;
  pointer-events: none;
}

.btn--loading::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  margin: auto;
  border: 2px solid transparent;
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .servicios__grid,
  .proceso__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .sobre-mi__content {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

@media (max-width: 768px) {
  .navbar__nav {
    position: fixed;
    top: 68px;
    left: 0;
    right: 0;
    background: var(--navbar-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 24px;
    gap: 20px;
    border-bottom: 1px solid var(--border);
    /* Transición fluida */
    opacity: 0;
    transform: translateY(-10px);
    visibility: hidden;
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
    pointer-events: none;
    display: flex; /* Usamos display:flex permanente y lo ocultamos con opacity/visibility */
  }

  .navbar__nav.is-open {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
    pointer-events: auto;
  }

  .menu-toggle {
    display: flex;
  }

  .hero {
    align-items: flex-start;
    padding-top: 100px;
  }

  .hero__inner {
    padding: 40px 24px 60px;
  }

  .hero__avatar {
    width: 130px;
    height: 130px;
  }

  .hero__tagline {
    font-size: 1.05rem;
  }

  .terminal {
    max-width: 100%;
    font-size: 0.8rem;
  }

  .terminal__body {
    padding: 12px 14px;
    min-height: 42px;
  }

  .stats__grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .section {
    padding: 72px 0;
  }

  .section__header {
    margin-bottom: 48px;
  }

  .contacto__info {
    gap: 12px;
  }

  .contacto__card {
    padding: 16px;
    gap: 12px;
  }

  .contacto__card-icon {
    width: 44px;
    height: 44px;
  }

  .servicios__grid,
  .proceso__grid {
    grid-template-columns: 1fr;
    max-width: 480px;
    margin: 0 auto;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }

  .hero__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero__actions .btn {
    justify-content: center;
  }

  .hero__avatar {
    width: 110px;
    height: 110px;
  }

  .contacto__info {
    flex-direction: column;
    align-items: stretch;
  }

  .contacto__card {
    max-width: 100%;
  }

  .contacto__form {
    padding: 24px 20px;
  }
}

/* ============================================================
   ANIMATIONS (on load)
   ============================================================ */
.hero__avatar-wrapper,
.hero__pre,
.hero__title,
.hero__tagline,
.terminal,
.hero__actions {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.6s ease forwards;
}

.hero__pre { animation-delay: 0.1s; }
.hero__title { animation-delay: 0.2s; }
.hero__tagline { animation-delay: 0.35s; }
.terminal { animation-delay: 0.45s; }
.hero__actions { animation-delay: 0.55s; }

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Scroll-triggered for other sections (will be activated by JS) */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
