/* =============================================================
   Julian Gaviria — portafolio
   1. Tokens
   ============================================================= */
:root {
  --bg:        #0a0907;
  --bg-2:      #0f0d0a;
  --bg-3:      #141109;
  --cream:     #f4efe6;
  --muted:     #a9a096;
  --muted-2:   #7e776d;
  --gold:      #d4a656;
  --gold-2:    #eac98c;
  --gold-deep: #8a6a2f;
  --line:      rgba(212, 166, 86, .14);
  --line-2:    rgba(244, 239, 230, .08);
  --card:      rgba(244, 239, 230, .028);
  --card-2:    rgba(244, 239, 230, .05);

  --serif: "Fraunces", "Iowan Old Style", Georgia, serif;
  --sans:  "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono:  "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --ease-out:   cubic-bezier(.16, 1, .3, 1);
  --ease-soft:  cubic-bezier(.25, .46, .45, .94);
  --ease-bounce: cubic-bezier(.34, 1.56, .64, 1);

  --wrap: 1240px;
  --pad: clamp(1.15rem, 4vw, 3rem);
  --nav-h: 72px;
}

/* =============================================================
   2. Reset & base
   ============================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; }
html {
  -webkit-text-size-adjust: 100%;
  tab-size: 2;
  overflow-x: clip;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 16px);
}
body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  font-weight: 300;
  color: var(--cream);
  background: var(--bg);
  overflow-x: clip;
  overscroll-behavior-y: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg, video, iframe { display: block; max-width: 100%; }
img { height: auto; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
a { color: inherit; text-decoration: none; }
p { text-wrap: pretty; }
h1, h2, h3, h4 { text-wrap: balance; line-height: 1.04; letter-spacing: -.025em; font-weight: 400; }
ul, ol { list-style: none; padding: 0; }
::selection { background: var(--gold); color: #12100c; }

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 4px;
}

/* =============================================================
   3. Utilities
   ============================================================= */
.skip-link {
  position: fixed; top: -100px; left: 1rem; z-index: 9999;
  padding: .6rem 1rem; background: var(--cream); color: var(--bg);
  border-radius: 8px; font-weight: 500;
}
.skip-link:focus { top: 1rem; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--pad);
}

.section { padding-block: clamp(5rem, 12vw, 9.5rem); position: relative; }

.kicker {
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.1rem;
}

.h2 {
  font-family: var(--serif);
  font-size: clamp(2.1rem, 5.4vw, 4rem);
  font-weight: 300;
  letter-spacing: -.03em;
}
.h2 em { font-style: italic; color: var(--gold-2); font-weight: 300; }

.lead {
  font-size: clamp(1.15rem, 2.1vw, 1.4rem);
  line-height: 1.55;
  color: var(--cream);
}

.section-head { max-width: 46rem; margin-bottom: clamp(2.8rem, 6vw, 4.5rem); }
.section-head-c { margin-inline: auto; text-align: center; }
.section-sub { color: var(--muted); margin-top: 1.4rem; font-size: 1.05rem; max-width: 38rem; }
.section-head-c .section-sub { margin-inline: auto; }

/* Reveal ---------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .9s var(--ease-out), transform .9s var(--ease-out);
}
.reveal.is-visible { opacity: 1; transform: none; }
.reveal[data-split] { opacity: 1; transform: none; }

/* =============================================================
   4. Living background (signature)
   ============================================================= */
.aurora {
  position: fixed; inset: 0; z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(52vw 42vw at var(--mx, 50%) var(--my, 38%),
      rgba(212, 166, 86, .17), transparent 62%),
    radial-gradient(44vw 38vw at calc(var(--mx, 50%) + 16%) calc(var(--my, 38%) + 20%),
      rgba(150, 95, 40, .13), transparent 60%),
    radial-gradient(60vw 48vw at calc(var(--mx, 50%) - 20%) calc(var(--my, 38%) - 14%),
      rgba(94, 78, 130, .10), transparent 64%),
    radial-gradient(80vw 60vw at 50% 0%, rgba(40, 32, 20, .5), transparent 70%),
    var(--bg);
  transition: background-position .3s linear;
}
/* Capa que gira lentamente. Dos cuidados deliberados:
   · los tramos "vacíos" usan el MISMO color con alfa 0 (interpolar hacia
     `transparent` pasa por negro y dibuja una costura dura en diagonal);
   · inset muy negativo + borde redondo para que al girar no asomen esquinas. */
