/* ===== RESET & BASE ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  background-color: #0d0d0f;
}

:root {
  --accent: #ffb547;
  --accent-hover: #f5a524;
  --accent-text: #ffb547;
  --on-accent: #0d0d0f;
  --bg: #0d0d0f;
  --bg-dark: #09090b;
  --bg-card: #18181b;
  --bg-card-hover: #1f1f23;
  --text: #f4f4f5;
  --text-muted: #a1a1aa;
  --border: #27272a;
  --font: 'Inter', sans-serif;
  --font-display: 'Bricolage Grotesque', 'Inter', sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background-color: transparent;
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

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

h1, h2, h3 {
  font-family: var(--font-display);
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== NAVBAR ===== */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 100;
  padding: 16px 0;
  border-bottom: 1px solid transparent;
  transition: background 0.3s, backdrop-filter 0.3s, border-color 0.3s;
}

.navbar.scrolled {
  background: rgba(13, 13, 15, 0.85);
  backdrop-filter: blur(12px);
  border-color: var(--border);
}

.nav-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--accent-text);
  text-decoration: none;
  letter-spacing: -0.5px;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 32px;
  align-items: center;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.3s;
  position: relative;
  z-index: 1;
}

.nav-links a:hover {
  color: #fff;
}

/* Nav items: pill de acento en hover */
.nav-item {
  position: relative;
  border-radius: 999px;
  padding: 6px 14px;
  margin: -6px -14px;
}

.nav-item::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: var(--accent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.nav-item:hover::before { opacity: 1; }
.nav-links .nav-item:hover a { color: var(--on-accent); }

.nav-cta {
  background: var(--accent);
  color: var(--on-accent) !important;
  padding: 8px 20px;
  border-radius: 8px;
  transition: background 0.2s !important;
}

.nav-cta:hover {
  background: var(--accent-hover) !important;
  color: var(--on-accent) !important;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.3rem;
  cursor: pointer;
}

/* ===== SHADER CANVAS ===== */
#shader-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: -1;
  opacity: 0.28;
}

/* ===== HERO ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 120px 24px 80px;
  text-align: center;
  overflow: hidden;
}

.hero-bg {
  display: none;
}

.hero-content {
  position: relative;
  max-width: 720px;
  animation: fadeUp 0.8s ease both;
}

.hero-greeting {
  font-size: 1rem;
  color: var(--accent-text);
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.hero-name {
  font-size: clamp(2.8rem, 7vw, 5rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -1px;
  margin-bottom: 16px;
}

.hero-title {
  font-size: clamp(1.1rem, 3vw, 1.5rem);
  font-weight: 400;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.hero-desc {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 580px;
  margin: 0 auto 40px;
  line-height: 1.8;
}

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

.hero-scroll {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
}

.hero-scroll span {
  display: block;
  width: 2px;
  height: 40px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  margin: 0 auto;
  animation: scrollPulse 2s ease infinite;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--accent);
  color: var(--on-accent);
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  border: 1.5px solid var(--border);
}

.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent-text);
  transform: translateY(-2px);
}

.btn-grad {
  position: relative;
  background: transparent;
  color: #fff;
  border: 1.5px solid rgba(255,255,255,0.15);
  overflow: visible;
  z-index: 0;
}

.btn-grad::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--accent);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -1;
}

.btn-grad:hover {
  color: var(--on-accent);
  border-color: transparent;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.btn-grad:hover::before { opacity: 1; }

.btn-sm {
  padding: 8px 16px;
  font-size: 0.85rem;
  border-radius: 8px;
}

.btn-ghost {
  background: var(--bg-card);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

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

.section-dark {
  background-color: rgba(0, 0, 0, 0.28);
}

.section-title {
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 60px;
  text-align: center;
}

/* Encabezado editorial: título a la izquierda, bajada a la derecha, línea abajo */
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 48px;
  padding-bottom: 20px;
  margin-bottom: 56px;
  border-bottom: 1px solid var(--border);
}

