/* =========================
   Base común del portfolio
   ========================= */

:root {
  --ink: rgba(18, 17, 15, 0.98);
  --text: rgba(42, 39, 34, 0.88);
  --muted: rgba(88, 80, 68, 0.72);
  --accent: #8f743f;
  --accent-dark: #66502b;
  --line: rgba(92, 76, 49, 0.115);
  --cream: rgba(255, 255, 251, 0.38);
  --cream-soft: rgba(244, 239, 229, 0.18);
  --shadow-soft: 0 18px 48px rgba(55, 46, 34, 0.035);

  /* Glass estándar del portfolio: ligeramente más legible, manteniendo transparencia. */
  --glass-border: rgba(96, 82, 58, 0.125);
  --glass-bg-a: rgba(255, 255, 252, 0.37);
  --glass-bg-b: rgba(246, 242, 232, 0.205);
  --glass-bg: linear-gradient(135deg, var(--glass-bg-a), var(--glass-bg-b));
  --glass-shadow: 0 18px 48px rgba(52, 44, 32, 0.035);
  --glass-inset: inset 0 1px 0 rgba(255, 255, 255, 0.30);
  --glass-filter: blur(16px) saturate(1.015);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.20), rgba(252, 249, 242, 0.06)),
    url("./public/portfolio-background.png") center / cover fixed no-repeat;
}

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

img {
  max-width: 100%;
}

main {
  transition: filter 260ms ease, transform 260ms ease, opacity 260ms ease;
  transform-origin: center center;
}

.top-contact {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 46px;
  padding: 6px clamp(78px, 6vw, 124px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: linear-gradient(90deg, rgba(246, 239, 226, 0.26), rgba(235, 222, 199, 0.18));
  border-bottom: 1px solid rgba(83, 58, 25, 0.045);
  box-shadow: 0 8px 26px rgba(46, 34, 18, 0.026);
  backdrop-filter: blur(24px) saturate(1.08);
}

.home-button {
  position: relative;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(92, 61, 14, 0.11);
  border-radius: 999px;
  background:
    radial-gradient(circle at 32% 22%, rgba(255, 255, 255, 0.62), rgba(255, 250, 240, 0.24) 58%, rgba(232, 210, 176, 0.16));
  color: rgba(92, 61, 14, 0.84);
  box-shadow:
    0 10px 24px rgba(46, 34, 18, 0.045),
    inset 0 1px 0 rgba(255, 255, 255, 0.44),
    inset 0 -1px 0 rgba(92, 61, 14, 0.045);
  backdrop-filter: blur(16px) saturate(1.06);
  transition:
    transform 180ms ease,
    background 180ms ease,
    color 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.home-button span {
  width: 18px;
  height: 18px;
  display: block;
  font-size: 0;
  line-height: 0;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cpath%20d%3D%22M4.85%2011.15%2012%205.25l7.15%205.9%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.7%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22/%3E%3Cpath%20d%3D%22M6.9%209.95v8.25c0%20.66.54%201.2%201.2%201.2h7.8c.66%200%201.2-.54%201.2-1.2V9.95%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.7%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22/%3E%3Cpath%20d%3D%22M10.05%2019.4v-4.85c0-.3.25-.55.55-.55h2.8c.3%200%20.55.25.55.55v4.85%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.7%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cpath%20d%3D%22M4.85%2011.15%2012%205.25l7.15%205.9%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.7%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22/%3E%3Cpath%20d%3D%22M6.9%209.95v8.25c0%20.66.54%201.2%201.2%201.2h7.8c.66%200%201.2-.54%201.2-1.2V9.95%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.7%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22/%3E%3Cpath%20d%3D%22M10.05%2019.4v-4.85c0-.3.25-.55.55-.55h2.8c.3%200%20.55.25.55.55v4.85%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.7%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22/%3E%3C/svg%3E") center / contain no-repeat;
}

.home-button:hover {
  transform: translateY(-1px) scale(1.015);
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 250, 240, 0.96), rgba(157, 107, 25, 0.92));
  border-color: rgba(92, 61, 14, 0.18);
  color: #fffaf0;
  box-shadow:
    0 13px 28px rgba(82, 52, 11, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.36);
}

.contact-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.contact-button {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  border: 1px solid rgba(92, 61, 14, 0.085);
  border-radius: 999px;
  background: rgba(255, 250, 240, 0.28);
  color: rgba(23, 21, 17, 0.76);
  font-size: 0.80rem;
  font-weight: 790;
  letter-spacing: -0.014em;
  box-shadow:
    0 7px 18px rgba(46, 34, 18, 0.022),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(14px) saturate(1.04);
  transition: transform 170ms ease, background 170ms ease, color 170ms ease, border-color 170ms ease, box-shadow 170ms ease;
}

.contact-button[href]:hover {
  transform: translateY(-1px);
  background: rgba(138, 93, 22, 0.86);
  border-color: rgba(92, 61, 14, 0.14);
  color: #fffaf0;
  box-shadow: 0 10px 22px rgba(82, 52, 11, 0.10);
}

.contact-text {
  padding: 0 13px;
  border-color: rgba(92, 61, 14, 0.045);
  background: rgba(255, 250, 240, 0.14);
  color: rgba(23, 21, 17, 0.68);
  box-shadow: none;
}

.contact-icon {
  width: 19px;
  height: 19px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(138, 93, 22, 0.11);
  color: rgba(92, 61, 14, 0.80);
  font-size: 0.65rem;
}


/* =========================
   Navegación lateral
   ========================= */

.nav-toggle {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.menu-button {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 1px solid rgba(92, 61, 14, 0.11);
  border-radius: 999px;
  background:
    radial-gradient(circle at 32% 22%, rgba(255, 255, 255, 0.62), rgba(255, 250, 240, 0.24) 58%, rgba(232, 210, 176, 0.16));
  color: rgba(92, 61, 14, 0.84);
  box-shadow:
    0 10px 24px rgba(46, 34, 18, 0.045),
    inset 0 1px 0 rgba(255, 255, 255, 0.44),
    inset 0 -1px 0 rgba(92, 61, 14, 0.045);
  backdrop-filter: blur(16px) saturate(1.06);
  cursor: pointer;
  transition:
    transform 180ms ease,
    background 180ms ease,
    color 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.menu-button span {
  width: 16px;
  height: 2px;
  display: block;
  border-radius: 999px;
  background: currentColor;
  transition: transform 180ms ease, opacity 180ms ease;
}

.menu-button:hover {
  transform: translateY(-1px) scale(1.015);
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 250, 240, 0.96), rgba(157, 107, 25, 0.92));
  border-color: rgba(92, 61, 14, 0.18);
  color: #fffaf0;
  box-shadow:
    0 13px 28px rgba(82, 52, 11, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.36);
}

.menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 35;
  background:
    radial-gradient(circle at 30% 18%, rgba(255, 253, 248, 0.34), rgba(241, 229, 209, 0.42) 46%, rgba(160, 139, 105, 0.30) 100%);
  backdrop-filter: blur(9px) saturate(0.92) brightness(1.02);
  -webkit-backdrop-filter: blur(9px) saturate(0.92) brightness(1.02);
  opacity: 0;
  pointer-events: none;
  cursor: pointer;
  transition: opacity 240ms ease;
}

