*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
/* =========================================================
   PALETA "CAFÉ CARAMELO" — Premium & elegante
   Light por defecto · Dark con .theme-dark en <body>
   ========================================================= */
:root {
  /* LIGHT (default) — crema cálida + café caramelo */
  --ink: #2a1f17;              /* texto principal · café muy oscuro */
  --ink-soft: #5a4a3a;         /* texto secundario · café medio */
  --paper: #faf5ef;            /* fondo · crema cálida */
  --paper-soft: #f3e9d9;       /* fondo alterno · arena */
  --rust: #8b5a2b;             /* acento primario · caramelo oscuro */
  --amber: #c9a37e;            /* acento secundario · caramelo claro */
  --grid: #e9dfd2;             /* líneas del grid · beige claro */
  --avail: #5a8856;            /* verde disponible · oliva cálido */
  --shadow: rgba(139, 90, 43, 0.08);
  --rust-soft: rgba(139, 90, 43, 0.08);
  --rust-mid: rgba(139, 90, 43, 0.18);
  --amber-soft: rgba(201, 163, 126, 0.16);
  --bg-overlay: rgba(250, 245, 239, 0.92);
  --bg-overlay-strong: rgba(250, 245, 239, 0.97);
  /* tipografía */
  --mono: "IBM Plex Mono", monospace;
  --serif: "Playfair Display", "Merriweather", serif;
  --sans: "Poppins", sans-serif;
  --body: "Nunito Sans", sans-serif;
  color-scheme: light;
}
body.theme-dark {
  /* DARK — café profundo + caramelo iluminado */
  --ink: #f0e6d6;
  --ink-soft: #b8a890;
  --paper: #1a130d;
  --paper-soft: #251a10;
  --rust: #c9a37e;
  --amber: #e8c89a;
  --grid: #2a1f14;
  --avail: #7fbb73;
  --shadow: rgba(0, 0, 0, 0.45);
  --rust-soft: rgba(201, 163, 126, 0.1);
  --rust-mid: rgba(201, 163, 126, 0.22);
  --amber-soft: rgba(232, 200, 154, 0.14);
  --bg-overlay: rgba(26, 19, 13, 0.92);
  --bg-overlay-strong: rgba(26, 19, 13, 0.97);
  color-scheme: dark;
}
html {
  scroll-behavior: smooth;
}
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  overflow-x: hidden;
  cursor: none;
}
.grid-bg {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 48px 48px;
  z-index: 0;
  pointer-events: none;
}
.noise {
  position: fixed;
  inset: 0;
  opacity: 0.04;
  z-index: 1;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 200px;
}
#cur {
  position: fixed;
  width: 11px;
  height: 11px;
  background: var(--rust);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  mix-blend-mode: screen;
  transition:
    width 0.18s,
    height 0.18s;
}
#cur-r {
  position: fixed;
  width: 32px;
  height: 32px;
  border: 1.5px solid var(--rust);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  opacity: 0.45;
  transition:
    width 0.28s,
    height 0.28s,
    opacity 0.28s;
}
main {
  position: relative;
  z-index: 2;
}
.lang-en .es {
  display: none !important;
}
.lang-es .en {
  display: none !important;
}
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 48px;
  border-bottom: 1px solid transparent;
  transition:
    border-color 0.3s,
    background 0.3s;
}
nav.sc {
  border-color: rgba(42, 31, 23, 0.12);
  background: var(--bg-overlay);
  backdrop-filter: blur(12px);
}
.n-logo {
  font-family: var(--sans);
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.n-logo span {
  color: var(--rust);
}
.n-links {
  display: flex;
  gap: 28px;
  list-style: none;
}
.n-links a {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  opacity: 0.65;
  transition: opacity 0.2s;
  font-family: var(--sans);
  font-weight: 600;
}
.n-links a:hover {
  opacity: 1;
}
.n-right {
  display: flex;
  align-items: center;
  gap: 12px;
}
/* Botón hamburguesa — oculto en escritorio, visible en móvil */
.n-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 9px;
  background: none;
  border: 1px solid var(--grid);
  border-radius: 7px;
  cursor: pointer;
  flex-shrink: 0;
}
.n-burger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.2s ease;
}
nav.menu-open .n-burger span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
nav.menu-open .n-burger span:nth-child(2) {
  opacity: 0;
}
nav.menu-open .n-burger span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}
.n-av {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  letter-spacing: 0.05em;
  color: var(--avail);
  font-family: var(--sans);
  font-weight: 600;
}
.sdot {
  width: 6px;
  height: 6px;
  background: var(--avail);
  border-radius: 50%;
  animation: pd 2s infinite;
}
@keyframes pd {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.4;
    transform: scale(0.8);
  }
}
.lbtn {
  background: none;
  border: 1.5px solid var(--ink);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: none;
  padding: 6px 12px;
  color: var(--ink);
  transition:
    background 0.2s,
    color 0.2s;
  display: flex;
  align-items: center;
}
.lbtn:hover {
  background: var(--ink);
  color: var(--paper);
}
#hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid rgba(42, 31, 23, 0.12);
}
.h-left {
  padding: 110px 0 72px 48px;
  border-right: 1px solid rgba(42, 31, 23, 0.12);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  position: relative;
}
.h-tag {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--rust);
  margin-bottom: 22px;
  font-family: var(--sans);
  font-weight: 600;
}
.h-name {
  font-family: var(--serif);
  font-size: clamp(54px, 6.5vw, 96px);
  line-height: 1;
  letter-spacing: -0.02em;
  font-weight: 900;
}
.h-name em {
  font-style: italic;
  color: var(--rust);
  display: block;
}
.h-role {
  font-family: var(--sans);
  font-weight: 800;
  font-size: clamp(12px, 1.4vw, 17px);
  letter-spacing: 0.07em;
  text-transform: uppercase;
  opacity: 0.72;
  margin-top: 24px;
}
.h-desc {
  font-family: var(--body);
  font-size: 15px;
  line-height: 1.95;
  max-width: 430px;
  opacity: 0.78;
  margin-top: 20px;
}
.h-cta {
  margin-top: 38px;
  display: flex;
  gap: 14px;
  align-items: center;
}
.btn-p {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--ink);
  color: var(--paper);
  padding: 13px 26px;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1.5px solid var(--ink);
  position: relative;
  overflow: hidden;
}
.btn-p::before {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 0;
  background: var(--rust);
  transition: height 0.24s;
  z-index: 0;
}
.btn-p:hover::before {
  height: 100%;
}
.btn-p span {
  position: relative;
  z-index: 1;
  color: inherit;
}
.btn-p:hover span {
  color: var(--ink);
}
.btn-g {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1.5px solid var(--ink);
  padding-bottom: 2px;
  transition:
    color 0.2s,
    border-color 0.2s;
}
.btn-g:hover {
  color: var(--rust);
  border-color: var(--rust);
}
.h-scroll {
  position: absolute;
  bottom: 36px;
  left: 48px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0.5;
  font-family: var(--sans);
  font-weight: 500;
}
.h-sline {
  width: 36px;
  height: 1px;
  background: var(--ink);
  position: relative;
  overflow: hidden;
}
.h-sline::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: var(--rust);
  animation: sa 2s ease infinite;
}
@keyframes sa {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}
.h-right {
  padding: 110px 48px 72px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.arch-title {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--rust);
  margin-bottom: 16px;
  font-family: var(--sans);
  font-weight: 600;
}
.arch-nodes {
  position: relative;
  height: 290px;
  max-width: 460px;
}
.arch-svg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.a-node {
  position: absolute;
  border: 1px solid rgba(42, 31, 23, 0.25);
  background: var(--paper);
  padding: 9px 13px;
  font-size: 11px;
  font-family: var(--mono);
  font-weight: 500;
  letter-spacing: 0.03em;
  white-space: nowrap;
  transition:
    background 0.2s,
    color 0.2s;
  cursor: default;
}
.a-node:hover {
  background: var(--ink);
  color: var(--paper);
}
.a-node .a-lbl {
  display: block;
  font-weight: 700;
  font-size: 10px;
  color: var(--rust);
  margin-bottom: 2px;
}
.a-node:hover .a-lbl {
  color: var(--paper);
}
.h-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid rgba(42, 31, 23, 0.12);
  margin-top: 36px;
  max-width: 460px;
}
.metric {
  padding: 18px;
  border-right: 1px solid rgba(42, 31, 23, 0.12);
}
.metric:last-child {
  border-right: none;
}
.m-val {
  font-family: var(--serif);
  font-size: 44px;
  font-weight: 900;
  line-height: 1;
  color: var(--rust);
  display: block;
}
.m-lbl {
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.6;
  margin-top: 5px;
  display: block;
  font-family: var(--sans);
  font-weight: 500;
}
section {
  position: relative;
  z-index: 2;
}
.s-hdr {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 52px;
}
.s-num {
  font-size: 13px;
  color: var(--rust);
  letter-spacing: 0.07em;
  font-family: var(--sans);
  font-weight: 600;
}
.s-title {
  font-family: var(--serif);
  font-size: clamp(36px, 4.6vw, 58px);
  line-height: 1;
  font-weight: 900;
}
.s-line {
  flex: 1;
  height: 1px;
  background: var(--ink);
  opacity: 0.12;
  margin-left: 10px;
}
#about {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid rgba(42, 31, 23, 0.12);
}
.ab-left {
  padding: 72px 48px;
  border-right: 1px solid rgba(42, 31, 23, 0.12);
}
.ab-right {
  padding: 72px 48px;
}
.ab-text {
  font-family: var(--body);
  font-size: 15px;
  line-height: 1.95;
  opacity: 0.78;
  max-width: 490px;
}
.ab-text strong {
  color: var(--rust);
  font-weight: 700;
  opacity: 1;
}
.ab-stack {
  margin-top: 44px;
}
.s-lbl {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--rust);
  margin-bottom: 14px;
  font-family: var(--sans);
  font-weight: 600;
}
.s-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.tag {
  padding: 6px 12px;
  border: 1px solid;
  font-size: 11px;
  font-family: var(--mono);
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition:
    background 0.2s,
    color 0.2s;
  cursor: default;
}
.tp {
  border-color: rgba(42, 31, 23, 0.25);
  color: var(--ink);
}
.ta {
  border-color: var(--rust);
  color: var(--rust);
}
.tag:hover {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}
.terminal {
  background: #121216;
  color: #a8d4a8;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.88;
  border: 1px solid rgba(42, 31, 23, 0.12);
  overflow: hidden;
}
.t-bar {
  background: #1a1a26;
  padding: 9px 14px;
  display: flex;
  align-items: center;
  gap: 7px;
  border-bottom: 1px solid #2a2a3a;
}
.td {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}
.t-title {
  color: #888;
  font-size: 10px;
  margin-left: 6px;
}
.t-body {
  padding: 18px 22px;
}
.t-body .pr {
  color: var(--amber);
}
.t-body .cm {
  color: #fff;
}
.t-body .ou {
  color: #a8d4a8;
  opacity: 0.8;
}
.t-body .co {
  color: #888;
}
.t-body .hl {
  color: var(--rust);
}
.t-body .ky {
  color: #6aafd4;
}
.tblink {
  display: inline-block;
  width: 7px;
  height: 13px;
  background: #a8d4a8;
  vertical-align: middle;
  animation: blink 1.1s step-end infinite;
  margin-left: 2px;
}
@keyframes blink {
  50% {
    opacity: 0;
  }
}
#experience {
  padding: 72px 48px;
  border-top: 1px solid rgba(42, 31, 23, 0.12);
}
.exp-list {
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(42, 31, 23, 0.12);
}
.exp-row {
  display: grid;
  grid-template-columns: 190px 1fr 130px;
  border-bottom: 1px solid rgba(42, 31, 23, 0.12);
  transition: background 0.2s;
  cursor: default;
}
.exp-row:last-child {
  border-bottom: none;
}
.exp-row:hover {
  background: var(--ink);
  color: var(--paper);
}
.exp-co {
  padding: 28px 30px;
  border-right: 1px solid rgba(42, 31, 23, 0.12);
  font-family: var(--sans);
  font-weight: 700;
  font-size: 15px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
}
.exp-row:hover .exp-co {
  border-right-color: rgba(0, 0, 0, 0.1);
}
.exp-etag {
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid rgba(42, 31, 23, 0.25);
  padding: 3px 8px;
  color: var(--rust);
  font-family: var(--mono);
  font-weight: 500;
  width: fit-content;
}
.exp-row:hover .exp-etag {
  color: var(--paper);
  border-color: rgba(0, 0, 0, 0.2);
}
.exp-main {
  padding: 26px 28px;
}
.exp-role {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 8px;
}
.exp-desc {
  font-family: var(--body);
  font-size: 13.5px;
  line-height: 1.8;
  opacity: 0.74;
  max-width: 580px;
}
.exp-row:hover .exp-desc {
  opacity: 0.8;
}
.exp-tech {
  font-size: 11px;
  color: var(--rust);
  font-family: var(--mono);
  font-weight: 500;
  margin-top: 10px;
  letter-spacing: 0.03em;
  opacity: 0.9;
}
.exp-row:hover .exp-tech {
  color: var(--paper);
  opacity: 0.8;
}
.exp-r {
  padding: 26px 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-end;
  gap: 6px;
  border-left: 1px solid rgba(42, 31, 23, 0.12);
}
.exp-row:hover .exp-r {
  border-left-color: rgba(0, 0, 0, 0.1);
}
.exp-date {
  font-size: 11px;
  opacity: 0.55;
  font-family: var(--mono);
  text-align: right;
}
.exp-arr {
  font-size: 16px;
  opacity: 0.18;
  transition:
    opacity 0.2s,
    transform 0.2s;
}
.exp-row:hover .exp-arr {
  opacity: 0.7;
  transform: translateX(4px);
}
#projects {
  border-top: 1px solid rgba(42, 31, 23, 0.12);
  padding: 72px 48px;
}
.proj-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border: 1px solid rgba(42, 31, 23, 0.12);
}
.proj-card {
  padding: 38px 32px;
  border-right: 1px solid rgba(42, 31, 23, 0.12);
  border-bottom: 1px solid rgba(42, 31, 23, 0.12);
  position: relative;
  overflow: hidden;
  transition: background 0.25s;
  cursor: default;
}
.proj-card:nth-child(even) {
  border-right: none;
}
.proj-card:nth-last-child(-n + 2) {
  border-bottom: none;
}
.proj-card::before {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--rust);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.28s;
}
.proj-card:hover::before {
  transform: scaleX(1);
}
.proj-card:hover {
  background: rgba(139, 90, 43, 0.05);
}
.p-num {
  font-size: 11px;
  color: var(--rust);
  letter-spacing: 0.12em;
  font-family: var(--mono);
  margin-bottom: 16px;
  opacity: 0.8;
}
.p-icon {
  font-size: 28px;
  margin-bottom: 16px;
  display: block;
  color: var(--ink);
  opacity: 0.9;
}
.p-name {
  font-family: var(--sans);
  font-weight: 800;
  font-size: 19px;
  margin-bottom: 10px;
  line-height: 1.15;
}
.p-desc {
  font-family: var(--body);
  font-size: 13.5px;
  line-height: 1.85;
  opacity: 0.74;
  margin-bottom: 20px;
}
.p-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 22px;
}
.p-tag {
  font-size: 10px;
  font-family: var(--mono);
  font-weight: 500;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 4px 8px;
  background: rgba(139, 90, 43, 0.15);
  color: var(--amber);
  border: 1px solid rgba(139, 90, 43, 0.3);
}
.p-link {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--sans);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  opacity: 0.5;
  transition:
    opacity 0.2s,
    color 0.2s;
}
.proj-card:hover .p-link {
  opacity: 1;
  color: var(--rust);
}
.infra-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 32px;
}
.ig-item {
  position: relative;
  border: 1px solid rgba(42, 31, 23, 0.12);
  overflow: hidden;
  aspect-ratio: 4/3;
  background: var(--grid);
  cursor: pointer;
}
.ig-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(100%) contrast(1.2);
  opacity: 0.6;
  transition: all 0.5s ease;
}
.ig-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 16px;
  background: linear-gradient(to top, rgba(42, 31, 23, 0.75), transparent);
  transform: translateY(10px);
  opacity: 0;
  transition: all 0.4s ease;
}
.ig-tag {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--rust);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
}
.ig-item:hover {
  border-color: var(--rust);
}
.ig-item:hover .ig-img {
  filter: grayscale(0%) contrast(1);
  opacity: 1;
  transform: scale(1.05);
}
.ig-item:hover .ig-overlay {
  transform: translateY(0);
  opacity: 1;
}
#media-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  visibility: hidden;
  opacity: 0;
  transition:
    visibility 0s 0.3s,
    opacity 0.3s ease;
}
#media-modal.active {
  visibility: visible;
  opacity: 1;
  transition: opacity 0.3s ease;
}
.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(42, 31, 23, 0.72);
  backdrop-filter: blur(10px);
  cursor: pointer;
}
.modal-content {
  position: relative;
  z-index: 1;
  max-width: 90vw;
  max-height: 85vh;
  border: 1px solid rgba(139, 90, 43, 0.4);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
  background: var(--paper);
}
.modal-content img,
.modal-content video {
  display: block;
  max-width: 100%;
  max-height: 85vh;
  object-fit: contain;
}
.modal-close {
  position: absolute;
  top: -40px;
  right: 0;
  background: none;
  border: none;
  color: var(--rust);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: color 0.2s;
}
.modal-close:hover {
  color: var(--ink);
}
.srv-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-top: 0;
}
.srv-card {
  border: 1px solid rgba(42, 31, 23, 0.12);
  padding: 38px 32px;
  background: rgba(139, 90, 43, 0.02);
  position: relative;
  overflow: hidden;
  transition: background 0.25s;
  cursor: default;
}
.srv-card:hover {
  background: rgba(139, 90, 43, 0.06);
}
.srv-card::before {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--rust);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.28s;
}
.srv-card:hover::before {
  transform: scaleX(1);
}
.srv-hdr {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}
.srv-icon {
  font-family: var(--mono);
  color: var(--rust);
  font-size: 14px;
  font-weight: bold;
}
.srv-title {
  font-family: var(--sans);
  font-weight: 800;
  font-size: 19px;
}
.srv-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.srv-list li {
  font-family: var(--body);
  font-size: 14px;
  line-height: 1.6;
  opacity: 0.8;
  position: relative;
  padding-left: 20px;
}
.srv-list li::before {
  content: "▹";
  position: absolute;
  left: 0;
  color: var(--amber);
  font-family: var(--mono);
  font-size: 12px;
  top: 2px;
}
.srv-list li strong {
  color: var(--ink);
  font-weight: 700;
  opacity: 1;
}
#tech {
  border-top: 1px solid rgba(42, 31, 23, 0.12);
  padding: 72px 48px;
}
.tf-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 44px;
  padding-bottom: 28px;
  border-bottom: 1px solid rgba(42, 31, 23, 0.12);
}
.tf-btn {
  background: none;
  border: 1px solid rgba(42, 31, 23, 0.25);
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  cursor: none;
  padding: 8px 15px;
  color: var(--ink);
  transition:
    background 0.2s,
    color 0.2s,
    border-color 0.2s,
    opacity 0.2s;
  opacity: 0.55;
}
.tf-btn:hover {
  border-color: var(--ink);
  opacity: 1;
}
.tf-btn.active {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
  opacity: 1;
}
.t-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(172px, 1fr));
  border: 1px solid rgba(42, 31, 23, 0.12);
}
.t-item {
  padding: 18px 18px 14px;
  border-right: 1px solid rgba(42, 31, 23, 0.12);
  border-bottom: 1px solid rgba(42, 31, 23, 0.12);
  display: flex;
  flex-direction: column;
  gap: 3px;
  transition: background 0.2s;
  cursor: default;
  position: relative;
  overflow: hidden;
}
.t-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 0;
  background: var(--rust);
  transition: height 0.22s;
}
.t-item:hover::before {
  height: 100%;
}
.t-item:hover {
  background: rgba(139, 90, 43, 0.05);
}
.t-item.gone {
  display: none;
}
.ti-ico {
  font-size: 10px;
  color: var(--rust);
  opacity: 0.8;
  margin-bottom: 3px;
}
.ti-nm {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 14px;
  line-height: 1.2;
}
.ti-cat {
  font-size: 10px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  opacity: 0.45;
  font-family: var(--mono);
  margin-top: 1px;
}
.ti-dots {
  display: flex;
  gap: 3px;
  margin-top: 9px;
}
.ti-d {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  border: 1px solid rgba(42, 31, 23, 0.25);
  opacity: 0.28;
}
.ti-d.f {
  background: var(--rust);
  border-color: var(--rust);
  opacity: 0.9;
}
.t-item:hover .ti-d.f {
  opacity: 1;
  background: var(--amber);
}
#contact {
  border-top: 1px solid rgba(42, 31, 23, 0.12);
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 55vh;
}
.ct-left {
  padding: 72px 48px;
  border-right: 1px solid rgba(42, 31, 23, 0.12);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.ct-head {
  font-family: var(--serif);
  font-size: clamp(34px, 4vw, 60px);
  line-height: 1.04;
  max-width: 420px;
}
.ct-head em {
  font-style: italic;
  color: var(--rust);
}
.ct-sub {
  font-family: var(--body);
  margin-top: 20px;
  font-size: 14px;
  line-height: 1.9;
  opacity: 0.72;
  max-width: 380px;
}
.ct-links {
  margin-top: 40px;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(42, 31, 23, 0.12);
}
.ct-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid rgba(42, 31, 23, 0.12);
  text-decoration: none;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.03em;
  transition:
    background 0.2s,
    color 0.2s;
}
.ct-link:last-child {
  border-bottom: none;
}
.ct-link:hover {
  background: var(--ink);
  color: var(--paper);
}
.ct-arr {
  opacity: 0.28;
  transition:
    opacity 0.2s,
    transform 0.2s;
}
.ct-link:hover .ct-arr {
  opacity: 1;
  transform: translateX(4px);
}
.ct-right {
  padding: 72px 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.loc-blk {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-bottom: 42px;
}
.loc-lbl {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--rust);
  font-family: var(--sans);
  font-weight: 600;
}
.loc-val {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 21px;
}
.loc-sub {
  font-family: var(--body);
  font-size: 13px;
  opacity: 0.55;
}
.av-blk {
  border: 1px solid var(--avail);
  padding: 22px;
  position: relative;
  overflow: hidden;
}
.av-blk::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--avail);
}
.av-lbl {
  font-size: 11px;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--avail);
  margin-bottom: 7px;
  font-family: var(--sans);
  font-weight: 600;
}
.av-txt {
  font-family: var(--body);
  font-size: 14px;
  line-height: 1.82;
  opacity: 0.78;
}
.av-txt strong {
  color: var(--rust);
  opacity: 1;
}
.pref-blk {
  margin-top: 28px;
  padding: 22px;
  border: 1px solid rgba(42, 31, 23, 0.12);
}
.pref-lbl {
  font-size: 11px;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--rust);
  margin-bottom: 10px;
  font-family: var(--sans);
  font-weight: 600;
}
.pref-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
footer {
  position: relative;
  z-index: 2;
  border-top: 1px solid rgba(42, 31, 23, 0.12);
  padding: 20px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  letter-spacing: 0.07em;
  opacity: 0.48;
  font-family: var(--body);
}
.bot-container {
  position: fixed;
  bottom: 30px;
  right: 36px;
  z-index: 999;
  display: flex;
  align-items: flex-end;
  gap: 14px;
  pointer-events: none;
}
.bot-msg {
  background: var(--bg-overlay-strong);
  border: 1px solid var(--rust);
  padding: 16px 20px;
  border-radius: 8px 8px 0 8px;
  font-family: var(--body);
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  position: relative;
  pointer-events: auto;
  animation: floatUp 0.5s ease-out;
  max-width: 260px;
}
.bot-close {
  position: absolute;
  top: 4px;
  right: 8px;
  background: none;
  border: none;
  color: var(--rust);
  font-size: 16px;
  cursor: pointer;
  transition: color 0.2s;
}
.bot-close:hover {
  color: var(--ink);
}
.bot-msg a {
  text-decoration: none;
  color: inherit;
  display: block;
  margin-top: 6px;
}
.bot-msg a strong {
  color: var(--rust);
  transition: color 0.2s;
}
.bot-msg a:hover strong {
  color: var(--amber);
}
.bot-avatar {
  width: 50px;
  height: 50px;
  background: var(--rust);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--paper);
  font-size: 22px;
  pointer-events: auto;
  box-shadow: 0 5px 15px rgba(139, 90, 43, 0.3);
  transition:
    transform 0.3s,
    background 0.3s;
  animation: pulseBot 2s infinite;
}
.bot-avatar:hover {
  transform: scale(1.1);
  background: var(--amber);
}
@keyframes floatUp {
  from {
    opacity: 0;
    transform: translateY(15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes pulseBot {
  0% {
    box-shadow: 0 0 0 0 rgba(139, 90, 43, 0.5);
  }
  70% {
    box-shadow: 0 0 0 15px rgba(139, 90, 43, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(139, 90, 43, 0);
  }
}
.fu {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
}
.fu.vis {
  opacity: 1;
  transform: translateY(0);
}
.fu:nth-child(2) {
  transition-delay: 0.08s;
}
.fu:nth-child(3) {
  transition-delay: 0.16s;
}
.fu:nth-child(4) {
  transition-delay: 0.24s;
}
@media (max-width: 900px) {
  nav {
    padding: 14px 20px;
    flex-wrap: nowrap;
  }
  /* Hamburguesa visible en móvil */
  .n-burger {
    display: inline-flex;
  }
  /* Oculta el texto de disponibilidad para despejar la barra */
  .n-av {
    display: none;
  }
  /* En móvil el subtítulo del logo se quita para no apretar la barra */
  .n-logo-sub {
    display: none;
  }
  /* Menú desplegable bajo la barra */
  .n-links {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 6px 20px 14px;
    background: var(--bg-overlay-strong);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--grid);
    transform: translateY(-10px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
  }
  nav.menu-open .n-links {
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }
  .n-links li {
    width: 100%;
  }
  .n-links a {
    display: block;
    padding: 14px 2px;
    font-size: 13px;
    opacity: 0.85;
    border-bottom: 1px solid var(--grid);
  }
  .n-links li:last-child a {
    border-bottom: none;
  }
  .n-links .n-biz {
    margin-top: 10px;
    text-align: center;
  }
  /* Restaura el borde rust completo del recuadro "Servicios Web",
     que la regla de arriba (li:last-child a) le quitaba el lado inferior. */
  .n-links li:last-child a.n-biz {
    border-bottom: 1px solid var(--rust);
  }
  #hero {
    grid-template-columns: 1fr;
  }
  .h-left {
    padding: 90px 20px 40px;
    border-right: none;
    border-bottom: 1px solid rgba(42, 31, 23, 0.12);
  }
  /* Indicador "scroll" centrado y en flujo (ya no encimado al botón) */
  .h-scroll {
    position: static;
    left: auto;
    bottom: auto;
    justify-content: center;
    width: 100%;
    margin-top: 30px;
  }
  .h-right {
    padding: 36px 20px;
  }
  #about {
    grid-template-columns: 1fr;
  }
  .ab-left {
    border-right: none;
    border-bottom: 1px solid rgba(42, 31, 23, 0.12);
    padding: 44px 20px;
  }
  .ab-right {
    padding: 44px 20px;
  }
  #experience {
    padding: 44px 20px;
  }
  .exp-row {
    grid-template-columns: 1fr;
  }
  .exp-co,
  .exp-main,
  .exp-r {
    padding: 18px 20px;
    border: none;
    border-bottom: 1px solid rgba(42, 31, 23, 0.09);
  }
  .exp-r {
    align-items: flex-start;
  }
  #projects {
    padding: 44px 20px;
  }
  .proj-grid {
    grid-template-columns: 1fr;
  }
  .proj-card {
    border-right: none;
    border-bottom: 1px solid rgba(42, 31, 23, 0.12);
  }
  .proj-card:last-child {
    border-bottom: none;
  }
  #tech {
    padding: 44px 20px;
  }
  .t-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  }
  #contact {
    grid-template-columns: 1fr;
  }
  .ct-left {
    border-right: none;
    border-bottom: 1px solid rgba(42, 31, 23, 0.12);
    padding: 44px 20px;
  }
  .ct-right {
    padding: 44px 20px;
  }
  footer {
    padding: 14px 20px;
    flex-direction: column;
    gap: 6px;
    text-align: center;
  }
  .srv-grid {
    grid-template-columns: 1fr;
  }
  .bot-container {
    right: 20px;
    bottom: 20px;
    flex-direction: column;
    align-items: flex-end;
  }
  .bot-msg {
    border-radius: 8px 8px 8px 0;
    margin-bottom: 10px;
  }
}

