@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@400;500;600;700;800&display=swap");

:root {
  --ink: #e9edf4;
  --muted: #9da8b8;
  --night: #0c1118;
  --panel: #121a24;
  --panel-light: #182330;
  --accent: #b7f36b;
  --accent-strong: #94d847;
  --paper: #f3f5f2;
  --paper-ink: #18211b;
  --line: rgba(179, 199, 215, 0.15);
  --content-width: 1160px;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  background: var(--night);
  color: var(--ink);
  font-family: "DM Sans", sans-serif;
  font-size: 16px;
  line-height: 1.7;
  overflow-x: hidden;
}

body,
button,
a {
  -webkit-tap-highlight-color: transparent;
}

@media (hover: hover) and (pointer: fine) {
  body.custom-cursor-enabled,
  body.custom-cursor-enabled * {
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='52' viewBox='0 0 40 52'%3E%3Cpath d='M3 2v38l9-9 8 18 7-3-8-17h15z' fill='%2380ff00' stroke='%230b0b0b' stroke-width='3' stroke-linejoin='round'/%3E%3Cpath d='M3 2v38l9-9 8 18 7-3-8-17h15z' fill='none' stroke='%23ccff80' stroke-width='.8' stroke-linejoin='round'/%3E%3C/svg%3E") 3 2, auto !important;
  }

  body.custom-cursor-enabled a,
  body.custom-cursor-enabled a *,
  body.custom-cursor-enabled button,
  body.custom-cursor-enabled button *,
  body.custom-cursor-enabled [role="button"],
  body.custom-cursor-enabled [role="button"] * {
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='52' viewBox='0 0 40 52'%3E%3Cpath d='M3 2v38l9-9 8 18 7-3-8-17h15z' fill='%2380ff00' stroke='%230b0b0b' stroke-width='3' stroke-linejoin='round'/%3E%3Cpath d='M3 2v38l9-9 8 18 7-3-8-17h15z' fill='none' stroke='%23ccff80' stroke-width='.8' stroke-linejoin='round'/%3E%3C/svg%3E") 3 2, pointer !important;
  }
}

a {
  transition: color 180ms ease, background-color 180ms ease, border-color 180ms ease, transform 180ms ease;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
}

.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  min-height: 76px;
  padding: 0.65rem max(1.25rem, calc((100vw - var(--content-width)) / 2));
  background: rgba(12, 17, 24, 0.88);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.navbar .container-fluid {
  max-width: var(--content-width);
  padding: 0;
}

.navbar-brand {
  display: flex;
  align-items: center;
  margin-right: 2rem;
}