.side-menu {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  width: min(480px, 34vw);
  min-width: 430px;
  height: 100dvh;
  padding: 34px 30px;
  display: flex;
  flex-direction: column;
  border-left: 1px solid rgba(92, 61, 14, 0.18);
  border-top: 0;
  border-right: 0;
  border-bottom: 0;
  border-radius: 30px 0 0 30px;
  background:
    linear-gradient(155deg, rgba(255, 248, 236, 0.52), rgba(238, 212, 170, 0.34) 52%, rgba(178, 127, 55, 0.18)),
    linear-gradient(90deg, rgba(255, 250, 240, 0.18), rgba(255, 250, 240, 0.08)),
    url("./public/menu-background-v1.png") center / cover no-repeat;
  background-blend-mode: normal, soft-light, normal;
  box-shadow:
    -34px 0 90px rgba(23, 21, 17, 0.18),
    inset 1px 0 0 rgba(255, 255, 255, 0.54);
  backdrop-filter: blur(12px) saturate(1.08) sepia(0.06);
  -webkit-backdrop-filter: blur(12px) saturate(1.08) sepia(0.06);
  transform: translateX(104%);
  opacity: 0;
  pointer-events: none;
  transition: transform 300ms cubic-bezier(.22,.8,.22,1), opacity 220ms ease;
  overflow-y: auto;
}

body:has(.nav-toggle:checked) {
  overflow: hidden;
}

body:has(.nav-toggle:checked) main {
  filter: blur(5.5px) saturate(0.86) brightness(0.99);
  transform: scale(1.003);
}

body:has(.nav-toggle:checked) .top-contact {
  background: transparent;
  border-bottom-color: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

body:has(.nav-toggle:checked) .home-button {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.92);
}

.nav-toggle:checked ~ .menu-overlay {
  opacity: 1;
  pointer-events: auto;
}

.nav-toggle:checked ~ .side-menu {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
}

.nav-toggle:checked ~ .menu-button {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.92);
}

.nav-toggle:checked ~ .menu-button span:first-child {
  transform: translateY(3.5px) rotate(45deg);
}

.nav-toggle:checked ~ .menu-button span:last-child {
  transform: translateY(-3.5px) rotate(-45deg);
}

.side-menu-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(92, 61, 14, 0.13);
}

.side-menu-kicker {
  display: block;
  margin-bottom: 9px;
  color: rgba(92, 61, 14, 0.96);
  font-size: 0.72rem;
  line-height: 1;
  font-weight: 880;
  text-transform: uppercase;
  letter-spacing: 0.26em;
}

.side-menu-title {
  margin: 0;
  color: rgba(23, 21, 17, 0.94);
  font-size: 1.24rem;
  line-height: 1.12;
  font-weight: 850;
  letter-spacing: -0.036em;
}

.side-menu-subtitle {
  margin: 7px 0 0;
  color: rgba(49, 44, 38, 0.72);
  font-size: 0.88rem;
  line-height: 1.42;
  font-weight: 650;
  letter-spacing: -0.012em;
}

.side-menu-close {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(92, 61, 14, 0.10);
  border-radius: 999px;
  background: rgba(255, 250, 240, 0.34);
  color: rgba(92, 61, 14, 0.84);
  font-size: 1.15rem;
  line-height: 1;
  font-weight: 750;
  cursor: pointer;
  transition: transform 170ms ease, background 170ms ease, color 170ms ease;
}

.side-menu-close:hover {
  transform: translateY(-1px);
  background: rgba(138, 93, 22, 0.86);
  color: #fffaf0;
}

.side-menu-content {
  padding-top: 28px;
  display: grid;
  gap: 28px;
}

.side-menu-section-title {
  margin: 0 0 12px;
  color: rgba(92, 61, 14, 0.84);
  font-size: 0.72rem;
  line-height: 1;
  font-weight: 880;
  text-transform: uppercase;
  letter-spacing: 0.24em;
}

.side-menu-links {
  display: grid;
  gap: 9px;
}

.side-menu-link {
  min-height: 54px;
  display: grid;
  grid-template-columns: 38px 1fr auto;
  align-items: center;
  gap: 13px;
  padding: 9px 12px 9px 10px;
  border: 1px solid rgba(92, 61, 14, 0.075);
  border-radius: 20px;
  background: rgba(255, 248, 236, 0.50);
  color: rgba(23, 21, 17, 0.86);
  transition: transform 170ms ease, background 170ms ease, border-color 170ms ease, color 170ms ease;
}

.side-menu-link:hover,
.side-menu-link.is-active {
  transform: translateX(-2px);
  border-color: rgba(92, 61, 14, 0.15);
  background: rgba(255, 248, 236, 0.66);
  color: rgba(23, 21, 17, 0.94);
}

.side-menu-link.is-featured {
  background: linear-gradient(135deg, rgba(255, 248, 236, 0.58), rgba(214, 166, 91, 0.36));
}

.side-link-number {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(138, 93, 22, 0.12);
  color: rgba(92, 61, 14, 0.92);
  font-size: 0.76rem;
  font-weight: 860;
}

.side-link-copy strong {
  display: block;
  margin-bottom: 4px;
  color: inherit;
  font-size: 0.95rem;
  line-height: 1.1;
  font-weight: 850;
  letter-spacing: -0.018em;
}

