/* =========================================================
   Portafolio — Miguel Alejandro García Ovalles
   Estilo editorial / técnico. Paleta: casi negro + azul-violeta + cian.
   ========================================================= */

/* ---------- Tokens: tema claro ---------- */
:root {
  --bg: #f6f7fb;
  --bg-alt: #eef1f7;
  --surface: #ffffff;
  --surface-2: #e9edf5;
  --border: #d9deea;
  --border-strong: #b9c1d3;
  --text: #0e1320;
  --text-muted: #4b5568;
  --text-subtle: #737c8f;

  --accent: #3355ff;
  --accent-strong: #2340e0;
  --accent-2: #0891b2;
  --accent-soft: rgba(51, 85, 255, 0.08);
  --accent-soft-strong: rgba(51, 85, 255, 0.16);
  --on-accent: #ffffff;
  --green: #12a150;

  /* Ticket impreso (siempre en papel claro) */
  --paper: #fffefa;
  --ink: #15171c;
  --ink-muted: #5e626e;
  --stamp: #3355ff;
  --printer: #1a1e29;
  --printer-edge: #2a3040;

  /* Ilustraciones */
  --fig-bg: #f0f3f9;
  --fig-dot: rgba(14, 19, 32, 0.12);
  --art-panel: #ffffff;
  --art-stroke: #8d97ad;
  --art-muted: #dfe4ee;
  --art-line: #a3acbf;
  --art-chip: #ffd06b;

  --sun: none;
  --moon: block;

  --font-sans: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --header-h: 60px;
  --container: 1200px;
  --label-col: 200px;

  color-scheme: light;
}

