/* — Premium Minimal — Grayscale Edition — */
:root{
  --bg:#000000;
  --surface:#0A0A0A;
  --line:rgba(255,255,255,0.11);
  --line2:rgba(255,255,255,0.07);
  --fg:#ffffff;
  --muted:#9aa0a8;
  --muted2:#6e7680;
  --accent:#EDEDED;
  --accent2:#C9C9C9;
  --accent3:#A8A8A8;
  --pill-bg: rgba(255,255,255,0.04);
  --pill-border: rgba(255,255,255,0.12);
  --radius-pill: 999px;
  --radius-card: 22px;
  --max: 1280px;
}

*{box-sizing:border-box}
html,body{height:100%;margin:0;background:var(--bg);color:var(--fg)}
html{overflow:hidden}
body{
  font-family:"Roboto Mono", ui-monospace, monospace;
  overflow:hidden;
  position:relative;
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
}
h1,h2,h3,h4,h5,h6{
  font-family:"Instrument Sans", system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
}
a{color:inherit;text-decoration:none}
button{font:inherit;color:inherit}
.mono{font-family:"Roboto Mono", ui-monospace, monospace; font-size:11px; letter-spacing:0.08em; text-transform:uppercase}
.label{color:var(--muted); margin:0 0 14px 0}
.dim{color:var(--muted2)}

/* — Fondo — OPTIMIZADO: blur CSS eliminado (era 60% del costo GPU). Desenfoque simulado vía alpha/size en canvas — reversible */
#bgChars{
  position:fixed; inset:0;
  width:100vw; height:100vh;
  z-index:0;
  opacity:0.32;
  /* filter eliminado: blur(1.35px) forzaba re-raster GPU cada frame en 4-7Mpx */
  pointer-events:none;
  will-change: auto; /* no forzar layer extra sin blur */
}
.vignette{
  position:fixed; inset:0; z-index:1; pointer-events:none;
  background:
    radial-gradient(1200px 700px at 50% -10%, rgba(255,255,255,0.07), transparent 60%),
    radial-gradient(900px 600px at 85% 85%, rgba(255,255,255,0.04), transparent 60%),
    linear-gradient(180deg, rgba(0,0,0,0.14) 0%, rgba(0,0,0,0.52) 58%, rgba(0,0,0,0.92) 100%);
}
.orb{
  position:fixed;
  left:50%; bottom:-38vh;
  width:138vw; height:88vh;
  transform:translateX(-50%);
  z-index:1; pointer-events:none;
  background:
    radial-gradient(ellipse 80% 100% at 50% 0%, rgba(255,255,255,0.18) 0%, rgba(225,225,225,0.12) 22%, rgba(180,180,180,0.08) 38%, rgba(140,140,140,0.04) 52%, transparent 72%);
  filter: blur(28px);
  border-radius: 50% 50% 0 0 / 68% 68% 0 0;
  border-top:1px solid rgba(255,255,255,0.14);
  opacity:0.95;
}
.orb--2{
  width:86vw; height:58vh; bottom:-18vh; opacity:0.42; filter:blur(22px);
  background: radial-gradient(ellipse 80% 100% at 50% 0%, rgba(255,255,255,0.08) 0%, rgba(200,200,200,0.06) 30%, transparent 70%);
  border-top-color: rgba(255,255,255,0.10);
}
.grain{
  position:fixed; inset:0; z-index:1; pointer-events:none; opacity:0.055;
  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)' opacity='0.42'/%3E%3C/svg%3E");
  mix-blend-mode:soft-light;
}
.grid-lines{
  position:fixed; inset:0; z-index:1; pointer-events:none; opacity:0.05;
  background:
    linear-gradient(to right, rgba(255,255,255,0.07) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.07) 1px, transparent 1px);
  background-size: 120px 120px;
  mask: radial-gradient(900px 700px at 50% 35%, black 55%, transparent 85%);
}