.side-link-copy small {
  display: block;
  color: rgba(49, 44, 38, 0.66);
  font-size: 0.76rem;
  line-height: 1.25;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.side-link-arrow {
  color: rgba(92, 61, 14, 0.58);
  font-size: 1rem;
  font-weight: 850;
}

.side-menu-contact {
  display: grid;
  gap: 8px;
}

.side-contact-row {
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 0 3px;
  color: rgba(49, 44, 38, 0.74);
  font-size: 0.86rem;
  line-height: 1.3;
  font-weight: 690;
  letter-spacing: -0.012em;
}

.side-contact-row a {
  color: rgba(92, 61, 14, 0.92);
  font-weight: 820;
}

.side-contact-label {
  color: rgba(92, 61, 14, 0.78);
  font-size: 0.72rem;
  font-weight: 880;
  text-transform: uppercase;
  letter-spacing: 0.18em;
}


.side-menu-actions {
  display: grid;
  gap: 10px;
}

.side-menu-action {
  min-height: 54px;
  display: grid;
  grid-template-columns: 96px 1fr;
  align-items: center;
  gap: 16px;
  padding: 11px 14px;
  border: 1px solid rgba(92, 61, 14, 0.075);
  border-radius: 19px;
  background: rgba(255, 248, 236, 0.48);
  color: rgba(23, 21, 17, 0.84);
  transition: transform 170ms ease, background 170ms ease, border-color 170ms ease, color 170ms ease;
}

.side-menu-action:hover {
  transform: translateX(-2px);
  border-color: rgba(92, 61, 14, 0.15);
  background: rgba(255, 248, 236, 0.66);
  color: rgba(23, 21, 17, 0.94);
}

.side-menu-action span {
  color: rgba(92, 61, 14, 0.78);
  font-size: 0.72rem;
  line-height: 1;
  font-weight: 880;
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

.side-menu-action strong {
  justify-self: end;
  color: rgba(92, 61, 14, 0.92);
  font-size: 0.88rem;
  line-height: 1.25;
  font-weight: 830;
  letter-spacing: -0.014em;
}

.detail-label {
  margin: 0 0 16px;
  color: rgba(92, 61, 14, 0.96);
  font-size: clamp(0.82rem, 0.72vw, 0.98rem);
  line-height: 1;
  font-weight: 880;
  text-transform: uppercase;
  letter-spacing: 0.28em;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.project-tags span {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  border: 1px solid rgba(92, 61, 14, 0.13);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.26);
  color: rgba(23, 21, 17, 0.76);
  font-size: 0.8rem;
  font-weight: 780;
}

.back-link {
  display: inline-flex;
  margin: 0 0 14px;
  color: rgba(92, 61, 14, 0.92);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.download-button,
.primary-link,
.secondary-link {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 25px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 850;
  transition: transform 170ms ease, background 170ms ease, color 170ms ease, border-color 170ms ease;
}

.download-button,
.primary-link {
  border: 1px solid rgba(138, 93, 22, 0.24);
  background: var(--accent);
  color: #fffaf0;
  box-shadow: 0 16px 34px rgba(103, 66, 12, 0.14);
}

.secondary-link {
  border: 1px solid rgba(92, 61, 14, 0.12);
  background: rgba(255, 250, 240, 0.34);
  color: rgba(23, 21, 17, 0.78);
}

.download-button:hover,
.primary-link:hover,
.secondary-link:hover {
  transform: translateY(-1px);
}

@media (max-width: 1180px) {
  .top-contact {
    padding-left: 42px;
    padding-right: 42px;
  }
}

@media (max-width: 760px) {
  .top-contact {
    position: sticky;
    min-height: 50px;
    padding: 8px 22px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }

  .contact-nav {
    display: none;
  }

  .contact-button {
    min-height: 33px;
    padding: 0 13px;
    font-size: 0.8rem;
  }

  .side-menu {
    top: 10px;
    right: 10px;
    bottom: 10px;
    width: calc(100vw - 20px);
    padding: 20px;
    border-radius: 28px;
  }

  .side-menu-link {
    min-height: 52px;
  }
}

/* =========================
   V7 fix: el drawer no debe existir visualmente cerrado
   ========================= */
html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

.side-menu {
  right: 0;
  transform: translate3d(calc(100% + 48px), 0, 0);
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  will-change: transform;
}

.nav-toggle:checked ~ .side-menu {
  transform: translate3d(0, 0, 0);
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

.menu-overlay {
  visibility: hidden;
}

.nav-toggle:checked ~ .menu-overlay {
  visibility: visible;
}

body:not(:has(.nav-toggle:checked)) main,
body:not(:has(.nav-toggle:checked)) .top-contact {
  filter: none;
  transform: none;
}
/* =========================
   V9: menú premium glass cálido, sin imagen vegetal
   ========================= */

html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

body:has(.nav-toggle:checked) {
  overflow: hidden;
}

main {
  transition:
    filter 420ms cubic-bezier(.22, 1, .36, 1),
    transform 420ms cubic-bezier(.22, 1, .36, 1),
    opacity 420ms ease;
}

body:has(.nav-toggle:checked) main {
  filter: blur(4.8px) saturate(0.88) brightness(1.015);
  transform: scale(1.002);
}

body:has(.nav-toggle:checked) .top-contact {
  background: transparent;
  border-bottom-color: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 35;
  background:
    radial-gradient(circle at 18% 20%, rgba(255, 253, 248, 0.18), rgba(255, 248, 235, 0.18) 38%, transparent 66%),
    linear-gradient(90deg, rgba(244, 232, 209, 0.18), rgba(219, 191, 148, 0.16) 58%, rgba(116, 82, 36, 0.12));
  backdrop-filter: blur(7.5px) saturate(0.94) brightness(1.035);
  -webkit-backdrop-filter: blur(7.5px) saturate(0.94) brightness(1.035);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  cursor: pointer;
  transition:
    opacity 420ms cubic-bezier(.22, 1, .36, 1),
    visibility 0s linear 420ms;
}

.nav-toggle:checked ~ .menu-overlay {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition-delay: 0s;
}

.side-menu {
  position: fixed;
  top: 14px;
  right: 14px;
  bottom: 14px;
  z-index: 40;
  width: min(438px, calc(100vw - 28px));
  min-width: min(418px, calc(100vw - 28px));
  height: auto;
  max-height: calc(100dvh - 28px);
  padding: 24px;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(92, 61, 14, 0.105);
  border-radius: 32px;
  background:
    radial-gradient(circle at 26% 0%, rgba(255, 255, 255, 0.62), transparent 37%),
    linear-gradient(145deg, rgba(255, 253, 248, 0.68), rgba(248, 239, 222, 0.50) 48%, rgba(235, 217, 187, 0.40));
  box-shadow:
    0 28px 92px rgba(46, 34, 18, 0.16),
    0 8px 28px rgba(46, 34, 18, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.58),
    inset 0 -1px 0 rgba(92, 61, 14, 0.04);
  backdrop-filter: blur(28px) saturate(1.08);
  -webkit-backdrop-filter: blur(28px) saturate(1.08);
  transform: translate3d(calc(100% + 34px), 0, 0) scale(0.985);
  transform-origin: right center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  overflow: hidden;
  will-change: transform, opacity;
  transition:
    transform 520ms cubic-bezier(.22, 1, .36, 1),
    opacity 360ms ease,
    visibility 0s linear 520ms;
}

.side-menu::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.16), transparent 38%),
    radial-gradient(circle at 16% 18%, rgba(255, 250, 240, 0.62), transparent 34%),
    radial-gradient(circle at 92% 88%, rgba(157, 107, 25, 0.10), transparent 46%);
  opacity: 0.86;
}

.side-menu::after {
  content: "";
  position: absolute;
  top: 16px;
  bottom: 16px;
  left: 0;
  width: 1px;
  border-radius: 999px;
  background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.46), transparent);
  opacity: 0.55;
  pointer-events: none;
}

.side-menu > * {
  position: relative;
  z-index: 1;
}

.nav-toggle:checked ~ .side-menu {
  transform: translate3d(0, 0, 0) scale(1);
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition-delay: 0s;
}

.nav-toggle:checked ~ .menu-button,
body:has(.nav-toggle:checked) .home-button {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.92);
}

.side-menu-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(92, 61, 14, 0.105);
}

.side-menu-kicker {
  margin-bottom: 8px;
  color: rgba(92, 61, 14, 0.90);
  font-size: 0.70rem;
  letter-spacing: 0.27em;
}

.side-menu-title {
  color: rgba(23, 21, 17, 0.94);
  font-size: 1.18rem;
  line-height: 1.10;
  letter-spacing: -0.038em;
}

.side-menu-subtitle {
  margin-top: 7px;
  max-width: 310px;
  color: rgba(49, 44, 38, 0.70);
  font-size: 0.84rem;
  line-height: 1.38;
}

.side-menu-close {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border: 1px solid rgba(92, 61, 14, 0.08);
  background: rgba(255, 253, 248, 0.42);
  color: rgba(92, 61, 14, 0.78);
  box-shadow:
    0 8px 20px rgba(46, 34, 18, 0.035),
    inset 0 1px 0 rgba(255, 255, 255, 0.34);
  backdrop-filter: blur(12px) saturate(1.04);
  -webkit-backdrop-filter: blur(12px) saturate(1.04);
}

.side-menu-close:hover {
  transform: translateY(-1px) scale(1.015);
  background: rgba(138, 93, 22, 0.86);
  color: #fffaf0;
}

.side-menu-content {
  flex: 1 1 auto;
  min-height: 0;
  padding-top: 20px;
  display: grid;
  gap: 20px;
  align-content: start;
  overflow: hidden;
}

.side-menu-section-title {
  margin-bottom: 11px;
  color: rgba(92, 61, 14, 0.78);
  font-size: 0.70rem;
  letter-spacing: 0.25em;
}

.side-menu-links {
  display: grid;
  gap: 8px;
}

.side-menu-link {
  min-height: 52px;
  grid-template-columns: 36px 1fr auto;
  gap: 12px;
  padding: 8px 11px 8px 9px;
  border: 1px solid rgba(92, 61, 14, 0.07);
  border-radius: 19px;
  background: rgba(255, 253, 248, 0.35);
  box-shadow:
    0 8px 18px rgba(46, 34, 18, 0.018),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(10px) saturate(1.03);
  -webkit-backdrop-filter: blur(10px) saturate(1.03);
}

