/*
Theme Name: Bascuñán Digital
Theme URI: https://bascunan.digital
Author: Alonso Bascuñán
Author URI: https://bascunan.digital
Description: Tema base a medida para el portafolio one-page de Alonso Bascuñán — diseñador UX/UI y desarrollador front-end. Incluye CPT de Proyectos (con página individual indexable por proyecto) y Trayectoria, Personalizador para todo el copy, y SEO básico integrado (meta description, Open Graph, Twitter Card, JSON-LD, canonical).
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: bascunan-digital
*/

/* =============================================================
   TOKENS DE MARCA
   ============================================================= */
:root{
  --blue:       #2429E6;
  --blue-deep:  #12154F;
  --lime:       #D6ED4A;
  --paper:      #F6F5F1;
  --ink:        #0B0B14;
  --white:      #FFFFFF;

  --font-display: 'Space Grotesk', sans-serif;
  --font-mono:    'Space Mono', monospace;
  --font-body:    'Inter', sans-serif;

  --nav-h: 76px;
}

*,*::before,*::after{ box-sizing:border-box; }
html{ scroll-behavior:smooth; }

/* El header es fixed — sin esto, saltar a #trabajo, #stack, etc. deja
   el título tapado detrás del header. */
section[id], footer[id]{ scroll-margin-top: calc(var(--nav-h) + 20px); }

@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior:auto; }
  *,*::before,*::after{ animation-duration:.001ms !important; animation-iteration-count:1 !important; transition-duration:.001ms !important; }
}

body{
  margin:0;
  font-family:var(--font-body);
  color:var(--ink);
  background:var(--paper);
  -webkit-font-smoothing:antialiased;
}

a{ text-decoration:none; color:inherit; }
img{ max-width:100%; height:auto; }

a:focus-visible,
button:focus-visible{
  outline:2px solid var(--blue);
  outline-offset:3px;
  border-radius:2px;
}

.skip-link{
  position:absolute; top:-48px; left:1rem;
  background:var(--lime); color:var(--ink);
  padding:.6rem 1rem; border-radius:6px;
  font-family:var(--font-mono); font-size:.85rem;
  z-index:2000; transition:top .2s ease;
}
.skip-link:focus{ top:1rem; }

/* =============================================================
   ESTILOS COMUNES / MAQUETACIÓN EDITORIAL
   ============================================================= */
.section-padding { padding-block: 120px; }
@media (max-width: 768px) { .section-padding { padding-block: 80px; } }

.section-eyebrow {
  font-family: var(--font-mono);
  color: var(--blue);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.section-eyebrow::before { content: "//"; color: var(--lime); font-weight: bold; }

.section-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 3.5rem;
}

/* =============================================================
   EFECTO DE SCROLL — reveal progresivo
   ============================================================= */
.reveal{ opacity:0; transform:translateY(24px); transition:opacity .6s ease, transform .6s ease; }
.reveal.is-visible{ opacity:1; transform:translateY(0); }
.hybrid-grid > div:nth-child(1) .reveal{ transition-delay:0s; }
.hybrid-grid > div:nth-child(2) .reveal{ transition-delay:.1s; }
.hybrid-grid > div:nth-child(3) .reveal{ transition-delay:.2s; }
.stack-grid > .stack-card.reveal:nth-child(1){ transition-delay:0s; }
.stack-grid > .stack-card.reveal:nth-child(2){ transition-delay:.1s; }
.stack-grid > .stack-card.reveal:nth-child(3){ transition-delay:.2s; }

/* =============================================================
   HEADER
   ============================================================= */
.site-header{
  position:fixed; top:0; left:0; right:0; z-index:1000;
  padding-block:20px; background:transparent;
  transition:padding-block .3s ease, background-color .3s ease, box-shadow .3s ease;
}
.site-header.is-scrolled{
  padding-block:12px; background:rgba(11,11,20,.82);
  backdrop-filter:blur(10px); -webkit-backdrop-filter:blur(10px);
  box-shadow:0 1px 0 rgba(255,255,255,.08);
}