/* ============================================================
   Adiciones: link a freelance, CV download, biz block, CTA slim
   ============================================================ */
.n-biz {
  color: var(--rust) !important;
  opacity: 1 !important;
  border: 1px solid var(--rust);
  padding: 4px 10px;
  border-radius: 2px;
  transition: background 0.2s, color 0.2s;
}
.n-biz:hover {
  background: var(--rust);
  color: var(--paper) !important;
}
#cta-banner.cta-slim {
  border-top: 1px solid rgba(42, 31, 23, 0.12);
  padding: 80px 48px;
  background: rgba(139, 90, 43, 0.04);
}
.cta-row {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 48px;
  align-items: center;
}
.cta-h {
  font-size: clamp(28px, 3.4vw, 44px) !important;
  line-height: 1.15 !important;
  margin-top: 16px;
}
.cta-h em {
  font-style: italic;
  color: var(--rust);
}
.cta-sub {
  font-family: var(--body);
  font-size: 14px;
  line-height: 1.85;
  opacity: 0.75;
  margin-top: 22px;
  max-width: 560px;
}
.cta-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
}
.cv-blk {
  margin-top: 28px;
  padding: 22px;
  border: 1px solid rgba(42, 31, 23, 0.12);
}
.cv-lbl {
  font-size: 11px;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--rust);
  margin-bottom: 10px;
  font-family: var(--sans);
  font-weight: 600;
}
.cv-sub {
  font-family: var(--body);
  font-size: 13px;
  opacity: 0.65;
  margin-bottom: 14px;
}
.cv-btns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.cv-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid rgba(42, 31, 23, 0.22);
  background: rgba(139, 90, 43, 0.05);
  text-decoration: none;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.2s;
}
.cv-btn:hover {
  background: var(--rust);
  border-color: var(--rust);
  color: var(--paper);
  transform: translateY(-1px);
}
.cv-ico {
  font-size: 16px;
  color: var(--rust);
}
.cv-btn:hover .cv-ico {
  color: var(--paper);
}
.cv-flag {
  display: inline-block;
  margin-right: 8px;
  padding: 2px 6px;
  font-family: var(--mono);
  background: var(--rust);
  color: var(--paper);
  font-size: 10px;
  letter-spacing: 0.1em;
}
.cv-btn:hover .cv-flag {
  background: var(--paper);
  color: var(--rust);
}
.cv-lbl-row {
  display: inline-flex;
  align-items: center;
}
.biz-blk {
  margin-top: 28px;
  padding: 22px;
  border: 1px solid var(--rust);
  background: rgba(139, 90, 43, 0.06);
}
.biz-lbl {
  font-size: 11px;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--rust);
  margin-bottom: 10px;
  font-family: var(--sans);
  font-weight: 600;
}
.biz-txt {
  font-family: var(--body);
  font-size: 13px;
  line-height: 1.7;
  opacity: 0.85;
  margin-bottom: 12px;
}
.biz-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-bottom: 1.5px solid var(--rust);
  padding-bottom: 3px;
  transition: color 0.2s, border-color 0.2s;
}
.biz-link:hover {
  color: var(--amber);
  border-color: var(--amber);
}
.biz-arr {
  font-size: 16px;
  color: var(--rust);
}
.biz-link:hover .biz-arr {
  color: var(--amber);
}
@media (max-width: 900px) {
  #cta-banner.cta-slim {
    padding: 48px 20px;
  }
  .cta-row {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .cv-btns {
    grid-template-columns: 1fr;
  }
  .n-biz {
    display: inline-block;
  }
}