.side-menu-link:hover,
.side-menu-link.is-active {
  transform: translateX(-2px);
  border-color: rgba(92, 61, 14, 0.12);
  background: rgba(255, 253, 248, 0.50);
  box-shadow:
    0 12px 26px rgba(46, 34, 18, 0.032),
    inset 0 1px 0 rgba(255, 255, 255, 0.32);
}

.side-menu-link.is-featured {
  background:
    linear-gradient(135deg, rgba(255, 253, 248, 0.48), rgba(224, 184, 119, 0.24));
}

.side-link-number {
  width: 32px;
  height: 32px;
  background: rgba(138, 93, 22, 0.105);
  font-size: 0.74rem;
}

.side-link-copy strong {
  font-size: 0.92rem;
  margin-bottom: 4px;
}

.side-link-copy small {
  color: rgba(49, 44, 38, 0.62);
  font-size: 0.74rem;
  line-height: 1.22;
}

.side-menu-actions {
  display: grid;
  gap: 9px;
}

.side-menu-action {
  min-height: 50px;
  grid-template-columns: 92px 1fr;
  gap: 14px;
  padding: 10px 13px;
  border: 1px solid rgba(92, 61, 14, 0.07);
  border-radius: 18px;
  background: rgba(255, 253, 248, 0.34);
  box-shadow:
    0 8px 18px rgba(46, 34, 18, 0.016),
    inset 0 1px 0 rgba(255, 255, 255, 0.23);
  backdrop-filter: blur(10px) saturate(1.03);
  -webkit-backdrop-filter: blur(10px) saturate(1.03);
}

.side-menu-action:hover {
  transform: translateX(-2px);
  border-color: rgba(92, 61, 14, 0.12);
  background: rgba(255, 253, 248, 0.50);
}

.side-menu-action span {
  color: rgba(92, 61, 14, 0.73);
  font-size: 0.70rem;
  letter-spacing: 0.18em;
}

.side-menu-action strong {
  color: rgba(92, 61, 14, 0.88);
  font-size: 0.86rem;
}

@media (max-width: 760px) {
  .side-menu {
    top: 10px;
    right: 10px;
    bottom: 10px;
    width: calc(100vw - 20px);
    min-width: 0;
    max-height: calc(100dvh - 20px);
    padding: 20px;
    border-radius: 28px;
  }

  .side-menu-content {
    gap: 18px;
  }

  .side-menu-link {
    min-height: 50px;
  }
}

/* =========================
   V10: navegación sin barra superior + botón flotante fijo
   Base: menú glass cálido de V9, sin imagen vegetal.
   ========================= */

html {
  scrollbar-gutter: stable;
}

/* La cabecera deja de ser una barra visible y no ocupa espacio en el layout. */
.top-contact {
  position: fixed;
  inset: 0 auto auto 0;
  z-index: 80;
  width: 0;
  height: 0;
  min-height: 0;
  padding: 0;
  margin: 0;
  display: block;
  background: transparent;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  overflow: visible;
  pointer-events: none;
}

/* Se elimina visualmente la casita para dejar solo una acción principal: menú. */
.home-button {
  display: none;
}

/* Botón flotante premium, fijo siempre arriba a la derecha. */
.menu-button {
  position: fixed;
  top: clamp(18px, 2.2vw, 28px);
  right: clamp(22px, 2.6vw, 42px);
  z-index: 90;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border-radius: 999px;
  pointer-events: auto;
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.82), rgba(255, 250, 240, 0.38) 58%, rgba(222, 191, 143, 0.22)),
    rgba(255, 253, 248, 0.42);
  border: 1px solid rgba(92, 61, 14, 0.11);
  color: rgba(92, 61, 14, 0.86);
  box-shadow:
    0 18px 42px rgba(46, 34, 18, 0.075),
    0 5px 14px rgba(46, 34, 18, 0.035),
    inset 0 1px 0 rgba(255, 255, 255, 0.52),
    inset 0 -1px 0 rgba(92, 61, 14, 0.045);
  backdrop-filter: blur(18px) saturate(1.06);
  -webkit-backdrop-filter: blur(18px) saturate(1.06);
  transition:
    transform 210ms cubic-bezier(.22, 1, .36, 1),
    opacity 210ms ease,
    background 210ms ease,
    color 210ms ease,
    border-color 210ms ease,
    box-shadow 210ms ease;
}

.menu-button span {
  width: 17px;
  height: 2px;
}

.menu-button:hover {
  transform: translateY(-2px) scale(1.025);
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 250, 240, 0.96), rgba(157, 107, 25, 0.90));
  border-color: rgba(92, 61, 14, 0.18);
  color: #fffaf0;
  box-shadow:
    0 22px 48px rgba(82, 52, 11, 0.13),
    0 7px 18px rgba(46, 34, 18, 0.055),
    inset 0 1px 0 rgba(255, 255, 255, 0.38);
}

/* El overlay y el menú deben seguir recibiendo clics aunque el header sea invisible. */
.menu-overlay,
.side-menu,
.side-menu * {
  pointer-events: auto;
}

.menu-overlay {
  z-index: 70;
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 253, 248, 0.18), rgba(255, 248, 235, 0.16) 38%, transparent 66%),
    linear-gradient(90deg, rgba(244, 232, 209, 0.14), rgba(219, 191, 148, 0.13) 60%, rgba(116, 82, 36, 0.08));
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  transition:
    opacity 360ms cubic-bezier(.22, 1, .36, 1),
    visibility 0s linear 360ms;
}

.nav-toggle:checked ~ .menu-overlay {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition-delay: 0s;
}

/* El blur lo asume el contenido, evitando dobles filtros pesados y saltos visuales. */
main {
  transition:
    filter 360ms cubic-bezier(.22, 1, .36, 1),
    transform 360ms cubic-bezier(.22, 1, .36, 1),
    opacity 360ms ease;
  will-change: filter, transform;
}

body:has(.nav-toggle:checked) main {
  filter: blur(4.2px) saturate(0.90) brightness(1.018);
  transform: scale(1.0015);
}

/* Ya no existe barra superior visible, así que no debe cambiar de estado al abrir/cerrar. */
body:has(.nav-toggle:checked) .top-contact,
body:not(:has(.nav-toggle:checked)) .top-contact {
  position: fixed;
  width: 0;
  height: 0;
  min-height: 0;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

/* Drawer glass cálido, por encima del overlay y separado del botón flotante. */
.side-menu {
  z-index: 85;
  top: clamp(14px, 1.6vw, 22px);
  right: clamp(14px, 1.6vw, 22px);
  bottom: clamp(14px, 1.6vw, 22px);
  width: min(438px, calc(100vw - 28px));
  min-width: min(418px, calc(100vw - 28px));
  max-height: calc(100dvh - clamp(28px, 3.2vw, 44px));
  overflow: hidden;
  transform: translate3d(calc(100% + 36px), 0, 0) scale(0.986);
  transition:
    transform 500ms cubic-bezier(.22, 1, .36, 1),
    opacity 330ms ease,
    visibility 0s linear 500ms;
}

.nav-toggle:checked ~ .side-menu {
  transform: translate3d(0, 0, 0) scale(1);
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition-delay: 0s;
}

/* Al abrir, desaparece el botón de menú sin afectar al layout. */
.nav-toggle:checked ~ .menu-button {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-2px) scale(0.92);
}

/* Bloqueo real del scroll de página al abrir menú, evitando scroll vertical visible. */
body:has(.nav-toggle:checked) {
  overflow: hidden;
}

.side-menu-content {
  overflow: hidden;
}