.brand{
  display:inline-flex; align-items:center; gap:.6rem;
  color:var(--white); font-family:var(--font-display);
  font-weight:700; font-size:1.05rem; letter-spacing:-.01em;
}
.brand-mark{ width:26px; height:30px; color:var(--lime); flex-shrink:0; }

.nav-link-custom{
  font-family:var(--font-mono); font-size:.85rem; letter-spacing:.02em;
  color:rgba(255,255,255,.82); padding:.4rem 0; position:relative;
}
.nav-link-custom::after{
  content:""; position:absolute; left:0; right:0; bottom:-2px;
  height:1px; background:var(--lime);
  transform:scaleX(0); transform-origin:left; transition:transform .25s ease;
}
.nav-link-custom:hover, .nav-link-custom:focus-visible{ color:var(--white); }
.nav-link-custom:hover::after, .nav-link-custom:focus-visible::after{ transform:scaleX(1); }
.nav-link-custom.is-active{ color:var(--white); }
.nav-link-custom.is-active::after{ transform:scaleX(1); }

.btn-cv{
  font-family:var(--font-mono); font-size:.8rem;
  color:var(--lime); border:1px solid var(--lime);
  padding:.55rem 1.15rem; border-radius:999px;
  transition:background-color .2s ease, color .2s ease; white-space:nowrap;
  display:inline-block;
}
.btn-cv:hover, .btn-cv:focus-visible{ background:var(--lime); color:var(--ink); }

.navbar-toggler{
  border:0; background:transparent; padding:.5rem;
  display:inline-flex; flex-direction:column; gap:5px;
}
.navbar-toggler .toggler-line{
  width:24px; height:2px; background:var(--white);
  transition:transform .3s ease, opacity .3s ease;
}
.navbar-toggler[aria-expanded="true"] .toggler-line:first-child{ transform:translateY(3.5px) rotate(45deg); }
.navbar-toggler[aria-expanded="true"] .toggler-line:last-child{ transform:translateY(-3.5px) rotate(-45deg); }

#navMenu{ font-size:1rem; }
@media (max-width: 991.98px){
  #navMenu{ background:rgba(11,11,20,.92); margin-top:16px; padding:20px; border-radius:14px; }
  #navMenu .nav-link-custom{ display:block; padding:.65rem 0; font-size:.95rem; color: var(--white); }
  #navMenu .btn-cv{ display:inline-block; margin-top:.5rem; }
}

/* =============================================================
   HERO
   ============================================================= */
#hero{
  position:relative; overflow:hidden;
  min-height:100vh; min-height:100svh;
  display:flex; align-items:center;
  padding-block: calc(var(--nav-h) + 2.5rem) 3.5rem;
  background:linear-gradient(165deg, var(--blue) 55%, var(--blue-deep) 100%);
  color:var(--white);
}

.hero-mark{
  position:absolute; color:var(--lime); opacity:.10; pointer-events:none;
  width:78vw; right:-22%; bottom:-10%; top:auto; transform:none;
}
@media (min-width:768px){
  .hero-mark{ width:52vw; right:-10%; top:50%; bottom:auto; transform:translateY(-50%); opacity:.13; }
}
@media (min-width:1200px){ .hero-mark{ width:36vw; right:0%; opacity:.16; } }

.eyebrow{
  font-family:var(--font-mono); color:var(--lime);
  font-size:.85rem; letter-spacing:.08em;
  display:inline-flex; align-items:center; gap:.5rem; margin-bottom:1.1rem;
}
.eyebrow .cursor{ width:2px; height:.9em; background:var(--lime); animation:blink 1.1s steps(1) infinite; }
@keyframes blink{ 50%{ opacity:0; } }

.hero-title{
  font-family:var(--font-display); font-weight:700;
  font-size:clamp(2.1rem, 6vw, 4.25rem);
  line-height:1.06; letter-spacing:-.02em; margin:0 0 1.4rem;
}

.hero-lede{
  font-family:var(--font-body); font-size:clamp(1rem, 1.6vw, 1.15rem);
  line-height:1.65; color:rgba(255,255,255,.82); max-width:52ch; margin:0 0 2.3rem;
}

.hero-actions{ display:flex; flex-direction:column; gap:.9rem; }
@media (min-width:576px){ .hero-actions{ flex-direction:row; gap:1rem; } }