.navbar-brand img {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.navbar-collapse {
  justify-content: flex-end;
}

.navbar-nav {
  gap: 0.2rem;
}

.navbar-light .navbar-nav .nav-link {
  padding: 0.6rem 0.85rem;
  color: #b8c2ce;
  font-size: 0.9rem;
  font-weight: 600;
  transition: color 180ms ease, transform 180ms ease;
}

.navbar-light .navbar-nav .nav-link:hover,
.navbar-light .navbar-nav .nav-link:focus,
.navbar-light .navbar-nav .nav-link.active {
  color: var(--accent);
}

.navbar-light .navbar-nav .nav-link.active {
  font-weight: 700;
  transform: scale(1.12);
}

.navbar-toggler {
  border-color: var(--line);
}

.navbar-toggler-icon {
  filter: invert(1);
}

.floating-container {
  right: 1.25rem;
  bottom: 1.25rem;
  width: 52px;
  height: 52px;
  margin: 0;
  opacity: 1;
}

.floating-container:hover {
  height: 52px;
}

.floating-container .floating-button {
  width: 50px;
  height: 50px;
  background: var(--accent);
  color: var(--night) !important;
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 50px;
  opacity: 0.6;
  transition: transform 2s ease, box-shadow 2s ease, opacity 2s ease;
}

.floating-container:hover .floating-button {
  transform: translateY(5px) scale(1.5);
  opacity: 0.95;
  transition: transform 2s ease, box-shadow 2s ease, opacity 2s ease;
}

.hero {
  display: block;
  min-height: 0;
  padding: clamp(4rem, 9vw, 8rem) 1.5rem 2rem;
  background:
    radial-gradient(ellipse at 75% 38%, rgba(86, 122, 76, 0.14), transparent 40%),
    var(--night);
  text-align: left;
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(270px, 0.8fr);
  align-items: center;
  gap: clamp(2.5rem, 8vw, 7rem);
  width: min(100%, var(--content-width));
  min-height: min(66vh, 640px);
  margin: 0 auto;
}

.hero-copy {
  max-width: 690px;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  margin: 0 0 1.3rem;
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 16px rgba(183, 243, 107, 0.75);
}

.hero h1 {
  margin: 0 0 1.25rem;
  color: var(--ink);
  font-family: "Manrope", sans-serif;
  font-size: clamp(2.7rem, 6vw, 5rem);
  font-weight: 800;
  letter-spacing: -0.065em;
  line-height: 1.04;
}

.hero h1 span {
  display: block;
  color: var(--accent);
}

.hero h2 {
  max-width: 660px;
  margin: 0;
  color: #c2cbd5;
  font-size: clamp(1.05rem, 1.6vw, 1.28rem);
  font-weight: 500;
  line-height: 1.7;
}

.hero-summary {
  max-width: 580px;
  margin: 1.15rem 0 0;
  color: var(--muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 2rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  min-height: 48px;
  padding: 0.75rem 1.2rem;
  border: 1px solid transparent;
  border-radius: 8px;
  font-weight: 700;
  text-decoration: none;
}

.button-primary {
  background: var(--accent);
  color: #17200f;
}

.button-primary:hover {
  transform: translateY(-2px);
  background: #c8ff83;
  color: #17200f;
}

.button-secondary {
  border-color: rgba(233, 237, 244, 0.28);
  color: var(--ink);
}

.button-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.hero-visual {
  position: relative;
  display: grid;
  justify-items: center;
}

.gallery {
  position: relative;
  --s: clamp(260px, 31vw, 410px);
  width: var(--s);
  padding: 0;
  overflow: visible;
  border-radius: 0;
  clip-path: none;
  filter: drop-shadow(0 26px 56px rgba(0, 0, 0, 0.4));
}

.gallery::after {
  display: none;
}

.gallery > img {
  width: 100%;
  height: 100%;
  border: 1px solid rgba(183, 243, 107, 0.38);
  border-radius: 28px;
  object-fit: cover;
  object-position: center;
  animation: none;
}

.portrait-blink {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.portrait-blink__lid {
  opacity: 0;
  transform-box: view-box;
  transform: scaleY(0.08);
  transform-origin: 50% 153px;
}

.gallery.is-blinking .portrait-blink__lid {
  animation: portrait-blink 220ms ease-in-out both;
}

.portrait-blink__skin {
  fill: url("#eyelid-tone");
  opacity: 0.88;
}

.portrait-blink__crease {
  fill: none;
  stroke: #9c7066;
  stroke-linecap: round;
  stroke-width: 1;
  opacity: 0.55;
  filter: blur(1px);
}

@keyframes portrait-blink {
  0%, 100% {
    opacity: 0;
    transform: scaleY(0.08);
  }

  38%, 66% {
    opacity: 1;
    transform: scaleY(1);
  }
}

.hero-visual-note {
  position: absolute;
  right: -0.5rem;
  bottom: 1.25rem;
  padding: 0.7rem 0.95rem;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(18, 26, 36, 0.94);
  color: #d6dfd0;
  font-size: 0.84rem;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.24);
}

.hero-visual-note i {
  margin-right: 0.35rem;
  color: var(--accent);
}

.hero-inferior {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: clamp(1.1rem, 3.2vw, 2.2rem);
  width: min(100%, var(--content-width));
  margin: 2rem auto 0;
  padding: 1rem 1.25rem;
  border: 1px solid #dfe4e8;
  border-radius: 12px;
  background: #e9edf0;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.16);
}

.hero-inferior img {
  width: auto;
  max-width: 86px;
  height: 68px;
  margin: 0;
  object-fit: contain;
  filter: grayscale(0.12);
  transition: transform 180ms ease;
}

.hero-inferior img.technology-logo--cobol {
  width: 88px;
  height: 68px;
  border-radius: 6px;
  background: #fff;
  object-fit: cover;
  object-position: center top;
}

.hero-inferior img:hover {
  transform: translateY(-4px);
}

.scroll-portal {
  position: relative;
  display: block;
  height: 180vh;
  background: #090d12;
}

.scroll-portal__sticky {
  position: sticky;
  top: 0;
  display: grid;
  width: 100%;
  height: 100vh;
  place-items: center;
  isolation: isolate;
}

.scroll-portal__frame {
  position: absolute;
  inset: 0;
  overflow: hidden;
  overflow: clip;
  isolation: isolate;
}

.scroll-portal__frame::after {
  position: absolute;
  z-index: 1;
  background: linear-gradient(180deg, rgba(5, 9, 13, 0.16), rgba(5, 9, 13, 0.58));
  content: "";
  inset: 0;
}

.scroll-portal__image {
  position: absolute;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 38%;
  transform: scale(var(--portal-scale, 1));
  transform-origin: 50% 48%;
}

.scroll-portal__caption {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
  padding: 1rem;
  color: white;
  font-family: "Manrope", sans-serif;
  font-size: clamp(1.2rem, 3vw, 2rem);
  font-weight: 700;
  text-align: center;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.65);
}

.scroll-portal__hint {
  color: var(--accent);
  font-family: "DM Sans", sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
}

.seccion-oscura {
  background: var(--night);
  color: var(--ink);
}

.seccion-clara {
  background: var(--paper);
  color: var(--paper-ink);
}

.sobre-mi {
  padding: clamp(5rem, 10vw, 8rem) 1.5rem;
}

.sobre-mi .contenedor {
  width: min(100%, 900px);
  min-height: 0;
  margin: 0 auto;
  text-align: left;
}

.seccion-titulo {
  margin: 0 0 1.2rem;
  padding: 0;
  font-family: "Manrope", sans-serif;
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  text-align: inherit;
}

.seccion-titulo::after {
  display: block;
  width: 54px;
  height: 3px;
  margin-top: 0.9rem;
  border-radius: 2px;
  background: var(--accent-strong);
  content: "";
}

.seccion-descripcion {
  max-width: 720px;
  margin: 0 auto 1.5rem;
  color: #67736b;
  font-size: 1.08rem;
  line-height: 1.75;
}

.sobre-mi .seccion-texto {
  margin: 0 0 1.1rem;
  color: #c0c9d2;
  font-size: 1.05rem;
  line-height: 1.9;
}

.experiencia {
  max-width: none;
  margin: 0;
  padding: clamp(5rem, 9vw, 7rem) max(1.25rem, calc((100vw - var(--content-width)) / 2));
  background: var(--paper);
}

.experiencia > .text-center {
  width: 100%;
  max-width: var(--content-width);
  margin: 0 auto;
  text-align: left !important;
}

.experiencia .seccion-titulo {
  color: var(--paper-ink);
}

.experiencia .row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin: 2rem 0 0;
}