/* ============================================================
   Botón "Visualizar proyecto" dentro de las filas de experiencia
   ============================================================ */
.exp-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  padding: 8px 14px;
  border: 1px solid var(--rust);
  color: var(--rust);
  text-decoration: none;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: background 0.2s, color 0.2s, transform 0.2s;
  background: rgba(139, 90, 43, 0.06);
  width: fit-content;
}
.exp-link:hover {
  background: var(--rust);
  color: var(--paper);
  transform: translateX(2px);
}
.exp-row:hover .exp-link {
  border-color: var(--paper);
  color: var(--paper);
  background: rgba(0, 0, 0, 0.12);
}
.exp-row:hover .exp-link:hover {
  background: var(--paper);
  color: var(--rust);
}

/* Fix: opciones de select con fondo oscuro / texto claro */
select option {
  background: #14141a;
  color: var(--ink);
}
select option:checked {
  background: var(--rust);
  color: var(--paper);
}
:root {
  color-scheme: dark;
}

/* ====================================
/* ============================================================
   THEME TOGGLE (sol / luna) — botón en el nav
   ============================================================ */
.theme-btn {
  background: none;
  border: 1.5px solid var(--ink);
  color: var(--ink);
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.3s;
  border-radius: 0;
}
.theme-btn:hover {
  background: var(--ink);
  color: var(--paper);
  transform: rotate(15deg);
}
.theme-btn svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 1.8;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.theme-btn .icon-sun { display: none; }
.theme-btn .icon-moon { display: block; }
body.theme-dark .theme-btn .icon-sun { display: block; }
body.th
/* ============================================================
   ERP HIELO FENIX · card highlight (restaurada)
   ============================================================ */