.aurora::after {
  content: "";
  position: absolute; inset: -60%;
  border-radius: 50%;
  background:
    conic-gradient(from 0deg at 50% 50%,
      rgba(212, 166, 86, .07)   0deg,
      rgba(212, 166, 86, 0)    72deg,
      rgba(94, 78, 130, .06)  144deg,
      rgba(94, 78, 130, 0)    216deg,
      rgba(212, 166, 86, .05) 288deg,
      rgba(212, 166, 86, .07) 360deg);
  animation: auroraSpin 60s linear infinite;
}
@keyframes auroraSpin { to { transform: rotate(360deg); } }

.grain {
  position: fixed; inset: -100%; z-index: -1;
  pointer-events: none; opacity: .3;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.42'/%3E%3C/svg%3E");
  animation: grainShift 8s steps(6) infinite;
}
@keyframes grainShift {
  0%   { transform: translate(0, 0); }
  20%  { transform: translate(-3%, 2%); }
  40%  { transform: translate(2%, -3%); }
  60%  { transform: translate(-2%, -2%); }
  80%  { transform: translate(3%, 1%); }
  100% { transform: translate(0, 0); }
}

.progress {
  position: fixed; top: 0; left: 0; z-index: 200;
  height: 2px; width: 0%;
  background: linear-gradient(90deg, var(--gold-deep), var(--gold), var(--gold-2));
  box-shadow: 0 0 14px rgba(212, 166, 86, .5);
  transition: width .12s linear;
}

/* Splash ---------------------------------------------------- */
.splash {
  position: fixed; inset: 0; z-index: 500;
  display: grid; place-items: center;
  background: var(--bg);
  animation: splashSafety .01s 4.5s forwards;
}
.splash-mark {
  font-family: var(--serif);
  font-size: clamp(2.4rem, 8vw, 4.5rem);
  letter-spacing: .06em;
  color: var(--gold);
  opacity: .0;
  animation: splashMark 1.6s var(--ease-out) forwards;
}
@keyframes splashMark {
  0%   { opacity: 0; letter-spacing: .45em; }
  40%  { opacity: 1; }
  100% { opacity: 1; letter-spacing: .06em; }
}
.splash.is-out {
  opacity: 0; pointer-events: none;
  clip-path: inset(0 0 100% 0);
  transition: opacity .7s var(--ease-out), clip-path .9s var(--ease-out);
}
@keyframes splashSafety {
  to { opacity: 0; pointer-events: none; clip-path: inset(0 0 100% 0); }
}

/* =============================================================
   5. Components
   ============================================================= */
.btn {
  display: inline-flex; align-items: center; gap: .55rem;
  padding: .9rem 1.6rem;
  border-radius: 100px;
  font-size: .92rem; font-weight: 500; letter-spacing: .01em;
  border: 1px solid transparent;
  transition: transform .45s var(--ease-out), box-shadow .45s var(--ease-out),
              background-color .35s var(--ease-out), border-color .35s var(--ease-out),
              color .35s var(--ease-out);
  will-change: transform;
}
.btn i { font-style: normal; transition: transform .4s var(--ease-out); }
.btn:hover i { transform: translate(3px, -3px); }

.btn-gold {
  background: linear-gradient(135deg, var(--gold-2), var(--gold));
  color: #16120a;
  box-shadow: 0 6px 22px rgba(212, 166, 86, .22);
}
.btn-gold:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 38px rgba(212, 166, 86, .34);
}
.btn-ghost {
  border-color: var(--line);
  color: var(--cream);
  background: rgba(244, 239, 230, .02);
}
.btn-ghost:hover {
  transform: translateY(-3px);
  border-color: rgba(212, 166, 86, .45);
  background: rgba(212, 166, 86, .07);
}
.btn-sm { padding: .55rem 1.1rem; font-size: .84rem; border: 1px solid var(--line); }
.btn-sm:hover { border-color: rgba(212, 166, 86, .5); background: rgba(212, 166, 86, .08); }

