/* ============================================================
   PORTFOLIO — Hoja de estilos base
   Variables de color: cámbialas en :root para reestilizar todo
   ============================================================ */

:root {
  --bg: #0b0e11;
  --bg-alt: #14181d;
  --surface: #1b2027;
  --surface-hover: #222830;
  --bg-panel: #14181d;
  --bg-panel-2: #1b2027;
  --border: #2a3038;
  --text: #f2f3f0;
  --text-muted: #8b92a0;
  --volt: #afff47;
  --volt-bright: #c8ff4d;
  --coral: #ff6b84;
  --accent: var(--volt);
  --accent-2: var(--coral);
  --accent-gradient: linear-gradient(135deg, var(--volt) 0%, var(--coral) 100%);
  --radius: 16px;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
  --font-body: "Inter", system-ui, sans-serif;
  --font-heading: "Bebas Neue", sans-serif;
  --font-mono: "Space Mono", monospace;
  --transition: 0.25s ease;
}

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

html {
  scroll-behavior: smooth;
}

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

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

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

/* ---------- Utilidades ---------- */
.container {
  width: calc(100% - 4rem);
  margin-inline: auto;
}

.section {
  padding: 96px 0;
}

.section--alt {
  background-color: var(--bg-alt);
}

.section__eyebrow {
  color: var(--volt);
  font-family: var(--font-mono);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-size: 0.78rem;
  margin-bottom: 14px;
}

.section__title {
  font-family: var(--font-heading);
  font-size: clamp(2.2rem, 4vw, 3rem);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  line-height: 1.05;
  margin-bottom: 48px;
  max-width: 28ch;
}

/* ---------- Botones ---------- */
.btn {
  display: inline-block;
  padding: 13px 28px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition), color var(--transition), box-shadow var(--transition);
}

.btn--primary {
  background: var(--volt);
  color: #0b0e11;
  border-color: var(--volt);
}

.btn--primary:hover {
  background: var(--volt-bright);
  border-color: var(--volt-bright);
  box-shadow: 0 0 0 3px rgba(182, 236, 112, 0.25), 0 8px 24px rgba(182, 236, 112, 0.25);
}

.btn--solid {
  background: var(--bg-panel-2);
  border-color: var(--border);
  color: var(--text);
}

.btn--solid:hover {
  background: var(--volt);
  border-color: var(--volt);
  color: #0b0e11;
  box-shadow: 0 0 0 3px rgba(182, 236, 112, 0.25);
}

.btn--block {
  width: 100%;
  text-align: center;
}

.btn--primary .fas {
  margin-right: 8px;
  color: #000;
}

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 106;
  background: rgba(11, 14, 17, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition), background var(--transition);
}

.navbar.is-scrolled {
  border-bottom-color: var(--border);
  background: rgba(11, 14, 17, 0.95);
}

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

.navbar__brand {
  font-family: var(--font-heading);
  font-size: 1.7rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--text);
}

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

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

.navbar__menu-header {
  display: none;
}

.navbar__menu-footer {
  display: none;
}

.navbar__link {
  font-size: 0.95rem;
  color: var(--text-muted);
  font-weight: 500;
  position: relative;
  transition: color var(--transition);
}

.navbar__link i {
  display: none;
}

.navbar__link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 0;
  height: 2px;
  background: var(--accent-gradient);
  border-radius: 2px;
  transition: width var(--transition);
}

.navbar__link:hover,
.navbar__link.is-active {
  color: var(--text);
}

.navbar__link:hover::after,
.navbar__link.is-active::after {
  width: 100%;
}

.navbar__link--cta {
  background: var(--volt);
  border: 1px solid var(--volt);
  color: #0b0e11;
  padding: 9px 20px;
  border-radius: 999px;
}

.navbar__link--cta::after {
  display: none;
}

.navbar__link--cta:hover,
.navbar__link--cta.is-active {
  color: #0b0e11;
  background: var(--volt-bright);
  border-color: var(--volt-bright);
  box-shadow: 0 0 0 3px rgba(182, 236, 112, 0.25);
}

/* Botón hamburguesa (móvil) */
.navbar__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  padding: 10px;
  background: transparent;
  border: none;
  cursor: pointer;
}

.navbar__toggle-bar {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

.navbar__toggle.is-open .navbar__toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.navbar__toggle.is-open .navbar__toggle-bar:nth-child(2) {
  opacity: 0;
}

.navbar__toggle.is-open .navbar__toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--bg);
}