.proj-card.p-erp {
  border: 1.5px solid var(--rust);
  background: var(--rust-soft);
}
.proj-card.p-erp::after {
  content: "NEW · 2026";
  position: absolute;
  top: 14px;
  right: 14px;
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--paper);
  background: var(--rust);
  padding: 4px 9px;
  box-shadow: 0 4px 12px var(--rust-mid);
}
.p-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 8px 14px;
  border: 1px solid var(--rust);
  color: var(--rust);
  text-decoration: none;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: background 0.2s, color 0.2s, transform 0.2s;
  background: var(--rust-soft);
  width: fit-content;
}
.p-link:hover {
  background: var(--rust);
  color: var(--paper);
  transform: translateX(2px);
}
.t-item.new {
  position: relative;
}
.t-item.new::after {
  content: "NEW";
  position: absolute;
  top: 8px;
  right: 8px;
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.14em;
  background: var(--rust);
  color: var(--paper);
  padding: 2px 5px;
}

/* ============================================================
   THEME TOGGLE — PILL switch sol/luna deslizable
   Inspirado en componente lucide-react
   ============================================================ */
.theme-pill {
  width: 64px;
  height: 32px;
  padding: 4px;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--grid);
  background: var(--paper);
  transition: background 0.3s, border-color 0.3s;
  position: relative;
  flex-shrink: 0;
}
body.theme-dark .theme-pill {
  background: var(--paper-soft);
  border-color: var(--grid);
}
.theme-pill .pill-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  height: 100%;
}
.theme-pill .pill-bubble {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--grid);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), background 0.3s;
  position: absolute;
  top: 3px;
  left: 3px;
  pointer-events: none;
}
body.theme-dark .theme-pill .pill-bubble {
  background: var(--rust);
}
body:not(.theme-dark) .theme-pill .pill-bubble {
  transform: translateX(32px);
}
.theme-pill svg {
  width: 14px;
  height: 14px;
  stroke-width: 1.6;
}
.theme-pill .ic-moon-active,
.theme-pill .ic-sun-active { color: var(--paper); }
.theme-pill .ic-moon-bg,
.theme-pill .ic-sun-bg {
  width: 24px; height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-soft);
  opacity: 0.55;
  pointer-events: none;
}
/* En dark: muestra Moon en burbuja, Sun apagado a la derecha */
body.theme-dark .ic-sun-bg { display: flex; }
body.theme-dark .ic-moon-bg { display: none; }
body.theme-dark .pill-bubble svg.ic-show-dark { display: block; }
body.theme-dark .pill-bubble svg.ic-show-light { display: none; }
/* En light: muestra Sun en burbuja (a la derecha), Moon apagado a la izquierda */
body:not(.theme-dark) .ic-moon-bg { display: flex; }
body:not(.theme-dark) .ic-sun-bg { display: none; }
body:not(.theme-dark) .pill-bubble svg.ic-show-light { display: block; }
body:not(.theme-dark) .pill-bubble svg.ic-show-dark { display: none; }
/* La burbuja siempre es clara (beige/caramelo) en ambos temas,
   así que el ícono activo va oscuro para que se distinga bien. */