.section-head .section-title {
  margin: 0;
  text-align: left;
  line-height: 1.05;
}

.section-lede {
  max-width: 46ch;
  text-wrap: balance;
  margin: 0;
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.5;
  text-align: right;
}

@media (max-width: 768px) {
  .section-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding-bottom: 16px;
    margin-bottom: 40px;
  }

  .section-lede {
    max-width: none;
    text-align: left;
    font-size: 0.95rem;
  }
}

/* ===== ABOUT ===== */
.about-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 60px;
  align-items: start;
}

.about-img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  object-position: center 15%;
  border-radius: 20px;
  display: block;
}

.about-text p {
  color: var(--text-muted);
  margin-bottom: 20px;
  font-size: 1.02rem;
  line-height: 1.8;
}

.about-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.badge i {
  color: var(--accent-text);
}

/* ===== SKILLS ===== */
.skills-section {
  position: relative;
  /* clip (no hidden) para no romper el position: sticky */
  overflow: clip;
}

.skills-sticky {
  position: relative;
}

.skills-grid-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 181, 71, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 181, 71, 0.07) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 50%, #000 40%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 50%, #000 40%, transparent 100%);
}

.skills-grid-bg::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  height: 120px;
  background: linear-gradient(180deg, transparent, rgba(255, 181, 71, 0.08), transparent);
  animation: skillsScan 7s ease-in-out infinite;
}

@keyframes skillsScan {
  0%   { top: -120px; opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  100% { top: 100%; opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .skills-grid-bg::after { animation: none; display: none; }
}

.skills-stage {
  position: relative;
  z-index: 1;
}

/* Vista estática (sin JS o sin WebGL): grilla de tarjetas */
.skills-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.skill-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px 24px;
}

.skill-index {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--accent-text);
  margin-bottom: 12px;
}

.skill-index i {
  font-size: 1.4rem;
}

.skill-item h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.skill-item p {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.65;
}

.skills-progress,
.skills-viewport {
  display: none;
}

/* ===== Vista 3D fija (la activa skills3d.js) ===== */
.skills-3d.skills-section {
  padding: 0;
}

.skills-3d .skills-scroll {
  height: calc(var(--skills-count, 6) * 100svh);
}

.skills-3d .skills-sticky {
  position: sticky;
  top: 0;
  height: 100svh;
  display: flex;
  align-items: center;
}

.skills-3d .skills-stage {
  width: 100%;
  padding-top: 72px;
}

.skills-3d .section-head {
  margin-bottom: 24px;
  padding-bottom: 14px;
}

.skills-3d .skills-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 40px;
  align-items: center;
}

.skills-3d .skills-list {
  display: grid;
  grid-template-columns: 1fr;
}

.skills-3d .skill-item {
  grid-area: 1 / 1;
  background: none;
  border: none;
  border-radius: 0;
  padding: 0;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.45s ease, transform 0.45s ease;
  pointer-events: none;
}

.skills-3d .skill-item.is-active {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.skills-3d .skill-item h3 {
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1.1;
  margin-bottom: 16px;
}

.skills-3d .skill-item p {
  font-size: 1.02rem;
  max-width: 46ch;
  text-wrap: balance;
}

.skills-3d .skills-progress {
  display: flex;
  gap: 6px;
  margin-top: 32px;
  max-width: 260px;
}

.skills-progress span {
  flex: 1;
  height: 3px;
  border-radius: 2px;
  background: var(--border);
  transition: background 0.3s;
}

.skills-progress span.is-done {
  background: var(--accent);
}

/* Visor 3D + HUD */
.skills-3d .skills-viewport {
  display: block;
  position: relative;
  aspect-ratio: 1 / 1;
  max-height: 62svh;
  width: 100%;
  justify-self: center;
}

#skills-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.skills-hud {
  position: absolute;
  inset: 0;
  pointer-events: none;
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  color: var(--text-muted);
}

.hud-corner {
  position: absolute;
  width: 26px;
  height: 26px;
  border: 2px solid var(--accent);
  opacity: 0.7;
}

