@charset "UTF-8";
/*
----------------------
      VARIABLES
----------------------
*/
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url("../fonts/JetBrainsMono.woff2") format("woff2-variations"), url("../fonts/JetBrainsMono.woff2") format("woff2");
}
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url("../fonts/Poppins-300.woff2") format("woff2");
}
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/Poppins-400.woff2") format("woff2");
}
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/Poppins-500.woff2") format("woff2");
}
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/Poppins-600.woff2") format("woff2");
}
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/Poppins-700.woff2") format("woff2");
}
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("../fonts/Poppins-800.woff2") format("woff2");
}
/*
----------------------
       MIXINS
----------------------
*/
/*
----------------------
       BASE
----------------------
*/
:root {
  --bg: #0a0a0a;
  --bg-panel: #0f0f0f;
  --bg-titlebar: #161616;
  --border: rgba(255, 255, 255, 0.12);
  --border-soft: rgba(255, 255, 255, 0.08);
  --text: #e6e6e6;
  --text-strong: #f2f2f2;
  --text-muted: #a3a3a3;
  --text-dim: #8a8a8a;
  --text-faint: #868686;
  --win-dot: #3a3a3a;
  --accent: #e5c07b;
  --glow-rgb: 229, 192, 123;
  --aurora-alpha: 0.22;
  --spotlight-alpha: 0.12;
}

html[data-bs-theme=light] {
  --bg: #f6f5f2;
  --bg-panel: #ffffff;
  --bg-titlebar: #ece9e2;
  --border: rgba(10, 10, 10, 0.14);
  --border-soft: rgba(10, 10, 10, 0.08);
  --text: #100e0c;
  --text-strong: #0a0a0a;
  --text-muted: #000000;
  --text-dim: #6b6862;
  --text-faint: #67635a;
  --win-dot: #cfcbc0;
  --accent: #8a5a10;
  --glow-rgb: 138, 90, 16;
  --aurora-alpha: 0.6;
  --spotlight-alpha: 0.14;
}

img {
  height: auto;
}

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

body {
  background-color: var(--bg);
  color: var(--text);
}

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

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

/*
----------------------
   TIPOGRAFÍA / TEXTO
----------------------
*/
.mono {
  font-family: "JetBrains Mono", ui-monospace, monospace;
}

h1,
h2,
h3,
.section-title {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  color: var(--text-strong);
}

.section-eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.section-eyebrow .num {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.8rem;
  color: var(--text-faint);
}

.section-lede {
  color: var(--text-dim);
  font-size: 0.95rem;
}

@media (min-width: 768px) {
  .section-eyebrow {
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
  }
  .section-lede {
    max-width: 1100px;
    margin: 0 auto;
  }
}
code {
  font-family: "JetBrains Mono", monospace;
  background: rgba(229, 192, 123, 0.14);
  border: 1px solid rgba(229, 192, 123, 0.28);
  color: var(--accent);
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 0.85em;
  font-weight: 600;
}

/*
----------------------
   VENTANA DE CÓDIGO
----------------------
*/
.win {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
}

.win-bar {
  height: 32px;
  display: flex;
  align-items: center;
  /* keep overflow visible by default, but ensure the fill doesn't visually overflow */
  gap: 7px;
  padding: 0 12px;
  background: var(--bg-titlebar);
  border-bottom: 1px solid var(--border-soft);
}

.win-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--win-dot);
}

.win-name {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.72rem;
  color: var(--text-faint);
  margin-left: 6px;
}

/*
----------------------
       CLASES
----------------------
*/
.boton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: "JetBrains Mono", "Poppins", monospace;
  font-weight: 600;
  font-size: 0.86rem;
  letter-spacing: 0.01em;
  padding: 12px 26px;
  border-radius: 4px;
  border: 1.5px solid var(--accent);
  background: transparent;
  color: var(--accent);
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.2s;
}
.boton:hover {
  background: #e5c07b;
  color: #0a0a0a;
  transform: translateY(-2px);
}
.boton:active {
  transform: translateY(0);
}
.boton:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(229, 192, 123, 0.35);
}
.boton {
  border-radius: 4px;
}

.nav-link.icono {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 4px;
  border: 1px solid var(--border);
  color: var(--text);
  transition: border-color 0.2s, color 0.2s, transform 0.2s;
}
.nav-link.icono svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}
.nav-link.icono:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}
.nav-link.icono:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(229, 192, 123, 0.35);
}