.pill-bubble svg { color: #2a1f17; }

/* ============================================================
   GOOEY TEXT · efecto morph/blur en el nombre
   ============================================================ */
.gooey-wrap {
  position: relative;
  height: clamp(70px, 8vw, 120px);
  width: 100%;
  margin-bottom: 4px;
}
.gooey-wrap .gooey-svg {
  position: absolute;
  width: 0;
  height: 0;
  pointer-events: none;
}
.gooey-stage {
  display: flex;
  align-items: center;
  width: 100%;
  height: 100%;
  filter: url(#gooey-threshold);
  position: relative;
}
.gooey-text {
  position: absolute;
  font-family: var(--serif);
  font-weight: 900;
  font-size: clamp(48px, 6.5vw, 84px);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--ink);
  white-space: nowrap;
  user-select: none;
  pointer-events: none;
}
.gooey-text + .gooey-text {
  color: var(--rust);
}

/* ============================================================
   GOOEY TEXT — override para 2 LÍNEAS
   ============================================================ */
.gooey-wrap {
  height: clamp(140px, 17vw, 230px); /* 2 líneas */
  margin-bottom: 14px;
}
.gooey-text {
  line-height: 0.95;
  text-align: left;
  display: block;
  width: 100%;
}
.gooey-stage {
  align-items: flex-start;
  justify-content: flex-start;
}

/* ============================================================
   GLOW BUTTONS — efecto pointer-tracking estilo lucide
   Variables --x/--y se inyectan desde JS (mousemove)
   ============================================================ */
.btn-p,
.btn-g,
.btn-quote,
.cv-btn,
.biz-link,
.exp-link,
.p-link,
.btn-pdf,
.btn-submit {
  --x: 50;
  --y: 50;
  --xp: 0.5;
  --yp: 0.5;
  --hue: calc(30 + (var(--xp) * 60));
  --glow-spread: 220px;
  background-image: radial-gradient(
    var(--glow-spread) var(--glow-spread) at
    calc((var(--x) - var(--btn-left, 0)) * 1px)
    calc((var(--y) - var(--btn-top, 0)) * 1px),
    hsl(var(--hue) 70% 65% / 0.28),
    transparent 70%
  );
  background-attachment: fixed;
}
.btn-p::after,
.btn-quote::after,
.cv-btn::after,
.btn-pdf::after,
.btn-submit::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: radial-gradient(
    calc(var(--glow-spread) * 0.6) calc(var(--glow-spread) * 0.6) at
    calc(var(--x) * 1px) calc(var(--y) * 1px),
    hsl(var(--hue) 80% 65% / 0.5),
    transparent 100%
  );
  background-attachment: fixed;
  pointer-events: none;
  mix-blend-mode: screen;
  opacity: 0;
  transition: opacity 0.25s;
  z-index: 0;
}
.btn-p:hover::after,
.btn-quote:hover::after,
.cv-btn:hover::after,
.btn-pdf:hover::after,
.btn-submit:hover::after {
  opacity: 1;
}
.btn-p > *,
.btn-quote > *,
.cv-btn > *,
.btn-pdf > *,
.btn-submit > * {
  position: relative;
  z-index: 1;
}