.btn-solid, .btn-outline-custom{
  font-family:var(--font-mono); font-size:.85rem;
  padding:.95rem 1.85rem; border-radius:999px;
  display:inline-flex; align-items:center; justify-content:center; gap:.55rem;
  transition:transform .22s ease, box-shadow .22s ease, background-color .22s ease, color .22s ease, border-color .22s ease;
}
.btn-solid{ background:var(--lime); color:var(--ink); border:1px solid var(--lime); }
.btn-solid:hover, .btn-solid:focus-visible{
  transform:translateY(-2px); box-shadow:0 10px 24px rgba(216,242,74,.25); color:var(--ink);
}
.btn-outline-custom{ background:transparent; color:var(--white); border:1px solid rgba(255,255,255,.4); }
.btn-outline-custom:hover, .btn-outline-custom:focus-visible{
  border-color:var(--lime); color:var(--lime); transform:translateY(-2px);
}

.scroll-cue{
  position:absolute; left:50%; bottom:28px; transform:translateX(-50%);
  color:rgba(255,255,255,.6); animation:bob 2.2s ease-in-out infinite; display:none;
}
@media (min-width:768px){ .scroll-cue{ display:inline-flex; } }
@keyframes bob{ 0%,100%{ transform:translate(-50%,0); } 50%{ transform:translate(-50%,6px); } }

/* =============================================================
   SOBRE MÍ / ENFOQUE HÍBRIDO & TRAYECTORIA
   ============================================================= */
#sobre-mi { background-color: var(--paper); color: var(--ink); }

.hybrid-card{ border-top: 1px solid rgba(11, 11, 20, 0.15); padding-top: 1.8rem; height: 100%; }
.hybrid-num{ font-family: var(--font-mono); color: var(--blue); font-weight: 700; font-size: 1rem; margin-bottom: 0.8rem; }
.hybrid-title{ font-family: var(--font-display); font-weight: 700; font-size: 1.4rem; margin-bottom: 1rem; letter-spacing: -0.01em; }
.hybrid-text{ font-size: 0.95rem; line-height: 1.65; color: rgba(11, 11, 20, 0.8); }

.timeline-container{ margin-top: 5rem; border-top: 1px dashed rgba(11, 11, 20, 0.2); padding-top: 4rem; }
.timeline-row{ display: flex; padding-block: 1.8rem; border-bottom: 1px solid rgba(11, 11, 20, 0.08); }
.timeline-row:last-child{ border-bottom: none; }
.timeline-years{ width: 180px; flex-shrink: 0; font-family: var(--font-mono); font-size: 0.95rem; color: var(--blue); font-weight: 700; }
.timeline-body{ flex-grow: 1; }
.timeline-role{ font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; margin-bottom: 0.2rem; }
.timeline-place{ font-family: var(--font-body); font-size: 0.95rem; color: rgba(11, 11, 20, 0.6); margin-bottom: 0.6rem; font-weight: 500; }
.timeline-desc{ font-size: 0.9rem; line-height: 1.6; color: rgba(11, 11, 20, 0.75); margin: 0; }

@media (max-width: 768px) {
  .timeline-row{ flex-direction: column; gap: 0.5rem; }
  .timeline-years{ width: auto; margin-bottom: 0.2rem; }
}

/* =============================================================
   TRABAJO (PROYECTOS DESTACADOS)
   ============================================================= */
#trabajo{ background-color: var(--blue-deep); color: var(--white); }
#trabajo .section-eyebrow{ color: var(--lime); }

.project-item{
  background-color: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px; overflow: hidden; margin-bottom: 4rem;
  transition: transform 0.3s ease, border-color 0.3s ease;
}
.project-item:hover{ transform: translateY(-4px); border-color: rgba(216, 238, 74, 0.3); }

