/* ═══════════════════════════════════════════════════════════
   JAVIER MÁRQUEZ — PORTFOLIO v2 (Mobile-First)
   Syne (display) + DM Sans (body)
   #080808 · #E8FF47 · white
   ═══════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;600;700;800&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500&display=swap');

/* ─── Custom Properties ─────────────────────────── */
:root {
  --black:     #080808;
  --black-alt: #0F0F0F;
  --white:     #F0EEE9;
  --white-dim: rgba(240,238,233,.55);
  --yellow:    #E8FF47;
  --grey:      rgba(240,238,233,.18);
  --grey-line: rgba(240,238,233,.1);

  --ff-display: 'Syne', system-ui, sans-serif;
  --ff-body:    'DM Sans', system-ui, sans-serif;

  --fs-xs:   .625rem;
  --fs-sm:   .8125rem;
  --fs-base: 0.9375rem;
  --fs-md:   1rem;
  --fs-lg:   1.25rem;
  --fs-xl:   1.5rem;
  --fs-2xl:  1.75rem;
  --fs-3xl:  2rem;

  --sp-1: .25rem; --sp-2: .5rem; --sp-3: .75rem;
  --sp-4: 0.875rem;   --sp-6: 1.25rem; --sp-8: 1.5rem;
  --sp-12: 2.5rem;  --sp-16: 3rem;  --sp-24: 4rem;

  --nav-h: 64px;
  --max-w: 1160px;
  --radius: 2px;
  --t: .22s cubic-bezier(.4,0,.2,1);
}

[data-theme="light"] {
  --black:     #F5F5F5;
  --black-alt: #FFFFFF;
  --white:     #1A1A1A;
  --white-dim: rgba(26,26,26,.65);
  --yellow:    #2563EB;
  --grey:      rgba(26,26,26,.12);
  --grey-line: rgba(26,26,26,.08);
  background: linear-gradient(135deg, #f5f5f5 0%, #ffffff 50%, #f5f5f5 100%);
}

/* ─── Reset ─────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--ff-body);
  font-size: var(--fs-base);
  line-height: 1.65;
  background: linear-gradient(135deg, var(--black) 0%, #0d0d0d 50%, var(--black) 100%);
  color: var(--white);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; border: none; background: none; cursor: pointer; }
ul, ol { list-style: none; }
.d-none { display: none; }

/* ─── HUD Layer Styles ─────────────────────────────── */
#hud-layer { opacity: 1; }

/* ─── Typography baseline ────────────────────────── */
h1, h2, h3, h4 {
  font-family: var(--ff-display);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -.02em;
}
p {
  max-width: 65ch;
  color: var(--white-dim);
  line-height: 1.75;
}

/* ─── Buttons ────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: .7rem 1.75rem;
  font-family: var(--ff-body);
  font-size: var(--fs-sm);
  font-weight: 500;
  letter-spacing: .07em;
  text-transform: uppercase;
  border-radius: var(--radius);
  transition: background var(--t), color var(--t), border-color var(--t);
}
.btn-primary {
  background: var(--yellow);
  color: var(--black);
  border: 1px solid var(--yellow);
}
.btn-primary:hover { background: #fff; border-color: #fff; }
.btn-outline {
  background: transparent;
  color: var(--white);
  border: 1px solid var(--grey);
}
.btn-outline:hover { border-color: var(--white); }

.tl-link {
  font-size: var(--fs-sm);
  color: var(--yellow);
  letter-spacing: .02em;
  transition: opacity var(--t);
}
.tl-link:hover { opacity: .7; }

/* ═══════════════════════════════════════════════════
   NAVIGATION — Mobile First
   ═══════════════════════════════════════════════════ */
.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 10000;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  background: rgba(8,8,8,.7);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: background var(--t), backdrop-filter var(--t), box-shadow var(--t);
  overflow: visible;
}
.site-nav.scrolled {
  background: rgba(8,8,8,.92);
  box-shadow: 0 1px 0 var(--grey-line);
}
.nav-inner {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--sp-4);
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  overflow: visible;
}
.nav-logo {
  font-family: var(--ff-display);
  font-size: var(--fs-base);
  font-weight: 800;
  letter-spacing: .08em;
  color: var(--white);
  flex-shrink: 0;
  transition: color var(--t);
}
.nav-logo:hover { color: var(--yellow); }