/* =============================================================
   6. Nav
   ============================================================= */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 300;
  height: var(--nav-h);
  transition: background-color .5s var(--ease-out), border-color .5s var(--ease-out),
              backdrop-filter .5s var(--ease-out);
  border-bottom: 1px solid transparent;
}
.nav.is-stuck {
  background: rgba(10, 9, 7, .72);
  border-bottom-color: var(--line-2);
}
@supports (backdrop-filter: blur(14px)) {
  .nav.is-stuck { background: rgba(10, 9, 7, .55); backdrop-filter: blur(16px) saturate(150%); }
}
.nav-inner {
  height: 100%;
  max-width: var(--wrap); margin-inline: auto;
  padding-inline: var(--pad);
  display: flex; align-items: center; gap: 1.4rem;
}
.nav-brand { display: flex; align-items: center; gap: .65rem; margin-right: auto; }
.nav-brand-mark {
  display: grid; place-items: center;
  width: 34px; height: 34px; flex: none;
  border: 1px solid var(--line);
  border-radius: 9px;
  font-family: var(--serif); font-size: .82rem; letter-spacing: .04em;
  color: var(--gold);
  background: rgba(212, 166, 86, .06);
}
.nav-brand-text { font-size: .95rem; font-weight: 400; letter-spacing: -.01em; }

.nav-links { display: none; gap: 1.7rem; }
.nav-links a {
  font-size: .88rem; color: var(--muted);
  position: relative; padding-block: 4px;
  transition: color .35s var(--ease-out);
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  height: 1px; width: 100%;
  background: var(--gold);
  transform: scaleX(0); transform-origin: right;
  transition: transform .45s var(--ease-out);
}
.nav-links a:hover { color: var(--cream); }
.nav-links a:hover::after { transform: scaleX(1); transform-origin: left; }
.nav-links a.is-active { color: var(--gold-2); }

.nav .btn-sm { display: none; }

.nav-burger {
  width: 40px; height: 40px; flex: none;
  display: grid; place-content: center; gap: 6px;
  border: 1px solid var(--line); border-radius: 10px;
}
.nav-burger span {
  display: block; width: 17px; height: 1.5px;
  background: var(--cream); border-radius: 2px;
  transition: transform .45s var(--ease-out), opacity .3s;
}
.nav-burger[aria-expanded="true"] span:first-child { transform: translateY(3.75px) rotate(45deg); }
.nav-burger[aria-expanded="true"] span:last-child { transform: translateY(-3.75px) rotate(-45deg); }

.menu {
  position: fixed; inset: 0; z-index: 250;
  background: rgba(8, 7, 5, .97);
  display: flex; flex-direction: column; justify-content: center;
  padding: var(--nav-h) var(--pad) 3rem;
  opacity: 0; pointer-events: none;
  transition: opacity .45s var(--ease-out);
}
@supports (backdrop-filter: blur(14px)) {
  .menu { background: rgba(8, 7, 5, .88); backdrop-filter: blur(20px); }
}
.menu.is-open { opacity: 1; pointer-events: auto; }
.menu-links { display: flex; flex-direction: column; gap: .3rem; }
.menu-links a {
  font-family: var(--serif);
  font-size: clamp(1.9rem, 8vw, 2.8rem);
  font-weight: 300; letter-spacing: -.03em;
  padding-block: .3rem;
  opacity: 0; transform: translateY(16px);
  transition: opacity .5s var(--ease-out), transform .5s var(--ease-out), color .3s;
}
.menu.is-open .menu-links a { opacity: 1; transform: none; }
.menu-links a:nth-child(1) { transition-delay: .06s; }
.menu-links a:nth-child(2) { transition-delay: .1s; }
.menu-links a:nth-child(3) { transition-delay: .14s; }
.menu-links a:nth-child(4) { transition-delay: .18s; }
.menu-links a:nth-child(5) { transition-delay: .22s; }
.menu-links a:nth-child(6) { transition-delay: .26s; }
.menu-links a:nth-child(7) { transition-delay: .3s; }
.menu-links a:hover { color: var(--gold-2); }
.menu-foot {
  margin-top: 2.6rem; padding-top: 1.6rem;
  border-top: 1px solid var(--line-2);
  display: flex; flex-direction: column; gap: .4rem;
  font-family: var(--mono); font-size: .82rem; color: var(--muted);
}

/* =============================================================
   7. Hero
   ============================================================= */
.hero {
  position: relative;
  min-height: 100vh; min-height: 100svh;
  display: flex; align-items: center;
  padding-top: calc(var(--nav-h) + 3rem);
  padding-bottom: 5rem;
}
.hero-inner {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
}