.cmd-link {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.86rem;
  color: var(--accent);
  text-underline-offset: 3px;
  transition: transform 0.2s, opacity 0.2s;
}
.cmd-link:hover {
  text-decoration: underline;
  transform: translateY(-2px);
}
.cmd-link.disabled {
  color: var(--text-faint);
  opacity: 0.7;
  pointer-events: none;
  cursor: not-allowed;
}
.cmd-link--preview-glow {
  font-weight: 700;
  animation: cmd-link-glow-pulse 2.2s ease-in-out infinite;
}
.cmd-link--preview-glow:hover, .cmd-link--preview-glow:focus-visible {
  animation-play-state: paused;
}

@keyframes cmd-link-glow-pulse {
  0%, 100% {
    opacity: 1;
    text-shadow: 0 0 0 rgba(229, 192, 123, 0);
  }
  50% {
    opacity: 0.95;
    text-shadow: 0 0 6px rgba(229, 192, 123, 0.9), 0 0 16px rgba(229, 192, 123, 0.5), 0 0 28px rgba(229, 192, 123, 0.25);
  }
}
@media (prefers-reduced-motion: reduce) {
  .cmd-link--preview-glow {
    animation: none;
  }
}
.tag {
  display: inline-flex;
  align-items: center;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--accent);
  background: rgba(var(--glow-rgb), 0.12);
  border: 1px solid rgba(var(--glow-rgb), 0.4);
  padding: 4px 10px;
  border-radius: 999px;
}
.tag.text-tag {
  width: auto;
}

/*
----------------------
        HERO
----------------------
*/
.hero-section {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 64px 16px 48px;
  background-image: radial-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 26px 26px;
}

@media (min-width: 768px) {
  .hero-section {
    padding: 96px 16px 72px;
  }
}
html[data-bs-theme=light] .hero-section {
  background-image: radial-gradient(rgba(10, 10, 10, 0.05) 1px, transparent 1px);
}

.hero-window {
  max-width: 760px;
  margin: 0 auto;
}

.hero-body {
  padding: 44px 32px 48px;
  text-align: left;
}

@media (min-width: 768px) {
  .hero-body {
    padding: 56px 56px 64px;
  }
}
.term-prompt {
  font-family: "JetBrains Mono", monospace;
  color: var(--text-faint);
  font-size: 0.9rem;
  margin-bottom: 10px;
}

.hero-name {
  font-size: clamp(2.2rem, 8vw, 3.4rem);
  font-weight: 700;
  color: var(--text-strong);
  margin: 0 0 26px;
  letter-spacing: -0.01em;
}

.hero-greeting {
  font-family: "JetBrains Mono", monospace;
  font-size: 1.1rem;
  color: var(--accent);
  margin: 0 0 22px;
}

#palabras {
  border-right: 3px solid var(--accent);
  animation: blink 1s infinite;
  padding-right: 2px;
}

@keyframes blink {
  0%, 49% {
    border-right-color: var(--accent);
  }
  50%, 100% {
    border-right-color: transparent;
  }
}
@media (prefers-reduced-motion: reduce) {
  #palabras {
    animation: none;
  }
}
.hero-role {
  font-family: "JetBrains Mono", monospace;
  font-size: 1.05rem;
  color: var(--text-muted);
  margin: 0 0 40px;
}

/*
----------------------
      SOBRE MÍ
----------------------
*/
.about-card {
  max-width: 820px;
  margin: 0 auto;
}

.about-photo-window {
  width: 200px;
  margin: 0 auto;
}
.about-photo-window img {
  width: 100%;
  aspect-ratio: 280/330;
  object-fit: cover;
  display: block;
}

@media (min-width: 768px) {
  .about-photo-window {
    margin: 0;
  }
}
#about .lead {
  max-width: 62ch;
}

/*
----------------------
   TIMELINE (SOBRE MÍ)
----------------------
*/
.timeline {
  max-width: 720px;
  margin: 56px auto 0;
}

.timeline-track {
  position: relative;
  margin-top: 32px;
}

.timeline-line,
.timeline-line-fill {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 7px;
  width: 2px;
  z-index: 1;
}