/* Mobile navigation - hamburger visible, links hidden */
.nav-links {
  position: fixed;
  top: var(--nav-h);
  left: 0;
  right: 0;
  background: rgba(8,8,8,.98);
  backdrop-filter: blur(14px);
  flex-direction: column;
  gap: 0;
  padding: var(--sp-4) 0;
  border-top: 1px solid var(--grey-line);
  transform: translateY(-110%);
  opacity: 0;
  transition: transform .3s ease, opacity .3s ease;
  pointer-events: none;
  margin-left: 0;
  z-index: 10001;
}
.nav-links.open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}
.nav-link {
  font-family: var(--ff-body);
  font-size: var(--fs-xs);
  font-weight: 400;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--white-dim);
  position: relative;
  padding: var(--sp-4) var(--sp-8);
  width: 100%;
  transition: color var(--t);
}
.nav-link::after { display: none; }
.nav-link:hover, .nav-link.active { color: var(--white); }
.nav-lang {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  margin-left: auto;
  flex-shrink: 0;
}
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  background: transparent;
  border: 1px solid var(--grey-line);
  border-radius: 50%;
  cursor: pointer;
  transition: border-color var(--t), background var(--t);
}
.theme-toggle:hover { border-color: var(--yellow); background: rgba(232,255,71,.08); }
.theme-toggle svg {
  width: 18px; height: 18px;
  transition: opacity var(--t), transform var(--t);
}
.icon-sun { display: none; color: var(--white); }
.icon-moon { display: block; color: var(--white); }

[data-theme="light"] .icon-sun { display: block; }
[data-theme="light"] .icon-moon { display: none; }

[data-theme="light"] .site-nav {
  background: rgba(245,245,245,.75);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
[data-theme="light"] .site-nav.scrolled {
  background: rgba(245,245,245,.95);
  box-shadow: 0 1px 0 var(--grey-line);
}

[data-theme="light"] .theme-toggle:hover { 
  border-color: var(--yellow); 
  background: rgba(37,99,235,.08); 
}

[data-theme="light"] .nav-links {
  background: rgba(245,245,245,.97);
}

.lang-flag {
  width: 20px; height: 20px;
  object-fit: cover;
  border-radius: 50%;
  opacity: .6;
}
.lang-toggle {
  position: relative;
  display: inline-block;
  width: 36px; height: 18px;
  background: var(--grey);
  border-radius: 9px;
  cursor: pointer;
  transition: background var(--t);
}
.lang-toggle::after {
  content: '';
  position: absolute;
  top: 2px; left: 2px;
  width: 14px; height: 14px;
  background: var(--white);
  border-radius: 50%;
  transition: transform var(--t);
}
#chck_lang { display: none; }
#chck_lang:checked + .lang-toggle { background: var(--yellow); }
#chck_lang:checked + .lang-toggle::after {
  transform: translateX(18px);
  background: var(--black);
}
.nav-hamburger {
  display: flex !important;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 28px;
  height: 28px;
  padding: 4px;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 10002;
  margin-left: auto;
  margin-right: 4px;
}
.nav-hamburger span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--white);
  transition: transform var(--t), opacity var(--t);
  border-radius: 1px;
}
.nav-hamburger.open span:nth-child(1) { 
  transform: translateY(5px) rotate(45deg); 
}
.nav-hamburger.open span:nth-child(2) { 
  transform: translateY(-5px) rotate(-45deg); 
}

/* ═══════════════════════════════════════════════════
   HERO — Mobile First
   ═══════════════════════════════════════════════════ */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--black);
  overflow: hidden;
  padding-top: 30px;
}

[data-theme="light"] .hero {
  background: var(--black-alt);
}

.hero-bg-text { display: none; }
.hero-portrait { display: none !important; }

.hero-inner {
  position: relative;
  z-index: 2;
  padding: 0 var(--sp-4);
  padding-top: 60px;
  padding-bottom: var(--sp-8);
  width: 100%;
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin-bottom: var(--sp-6);
  font-family: var(--ff-body);
  font-size: var(--fs-sm);
  letter-spacing: .3em;
  text-transform: uppercase;
  opacity: .5;
  color: var(--white);
}
.hero-dot   { opacity: 1; }
.hero-avail { display: contents; }
.hero-avail::before { display: none; }

.hero-name {
  font-family: var(--ff-display);
  font-size: clamp(36px, 14vw, 52px);
  font-weight: 700;
  line-height: .95;
  letter-spacing: -.04em;
  margin-bottom: var(--sp-6);
  color: var(--white);
}
.hero-name-first { display: block; }
.hero-name-last  {
  display: block;
  color: var(--yellow);
  font-style: normal;
}

.hero-role { display: none; }

.hero-ctas {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--sp-4);
  margin-top: var(--sp-8);
}