.hero-title {
  font-family: var(--serif);
  font-size: clamp(3.3rem, 12.5vw, 10.5rem);
  font-weight: 300;
  letter-spacing: -.045em;
  line-height: .92;
  margin-block: .6rem 1.5rem;
}
/* El degradado se aplica a cada letra: así el clip de texto no anula
   la animación de entrada (invariante A.4.5 aplicada al split). */
.hero-title,
.hero-title .split-char {
  background: linear-gradient(176deg, var(--cream) 22%, #bfb19b 74%, var(--gold-deep) 122%);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
/* Una vez partido, el padre deja de pintar para no revelar todo de golpe. */
.hero-title.is-split { background: none; }
.hero-title .split-char {
  display: inline-block;
  opacity: 0;
  transform: translateY(.42em) rotate(4deg);
}
.hero-title.is-split-in .split-char {
  opacity: 1; transform: none;
  transition: opacity .8s var(--ease-out), transform .9s var(--ease-out);
}

.hero-roles {
  display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem;
  font-family: var(--mono);
  font-size: clamp(.72rem, 1.5vw, .86rem);
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--cream);
  margin-bottom: 2rem;
}
.hero-roles em { color: var(--gold); font-style: normal; }

.hero-lead {
  max-width: 40rem;
  font-size: clamp(1.02rem, 1.9vw, 1.22rem);
  line-height: 1.7;
  color: var(--muted);
  margin-bottom: 2.4rem;
}
.hero-lead strong { color: var(--cream); font-weight: 400; }

.hero-cta { display: flex; flex-wrap: wrap; gap: .8rem; }

/* Panel de contexto — ancla la composición a la derecha en escritorio
   y en móvil simplemente fluye debajo. */
.hero-panel {
  margin-top: 2.6rem;
  padding: 1.5rem 1.5rem 1.3rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    radial-gradient(120% 80% at 100% 0%, rgba(212, 166, 86, .1), transparent 60%),
    rgba(244, 239, 230, .028);
}
.hero-flag {
  display: flex; align-items: center; gap: 1.1rem;
  padding-bottom: 1.3rem;
  border-bottom: 1px solid var(--line-2);
}
.hero-flag-num {
  font-family: var(--serif);
  font-size: clamp(2.6rem, 7vw, 3.4rem);
  line-height: 1; color: var(--gold-2);
  font-variant-numeric: tabular-nums;
}
.hero-flag-txt {
  font-size: .86rem; line-height: 1.45; color: var(--muted);
  border-left: 1px solid var(--line); padding-left: 1.1rem;
}

.hero-facts { display: grid; gap: .95rem; padding-block: 1.3rem; }
.hero-facts dt {
  font-family: var(--mono); font-size: .6rem;
  letter-spacing: .22em; text-transform: uppercase;
  color: var(--gold); margin-bottom: .2rem;
}
.hero-facts dd { font-size: .9rem; line-height: 1.4; color: var(--cream); }

.hero-status {
  display: flex; align-items: center; gap: .6rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--line-2);
  font-family: var(--mono); font-size: .68rem;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted);
}
.hero-dot {
  width: 7px; height: 7px; flex: none;
  border-radius: 50%; background: #6fd08a;
  box-shadow: 0 0 0 0 rgba(111, 208, 138, .55);
  animation: dotPulse 2.4s var(--ease-soft) infinite;
}
@keyframes dotPulse {
  0%   { box-shadow: 0 0 0 0 rgba(111, 208, 138, .5); }
  70%  { box-shadow: 0 0 0 7px rgba(111, 208, 138, 0); }
  100% { box-shadow: 0 0 0 0 rgba(111, 208, 138, 0); }
}

.hero-scroll {
  position: absolute; bottom: 1.6rem; left: 50%;
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: .6rem;
  font-family: var(--mono); font-size: .62rem;
  letter-spacing: .3em; text-transform: uppercase;
  color: var(--muted-2);
}
.hero-scroll i {
  display: block; width: 1px; height: 42px;
  background: linear-gradient(var(--gold), transparent);
  animation: scrollPulse 2.6s var(--ease-soft) infinite;
  transform-origin: top;
}
@keyframes scrollPulse {
  0%, 100% { transform: scaleY(.35); opacity: .4; }
  50%      { transform: scaleY(1);   opacity: 1; }
}

/* =============================================================
   8. Stats
   ============================================================= */