/* --- Slider de fondo del hero --- */
.hero__bg-slider {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.hero__bg-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 30%;
  opacity: 0;
  animation: fadeCrossfade 15s ease-in-out infinite;
}

.hero__bg-slide:nth-child(1) { animation-delay: 0s; }
.hero__bg-slide:nth-child(2) { animation-delay: 5s; }
.hero__bg-slide:nth-child(3) { animation-delay: 10s; }

@keyframes fadeCrossfade {
  0%   { opacity: 0; transform: scale(1); }
  10%  { opacity: 0.6; }
  33%  { opacity: 0.6; }
  43%  { opacity: 0; transform: scale(1.05); }
  100% { opacity: 0; transform: scale(1); }
}

.hero__bg-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(to right, var(--bg) 25%, rgba(11, 14, 17, 0.85) 50%, transparent 100%),
    linear-gradient(to bottom, var(--bg) 0%, transparent 15%, transparent 85%, var(--bg) 100%);
  pointer-events: none;
}

.hero__inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 48px;
  align-items: center;
  padding-top: 96px;
}

.hero__eyebrow {
  color: var(--volt);
  font-family: var(--font-mono);
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-size: 0.8rem;
  margin-bottom: 16px;
}

.hero__title {
  font-family: var(--font-heading);
  font-size: clamp(3rem, 9vw, 6.5rem);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  line-height: 0.95;
  margin-bottom: 12px;
  color: var(--text);
}

.hero__title-name {
  display: block;
}

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

.hero__subtitle {
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.hero__alias {
  color: var(--volt);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.9em;
  margin-left: 10px;
  transition: color var(--transition);
}

.hero__alias:hover {
  color: var(--coral);
}

.hero__text {
  color: var(--text-muted);
  max-width: 52ch;
  margin-bottom: 32px;
}

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

.hero__image {
  display: flex;
  justify-content: center;
}

.hero__placeholder {
  width: min(340px, 80%);
  aspect-ratio: 4 / 5;
  border-radius: 24px;
  background: var(--surface);
  border: 1px dashed var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  box-shadow: var(--shadow);
}

.hero__image img {
  width: min(340px, 80%);
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 24px;
  box-shadow: var(--shadow);
}

/* ============================================================
   SOBRE MÍ
   ============================================================ */
.about {
  display: grid;
  grid-template-columns: minmax(0, 340px) minmax(0, 1fr);
  gap: 40px;
  align-items: center;
}

.about__image {
  display: flex;
  justify-content: center;
}

.about__placeholder {
  width: 100%;
  max-width: 380px;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px dashed var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.about__frame {
  width: min(340px, 100%);
  aspect-ratio: 1 / 1;
  border-radius: var(--radius);
  border: 2px solid var(--coral);
  box-shadow: 0 0 0 4px rgba(255, 107, 132, 0.15), var(--shadow);
  overflow: hidden;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.about__frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform var(--transition);
}

.about__frame:hover {
  border-color: var(--coral);
  box-shadow: 0 0 0 6px rgba(255, 107, 132, 0.2), 0 24px 50px rgba(0, 0, 0, 0.5);
}

.about__frame:hover img {
  transform: scale(1.08);
}

.about__content .about__text {
  color: var(--text-muted);
  margin-bottom: 14px;
}

.about__facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 20px;
  margin: 20px 0 24px;
  padding: 18px 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.about__facts strong {
  display: block;
  color: var(--accent-2);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 2px;
}

/* ============================================================
   TECNOLOGÍAS
   ============================================================ */
.tech-cats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 22px;
}

.tech-cat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 24px 26px;
  display: flex;
  flex-direction: column;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}

.tech-cat:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.tech-cat__head {
  list-style: none;
  cursor: default;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
}

.tech-cat__head::-webkit-details-marker {
  display: none;
}

.tech-cat__head::marker {
  content: "";
}

.tech-cat__head::after {
  display: none;
}

.tech-cat__tag {
  align-self: flex-start;
  color: var(--volt);
  background: rgba(182, 236, 112, 0.1);
  border: 1px solid rgba(182, 236, 112, 0.3);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 4px 12px;
  margin-bottom: 12px;
}

.tech-cat__title {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin-bottom: 4px;
}

.tech-cat__desc {
  display: block;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 16px;
}

.tech-cat__list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 13px;
  margin-top: auto;
}