/* .cv-form, .btn-primary, .btn-outline are rendered but custom utility classes apply here */

.hero-email-link {
  font-family: var(--ff-body);
  font-size: var(--fs-sm);
  letter-spacing: .06em;
  color: var(--yellow);
  transition: opacity var(--t);
}
.hero-email-link:hover { opacity: .7; }

.hero-counter {
  font-family: var(--ff-display);
  font-weight: 700;
  font-size: var(--fs-lg);
  letter-spacing: -.02em;
  display: flex;
  align-items: baseline;
  gap: var(--sp-2);
  color: var(--white);
  flex-shrink: 0;
  margin-top: var(--sp-4);
}
.hero-counter .counter-num { color: var(--yellow); }
.hero-counter .counter-label {
  font-family: var(--ff-body);
  font-size: var(--fs-xs);
  font-weight: 400;
  letter-spacing: .12em;
  text-transform: uppercase;
  opacity: .5;
  color: var(--white);
}

.hero-scroll-hint { display: none; }

.hero-ghost {
  position: absolute;
  font-family: 'Courier New', monospace;
  font-size: clamp(80px, 15vw, 180px);
  color: rgba(232,255,71,0.025);
  content: '>_';
  bottom: -20px;
  right: -20px;
  pointer-events: none;
  z-index: 0;
  letter-spacing: -0.05em;
  animation: blink 1.8s ease-in-out infinite;
}

/* ═══════════════════════════════════════════════════
   SECTION SHARED — Mobile First (320px base)
   ═══════════════════════════════════════════════════ */
.section { padding: var(--sp-12) 0; }
[data-theme="light"] .section:nth-child(even) { background: var(--black-alt); }
[data-theme="light"] .qual-section { background: var(--black) !important; }
[data-theme="light"] .qual-section:nth-child(even) { background: var(--black-alt) !important; }
[data-theme="light"] .skill-section { background: var(--black) !important; }
[data-theme="light"] .skill-section:nth-child(n) { background: var(--black-alt) !important; }
[data-theme="light"] .portfolio-section { background: var(--black) !important; }
[data-theme="light"] .contact-section { background: var(--black) !important; }

.qual-section { background: var(--black) !important; }
.qual-section:nth-child(even) { background: var(--black-alt) !important; }
.skill-section { background: var(--black) !important; }
.skill-section:nth-child(n) { background: var(--black-alt) !important; }

.section-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--sp-4);
}
.section-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--sp-2);
  margin-bottom: var(--sp-12);
  padding-bottom: var(--sp-6);
  border-bottom: 1px solid var(--grey-line);
}
.section-label {
  font-family: var(--ff-body);
  font-size: var(--fs-xs);
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--yellow);
  flex-shrink: 0;
}
.section-title {
  font-family: var(--ff-display);
  font-size: var(--fs-2xl);
  font-weight: 700;
  color: var(--white);
  letter-spacing: -.03em;
}

/* ═══════════════════════════════════════════════════
   ABOUT — Mobile First
   ═════════════════════════════════════════────────══ */
.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-8);
  align-items: start;
}
.about-role {
  font-family: var(--ff-display);
  font-size: var(--fs-xl);
  font-weight: 700;
  color: var(--white);
  margin-bottom: var(--sp-4);
  letter-spacing: -.02em;
}
.about-bio {
  font-size: var(--fs-base);
  color: var(--white-dim);
  margin-bottom: var(--sp-8);
  line-height: 1.8;
  max-width: 55ch;
}
.about-facts {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-4);
  margin-bottom: var(--sp-8);
}
.about-fact { display: flex; flex-direction: column; gap: 2px; }
.about-fact--full { grid-column: 1 / -1; }
.fact-label {
  font-size: var(--fs-xs);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(240,238,233,.3);
}
.fact-value { font-size: var(--fs-sm); color: var(--white-dim); }
.fact-avail {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  color: #6EFF9A;
}
.avail-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #6EFF9A;
  box-shadow: 0 0 6px #6EFF9A;
  flex-shrink: 0;
}
.about-portrait {
  border-radius: 0;
  overflow: visible;
  order: -1;
}
.about-portrait img {
  width: 100%;
  max-width: 300px;
  height: auto;
  aspect-ratio: 3/4;
  object-fit: cover;
  object-position: center top;
  filter: grayscale(100%) contrast(1.1);
  display: block;
  margin: 0 auto;
}

/* ═══════════════════════════════════════════════════
   EDUCATION & EXPERIENCE TIMELINE — Mobile First
   ═══════════════════════════════════════════════════ */