.stats {
  border-block: 1px solid var(--line-2);
  background: linear-gradient(180deg, rgba(244, 239, 230, .022), transparent);
  padding-block: clamp(2.6rem, 6vw, 4rem);
}
.stats-grid {
  display: grid; gap: 2.2rem 1.5rem;
  grid-template-columns: repeat(2, 1fr);
}
.stat { display: flex; flex-direction: column; gap: .45rem; }
.stat-num {
  font-family: var(--serif);
  font-size: clamp(2rem, 5vw, 3.1rem);
  line-height: 1; color: var(--gold-2);
  font-variant-numeric: tabular-nums;
}
.stat-lbl {
  font-size: .84rem; line-height: 1.45; color: var(--muted);
  max-width: 15rem;
}

/* =============================================================
   9. Origen
   ============================================================= */
.origen-grid { display: grid; gap: clamp(2.4rem, 5vw, 4.5rem); }
.origen-body p { color: var(--muted); margin-bottom: 1.3rem; font-size: 1.02rem; }
.origen-body p:last-child { margin-bottom: 0; }
.origen-body strong { color: var(--cream); font-weight: 500; }
.origen-body .lead { color: var(--cream); margin-bottom: 1.8rem; }

.origen-card {
  margin-top: 2.2rem;
  padding: 1.5rem 1.6rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
}
.origen-card-lbl {
  display: block;
  font-family: var(--mono); font-size: .64rem;
  letter-spacing: .22em; text-transform: uppercase;
  color: var(--gold); margin-bottom: .25rem;
}
.origen-card p { color: var(--cream); font-size: .96rem; margin-bottom: 1.1rem; }
.origen-card p:last-child { margin-bottom: 0; }

/* =============================================================
   10. Proyectos
   ============================================================= */
.proj {
  position: relative;
  border: 1px solid var(--line-2);
  border-radius: 20px;
  background: var(--card);
  padding: 1.7rem 1.6rem;
  overflow: hidden;
  transition: border-color .5s var(--ease-out), background-color .5s var(--ease-out),
              transform .5s var(--ease-out), box-shadow .5s var(--ease-out);
}
.proj::before {
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  background: radial-gradient(24rem 18rem at var(--px, 50%) var(--py, 0%),
    rgba(212, 166, 86, .13), transparent 70%);
  opacity: 0;
  transition: opacity .5s var(--ease-out);
  pointer-events: none;
}
.proj:hover {
  border-color: rgba(212, 166, 86, .34);
  background: var(--card-2);
  box-shadow: 0 20px 50px rgba(0, 0, 0, .35);
}
.proj:hover::before { opacity: 1; }

.proj-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; margin-bottom: 1.3rem;
}
.proj-head img { width: 46px; height: 46px; object-fit: contain; }
.proj-mark {
  display: grid; place-items: center;
  width: 46px; height: 46px;
  border: 1px solid var(--line); border-radius: 12px;
  font-family: var(--serif); font-size: 1.3rem; color: var(--gold-2);
  background: rgba(212, 166, 86, .05);
}
.proj-badge {
  font-family: var(--mono); font-size: .6rem;
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--gold);
  padding: .3rem .6rem;
  border: 1px solid var(--line); border-radius: 100px;
  white-space: nowrap;
}
.proj-title {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 3vw, 1.95rem);
  font-weight: 300; margin-bottom: .5rem;
}
.proj-tag {
  font-family: var(--mono); font-size: .68rem;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 1rem;
}
.proj-desc { color: var(--muted); font-size: .94rem; line-height: 1.62; margin-bottom: 1.3rem; }

.proj-points { display: grid; gap: .55rem; margin-bottom: 1.4rem; }
.proj-points li {
  position: relative; padding-left: 1.2rem;
  color: var(--muted); font-size: .92rem; line-height: 1.55;
}
.proj-points li::before {
  content: ""; position: absolute; left: 0; top: .62em;
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--gold);
}

.proj-stack { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1.3rem; }
.proj-stack span {
  font-family: var(--mono); font-size: .68rem;
  padding: .28rem .6rem;
  border: 1px solid var(--line-2); border-radius: 6px;
  color: var(--muted); background: rgba(244, 239, 230, .02);
}

.proj-links { display: flex; flex-wrap: wrap; gap: 1.2rem; align-items: center; margin-top: auto; }
.proj-links a {
  font-size: .86rem; font-weight: 500; color: var(--gold-2);
  display: inline-flex; align-items: center; gap: .35rem;
  border-bottom: 1px solid rgba(212, 166, 86, .28);
  padding-bottom: 2px;
  transition: border-color .35s var(--ease-out), color .35s;
}
.proj-links a i { font-style: normal; transition: transform .4s var(--ease-out); }
.proj-links a:hover { border-color: var(--gold); }
.proj-links a:hover i { transform: translate(3px, -3px); }
.proj-role { font-family: var(--mono); font-size: .68rem; color: var(--muted-2); letter-spacing: .06em; }