/* ---------- Tokens: tema oscuro ---------- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0a0c11;
    --bg-alt: #0e1118;
    --surface: #12151d;
    --surface-2: #181c26;
    --border: #1f2431;
    --border-strong: #343b4f;
    --text: #e9ecf3;
    --text-muted: #a3abbc;
    --text-subtle: #6f788c;

    --accent: #7d93ff;
    --accent-strong: #9caeff;
    --accent-2: #22d3ee;
    --accent-soft: rgba(125, 147, 255, 0.1);
    --accent-soft-strong: rgba(125, 147, 255, 0.2);
    --on-accent: #0a0c11;
    --green: #3ddc97;

    --paper: #e8e6df;
    --printer: #161a24;
    --printer-edge: #2b3244;

    --fig-bg: #0e1118;
    --fig-dot: rgba(255, 255, 255, 0.07);
    --art-panel: #12151d;
    --art-stroke: #4d5770;
    --art-muted: #1f2533;
    --art-line: #4b5469;
    --art-chip: #ffd479;

    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #0a0c11;
  --bg-alt: #0e1118;
  --surface: #12151d;
  --surface-2: #181c26;
  --border: #1f2431;
  --border-strong: #343b4f;
  --text: #e9ecf3;
  --text-muted: #a3abbc;
  --text-subtle: #6f788c;

  --accent: #7d93ff;
  --accent-strong: #9caeff;
  --accent-2: #22d3ee;
  --accent-soft: rgba(125, 147, 255, 0.1);
  --accent-soft-strong: rgba(125, 147, 255, 0.2);
  --on-accent: #0a0c11;
  --green: #3ddc97;

  --paper: #e8e6df;
  --printer: #161a24;
  --printer-edge: #2b3244;

  --fig-bg: #0e1118;
  --fig-dot: rgba(255, 255, 255, 0.07);
  --art-panel: #12151d;
  --art-stroke: #4d5770;
  --art-muted: #1f2533;
  --art-line: #4b5469;
  --art-chip: #ffd479;

  color-scheme: dark;
}

/* ---------- Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 8px);
  -webkit-text-size-adjust: 100%;
}

html.no-scroll {
  overflow: hidden;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

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

h1,
h2,
h3,
p,
dl,
dd,
figure {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

em {
  font-style: normal;
  color: var(--accent);
}

::selection {
  background: var(--accent);
  color: var(--on-accent);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

svg[viewBox="0 0 24 24"] {
  width: 16px;
  height: 16px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: square;
  stroke-linejoin: miter;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
}

.skip-link:focus {
  top: 12px;
}

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  height: var(--header-h);
  background: var(--bg);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease;
}

.site-header.is-scrolled,
.site-header.menu-open {
  border-bottom-color: var(--border);
}

.nav {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 32px;
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  margin-right: auto;
  white-space: nowrap;
}

.brand-name {
  font-weight: 800;
  font-stretch: 118%;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}

.brand-handle {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-subtle);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-links a {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 6px 0;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.2s ease;
}

.nav-num {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-subtle);
  transition: color 0.2s ease;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.nav-links a:hover,
.nav-links a.is-active {
  color: var(--text);
}

.nav-links a:hover .nav-num,
.nav-links a.is-active .nav-num {
  color: var(--accent);
}

.nav-links a.is-active::after {
  transform: scaleX(1);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  padding-left: 22px;
  border-left: 1px solid var(--border);
  height: 24px;
}

.text-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-subtle);
  min-height: 32px;
}

.lang-toggle .sep {
  margin: 0 2px;
  opacity: 0.5;
}

.lang-toggle [data-lang] {
  transition: color 0.2s ease;
}

.lang-toggle [data-lang].is-active {
  color: var(--text);
}

.lang-toggle:hover [data-lang]:not(.is-active) {
  color: var(--accent);
}

.theme-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1.5px solid var(--text);
  background: linear-gradient(90deg, var(--text) 50%, transparent 50%);
  transition: transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1);
}

:root[data-theme="dark"] .theme-dot {
  transform: rotate(180deg);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-dot {
    transform: rotate(180deg);
  }
}

.theme-toggle:hover .theme-dot {
  border-color: var(--accent);
  background: linear-gradient(90deg, var(--accent) 50%, transparent 50%);
}

.menu-toggle {
  display: none;
  color: var(--text);
}

.menu-lines {
  position: relative;
  width: 20px;
  height: 10px;
}

.menu-lines span {
  position: absolute;
  left: 0;
  right: 0;
  height: 1.5px;
  background: currentColor;
  transition: transform 0.3s ease, top 0.3s ease;
}

.menu-lines span:first-child {
  top: 0;
}

.menu-lines span:last-child {
  top: 8.5px;
}

.menu-open .menu-lines span:first-child {
  top: 4.25px;
  transform: rotate(45deg);
}

.menu-open .menu-lines span:last-child {
  top: 4.25px;
  transform: rotate(-45deg);
}

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  height: 52px;
  padding: 0 20px;
  border: 1.5px solid var(--text);
  font-weight: 600;
  font-size: 0.95rem;
  white-space: nowrap;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn svg {
  transition: transform 0.25s ease;
}

.btn-solid {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}

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

.btn-solid:hover svg {
  transform: translate(2px, 2px);
}

.btn-line:hover {
  background: var(--text);
  color: var(--bg);
}

.btn-line:hover svg {
  transform: translateY(2px);
}

/* ---------- Hero ---------- */
.hero {
  padding-top: calc(var(--header-h) + 20px);
}

.hero-meta {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-subtle);
}

.clock {
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 64px;
  padding: 56px 0 88px;
  align-items: start;
}

.hero-fullname {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 12px;
}

.hero-fullname::before {
  content: "";
  width: 28px;
  height: 1.5px;
  background: var(--accent);
}

.hero-name {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  font-weight: 800;
  font-stretch: 125%;
  font-size: clamp(3.4rem, 10.4vw, 8.4rem);
  line-height: 0.86;
  letter-spacing: -0.035em;
  text-transform: uppercase;
}

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

.hn-dot {
  color: var(--text);
}

.hero-role {
  margin-top: 36px;
  font-weight: 600;
  font-stretch: 110%;
  font-size: clamp(1.05rem, 1.7vw, 1.3rem);
  letter-spacing: -0.005em;
}

.hero-lead {
  margin-top: 12px;
  max-width: 34em;
  font-size: 1.08rem;
  color: var(--text-muted);
}