/* ============================================================
   BOXES BACKGROUND · skewed grid interactivo
   Versión optimizada con SVG cell hover (no 15k divs)
   ============================================================ */
.bx-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.bx-bg svg {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 220%;
  height: 220%;
  transform: translate(-50%, -55%) skewX(-48deg) skewY(14deg) scale(0.7) rotate(0deg);
  pointer-events: auto;
}
.bx-bg .bx-cell {
  fill: transparent;
  stroke: var(--grid);
  stroke-width: 0.5;
  transition: fill 0s, opacity 0.6s;
  opacity: 0.6;
  cursor: none;
}
.bx-bg .bx-cell:hover {
  fill: var(--bx-hover, var(--rust));
  opacity: 0.8;
  transition: fill 0s;
}
.bx-bg .bx-plus {
  stroke: var(--grid);
  stroke-width: 0.6;
  opacity: 0.45;
  pointer-events: none;
}
/* desactivar grid-bg cuando Boxes está activo (más limpio) */
body.bx-active .grid-bg {
  display: none;
}

/* ============================================================
   PRICING REDESIGN · glass + ring popular (versión liviana)
   Reusa .plan-card pero le da look ModernPricing
   ============================================================ */
.plan-card {
  border-radius: 18px;
  backdrop-filter: blur(14px) saturate(120%);
  -webkit-backdrop-filter: blur(14px) saturate(120%);
  background: linear-gradient(
    135deg,
    rgba(139, 90, 43, 0.06),
    rgba(201, 163, 126, 0.025)
  );
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.05) inset,
    0 18px 40px -22px var(--shadow);
}
.plan-card.featured {
  scale: 1.03;
  box-shadow:
    0 0 0 2px var(--amber-soft),
    0 0 0 1px var(--rust),
    0 1px 0 rgba(255, 255, 255, 0.1) inset,
    0 30px 60px -28px var(--rust-mid);
}
.plan-card.featured .plan-badge {
  background: var(--rust);
  color: var(--paper);
  font-family: var(--mono);
  font-weight: 700;
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 10.5px;
  letter-spacing: 0.14em;
  top: -12px;
  box-shadow: 0 6px 16px var(--rust-mid);
}
.plan-name {
  font-family: var(--serif);
  font-weight: 300;
  font-size: 38px;
  letter-spacing: -0.025em;
  line-height: 1.05;
  margin-bottom: 4px;
}
.plan-tag {
  opacity: 0.7;
  font-size: 14px;
}
.plan-price {
  font-family: var(--serif);
  font-weight: 300;
  font-size: 56px;
  letter-spacing: -0.03em;
  display: flex;
  align-items: baseline;
  gap: 4px;
}
.plan-price .currency {
  font-size: 22px;
  color: var(--rust);
  margin-right: 0;
  vertical-align: baseline;
}
.plan-price .unit {
  font-size: 12px;
  color: var(--ink-soft);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
/* Divider gradiente bajo el precio */
.plan-iva + ul.plan-features::before {
  content: "";
  display: block;
  height: 1px;
  margin: 6px 0 18px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(139, 90, 43, 0.22) 50%,
    transparent
  );
}
body.theme-dark .plan-iva + ul.plan-features::before {
  background: linear-gradient(
    90deg,
    transparent,
    rgba(201, 163, 126, 0.22) 20%,
    rgba(201, 163, 126, 0.4) 50%,
    rgba(201, 163, 126, 0.22) 80%,
    transparent
  );
}
.plan-features li::before {
  content: "✓";
  font-family: var(--sans);
  font-weight: 800;
  color: var(--rust);
  font-size: 12px;
}
.plan-features li.no::before {
  content: "✕";
  color: var(--ink-soft);
  opacity: 0.5;
}
.btn-quote {
  border-radius: 12px;
  font-weight: 700;
}