.timeline-line {
  background: var(--border-soft);
}

.timeline-line-fill {
  background: var(--accent);
  transform: scaleY(0);
  transform-origin: top;
}

.timeline-item {
  position: relative;
  padding-left: 34px;
  padding-bottom: 56px;
  z-index: 2;
}
.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-dot {
  position: absolute;
  top: 26px;
  left: 0;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--win-dot);
  border: 2px solid var(--win-dot);
  box-shadow: none;
  z-index: 2;
  transition: border-color 240ms ease, background-color 240ms ease, box-shadow 240ms ease;
}

.timeline-dot.is-lit {
  border-color: var(--accent);
  background: var(--accent);
  box-shadow: 0 0 10px 2px rgba(var(--glow-rgb), 0.32);
  animation: timeline-dot-ignite 380ms cubic-bezier(0.23, 1, 0.32, 1) both, timeline-dot-breathe 3200ms ease-in-out 380ms infinite;
}

@keyframes timeline-dot-ignite {
  0% {
    transform: scale(0.9);
    box-shadow: 0 0 0 0 rgba(var(--glow-rgb), 0);
  }
  55% {
    transform: scale(1.15);
    box-shadow: 0 0 20px 5px rgba(var(--glow-rgb), 0.32);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 10px 2px rgba(var(--glow-rgb), 0.32);
  }
}

@keyframes timeline-dot-breathe {
  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 0 10px 2px rgba(var(--glow-rgb), 0.32);
  }
  50% {
    transform: scale(1.04);
    box-shadow: 0 0 16px 4px rgba(var(--glow-rgb), 0.4);
  }
}

@media (prefers-reduced-motion: reduce) {
  .timeline-dot.is-lit {
    animation: none;
  }
}

.timeline-date {
  display: block;
  font-size: 0.76rem;
  letter-spacing: 0.02em;
  color: var(--text-faint);
  margin-bottom: 6px;
}

.timeline-role {
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--text-strong);
  margin: 0 0 12px;
}

.timeline-company {
  font-weight: 500;
  color: var(--accent);
}

.timeline-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.timeline-list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.timeline-list li {
  position: relative;
  padding-left: 18px;
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--text-muted);
}
.timeline-list li::before {
  content: ">";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-family: "JetBrains Mono", monospace;
  font-weight: 600;
}
.timeline-list li:not(:last-child) {
  margin-bottom: 8px;
}

/*
----------------------
   ESPACIADO DE SECCIONES
----------------------
*/
.section-py {
  padding-top: 72px;
  padding-bottom: 72px;
}

@media (min-width: 768px) {
  .section-py {
    padding-top: 120px;
    padding-bottom: 120px;
  }
}
/*
----------------------
      PROYECTOS
----------------------
*/
.project-list {
  border-top: 1px solid var(--border-soft);
}

.project-item {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 30px 0;
  border-bottom: 1px solid var(--border-soft);
}

.project-image {
  width: 100%;
  max-width: 420px;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 1px solid var(--border);
  display: block;
  margin: 0 auto;
}

.project-body {
  min-width: 0;
}

.project-title {
  font-family: "JetBrains Mono", monospace;
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--text-strong);
  margin: 0 0 10px;
}

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

.project-desc {
  font-size: 0.94rem;
  line-height: 1.6;
  color: var(--text-muted);
  margin: 0 0 16px;
  max-width: 72ch;
}

.project-desc strong {
  color: var(--text-strong);
  font-weight: 600;
}

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

@media (min-width: 768px) {
  .project-item {
    flex-direction: row;
    align-items: flex-start;
    gap: 32px;
  }
  .project-image {
    width: 260px;
    max-width: 100%;
    height: 195px;
    aspect-ratio: auto;
    flex-shrink: 0;
    margin: 0;
  }
}
/*
----------------------
      SERVICIOS
----------------------
*/
.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
@media (min-width: 768px) {
  .services-grid {
    gap: 24px;
  }
}
@media (min-width: 1200px) {
  .services-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.service-item {
  display: flex;
}

.service {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 26px 24px 22px;
  min-width: 0;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 4px;
  transition: transform 200ms cubic-bezier(0.23, 1, 0.32, 1), border-color 0.2s;
}
.service:focus-within {
  border-color: var(--accent);
}
.service:focus-within .service-cta {
  animation: blink 1s infinite;
}

@media (hover: hover) and (pointer: fine) {
  .service:hover {
    border-color: var(--accent);
    transform: translateY(-3px);
  }
  .service:hover .service-cta {
    animation: blink 1s infinite 120ms;
  }
}
@media (prefers-reduced-motion: reduce) {
  .service {
    transition: border-color 0.2s;
  }
  .service:hover {
    transform: none;
  }
  .service:hover .service-cta,
  .service:focus-within .service-cta {
    animation: none;
    border-right-color: var(--accent);
  }
}
.service-index {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-faint);
  letter-spacing: 0.08em;
  margin-bottom: 12px;
}