.hero-ctas {
  margin-top: 36px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-contact {
  margin-top: 26px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  font-family: var(--font-mono);
  font-size: 0.84rem;
}

.hero-contact a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--border-strong);
  color: var(--text);
  overflow-wrap: anywhere;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.hero-contact svg {
  width: 16px;
  height: 16px;
  color: var(--accent);
}

.hero-contact a:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* ---------- Ticket impreso ---------- */
.hero-receipt {
  padding-top: 4px;
}

.printer {
  position: relative;
  width: 100%;
  max-width: 360px;
  margin: 0 auto;
}

.printer-body {
  position: relative;
  z-index: 2;
  height: 34px;
  background: var(--printer);
  border: 1px solid var(--printer-edge);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 14px 28px -18px rgba(0, 0, 0, 0.6);
}

.printer-slot {
  width: calc(100% - 44px);
  height: 4px;
  background: #05060a;
  border-radius: 2px;
}

.printer-led {
  position: absolute;
  left: 12px;
  top: 50%;
  width: 5px;
  height: 5px;
  margin-top: -2.5px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 6px var(--green);
}

.receipt-clip {
  position: relative;
  z-index: 1;
  margin: -16px 26px 0;
  padding-bottom: 28px;
  overflow: hidden;
  filter: drop-shadow(0 18px 22px rgba(0, 0, 0, 0.22));
}

.receipt {
  --tooth: 12px;
  position: relative;
  padding: 30px 20px 30px;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  line-height: 1.55;
  -webkit-mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / var(--tooth) 100%;
  mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / var(--tooth) 100%;
}

.print-receipt .receipt {
  animation: print 2.4s steps(24, end) 0.35s both;
}

@keyframes print {
  from {
    transform: translateY(-100%);
  }
  to {
    transform: translateY(0);
  }
}

.r-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1px;
}

.r-head strong {
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  margin-bottom: 2px;
}

.r-head span {
  color: var(--ink-muted);
}

.r-rule {
  margin: 10px 0;
  border-top: 1.5px dashed rgba(21, 23, 28, 0.45);
}

.r-double {
  border-top: 3px double rgba(21, 23, 28, 0.7);
}

.r-row {
  display: grid;
  grid-template-columns: 5ch minmax(0, 1fr);
}

.r-th {
  color: var(--ink-muted);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
}