/* ============================================================
   PERFORMANCE — Eliminar cursor custom + optimizaciones varias
   ============================================================ */
/* Cursor nativo */
body, body * { cursor: auto !important; }
.lbtn, .theme-pill, .bot-avatar, .bot-close, a, button { cursor: pointer !important; }
#cur, #cur-r {
  display: none !important;
}
/* Reducir reflow del fondo Boxes en pantallas pequeñas */
@media (max-width: 700px) {
  .bx-bg { display: none; }
}
/* will-change para animaciones que sí pintan */
.bot-avatar,
.theme-pill .pill-bubble,
.gooey-text,
.trust-track { will-change: transform; }
/* Lazy decoración: animaciones pausadas si el usuario prefiere reducción */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001s !important;
    transition-duration: 0.001s !important;
  }
  .gooey-wrap,
  .bot-avatar,
  .sdot { animation: none !important; }
}
/* Imágenes con loading lazy ya están a nivel HTML — refuerzo decoding */
img { decoding: async; }

/* ============================================================
   ARCH-NODES (red ERP) — tamaño expandido + responsive
   ============================================================ */
.arch-nodes {
  position: relative;
  width: 580px;
  height: 550px;
  max-width: 100%;
  transform-origin: top left;
}
/* En tablets: escala ligera */
@media (max-width: 1200px) {
  .arch-nodes {
    transform: scale(0.85);
    margin-bottom: -85px; /* compensa altura colapsada */
  }
}
/* En tablets pequeñas / mobile landscape */
@media (max-width: 900px) {
  .arch-nodes {
    transform: scale(0.6);
    margin-bottom: -220px;
    margin-left: -40px;
  }
}
/* Móvil */
@media (max-width: 600px) {
  .arch-nodes {
    transform: scale(0.46);
    margin-bottom: -300px;
    margin-left: -60px;
  }
  /* Reduce padding del h-right en móvil */
  .h-right {
    padding-left: 0 !important;
    padding-right: 0 !important;
    overflow: hidden;
  }
}
@media (max-width: 380px) {
  .arch-nodes {
    transform: scale(0.4);
    margin-bottom: -330px;
  }
}

/* ============================================================
   ARCH-WRAP — Override responsive con wrapper + aspect-ratio
   Sustituye al sistema de transform + márgenes negativos
   ============================================================ */
.arch-wrap {
  width: 100%;
  max-width: 580px;
  aspect-ratio: 580 / 550;
  position: relative;
  overflow: hidden;
}
.arch-wrap .arch-nodes {
  position: absolute !important;
  top: 0;
  left: 0;
  width: 580px !important;
  height: 550px !important;
  transform-origin: top left;
  margin: 0 !important;
  max-width: none !important;
}
/* Reset de las reglas anteriores que metían márgenes negativos */
@media (max-width: 1200px) {
  .arch-wrap .arch-nodes {
    transform: none; /* el JS calcula el scale dinámicamente */
    margin: 0 !important;
  }
}
@media (max-width: 900px) {
  .arch-wrap .arch-nodes { margin: 0 !important; }
  .h-right { padding-left: 20px !important; padding-right: 20px !important; }
}
@media (max-width: 600px) {
  .arch-wrap .arch-nodes { margin: 0 !important; }
}