.hud-tl { top: 0; left: 0; border-right: none; border-bottom: none; border-radius: 8px 0 0 0; }
.hud-tr { top: 0; right: 0; border-left: none; border-bottom: none; border-radius: 0 8px 0 0; }
.hud-bl { bottom: 0; left: 0; border-right: none; border-top: none; border-radius: 0 0 0 8px; }
.hud-br { bottom: 0; right: 0; border-left: none; border-top: none; border-radius: 0 0 8px 0; }

.hud-readout {
  position: absolute;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.hud-readout strong {
  font-weight: 600;
  color: var(--accent-text);
  font-variant-numeric: tabular-nums;
}

.hud-readout-top { top: 14px; left: 40px; }
.hud-readout-bottom { bottom: 14px; right: 40px; text-align: right; }

.hud-dial {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 64px;
  height: 64px;
  transform: rotate(-90deg);
}

.hud-dial circle {
  fill: none;
  stroke: var(--border);
  stroke-width: 2;
}

.hud-dial .hud-dial-arc {
  stroke: var(--accent);
  stroke-width: 3;
  stroke-dasharray: 0 100;
}

@media (max-width: 768px) {
  .skills-3d .skills-stage {
    padding-top: 64px;
  }

  .skills-3d .section-head {
    gap: 4px;
    margin-bottom: 10px;
    padding-bottom: 10px;
  }

  .skills-3d .section-lede {
    font-size: 0.88rem;
  }

  .skills-3d .skills-layout {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .skills-3d .skills-viewport {
    order: -1;
    max-height: 40svh;
    max-width: 40svh;
  }

  .skills-3d .skill-item h3 {
    font-size: 1.8rem;
    margin-bottom: 8px;
  }

  .skills-3d .skill-item p {
    font-size: 0.92rem;
  }

  .skills-3d .skills-progress {
    margin-top: 16px;
  }

  .hud-dial {
    width: 44px;
    height: 44px;
  }
}

/* ===== SERVICES ===== */
/* Lista editorial: nombre | features | plazo, filas separadas por 1px */
.service-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.service-row {
  display: grid;
  grid-template-columns: minmax(200px, 1fr) 2fr 190px;
  align-items: baseline;
  gap: 8px 40px;
  padding: 28px 0;
  border-bottom: 1px solid var(--border);
}

.service-name {
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: -0.3px;
  line-height: 1.2;
}

.service-feats {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.service-meta {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent-text);
  text-transform: uppercase;
  letter-spacing: 1px;
  white-space: nowrap;
  text-align: right;
}

.service-cta {
  margin-top: 40px;
}

@media (max-width: 768px) {
  .service-row {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 24px 0;
  }

  .service-meta {
    white-space: normal;
    text-align: left;
  }
}

/* ===== PROJECTS ===== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  transition: border-color 0.2s, transform 0.2s;
}

.project-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
}

.project-placeholder {
  height: 180px;
  background: linear-gradient(135deg, #18181b 0%, #1f1f23 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.5rem;
  color: var(--accent-text);
  opacity: 0.6;
}

.project-img {
  overflow: hidden;
  height: 180px;
}

.project-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
  transition: transform 0.35s ease;
}

.project-card:hover .project-img img {
  transform: scale(1.04);
}

.project-info {
  padding: 24px;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}

.tag {
  background: rgba(255, 181, 71, 0.12);
  color: var(--accent-text);
  border: 1px solid rgba(255, 181, 71, 0.25);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.project-info h3 {
  font-size: 1.375rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.project-info p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 20px;
  line-height: 1.6;
}

.project-links {
  display: flex;
  gap: 10px;
}

/* Proyectos: piezas del modo 3D ocultas en la vista estática */
.project-index,
.projects-grid-bg,
.projects-viewport {
  display: none;
}

.projects-section {
  position: relative;
  /* clip (no hidden) para no romper el position: sticky */
  overflow: clip;
}

/* ===== Vista 3D fija de proyectos (la activa projects3d.js) ===== */
.projects-3d.projects-section {
  padding: 0;
}

.projects-3d .projects-scroll {
  height: calc(var(--projects-count, 3) * 100svh);
}

.projects-3d .projects-sticky {
  position: sticky;
  top: 0;
  height: 100svh;
  display: flex;
  align-items: center;
}

.projects-3d .projects-grid-bg {
  display: block;
}

.projects-3d .projects-stage {
  position: relative;
  z-index: 1;
  width: 100%;
  padding-top: 72px;
}

.projects-3d .section-head {
  margin-bottom: 24px;
  padding-bottom: 14px;
}

.projects-3d .projects-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 40px;
  align-items: center;
}

.projects-3d .projects-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

/* Las tarjetas se apilan en la misma celda; solo la activa se ve y se puede clickear */
.projects-3d .project-card,
.projects-3d .project-card.reveal,
.projects-3d .project-card:hover {
  grid-area: 1 / 1;
  background: none;
  border: none;
  border-radius: 0;
  overflow: visible;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.45s ease, transform 0.45s ease;
  pointer-events: none;
}

.projects-3d .project-card.is-active,
.projects-3d .project-card.is-active.reveal {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.projects-3d .project-img {
  display: none;
}

.projects-3d .project-info {
  padding: 0;
}

.projects-3d .project-index {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--accent-text);
  margin-bottom: 14px;
}

.projects-3d .project-info h3 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1.1;
  margin-bottom: 16px;
  text-wrap: balance;
}