.r-line {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.r-line span:last-child {
  color: var(--ink-muted);
}

.r-total {
  display: flex;
  justify-content: space-between;
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.r-barcode {
  margin-top: 14px;
  height: 46px;
}

.r-barcode svg {
  width: 100%;
  height: 100%;
  fill: var(--ink);
}

.r-foot {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.r-foot span {
  color: var(--ink-muted);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
}

.r-foot strong {
  margin-top: 8px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.r-stamp {
  position: absolute;
  right: 12px;
  top: 51%;
  padding: 4px 10px;
  border: 2px solid var(--stamp);
  color: var(--stamp);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  transform: rotate(-11deg);
  opacity: 0.88;
  mix-blend-mode: multiply;
  pointer-events: none;
}

/* ---------- Cinta ---------- */
.marquee {
  overflow: hidden;
  background: var(--accent);
  color: var(--on-accent);
  border-top: 1px solid var(--accent);
  border-bottom: 1px solid var(--accent);
}

.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 48s linear infinite;
}

.mq-group {
  display: flex;
  align-items: center;
  flex: none;
}

.mq-item {
  padding: 14px 0;
  font-weight: 800;
  font-stretch: 125%;
  font-size: 1.3rem;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  white-space: nowrap;
}

.mq-sep {
  padding: 0 22px;
  font-family: var(--font-mono);
  font-size: 1.1rem;
  opacity: 0.55;
}

.marquee:hover .marquee-track {
  animation-play-state: paused;
}

@keyframes marquee {
  to {
    transform: translateX(-50%);
  }
}

/* ---------- Secciones ---------- */
.section {
  padding: 112px 0;
  border-bottom: 1px solid var(--border);
}

.section-grid {
  display: grid;
  grid-template-columns: var(--label-col) minmax(0, 1fr);
  gap: 48px;
}

.section-label {
  position: sticky;
  top: calc(var(--header-h) + 32px);
  align-self: start;
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.section-num {
  color: var(--accent);
}

.section-title {
  font-weight: 750;
  font-stretch: 118%;
  font-size: clamp(2.1rem, 4.6vw, 3.8rem);
  line-height: 0.98;
  letter-spacing: -0.03em;
  max-width: 14em;
}

.section-intro {
  margin-top: 18px;
  max-width: 38em;
  color: var(--text-muted);
  font-size: 1.05rem;
}

/* ---------- Perfil ---------- */
.statement {
  margin-top: 40px;
  max-width: 30em;
  font-weight: 500;
  font-size: clamp(1.35rem, 2.5vw, 2rem);
  line-height: 1.3;
  letter-spacing: -0.015em;
}

.about-body {
  margin-top: 22px;
  max-width: 40em;
  font-size: 1.06rem;
  color: var(--text-muted);
}

.services {
  margin-top: 64px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 48px;
  counter-reset: svc;
}

.services li {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  column-gap: 8px;
  padding: 24px 0 28px;
  border-top: 1px solid var(--border);
  transition: border-color 0.3s ease;
}

.services li:hover {
  border-top-color: var(--accent);
}

.svc-num {
  grid-row: span 2;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent);
  padding-top: 4px;
}

.services h3 {
  font-weight: 700;
  font-stretch: 112%;
  font-size: 1.16rem;
  letter-spacing: -0.01em;
}

.services p {
  margin-top: 8px;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ---------- Experiencia ---------- */
.jobs {
  margin-top: 56px;
  border-bottom: 1px solid var(--border);
}

.job {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 32px;
  padding: 36px 0;
  border-top: 1px solid var(--border);
}

.job-when {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 6px;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--text-subtle);
}

.job-period {
  color: var(--text);
}

.job-live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--green);
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  animation: pulse 2.2s ease-out infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 color-mix(in srgb, var(--green) 55%, transparent);
  }
  70%,
  100% {
    box-shadow: 0 0 0 7px transparent;
  }
}

.job-company {
  font-weight: 750;
  font-stretch: 118%;
  font-size: clamp(1.5rem, 2.6vw, 2.1rem);
  line-height: 1.05;
  letter-spacing: -0.025em;
}

.job-company a {
  display: inline-flex;
  align-items: flex-start;
  gap: 8px;
  transition: color 0.2s ease;
}

.job-company a svg {
  width: 18px;
  height: 18px;
  margin-top: 4px;
  color: var(--text-subtle);
  transition: transform 0.25s ease, color 0.2s ease;
}

.job-company a:hover {
  color: var(--accent);
}

.job-company a:hover svg {
  color: var(--accent);
  transform: translate(2px, -2px);
}

.job-role {
  margin-top: 8px;
  font-weight: 500;
  font-size: 1.02rem;
}

.job-note {
  color: var(--text-subtle);
}

.job-bullets {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 46em;
  color: var(--text-muted);
  font-size: 0.97rem;
}

.job-bullets li {
  position: relative;
  padding-left: 22px;
}

.job-bullets li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--accent);
}

.job-tags,
.spec-items,
.proj-meta dd {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: 10px;
  row-gap: 2px;
}

.job-tags {
  margin-top: 18px;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--text-subtle);
}

/* Listas separadas por barras: la barra queda al final de cada línea */
.job-tags span:not(:last-child)::after,
.spec-items span:not(:last-child)::after,
.proj-meta dd span:not(:last-child)::after {
  content: "/";
  margin-left: 10px;
  color: var(--accent);
  opacity: 0.7;
}

.spec-items span:not(:last-child)::after {
  margin-left: 12px;
}

/* ---------- Proyectos ---------- */
.projects {
  margin-top: 56px;
  border-bottom: 1px solid var(--border);
}

.proj {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 40px;
  padding: 40px 0;
  border-top: 1px solid var(--border);
}

.proj-idx {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--text-subtle);
}

.proj-idx span {
  color: var(--accent);
}