@media (max-width: 760px) {
  .menu-button {
    top: 16px;
    right: 16px;
    width: 42px;
    height: 42px;
    flex-basis: 42px;
  }

  .side-menu {
    top: 10px;
    right: 10px;
    bottom: 10px;
    width: calc(100vw - 20px);
    min-width: 0;
    max-height: calc(100dvh - 20px);
  }
}

/* =========================
   Transiciones premium entre páginas
   Versión estable: el contenido no se desplaza; solo se revela con una capa cálida.
   ========================= */

html.js-enabled::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0;
  background:
    radial-gradient(circle at 50% 42%, rgba(255, 255, 255, 0.98) 0%, rgba(253, 252, 248, 0.96) 48%, rgba(244, 241, 234, 0.88) 100%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(250, 248, 243, 0.86));
  backdrop-filter: blur(0) saturate(1);
  -webkit-backdrop-filter: blur(0) saturate(1);
  transition:
    opacity 320ms ease,
    backdrop-filter 360ms ease,
    -webkit-backdrop-filter 360ms ease;
}

html.js-enabled.is-leaving::before,
html.js-enabled.transition-cover::before {
  opacity: 1;
  backdrop-filter: blur(7px) saturate(0.96) brightness(1.02);
  -webkit-backdrop-filter: blur(7px) saturate(0.96) brightness(1.02);
}

html.js-enabled.transition-cover::before {
  transition: none;
}

html.js-enabled.transition-cover.is-ready::before {
  opacity: 0;
  backdrop-filter: blur(0) saturate(1);
  -webkit-backdrop-filter: blur(0) saturate(1);
  transition:
    opacity 430ms cubic-bezier(.22, 1, .36, 1),
    backdrop-filter 430ms cubic-bezier(.22, 1, .36, 1),
    -webkit-backdrop-filter 430ms cubic-bezier(.22, 1, .36, 1);
}

/* La salida no mueve el layout: evita el efecto pop/salto de contenedores. */
html.js-enabled.is-leaving main {
  filter: blur(3.5px) saturate(0.97) brightness(1.015);
  opacity: 0.72;
  transition:
    filter 300ms ease,
    opacity 300ms ease;
}

html.js-enabled.is-leaving .side-menu {
  opacity: 0;
  transform: translate3d(8px, 0, 0) scale(0.995);
  transition:
    opacity 220ms ease,
    transform 260ms cubic-bezier(.22, 1, .36, 1),
    visibility 0s linear 260ms;
}

html.js-enabled.is-leaving .menu-button {
  opacity: 0;
  transform: translateY(-1px) scale(0.96);
  transition:
    opacity 180ms ease,
    transform 220ms cubic-bezier(.22, 1, .36, 1);
}

@media (prefers-reduced-motion: reduce) {
  html.js-enabled::before,
  html.js-enabled.is-leaving main,
  html.js-enabled.is-leaving .side-menu,
  html.js-enabled.is-leaving .menu-button {
    transition: none !important;
    animation: none !important;
    filter: none !important;
    transform: none !important;
  }
}

/* =========================
   Capa estable para abrir/cerrar menú
   Evita el pop visual: el contenido no se recoloca; se cubre con una capa cálida.
   ========================= */

html.js-enabled::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 72;
  pointer-events: none;
  opacity: 0;
  background:
    radial-gradient(circle at 50% 42%, rgba(255, 255, 255, 0.34) 0%, rgba(253, 252, 248, 0.24) 54%, rgba(244, 241, 234, 0.14) 100%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.16), rgba(250, 248, 243, 0.12));
  backdrop-filter: blur(0) saturate(1);
  -webkit-backdrop-filter: blur(0) saturate(1);
  transition:
    opacity 360ms cubic-bezier(.22, 1, .36, 1),
    backdrop-filter 420ms cubic-bezier(.22, 1, .36, 1),
    -webkit-backdrop-filter 420ms cubic-bezier(.22, 1, .36, 1);
}

html.js-enabled.menu-active::after,
html.js-enabled.menu-transitioning::after {
  opacity: 1;
  backdrop-filter: blur(4.6px) saturate(0.95) brightness(1.018);
  -webkit-backdrop-filter: blur(4.6px) saturate(0.95) brightness(1.018);
}

/* La capa del menú suaviza el fondo; el contenido ya no se escala para evitar saltos. */
body:has(.nav-toggle:checked) main {
  filter: saturate(0.94) brightness(1.012);
  transform: none;
}

main {
  transition:
    filter 420ms cubic-bezier(.22, 1, .36, 1),
    opacity 360ms ease;
}

/* Overlay base más neutro: la transición visual la hace la capa ::after. */
.menu-overlay {
  background:
    linear-gradient(90deg, rgba(244, 232, 209, 0.06), rgba(219, 191, 148, 0.06));
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  transition:
    opacity 430ms cubic-bezier(.22, 1, .36, 1),
    visibility 0s linear 430ms;
}

.nav-toggle:checked ~ .menu-overlay {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition-delay: 0s;
}

/* El drawer entra suave, pero sin escala agresiva ni sensación de reacomodo. */
.side-menu {
  transform: translate3d(calc(100% + 28px), 0, 0);
  transition:
    transform 520ms cubic-bezier(.22, 1, .36, 1),
    opacity 360ms ease,
    visibility 0s linear 520ms;
}

.nav-toggle:checked ~ .side-menu {
  transform: translate3d(0, 0, 0);
}

/* El botón no debe generar salto ni cambio brusco al abrir/cerrar. */
.nav-toggle:checked ~ .menu-button {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-1px) scale(0.96);
}