.qual-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-12);
}
.qual-col-title {
  font-family: var(--ff-display);
  font-size: var(--fs-lg);
  font-weight: 700;
  color: var(--white);
  margin-bottom: var(--sp-6);
  letter-spacing: -.02em;
}
.timeline {
  border-left: 1px solid var(--grey-line);
  padding-left: var(--sp-6);
  display: flex;
  flex-direction: column;
  gap: var(--sp-6);
}
.timeline-item { position: relative; }
.timeline-item::before {
  content: '';
  position: absolute;
  left: calc(-1 * var(--sp-6) - .5px);
  top: 6px;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--yellow);
  transform: translateX(-50%);
  box-shadow: 0 0 0 3px var(--black);
}
.timeline-item:nth-child(odd)::before { background: var(--white-dim); }
.timeline-year {
  display: block;
  font-size: var(--fs-xs);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--yellow);
  margin-bottom: 4px;
}
.timeline-body strong {
  display: block;
  font-family: var(--ff-display);
  font-size: var(--fs-md);
  font-weight: 600;
  color: var(--white);
  line-height: 1.2;
  margin-bottom: 2px;
}
.timeline-org {
  display: block;
  font-size: var(--fs-xs);
  letter-spacing: .06em;
  color: rgba(240,238,233,.3);
  margin-bottom: var(--sp-2);
}
.timeline-body p {
  font-size: var(--fs-sm);
  color: var(--white-dim);
  margin-bottom: var(--sp-2);
  max-width: none;
  line-height: 1.6;
}

/* ═══════════════════════════════════════════════════
   SKILLS — Mobile First
   ═══════════════════════════════════════════════════ */
.skills-grid, .skill-card, .skill-icon { display: none; }

.skills-marquee-wrap {
  overflow: hidden;
  border-top: 1px solid var(--grey-line);
  border-bottom: 1px solid var(--grey-line);
  padding: var(--sp-4) 0;
  margin-bottom: var(--sp-12);
}
.skills-marquee-track {
  display: flex;
  gap: 0;
  width: max-content;
  animation: marquee 30s linear infinite;
}
.skills-marquee-track:hover { animation-play-state: paused; }
.skills-marquee-inner {
  display: flex;
  align-items: center;
  white-space: nowrap;
  font-family: var(--ff-body);
  font-size: 11px;
  letter-spacing: .4em;
  text-transform: uppercase;
  opacity: .5;
  color: var(--white);
  padding-right: 6rem;
}
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}



.skills-statements {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.skills-statement {
  font-family: var(--ff-display);
  font-size: clamp(28px, 8vw, 48px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -.03em;
  color: var(--white);
  padding: var(--sp-4) 0;
  border-bottom: 1px solid var(--grey-line);
  transition: color var(--t);
}
.skills-statement:last-child { border-bottom: none; }
.skills-statement:hover { color: var(--yellow); }
.skills-statement--accent .underline-yellow {
  text-decoration: none;
  border-bottom: 2px solid var(--yellow);
  padding-bottom: 2px;
}

/* Section separators */
.section-sep {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 24px 0;
  margin: 0 auto;
}
.sep-line {
  width: 80px;
  height: 1px;
  background: rgba(240,237,232,0.08);
}
.sep-diamond {
  width: 4px; height: 4px;
  background: #E8FF47;
  transform: rotate(45deg);
  opacity: 0.4;
}

.site-nav,
.hero,
.section,
.site-footer {
  position: relative;
}

/* ═══════════════════════════════════════════════════
   PORTFOLIO — Mobile First
   ═══════════════════════════════════════════════════ */
.pf-filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  margin-bottom: var(--sp-8);
}

.pf-filter {
  font-family: var(--ff-body);
  font-size: var(--fs-sm);
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--white-dim);
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  transition: color var(--t), opacity var(--t);
  opacity: 0.6;
}
.pf-filter:hover { color: var(--white); opacity: 0.7; }
.pf-filter.active { color: var(--yellow); opacity: 1; }

.pf-row.hidden {
  display: none;
}

.pf-sep {
  color: var(--white-dim);
  opacity: 0.3;
  margin: 0 var(--sp-2);
}

/* --- Fixed Asymmetric HUD Grid --- */
.portfolio-section {
  position: relative;
  padding: var(--sp-12) 0;
  overflow: visible;
}

.pf-list {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2px;
  width: 100%;
  list-style: none;
  padding: 0;
  background: rgba(232, 255, 71, 0.15);
  border: 1px solid rgba(232, 255, 71, 0.15);
}