.service-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-strong);
  line-height: 1.35;
  margin: 0 0 12px;
}

.service-for {
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--text-dim);
  margin: 0 0 18px;
}

.service-list {
  margin-bottom: 20px;
}
.service-list strong {
  color: var(--text-strong);
  font-weight: 600;
}

.service-detail {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.service-head {
  min-width: 0;
}

.service-tags {
  margin-top: auto;
}

.service-cta {
  align-self: flex-start;
  border-right: 3px solid transparent;
  padding-right: 2px;
}

@media (min-width: 768px) and (max-width: 1199.98px) {
  .service {
    flex-direction: row;
    align-items: flex-start;
    gap: 36px;
    padding: 28px;
  }
  .service-head {
    flex: 0 0 40%;
  }
  .service-for {
    margin-bottom: 0;
  }
}

/*
----------------------
   CERTIFICADOS (cinta infinita)
----------------------
*/
.certs-window {
  margin: 0 auto;
}

@media (min-width: 768px) {
  .certs-window {
    max-width: 1100px;
  }
}
.certs-grid {
  display: flex;
  gap: 10px;
  padding: 22px 12px;
  overflow-x: auto;
  scrollbar-width: none;
}
.certs-grid::-webkit-scrollbar {
  display: none;
}

@media (min-width: 768px) {
  .certs-grid {
    gap: 20px;
    padding: 34px 24px;
  }
}
@media (hover: hover) and (pointer: fine) {
  .certs-grid {
    cursor: grab;
  }
  .certs-grid.is-dragging {
    cursor: grabbing;
  }
}
.certs-grid.is-dragging,
.certs-grid.is-dragging * {
  user-select: none;
}

.cert-tile img {
  -webkit-user-drag: none;
}

.cert-tile {
  flex: 0 0 calc((100% - 10px) / 2);
  display: flex;
  flex-direction: column;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: transparent;
  overflow: hidden;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.2s;
}
.cert-tile img {
  width: 100%;
  aspect-ratio: 700/539;
  object-fit: cover;
  display: block;
  transition: transform 220ms ease;
}
.cert-tile:hover {
  border-color: var(--accent);
}
.cert-tile:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(229, 192, 123, 0.35);
}

@media (min-width: 768px) {
  .cert-tile {
    flex: 0 0 220px;
  }
}
@media (hover: hover) and (pointer: fine) {
  .cert-tile:hover img {
    transform: scale(1.04);
  }
}
.cert-tile-caption {
  display: block;
  padding: 10px 12px;
  border-top: 1px solid var(--border-soft);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text-dim);
}

.cert-modal-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(0, 0, 0, 0.4);
  color: #fff;
  font-size: 1.6rem;
  line-height: 1;
  padding: 0;
  transition: background-color 0.2s, border-color 0.2s;
}
.cert-modal-nav:hover {
  background-color: #e5c07b;
  border-color: transparent;
  color: #0a0a0a;
}
.cert-modal-nav:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(229, 192, 123, 0.4);
}

.cert-modal-prev {
  left: 12px;
}

.cert-modal-next {
  right: 12px;
}

/*
----------------------
        SKILLS
----------------------
*/
.skills-grid-outer {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

@media (min-width: 768px) {
  .skills-grid-outer {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
  }
}
.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  padding: 24px;
  justify-items: center;
}