.tech-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.tech-item__icon {
  font-size: 1.25rem;
  line-height: 1;
  width: 26px;
  text-align: center;
  flex-shrink: 0;
}

.tech-item__icon--unity {
  color: var(--text);
  font-size: 1.1rem;
}

.tech-item__icon--django {
  color: var(--accent);
}

.tech-item__icon--oracle {
  color: #ea1b22;
}

.tech-item__icon--mariadb {
  color: #4a9bd8;
}

.tech-item__icon--vercel {
  color: var(--text);
}

.tech-item__icon--supabase {
  color: #3ecf8e;
}

.tech-item__icon--xampp {
  width: 22px;
  height: 22px;
}

.tech-item__icon--powerbi {
  width: 22px;
  height: 22px;
}

.tech-item__name {
  font-size: 0.92rem;
  font-weight: 600;
  flex: 1;
}

.tech-item__level {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.tech-item__level--high {
  color: var(--volt);
}

.tech-item__level--mid {
  color: #f2c94c;
}

.tech-item__level--low {
  color: var(--coral);
}

/* ============================================================
   CERTIFICADOS
   ============================================================ */
.cert-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.cert-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 18px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.cert-card:hover {
  transform: translateY(-6px);
  border-color: var(--accent);
  box-shadow: var(--shadow);
}

.cert-card__badge-wrap {
  width: 90px;
  height: 90px;
  flex-shrink: 0;
  cursor: zoom-in;
}

.cert-card__badge {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform var(--transition);
}

.cert-card__badge-wrap:hover .cert-card__badge {
  transform: scale(1.08);
}

.cert-card__body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex: 1;
}

.cert-card__title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  line-height: 1.2;
}

.cert-card__desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.45;
  margin-bottom: 4px;
}

.cert-card__date {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--volt);
  background: rgba(182, 236, 112, 0.1);
  border: 1px solid rgba(182, 236, 112, 0.3);
  padding: 3px 10px;
  border-radius: 999px;
}

.cert-card__link {
  margin-top: auto;
  color: var(--coral);
  font-weight: 600;
  font-size: 0.9rem;
  transition: opacity var(--transition);
}

.cert-card__link:hover {
  opacity: 0.75;
}

/* ---------- Modal certificado ---------- */
.cert-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.cert-modal[aria-hidden="false"] {
  opacity: 1;
  pointer-events: auto;
}

.cert-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
}

.cert-modal__panel {
  position: relative;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  max-width: 400px;
  width: 90%;
  padding: 32px 28px 28px;
  transform: translateY(20px) scale(0.97);
  transition: transform 0.3s ease;
}

.cert-modal[aria-hidden="false"] .cert-modal__panel {
  transform: translateY(0) scale(1);
}

.cert-modal__close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.6rem;
  cursor: pointer;
  line-height: 1;
  padding: 4px;
  transition: color var(--transition);
}

.cert-modal__close:hover {
  color: var(--text);
}

.cert-modal__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
}

.cert-modal__img {
  width: 120px;
  height: 120px;
  object-fit: contain;
}

.cert-modal__title {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  line-height: 1.2;
}

.cert-modal__desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.cert-modal__meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.8rem;
}

.cert-modal__issuer {
  color: var(--text-muted);
}

.cert-modal__date {
  color: var(--volt);
  font-weight: 600;
}

.cert-modal__cta {
  display: inline-block;
  margin-top: 6px;
  padding: 10px 24px;
  background: var(--volt);
  color: var(--bg);
  font-weight: 700;
  font-size: 0.9rem;
  border-radius: 999px;
  transition: background var(--transition), transform var(--transition);
}

.cert-modal__cta:hover {
  background: var(--volt-bright);
  transform: translateY(-2px);
}

/* ============================================================
   PROYECTOS — Carrusel
   ============================================================ */
.projects-carousel {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(10px, 2vw, 22px);
}

.carousel__arrow--prev { grid-column: 1; grid-row: 1; }
.carousel__viewport { grid-column: 2; grid-row: 1; }
.carousel__arrow--next { grid-column: 3; grid-row: 1; }

.carousel__viewport {
  overflow: hidden;
  border-radius: var(--radius);
}

.carousel__track {
  display: flex;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-row {
  flex: 0 0 100%;
  min-width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: clamp(24px, 3vw, 36px);
  align-items: stretch;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(22px, 2.6vw, 32px);
  transition:
    border-color var(--transition),
    box-shadow var(--transition);
}

.project-row:hover,
.project-row:focus-within {
  border-color: rgba(175, 255, 71, 0.5);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.35);
}