/* Featured */
.proj-feat {
  display: grid; gap: 2rem;
  padding: clamp(1.7rem, 4vw, 3rem);
  margin-bottom: 1.5rem;
  background: linear-gradient(140deg, rgba(212, 166, 86, .07), rgba(244, 239, 230, .02));
  border-color: var(--line);
}
.proj-feat-media {
  display: grid; place-items: center;
  padding: 2rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    radial-gradient(60% 60% at 50% 40%, rgba(212, 166, 86, .12), transparent 70%),
    rgba(10, 9, 7, .4);
}
.proj-feat-media img { width: min(150px, 45%); height: auto; }
.proj-feat .proj-title { font-size: clamp(2rem, 5vw, 3rem); }

.proj-grid { display: grid; gap: 1.5rem; }

/* =============================================================
   11. Timeline
   ============================================================= */
.tl-list { position: relative; display: grid; gap: 0; }
.tl-list::before {
  content: ""; position: absolute;
  left: 7px; top: .6rem; bottom: 3rem;
  width: 1px;
  background: linear-gradient(180deg, var(--gold), rgba(212, 166, 86, .2) 60%, transparent);
  transform: scaleY(var(--tl-progress, 0));
  transform-origin: top;
  transition: transform .5s linear;
}
.tl-item {
  position: relative;
  display: grid; gap: .35rem;
  padding: 0 0 2.6rem 2.4rem;
}
.tl-item::before {
  content: ""; position: absolute;
  left: 0; top: .5rem;
  width: 15px; height: 15px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--bg);
  transition: border-color .5s var(--ease-out), box-shadow .5s var(--ease-out), background-color .5s;
}
.tl-item.is-visible::before {
  border-color: rgba(212, 166, 86, .55);
}
.tl-hi::before {
  background: linear-gradient(135deg, var(--gold-2), var(--gold));
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(212, 166, 86, .12);
}
.tl-year {
  font-family: var(--mono);
  font-size: .74rem; letter-spacing: .16em;
  color: var(--gold);
}
.tl-year span { color: var(--muted-2); margin-inline: .2em; }
.tl-body h3 {
  font-family: var(--serif);
  font-size: clamp(1.2rem, 2.6vw, 1.55rem);
  font-weight: 300; margin-bottom: .45rem;
}
.tl-body p { color: var(--muted); font-size: .94rem; line-height: 1.6; max-width: 46rem; }

/* =============================================================
   12. Avales (marquee)
   ============================================================= */
.avales {
  padding-block: clamp(3rem, 7vw, 5rem);
  border-block: 1px solid var(--line-2);
  background: linear-gradient(180deg, transparent, rgba(212, 166, 86, .035), transparent);
  overflow: hidden;
}
.avales-lbl {
  text-align: center;
  font-family: var(--mono); font-size: .66rem;
  letter-spacing: .28em; text-transform: uppercase;
  color: var(--muted-2); margin-bottom: 1.8rem;
}
.avales-track {
  display: flex; width: max-content;
  animation: marquee 38s linear infinite;
}
.avales:hover .avales-track { animation-play-state: paused; }
.avales-row {
  display: flex; align-items: center; gap: 2.2rem;
  padding-right: 2.2rem;
  white-space: nowrap;
}
.avales-row span {
  font-family: var(--serif);
  font-size: clamp(1.05rem, 2.4vw, 1.55rem);
  font-weight: 300; color: rgba(244, 239, 230, .55);
  letter-spacing: -.01em;
}
.avales-row i { color: var(--gold); font-style: normal; opacity: .7; }
@keyframes marquee { to { transform: translateX(-50%); } }

.avales-quote {
  max-width: 46rem; margin: clamp(2.4rem, 6vw, 3.6rem) auto 0;
  padding-inline: var(--pad);
  text-align: center;
}
.avales-quote p {
  font-family: var(--serif);
  font-size: clamp(1.05rem, 2.4vw, 1.4rem);
  font-style: italic; font-weight: 300;
  line-height: 1.55; color: var(--cream);
  margin-bottom: 1rem;
}
.avales-quote cite {
  font-family: var(--mono); font-style: normal;
  font-size: .7rem; letter-spacing: .12em;
  color: var(--muted-2);
}