.skill-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 88px;
  padding: 13px 6px 11px;
  border-radius: 4px;
  border: 1px solid var(--border);
  transition: border-color 0.2s;
}
.skill-tile img {
  width: 28px;
  height: 28px;
}
.skill-tile span {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.68rem;
  color: var(--text-dim);
  text-align: center;
  line-height: 1.25;
}
.skill-tile:hover {
  border-color: var(--accent);
}
.skill-tile.text-only {
  width: auto;
  padding-left: 14px;
  padding-right: 14px;
}
.skill-tile.text-only span {
  color: var(--text);
  white-space: nowrap;
}

/*
----------------------
        FORM
----------------------
*/
.contact-window {
  max-width: 640px;
  margin: 0 auto;
}

.field-group {
  padding: 32px;
}

@media (min-width: 768px) {
  .field-group {
    padding: 40px;
  }
}
.field-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

@media (min-width: 576px) {
  .field-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.field-label {
  display: block;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.76rem;
  color: var(--text-faint);
  margin-bottom: 7px;
}

.field {
  width: 100%;
  padding: 12px 14px;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: var(--bg-panel);
  color: var(--text);
  font-family: "Poppins", sans-serif;
  font-size: 0.94rem;
  transition: 0.2s;
}
.field:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(229, 192, 123, 0.25);
}

textarea.field {
  resize: none;
}

/*
----------------------
   TOGGLE DE TEMA
----------------------
*/
#cambiarTema {
  --size: 42px;
  --icon-size: 18px;
  position: relative;
  width: var(--size);
  height: var(--size);
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: transparent;
  border: 1px solid var(--border);
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.2s, transform 120ms ease;
}
#cambiarTema:hover {
  border-color: var(--accent);
}
#cambiarTema:active {
  transform: scale(0.9);
}
#cambiarTema:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(229, 192, 123, 0.4);
}
#cambiarTema .theme-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  width: var(--icon-size);
  height: var(--icon-size);
  display: inline-flex;
  pointer-events: none;
  transition: opacity 320ms cubic-bezier(0.2, 0.9, 0.3, 1), transform 320ms cubic-bezier(0.2, 0.9, 0.3, 1);
}
#cambiarTema .theme-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}
#cambiarTema .moon {
  color: var(--text);
  opacity: 1;
  transform: translate(-50%, -50%) rotate(0deg) scale(1);
}
#cambiarTema .sun {
  color: var(--accent);
  opacity: 0;
  transform: translate(-50%, -50%) rotate(-90deg) scale(0.4);
}

html[data-bs-theme=light] #cambiarTema .moon {
  opacity: 0;
  transform: translate(-50%, -50%) rotate(90deg) scale(0.4);
}
html[data-bs-theme=light] #cambiarTema .sun {
  opacity: 1;
  transform: translate(-50%, -50%) rotate(0deg) scale(1);
}

@media (prefers-reduced-motion: reduce) {
  #cambiarTema .theme-icon {
    transition: opacity 150ms ease;
    transform: translate(-50%, -50%) !important;
  }
}
/*
----------------------
   VOLVER ARRIBA
----------------------
*/
.back-to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 1030;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: var(--bg-panel);
  color: var(--text);
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s, border-color 0.2s, color 0.2s;
}
.back-to-top:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.back-to-top:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(229, 192, 123, 0.35);
}
.back-to-top.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

@media (prefers-reduced-motion: reduce) {
  .back-to-top {
    transition: opacity 0.2s, border-color 0.2s, color 0.2s;
  }
}
/*
----------------------
   REVEAL AL HACER SCROLL
----------------------
*/
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 550ms cubic-bezier(0.23, 1, 0.32, 1), transform 550ms cubic-bezier(0.23, 1, 0.32, 1);
  transition-delay: var(--reveal-delay, 0ms);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    transform: none;
    transition: opacity 200ms ease;
    transition-delay: 0ms;
  }
}
/*
======================================================================
   ANIMACIONES EXPERIMENTALES — cada bloque es independiente y se
   puede borrar por separado sin afectar a los demás. Pensadas para
   probar y quedarse solo con las que convenzan.
======================================================================
*/
/* ---- EXP 1: fondo del hero — resplandor de "pantalla encendida" centrado tras la ventana terminal, con una respiración muy sutil ---- */
.hero-section {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.hero-section::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(640px, 88vw);
  height: min(640px, 88vw);
  transform: translate(-50%, -50%);
  z-index: -1;
  background: radial-gradient(circle, rgba(var(--glow-rgb), var(--aurora-alpha)), transparent 70%);
  filter: blur(70px);
  animation: heroGlowBreathe 7s ease-in-out infinite;
  pointer-events: none;
}