.pf-row {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 160px;
  max-height: 160px;
  padding: var(--sp-4);
  cursor: pointer;
  text-decoration: none;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transition: opacity 0.3s ease;
  overflow: hidden;
  background-color: #050505;
}

/* Fila 1: proyecto 01 ocupa columnas 1-2, proyecto 02 columna 3 */
.pf-row:nth-child(1) { grid-column: span 2; }

/* Fila 2: proyectos 03, 04, 05 cada uno en su columna (son 3, 4, 5) */
.pf-row:nth-child(2),
.pf-row:nth-child(3),
.pf-row:nth-child(4),
.pf-row:nth-child(5) { grid-column: span 1; }

/* Fila 3: proyectos 06, 07 en columnas 1 y 2 */
.pf-row:nth-child(6) { grid-column: 1; }
.pf-row:nth-child(7) { grid-column: 2; }

/* Overlay */
.pf-row::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  transition: background 0.3s ease;
  z-index: 1;
}

.pf-row:hover::before {
  background: rgba(0, 0, 0, 0.5);
}

/* Hover Global Fade */
.pf-list:hover .pf-row {
  opacity: 0.6;
}

.pf-list .pf-row:hover {
  opacity: 1;
  z-index: 10;
}

.pf-num {
  position: absolute;
  top: 8px;
  left: 8px;
  font-family: var(--ff-body);
  font-size: 10px;
  color: var(--yellow);
  opacity: 0.8;
  z-index: 6;
  letter-spacing: 0.05em;
  background: rgba(0,0,0,0.5);
  padding: 2px 4px;
}

.pf-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  z-index: 5;
  width: 100%;
  height: 100%;
}

.pf-name {
  font-family: var(--ff-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--white);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin: auto;
}

.pf-row:nth-child(1) .pf-name {
  font-size: 1.8rem;
}

/* Efecto Glitch en hover */
@keyframes glitch {
  0% { text-shadow: 2px 0 var(--yellow), -2px 0 var(--white); }
  25% { text-shadow: -2px 0 var(--yellow), 2px 0 var(--white); }
  50% { text-shadow: 2px 0 var(--yellow), -2px 0 var(--white); }
  75% { text-shadow: -2px 0 var(--yellow), 2px 0 var(--white); }
  100% { text-shadow: 2px 0 var(--yellow), -2px 0 var(--white); }
}

.pf-row:hover .pf-name {
  animation: glitch 0.3s ease-in-out infinite;
}

.pf-meta {
  position: absolute;
  bottom: 12px;
  left: 0;
  right: 0;
  padding: 0 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--ff-body);
  font-size: 9px;
  color: var(--white);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.5;
  z-index: 6;
}

.pf-tags {
  text-align: left;
}

.pf-year {
  text-align: right;
}

/* Hide unused/legacy */
.pf-desc, .pf-arrow, .pf-mobile-thumb, .pf-preview { display: none !important; }

/* Responsive Grid - mantener estructura básica en tablet */
@media (max-width: 992px) {
  .pf-list {
    grid-template-columns: 2fr 1fr 1fr;
    gap: 2px;
  }
  .pf-row:first-child {
    grid-column: span 2;
  }
  .pf-row:nth-child(6) { grid-column: 1; }
  .pf-row:nth-child(7) { grid-column: 2; }
  .pf-row {
    height: 160px;
    max-height: 160px;
  }
}

@media (max-width: 600px) {
  .pf-list {
    grid-template-columns: 1fr;
    gap: 2px;
  }
  .pf-row:first-child {
    grid-column: span 1;
  }
  .pf-row:nth-child(n) {
    grid-column: span 1;
  }
  .pf-row {
    height: 160px;
    max-height: 160px;
  }
}

/* Responsive adjustments for the table */
@media (max-width: 768px) {
  .pf-name { font-size: 13px; }
  .pf-tags { font-size: 8px; }
}



/* ═══════════════════════════════════════════════════
   CONTACT — Mobile First
   ═══════════════════════════════════════════════════ */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-8);
  align-items: start;
}
.contact-statement {
  font-family: var(--ff-display);
  font-size: var(--fs-xl);
  font-weight: 700;
  color: var(--white);
  line-height: 1.2;
  margin-bottom: var(--sp-8);
  max-width: none;
  letter-spacing: -.02em;
}
.contact-channels {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  margin-bottom: var(--sp-6);
}
.contact-channel {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: var(--sp-4) 0;
  border-bottom: 1px solid var(--grey-line);
  transition: padding-left var(--t);
}
.contact-channel:hover { padding-left: var(--sp-2); }
.channel-label {
  font-size: var(--fs-xs);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--yellow);
}
.channel-value { font-size: var(--fs-base); color: var(--white-dim); }
.contact-socials {
  display: flex;
  gap: var(--sp-4);
  margin-top: var(--sp-6);
}
.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border: 1px solid var(--grey-line);
  border-radius: var(--radius);
  transition: border-color var(--t), background var(--t);
}
.social-link:hover { border-color: var(--yellow); background: rgba(232,255,71,.08); }
.social-link svg { width: 17px; height: 17px; fill: var(--white-dim); }