.experiencia .row > [class*="col-"] {
  width: auto;
  padding: 10px;
}

.experiencia .columna {
  min-height: 270px;
  padding: 1.7rem;
  align-items: flex-start;
  justify-content: flex-start;
  border: 1px solid #dfe5dc;
  border-radius: 12px;
  background: #fff;
  color: var(--paper-ink);
  text-align: left;
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

.experiencia .columna:hover {
  transform: translateY(-4px);
  border-color: #bfdaa5;
  background: #fff;
  color: var(--paper-ink);
  box-shadow: 0 16px 38px rgba(29, 48, 34, 0.09);
}

.experiencia-titulo {
  width: 100%;
  margin: 0.3rem 0 0.75rem;
  color: #263a29;
  font-size: 1.15rem;
  text-align: center;
}

.experiencia .columna > p:not(.experiencia-titulo) {
  color: #556259;
  line-height: 1.7;
}

.experiencia .badges-contenedor {
  margin-top: auto;
  text-align: left;
}

.badge {
  margin: 0.25rem 0.15rem 0.1rem 0;
  padding: 0.45rem 0.7rem;
  border-radius: 5px;
  background: #e8f3dc !important;
  color: #2b4825 !important;
  font-size: 0.76rem;
  font-weight: 700;
}

.proyectos-recientes#proyectos {
  padding: clamp(5rem, 9vw, 7rem) 1.25rem;
  background:
    radial-gradient(ellipse at 12% 0%, rgba(87, 118, 79, 0.13), transparent 35%),
    var(--night);
}