/* — Header — compacto y fluido */
.header{
  position:fixed; top:clamp(10px, 1.6vh, 16px); left:50%; transform:translateX(-50%);
  width:min(calc(100vw - 32px), var(--max));
  height:clamp(42px, 4.2vw, 46px);
  display:grid; grid-template-columns:1fr auto 1fr;
  align-items:center;
  gap:clamp(8px, 1.2vw, 16px);
  z-index:10;
}
.logo{
  justify-self:start;
  display:flex; align-items:center; gap:8px;
  font-weight:600; letter-spacing:-0.02em;
}
.logo__mark{
  width:22px; height:22px; border-radius:50%;
  background: #fff;
  position:relative;
  flex:none;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.10), 0 6px 18px rgba(255,255,255,0.08);
}
.logo__mark::after{
  content:""; position:absolute; inset:5px;
  border-radius:50%;
  background: radial-gradient(circle at 30% 30%, #FFFFFF, #C9C9C9 58%, #6E6E6E 78%);
  opacity:0.98;
}
.logo__text{font-size:clamp(11px, 1.05vw, 13px); letter-spacing:0.16em; font-weight:600; text-transform:uppercase}
.logo__sub{font-family:"Roboto Mono",monospace; font-size:10px; color:var(--muted); font-weight:400; letter-spacing:0.06em; margin-left:2px}

.pill-nav{
  position:relative;
  display:inline-flex; gap:1px; padding:3px;
  background: rgba(14,14,14,0.72);
  backdrop-filter: blur(18px) saturate(1.05);
  -webkit-backdrop-filter: blur(18px) saturate(1.05);
  border:1px solid var(--pill-border);
  border-radius: var(--radius-pill);
  box-shadow: 0 10px 40px rgba(0,0,0,0.45), inset 0 1px 0 rgba(255,255,255,0.06);
  width:fit-content; max-width:100%;
  justify-self:center; align-self:center;
}
.pill-nav__indicator{
  position:absolute; top:3px; bottom:3px; left:3px; width:0;
  background:#fff; border-radius:var(--radius-pill);
  transition: transform 420ms cubic-bezier(0.22,1,0.36,1), width 420ms cubic-bezier(0.22,1,0.36,1);
  box-shadow: 0 2px 12px rgba(0,0,0,0.18);
  pointer-events:none;
}
.pill-nav__btn{
  position:relative; z-index:1;
  padding:6px clamp(10px, 1.1vw, 13px); border-radius:var(--radius-pill);
  border:0; background:transparent; color:var(--muted);
  font-size:clamp(11px, 0.95vw, 12.5px); font-weight:500; letter-spacing:-0.01em; line-height:1;
  cursor:pointer; transition: color 180ms;
  white-space:nowrap;
}
.pill-nav__btn.is-active{color:#000}
.pill-nav__btn:not(.is-active):hover{color:#e8ecef}

.kicker{color:var(--muted); font-family:"Roboto Mono",monospace; font-size:11px; letter-spacing:0.08em; margin-right:6px}

/* — Viewport — single screen no scroll — */
.viewport{
  position:fixed; inset:0;
  width:100vw; height:100vh;
  z-index:5;
  display:block;
  padding: 132px 16px 56px;
}
.view{
  position:absolute; inset: 132px 0 56px 0;
  width:min(calc(100vw - 32px), var(--max));
  margin:0 auto;
  opacity:0; transform: translateY(10px) scale(0.99);
  pointer-events:none;
  transition: opacity 520ms cubic-bezier(0.22,1,0.36,1), transform 620ms cubic-bezier(0.22,1,0.36,1);
  will-change: opacity, transform;
  display:flex;
  align-items:stretch;
}
.view.is-active{opacity:1; transform: translateY(0) scale(1); pointer-events:auto}
.view.is-exiting{opacity:0; transform: translateY(-8px) scale(0.995)}
.view:focus{outline:none}

/* — HOME — */
.view[data-view="home"]{
  justify-content:space-between;
  gap:32px;
  align-items:center;
}
.hero{
  flex:1; max-width:640px; min-width:0;
}
.hero__eyebrow{
  display:inline-flex; align-items:center; gap:10px;
  font-family:"Roboto Mono", ui-monospace, monospace; font-size:11px; letter-spacing:0.12em; color:var(--muted);
  margin:16px 0 16px;
}
.eyebrow__line{width:26px; height:1px; background: var(--accent); opacity:0.9; flex:none}
.hero__title{
  margin:0; font-size: clamp(42px, 6.2vw, 72px);
  line-height:0.92; letter-spacing:-0.05em; font-weight:500;
}
.hero__title .t-white{color:#fff}
.hero__title .t-gradient{
  background: linear-gradient(90deg, #FFFFFF 0%, #E8E8E8 28%, #B8B8B8 62%, #8E8E8E 100%);
  -webkit-background-clip:text; background-clip:text; color:transparent;
}
.hero__desc{
  margin:18px 0 0; max-width:520px;
  font-family:"Roboto Mono", ui-monospace, monospace;
  color:#b8c0c9; font-size:13.5px; line-height:1.6; letter-spacing:-0.015em; font-weight:400;
}
.hero__actions{display:flex; gap:12px; margin-top:26px; flex-wrap:wrap}
.btn{
  display:inline-flex; align-items:center; gap:10px;
  padding:14px 20px; border-radius:var(--radius-pill);
  border:1px solid transparent; cursor:pointer;
  font-size:14px; font-weight:600; letter-spacing:-0.015em;
  transition: transform 180ms, background 180ms, border-color 180ms, color 180ms;
  white-space:nowrap;
}
.btn:active{transform: scale(0.99)}
.btn--primary{
  background:#fff; color:#000; border-color:#fff;
  box-shadow: 0 10px 30px rgba(0,0,0,0.35), 0 1px 0 rgba(255,255,255,0.6) inset;
}
.btn--primary:hover{background:#f1f5f9; transform: translateY(-1px)}
.btn__icon{width:22px; height:22px; border-radius:50%; background:#000; color:#fff; display:grid; place-items:center; font-size:12px; transition: transform 180ms}
.btn__icon svg{width:15px; height:15px; display:block}
.btn__icon svg path{stroke:#fff}
.btn__icon--ghost{background:transparent; color:#fff}
.btn__icon--ghost svg{width:18px; height:18px}
.btn__icon--ghost svg path{fill:currentColor; stroke:none}
.btn--primary:hover .btn__icon{transform: translateX(2px)}
.btn--ghost{
  background: rgba(255,255,255,0.06); color:#e6ecef; border-color: var(--pill-border);
  backdrop-filter: blur(10px);
}
.btn--ghost:hover{background: rgba(255,255,255,0.10); border-color: rgba(255,255,255,0.18)}
.hero__stats{
  display:flex; gap:18px; margin-top:28px;
  border-top:1px solid var(--line2); padding-top:18px; max-width:520px;
}
.stat{display:flex; gap:10px; align-items:flex-start; flex:1}
.stat__num{font-family:"Newsreader", serif; font-size:28px; line-height:1; font-weight:300; letter-spacing:-0.04em; color:#fff}
.stat__label{font-size:11px; line-height:1.35; letter-spacing:0.04em; text-transform:uppercase; color:var(--muted); font-weight:500}

/* — HERO GEOMÉTRICO — libre, sin caja, ocupa más espacio — */
.hero-geometric{
  width: 560px; /* más grande: antes 340 */
  max-width: 46vw;
  flex: none;
  background: transparent;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
  align-self: center;
  display: flex;
  flex-direction: column;
  overflow: visible;
}
.hero-geometric--free .hero-geometric__stage{
  position: relative;
  width: 100%;
  aspect-ratio: 1; /* cuadrado grande */
  background: transparent;
  overflow: visible;
  border: 0;
}
/* sin viñeta: nodos deben verse en el fondo, sin caja ni tono */
.hero-geometric--free .hero-geometric__stage::before{
  display:none;
}
#geoCanvas{
  position:absolute; inset:0;
  width:100%; height:100%;
  display:block;
  /* Los halos ya se dibujan en canvas; evitar un filtro de pantalla completa por frame. */
  filter:none;
}
.hero-geometric__stage{touch-action:none; user-select:none}
.live{display:inline-flex; align-items:center; gap:6px; font-size:11px; color:#E8E8E8}
.live i{width:6px; height:6px; border-radius:50%; background:#FFFFFF; box-shadow:0 0 8px rgba(255,255,255,0.55); display:inline-block}

/* — WORK — */
.view[data-view="work"]{
  flex-direction:column; justify-content:center; gap:18px;
  scrollbar-width:thin; scrollbar-color:rgba(255,255,255,0.18) transparent;
}
@media (min-width: 861px){
  /* Aprovecha el alto disponible para que las cartas sean verticales. */
  .view[data-view="work"]{inset:104px 0 40px 0}
}
.view[data-view="work"]::-webkit-scrollbar{width:6px}
.view[data-view="work"]::-webkit-scrollbar-thumb{background:rgba(255,255,255,0.16); border-radius:999px}
.work__header{display:flex; justify-content:space-between; gap:24px; align-items:flex-end}
.work__intro{margin:0; max-width:520px; color:#9aa0a8; font-size:14px; line-height:1.6; text-align:right}
.projects{
  display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); gap:16px; align-items:stretch;
  flex:1; min-height:0; max-height:560px;
}
.project{
  position:relative; overflow:hidden;
  display:flex; flex-direction:column;
  height:100%;
  background: rgba(14,14,14,0.62);
  border:1px solid rgba(255,255,255,0.11);
  border-radius: var(--radius-card);
  backdrop-filter: blur(16px) saturate(1.05);
  padding:18px;
  box-shadow: 0 18px 50px rgba(0,0,0,0.42);
  transition: transform 220ms, border-color 220ms, background 220ms;
}
.project:hover{transform: translateY(-3px); border-color: rgba(255,255,255,0.18); background: rgba(20,20,20,0.72)}
.project__top{display:flex; justify-content:space-between; align-items:center; gap:8px; flex-wrap:wrap; margin-bottom:14px}
.project__tag{font-size:10.5px; letter-spacing:0.08em; text-transform:uppercase; font-family:"Roboto Mono",monospace; color:#E8E8E8; background:rgba(255,255,255,0.07); border:1px solid rgba(255,255,255,0.12); padding:5px 9px; border-radius:999px}
.project__title{margin:0; font-size:clamp(20px, 1.8vw, 24px); letter-spacing:-0.03em; font-weight:600; line-height:1.05}
.project__desc{
  margin:10px 0 0; color:#a9b2bc; font-size:13px; line-height:1.55;
  overflow:hidden; max-height:121px; flex:none;
  transition: max-height 360ms cubic-bezier(0.22,1,0.36,1);
}
.project.is-clamped:not(.is-expanded) .project__desc{
  -webkit-mask-image: linear-gradient(to bottom, #000 72%, rgba(0,0,0,0) 100%);
  mask-image: linear-gradient(to bottom, #000 72%, rgba(0,0,0,0) 100%);
}
.project__more{
  display:flex; align-items:center; justify-content:center;
  width:100%; margin:6px 0 0; padding:0; border:0; background:none;
  color:#fff; opacity:1; cursor:pointer;
}
.project__more:hover{opacity:0.75}
.project__more[hidden]{display:none}
.project__more svg{width:20px; height:20px; display:block; transition: transform 260ms cubic-bezier(0.22,1,0.36,1)}
.project.is-expanded .project__more svg{transform: rotate(180deg)}
.project__meta{list-style:none; display:flex; gap:7px; flex-wrap:wrap; margin:14px 0 0; padding:0}
.project__meta li{padding:6px 9px; border-radius:999px; background: rgba(255,255,255,0.06); border:1px solid rgba(255,255,255,0.08); color:#d0d8e0; font-size:10.5px}
.project__actions{display:flex; gap:16px; margin-top:auto; padding-top:18px; align-items:center; min-height:52px}
.project__cta{
  display:inline-flex; align-items:center; gap:8px;
  padding:7px 12px; border-radius:999px;
  border:1px solid rgba(255,255,255,0.16);
  background:rgba(255,255,255,0.06);
  color:#e8ecef; font-size:12px; font-weight:500; letter-spacing:0.01em;
  transition: background 180ms, border-color 180ms;
}
.project__cta:hover{background:rgba(255,255,255,0.10); border-color:rgba(255,255,255,0.28)}
.project__cta span{color:var(--muted); font-size:13px}
.link{font-size:13px; font-weight:600; letter-spacing:-0.015em; border-bottom:1px solid rgba(255,255,255,0.14); padding-bottom:2px; transition: border-color 180ms, color 180ms}
.link:hover{border-color:#fff}
.link--dim{color:var(--muted); border-color: transparent; font-weight:500}
.link--dim:hover{color:#e6ecef; border-color: rgba(255,255,255,0.12)}
.project__glow{
  position:absolute; inset:auto -20% -40% -20%; height:55%;
  background: radial-gradient(ellipse 60% 80% at 50% 0%, rgba(255,255,255,0.10), transparent 70%);
  filter: blur(16px); pointer-events:none; opacity:0.9;
}
.project__glow--violet{background: radial-gradient(ellipse 60% 80% at 50% 0%, rgba(180,180,180,0.10), transparent 70%)}
.work__footnote{margin:0; color:var(--muted2); text-align:center; font-size:11px}
.work__footnote a{color:#d6dde4; border-bottom:1px solid rgba(255,255,255,0.14)}
.work__footnote a:hover{color:#fff}

/* — STACK — */
.view[data-view="stack"]{flex-direction:column; justify-content:center; gap:16px}
.stack-grid{
  display:grid; grid-template-columns: 1.15fr 1fr 1fr 1fr; gap:16px; align-items:stretch;
}
.stack-intro{
  background: rgba(14,14,14,0.62); border:1px solid rgba(255,255,255,0.11); border-radius:var(--radius-card);
  padding:20px; backdrop-filter: blur(16px); box-shadow: 0 18px 50px rgba(0,0,0,0.42);
}
.stack-title{margin:0; font-size:30px; line-height:0.98; letter-spacing:-0.045em; font-weight:600}
.stack-desc{margin:10px 0 0; color:#9aa0a8; font-size:13.8px; line-height:1.6}
.stack-col{
  background: rgba(14,14,14,0.52); border:1px solid rgba(255,255,255,0.09); border-radius:var(--radius-card);
  padding:18px; backdrop-filter: blur(16px);
}
.stack-col h3{margin:0 0 12px; font-size:13px; letter-spacing:-0.02em; display:flex; align-items:center; gap:8px; color:#e8ecef}
.stack-col h3 span{font-family:"Roboto Mono",monospace; font-size:11px; color:var(--accent); background:rgba(255,255,255,0.07); border:1px solid rgba(255,255,255,0.12); padding:4px 7px; border-radius:999px}
.stack-col ul{list-style:none; margin:0; padding:0; display:grid; gap:8px}
.stack-col li{font-size:13px; color:#cbd5e0; letter-spacing:-0.01em; padding-left:14px; position:relative}
.stack-col li::before{content:"—"; position:absolute; left:0; color:var(--muted2); font-size:11px; top:1px}
.stack-col .dim{margin-top:12px; font-size:12px; line-height:1.5; color:#7f8791}
.stack-bar{
  display:flex; justify-content:space-between; gap:16px;
  padding:10px 14px; border-radius:999px;
  background: rgba(255,255,255,0.04); border:1px solid var(--line2); backdrop-filter: blur(10px);
  color:var(--muted); font-size:10.5px;
}

/* — CONTACT — */
.view[data-view="contact"]{align-items:center; justify-content:center}
.contact{
  display:grid; grid-template-columns: 1.05fr 0.95fr; gap:16px; width:100%; align-items:stretch;
}
.contact__left{
  background: rgba(14,14,14,0.62); border:1px solid rgba(255,255,255,0.11); border-radius:var(--radius-card);
  padding:22px; backdrop-filter: blur(16px); box-shadow: 0 18px 50px rgba(0,0,0,0.42);
  display:flex; flex-direction:column; justify-content:center;
}
.contact__title{margin:0; font-size: clamp(38px, 4.6vw, 54px); line-height:0.92; letter-spacing:-0.05em; font-weight:600}
.contact__desc{margin:10px 0 0; color:#9aa0a8; font-size:14px; line-height:1.6; max-width:480px}
.contact__actions{display:flex; gap:12px; margin-top:18px; flex-wrap:wrap}
.contact__links{display:flex; gap:14px; margin-top:16px; flex-wrap:wrap; align-items:center}
.contact__links a{color:#d6dde4; border-bottom:1px solid transparent; padding-bottom:2px}
.contact__links a:hover{border-color:rgba(255,255,255,0.18); color:#fff}
.contact__right{display:flex}
.contact-card{
  flex:1; background: #fff; color:#0a0f14; border-radius:var(--radius-card); overflow:hidden;
  display:flex; flex-direction:column; box-shadow: 0 22px 64px rgba(0,0,0,0.42);
}
.contact-card__head{display:flex; justify-content:space-between; align-items:center; padding:14px 16px; border-bottom:1px solid rgba(0,0,0,0.08); color:#6b7580}
.contact-card__head .live{color:#3a3a3a}
.contact-card__body{padding:18px 18px 16px; flex:1}
.contact-card__body .big{margin:0; font-family:"Newsreader", serif; font-size:40px; line-height:0.92; letter-spacing:-0.05em; font-weight:300; color:#0a0f14}
.contact-card__body .big span{font-size:16px; font-family:"Roboto Mono",ui-monospace,monospace; letter-spacing:-0.02em; color:#6b7580; font-weight:500}
.contact-card__grid{display:grid; grid-template-columns:1fr 1fr; gap:14px; margin-top:18px; padding-top:16px; border-top:1px solid rgba(0,0,0,0.08); font-size:11px}
.contact-card__grid .dim{color:#6b7580; text-transform:uppercase; letter-spacing:0.08em; font-size:10px}
.contact-card__foot{padding:12px 16px; border-top:1px solid rgba(0,0,0,0.08); color:#7d868f; text-align:center; background:#f7f8f9; font-size:10px}

/* — Footer — */
.footer{
  position:fixed; bottom:14px; left:50%; transform:translateX(-50%);
  width:min(calc(100vw - 32px), var(--max));
  display:flex; justify-content:center; gap:16px;
  color:var(--muted2); font-size:10.5px; z-index:6; pointer-events:none; text-align:center;
}
.footer__right{opacity:0.9}

/* — Mobile scroll fades (solo se activan en móvil) — */
.scroll-fade{display:none}

/* — Responsive: keep single screen — */
@media (max-width: 1080px){
  .view[data-view="home"]{gap:20px}
  .hero-geometric{width: min(520px, 46vw); max-width: 520px}
  .projects{gap:12px}
  .project{padding:16px}
  .project__title{font-size:20px}
  .project__tag{font-size:10px; padding:5px 8px}
  .project__meta li{font-size:10px}
  .stack-grid{grid-template-columns:1fr 1fr; grid-template-areas: "intro intro" "c1 c2" "c3 c3"}
  .stack-intro{grid-area:intro}
  .contact{grid-template-columns:1fr}
  .contact__right{min-height:220px}
}
@media (max-width: 860px){
  .header{grid-template-columns:1fr auto 1fr; gap:8px; height:42px; top:10px}
  .viewport{padding-top:150px}
  .view{inset:150px 0 52px 0}
  /* Tablet: texto y constelación comparten la pantalla, sin empujar el canvas abajo. */
  .view[data-view="home"]{
    display:grid;
    grid-template-columns:minmax(0, 1fr) minmax(250px, 42%);
    align-items:center;
    gap:clamp(14px, 2.5vw, 28px);
  }
  .hero__title{font-size: clamp(38px, 10vw, 52px)}
  .hero-geometric{width:100%; max-width:none}
  .hero-geometric--free .hero-geometric__stage{aspect-ratio:1; max-height:none}
  .work__header{flex-direction:column; align-items:stretch}
  .work__intro{text-align:left}
  .view[data-view="work"]{
    justify-content:flex-start;
    overflow-y:auto;
    overscroll-behavior:contain;
    padding-bottom:8px;
  }
  .projects{grid-template-columns:1fr; flex:none; min-height:auto; max-height:none}
  .project{height:auto}
  .project__desc{min-height:auto}
  .stack-grid{grid-template-columns:1fr}
  .footer{flex-direction:column; align-items:center; text-align:center; gap:4px}
}
@media (max-width: 520px){
  .header{height:36px; padding:0; top:6px; gap:6px; grid-template-columns:auto 1fr auto}
  .pill-nav{gap:1px; padding:2px; width:fit-content; max-width:calc(100vw - 56px)}
  .pill-nav__indicator{top:2px; bottom:2px; left:2px}
  .pill-nav__btn{padding:5px 8px; font-size:10.5px; flex:none; line-height:1}
  .logo__mark{width:18px; height:18px}
  .logo__mark::after{inset:4px}
  .logo__text{font-size:11px}
  .viewport{padding:42px 12px 40px}
  .view{inset:42px 0 40px 0}
  /* Mobile: menú arriba, nodos en medio, letras abajo — pila vertical sin solape */
  .view[data-view="home"]{
    display:flex;
    flex-direction:column;
    gap:8px;
    justify-content:flex-start;
    align-items:stretch;
    position:absolute;
    overflow:auto;
    padding-top:0;
  }
  .view[data-view="home"] .hero{
    position:relative;
    z-index:1;
    max-width:100%;
    order:2;
    pointer-events:auto;
    padding-top:0;
    flex:none;
    margin-top:auto;
    margin-bottom:auto;
  }
  .hero-geometric{
    position:relative;
    top:auto; right:auto;
    width:min(86%, 320px);
    max-width:320px;
    margin-left:auto;
    margin-right:2%;
    z-index:0;
    opacity:0.92;
    pointer-events:auto;
    order:1;
    flex:none;
    align-self:flex-end;
  }
  .hero-geometric--free .hero-geometric__stage{aspect-ratio:1.35; max-height:38vh; min-height:200px}
  .view[data-view="home"] .hero button,
  .view[data-view="home"] .hero a{pointer-events:auto}
  .hero__title{max-width:92%; font-size:clamp(36px, 10vw, 48px); position:relative; z-index:1}
  .hero__eyebrow{margin:8px 0 8px; font-size:clamp(7.5px, 2vw, 9px); letter-spacing:0.08em; gap:6px}
  .hero__eyebrow .eyebrow__line{width:18px}
  .hero__desc{margin:8px 0 0; font-size:clamp(10.5px, 2.8vw, 12px); line-height:1.5}
  .hero__actions{flex-direction:row; gap:8px; width:80%; max-width:320px; flex-wrap:nowrap; align-items:stretch; margin:12px 0 0}
  .hero__actions .btn{flex:1 1 0; min-width:0; padding:7px 10px; font-size:clamp(10px, 2.4vw, 11px); gap:6px; justify-content:center; align-items:center; text-align:center; line-height:1.1; white-space:nowrap; min-height:36px; box-sizing:border-box}
  .hero__actions .btn--primary span:first-child{overflow:hidden; text-overflow:ellipsis; white-space:nowrap; min-width:0}
  .hero__actions .btn__icon{width:16px; height:16px; flex:none}
  .hero__actions .btn__icon svg{width:11px; height:11px}
  .hero__stats{gap:8px; margin-top:16px; padding-top:12px}
  .stat{gap:6px}
  .stat__num{font-size:clamp(16px, 4.2vw, 20px)}
  .stat__label{font-size:clamp(7.5px, 1.9vw, 9px); line-height:1.25}
  .project{padding:16px}
  .contact__title{font-size:36px}
}

/* — Mobile scroll mode: secciones apiladas, snap suave y blur de borde — */
@media (max-width:520px){
  .viewport{
    overflow-y:auto;
    overflow-x:hidden;
    scroll-snap-type:y proximity;
    scroll-padding-top:42px;
    scroll-padding-bottom:40px;
    -webkit-overflow-scrolling:touch;
    overscroll-behavior-y:contain;
    scrollbar-width:none;
  }
  .viewport::-webkit-scrollbar{display:none}

  .view[data-view]{
    position:relative;
    inset:auto;
    min-height:100%;
    margin:0 auto;
    opacity:1;
    transform:none;
    pointer-events:auto;
    transition:none;
    will-change:auto;
    scroll-snap-align:start;
    scroll-snap-stop:normal;
  }
  .view[data-view].is-exiting{opacity:1; transform:none; pointer-events:auto}
  .view[data-view="home"]{overflow:visible}
  .view[data-view="work"]{overflow:visible; overscroll-behavior:auto; padding-top:20px; padding-bottom:20px}
  .view[data-view="stack"]{justify-content:flex-start}
  .view[data-view="contact"]{flex-direction:column; justify-content:flex-start; align-items:stretch}
  .view[data-view="contact"] .contact{margin-top:auto; margin-bottom:auto}
  .projects{gap:18px}

  .hero-geometric__stage{touch-action:pan-y}

  .scroll-fade{display:block; position:fixed; left:0; right:0; z-index:6; pointer-events:none}
  .scroll-fade--top{
    top:0; height:46px;
    background:linear-gradient(to bottom, rgba(0,0,0,0.96) 0%, rgba(0,0,0,0.82) 55%, rgba(0,0,0,0) 100%);
    -webkit-backdrop-filter:blur(7px);
    backdrop-filter:blur(7px);
    -webkit-mask-image:linear-gradient(to bottom, #000 0%, #000 58%, transparent 100%);
    mask-image:linear-gradient(to bottom, #000 0%, #000 58%, transparent 100%);
  }
  .scroll-fade--bottom{
    bottom:0; height:72px;
    background:linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.58) 42%, rgba(0,0,0,0) 100%);
    -webkit-backdrop-filter:blur(9px);
    backdrop-filter:blur(9px);
    -webkit-mask-image:linear-gradient(to top, #000 0%, #000 38%, transparent 100%);
    mask-image:linear-gradient(to top, #000 0%, #000 38%, transparent 100%);
  }
}

/* — Reduced motion — */
@media (prefers-reduced-motion: reduce){
  .pill-nav__indicator, .view, .project, .project__cta, .btn,
  .project__desc, .project__more, .project__more svg{transition:none}
}

/* focus */
.pill-nav__btn:focus-visible, .btn:focus-visible, .project__cta:focus-visible, .project__more:focus-visible, a:focus-visible{
  outline:2px solid #FFFFFF; outline-offset:2px; border-radius:6px;
}