.contact-cta-buttons {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  margin-top: var(--sp-6);
}
.cta-button {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-3);
  padding: var(--sp-4) var(--sp-6);
  font-family: var(--ff-display);
  font-size: var(--fs-md);
  font-weight: 600;
  text-decoration: none;
  border-radius: 4px;
  transition: transform var(--t), box-shadow var(--t);
}
.cta-button svg { width: 24px; height: 24px; }
.cta-email {
  background: var(--white);
  color: var(--black);
  border: 2px solid var(--white);
}
.cta-email:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(255,255,255,.15);
}
.cta-whatsapp {
  background: #25D366;
  color: #fff;
  border: 2px solid #25D366;
}
.cta-whatsapp:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(37,211,102,.35);
}

/* ═══════════════════════════════════════════════════
   FOOTER — Mobile First (320px base)
   ═══════════════════════════════════════════════════ */
.site-footer {
  padding: var(--sp-8) 0;
  border-top: 1px solid var(--grey-line);
  background: var(--black);
}
.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--sp-4);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--sp-4);
}
.footer-name {
  font-family: var(--ff-display);
  font-size: var(--fs-lg);
  font-weight: 700;
  color: var(--white);
  letter-spacing: -.01em;
}
.footer-copy {
  font-size: var(--fs-xs);
  letter-spacing: .06em;
  color: rgba(240,238,233,.3);
}
.footer-socials { display: flex; gap: var(--sp-6); }
.footer-socials a {
  font-size: var(--fs-xs);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(240,238,233,.3);
  transition: color var(--t);
}
.footer-socials a:hover { color: var(--yellow); }

.back-to-top {
  position: fixed;
  bottom: var(--sp-8);
  right: var(--sp-8);
  z-index: 50;
  width: 44px; height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--black-alt);
  border: 1px solid var(--grey-line);
  border-radius: var(--radius);
  font-size: var(--fs-base);
  color: var(--white-dim);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t), border-color var(--t);
}
.back-to-top.visible { opacity: 1; pointer-events: auto; }
.back-to-top:hover { border-color: var(--yellow); color: var(--yellow); }

/* Code floats */
.code-float { display: none; }

@keyframes blink {
  0%,100% { opacity: 0.028; }
  50%      { opacity: 0.07; }
}

/* ═══════════════════════════════════════════════════
   MOBILE BASE STYLES (320px - 767px)
   These styles apply to mobile by default
   ═══════════════════════════════════════════════════ */
:root { --nav-h: 56px; }

.site-nav { height: var(--nav-h); }

.nav-inner {
  padding: 0 20px;
  gap: 12px;
}

.nav-logo {
  font-size: 18px;
  z-index: 101;
}

/* Hide theme toggle and lang on mobile */
.nav-lang {
  display: flex !important;
  align-items: center;
  gap: var(--sp-2);
  margin-left: auto;
}

/* Keep mobile controls compact */
.theme-toggle {
  width: 32px;
  height: 32px;
}

.lang-flag {
  width: 18px;
  height: 18px;
}

/* Full-width dropdown menu */
.nav-links {
  top: var(--nav-h);
  left: 0;
  right: 0;
  width: 100%;
  background: rgba(8,8,8,.98);
  border-top: 1px solid var(--grey-line);
  z-index: 100;
}

[data-theme="light"] .nav-links {
  background: rgba(245,245,245,.98);
}

/* Hero eyebrow text */
.hero-meta {
  font-size: 9px;
  letter-spacing: 0.15em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 85vw;
  gap: var(--sp-2);
}

/* Hero name */
.hero-name {
  font-size: clamp(48px, 14vw, 72px);
  line-height: 1.0;
  margin-bottom: 24px;
}

/* Hero padding */
.hero {
  padding-top: 30px;
  min-height: 100svh;
  justify-content: center;
}

.hero-inner {
  padding-left: 20px;
  padding-right: 20px;
  padding-bottom: 48px;
}