#proyectos .seccion-titulo {
  color: var(--ink);
}

#proyectos .seccion-descripcion {
  color: var(--muted) !important;
}

.proyectos-contenedor {
  width: min(100%, var(--content-width));
  padding-top: 1.5rem;
  margin-bottom: 0;
}

.proyectos-contenedor .row {
  row-gap: 1rem;
}

.proyectos-contenedor .row > div {
  display: flex;
}

.proyectos-contenedor .row > div > .proyecto {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 275px;
  margin: 0;
  padding: 10px 1.45rem 1.45rem;
  border: 1px solid var(--line) !important;
  border-radius: 12px !important;
  background: linear-gradient(145deg, var(--panel-light), var(--panel)) !important;
  color: #c3ccd5 !important;
  text-align: left;
  transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}

.proyectos-contenedor .row > div > .proyecto:hover {
  transform: translateY(-5px);
  border-color: rgba(183, 243, 107, 0.46) !important;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.24);
}

#proyectos .proyecto > p:first-child {
  margin: 0 0 0.85rem;
  color: var(--accent);
  font-family: "Manrope", sans-serif;
  font-size: 1.18rem !important;
  font-weight: 800 !important;
  line-height: 1.35;
}

#proyectos .proyecto a {
  color: #c3ccd5;
  line-height: 1.65;
  text-decoration: none;
}

#proyectos .proyecto a[href] {
  display: inline-flex;
  align-self: flex-start;
  gap: 0.35rem;
  margin-top: auto;
  padding: 0.55rem 0.85rem;
  border: 1px solid rgba(183, 243, 107, 0.45);
  border-radius: 6px;
  color: var(--accent);
  font-weight: 700;
}

#proyectos .proyecto a[href]:hover {
  background: var(--accent);
  color: #17200f;
}

#proyectos .proyecto > .proyecto {
  display: none;
}

.proyectos-recientes#cursos {
  padding: clamp(4.5rem, 8vw, 6.5rem) 1.25rem;
  background: var(--paper) !important;
  color: var(--paper-ink);
}

#cursos .seccion-titulo {
  color: var(--paper-ink);
}

#cursos .seccion-descripcion {
  margin-bottom: 1.6rem;
}

#cursos .badges-contenedor {
  max-width: 850px;
  margin: 0 auto 1rem;
  line-height: 2.4;
}

#cursos > p {
  color: #66716a;
}

.pergaminos00 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr));
  grid-auto-rows: 280px;
  align-items: stretch;
  gap: 1rem;
  padding: clamp(3rem, 7vw, 5rem) max(1.25rem, calc((100vw - var(--content-width)) / 2));
  background: #e9eee6;
}

.pergaminos00 > hr,
.pergaminos00 > pre {
  display: none;
}

.pergaminos01 {
  height: 280px;
  min-height: 0;
  box-sizing: border-box;
  padding: 1.2rem;
  flex-direction: row;
  justify-content: space-between;
  gap: 1rem;
  overflow: visible;
  border: 1px solid #d5ded2;
  border-radius: 12px;
  background: #f9fbf8;
  box-shadow: 0 8px 26px rgba(31, 51, 36, 0.05);
}

.pergaminos02 {
  min-width: 0;
  flex: 1 1 0;
  width: auto;
  text-align: left;
}

.pergaminos02 h2 {
  margin-bottom: 0.45rem;
  color: #263a29;
  font-size: 0.98rem;
  font-weight: 800;
  line-height: 1.35;
  text-align: left;
}

.pergaminos02 p {
  margin: 0.12rem 0;
  color: #657168;
  font-size: 0.82rem;
  line-height: 1.4;
  text-align: left;
}