@media (prefers-reduced-motion: reduce) {
  html.js-enabled::after {
    transition: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
}

/* =========================
   Mejora global de legibilidad en hover
   =========================
   Mantiene la estética glass/translúcida por defecto y, al pasar el ratón,
   aumenta ligeramente la solidez del fondo en contenedores con texto útil.
*/

:root {
  --glass-bg-hover: linear-gradient(135deg, rgba(255, 253, 248, 0.66), rgba(248, 240, 228, 0.38));
  --glass-bg-hover-strong: linear-gradient(135deg, rgba(255, 253, 248, 0.72), rgba(248, 240, 228, 0.43));
  --glass-border-hover: rgba(92, 61, 14, 0.235);
  --glass-shadow-hover:
    0 24px 62px rgba(46, 34, 18, 0.080),
    inset 0 1px 0 rgba(255, 255, 255, 0.36);
  --readability-filter-hover: blur(20px) saturate(1.07) brightness(1.025);
}

/* Contenedores principales de lectura: home + páginas de proyecto. */
:is(
  .hr-glass,
  .hr-card,
  .hr-fit-box,
  .hr-context-note,
  .hr-tools-box,
  .hr-project-card,
  .hr-contact-card,
  .hr-panel,
  .hr-hero-card,
  .hr-profile-panel,
  .hr-fit-panel,
  .hr-stack-panel,
  .hr-projects-panel,
  .hr-contact-panel,
  .facturas-hero,
  .facturas-card,
  .facturas-hero-panel,
  .privacy-note,
  .nova-hero,
  .nova-card,
  .laliga-hero,
  .laliga-card
) {
  transition:
    background 220ms ease,
    border-color 220ms ease,
    box-shadow 220ms ease,
    backdrop-filter 220ms ease,
    -webkit-backdrop-filter 220ms ease,
    transform 220ms cubic-bezier(.22, 1, .36, 1);
}

:is(
  .hr-glass,
  .hr-card,
  .hr-fit-box,
  .hr-context-note,
  .hr-tools-box,
  .hr-contact-card,
  .hr-panel,
  .hr-hero-card,
  .hr-profile-panel,
  .hr-fit-panel,
  .hr-stack-panel,
  .hr-projects-panel,
  .hr-contact-panel,
  .facturas-hero,
  .facturas-card,
  .nova-hero,
  .nova-card,
  .laliga-hero,
  .laliga-card
):hover {
  background: var(--glass-bg-hover);
  border-color: var(--glass-border-hover);
  box-shadow: var(--glass-shadow-hover);
  backdrop-filter: var(--readability-filter-hover);
  -webkit-backdrop-filter: var(--readability-filter-hover);
}

/* Tarjetas/enlaces de proyecto: conservan su micro-elevación, pero ganan lectura. */
.hr-project-card:hover {
  background: var(--glass-bg-hover-strong);
  border-color: var(--glass-border-hover);
  box-shadow: var(--glass-shadow-hover);
  backdrop-filter: var(--readability-filter-hover);
  -webkit-backdrop-filter: var(--readability-filter-hover);
  transform: translateY(-2px);
}

/* Subcontenedores con texto útil dentro de tarjetas: filas, notas y chips de contenido. */
:is(
  .hr-profile-list li,
  .hr-role-list li,
  .hr-task-list li,
  .hr-technical-note,
  .hr-contact-row,
  .facturas-pipeline-step,
  .facturas-flow-arrow,
  .facturas-steps li::before,
  .stack-group,
  .side-menu-link,
  .side-menu-action,
  .laliga-note
) {
  transition:
    background 200ms ease,
    border-color 200ms ease,
    box-shadow 200ms ease,
    color 200ms ease,
    transform 200ms cubic-bezier(.22, 1, .36, 1);
}

:is(
  .hr-profile-list li,
  .hr-role-list li,
  .hr-task-list li,
  .hr-technical-note,
  .hr-contact-row,
  .hr-compact-list li,
  .hr-stack-row,
  .hr-project-row
):hover {
  background: rgba(255, 253, 248, 0.60);
  border-color: rgba(92, 61, 14, 0.20);
  box-shadow:
    0 12px 28px rgba(46, 34, 18, 0.045),
    inset 0 1px 0 rgba(255, 255, 255, 0.26);
}

/* Pequeño refuerzo de contraste del texto cuando el usuario está leyendo una tarjeta. */
:is(
  .hr-glass,
  .hr-card,
  .hr-fit-box,
  .hr-context-note,
  .hr-tools-box,
  .hr-project-card,
  .hr-contact-card,
  .hr-panel,
  .hr-hero-card,
  .hr-profile-panel,
  .hr-fit-panel,
  .hr-stack-panel,
  .hr-projects-panel,
  .hr-contact-panel,
  .facturas-hero,
  .facturas-card,
  .nova-hero,
  .nova-card,
  .laliga-hero,
  .laliga-card
):hover :is(p, li, small, strong, h2, h3, .hr-section-copy, .detail-label) {
  text-shadow: 0 1px 0 rgba(255, 253, 248, 0.16);
}

@media (prefers-reduced-motion: reduce) {
  :is(
    .hr-glass,
    .hr-card,
    .hr-fit-box,
    .hr-context-note,
    .hr-tools-box,
    .hr-project-card,
    .hr-contact-card,
    .hr-panel,
    .hr-hero-card,
    .hr-profile-panel,
    .hr-fit-panel,
    .hr-stack-panel,
    .hr-projects-panel,
    .hr-contact-panel,
    .facturas-hero,
    .facturas-card,
    .facturas-hero-panel,
    .privacy-note,
    .nova-hero,
    .nova-card,
    .laliga-hero,
    .laliga-card,
    .hr-profile-list li,
    .hr-role-list li,
    .hr-task-list li,
    .hr-technical-note,
    .hr-contact-row
  ) {
    transition: none !important;
  }
}


/* =========================
   Colorimetría premium para fondo claro de yeso / luz natural
   =========================
   Ajuste global: menos café/dorado, más marfil, piedra clara y acento arena.
*/

:root {
  --ink: rgba(18, 17, 15, 0.98);
  --text: rgba(42, 39, 34, 0.88);
  --muted: rgba(88, 80, 68, 0.72);
  --accent: #8f743f;
  --accent-dark: #66502b;
  --line: rgba(96, 82, 58, 0.115);
  --cream: rgba(255, 255, 251, 0.38);
  --cream-soft: rgba(246, 242, 232, 0.18);

  --glass-border: rgba(96, 82, 58, 0.125);
  --glass-bg-a: rgba(255, 255, 252, 0.37);
  --glass-bg-b: rgba(246, 242, 232, 0.205);
  --glass-bg: linear-gradient(135deg, var(--glass-bg-a), var(--glass-bg-b));
  --glass-shadow: 0 18px 48px rgba(52, 44, 32, 0.035);
  --glass-inset: inset 0 1px 0 rgba(255, 255, 255, 0.30);
  --glass-filter: blur(16px) saturate(1.015);

  --glass-bg-hover: linear-gradient(135deg, rgba(255, 255, 252, 0.72), rgba(246, 242, 232, 0.46));
  --glass-bg-hover-strong: linear-gradient(135deg, rgba(255, 255, 252, 0.78), rgba(246, 242, 232, 0.52));
  --glass-border-hover: rgba(96, 82, 58, 0.22);
  --glass-shadow-hover:
    0 24px 62px rgba(52, 44, 32, 0.070),
    inset 0 1px 0 rgba(255, 255, 255, 0.42);
  --readability-filter-hover: blur(20px) saturate(1.03) brightness(1.025);
}

body {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.20), rgba(252, 249, 242, 0.06)),
    url("./public/portfolio-background.png") center / cover fixed no-repeat;
}

/* Acentos: más arena/bronce suave, menos dorado café. */
:is(
  .home-eyebrow,
  .home-projects-title,
  .section-title,
  .detail-label,
  .facturas-hero-kicker,
  .facturas-panel-label,
  .side-menu-kicker,
  .side-menu-section-title,
  .home-contact-label,
  .hr-kicker,
  .hr-section-title,
  .hr-label
) {
  color: rgba(102, 80, 43, 0.96);
}

:is(.home-title, .facturas-title, .nova-title, .laliga-title, .home-contact-title, .hr-title) {
  color: var(--ink);
}

:is(.home-role, .facturas-subtitle, .nova-subtitle, .laliga-subtitle, .hr-subtitle) {
  color: rgba(42, 39, 34, 0.76);
}

/* Botones y chips adaptados al nuevo fondo claro. */
:is(.primary-button, .facturas-actions .primary-button, .download-button) {
  background: rgba(143, 116, 63, 0.94);
  border-color: rgba(102, 80, 43, 0.18);
  color: #fffdf6;
  box-shadow: 0 12px 28px rgba(102, 80, 43, 0.13);
}

:is(.primary-button, .facturas-actions .primary-button, .download-button):hover {
  background: rgba(102, 80, 43, 0.98);
  box-shadow: 0 16px 34px rgba(102, 80, 43, 0.16);
}

:is(.home-button, .menu-button, .contact-button, .hr-pill, .hr-action, .tag, .facturas-hero-tags span, .laliga-hero-meta span, .status-pill) {
  border-color: rgba(96, 82, 58, 0.105);
  background: rgba(255, 255, 252, 0.34);
  color: rgba(75, 63, 44, 0.84);
  box-shadow:
    0 8px 20px rgba(52, 44, 32, 0.035),
    inset 0 1px 0 rgba(255, 255, 255, 0.34);
}