.projects-3d .project-info p {
  font-size: 1.02rem;
  max-width: 44ch;
  margin-bottom: 24px;
  text-wrap: pretty;
}

.projects-3d .projects-progress {
  display: flex;
  gap: 6px;
  margin-top: 32px;
  max-width: 200px;
}

.projects-3d .projects-viewport {
  display: block;
  position: relative;
  aspect-ratio: 4 / 3;
  max-height: 64svh;
  width: 100%;
  justify-self: center;
}

#projects-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

@media (max-width: 768px) {
  .projects-3d .projects-stage {
    padding-top: 64px;
  }

  .projects-3d .section-head {
    gap: 4px;
    margin-bottom: 10px;
    padding-bottom: 10px;
  }

  .projects-3d .section-lede {
    font-size: 0.88rem;
  }

  .projects-3d .projects-layout {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .projects-3d .projects-viewport {
    order: -1;
    aspect-ratio: 1.12 / 1;
    max-height: 40svh;
  }

  .projects-3d .project-index {
    margin-bottom: 8px;
  }

  .projects-3d .project-tags {
    margin-bottom: 10px;
  }

  .projects-3d .project-info h3 {
    font-size: 1.6rem;
    margin-bottom: 8px;
  }

  .projects-3d .project-info p {
    font-size: 0.9rem;
    margin-bottom: 14px;
  }

  .projects-3d .projects-progress {
    margin-top: 16px;
  }
}

/* ===== TIMELINE ===== */
.timeline {
  position: relative;
  max-width: 720px;
  padding-left: 32px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border);
}