.project-visual{
  background-color: rgba(255, 255, 255, 0.01);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  min-height: 260px;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.project-content-block{ padding: 3rem; }
@media (max-width: 768px) { .project-content-block { padding: 1.8rem; } }

.project-concept{ font-family: var(--font-mono); color: var(--lime); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.8rem; }
.project-title{ font-family: var(--font-display); font-weight: 700; font-size: 1.8rem; margin-bottom: 1.8rem; }
.project-meta-grid{ display: grid; grid-template-columns: 95px 1fr; gap: 0.8rem 1rem; font-size: 0.9rem; margin-bottom: 2rem; }
.project-label{ font-family: var(--font-mono); color: rgba(255, 255, 255, 0.5); }
.project-val{ color: rgba(255, 255, 255, 0.85); line-height: 1.5; }
.project-tags{ display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 2.2rem; padding-top: 1.2rem; border-top: 1px solid rgba(255, 255, 255, 0.08); }
.tag{ font-family: var(--font-mono); font-size: 0.75rem; background: rgba(255, 255, 255, 0.06); color: rgba(255, 255, 255, 0.8); padding: 0.35rem 0.8rem; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.04); }
.project-links{ display: flex; gap: 1.5rem; flex-wrap: wrap; }
.project-link-action{ font-family: var(--font-mono); font-size: 0.85rem; color: var(--white); display: inline-flex; align-items: center; gap: 0.4rem; transition: color 0.2s ease; }
.project-link-action:hover{ color: var(--lime); }
.project-link-action.primary{ color: var(--lime); }

/* =============================================================
   STACK & HERRAMIENTAS
   ============================================================= */
#stack{ background-color: var(--paper); color: var(--ink); }

.stack-grid{ display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 2rem; }
.stack-card{ background: var(--white); border: 1px solid rgba(11, 11, 20, 0.06); border-radius: 16px; padding: 2.5rem; transition: box-shadow 0.3s ease, transform 0.3s ease; }
.stack-card:hover{ box-shadow: 0 15px 35px rgba(18, 21, 79, 0.04); transform: translateY(-2px); }
.stack-category{ font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; margin-bottom: 1.5rem; color: var(--blue); border-bottom: 2px solid var(--lime); padding-bottom: 0.5rem; display: inline-block; }
.stack-list{ list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.8rem; }
.stack-item{ font-size: 0.95rem; color: rgba(11, 11, 20, 0.8); display: flex; align-items: center; gap: 0.6rem; }
.stack-item::before{ content: "→"; font-family: var(--font-mono); color: var(--blue); font-weight: bold; }

/* =============================================================
   CONTACTO / FOOTER
   ============================================================= */
#contacto{
  background: linear-gradient(165deg, var(--blue-deep) 0%, #0b0b14 100%);
  color: var(--white); padding-block: 120px 60px;
}
#contacto .section-eyebrow{ color: var(--lime); }

.contact-text{ font-size: clamp(1.2rem, 2vw, 1.5rem); line-height: 1.65; color: rgba(255, 255, 255, 0.85); margin-bottom: 3rem; max-width: 62ch; }
.contact-meta-group{ display: flex; flex-direction: column; gap: 1.2rem; margin-bottom: 4rem; }
.contact-meta-item{ display: block; font-size: 1.05rem; color: rgba(255, 255, 255, 0.8); line-height: 1.6; }
.contact-meta-item strong{ color: var(--lime); font-family: var(--font-mono); font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.05em; display: inline-block; min-width: 110px; }
.contact-meta-item a{ color: rgba(255,255,255,.85); border-bottom:1px solid rgba(255,255,255,.3); transition:color .2s ease, border-color .2s ease; }
.contact-meta-item a:hover, .contact-meta-item a:focus-visible{ color: var(--lime); border-color: var(--lime); }

.footer-bottom{
  border-top: 1px solid rgba(255, 255, 255, 0.08); padding-top: 2.5rem; margin-top: 5rem;
  font-size: 0.85rem; color: rgba(255, 255, 255, 0.45);
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1.5rem;
}
.footer-links{ display: flex; gap: 1.5rem; flex-wrap:wrap; }
.footer-links a{ color: rgba(255, 255, 255, 0.6); transition: color 0.2s ease; }
.footer-links a:hover{ color: var(--lime); }

/* =============================================================
   PÁGINA INDIVIDUAL DE PROYECTO Y ARCHIVO
   ============================================================= */
.single-proyecto-back{ font-family: var(--font-mono); font-size: .85rem; }
.single-proyecto-back a{ color: var(--blue); }