/* =============================================================
   13. Canal
   ============================================================= */
.canal-grid { display: grid; gap: clamp(2rem, 5vw, 3.5rem); align-items: center; }
.canal-aside p { color: var(--muted); margin-block: 1.4rem 1.8rem; max-width: 32rem; }
.canal-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 26px 70px rgba(0, 0, 0, .5), 0 0 0 1px rgba(212, 166, 86, .06);
}
.canal-frame iframe { width: 100%; height: 100%; border: 0; }

/* =============================================================
   14. Manifiesto
   ============================================================= */
.mani-grid { display: grid; gap: 1.2rem; }
.mani-card {
  position: relative;
  padding: 1.8rem 1.6rem;
  border: 1px solid var(--line-2);
  border-radius: 18px;
  background: var(--card);
  transition: border-color .5s var(--ease-out), background-color .5s var(--ease-out),
              transform .5s var(--ease-out);
}
.mani-card:hover {
  border-color: rgba(212, 166, 86, .3);
  background: var(--card-2);
  transform: translateY(-4px);
}
.mani-num {
  display: block;
  font-family: var(--mono); font-size: .72rem;
  letter-spacing: .2em; color: var(--gold);
  margin-bottom: 1rem;
}
.mani-card h3 {
  font-family: var(--serif);
  font-size: clamp(1.1rem, 2.3vw, 1.32rem);
  font-weight: 300; line-height: 1.32;
  margin-bottom: .8rem;
}
.mani-card p { color: var(--muted); font-size: .92rem; line-height: 1.6; }
.mani-card-end {
  background: linear-gradient(140deg, rgba(212, 166, 86, .1), rgba(244, 239, 230, .02));
  border-color: var(--line);
}
.mani-card-end h3 { color: var(--gold-2); }

/* =============================================================
   15. Stack
   ============================================================= */
.stack-grid { display: grid; gap: 2.2rem 2rem; }
.stack-h {
  font-family: var(--mono); font-size: .68rem;
  letter-spacing: .22em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 1rem;
  padding-bottom: .7rem;
  border-bottom: 1px solid var(--line-2);
}
.chips { display: flex; flex-wrap: wrap; gap: .45rem; }
.chips li {
  font-size: .84rem;
  padding: .42rem .8rem;
  border: 1px solid var(--line-2); border-radius: 100px;
  color: var(--muted);
  background: rgba(244, 239, 230, .022);
  transition: color .35s var(--ease-out), border-color .35s var(--ease-out),
              background-color .35s var(--ease-out), transform .35s var(--ease-out);
}
.chips li:hover {
  color: var(--cream);
  border-color: rgba(212, 166, 86, .4);
  background: rgba(212, 166, 86, .08);
  transform: translateY(-2px);
}

/* =============================================================
   16. Contacto
   ============================================================= */
.contacto-grid { display: grid; gap: 1.2rem; max-width: 60rem; margin-inline: auto; }
.ctc {
  position: relative;
  display: grid; gap: .5rem;
  padding: clamp(1.8rem, 4vw, 2.6rem);
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--card);
  overflow: hidden;
  transition: border-color .5s var(--ease-out), background-color .5s var(--ease-out),
              transform .5s var(--ease-out), box-shadow .5s var(--ease-out);
}
.ctc::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(20rem 14rem at 50% 0%, rgba(212, 166, 86, .14), transparent 70%);
  opacity: 0; transition: opacity .5s var(--ease-out);
}
.ctc:hover {
  border-color: rgba(212, 166, 86, .45);
  transform: translateY(-4px);
  box-shadow: 0 22px 55px rgba(0, 0, 0, .4);
}
.ctc:hover::before { opacity: 1; }
.ctc > * { position: relative; }
.ctc-lbl {
  font-family: var(--mono); font-size: .66rem;
  letter-spacing: .22em; text-transform: uppercase;
  color: var(--gold);
}
.ctc-val {
  font-family: var(--serif);
  font-size: clamp(1.25rem, 3.2vw, 1.85rem);
  font-weight: 300; letter-spacing: -.02em;
  word-break: break-word;
}
.ctc-note { color: var(--muted); font-size: .9rem; line-height: 1.55; margin-top: .3rem; }
.ctc-go {
  margin-top: .9rem;
  font-size: .86rem; font-weight: 500; color: var(--gold-2);
  transition: transform .45s var(--ease-out);
  display: inline-block;
}
.ctc:hover .ctc-go { transform: translateX(5px); }