.proj-name {
  margin-top: 14px;
  font-weight: 800;
  font-stretch: 120%;
  font-size: clamp(1.8rem, 3.2vw, 2.6rem);
  line-height: 1;
  letter-spacing: -0.03em;
  transition: color 0.25s ease;
}

.proj:hover .proj-name {
  color: var(--accent);
}

.proj-kind {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.proj-summary {
  margin-top: 18px;
  color: var(--text-muted);
}

.proj-meta {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.proj-meta div {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 12px;
  font-size: 0.9rem;
}

.proj-meta dt {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-subtle);
  padding-top: 2px;
}

/* Enlaces oficiales (web + tiendas) */
.proj-links {
  margin-top: 24px;
}

.proj-links-label {
  margin-bottom: 10px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-subtle);
}

.proj-links ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.proj-links a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--border-strong);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 500;
  color: var(--text);
  transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.proj-links a svg {
  width: 12px;
  height: 12px;
  color: var(--text-subtle);
  transition: transform 0.25s ease, color 0.2s ease;
}

.proj-links a:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.proj-links a:hover svg {
  color: currentColor;
  transform: translate(2px, -2px);
}

.proj-links a.proj-link {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}

.proj-links a.proj-link svg {
  color: currentColor;
}

.proj-links a.proj-link:hover {
  background: var(--text);
  border-color: var(--text);
  color: var(--bg);
}

.proj-fig figcaption {
  margin-top: 10px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 6px 16px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-subtle);
}

.fig-frame {
  position: relative;
  aspect-ratio: 16 / 10;
  padding: 18px;
  border: 1px solid var(--border);
  background:
    radial-gradient(circle at 1px 1px, var(--fig-dot) 1px, transparent 0) 0 0 / 14px 14px,
    var(--fig-bg);
}

.fig-frame::before,
.fig-frame::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  border-color: var(--accent);
  border-style: solid;
}

.fig-frame::before {
  top: -1px;
  left: -1px;
  border-width: 2px 0 0 2px;
}

.fig-frame::after {
  right: -1px;
  bottom: -1px;
  border-width: 0 2px 2px 0;
}

.fig-frame svg {
  width: 100%;
  height: 100%;
  transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.proj:hover .fig-frame svg {
  transform: scale(1.04);
}

/* Galería de capturas reales */
.fig-frame.is-photo {
  padding: 0;
  background: #000;
}

.fig-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: filter 0.3s ease;
}

.proj:hover .fig-img {
  filter: brightness(1.06);
}

.fig-alt {
  flex: 1 1 260px;
  min-width: 0;
}

