/* Estudio oscuro de una sola apariencia; bandas a todo el ancho con contenido centrado */
:root {
  color-scheme: dark;
  --bg: #0b1120;
  --panel: #131c30;
  --panel-2: #1a2540;
  --fg: #e9eef8;
  --dim: #8e9bb5;
  --line: #26324d;
  --orange: #ff8a3d;
  --orange-ink: #1c0f05;
  --ok: #3ecf8e;
  --f-display: "Unbounded", "Arial Black", system-ui, sans-serif;
  --f-body: "DM Sans", "Segoe UI", system-ui, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
}
html { scroll-behavior: smooth; padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--f-body); font-size: 16px; line-height: 1.6; }
img { max-width: 100%; }
[hidden] { display: none !important; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; }
.in { max-width: 1180px; margin: 0 auto; padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); }

/* nav */
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--bg); }
.nav { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; background: rgba(11, 17, 32, .86); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.nav-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 16px; }
.logo { font-family: var(--f-display); font-weight: 700; font-size: 17px; text-decoration: none; letter-spacing: .02em; }
.logo sup { color: var(--orange); font-size: 10px; }
.links { display: flex; gap: 26px; font-size: 14px; }
.links a { text-decoration: none; color: var(--dim); }
.links a:hover { color: var(--fg); }

/* hero */
.hero-in { display: grid; grid-template-columns: 1.1fr .9fr; gap: 32px; align-items: center; padding-block: 64px 72px; }
.hero-copy { min-width: 0; }
.kicker { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 22px; font-family: var(--f-mono); font-size: 13px; color: var(--dim); border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px rgba(62, 207, 142, .22); }
h1 { font-family: var(--f-display); font-weight: 900; font-size: clamp(38px, 6.4vw, 84px); line-height: .98; letter-spacing: -.03em; margin: 0 0 22px; text-wrap: balance; }
.hl { color: var(--orange); }
.lead { color: var(--dim); font-size: 18px; max-width: 46ch; margin: 0 0 30px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--orange); color: var(--orange-ink); font-weight: 700; padding: 13px 24px; border-radius: 999px; text-decoration: none; border: 0; cursor: pointer; font-size: 15px; }
.btn:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; color: var(--fg); border: 1px solid var(--line); }
.btn.ghost:hover { border-color: var(--dim); }
.stage { position: relative; aspect-ratio: 1; max-width: 100%; }
.stage canvas { width: 100%; height: 100%; display: block; }
.stage-tag { position: absolute; left: 50%; bottom: 4%; transform: translateX(-50%); font-family: var(--f-mono); font-size: 12px; color: var(--dim); white-space: nowrap; }