.timeline-item {
  position: relative;
  margin-bottom: 48px;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-dot {
  position: absolute;
  left: -28px;
  top: 6px;
  width: 14px;
  height: 14px;
  background: var(--accent);
  border-radius: 50%;
  border: 3px solid var(--bg-dark);
}

.timeline-content {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
}

.timeline-date {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent-text);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.timeline-content h3 {
  font-size: 1.375rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.timeline-content h4 {
  font-size: 1.15rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 12px;
}

.timeline-content p {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ===== CERTIFICATIONS ===== */
.cert-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.cert-list li {
  border-bottom: 1px solid var(--border);
}

.cert-row {
  display: grid;
  grid-template-columns: 1fr auto 130px;
  align-items: baseline;
  gap: 6px 40px;
  padding: 22px 0;
  color: var(--text);
  text-decoration: none;
}

.cert-name {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.2px;
  line-height: 1.3;
  transition: color 0.2s;
}

.cert-meta {
  font-size: 0.9rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.cert-open {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
  text-align: right;
  transition: color 0.2s;
}

.cert-open span {
  display: inline-block;
  transition: transform 0.2s;
}

.cert-row:hover .cert-name,
.cert-row:hover .cert-open,
.cert-row:focus-visible .cert-name,
.cert-row:focus-visible .cert-open {
  color: var(--accent-text);
}

.cert-row:hover .cert-open span,
.cert-row:focus-visible .cert-open span {
  transform: translate(2px, -2px);
}

@media (max-width: 768px) {
  .cert-row {
    grid-template-columns: 1fr;
    gap: 4px;
    padding: 20px 0;
  }

  .cert-meta,
  .cert-open {
    white-space: normal;
  }

  .cert-open {
    margin-top: 6px;
    text-align: left;
  }
}

/* ===== CONTACT ===== */
.contact-section {
  position: relative;
  overflow: hidden;
  background: var(--bg-dark);
  padding: 140px 0;
}

.contact-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 700px;
  height: 700px;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(255, 181, 71, 0.06), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.contact-section .container {
  position: relative;
  z-index: 1;
}

.contact-title {
  position: relative;
  font-size: clamp(2.2rem, 5vw, 3.2rem);
}

.contact-primary-cta {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: fit-content;
  margin: 0 auto 56px;
  padding: 18px 36px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 1.05rem;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.2s, background 0.2s;
}

.contact-primary-cta i {
  transition: transform 0.2s;
}

.contact-primary-cta:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
}

.contact-primary-cta:hover i {
  transform: translateX(4px);
}

.contact-subtitle {
  position: relative;
  text-align: center;
  color: var(--text-muted);
  max-width: 520px;
  margin: -40px auto 48px;
  font-size: 1.02rem;
  line-height: 1.7;
}

.contact-cards {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 520px;
  margin: 0 auto;
}

.contact-card {
  display: flex;
  align-items: center;
  gap: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px 28px;
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.2s, transform 0.2s;
}

.contact-card {
  position: relative;
  overflow: hidden;
  z-index: 0;
}

.contact-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--accent);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -1;
}

.contact-card:hover {
  border-color: transparent;
  transform: translateX(4px);
  color: var(--on-accent);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.contact-card:hover::before { opacity: 1; }

.contact-card:hover .contact-label,
.contact-card:hover .contact-value,
.contact-card:hover i { color: var(--on-accent); }

/* ===== FLOATING WHATSAPP ===== */
.whatsapp-float {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 56px;
  height: 56px;
  background: #25d366;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  z-index: 200;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  transition: transform 0.2s, box-shadow 0.2s;
  text-decoration: none;
}

.whatsapp-float:hover {
  transform: scale(1.12);
  box-shadow: 0 6px 28px rgba(0, 0, 0, 0.5);
}

.whatsapp-float::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: #25d366;
  animation: waPulse 2s ease-out infinite;
  z-index: -1;
}

@keyframes waPulse {
  0%   { transform: scale(1);   opacity: 0.6; }
  100% { transform: scale(1.8); opacity: 0; }
}

.contact-card i {
  font-size: 1.6rem;
  color: var(--accent-text);
  min-width: 28px;
}

.contact-card div {
  display: flex;
  flex-direction: column;
}

.contact-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.contact-value {
  font-size: 0.98rem;
  font-weight: 500;
}

/* ===== FOOTER ===== */
.footer {
  text-align: center;
  padding: 32px 24px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.88rem;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* ===== MOBILE ===== */
@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--bg-dark);
    border-bottom: 1px solid var(--border);
    padding: 20px 24px;
    gap: 16px;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-toggle {
    display: block;
  }

  .about-grid {
    grid-template-columns: 1fr;
  }

  .about-photo {
    max-width: 220px;
    margin: 0 auto;
  }

  .timeline {
    padding-left: 24px;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }

  .contact-card {
    padding: 20px;
  }
}