.project-visual {
  width: 100%;
  align-self: start;
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-alt);
  display: flex;
  align-items: center;
  justify-content: center;
}

.project-visual > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.5s ease;
  cursor: zoom-in;
  display: block;
}

.project-visual__badge {
  position: absolute;
  top: 10px;
  left: 10px;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 9px;
  border-radius: 8px;
  background: rgba(11, 14, 17, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1;
  z-index: 2;
  pointer-events: none;
}

.project-visual__badge svg {
  color: var(--volt);
}

.project-visual:hover > img,
.project-visual:focus-within > img {
  transform: scale(1.05);
}

.project-visual__placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.project-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.project-info__title {
  font-family: var(--font-heading);
  font-size: clamp(1.6rem, 2.7vw, 2.05rem);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  line-height: 1.05;
  margin-bottom: 12px;
  color: var(--text);
}

.project-info__description {
  color: var(--text-muted);
  font-size: 0.98rem;
  max-width: none;
  margin-bottom: 20px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.project-description.is-expanded .project-info__description {
  -webkit-line-clamp: unset;
  line-clamp: unset;
  overflow: visible;
}

.project-techs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 18px;
  margin-bottom: 20px;
}

.project-techs li {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.project-techs__icon {
  font-size: 1.65rem;
  line-height: 1;
  height: 1.65rem;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

svg.project-techs__icon {
  width: 1.65rem;
  height: 1.65rem;
  flex-shrink: 0;
}

.project-techs__icon--light {
  color: var(--text);
}

.project-techs span {
  font-size: 0.68rem;
  color: var(--text-muted);
}

.project-desc-toggle {
  display: none;
  background: none;
  border: none;
  padding: 0;
  margin: -10px 0 18px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--volt);
  cursor: pointer;
}

.project-desc-toggle.is-visible {
  display: inline-block;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.96rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  transition: color var(--transition);
  margin-top: auto;
  padding-top: 16px;
}

.project-link:hover,
.project-link:focus {
  color: var(--volt);
}

/* Flechas del carrusel */
.carousel__arrow {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--bg-panel-2);
  border: 1px solid var(--border);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 3;
  transition: border-color var(--transition), color var(--transition), background var(--transition);
}

.carousel__arrow:hover {
  border-color: var(--volt);
  color: var(--volt);
  background: var(--bg-panel);
}

.carousel__arrow:disabled {
  opacity: 0.35;
  cursor: default;
  pointer-events: none;
}

/* Puntos indicadores */
.carousel__dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 26px;
}

.carousel__dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1px solid rgba(242, 243, 240, 0.5);
  background: rgba(242, 243, 240, 0.18);
  padding: 0;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition), transform var(--transition);
}

.carousel__dot:hover {
  border-color: var(--volt);
  background: rgba(200, 255, 77, 0.35);
}

.carousel__dot.is-active {
  background: var(--volt);
  border-color: var(--volt);
  transform: scale(1.25);
}

/* Lightbox de imágenes de proyectos */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(5, 7, 9, 0.88);
  backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition), visibility var(--transition);
}

.lightbox.is-open {
  opacity: 1;
  visibility: visible;
}

.lightbox__panel {
  position: relative;
  width: min(calc(100vw - 4rem), calc((100dvh - 6rem) * 1.9));
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lightbox__body {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
}

.lightbox__viewport {
  position: relative;
  flex: 1;
  min-width: 0;
  height: min(85vh, calc((100vw - 4rem) * 0.6));
  overflow: hidden;
  border-radius: 10px;
}

.lightbox__track {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.lightbox__slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox__slide--prev { transform: translateX(-100%); }
.lightbox__slide--next { transform: translateX(100%); }

.lightbox__slide img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 10px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.lightbox__close {
  position: fixed;
  top: 18px;
  right: 18px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-panel-2);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  transition: border-color var(--transition), color var(--transition);
}

.lightbox__close:hover {
  border-color: var(--volt);
  color: var(--volt);
}

/* Lightbox carousel arrows */
.lightbox__arrow {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--bg-panel-2);
  border: 1px solid var(--border);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
  transition: border-color var(--transition), color var(--transition), background var(--transition);
}

.lightbox__arrow:hover {
  border-color: var(--volt);
  color: var(--volt);
  background: var(--bg-panel);
}