:is(.home-button, .menu-button, .contact-button[href], .hr-pill[href], .hr-action[href]):hover {
  background: rgba(143, 116, 63, 0.90);
  border-color: rgba(102, 80, 43, 0.18);
  color: #fffdf6;
  box-shadow: 0 13px 28px rgba(102, 80, 43, 0.13);
}

/* Menú lateral: mismo glass, más marfil y menos café. */
.side-menu {
  background:
    linear-gradient(145deg, rgba(255, 255, 252, 0.80), rgba(241, 235, 222, 0.58));
  border-color: rgba(96, 82, 58, 0.15);
  box-shadow:
    -22px 0 70px rgba(42, 36, 28, 0.12),
    inset 1px 0 0 rgba(255, 255, 255, 0.48);
}

.side-menu-link,
.side-menu-action {
  background: rgba(255, 255, 252, 0.42);
  border-color: rgba(96, 82, 58, 0.12);
}

.side-menu-link:hover,
.side-menu-action:hover,
.side-menu-link.is-active {
  background: rgba(255, 255, 252, 0.68);
  border-color: rgba(143, 116, 63, 0.24);
}

.side-link-number,
.facturas-pipeline-number,
.facturas-steps li::before,
.project-number {
  background: rgba(143, 116, 63, 0.13);
  color: rgba(102, 80, 43, 0.96);
}

/* Cajas internas: mantienen transparencia, pero con una lectura más limpia sobre fondo de yeso. */
:is(
  .facturas-hero-panel,
  .privacy-note,
  .home-projects-card,
  .home-contact-row,
  .facturas-flow-arrow,
  .hr-inner-card,
  .hr-mini-card,
  .hr-note,
  .hr-project-row
) {
  background: rgba(255, 255, 252, 0.34);
  border-color: rgba(96, 82, 58, 0.105);
}

:is(
  .facturas-hero-panel,
  .privacy-note,
  .home-projects-card,
  .home-contact-row,
  .facturas-flow-arrow,
  .hr-inner-card,
  .hr-mini-card,
  .hr-note,
  .hr-project-row
):hover {
  background: rgba(255, 255, 252, 0.62);
  border-color: rgba(96, 82, 58, 0.20);
}

/* Transiciones: capa más neutra, sin tinte café marcado. */
.page-transition {
  background:
    radial-gradient(circle at 50% 42%, rgba(255, 255, 252, 0.96), rgba(246, 242, 232, 0.88) 52%, rgba(225, 214, 194, 0.72) 100%);
}

html.js-enabled::after {
  background:
    radial-gradient(circle at 50% 42%, rgba(255, 255, 252, 0.30), rgba(246, 242, 232, 0.20) 54%, rgba(216, 204, 184, 0.15) 100%);
}

@media (max-width: 760px) {
  body {
    background:
      linear-gradient(90deg, rgba(255, 255, 255, 0.28), rgba(252, 249, 242, 0.10)),
      url("./public/portfolio-background.png") center / cover fixed no-repeat;
  }
}

/* =========================
   V14 · Menú lateral más limpio y editorial
   ========================= */

/* Panel más ligero, estrecho y con menos sensación de tarjeta pesada. */
.side-menu {
  width: min(390px, calc(100vw - 32px));
  min-width: min(390px, calc(100vw - 32px));
  padding: 30px 26px 24px;
  border-radius: 26px;
  background:
    linear-gradient(145deg, rgba(255, 255, 252, 0.88), rgba(246, 241, 231, 0.70));
  border: 1px solid rgba(96, 82, 58, 0.13);
  box-shadow:
    -18px 0 54px rgba(42, 36, 28, 0.105),
    0 18px 50px rgba(42, 36, 28, 0.055),
    inset 0 1px 0 rgba(255, 255, 255, 0.54);
  backdrop-filter: blur(24px) saturate(1.03);
  -webkit-backdrop-filter: blur(24px) saturate(1.03);
}

/* Cabecera más compacta y limpia. */
.side-menu-top {
  align-items: flex-start;
  gap: 18px;
  padding-bottom: 20px;
  margin-bottom: 22px;
  border-bottom: 1px solid rgba(96, 82, 58, 0.105);
}

.side-menu-kicker {
  margin-bottom: 8px;
  color: rgba(102, 80, 43, 0.86);
  font-size: 0.76rem;
  letter-spacing: 0.30em;
}

.side-menu-title {
  margin: 0;
  color: rgba(24, 23, 20, 0.94);
  font-size: 1.05rem;
  line-height: 1.18;
  letter-spacing: -0.035em;
  font-weight: 850;
}

.side-menu-subtitle {
  max-width: 260px;
  margin-top: 7px;
  color: rgba(68, 63, 55, 0.70);
  font-size: 0.78rem;
  line-height: 1.34;
  font-weight: 650;
  letter-spacing: -0.014em;
}

.side-menu-close {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 999px;
  background: rgba(255, 255, 252, 0.58);
  border-color: rgba(96, 82, 58, 0.11);
  color: rgba(75, 63, 44, 0.76);
  box-shadow:
    0 8px 18px rgba(42, 36, 28, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.42);
}

.side-menu-close:hover {
  background: rgba(255, 255, 252, 0.86);
  color: rgba(24, 23, 20, 0.92);
  transform: translateY(-1px);
}

/* Contenido sin sensación de dashboard pesado. */
.side-menu-content {
  gap: 22px;
  overflow: hidden;
}

.side-menu-section-title {
  margin: 0 0 10px;
  color: rgba(102, 80, 43, 0.82);
  font-size: 0.75rem;
  line-height: 1;
  font-weight: 860;
  letter-spacing: 0.28em;
}

.side-menu-links {
  gap: 7px;
}

/* Enlaces de navegación más simples: menos caja, menos ruido, más lista premium. */
.side-menu-link {
  min-height: 56px;
  grid-template-columns: 1fr auto;
  gap: 14px;
  padding: 13px 15px 13px 16px;
  border-radius: 17px;
  background: rgba(255, 255, 252, 0.32);
  border: 1px solid rgba(96, 82, 58, 0.075);
  box-shadow: none;
}

.side-menu-link:hover,
.side-menu-link.is-active {
  transform: translateX(2px);
  background: rgba(255, 255, 252, 0.72);
  border-color: rgba(143, 116, 63, 0.20);
  box-shadow:
    0 10px 24px rgba(42, 36, 28, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.48);
}

.side-menu-link.is-featured {
  background: rgba(255, 255, 252, 0.44);
}

.side-menu-link.is-featured.is-active,
.side-menu-link.is-featured:hover {
  background: rgba(255, 255, 252, 0.76);
}

/* Ocultamos numeración y textos secundarios para hacer el menú mucho más limpio. */
.side-link-number,
.side-link-copy small {
  display: none;
}

.side-link-copy strong {
  display: block;
  color: rgba(24, 23, 20, 0.86);
  font-size: 0.93rem;
  line-height: 1.18;
  font-weight: 810;
  letter-spacing: -0.022em;
}

.side-link-arrow {
  width: auto;
  height: auto;
  align-self: center;
  color: rgba(102, 80, 43, 0.48);
  font-size: 0.95rem;
  font-weight: 850;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.side-menu-link:hover .side-link-arrow,
.side-menu-link.is-active .side-link-arrow {
  color: rgba(102, 80, 43, 0.86);
  transform: translateX(2px);
}

/* Accesos rápidos más compactos y menos repetitivos. */
.side-menu-actions {
  display: grid;
  gap: 8px;
}

.side-menu-action {
  min-height: 48px;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 12px 15px 12px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 252, 0.34);
  border: 1px solid rgba(96, 82, 58, 0.075);
  box-shadow: none;
}