@keyframes heroGlowBreathe {
  0%, 100% {
    transform: translate(-50%, -50%) scale(1);
  }
  50% {
    transform: translate(-50%, -50%) scale(1.08);
  }
}
@media (prefers-reduced-motion: reduce) {
  .hero-section::before {
    animation: none;
  }
}
/* ---- EXP 2: mancha de luz que sigue al ratón por toda la web, siempre detrás del contenido (ver assets/js/mouseSpotlight.js) ---- */
@media (min-width: 768px) and (hover: hover) and (pointer: fine) {
  body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    background: radial-gradient(150px circle at var(--spot-x, 50vw) var(--spot-y, 30vh), rgba(var(--glow-rgb), var(--spotlight-alpha)), transparent 70%);
    pointer-events: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  body::before {
    display: none;
  }
}
html[data-bs-theme=light] body::before {
  display: none;
}
/* ---- EXP 3: la ventana del hero aparece 1s después de cargar la página, con el mismo fundido+desplazamiento que el resto de secciones al hacer scroll (reutiliza .reveal/.is-visible; ver assets/js/heroReveal.js) ---- */
/* ---- EXP 4: barra de progreso de scroll (ver assets/js/scrollProgress.js) ---- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  z-index: 1050;
  pointer-events: none;
}

/* ---- EXP 5: barrido de brillo al pasar el ratón por los botones .boton, los iconos de redes sociales .nav-link.icono y el botón "volver arriba" ---- */
.boton,
.nav-link.icono {
  position: relative;
  overflow: hidden;
}

.back-to-top {
  overflow: hidden;
}

.boton::before,
.nav-link.icono::before,
.back-to-top::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 40%;
  height: 100%;
  background: linear-gradient(115deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transform: translateX(-250%);
  transition: transform 500ms ease;
  pointer-events: none;
}

@media (hover: hover) and (pointer: fine) {
  .boton:hover::before,
  .nav-link.icono:hover::before,
  .back-to-top:hover::before {
    transform: translateX(250%);
  }
}
/* ---- EXP 6: elevación de las imágenes de proyectos al pasar el ratón ---- */
.project-image {
  transition: transform 220ms ease;
}

@media (hover: hover) and (pointer: fine) {
  .project-item:hover .project-image {
    transform: translateY(-4px) scale(1.015);
  }
}
/* ---- EXP 7: rebote del icono al pasar el ratón por una skill ---- */
.skill-tile img {
  transition: transform 150ms ease;
}

@media (hover: hover) and (pointer: fine) {
  .skill-tile:hover img {
    transform: scale(1.12);
  }
}
/* ---- EXP 9: "semáforos" de las ventanas terminal con el color de macOS siempre puesto, y un pequeño brillo extra al pasar el ratón por la barra ---- */
.win-dot:nth-child(1) {
  background: #ff5f57;
}

.win-dot:nth-child(2) {
  background: #ffbd2e;
}

.win-dot:nth-child(3) {
  background: #28c840;
}

.win-dot {
  transition: transform 160ms ease, box-shadow 160ms ease;
}

@media (hover: hover) and (pointer: fine) {
  .win-bar:hover .win-dot {
    transform: scale(1.15);
  }
  .win-bar:hover .win-dot:nth-child(1) {
    box-shadow: 0 0 6px 1px rgba(255, 95, 87, 0.55);
  }
  .win-bar:hover .win-dot:nth-child(2) {
    box-shadow: 0 0 6px 1px rgba(255, 189, 46, 0.55);
  }
  .win-bar:hover .win-dot:nth-child(3) {
    box-shadow: 0 0 6px 1px rgba(40, 200, 64, 0.55);
  }
}
/* ---- EXP 11: barra de scroll del navegador en el color de acento (no es una animación, pero encaja con el resto de retoques) ---- */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--accent) var(--bg-panel);
}

*::-webkit-scrollbar {
  width: 10px;
}

*::-webkit-scrollbar-track {
  background: var(--bg-panel);
}

*::-webkit-scrollbar-thumb {
  background-color: var(--accent);
  border-radius: 999px;
  border: 2px solid var(--bg-panel);
}