/* Additional mobile fixes */
.hero-counter {
  font-size: var(--fs-md);
  margin-top: var(--sp-4);
}

.hero-email-link {
  font-size: var(--fs-xs);
}

.section-title {
  font-size: var(--fs-xl);
}

/* About section buttons - same size */
.about-section .btn {
  display: flex;
  width: 100%;
  text-align: center;
  justify-content: center;
  box-sizing: border-box;
}
.about-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.pf-filters {
  gap: var(--sp-2);
  margin-bottom: var(--sp-6);
}

.pf-filter {
  font-size: var(--fs-xs);
}

.contact-grid {
  gap: var(--sp-6);
}

.footer-inner {
  padding: 0 20px;
}

/* ═══════════════════════════════════════════════════
   BREAKPOINT: 320px — Small phones
   ═══════════════════════════════════════════════════ */
@media (min-width: 320px) {
  .section-inner { padding: 0 var(--sp-4); }
  .nav-inner { padding: 0 var(--sp-4); }
  .footer-inner { padding: 0 var(--sp-4); }
  
  .hero-inner { padding: 0 var(--sp-4) var(--sp-12); }
  .hero-name { font-size: clamp(36px, 14vw, 52px); }
  .hero-counter { font-size: var(--fs-base); }
  
  .section-title { font-size: var(--fs-xl); }
  .section-header { margin-bottom: var(--sp-10); }
  
  .skills-statement { font-size: clamp(24px, 6vw, 36px); }
  
  .pf-name { font-size: clamp(18px, 5vw, 22px); }
  
  .contact-statement { font-size: var(--fs-lg); }
  .contact-cta-buttons { 
    gap: var(--sp-3); 
  }
  .cta-button { 
    padding: var(--sp-4) var(--sp-6); 
    font-size: var(--fs-md);
    min-height: 52px;
  }
}

/* ═══════════════════════════════════════════════════
   BREAKPOINT: 480px — Small tablets
   ═══════════════════════════════════════════════════ */
@media (min-width: 480px) {
  .section-inner { padding: 0 var(--sp-6); }
  .nav-inner { padding: 0 var(--sp-6); }
  .footer-inner { padding: 0 var(--sp-6); }
  
  .hero-inner { padding: 0 var(--sp-6) var(--sp-16); }
  .hero-name { font-size: clamp(52px, 14vw, 90px); }
  .hero-counter { font-size: var(--fs-lg); }
  
  .section-title { font-size: var(--fs-3xl); }
  .skills-statement { font-size: clamp(32px, 6vw, 56px); }
  
  .about-facts { grid-template-columns: 1fr 1fr; }
  
  .contact-statement { font-size: var(--fs-2xl); }
  .contact-grid { gap: var(--sp-12); }
  
  .pf-name { font-size: clamp(22px, 4vw, 32px); }
  .pf-tags { font-size: 10px; display: block; }
  .pf-year { display: block; }
}

/* ═══════════════════════════════════════════════════
   BREAKPOINT: 640px — Tablets
   ═══════════════════════════════════════════════════ */