/* secciones */
.band { padding-block: 72px; border-top: 1px solid var(--line); scroll-margin-top: 60px; }
.sec-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 16px 32px; margin-bottom: 32px; }
h2 { font-family: var(--f-display); font-weight: 700; font-size: clamp(28px, 4vw, 44px); letter-spacing: -.02em; margin: 0; line-height: 1.05; }
.label { font-family: var(--f-mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--orange); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { background: transparent; border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px; font-size: 14px; cursor: pointer; color: var(--dim); }
.chip b { color: var(--fg); font-weight: 500; margin-left: 4px; }
.chip.on { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.chip.on b { color: var(--bg); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 18px; }
.card { text-align: left; background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 12px 12px 18px; cursor: pointer; display: flex; flex-direction: column; gap: 10px; min-width: 0; transition: transform .2s ease, border-color .2s ease; }
.card:hover { transform: translateY(-3px); border-color: #8a5a3e; }
.thumb { aspect-ratio: 4/3; border-radius: 12px; overflow: hidden; display: grid; place-items: center; background: linear-gradient(135deg, hsl(var(--h, 24) 85% 60%), hsl(calc(var(--h, 24) + 40) 60% 28%)); }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph { font-family: var(--f-display); font-weight: 700; font-size: 20px; color: rgba(255,255,255,.88); padding: 12px; text-align: center; }
.card-meta { display: flex; justify-content: space-between; gap: 12px; padding: 0 6px; font-family: var(--f-mono); font-size: 12px; }
.cat { color: var(--orange); text-transform: uppercase; letter-spacing: .06em; }
.yr { color: var(--dim); font-variant-numeric: tabular-nums; }
.card h3 { margin: 0; padding: 0 6px; font-size: 19px; line-height: 1.25; }
.card p { margin: 0; padding: 0 6px; color: var(--dim); font-size: 14px; }
.empty { color: var(--dim); }

/* sobre mí */
.about { display: grid; grid-template-columns: 300px 1fr; gap: 48px; align-items: start; }
.portrait { aspect-ratio: 4/5; max-width: 100%; border-radius: 20px; overflow: hidden; background: linear-gradient(160deg, var(--panel-2), var(--panel)); border: 1px solid var(--line); display: grid; place-items: center; }
.portrait img { width: 100%; height: 100%; object-fit: cover; }
.portrait span { font-family: var(--f-display); font-weight: 900; font-size: 72px; color: var(--orange); }
.about-text { min-width: 0; display: grid; gap: 28px; }
.bio p { margin: 0 0 14px; font-size: 18px; max-width: 62ch; }
.bio p + p { color: var(--dim); }
.pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.pills span { border: 1px solid var(--line); border-radius: 999px; padding: 6px 13px; font-size: 14px; }
.tools span { background: var(--panel-2); border-color: transparent; font-family: var(--f-mono); font-size: 13px; }
.edu { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 22px; display: grid; gap: 6px; }
.edu b { font-size: 18px; }
.muted { color: var(--dim); font-size: 14px; }
.edu-thesis { margin-top: 10px; padding-top: 14px; border-top: 1px solid var(--line); }
.edu-thesis b { display: block; margin-top: 4px; }
.edu-thesis p { margin: 4px 0 0; color: var(--dim); font-size: 15px; }

/* experiencia */
.job { display: grid; grid-template-columns: 160px 1fr; gap: 24px; padding: 24px 0; border-top: 1px solid var(--line); }
.job:last-child { border-bottom: 1px solid var(--line); }
.job-yr { font-family: var(--f-mono); color: var(--orange); font-size: 14px; font-variant-numeric: tabular-nums; }
.job h3 { margin: 0; font-size: 20px; }
.job .muted { margin: 2px 0 10px; }
.job ul { margin: 0; padding-left: 18px; color: var(--dim); display: grid; gap: 2px; }
.job li::marker { color: var(--orange); }

/* contacto */
.contact { display: grid; gap: 28px; }
.contact h2 { font-size: clamp(36px, 7vw, 92px); }
.contact-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 14px; }
.c-item { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 18px; display: grid; gap: 6px; min-width: 0; }
.c-item .val { font-size: 16px; overflow-wrap: anywhere; }
.c-item a.val { text-decoration: none; }
.c-item a.val:hover { color: var(--orange); }
.copy { justify-self: start; background: transparent; border: 1px solid var(--line); border-radius: 8px; padding: 3px 10px; font-size: 12px; color: var(--dim); cursor: pointer; }
.copy:hover { color: var(--fg); }
.foot { padding-block: 28px; border-top: 1px solid var(--line); }
.foot-in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; color: var(--dim); font-size: 13px; }

/* ficha de proyecto */
.overlay { position: fixed; inset: 0; z-index: 40; background: rgba(4, 8, 18, .72); backdrop-filter: blur(6px); display: grid; place-items: center; padding: max(16px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) max(16px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); }
.sheet { background: var(--panel); border: 1px solid var(--line); border-radius: 20px; width: min(860px, 100%); max-height: 100%; overflow: auto; position: relative; }
.sheet .thumb { border-radius: 20px 20px 0 0; aspect-ratio: 16/9; }
.sheet-body { padding: 24px 28px 30px; display: grid; gap: 10px; }
.sheet-body .card-meta { padding: 0; }
.sheet-body h3 { font-family: var(--f-display); font-size: clamp(22px, 3.4vw, 32px); margin: 0; line-height: 1.15; }
.sheet-body p { margin: 0 0 10px; color: var(--dim); max-width: 64ch; }
.x { position: absolute; top: 12px; right: 12px; width: 38px; height: 38px; border-radius: 50%; border: 0; background: rgba(11, 17, 32, .78); color: var(--fg); cursor: pointer; font-size: 16px; }

@media (max-width: 860px) {
  .hero-in { grid-template-columns: 1fr; padding-block: 40px 48px; }
  .stage { max-width: 360px; width: 100%; justify-self: center; }
  .about { grid-template-columns: 1fr; gap: 28px; }
  .portrait { max-width: 260px; }
  .job { grid-template-columns: 1fr; gap: 6px; }
}
@media (max-width: 640px) {
  .links a:not(:last-child) { display: none; }
  .band { padding-block: 52px; }
  .sheet-body { padding: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card { transition: none; }
  .card:hover { transform: none; }
}