.lightbox__arrow:disabled {
  opacity: 0.35;
  cursor: default;
  pointer-events: none;
}

.lightbox__arrow--prev {
  order: -1;
}

.lightbox__arrow--next {
  order: 1;
}

/* Lightbox image counter */
.lightbox__counter {
  margin-top: 12px;
  font-family: var(--font-label);
  font-size: 0.85rem;
  color: var(--text-muted);
  background: var(--bg-panel-2);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 4px 14px;
  user-select: none;
}

.lightbox__dots {
  display: none;
  position: fixed;
  bottom: max(20px, env(safe-area-inset-bottom));
  left: 0;
  right: 0;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 16px;
  z-index: 201;
}

.lightbox__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  border: none;
  padding: 0;
  background: rgba(242, 243, 240, 0.4);
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
}

.lightbox__dot.is-active {
  background: var(--text);
  transform: scale(1.3);
}

.carousel__track,
.lightbox__viewport {
  touch-action: pan-y;
}

.lightbox__viewport.is-zooming {
  touch-action: none;
}

/* ============================================================
   CONTACTO
   ============================================================ */
.contact {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 56px;
}

.contact__text {
  color: var(--text-muted);
  margin-bottom: 32px;
}

.contact__list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.contact__label {
  display: block;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.contact__value {
  font-weight: 500;
  transition: color var(--transition);
}

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

.contact__form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
}

.contact__field {
  margin-bottom: 20px;
}

.contact__input {
  width: 100%;
  padding: 13px 16px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}

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

.contact__input:focus {
  outline: none;
  border-color: var(--volt);
  box-shadow: 0 0 0 3px rgba(182, 236, 112, 0.2);
}

.contact__input--textarea {
  resize: vertical;
  min-height: 120px;
}

.contact__input.is-invalid {
  border-color: #ef4444;
}