.contacto-extra {
  margin-top: 2.4rem; text-align: center;
  display: flex; flex-wrap: wrap; justify-content: center; gap: .9rem;
  font-family: var(--mono); font-size: .78rem; letter-spacing: .1em;
  color: var(--muted-2);
}
.contacto-extra a { color: var(--muted); transition: color .3s; }
.contacto-extra a:hover { color: var(--gold-2); }

/* =============================================================
   17. Footer
   ============================================================= */
.footer {
  border-top: 1px solid var(--line-2);
  padding-block: 2.6rem;
  background: rgba(0, 0, 0, .25);
}
.footer-inner { display: grid; gap: 1.6rem; }
.footer-brand { display: flex; align-items: center; gap: .9rem; }
.footer-brand div { display: grid; gap: .15rem; }
.footer-brand strong { font-weight: 500; font-size: .94rem; }
.footer-brand span { font-size: .8rem; color: var(--muted-2); }
.footer-meta {
  display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between;
  font-family: var(--mono); font-size: .72rem; color: var(--muted-2);
}
.footer-meta a { transition: color .3s; }
.footer-meta a:hover { color: var(--gold-2); }

/* =============================================================
   18. Responsive
   ============================================================= */
@media (min-width: 540px) {
  .stats-grid { gap: 2.4rem 2rem; }
  .footer-inner { grid-template-columns: 1fr auto; align-items: center; }
  .footer-meta { justify-content: flex-end; gap: 1.6rem; }
}

@media (min-width: 720px) {
  .proj-grid { grid-template-columns: repeat(2, 1fr); }
  .mani-grid { grid-template-columns: repeat(2, 1fr); }
  .stack-grid { grid-template-columns: repeat(2, 1fr); }
  .contacto-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: repeat(4, 1fr); }
  /* :not(.proj-feat) — si no, esta regla pisa el `display:grid` de la
     tarjeta destacada por venir más tarde en la hoja (misma especificidad). */
  .proj:not(.proj-feat) { display: flex; flex-direction: column; }
  .tl-item { grid-template-columns: 8.5rem 1fr; gap: 1.5rem; align-items: start; }
  .tl-year { padding-top: .3rem; }
}

@media (min-width: 960px) {
  :root { --nav-h: 80px; }
  .nav-links { display: flex; }
  .nav .btn-sm { display: inline-flex; }
  .nav-burger { display: none; }

  /* Hero: nombre y roles a todo lo ancho; texto a la izquierda y panel
     a la derecha, para que la composición no quede coja. */
  .hero-inner {
    grid-template-columns: minmax(0, 1.35fr) minmax(0, .65fr);
    column-gap: clamp(2.5rem, 5vw, 4.5rem);
    align-items: start;
  }
  .hero-inner > .kicker,
  .hero-title,
  .hero-roles { grid-column: 1 / -1; }
  .hero-left { grid-column: 1; }
  .hero-panel { grid-column: 2; margin-top: 0; }
  .hero-lead { margin-bottom: 2.6rem; }

  .origen-grid { grid-template-columns: minmax(0, 21rem) minmax(0, 1fr); }
  .origen-aside { position: sticky; top: calc(var(--nav-h) + 2rem); align-self: start; }

  /* `stretch` (no `center`): el panel del logo llena la altura de la
     columna y la tarjeta deja de verse desequilibrada. */
  .proj-feat { grid-template-columns: minmax(0, .8fr) minmax(0, 1.6fr); align-items: stretch; gap: 3rem; }
  .proj-feat-media { padding: 2.5rem; }
  .canal-grid { grid-template-columns: minmax(0, .85fr) minmax(0, 1.3fr); }
  .stack-grid { grid-template-columns: repeat(3, 1fr); }
  .mani-grid { grid-template-columns: repeat(3, 1fr); }
  .tl-item { grid-template-columns: 10rem 1fr; }
}

@media (min-width: 1280px) {
  .proj-grid { grid-template-columns: repeat(3, 1fr); }
}

/* =============================================================
   19. Reduced motion — only intrusive effects
   ============================================================= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .grain { animation: none; }
  .aurora::after { animation-duration: 180s; }
  .hero-scroll i { animation: none; opacity: .6; }
}