.side-menu-action:hover {
  transform: translateX(2px);
  background: rgba(255, 255, 252, 0.74);
  border-color: rgba(143, 116, 63, 0.18);
  box-shadow:
    0 10px 22px rgba(42, 36, 28, 0.045),
    inset 0 1px 0 rgba(255, 255, 255, 0.44);
}

.side-menu-action span {
  color: rgba(102, 80, 43, 0.76);
  font-size: 0.68rem;
  letter-spacing: 0.24em;
  font-weight: 850;
}

.side-menu-action strong {
  color: rgba(75, 63, 44, 0.84);
  font-size: 0.83rem;
  line-height: 1.15;
  font-weight: 780;
  letter-spacing: -0.018em;
}

/* El overlay queda más limpio y blanco, menos beige/café. */
.menu-overlay {
  background:
    linear-gradient(90deg, rgba(255, 255, 252, 0.10), rgba(244, 239, 228, 0.08));
}

html.js-enabled.menu-active::after,
html.js-enabled.menu-transitioning::after {
  backdrop-filter: blur(4.2px) saturate(0.92) brightness(1.02);
  -webkit-backdrop-filter: blur(4.2px) saturate(0.92) brightness(1.02);
}

@media (max-width: 760px) {
  .side-menu {
    width: calc(100vw - 20px);
    min-width: 0;
    padding: 26px 22px 22px;
    border-radius: 24px;
  }

  .side-menu-link {
    min-height: 54px;
  }
}

/* =========================
   V15 · Menú limpio con números + transición más blanca
   ========================= */

/* Quitamos el bloque textual superior del menú: Portfolio / nombre / subtítulo. */
.side-menu {
  padding-top: 24px;
}

.side-menu-top {
  min-height: 0;
  padding-bottom: 14px;
  margin-bottom: 18px;
  justify-content: flex-end;
  border-bottom: 1px solid rgba(96, 82, 58, 0.075);
}

.side-menu-top > div {
  display: none;
}

.side-menu-close {
  margin-left: auto;
}

/* Recuperamos los números porque dan estructura y jerarquía visual. */
.side-menu-link {
  grid-template-columns: 34px 1fr auto;
  min-height: 60px;
  gap: 13px;
  padding: 12px 15px 12px 14px;
}

.side-link-number {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  border-radius: 999px;
  background: rgba(143, 116, 63, 0.105);
  color: rgba(102, 80, 43, 0.88);
  font-size: 0.70rem;
  line-height: 1;
  font-weight: 860;
  letter-spacing: -0.015em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.36);
}

.side-menu-link:hover .side-link-number,
.side-menu-link.is-active .side-link-number {
  background: rgba(143, 116, 63, 0.17);
  color: rgba(82, 62, 31, 0.98);
}

/* Dejamos los textos secundarios ocultos para que el menú no vuelva a sentirse cargado. */
.side-link-copy small {
  display: none;
}

.side-link-copy strong {
  font-size: 0.94rem;
}

/* Accesos más simples, también sin exceso de explicación visual. */
.side-menu-action {
  min-height: 46px;
}

/* Transición entre páginas: blanco marfil, limpia y sin tinte marrón. */
.page-transition {
  background:
    radial-gradient(circle at 50% 42%,
      rgba(255, 255, 255, 0.99) 0%,
      rgba(253, 253, 250, 0.97) 48%,
      rgba(246, 244, 238, 0.90) 100%);
}

html.js-enabled::after {
  background:
    radial-gradient(circle at 50% 42%,
      rgba(255, 255, 255, 0.34) 0%,
      rgba(253, 253, 250, 0.24) 54%,
      rgba(246, 244, 238, 0.13) 100%);
}

html.js-enabled.transition-cover::before {
  background:
    radial-gradient(circle at 50% 42%,
      rgba(255, 255, 255, 0.99) 0%,
      rgba(253, 253, 250, 0.97) 52%,
      rgba(246, 244, 238, 0.90) 100%);
}

html.js-enabled.menu-transitioning::after,
html.js-enabled.menu-active::after {
  background:
    radial-gradient(circle at 42% 48%,
      rgba(255, 255, 255, 0.22),
      rgba(253, 253, 250, 0.16) 52%,
      rgba(246, 244, 238, 0.08) 100%);
}

.menu-overlay {
  background:
    linear-gradient(90deg,
      rgba(255, 255, 255, 0.075),
      rgba(253, 253, 250, 0.06));
}

@media (max-width: 760px) {
  .side-menu-link {
    grid-template-columns: 32px 1fr auto;
    min-height: 56px;
  }

  .side-link-number {
    width: 28px;
    height: 28px;
    font-size: 0.68rem;
  }
}

/* =========================
   V17 · Menú solo navegación/proyectos
   ========================= */

/* El contacto ya vive en el index: el menú queda reservado para páginas y proyectos. */
.side-menu-content > section[aria-label="Accesos rápidos"] {
  display: none !important;
}

/* Panel más compacto al eliminar accesos: menos vacío y más sensación de navegación premium. */
.side-menu {
  width: min(372px, calc(100vw - 28px));
  min-width: min(372px, calc(100vw - 28px));
  height: auto;
  min-height: 0;
  bottom: auto;
  padding: 22px 22px 20px;
  border-radius: 24px;
}

.side-menu-top {
  padding-bottom: 10px;
  margin-bottom: 16px;
}

.side-menu-content {
  gap: 0;
  overflow: hidden;
}

.side-menu-section-title {
  margin-bottom: 12px;
}

.side-menu-links {
  gap: 8px;
}

.side-menu-link {
  min-height: 58px;
  padding: 12px 14px;
}

.side-link-copy strong {
  font-size: 0.95rem;
}

@media (max-width: 760px) {
  .side-menu {
    width: calc(100vw - 20px);
    min-width: 0;
    padding: 22px 18px 18px;
    border-radius: 22px;
  }
}


/* =========================
   V18 · Menú full-height limpio + navegación única
   ========================= */

.side-menu {
  top: 24px;
  right: 24px;
  bottom: 24px;
  height: auto;
  min-height: calc(100dvh - 48px);
  width: min(390px, calc(100vw - 48px));
  min-width: min(390px, calc(100vw - 48px));
  padding: 22px 22px 24px;
  border-radius: 28px;
}

.side-menu-content {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.side-menu-content nav {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.side-menu-links {
  flex: 0 0 auto;
}

/* Mantenemos el contacto fuera del menú: solo navegación y proyectos. */
.side-menu-content > section[aria-label="Accesos rápidos"] {
  display: none !important;
}

@media (max-width: 760px) {
  .side-menu {
    top: 10px;
    right: 10px;
    bottom: 10px;
    width: calc(100vw - 20px);
    min-width: 0;
    min-height: calc(100dvh - 20px);
    padding: 22px 18px 20px;
    border-radius: 22px;
  }
}

/* =========================
   Fondos por página
   Misma familia visual, variaciones suaves por proyecto
   ========================= */

body.home-page {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.20), rgba(252, 249, 242, 0.06)),
    url("./public/portfolio-background.png") center / cover fixed no-repeat;
}

body.facturas-page {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.18), rgba(252, 249, 242, 0.055)),
    url("./public/project-bg-facturasgpt5.png") center / cover fixed no-repeat;
}

body.nova-page {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.18), rgba(252, 249, 242, 0.055)),
    url("./public/project-bg-novaassist.png") center / cover fixed no-repeat;
}

body.laliga-page {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.18), rgba(252, 249, 242, 0.055)),
    url("./public/project-bg-laliga.png") center / cover fixed no-repeat;
}


body.workforce-page {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.18), rgba(252, 249, 242, 0.055)),
    url("./public/project-bg-workforce.png") center / cover fixed no-repeat;
}
