:root {
  --bg: #d9dad7;
  --space: #030713;
  --space-2: #07101f;
  --panel: rgba(7, 12, 27, .74);
  --panel-2: rgba(11, 17, 35, .84);
  --line: rgba(255,255,255,.12);
  --line-strong: rgba(255,255,255,.22);
  --text: #f7f8ff;
  --muted: #a8b1c4;
  --soft: #d5dbea;
  --purple: #a467ff;
  --purple-2: #7634ff;
  --green: #a7ff63;
  --blue: #4aa8ff;
  --orange: #ff9b53;
  --radius: 28px;
  --mx: 0;
  --my: 0;
  --project-hue: 216;
  --drag-x: 0deg;
  --drag-y: 0deg;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: radial-gradient(circle at 50% -12%, #f2f3ef 0, #d7d9d5 42%, #c9cbc8 100%);
}
body.modal-open { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }
.cursor-aura {
  position: fixed;
  left: 0;
  top: 0;
  width: 420px;
  height: 420px;
  pointer-events: none;
  border-radius: 50%;
  transform: translate(calc(var(--cursor-x, 50vw) - 50%), calc(var(--cursor-y, 50vh) - 50%));
  background: radial-gradient(circle, hsla(var(--project-hue), 100%, 68%, .16), rgba(69,163,255,.055), transparent 62%);
  filter: blur(8px);
  mix-blend-mode: screen;
  z-index: 50;
}
.page-shell { min-height: 100vh; display: flex; justify-content: center; padding: 18px; }
.portfolio-app {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  width: min(1740px, 100%);
  min-height: 100vh;
  border-radius: var(--radius);
  background:
    radial-gradient(circle at calc(72% + var(--mx)*5%) calc(17% + var(--my)*4%), rgba(104, 88, 255, .27), transparent 29%),
    radial-gradient(circle at calc(80% + var(--mx)*8%) calc(44% + var(--my)*2%), rgba(45, 157, 255, .16), transparent 25%),
    radial-gradient(circle at 12% 25%, rgba(162, 103, 255, .10), transparent 26%),
    linear-gradient(140deg, #02040c 0%, #06101f 55%, #02040a 100%);
  border: 1px solid rgba(255,255,255,.17);
  box-shadow: 0 46px 110px rgba(0,0,0,.42), inset 0 1px 0 rgba(255,255,255,.08);
}
.starfield, .ambient, .noise, .shooting-stars { position: absolute; inset: 0; pointer-events: none; }
.starfield { z-index: 0; opacity: .95; }
.ambient { z-index: 1; border-radius: 50%; filter: blur(42px); opacity: .62; mix-blend-mode: screen; }
.ambient-a { width: 720px; height: 720px; right: 8%; top: 0; background: radial-gradient(circle, rgba(81,101,255,.22), transparent 66%); }
.ambient-b { width: 520px; height: 520px; right: 22%; top: 25%; background: radial-gradient(circle, rgba(162,103,255,.15), transparent 70%); }
.noise { z-index: 2; opacity: .15; mix-blend-mode: overlay; background-image: radial-gradient(rgba(255,255,255,.2) .6px, transparent .6px); background-size: 5px 5px; }
.shooting-stars { z-index: 3; overflow: hidden; }
.shooting-stars i { position: absolute; width: 150px; height: 1px; opacity: 0; background: linear-gradient(90deg, transparent, rgba(225,235,255,.9), transparent); filter: drop-shadow(0 0 8px rgba(134,172,255,.8)); transform: rotate(-24deg); animation: shootingStar 9s linear infinite; }
.shooting-stars i:nth-child(1) { left: 15%; top: 12%; animation-delay: 1.2s; }
.shooting-stars i:nth-child(2) { left: 67%; top: 26%; animation-delay: 4.8s; animation-duration: 12s; }
.shooting-stars i:nth-child(3) { left: 42%; top: 58%; animation-delay: 8.2s; animation-duration: 14s; }
@keyframes shootingStar { 0%, 76% { opacity: 0; transform: translate3d(0,0,0) rotate(-24deg); } 79% { opacity: .85; } 88%, 100% { opacity: 0; transform: translate3d(420px,180px,0) rotate(-24deg); } }
.topbar, .hero, .project-dock, .info-grid, .footer { position: relative; z-index: 5; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 35;
  min-height: 82px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 0 clamp(22px, 4vw, 58px);
  backdrop-filter: blur(18px);
}
.topbar::before {
  content: "";
  position: absolute;
  inset: 12px 20px auto;
  height: 58px;
  border-radius: 999px;
  background: rgba(6, 9, 19, .42);
  border: 1px solid rgba(255,255,255,.07);
  opacity: 0;
  transition: .3s ease;
  z-index: -1;
}
.topbar.scrolled::before { opacity: 1; }
.brand { display: flex; align-items: center; gap: 13px; min-width: 290px; }
.brand-orbit {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  position: relative;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 28% 22%, #fff, #7e5dff 11%, #121a38 72%);
  box-shadow: inset -10px -12px 20px rgba(0,0,0,.7), 0 0 26px rgba(164,103,255,.25);
}
.brand-orbit::before, .brand-orbit i {
  content: "";
  position: absolute;
  width: 78px;
  height: 25px;
  border: 1px solid rgba(255,255,255,.55);
  border-radius: 50%;
  transform: rotate(-19deg);
}
.brand-orbit i { width: 66px; height: 18px; border-color: rgba(167,255,99,.48); animation: orbitSpin 8s linear infinite; }
.brand-orbit b { position: relative; z-index: 2; font-weight: 950; letter-spacing: -.08em; font-size: 17px; color: #fff; text-shadow: 0 0 16px rgba(255,255,255,.5); }
@keyframes orbitSpin { to { transform: rotate(341deg); } }
.brand strong { display: block; text-transform: uppercase; font-size: 15px; letter-spacing: .08em; }
.brand small { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; }
.nav-dock { display: flex; align-items: center; gap: 7px; padding: 7px; border-radius: 999px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08); }
.nav-dock a { padding: 11px 18px; border-radius: 999px; font-size: 13px; color: #d9deed; transition: .24s ease; }
.nav-dock a:hover, .nav-dock a.active { background: rgba(164,103,255,.2); box-shadow: inset 0 0 0 1px rgba(164,103,255,.32), 0 0 24px rgba(164,103,255,.1); color: #fff; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.cv-btn, .icon-btn, .menu-btn, .primary-cta, .secondary-cta, .text-link, .small-action, .project-card button, .dock-controls button, .modal-close { cursor: pointer; transition: transform .24s ease, border-color .24s ease, background .24s ease, box-shadow .24s ease; }
.cv-btn { min-height: 48px; padding: 0 22px; border-radius: 999px; border: 1px solid rgba(255,255,255,.22); background: rgba(255,255,255,.04); color: var(--text); text-transform: uppercase; letter-spacing: .06em; font-weight: 900; font-size: 12px; }
.cv-btn:hover, .icon-btn:hover { transform: translateY(-2px); border-color: rgba(164,103,255,.7); box-shadow: 0 0 30px rgba(164,103,255,.15); }
.icon-btn, .menu-btn { width: 46px; height: 46px; border-radius: 50%; border: 1px solid rgba(255,255,255,.14); color: var(--purple); background: rgba(255,255,255,.035); font-weight: 900; }
.menu-btn { display: none; }
.hero {
  display: grid;
  grid-template-columns: minmax(390px, .88fr) minmax(650px, 1.25fr);
  align-items: center;
  gap: clamp(18px, 2.5vw, 42px);
  min-height: 720px;
  padding: 16px clamp(30px, 5vw, 78px) 24px;
}
.hero-copy { position: relative; z-index: 25; }
.eyebrow { display: flex; align-items: center; gap: 10px; margin: 0 0 16px; color: var(--purple); text-transform: uppercase; letter-spacing: .31em; font-weight: 900; font-size: 13px; }
.eyebrow span { width: 7px; height: 7px; background: var(--purple); border-radius: 50%; box-shadow: 0 0 18px var(--purple); }
.orbit-title {
  max-width: 760px;
  margin: 0 0 22px;
  display: grid;
  gap: .02em;
  line-height: .88;
  letter-spacing: -.085em;
  text-transform: uppercase;
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", "Arial Black", system-ui, sans-serif;
  font-size: clamp(56px, 5.95vw, 112px);
  text-wrap: balance;
}
.orbit-title span:not(.title-note), .orbit-title em { display: block; }
.orbit-title span:not(.title-note) {
  color: #f7f8ff;
  text-shadow: 0 10px 36px rgba(0,0,0,.35);
}
.orbit-title .title-note {
  width: fit-content;
  margin: 0 0 10px 4px;
  padding: 8px 12px;
  border: 1px solid rgba(164,103,255,.30);
  border-radius: 999px;
  color: #d9c7ff;
  background: linear-gradient(90deg, rgba(164,103,255,.16), rgba(82,151,255,.08));
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: clamp(11px, .85vw, 13px);
  font-weight: 900;
  letter-spacing: .24em;
  line-height: 1;
}
.orbit-title em {
  font-style: normal;
  width: fit-content;
  color: transparent;
  background: linear-gradient(92deg, #a267ff 0%, #c8a4ff 36%, #a7ff63 74%, #70d7ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  filter: drop-shadow(0 0 28px rgba(164,103,255,.30));
  letter-spacing: -.075em;
}
.orbit-title::after {
  content: "WEB / IA / SCRAPERS / PRODUCTO";
  width: fit-content;
  margin-top: 12px;
  padding-left: 4px;
  color: rgba(220,228,245,.50);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: clamp(10px, .9vw, 13px);
  letter-spacing: .22em;
  line-height: 1.2;
}
.hero-lead { max-width: 610px; margin: 0 0 30px; color: var(--soft); font-size: 18px; line-height: 1.72; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 15px; margin-bottom: 32px; }
.primary-cta, .secondary-cta { min-height: 58px; padding: 0 28px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; gap: 14px; text-transform: uppercase; font-size: 13px; letter-spacing: .04em; font-weight: 950; }
.primary-cta { border: 0; color: #fff; background: linear-gradient(135deg, #7432ff, #a76aff 48%, #a7ff63); box-shadow: 0 18px 58px rgba(116,50,255,.35); }
.secondary-cta { border: 1px solid rgba(255,255,255,.24); color: var(--text); background: rgba(255,255,255,.035); }
.magnetic:hover { transform: translateY(-4px) scale(1.016); }
.stack-strip { max-width: 650px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.10); }
.stack-strip > span { display: block; margin-bottom: 14px; color: #929db0; text-transform: uppercase; letter-spacing: .13em; font-size: 12px; }
.stack-strip > div { display: grid; grid-template-columns: repeat(5, minmax(64px, 1fr)); gap: 12px; }
.stack-strip button { border: 0; color: #dce4f5; background: transparent; display: grid; place-items: center; gap: 7px; padding: 10px 8px; border-radius: 16px; cursor: default; }
.stack-strip button b { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 14px; color: var(--purple); background: rgba(164,103,255,.08); box-shadow: inset 0 0 0 1px rgba(164,103,255,.18); font-size: 18px; }
.stack-strip button small { font-size: 12px; color: #d4d9e6; }
.orbital-stage { position: relative; z-index: 5; isolation: isolate; min-height: 660px; perspective: 1300px; touch-action: pan-y; }
.orbital-stage.is-dragging { cursor: grabbing; }
.drag-hint { position: absolute; right: 10px; bottom: 66px; z-index: 24; color: #9aa4b8; text-transform: uppercase; letter-spacing: .12em; font-size: 11px; display: flex; align-items: center; gap: 12px; }
.drag-hint span { display: block; width: 20px; height: 34px; border: 1px solid rgba(255,255,255,.42); border-radius: 99px; position: relative; }
.drag-hint span::before { content: ""; position: absolute; width: 4px; height: 8px; border-radius: 99px; background: var(--purple); left: 50%; top: 7px; transform: translateX(-50%); animation: wheel 1.5s ease-in-out infinite; }
@keyframes wheel { 50% { transform: translate(-50%, 10px); opacity: .45; } }
.orbital-coordinates { position: absolute; inset: 10px 12px auto; z-index: 23; display: flex; justify-content: space-between; color: rgba(190,202,228,.48); font: 10px/1.3 ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: .13em; pointer-events: none; }
.cosmic-dust { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.cosmic-dust i { position: absolute; width: 4px; height: 4px; border-radius: 50%; background: hsla(var(--project-hue),100%,75%,.9); box-shadow: 0 0 18px hsla(var(--project-hue),100%,65%,.8); animation: dustFloat 7s ease-in-out infinite; }
.cosmic-dust i:nth-child(1){left:12%;top:25%}.cosmic-dust i:nth-child(2){left:29%;top:76%;animation-delay:-2s}.cosmic-dust i:nth-child(3){left:74%;top:13%;animation-delay:-4s}.cosmic-dust i:nth-child(4){left:88%;top:66%;animation-delay:-1s}.cosmic-dust i:nth-child(5){left:54%;top:89%;animation-delay:-5s}.cosmic-dust i:nth-child(6){left:7%;top:55%;animation-delay:-3s}
@keyframes dustFloat { 50% { transform: translate3d(12px,-18px,0) scale(1.7); opacity: .35; } }
.planet-zone { position: absolute; inset: 0; z-index: 1; isolation: isolate; transform-style: preserve-3d; transform: rotateX(calc((var(--my) * -4deg) + var(--drag-y))) rotateY(calc((var(--mx) * 6deg) + var(--drag-x))); transition: transform .12s ease-out; }
.orbit-lines { position: absolute; z-index: 1; inset: -10px -20px auto auto; width: min(110%, 1040px); height: min(100%, 720px); overflow: visible; filter: drop-shadow(0 0 18px rgba(164,103,255,.22)); pointer-events: none; }
.orbit { fill: transparent; stroke: url(#orbitGradient); stroke-width: 1.1; stroke-dasharray: 4 13; opacity: .72; animation: orbitDash 26s linear infinite; }
.orbit-2 { animation-duration: 36s; opacity: .5; }
.orbit-3 { animation-duration: 44s; opacity: .45; }
.orbit-4 { animation-duration: 31s; opacity: .36; }
@keyframes orbitDash { to { stroke-dashoffset: -520; } }
.planet-shell { position: absolute; z-index: 3; width: clamp(360px, 35vw, 610px); aspect-ratio: 1; left: 44%; top: 8%; transform: translateZ(30px); border-radius: 50%; pointer-events: none; }
#planetCanvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; border-radius: 50%; filter: drop-shadow(0 0 70px rgba(77,156,255,.38)) drop-shadow(0 0 130px rgba(164,103,255,.18)); opacity: .92; transition: opacity .35s ease; }
.earth-model {
  position: absolute;
  z-index: 2;
  inset: 1.5%;
  width: 97%;
  height: 97%;
  display: block;
  border-radius: 50%;
  background: transparent;
  --poster-color: transparent;
  filter: drop-shadow(0 0 36px rgba(88,144,255,.28)) drop-shadow(0 0 88px rgba(164,103,255,.12));
  pointer-events: none;
}
.earth-model::part(default-progress-bar),
.earth-model::part(default-progress-mask),
.earth-model::part(default-progress-track) {
  display: none;
}
.planet-shell.model-loaded #planetCanvas { opacity: 0; }
.planet-rim { position: absolute; z-index: 4; inset: -1%; border-radius: 50%; pointer-events: none; box-shadow: inset 28px 18px 42px rgba(255,255,255,.2), inset -80px -62px 98px rgba(0,0,0,.76), 0 0 0 1px rgba(255,255,255,.08); }
.planet-glass { position: absolute; z-index: 5; inset: 7%; border-radius: 50%; background: radial-gradient(circle at 29% 22%, rgba(255,255,255,.22), transparent 19%), linear-gradient(120deg, rgba(255,255,255,.08), transparent 30% 68%, rgba(83,117,255,.06)); mix-blend-mode: screen; animation: planetSheen 8s ease-in-out infinite; }
.planet-scan { position: absolute; z-index: 6; inset: 8%; border-radius: 50%; opacity: .24; background: repeating-linear-gradient(0deg, transparent 0 7px, rgba(138,183,255,.12) 8px, transparent 9px); mask-image: radial-gradient(circle, #000 62%, transparent 74%); animation: scanDrift 12s linear infinite; }
.planet-halo { position: absolute; z-index: 1; inset: -5%; border-radius: 50%; border: 1px solid hsla(var(--project-hue),100%,77%,.32); box-shadow: 0 0 50px hsla(var(--project-hue),100%,66%,.22), inset 0 0 38px rgba(116,166,255,.12); animation: haloPulse 4.6s ease-in-out infinite; }
@keyframes planetSheen { 50% { transform: rotate(8deg) scale(1.02); opacity: .72; } }
@keyframes scanDrift { to { background-position: 0 72px; } }
@keyframes haloPulse { 50% { transform: scale(1.025); opacity: .62; } }
.pedestal { position: absolute; z-index: 2; left: 55%; top: 72%; transform: translateX(-50%); width: min(370px, 38vw); height: 100px; display: grid; place-items: center; pointer-events: none; }
.pedestal span { position: absolute; border-radius: 50%; border: 2px solid rgba(73,160,255,.82); box-shadow: 0 0 32px rgba(73,160,255,.35), inset 0 0 24px rgba(73,160,255,.16); }
.pedestal span:nth-child(1) { width: 100%; height: 58px; bottom: 8px; }
.pedestal span:nth-child(2) { width: 74%; height: 38px; bottom: 28px; border-color: rgba(164,103,255,.58); }
.pedestal span:nth-child(3) { width: 46%; height: 20px; bottom: 47px; }
.pedestal span:nth-child(4) { width: 22px; height: 22px; bottom: 55px; background: rgba(122,84,255,.88); filter: blur(1px); }
.moon { position: absolute; z-index: 8; border-radius: 50%; pointer-events: none; box-shadow: inset -11px -12px 24px rgba(0,0,0,.62), 0 0 26px hsla(var(--project-hue),100%,66%,.32); }
.moon-a { width: 48px; height: 48px; left: 26%; top: 51%; background: radial-gradient(circle at 31% 24%, #fff, #a66dff 18%, #331962 80%); animation: bob 6s ease-in-out infinite; }
.moon-b { width: 34px; height: 34px; left: 19%; top: 43%; background: radial-gradient(circle at 31% 24%, #fff, #ede5c8 15%, #5c5045 80%); animation: bob 8s ease-in-out infinite reverse; }
.moon-c { width: 32px; height: 32px; right: 13%; top: 15%; background: radial-gradient(circle at 31% 24%, #fff, #9c67ff 16%, #301652 80%); animation: bob 7s ease-in-out infinite; }
.moon-d { width: 40px; height: 40px; right: 6%; top: 42%; background: radial-gradient(circle at 31% 24%, #fff, #a66dff 16%, #29164a 80%); animation: bob 9s ease-in-out infinite reverse; }
.moon-e { width: 38px; height: 38px; left: 36%; top: 57%; background: radial-gradient(circle at 31% 24%, #fff, #4aa8ff 16%, #0a3b6d 80%); animation: bob 7.6s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-18px) translateX(9px); } }
.orbital-label { position: absolute; z-index: 24; min-width: 185px; display: grid; grid-template-columns: 34px 1fr; gap: 3px 10px; align-items: center; border: 1px solid rgba(255,255,255,.13); border-radius: 999px; padding: 10px 14px; color: var(--text); background: linear-gradient(180deg, rgba(13,18,40,.42), rgba(7,12,27,.24)); backdrop-filter: blur(20px) saturate(1.1); cursor: pointer; text-align: left; box-shadow: 0 16px 36px rgba(0,0,0,.22), inset 0 1px rgba(255,255,255,.08); animation: floatLabel 7s ease-in-out infinite; }
.orbital-label i { grid-row: span 2; width: 33px; height: 33px; border-radius: 50%; background: radial-gradient(circle at 30% 23%, #fff, var(--purple) 18%, #281454 76%); box-shadow: 0 0 22px rgba(164,103,255,.45); }
.orbital-label::after { content: "clic para abrir"; grid-column: 2; color: rgba(255,255,255,.48); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; }
.orbital-label small { color: var(--muted); font-size: 12px; margin-top: 1px; }
.orbital-label:nth-of-type(1) { animation-delay: -.7s; }
.orbital-label:nth-of-type(2) { animation-delay: -2.2s; }
.orbital-label:nth-of-type(3) { animation-delay: -3.6s; }
@keyframes floatLabel { 50% { transform: translateY(-6px); } }
.orbital-label strong { font-size: 14px; }
.orbital-label:hover, .orbital-label.active { transform: translateY(-4px) scale(1.012); border-color: rgba(164,103,255,.7); box-shadow: 0 0 34px rgba(164,103,255,.14), 0 18px 42px rgba(0,0,0,.3); }
.label-local { left: 13%; top: 24%; }
.label-auto { left: 8%; top: 58%; }
.label-cv { right: 10%; top: 60%; }
.featured-card { position: absolute; z-index: 20; right: 4%; top: 18%; width: min(290px, 30vw); padding: 18px; border-radius: 20px; background: linear-gradient(180deg, rgba(15,20,40,.36), rgba(9,12,24,.18)); border: 1px solid rgba(164,103,255,.22); box-shadow: 0 22px 60px rgba(0,0,0,.24), 0 0 28px hsla(var(--project-hue),100%,65%,.05), inset 0 1px 0 rgba(255,255,255,.08); backdrop-filter: blur(22px) saturate(1.08); }
.featured-card > p:first-child { display: flex; align-items: center; gap: 10px; color: #c6ccdb; margin: 0 0 10px; text-transform: uppercase; letter-spacing: .11em; font-weight: 900; font-size: 11px; opacity: .92; }
.featured-card > p:first-child span { width: 8px; height: 8px; border-radius: 50%; background: var(--purple); box-shadow: 0 0 18px var(--purple); }
.featured-title-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.featured-title-row h2 { margin: 0; font-size: clamp(20px, 1.5vw, 28px); letter-spacing: -.03em; }
.featured-title-row strong { color: var(--green); border: 1px solid rgba(167,255,99,.30); border-radius: 999px; padding: 4px 9px; font-size: 10px; background: rgba(167,255,99,.08); }
.featured-card > p:nth-of-type(2) { margin: 0 0 12px; color: var(--soft); line-height: 1.55; font-size: 13px; max-width: 28ch; }
.featured-tags, .chips { display: flex; flex-wrap: wrap; gap: 9px; }
.featured-tags span, .chips span, .skill-cloud span { padding: 8px 12px; border-radius: 999px; background: rgba(255,255,255,.07); color: #e8edf8; font-size: 12px; border: 1px solid rgba(255,255,255,.08); }
.featured-tags { gap: 8px; margin-bottom: 8px; }
.featured-tags span { padding: 5px 9px; font-size: 10px; background: rgba(255,255,255,.05); }
.text-link { margin-top: 12px; width: 100%; min-height: 44px; border: 0; background: transparent; color: var(--text); display: flex; justify-content: space-between; align-items: center; text-transform: uppercase; letter-spacing: .08em; font-weight: 950; font-size: 12px; }
.text-link span, .project-card button span { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.06); }
.project-dock { margin: 0 clamp(22px, 4vw, 58px) 18px; padding: 24px 26px 18px; border-radius: 26px; background: rgba(6,10,22,.58); border: 1px solid rgba(255,255,255,.12); backdrop-filter: blur(20px); }
.section-label { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; text-transform: uppercase; letter-spacing: .13em; font-weight: 900; }
.section-label span { width: 8px; height: 8px; border-radius: 50%; background: var(--purple); box-shadow: 0 0 16px var(--purple); }
.dock-controls { position: absolute; right: 28px; top: 20px; display: flex; gap: 9px; }
.dock-controls button { width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(255,255,255,.16); background: rgba(255,255,255,.05); color: var(--text); font-size: 24px; }
.dock-controls button:hover { border-color: rgba(164,103,255,.7); transform: translateY(-2px); }
.project-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); gap: 18px; }
.project-card { display: grid; grid-template-columns: 210px 1fr; gap: 22px; min-height: 202px; padding: 18px; border-radius: 20px; border: 1px solid rgba(255,255,255,.12); background: linear-gradient(180deg, rgba(14,20,38,.78), rgba(7,10,22,.86)); cursor: pointer; transition: .28s ease; }
.project-card:hover, .project-card.active { transform: translateY(-5px); border-color: hsla(var(--project-hue),100%,68%,.58); box-shadow: 0 22px 55px rgba(0,0,0,.3), 0 0 38px hsla(var(--project-hue),100%,68%,.09); }
.project-preview { border-radius: 16px; overflow: hidden; border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.04); min-height: 164px; position: relative; }
.preview-cv { background: radial-gradient(circle at 18% 15%, rgba(164,103,255,.8), transparent 45%), linear-gradient(135deg, rgba(255,255,255,.08), rgba(255,255,255,.02)); display: grid; place-items: center; }
.mock-window { width: 76%; height: 70%; border-radius: 8px; background: #f2f5ff; padding: 14px; display: grid; gap: 8px; }
.mock-window span { display: block; height: 9px; border-radius: 99px; background: #d5dff1; }
.mock-window span:nth-child(2) { width: 86%; }
.mock-window span:nth-child(3) { width: 72%; background: #2e74ff; }
.preview-lead { background: radial-gradient(circle at 44% 30%, rgba(80,255,180,.42), transparent 42%), #071a22; }
.mini-chart { width: 100%; height: 100%; }
.preview-ai { display: grid; place-items: center; background: radial-gradient(circle at 72% 28%, rgba(164,103,255,.45), transparent 45%), #120b23; }
.preview-ai svg { width: 76%; height: 76%; stroke: var(--purple); fill: none; stroke-width: 2; filter: drop-shadow(0 0 12px rgba(164,103,255,.35)); }
.project-copy small { color: var(--purple); font-weight: 950; font-size: 18px; }
.project-copy h3 { margin: 6px 0 8px; font-size: 26px; letter-spacing: -.03em; }
.project-copy p { color: var(--soft); line-height: 1.55; margin: 0 0 16px; }
.project-card button { margin-top: 18px; padding: 0; border: 0; background: transparent; color: var(--text); display: flex; align-items: center; gap: 14px; }
.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; margin: 0 clamp(22px, 4vw, 58px) 24px; }
.info-card { border-radius: 22px; padding: 26px; min-height: 270px; background: linear-gradient(180deg, rgba(10,15,30,.72), rgba(6,9,20,.86)); border: 1px solid rgba(255,255,255,.12); backdrop-filter: blur(20px); }
.info-card h3 { margin: 0 0 18px; text-transform: uppercase; letter-spacing: .08em; display: flex; gap: 10px; align-items: center; }
.info-card h3 span { color: var(--purple); }
.info-card p { color: var(--soft); line-height: 1.7; }
.small-action { margin-top: 16px; border-radius: 999px; min-height: 42px; padding: 0 18px; border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.04); color: var(--text); text-transform: uppercase; font-size: 12px; font-weight: 900; }
.skill-cloud { display: flex; flex-wrap: wrap; gap: 10px; }
.timeline { margin: 0; padding: 0 0 0 18px; list-style: none; border-left: 1px solid rgba(255,255,255,.14); }
.timeline li { position: relative; margin: 0 0 18px; padding-left: 18px; }
.timeline li::before { content: ""; position: absolute; left: -24px; top: 5px; width: 10px; height: 10px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 14px var(--orange); }
.timeline strong { display: block; }
.timeline small { display: block; color: var(--muted); margin-top: 4px; }
.contact-list { list-style: none; padding: 0; margin: 0 0 24px; display: grid; gap: 14px; color: var(--soft); }
.socials { display: flex; gap: 12px; }
.socials a { display: grid; place-items: center; width: 50px; height: 50px; border-radius: 17px; border: 1px solid rgba(255,255,255,.13); background: rgba(255,255,255,.05); font-weight: 900; }
.socials a:hover { transform: translateY(-3px); border-color: rgba(164,103,255,.7); }
.footer { display: flex; justify-content: space-between; gap: 20px; padding: 0 clamp(30px, 5vw, 78px) 22px; color: #7f8798; font-size: 13px; }
.modal-backdrop[hidden] { display: none !important; }
.modal-backdrop { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 20px; background: rgba(0,0,0,.76); backdrop-filter: blur(14px); opacity: 0; transition: opacity .2s ease; }
.modal-backdrop.is-open { opacity: 1; }
.modal { width: min(740px, 100%); max-height: min(760px, 90vh); overflow: auto; position: relative; border-radius: 26px; padding: 34px; border: 1px solid rgba(164,103,255,.28); background: linear-gradient(180deg, rgba(14,18,36,.98), rgba(5,8,18,.98)); box-shadow: 0 40px 120px rgba(0,0,0,.55); }
.modal-close { position: absolute; z-index: 3; top: 18px; right: 18px; width: 46px; height: 46px; display: grid; place-items: center; border-radius: 50%; border: 1px solid rgba(255,255,255,.2); background: rgba(255,255,255,.08); color: var(--text); font-size: 28px; line-height: 1; touch-action: manipulation; }
.modal-close:hover { transform: rotate(90deg) scale(1.06); border-color: rgba(164,103,255,.75); background: rgba(164,103,255,.16); }
.modal-kicker { color: var(--purple); text-transform: uppercase; letter-spacing: .14em; font-weight: 900; }
.modal h2 { font-size: 44px; margin: 0 0 16px; letter-spacing: -.04em; }
.modal p { color: var(--soft); line-height: 1.7; }
.modal-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-top: 22px; }
.modal-box { padding: 18px; border-radius: 16px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1); }
.reveal { opacity: 0; transform: translateY(22px); animation: reveal .8s ease forwards; }
.reveal:nth-child(2) { animation-delay: .12s; }
@keyframes reveal { to { opacity: 1; transform: none; } }
@media (max-width: 1250px) {
  .hero { grid-template-columns: 1fr; padding-top: 22px; }
  .orbital-stage { min-height: 650px; }
  .planet-shell { left: 50%; top: 4%; transform: translateX(-50%); }
  .featured-card { right: 4%; top: 18%; width: min(320px, 42vw); }
  .project-grid, .info-grid { grid-template-columns: 1fr; }
  .project-card { grid-template-columns: 220px 1fr; }
  .nav-dock { position: fixed; top: 86px; left: 22px; right: 22px; display: none; flex-wrap: wrap; justify-content: center; border-radius: 22px; background: rgba(6,9,19,.92); backdrop-filter: blur(18px); }
  .nav-dock.open { display: flex; }
  .menu-btn { display: grid; place-items: center; }
}
@media (max-width: 720px) {
  .page-shell { padding: 0; }
  .portfolio-app { border-radius: 0; }
  .topbar { padding: 0 16px; min-height: 76px; }
  .brand { min-width: 0; }
  .brand small { display: none; }
  .brand strong { font-size: 12px; }
  .brand-orbit { width: 44px; height: 44px; }
  .icon-btn { display: none; }
  .cv-btn { padding: 0 14px; min-height: 42px; }
  .hero { padding: 22px 20px 10px; min-height: auto; }
  h1 { font-size: clamp(44px, 14vw, 70px); }
  .hero-lead { font-size: 16px; }
  .stack-strip > div { grid-template-columns: repeat(3, 1fr); }
  .orbital-stage { min-height: 610px; }
  .planet-shell { width: 360px; top: 16px; }
  .orbit-lines { width: 760px; left: -160px; top: -20px; }
  .featured-card { width: calc(100% - 34px); left: 17px; right: auto; top: 282px; padding: 18px; }
  .orbital-label { min-width: 150px; font-size: 12px; }
  .label-local { left: 4%; top: 15%; }
  .label-auto { left: 2%; top: 50%; }
  .label-cv { right: 2%; top: 50%; }
  .drag-hint { display: none; }
  .project-dock, .info-grid { margin-left: 14px; margin-right: 14px; }
  .project-card { grid-template-columns: 1fr; }
  .project-preview { min-height: 190px; }
  .footer { flex-direction: column; padding: 6px 20px 24px; }
  .modal-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .001ms !important; }
}


/* v6: orbital previews, reactive orbit lines and polished planet scene */
.orbit-lines {
  transform-origin: 56% 50%;
  transform: translate3d(calc(var(--mx) * 18px), calc(var(--my) * 12px), 0) rotate(calc(var(--mx) * 2.4deg)) scale(calc(1 + (var(--orbit-energy, 0) * .018)));
  transition: transform .16s ease-out, filter .16s ease-out, opacity .16s ease-out;
  filter: drop-shadow(0 0 calc(18px + (var(--orbit-energy, 0) * 20px)) hsla(var(--project-hue), 100%, 68%, .22));
}
.orbit {
  stroke-width: calc(1.05px + (var(--orbit-energy, 0) * .65px));
  opacity: calc(.40 + (var(--orbit-energy, 0) * .34));
}
.orbit-1 { stroke-dasharray: 5 12; }
.orbit-2 { stroke-dasharray: 3 16; }
.orbit-3 { stroke-dasharray: 2 18; }
.orbit-4 { stroke-dasharray: 8 20; }
.planet-shell {
  transform: translateZ(30px) rotateX(calc(var(--my) * -2.8deg)) rotateY(calc(var(--mx) * 4deg));
  transition: transform .14s ease-out;
}
.planet-rim::after {
  content: "";
  position: absolute;
  inset: 9%;
  border-radius: 50%;
  border: 1px solid hsla(var(--project-hue),100%,75%,.18);
  box-shadow: inset 0 0 36px rgba(255,255,255,.06), 0 0 34px hsla(var(--project-hue),100%,65%,.12);
}
.orbital-label {
  overflow: visible;
  will-change: transform;
}
.orbital-label::before {
  content: attr(data-preview);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 12px);
  width: min(270px, 60vw);
  transform: translate3d(-50%, 12px, 0) scale(.96);
  opacity: 0;
  pointer-events: none;
  padding: 12px 14px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(15,20,42,.86), rgba(6,10,22,.76));
  border: 1px solid hsla(var(--project-hue),100%,70%,.25);
  box-shadow: 0 18px 50px rgba(0,0,0,.34), 0 0 30px hsla(var(--project-hue),100%,62%,.08);
  color: rgba(246,248,255,.92);
  font-size: 12px;
  line-height: 1.45;
  letter-spacing: 0;
  text-transform: none;
  backdrop-filter: blur(20px) saturate(1.08);
  transition: opacity .18s ease, transform .18s ease;
}
.orbital-label:hover::before,
.orbital-label:focus-visible::before {
  opacity: 1;
  transform: translate3d(-50%, 0, 0) scale(1);
}
.label-auto::before { left: 60%; }
.label-cv::before { left: 45%; }
.orbital-label:hover i,
.orbital-label:focus-visible i,
.orbital-label.active i {
  animation: labelPulse 1.45s ease-in-out infinite;
}
@keyframes labelPulse {
  50% { box-shadow: 0 0 28px hsla(var(--project-hue),100%,66%,.68), inset 0 0 16px rgba(255,255,255,.18); transform: scale(1.08); }
}
.featured-card:hover { border-color: hsla(var(--project-hue),100%,70%,.38); background: linear-gradient(180deg, rgba(15,20,40,.46), rgba(9,12,24,.26)); }
@media (max-width: 720px) {
  .orbital-label::before { display: none; }
  .orbit-lines { transform: none; }
}


/* v7: content update + safer orbital composition */
.planet-zone { pointer-events: none; }
.orbital-label, .featured-card, .drag-hint { pointer-events: auto; }
.planet-shell {
  z-index: 2;
  left: 47%;
  top: 6%;
  opacity: .96;
}
.featured-card {
  right: auto;
  left: 56%;
  top: 66%;
  width: min(330px, 34vw);
  opacity: .86;
}
.label-cv { left: 4%; top: 18%; }
.label-local { left: 10%; top: 43%; }
.label-campaign { left: 7%; top: 67%; }
.label-urban { right: 1%; top: 20%; }
.label-scrapers { right: 3%; top: 48%; }
.orbital-label { min-width: 205px; background: linear-gradient(180deg, rgba(11,16,35,.46), rgba(5,9,20,.22)); }
.orbital-label.active { background: linear-gradient(180deg, hsla(var(--project-hue),100%,50%,.18), rgba(5,9,20,.28)); }
.project-dock { position: relative; z-index: 12; }
.project-copy p { min-height: 72px; }
.project-card { min-height: 226px; }
.preview-campaign { display: grid; place-items: center; background: radial-gradient(circle at 30% 18%, rgba(48,109,255,.4), transparent 42%), linear-gradient(135deg, #0c1328, #101827); }
.campaign-ui { width: 78%; height: 72%; border-radius: 14px; border: 1px solid rgba(255,255,255,.12); background: rgba(12,20,40,.8); padding: 14px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; box-shadow: inset 0 0 28px rgba(49,105,255,.15); }
.campaign-ui span { grid-column: 1 / -1; height: 12px; border-radius: 999px; background: #2f6bff; }
.campaign-ui b { font-size: 34px; color: #fff; align-self: center; }
.campaign-ui i { border-radius: 10px; border: 1px solid rgba(255,255,255,.11); background: rgba(255,255,255,.06); }
.preview-urban { display: grid; place-items: center; background: radial-gradient(circle at 80% 20%, rgba(167,255,99,.7), transparent 34%), linear-gradient(135deg, #e9ece6, #111); color: #0b0b0b; }
.urban-ui { position: relative; width: 82%; height: 70%; border-radius: 18px; overflow: hidden; background: linear-gradient(180deg, rgba(255,255,255,.9), rgba(255,255,255,.45)), linear-gradient(140deg, #a7ff63, #111); padding: 18px; display: grid; align-content: end; box-shadow: 0 18px 42px rgba(0,0,0,.25); }
.urban-ui strong { font-size: 28px; letter-spacing: -.06em; }
.urban-ui span { font-weight: 900; color: #555; }
.urban-ui i { position: absolute; right: -20px; top: -20px; width: 90px; height: 90px; border-radius: 50%; background: #a7ff63; }
.preview-scraper { display: grid; place-items: center; background: radial-gradient(circle at 52% 24%, rgba(255,155,83,.42), transparent 42%), #160d09; }
.scraper-ui { width: 78%; height: 72%; display: grid; gap: 10px; padding: 16px; border-radius: 14px; border: 1px solid rgba(255,255,255,.13); background: rgba(255,255,255,.05); }
.scraper-ui span { height: 12px; border-radius: 999px; background: linear-gradient(90deg, #ff9b53, rgba(255,255,255,.18)); }
.scraper-ui span:nth-child(2) { width: 76%; }
.scraper-ui span:nth-child(3) { width: 54%; }
.scraper-ui b { justify-self: end; align-self: end; color: #ffcc99; border: 1px solid rgba(255,155,83,.42); border-radius: 8px; padding: 5px 8px; }
.modal-link { display: inline-flex; align-items: center; margin-top: 12px; padding: 10px 14px; border-radius: 999px; color: #fff; background: hsla(var(--project-hue),100%,55%,.18); border: 1px solid hsla(var(--project-hue),100%,70%,.28); }
@media (max-width: 1250px) {
  .planet-shell { left: 50%; top: 3%; opacity: .72; }
  .featured-card { left: 52%; top: 56%; width: min(330px, 42vw); }
  .label-cv { left: 5%; top: 18%; }
  .label-local { left: 4%; top: 38%; }
  .label-campaign { left: 6%; top: 59%; }
  .label-urban { right: 4%; top: 20%; }
  .label-scrapers { right: 4%; top: 42%; }
}
@media (max-width: 720px) {
  .planet-shell { opacity: .45; top: 24px; left: 50%; }
  .featured-card { width: calc(100% - 34px); left: 17px; right: auto; top: 390px; }
  .orbital-stage { min-height: 760px; }
  .label-cv { left: 3%; top: 13%; }
  .label-local { right: 3%; left: auto; top: 23%; }
  .label-campaign { left: 3%; top: 34%; }
  .label-urban { right: 3%; top: 45%; }
  .label-scrapers { left: 3%; right: auto; top: 56%; }
  .project-grid { grid-template-columns: 1fr; }
}


/* v8: real project screenshots + C++ skill polish */
.preview-shot {
  min-height: 178px;
  isolation: isolate;
  background: #060a15;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.03);
}
.preview-shot img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  filter: saturate(1.04) contrast(1.02) brightness(.88);
  transform: scale(1.012);
  transition: transform .55s ease, filter .55s ease;
}
.project-card:hover .preview-shot img,
.project-card.active .preview-shot img {
  transform: scale(1.055);
  filter: saturate(1.12) contrast(1.04) brightness(.98);
}
.preview-shot::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(0,0,0,.02), rgba(0,0,0,.32)), radial-gradient(circle at 18% 12%, hsla(var(--project-hue),100%,68%,.18), transparent 42%);
  pointer-events: none;
}
.shot-badge {
  position: absolute;
  z-index: 2;
  left: 12px;
  bottom: 12px;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(5,8,18,.68);
  border: 1px solid rgba(255,255,255,.16);
  color: rgba(255,255,255,.92);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
  backdrop-filter: blur(14px);
}
.modal-shot {
  margin: 0 0 22px;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.04);
  box-shadow: 0 24px 60px rgba(0,0,0,.32);
}
.modal-shot img {
  display: block;
  width: 100%;
  max-height: 340px;
  object-fit: cover;
  object-position: center top;
}
.stack-strip button[title="C++"] b {
  letter-spacing: -.08em;
  font-size: 13px;
}
@media (max-width: 720px) {
  .preview-shot { min-height: 210px; }
  .modal-shot img { max-height: 260px; }
}


/* v9: portfolio-2025 inspired project showcase (no copied source) */
.project-dock {
  margin-top: 28px;
  padding: clamp(28px, 4vw, 64px);
  border-radius: 34px;
  background:
    radial-gradient(circle at 18% 10%, hsla(var(--project-hue), 100%, 70%, .14), transparent 34%),
    linear-gradient(180deg, rgba(245, 239, 224, .94), rgba(211, 218, 229, .9));
  color: #07101c;
  border: 1px solid rgba(255,255,255,.5);
  box-shadow: 0 28px 90px rgba(0,0,0,.28), inset 0 1px rgba(255,255,255,.75);
  transform: translateY(26px) scale(.985);
  opacity: 0;
  transition: transform .65s var(--ease-smooth, cubic-bezier(.2,.8,.2,1)), opacity .65s ease;
}
.project-dock.in-view { transform: none; opacity: 1; }
.project-dock .section-label { color: #07101c; margin-bottom: 34px; }
.project-dock .section-label strong { font-size: clamp(28px, 4vw, 66px); letter-spacing: -.07em; text-transform: none; }
.project-dock .dock-controls button { color: #07101c; background: rgba(255,255,255,.56); border-color: rgba(7,16,28,.14); }
.project-dock .dock-controls button:hover { background: #fff; border-color: hsla(var(--project-hue),100%,46%,.55); box-shadow: 0 15px 35px rgba(0,0,0,.14); }
.project-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 330px), 1fr)); gap: clamp(18px, 2.2vw, 34px); }
.project-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  min-height: auto;
  border: 0;
  border-radius: 28px;
  background: transparent;
  box-shadow: none;
  transform: translateY(28px) scale(.96);
  opacity: 0;
  overflow: visible;
}
.project-card.in-view { transform: none; opacity: 1; transition: transform .55s ease, opacity .55s ease, filter .32s ease; }
.project-card::before {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: 34px;
  background: #fff;
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease;
  z-index: -1;
}
.project-card:hover::before, .project-card.active::before { opacity: .9; }
.project-card:hover, .project-card.active { transform: translateY(-8px); box-shadow: none; border-color: transparent; }
.project-preview { width: 100%; aspect-ratio: 16/9; min-height: auto; border-radius: 24px; background: rgba(7,16,28,.16); border: 0; box-shadow: 0 20px 55px rgba(7,16,28,.16); }
.project-copy { padding: 14px 6px 0; color: #07101c; }
.project-copy small { color: hsla(var(--project-hue), 90%, 38%, 1); font-size: 14px; letter-spacing: .14em; }
.project-copy h3 { color: #07101c; font-size: clamp(26px, 2.2vw, 38px); margin-top: 6px; }
.project-copy p { color: #364354; font-weight: 550; }
.project-copy .chips span { background: rgba(7,16,28,.06); color: #1e2938; border-color: rgba(7,16,28,.1); }
.project-card button {
  align-self: flex-start;
  margin-top: 18px;
  padding: 10px 12px 10px 16px;
  border-radius: 999px;
  background: rgba(7,16,28,.92);
  color: #fff;
  box-shadow: 0 14px 32px rgba(7,16,28,.18);
}
.project-card button span { width: 36px; height: 36px; background: rgba(255,255,255,.12); transition: transform .18s ease; }
.project-card:hover button span { transform: rotate(-42deg); }
.preview-shot { min-height: auto; }
.preview-shot img { object-position: center top; transform: scale(1.02); }
.project-card:hover .preview-shot img, .project-card.active .preview-shot img { transform: scale(1.08); }
.shot-badge { background: rgba(255,255,255,.72); color: #07101c; border-color: rgba(7,16,28,.1); }

.project-viewer[hidden] { display: none !important; }
.project-viewer {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(0,0,0,.72);
  backdrop-filter: blur(18px);
  opacity: 0;
  transition: opacity .22s ease;
}
.project-viewer.is-open { opacity: 1; }
.project-viewer-panel {
  width: min(1440px, 100%);
  max-height: min(900px, calc(100vh - 34px));
  overflow: auto;
  border-radius: 34px;
  background:
    radial-gradient(circle at 76% 9%, hsla(var(--project-hue),100%,66%,.22), transparent 35%),
    linear-gradient(145deg, #f5efe0, #dce4ef 55%, #edf2f6);
  color: #07101c;
  border: 1px solid rgba(255,255,255,.72);
  box-shadow: 0 44px 140px rgba(0,0,0,.55);
  padding: clamp(20px, 3vw, 46px);
  transform: scale(.94) translateY(24px);
  transition: transform .28s ease;
}
.project-viewer.is-open .project-viewer-panel { transform: none; }
.viewer-close {
  position: sticky;
  top: 0;
  float: right;
  z-index: 5;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(7,16,28,.12);
  color: #07101c;
  background: rgba(255,255,255,.62);
  font-size: 30px;
  cursor: pointer;
}
.viewer-close:hover { transform: rotate(90deg); background: #fff; }
.viewer-topline { display: flex; justify-content: space-between; gap: 16px; margin-bottom: 28px; padding-right: 64px; color: #526072; text-transform: uppercase; letter-spacing: .14em; font-weight: 900; font-size: 12px; }
.viewer-back { border: 0; background: transparent; color: #07101c; font-weight: 950; cursor: pointer; }
.viewer-hero { display: grid; grid-template-columns: minmax(330px, .75fr) minmax(430px, 1.25fr); align-items: center; gap: clamp(24px, 4vw, 62px); }
.viewer-kicker { margin: 0 0 12px; text-transform: uppercase; letter-spacing: .16em; color: hsla(var(--project-hue), 90%, 38%, 1); font-weight: 950; }
.viewer-copy h2 { margin: 0 0 18px; font-size: clamp(46px, 8vw, 118px); line-height: .92; letter-spacing: -.08em; }
.viewer-copy > p:not(.viewer-kicker) { color: #344154; font-size: clamp(17px, 1.4vw, 22px); line-height: 1.65; }
.viewer-tags { display: flex; flex-wrap: wrap; gap: 10px; margin: 24px 0; }
.viewer-tags span { padding: 10px 14px; border-radius: 999px; background: rgba(7,16,28,.07); border: 1px solid rgba(7,16,28,.1); color: #07101c; font-weight: 800; }
.viewer-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; color: #607084; font-weight: 800; }
.viewer-actions a { padding: 14px 18px; border-radius: 999px; background: #07101c; color: #fff; box-shadow: 0 18px 38px rgba(7,16,28,.18); }
.viewer-shot { margin: 0; aspect-ratio: 16/9; border-radius: 30px; overflow: hidden; box-shadow: 0 28px 80px rgba(7,16,28,.26); border: 1px solid rgba(255,255,255,.72); background: #07101c; }
.viewer-shot img { width: 100%; height: 100%; display: block; object-fit: cover; object-position: center top; }
.viewer-content { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: clamp(26px, 4vw, 54px); }
.viewer-block { min-height: 190px; padding: 22px; border-radius: 24px; background: rgba(255,255,255,.55); border: 1px solid rgba(7,16,28,.08); box-shadow: inset 0 1px rgba(255,255,255,.8); }
.viewer-block span { display: block; margin-bottom: 16px; color: hsla(var(--project-hue), 90%, 38%, 1); text-transform: uppercase; letter-spacing: .13em; font-size: 12px; font-weight: 950; }
.viewer-block p { margin: 0; color: #2d394a; line-height: 1.62; font-weight: 560; }
.viewer-bottom { display: flex; justify-content: space-between; gap: 24px; align-items: center; margin-top: 24px; padding-top: 24px; border-top: 1px solid rgba(7,16,28,.1); color: #2d394a; }
.viewer-bottom p { max-width: 760px; line-height: 1.65; }
.viewer-bottom button { border: 0; border-radius: 999px; background: linear-gradient(135deg, #07101c, #1b2440); color: #fff; padding: 16px 20px; font-weight: 950; cursor: pointer; }
.viewer-bottom button span { display: inline-block; margin-left: 8px; transition: transform .18s ease; }
.viewer-bottom button:hover span { transform: translateX(5px); }

@media (max-width: 980px) {
  .viewer-hero { grid-template-columns: 1fr; }
  .viewer-content { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .project-dock { padding: 24px 16px; margin-left: 0; margin-right: 0; border-radius: 28px 28px 0 0; }
  .dock-controls { top: 24px; right: 18px; }
  .project-dock .section-label strong { max-width: 260px; font-size: 36px; }
  .project-card { border-radius: 24px; }
  .project-preview { border-radius: 20px; }
  .project-viewer { padding: 0; }
  .project-viewer-panel { max-height: 100vh; min-height: 100vh; border-radius: 0; }
  .viewer-topline { padding-right: 58px; }
  .viewer-content { grid-template-columns: 1fr; }
  .viewer-bottom { flex-direction: column; align-items: stretch; }
}
@media (prefers-reduced-motion: reduce) {
  .project-card, .project-dock, .project-viewer-panel { transition: none !important; }
}


.planet-shell.model-loaded .planet-rim::after {
  border-color: hsla(var(--project-hue),100%,78%,.22);
  box-shadow: inset 0 0 42px rgba(255,255,255,.08), 0 0 42px hsla(var(--project-hue),100%,65%,.16);
}
.planet-shell.model-loaded .planet-glass { opacity: .9; }


/* v11: reliable planet fallback + stronger editorial hero */
.planet-shell:not(.model-loaded)::before {
  content: "fallback canvas";
  position: absolute;
  right: 12%;
  bottom: 12%;
  z-index: 7;
  color: rgba(220,228,245,.28);
  font-size: 9px;
  letter-spacing: .22em;
  text-transform: uppercase;
  pointer-events: none;
}
.planet-shell.model-loaded::before { display: none; }
.earth-model { opacity: 0; transition: opacity .45s ease, filter .45s ease; }
.planet-shell.model-loaded .earth-model { opacity: 1; }
.hero-copy::before {
  content: "";
  position: absolute;
  left: -26px;
  top: 82px;
  width: 4px;
  height: 46%;
  border-radius: 999px;
  background: linear-gradient(180deg, #a267ff, rgba(167,255,99,.75), transparent);
  box-shadow: 0 0 28px rgba(164,103,255,.30);
  opacity: .45;
}
@media (max-width: 720px) {
  .orbit-title { font-size: clamp(45px, 14vw, 72px); letter-spacing: -.075em; }
  .orbit-title::after { font-size: 10px; letter-spacing: .15em; }
  .hero-copy::before { display: none; }
}


/* v12: readable creative headline + stronger 3D earth priority */
.orbit-title {
  max-width: 700px;
  gap: .04em;
  line-height: .98;
  letter-spacing: -.055em;
  font-family: "Arial Black", "Segoe UI Black", system-ui, sans-serif;
  font-size: clamp(54px, 5.15vw, 96px);
  text-transform: uppercase;
}
.orbit-title span:not(.title-note),
.orbit-title em {
  display: block;
  transform: none;
}
.orbit-title span:not(.title-note) {
  color: #f7f8ff;
  -webkit-text-stroke: 0;
  text-shadow: 0 16px 40px rgba(0,0,0,.35);
}
.orbit-title em {
  margin-top: .03em;
  letter-spacing: -.045em;
  color: transparent;
  background: linear-gradient(92deg, #a267ff 0%, #c6a7ff 32%, #a7ff63 70%, #70d7ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  filter: drop-shadow(0 0 20px rgba(164,103,255,.24));
}
.orbit-title .title-note {
  margin-bottom: 14px;
  letter-spacing: .18em;
  font-size: clamp(10px, .75vw, 12px);
}
.orbit-title::after {
  margin-top: 16px;
  letter-spacing: .20em;
  opacity: .9;
}
.hero-lead {
  max-width: 690px;
  font-size: clamp(17px, 1.13vw, 21px);
}
.earth-model {
  opacity: 1 !important;
  z-index: 7;
  filter: drop-shadow(0 0 42px rgba(88,144,255,.34)) drop-shadow(0 0 120px rgba(164,103,255,.18));
}
#planetCanvas {
  z-index: 1;
  opacity: .34;
}
.planet-shell.model-loaded #planetCanvas {
  opacity: 0;
}
.planet-shell.model-error #planetCanvas,
.planet-shell:not(.model-loaded).model-fallback-ready #planetCanvas {
  opacity: .92;
}
.planet-shell:not(.model-loaded)::before {
  content: "cargando tierra 3D";
  opacity: .18;
}
.planet-shell.model-error::before,
.planet-shell.model-file-warning::before {
  content: "abre con abrir_portafolio.bat para activar 3D";
  opacity: .22;
}
.planet-shell.model-loaded::before { display: none; }
@media (max-width: 980px) {
  .orbit-title { font-size: clamp(48px, 9vw, 86px); max-width: 640px; }
}
@media (max-width: 720px) {
  .orbit-title { font-size: clamp(42px, 13vw, 64px); letter-spacing: -.045em; line-height: 1.02; }
  .orbit-title .title-note { letter-spacing: .14em; }
}