.fig-thumbs {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.fig-thumb {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #000;
  opacity: 0.5;
  transition: opacity 0.2s ease, border-color 0.2s ease;
}

.fig-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.fig-thumb:hover {
  opacity: 0.85;
}

.fig-thumb.is-active {
  opacity: 1;
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
}

/* Formas de las ilustraciones (trazo técnico + acento) */
.a-panel {
  fill: var(--art-panel);
  stroke: var(--art-stroke);
  stroke-width: 1.4;
}

.a-muted {
  fill: var(--art-muted);
}

.a-soft {
  fill: var(--accent-soft-strong);
}

.a-accent {
  fill: var(--accent);
}

.a-knock {
  fill: var(--art-panel);
}

.a-op {
  opacity: 0.35;
}

.a-wheel {
  fill: var(--art-panel);
  stroke: var(--art-stroke);
  stroke-width: 3;
}

.a-chip {
  fill: var(--art-chip);
}

.a-line {
  fill: none;
  stroke: var(--art-line);
  stroke-width: 2.5;
  stroke-linecap: round;
}

.a-dashed {
  stroke-dasharray: 3 6;
  stroke-width: 2;
}

.a-dashed-wide {
  stroke-dasharray: 18 16;
}

.a-route {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2;
  stroke-dasharray: 5 7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.a-check {
  fill: none;
  stroke: var(--art-panel);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- Habilidades (tabla de especificaciones) ---------- */
.spec {
  margin-top: 56px;
  border-bottom: 1px solid var(--border);
}

.spec-row {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 24px;
  padding: 24px 0;
  border-top: 1px solid var(--border);
}

.spec-row dt {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-subtle);
  padding-top: 6px;
}

.spec-items {
  column-gap: 12px;
  row-gap: 4px;
  font-weight: 600;
  font-stretch: 108%;
  font-size: clamp(1.1rem, 1.8vw, 1.4rem);
  letter-spacing: -0.01em;
}

.spec-items span {
  transition: color 0.2s ease;
}

.spec-items span:hover {
  color: var(--accent);
}

.spec-edu {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.spec-edu strong,
.spec-langs strong {
  font-weight: 650;
  font-stretch: 108%;
  font-size: clamp(1.1rem, 1.8vw, 1.4rem);
  letter-spacing: -0.01em;
}

.spec-edu span {
  color: var(--text-muted);
}

.spec-date {
  font-family: var(--font-mono);
  font-size: 0.78rem;
}

.spec-langs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 40px;
}

.spec-langs span {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
}

.spec-langs strong {
  font-family: var(--font-sans);
  color: var(--text);
}

/* ---------- Contacto ---------- */
.contact {
  border-bottom: 0;
}

.contact-title {
  font-weight: 800;
  font-stretch: 125%;
  font-size: clamp(2.3rem, 6.6vw, 6rem);
  overflow-wrap: break-word;
  line-height: 0.9;
  letter-spacing: -0.04em;
  text-transform: uppercase;
}

.contact-text {
  margin-top: 28px;
  max-width: 34em;
  color: var(--text-muted);
  font-size: 1.08rem;
}

/* Contacto directo: correo y WhatsApp */
.contact-direct {
  margin-top: 40px;
  border-top: 1px solid var(--border);
}

.direct-row {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  align-items: baseline;
  gap: 14px 24px;
  padding: 22px 0;
  border-bottom: 1px solid var(--border);
}

.direct-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-subtle);
}

.direct-value {
  font-weight: 650;
  font-stretch: 110%;
  font-size: clamp(1.2rem, 2.5vw, 1.9rem);
  letter-spacing: -0.02em;
  line-height: 1.2;
  overflow-wrap: anywhere;
  transition: color 0.2s ease;
}

.direct-value:hover {
  color: var(--accent);
}

.direct-actions {
  grid-column: 2;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.btn-sm {
  height: 40px;
  padding: 0 14px;
  gap: 10px;
  font-size: 0.85rem;
}

.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 14px;
  border: 1px solid var(--border-strong);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--text-muted);
  transition: color 0.2s ease, border-color 0.2s ease;
}

.copy-btn svg {
  width: 14px;
  height: 14px;
}

.copy-btn:hover {
  color: var(--text);
  border-color: var(--text);
}

.copy-btn.is-copied {
  color: var(--green);
  border-color: var(--green);
}

.contact-links {
  margin-top: 40px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.contact-links li + li {
  border-left: 1px solid var(--border);
}

.contact-links a {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  height: 100%;
  padding: 22px 44px 22px 20px;
  transition: background-color 0.2s ease;
}

.contact-links li:first-child a {
  padding-left: 0;
}

.contact-links a:hover {
  background: var(--accent-soft);
}

.cl-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-subtle);
}

.cl-value {
  font-weight: 600;
  font-size: 1.05rem;
  overflow-wrap: anywhere;
}

.cl-arrow {
  position: absolute;
  top: 22px;
  right: 16px;
  color: var(--text-subtle);
  transition: color 0.2s ease, transform 0.25s ease;
}

.contact-links a:hover .cl-arrow {
  color: var(--accent);
  transform: translate(2px, -2px);
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 24px 0;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--text-subtle);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 28px;
}

.footer-contact a {
  color: var(--text-muted);
  transition: color 0.2s ease;
}

.footer-contact a:hover {
  color: var(--accent);
}

/* ---------- Barra flotante de contacto ---------- */
.quick-contact {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 40;
  display: flex;
  gap: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
}

.quick-contact.is-visible {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.qc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  height: 48px;
  padding: 0 18px;
  border: 1px solid var(--border-strong);
  background: var(--bg);
  color: var(--text);
  font-weight: 600;
  font-size: 0.9rem;
  box-shadow: 0 14px 30px -14px rgba(0, 0, 0, 0.55);
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.qc-btn svg {
  width: 18px;
  height: 18px;
}

.qc-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.qc-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}