.pergaminos03 {
  position: relative;
  display: flex;
  width: 76px;
  flex: 0 0 76px;
  align-items: center;
}

img.pergaminos03 {
  width: 100%;
  transform: none;
  transform-origin: right center;
  object-fit: contain;
  transition: transform 2s ease;
}

a.pergaminos03:hover,
a.pergaminos03:focus-visible {
  z-index: 2;
}

a.pergaminos03:hover img.pergaminos03,
a.pergaminos03:focus-visible img.pergaminos03 {
  transform: scale(3.5);
  background: transparent;
}

.contacto {
  padding: 2rem 1.25rem 4rem;
  background: var(--night);
}

.contacto .container {
  max-width: var(--content-width);
  min-height: 0;
  padding: 0;
}

.contacto .rectangulo {
  margin: 0;
  padding: clamp(1.6rem, 5vw, 3.4rem);
  border: 1px solid rgba(183, 243, 107, 0.28);
  border-radius: 16px;
  background: linear-gradient(125deg, #1a2a23, #17212b);
  box-shadow: none;
}

.contacto .row {
  align-items: center;
  gap: 1rem 0;
}

.contacto .seccion-titulo {
  color: var(--ink);
  font-size: clamp(1.9rem, 4vw, 2.7rem);
  text-align: left;
}

.contacto .seccion-titulo::after {
  display: none;
}

.contacto .descripcion {
  color: #c1ccc4;
  font-size: 1rem;
  text-align: left;
}

.contacto button {
  padding: 0.9rem 1.35rem;
  border: 1px solid var(--accent);
  border-radius: 7px;
  color: #17200f;
  background: var(--accent);
}

.contacto button:hover {
  border-color: #c8ff83;
  background: #c8ff83;
  color: #17200f;
}

.contacto button i {
  color: currentColor;
}

footer.seccion-oscura {
  min-height: 0;
  padding: 2rem 1.25rem 1.5rem;
  border-top: 1px solid var(--line);
  background: #090d12;
}

.footer-logo {
  width: 56px;
  height: 56px;
  margin: 0;
}

.footer-texto {
  margin: 1rem 0;
  padding: 0;
  color: #c5ced8;
  font-family: "Manrope", sans-serif;
  font-size: 1.15rem;
}

.iconos-redes-sociales {
  gap: 0.5rem;
}

.iconos-redes-sociales > div {
  color: var(--muted);
  font-size: 0.8rem;
}

.iconos-redes-sociales a {
  width: 44px;
  height: 44px;
  margin: 0.3rem auto;
  border-color: rgba(233, 237, 244, 0.27);
}

.iconos-redes-sociales a:hover {
  border-color: var(--accent);
  background: var(--accent);
}

.iconos-redes-sociales a:hover i {
  color: #17200f;
}

.derechos-de-autor {
  padding: 1.5rem 0 0.4rem;
  color: #78838e;
  font-size: 0.78rem;
}

.curriculum {
  margin: 0;
  color: var(--accent);
  font-size: 0.88rem;
}

.curriculum:hover {
  color: #d0ff9b;
}

body.motion-ready [data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 650ms ease, transform 650ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

body.motion-ready [data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

.certificate-page {
  min-height: 100vh;
  background: var(--paper);
  color: var(--paper-ink);
}

.certificate-page .container {
  max-width: var(--content-width);
}

.certificate-page .alert {
  margin-top: 2rem;
  padding: 2rem;
  border: 1px solid #dbe3d7;
  border-radius: 14px;
  background: white;
  color: var(--paper-ink);
  text-align: left;
}

.certificate-page h1,
.certificate-page h3,
.certificate-page h6 {
  margin: 0.35rem 0;
}

.certificate-page h1 {
  font-family: "Manrope", sans-serif;
  font-weight: 800;
}

.certificate-page .certificate-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
  gap: 1rem;
  width: 100%;
  overflow: visible;
}

.certificate-page .certificate-grid > a,
.certificate-page .certificate-grid > img {
  position: relative;
  display: block;
  width: 100%;
  z-index: 0;
  margin: 0;
  padding: 0.55rem;
  border: 1px solid #dfe5dc;
  border-radius: 10px;
  background: white;
  object-fit: contain;
  box-shadow: 0 8px 24px rgba(29, 48, 34, 0.06);
  transition: transform 180ms ease, box-shadow 180ms ease, z-index 0s step-end;
}

.certificate-page .certificate-grid > a:hover,
.certificate-page .certificate-grid > a:focus-visible,
.certificate-page .certificate-grid > img:hover {
  z-index: 10;
  transform: translateY(-3px);
  box-shadow: 0 14px 30px rgba(29, 48, 34, 0.12);
  transition: transform 180ms ease, box-shadow 180ms ease, z-index 0s step-start;
}

.certificate-page .certificate-grid > a img {
  display: block;
  width: 100%;
  height: 190px;
  margin: 0;
  object-fit: contain;
  transform-origin: center;
  transition: transform 2s ease;
}

.certificate-page .certificate-grid > img {
  z-index: 0;
  transform-origin: center;
  transition: transform 2s ease, box-shadow 180ms ease, z-index 0s step-end;
}

.certificate-page .certificate-grid > a:hover img,
.certificate-page .certificate-grid > a:focus-visible img,
.certificate-page .certificate-grid > img:hover {
  transform: scale(3);
}

.certificate-page .certificate-grid > img:hover {
  z-index: 10;
  transition: transform 2s ease, box-shadow 180ms ease, z-index 0s step-start;
}

.certificate-page .certificate-grid > br {
  display: none;
}

.certificate-page .certificate-grid > pre {
  grid-column: 1 / -1;
  margin: 0;
  padding: 1rem;
  border-radius: 8px;
  background: white;
  text-align: center;
  white-space: normal;
}

.certificate-page .certificate-back {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 2rem;
  color: #365634;
  font-weight: 700;
  text-decoration: none;
}

.certificate-page .certificate-back:hover {
  color: #17200f;
}

@media (max-width: 767.98px) {
  .navbar {
    min-height: 66px;
  }

  .navbar-brand {
    display: flex;
  }

  .navbar-brand #navbar-brand {
    display: block;
    opacity: 1;
    visibility: visible;
  }

  .navbar-collapse {
    padding: 0.75rem 0 0.25rem;
  }

  .navbar-nav {
    align-items: flex-start !important;
    gap: 0;
  }

  .navbar-light .navbar-nav .nav-link {
    padding: 0.5rem 0;
  }

  .hero {
    padding-top: 4rem;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    min-height: 0;
  }

  .hero-visual {
    grid-row: auto;
    order: 2;
  }

  .hero-copy {
    order: 1;
  }

  .hero-visual-note {
    right: 0;
    bottom: 0.75rem;
  }

  .hero-inferior {
    margin-top: 1.5rem;
  }

  .scroll-portal {
    height: 130vh;
  }

  .scroll-portal__sticky {
    height: 78vh;
  }

  .experiencia .row {
    grid-template-columns: 1fr;
  }

  .experiencia .columna {
    min-height: 0;
  }

  .pergaminos00 {
    grid-auto-rows: 320px;
  }

  .pergaminos01 {
    height: 320px;
  }

  .pergaminos03 {
    width: 60px;
    flex-basis: 60px;
  }

  .pergaminos02 h2 {
    font-size: 0.94rem;
  }

  .pergaminos02 p {
    font-size: 0.8rem;
  }
}

@media (max-width: 420px) {
  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions .button {
    width: 100%;
  }

  .gallery {
    --s: min(82vw, 330px);
  }

  .pergaminos01 {
    height: 290px;
    padding: 1rem;
  }

  .pergaminos00 {
    grid-auto-rows: 290px;
  }

  .pergaminos03 {
    width: 52px;
    flex-basis: 52px;
  }

  .pergaminos02 h2 {
    font-size: 0.92rem;
    line-height: 1.28;
  }

  .pergaminos02 p {
    font-size: 0.78rem;
    line-height: 1.32;
  }

  .certificate-page .certificate-grid > a img {
    height: 155px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .scroll-portal__image {
    transform: scale(1.04);
  }
}