.contact__form-status {
  margin-top: 16px;
  font-size: 0.9rem;
  color: var(--accent-2);
  min-height: 1.2em;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer__brand {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 700;
}

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

.footer__copy {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer__social {
  display: flex;
  gap: 20px;
}

.footer__social a {
  color: var(--text-muted);
  font-size: 0.95rem;
  transition: color var(--transition);
}

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

/* ============================================================
   APARICIÓN AL HACER SCROLL (reveal)
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .hero__inner,
  .about,
  .contact {
    grid-template-columns: 1fr;
  }

  .about {
    align-items: start;
  }

  .about__image {
    position: static;
  }

  .hero__image {
    order: -1;
  }

  .hero__bg-overlay {
    background:
      linear-gradient(to right, rgba(11, 14, 17, 0.9) 0%, rgba(11, 14, 17, 0.7) 100%),
      linear-gradient(to top, var(--bg) 0%, transparent 20%);
  }

  .section {
    padding: 72px 0;
  }
}

@media (max-width: 720px) {
  .navbar__toggle {
    display: flex;
  }

  /* Panel lateral (drawer) */
  .navbar__menu {
    position: fixed;
    top: 0;
    right: 0;
    height: 100dvh;
    width: min(82vw, 330px);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--bg-panel-2);
    border-left: 1px solid var(--border);
    padding: 1.4rem 1.2rem;
    z-index: 106;
    transform: translateX(100%);
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    overflow-y: auto;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .navbar__menu.is-open {
    transform: translateX(0);
  }

  .navbar__menu-header {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-bottom: 0.5rem;
    margin-bottom: 0.5rem;
  }

  .navbar__menu-close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--bg-panel);
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: border-color var(--transition), color var(--transition), background var(--transition);
  }

  .navbar__menu-close:hover {
    border-color: var(--volt);
    color: var(--volt);
    background: var(--bg);
  }

  .navbar__link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0.8rem 0.6rem;
    font-size: 1rem;
    border-radius: 10px;
    margin-bottom: 2px;
  }

  .navbar__link i {
    display: inline-flex;
    width: 22px;
    justify-content: center;
    font-size: 0.95rem;
    color: var(--text-muted);
    transition: color var(--transition);
  }

  .navbar__link:hover,
  .navbar__link.is-active {
    color: var(--volt);
    background: rgba(182, 236, 112, 0.08);
  }

  .navbar__link::after {
    display: none;
  }

  .navbar__link:hover i,
  .navbar__link.is-active i {
    color: var(--volt);
  }

  .navbar__menu-footer {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
  }

  .navbar__social {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    transition: color var(--transition);
  }

  .navbar__social:hover {
    color: var(--volt);
  }

  /* Fondo oscurecido detrás del panel */
  .navbar__backdrop {
    position: fixed;
    inset: 0;
    z-index: 105;
    background: rgba(0, 0, 0, 0.6);
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
  }

  .navbar__backdrop.is-open {
    opacity: 1;
    pointer-events: auto;
  }

  body.no-scroll {
    overflow: hidden;
  }

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

  .about__content .btn {
    display: block;
    width: max-content;
    margin-inline: auto;
  }

  /* Tecnologías: acordeón compacto */
  .tech-cats {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .tech-cat {
    padding: 0;
    overflow: hidden;
  }

  .tech-cat:hover {
    transform: none;
    box-shadow: none;
  }

  .tech-cat__head {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
    padding: 14px 42px 14px 16px;
    cursor: pointer;
    transition: background var(--transition);
  }

  .tech-cat__head:hover {
    background: var(--surface-hover);
  }

  .tech-cat__head::after {
    position: absolute;
    top: 50%;
    right: 16px;
    display: block;
    content: "";
    width: 9px;
    height: 9px;
    flex-shrink: 0;
    border-right: 2px solid var(--volt);
    border-bottom: 2px solid var(--volt);
    transform: translateY(-50%) rotate(45deg);
    transition: transform var(--transition);
  }

  .tech-cat[open] .tech-cat__head::after {
    transform: translateY(-50%) rotate(225deg);
  }

  .tech-cat__tag {
    align-self: flex-start;
    margin-bottom: 0;
    font-size: 0.62rem;
    padding: 2px 9px;
    max-width: 100%;
  }

  .tech-cat__title {
    font-size: 1.05rem;
    line-height: 1.2;
    margin-bottom: 0;
    padding-right: 0;
  }

  .tech-cat__content {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .tech-cat__content > * {
    min-height: 0;
    overflow: hidden;
  }

  .tech-cat[open] .tech-cat__content {
    grid-template-rows: 1fr;
  }

  .tech-cat[open] .tech-cat__desc {
    border-top: 1px solid var(--border);
    padding: 14px 16px 0;
  }

  .tech-cat__list {
    padding: 14px 16px 18px;
  }

  /* Certificados: cards horizontales compactos */
  .cert-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .cert-card {
    flex-direction: row;
    align-items: center;
    text-align: left;
    gap: 14px;
    padding: 14px 16px;
  }

  .cert-card:hover {
    transform: none;
    box-shadow: none;
  }

  .cert-card__badge-wrap {
    width: 56px;
    height: 56px;
  }

  .cert-card__body {
    align-items: flex-start;
    gap: 4px;
  }

  .cert-card__title {
    font-size: 1rem;
    line-height: 1.2;
  }

  .cert-card__desc {
    display: none;
  }

  .cert-card__link {
    margin-top: 0;
    font-size: 0.85rem;
  }

  .contact__form {
    padding: 24px;
  }

  .project-row {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 20px;
    align-content: start;
  }

  .project-visual {
    aspect-ratio: 4 / 3;
  }

  .project-techs {
    gap: 10px 14px;
    margin-bottom: 20px;
  }

  .project-techs__icon,
  svg.project-techs__icon {
    font-size: 1.3rem;
    width: 1.3rem;
    height: 1.3rem;
  }

  .project-techs span {
    font-size: 0.62rem;
  }

  .carousel__arrow {
    display: none;
  }

  .projects-carousel {
    grid-template-columns: 1fr;
  }

  .carousel__viewport {
    grid-column: 1;
  }

  .lightbox {
    padding: 0;
  }

  .lightbox__panel {
    width: 100%;
    max-width: 100%;
  }

  .lightbox__body {
    gap: 0;
  }

  .lightbox__viewport {
    width: 100%;
    height: calc(100vh - 64px);
    height: calc(100dvh - 64px);
    border-radius: 0;
  }

  .lightbox__slide img {
    border-radius: 0;
    border: none;
  }

  .lightbox__arrow {
    display: none;
  }

  .lightbox__counter {
    display: none;
  }

  .lightbox__dots {
    display: flex;
  }

  .lightbox__close {
    top: 12px;
    right: 12px;
    width: 38px;
    height: 38px;
    font-size: 1.3rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .about__image img {
    transition: none;
    transform: none;
  }
}