.qc-primary:hover {
  background: var(--text);
  border-color: var(--text);
  color: var(--bg);
}

.footer-time .clock {
  color: var(--text);
}

.footer-top {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
}

.footer-top:hover {
  color: var(--accent);
}

.footer-top svg {
  width: 14px;
  height: 14px;
}

/* ---------- Aparición al hacer scroll ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 40px;
  }

  :root {
    --label-col: 150px;
  }

  .job {
    grid-template-columns: 160px minmax(0, 1fr);
  }

  .spec-row {
    grid-template-columns: 180px minmax(0, 1fr);
  }
}

@media (max-width: 960px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 56px;
    padding-bottom: 72px;
  }

  .section {
    padding: 88px 0;
  }

  .section-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  .section-label {
    position: static;
  }

  .proj {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }

  .proj-fig {
    order: -1;
  }

}

@media (max-width: 860px) {
  .menu-toggle {
    display: inline-flex;
  }

  .nav-actions {
    border-left: 0;
    padding-left: 0;
  }

  .nav-links {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    bottom: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 16px 24px 32px;
    background: var(--bg);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s;
    overflow-y: auto;
  }

  .menu-open .nav-links {
    opacity: 1;
    visibility: visible;
  }

  .nav-links li {
    border-bottom: 1px solid var(--border);
  }

  .nav-links a {
    display: flex;
    align-items: baseline;
    gap: 16px;
    padding: 18px 0;
    font-weight: 800;
    font-stretch: 122%;
    font-size: clamp(1.8rem, 8vw, 2.6rem);
    letter-spacing: -0.03em;
    text-transform: uppercase;
    color: var(--text);
  }

  .nav-links a::after {
    display: none;
  }

  .nav-num {
    font-size: 0.8rem;
    color: var(--accent);
  }
}

@media (max-width: 720px) {
  .container {
    padding: 0 16px;
  }

  .brand-handle,
  .hide-sm {
    display: none;
  }

  .nav {
    gap: 16px;
  }

  .nav-actions {
    gap: 14px;
  }

  .hero-grid {
    padding-top: 40px;
  }

  .hero-ctas .btn {
    flex: 1 1 200px;
  }

  .section {
    padding: 72px 0;
  }

  .statement {
    margin-top: 28px;
  }

  .services {
    grid-template-columns: minmax(0, 1fr);
    margin-top: 44px;
  }

  .jobs,
  .projects,
  .spec {
    margin-top: 40px;
  }

  .job {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
    padding: 28px 0;
  }

  .job-when {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 4px 14px;
    padding-top: 0;
  }

  .spec-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    padding: 20px 0;
  }

  .spec-row dt {
    padding-top: 0;
  }

  .fig-frame {
    padding: 12px;
  }

  .contact-links {
    grid-template-columns: minmax(0, 1fr);
  }

  .direct-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  .direct-actions {
    grid-column: 1;
    margin-top: 6px;
  }

  .direct-actions .btn-sm {
    flex: 1 1 auto;
  }

  .quick-contact {
    left: 16px;
    right: 16px;
    bottom: 16px;
  }

  .qc-btn {
    flex: 1 1 0;
  }

  .site-footer {
    padding-bottom: 88px;
  }

  .contact-links li + li {
    border-left: 0;
    border-top: 1px solid var(--border);
  }

  .contact-links li a {
    padding-left: 0;
  }

  .mq-item {
    font-size: 1.05rem;
    padding: 11px 0;
  }

  .contact-title {
    font-stretch: 112%;
  }

  .mq-sep {
    padding: 0 16px;
  }
}

@media (max-width: 420px) {
  .menu-word {
    display: none;
  }

  .receipt-clip {
    margin-left: 14px;
    margin-right: 14px;
  }

  .receipt {
    padding-left: 16px;
    padding-right: 16px;
    font-size: 0.7rem;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .marquee-track {
    animation: none;
  }

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