@media (min-width: 640px) {
  .section { padding: var(--sp-20) 0; }
  .section-inner { padding: 0 var(--sp-8); }
  .nav-inner { padding: 0 var(--sp-8); gap: var(--sp-6); }
  .footer-inner { padding: 0 var(--sp-8); }
  
  .hero-inner { padding: 0 var(--sp-8) var(--sp-20); }
  .hero-name { font-size: clamp(60px, 11vw, 120px); }
  .hero-ctas {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
  }
  .hero-counter { margin-top: 0; }
  
  .section-header {
    flex-direction: row;
    align-items: baseline;
    gap: var(--sp-4);
    margin-bottom: var(--sp-16);
  }
  
  .about-grid { gap: var(--sp-12); }
  .about-role { font-size: var(--fs-2xl); margin-bottom: var(--sp-6); }
  .about-bio { font-size: var(--fs-md); margin-bottom: var(--sp-12); }
  .about-facts { grid-template-columns: 1fr 1fr; margin-bottom: var(--sp-12); }
  
  .qual-grid { gap: var(--sp-16); }
  .qual-col-title { font-size: var(--fs-xl); margin-bottom: var(--sp-8); }
  .timeline { padding-left: var(--sp-8); gap: var(--sp-8); }
  .timeline-item::before { left: calc(-1 * var(--sp-8) - .5px); }
  .timeline-body strong { font-size: var(--fs-lg); }
  
  .skills-marquee-wrap { margin-bottom: var(--sp-16); }
  
  .pf-filters { gap: var(--sp-4); margin-bottom: var(--sp-12); }
  .pf-mobile-thumb { height: 220px; }
  
  .contact-grid { gap: var(--sp-12); }
  .contact-statement { font-size: var(--fs-2xl); margin-bottom: var(--sp-12); }
  .contact-channels { gap: var(--sp-4); margin-bottom: var(--sp-8); }
  .contact-cta-buttons {
    flex-direction: row;
    margin-top: var(--sp-8);
  }
  
  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

/* ═══════════════════════════════════════════════════
   BREAKPOINT: 768px — Tablets landscape / Small desktop
   ═══════════════════════════════════════════════════ */
@media (min-width: 768px) {
  :root { --max-w: 92%; --nav-h: 64px; }
  
  /* Navigation - horizontal on desktop */
  .nav-inner {
    padding: 0 var(--sp-8);
    gap: var(--sp-6);
    max-width: var(--max-w);
    margin: 0 auto;
  }
  .nav-links {
    display: flex !important;
    position: static;
    transform: none;
    opacity: 1;
    pointer-events: auto;
    background: transparent !important;
    backdrop-filter: none;
    flex-direction: row;
    gap: var(--sp-8);
    padding: 0;
    border: none;
    margin-left: auto !important;
    width: auto;
  }
  .nav-link {
    padding: 0;
    width: auto;
    font-size: var(--fs-sm);
    font-weight: 500;
  }
  .nav-link::after {
    display: block;
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--yellow);
    transition: width var(--t);
  }
  .nav-link:hover::after,
  .nav-link.active::after { width: 100%; }

  .nav-hamburger { display: none !important; }
  
  .nav-lang { 
    display: flex !important; 
    margin-left: var(--sp-4); 
    gap: var(--sp-3);
  }
  
  .nav-logo {
    font-size: var(--fs-lg);
  }
  
  [data-theme="light"] .nav-links { background: transparent; }
  
  /* Hero */
  .hero-inner {
    padding: 0 clamp(var(--sp-8), 6vw, var(--sp-24));
    padding-bottom: var(--sp-24);
    padding-top: 0;
  }
  .hero {
    padding-top: var(--nav-h);
    justify-content: flex-end;
  }
  .hero-name { font-size: clamp(60px, 11vw, 130px); }
  
  /* Sections */
  .section { padding: var(--sp-24) 0; }
  
  /* About */
  .about-grid { grid-template-columns: 1fr 280px; }
  .about-portrait { order: 0; }
  .about-portrait img {
    width: 280px;
    height: 360px;
    clip-path: polygon(0 0, 85% 0, 100% 15%, 100% 100%, 0 100%);
  }
  .about-actions {
    flex-direction: row;
    width: auto;
    gap: var(--sp-4);
  }
  .about-section .btn {
    display: inline-flex;
    width: auto;
    text-align: left;
    justify-content: flex-start;
  }
  
  /* Portfolio - show preview on hover */
  .pf-name { font-size: clamp(28px, 3.5vw, 42px); }
  .pf-row:hover { padding-left: calc(var(--sp-8) + 20px); }
  .pf-desc { padding-left: 0; grid-column: 2 / 5; font-size: 15px; }
  
  /* Show floating preview on desktop */
  .pf-preview {
    display: block;
    position: fixed;
    right: 48px;
    top: 50%;
    transform: translateY(-50%);
    width: 380px;
    height: 240px;
    z-index: 100;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
  }
  .pf-preview.visible { opacity: 1; }
  .pf-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: 1px solid rgba(232,255,71,0.2);
  }
  
  /* Contact */
  .contact-grid { grid-template-columns: 1fr 1fr; gap: var(--sp-16); }
  
  /* Footer */
  .code-float { display: block; }
}

/* ═══════════════════════════════════════════════════
   BREAKPOINT: 1024px — Desktop
   ═══════════════════════════════════════════════════ */
@media (min-width: 1024px) {
  :root { --max-w: 1160px; --nav-h: 72px; }
  
  .section-inner { padding: 0 var(--sp-8); }
  
  .hero-name { font-size: clamp(72px, 12vw, 160px); }
  
  .qual-grid { grid-template-columns: 1fr 1fr; }
  
  .skills-statement {
    font-size: clamp(32px, 5vw, 64px);
  }
}

/* ═══════════════════════════════════════════════════
   BREAKPOINT: 1280px — Large Desktop
   ═══════════════════════════════════════════════════ */
@media (min-width: 1280px) {
  .hero-inner { padding-bottom: var(--sp-24); }
  
  .section { padding: var(--sp-24) 0; }
}
