/* ============================================================
   MIZAEL ANTONIO TOVAR REYES — CURRICULUM VITAE
   style.css — Complete production stylesheet
   ============================================================ */

/* ── 1. GOOGLE FONTS ───────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;600;700;800&family=JetBrains+Mono:wght@300;400;500;700&family=Outfit:wght@300;400;500;600;700&display=swap');

/* ── 2. CSS VARIABLES & RESET ──────────────────────────────── */
:root {
  --bg:       #030508;
  --bg1:      #080c14;
  --bg2:      #0d1220;
  --bg3:      #111827;
  --cyan:     #00ffc3;
  --cyan2:    #00d4a8;
  --purple:   #7c3aed;
  --purple2:  #6d28d9;
  --gold:     #f59e0b;
  --red:      #ef4444;
  --white:    #f1f5f9;
  --muted:    #64748b;
  --muted2:   #94a3b8;
  --border:   rgba(0,255,195,0.12);
  --border2:  rgba(0,255,195,0.25);
  --glow:     0 0 20px rgba(0,255,195,0.3), 0 0 60px rgba(0,255,195,0.1);
  --glow-p:   0 0 20px rgba(124,58,237,0.4), 0 0 60px rgba(124,58,237,0.15);
  --font-d:   'Syne', sans-serif;
  --font-m:   'JetBrains Mono', monospace;
  --font-b:   'Outfit', sans-serif;
  --ease:     cubic-bezier(0.16, 1, 0.3, 1);
  --ease2:    cubic-bezier(0.4, 0, 0.2, 1);
  --r:        12px;
  --r2:       20px;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background: var(--bg);
  color: var(--white);
  font-family: var(--font-b);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { cursor: pointer; font-family: inherit; }
ul, ol { list-style: none; }

/* ── 3. CUSTOM SCROLLBAR ───────────────────────────────────── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--cyan); border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: var(--cyan2); }

/* ── 4. SCANLINES ──────────────────────────────────────────── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 2px,
    rgba(0, 255, 195, 0.015) 2px,
    rgba(0, 255, 195, 0.015) 4px
  );
  pointer-events: none;
  z-index: 9999;
}

/* ── 5. CUSTOM CURSOR — removed for performance ─────────────── */

/* ── 6. LOADER ─────────────────────────────────────────────── */
#loader {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 99998;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  transition: opacity 0.6s var(--ease), visibility 0.6s;
}
#loader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.loader-logo {
  font-family: var(--font-d);
  font-size: clamp(1.4rem, 5vw, 3.2rem);
  font-weight: 800;
  letter-spacing: 0.12em;
  letter-spacing: 0.2em;
  color: transparent;
  -webkit-text-stroke: 2px var(--cyan);
  position: relative;
  animation: loaderPulse 1.5s ease-in-out infinite;
}
.loader-logo::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  color: var(--cyan);
  clip-path: inset(0 100% 0 0);
  animation: loaderReveal 2s var(--ease) forwards;
}
@keyframes loaderReveal {
  0%   { clip-path: inset(0 100% 0 0); }
  100% { clip-path: inset(0 0% 0 0); }
}
@keyframes loaderPulse {
  0%, 100% { filter: drop-shadow(0 0 10px rgba(0,255,195,0.5)); }
  50%       { filter: drop-shadow(0 0 30px rgba(0,255,195,0.9)); }
}
.loader-bar-wrap {
  width: min(320px, 70vw);
  height: 2px;
  background: rgba(255,255,255,0.08);
  border-radius: 1px;
  overflow: hidden;
}
.loader-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--purple), var(--cyan));
  border-radius: 1px;
  transition: width 0.1s linear;
  box-shadow: 0 0 10px var(--cyan);
}
.loader-status {
  font-family: var(--font-m);
  font-size: 0.7rem;
  color: var(--muted);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  min-height: 1.2em;
}

/* ── 7. LANGUAGE TOGGLE ────────────────────────────────────── */
#lang-toggle {
  position: fixed;
  top: calc(64px + 8px);
  left: 1.25rem;
  z-index: 1000;
  display: flex;
  gap: 0.25rem;
  background: rgba(8,12,20,0.8);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.25rem;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.ltbtn {
  font-family: var(--font-m);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  padding: 0.3rem 0.7rem;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: var(--muted);
  transition: all 0.2s;
}
.ltbtn.active {
  background: var(--cyan);
  color: var(--bg);
}
.ltbtn:hover:not(.active) {
  color: var(--white);
}

/* ── 8. NAV ────────────────────────────────────────────────── */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 900;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  background: rgba(3,5,8,0.75);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  transition: background 0.3s;
}
nav.scrolled {
  background: rgba(3,5,8,0.95);
}
.nav-left-group {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-shrink: 0;
}
.nav-logo {
  font-family: var(--font-d);
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--cyan);
  letter-spacing: 0.08em;
  text-shadow: var(--glow);
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.nav-links a {
  font-family: var(--font-m);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  color: var(--muted2);
  transition: all 0.2s;
  text-transform: uppercase;
}
.nav-links a:hover {
  color: var(--cyan);
  background: rgba(0,255,195,0.07);
}
.nav-dot {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-m);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  color: var(--cyan);
  padding: 0.3rem 0.75rem;
  border: 1px solid rgba(0,255,195,0.25);
  border-radius: 100px;
  background: rgba(0,255,195,0.05);
}
.nav-dot-pulse {
  width: 7px;
  height: 7px;
  background: var(--cyan);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
  box-shadow: 0 0 6px var(--cyan);
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.4; transform: scale(0.75); }
}
.nav-mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 0.5rem;
}
.nav-mobile-toggle span {
  width: 24px;
  height: 1.5px;
  background: var(--white);
  border-radius: 1px;
  transition: all 0.3s;
}

/* ── 9. HERO ───────────────────────────────────────────────── */
#hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 4rem;
  padding: 7rem 4rem 4rem;
  position: relative;
  overflow: hidden;
}
#hero::before {
  content: '';
  position: absolute;
  top: -200px;
  left: -200px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(124,58,237,0.12) 0%, transparent 70%);
  pointer-events: none;
}
#hero::after {
  content: '';
  position: absolute;
  bottom: -200px;
  right: 0;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(0,255,195,0.07) 0%, transparent 70%);
  pointer-events: none;
}
#particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.particle {
  position: absolute;
  border-radius: 50%;
  background: var(--cyan);
  opacity: 0;
  animation: particleFloat var(--dur, 15s) var(--delay, 0s) ease-in-out infinite;
}
@keyframes particleFloat {
  0%   { transform: translateY(100vh) scale(0); opacity: 0; }
  10%  { opacity: 0.6; }
  90%  { opacity: 0.2; }
  100% { transform: translateY(-10vh) scale(1); opacity: 0; }
}

/* Hero Left */
.hero-left { position: relative; z-index: 2; }
.hero-eyebrow {
  font-family: var(--font-m);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  color: var(--cyan);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-transform: uppercase;
}
.hero-eyebrow::before {
  content: '~/';
  color: var(--purple);
  font-weight: 700;
}
.hero-h1 {
  font-family: var(--font-d);
  font-size: clamp(2.8rem, 5.5vw, 5rem);
  font-weight: 800;
  line-height: 1.0;
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}
.hero-h1 .line1 { color: var(--white); display: block; }
.hero-h1 .line2 { color: var(--cyan); display: block; text-shadow: var(--glow); }
.hero-h1 .line3 { color: var(--muted2); display: block; font-size: 0.65em; font-weight: 600; letter-spacing: 0.05em; margin-top: 0.2em;}
.hero-desc {
  font-size: 1rem;
  color: var(--muted2);
  max-width: 480px;
  margin-bottom: 1.25rem;
  line-height: 1.7;
}
.hero-birthdate {
  font-family: var(--font-m);
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.06em;
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.hero-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2.5rem;
}
.chip {
  font-family: var(--font-m);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  padding: 0.28rem 0.7rem;
  border-radius: 100px;
  border: 1px solid var(--border2);
  color: var(--muted2);
  background: rgba(0,255,195,0.04);
  transition: all 0.2s;
}
.chip:hover {
  color: var(--cyan);
  border-color: var(--cyan);
  background: rgba(0,255,195,0.08);
}
.chip.accent {
  border-color: rgba(124,58,237,0.4);
  color: #a78bfa;
  background: rgba(124,58,237,0.06);
}
.chip.gold {
  border-color: rgba(245,158,11,0.35);
  color: var(--gold);
  background: rgba(245,158,11,0.05);
}
.hero-stats {
  display: flex;
  gap: 2.5rem;
}
.stat-item { text-align: left; }
.stat-num {
  font-family: var(--font-d);
  font-size: 2rem;
  font-weight: 800;
  color: var(--cyan);
  line-height: 1;
  text-shadow: var(--glow);
}
.stat-label {
  font-family: var(--font-m);
  font-size: 0.62rem;
  color: var(--muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-top: 0.2rem;
}

/* Hero Right — Photo Frame */
.hero-right {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 2;
}
.hero-photo-frame {
  position: relative;
  width: min(380px, 40vw);
  aspect-ratio: 3/4;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(0,255,195,0.2);
  box-shadow:
    0 0 0 1px rgba(0,255,195,0.08),
    0 20px 80px rgba(0,0,0,0.6),
    0 0 40px rgba(0,255,195,0.08);
  background: var(--bg1);
}
/* Animated gradient border */
.hero-photo-frame::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 22px;
  background: linear-gradient(135deg, var(--cyan), var(--purple), var(--gold), var(--cyan));
  background-size: 400% 400%;
  animation: gradBorder 6s ease infinite;
  z-index: 0;
  padding: 2px;
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}
@keyframes gradBorder {
  0%, 100% { background-position: 0% 50%; }
  50%       { background-position: 100% 50%; }
}

/* Code background behind photo */
.photo-code-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 0;
  background: #020509;
}
.code-col {
  position: absolute;
  top: 0;
  width: 19%;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-family: var(--font-m);
  font-size: 0.48rem;
  color: rgba(0,255,195,0.13);
  line-height: 1.5;
  white-space: nowrap;
  animation: codeScroll var(--dur, 20s) linear infinite;
  animation-delay: var(--delay, 0s);
  user-select: none;
}
@keyframes codeScroll {
  0%   { transform: translateY(-50%); }
  100% { transform: translateY(0%); }
}

/* Aurora canvas background */
#photo-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

/* Photo sits on top */
.hero-photo-frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  z-index: 1;
}

/* HUD corners */
.hud-corners {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}
.hud-corner {
  position: absolute;
  width: 20px;
  height: 20px;
  border-color: var(--cyan);
  border-style: solid;
  opacity: 0.7;
}
.hud-corner.tl { top: 10px; left: 10px; border-width: 2px 0 0 2px; border-radius: 2px 0 0 0; }
.hud-corner.tr { top: 10px; right: 10px; border-width: 2px 2px 0 0; border-radius: 0 2px 0 0; }
.hud-corner.bl { bottom: 10px; left: 10px; border-width: 0 0 2px 2px; border-radius: 0 0 0 2px; }
.hud-corner.br { bottom: 10px; right: 10px; border-width: 0 2px 2px 0; border-radius: 0 0 2px 0; }

/* Scan line animation over photo */
.photo-scan {
  position: absolute;
  left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(0,255,195,0.6), transparent);
  z-index: 3;
  animation: scanLine 4s ease-in-out infinite;
  pointer-events: none;
}
@keyframes scanLine {
  0%   { top: 0%; opacity: 0; }
  5%   { opacity: 1; }
  95%  { opacity: 1; }
  100% { top: 100%; opacity: 0; }
}

/* Status badge */
.photo-status {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-m);
  font-size: 0.55rem;
  letter-spacing: 0.1em;
  color: var(--cyan);
  background: rgba(3,5,8,0.85);
  border: 1px solid rgba(0,255,195,0.3);
  border-radius: 100px;
  padding: 0.2rem 0.6rem;
}
.photo-status-dot {
  width: 5px;
  height: 5px;
  background: var(--cyan);
  border-radius: 50%;
  animation: pulse 1.5s ease-in-out infinite;
}

/* Bottom label */
.photo-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 4;
  padding: 1.5rem 1rem 1rem;
  background: linear-gradient(to top, rgba(3,5,8,0.95) 60%, transparent);
}
.photo-label-name {
  font-family: var(--font-m);
  font-size: 0.6rem;
  letter-spacing: 0.18em;
  color: var(--cyan);
  text-transform: uppercase;
}
.photo-label-role {
  font-family: var(--font-b);
  font-size: 0.7rem;
  color: var(--muted2);
  margin-top: 0.15rem;
}

/* ── 10. MARQUEE ───────────────────────────────────────────── */
.marquee-wrap {
  overflow: hidden;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: rgba(8,12,20,0.8);
  padding: 0.75rem 0;
  position: relative;
  z-index: 10;
}
.marquee-track {
  display: flex;
  gap: 2rem;
  animation: marquee 35s linear infinite;
  width: max-content;
}
.marquee-track.reverse {
  animation: marqueeR 35s linear infinite;
}
.marquee-item {
  font-family: var(--font-m);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  color: var(--muted);
  text-transform: uppercase;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.marquee-item::after {
  content: '·';
  color: var(--cyan);
  font-size: 1rem;
}
@keyframes marquee  { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes marqueeR { from { transform: translateX(-50%); } to { transform: translateX(0); } }

/* ── 11. SECTION WRAPPER & HEADERS ─────────────────────────── */
section { padding: 6rem 2rem; }
.sw { max-width: 1100px; margin: 0 auto; }

.sh {
  margin-bottom: 4rem;
  position: relative;
}
.sh-num {
  font-family: var(--font-d);
  font-size: clamp(5rem, 12vw, 9rem);
  font-weight: 800;
  color: transparent;
  -webkit-text-stroke: 1px rgba(0,255,195,0.08);
  position: absolute;
  top: -1.5rem;
  left: -1rem;
  line-height: 1;
  pointer-events: none;
  user-select: none;
  z-index: 0;
}
.sh-inner { position: relative; z-index: 1; }
.sh-eyebrow {
  font-family: var(--font-m);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  color: var(--cyan);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
}
.sh-title {
  font-family: var(--font-d);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}
.sh-line {
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, var(--cyan), var(--purple));
  border-radius: 1px;
  box-shadow: 0 0 10px rgba(0,255,195,0.4);
}

/* Alternating section backgrounds */
section:nth-child(even) { background: rgba(8,12,20,0.5); }

/* ── 12. TIMELINE ENTRIES ──────────────────────────────────── */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  position: relative;
}
.timeline::before {
  content: '';
  position: absolute;
  left: -1px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, var(--cyan), var(--purple), transparent);
  opacity: 0.3;
}
.entry {
  background: rgba(13,18,32,0.7);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 1.5rem 1.75rem;
  position: relative;
  transition: all 0.3s var(--ease);
  overflow: hidden;
}
.entry::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(to bottom, var(--cyan), var(--purple));
  opacity: 0;
  transition: opacity 0.3s;
  border-radius: 0 0 0 var(--r);
}
.entry:hover {
  border-color: var(--border2);
  transform: translateX(6px);
  box-shadow: 0 8px 40px rgba(0,0,0,0.4), var(--glow);
}
.entry:hover::before { opacity: 1; }
.entry-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}
.entry-title {
  font-family: var(--font-d);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--white);
}
.entry-company {
  font-family: var(--font-m);
  font-size: 0.75rem;
  color: var(--cyan);
  margin-top: 0.2rem;
}
.entry-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.entry-date {
  font-family: var(--font-m);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  color: var(--muted);
  white-space: nowrap;
}
.badge {
  font-family: var(--font-m);
  font-size: 0.55rem;
  letter-spacing: 0.1em;
  padding: 0.2rem 0.55rem;
  border-radius: 100px;
  text-transform: uppercase;
}
.badge-cyan  { background: rgba(0,255,195,0.12); color: var(--cyan); border: 1px solid rgba(0,255,195,0.25); }
.badge-gold  { background: rgba(245,158,11,0.12); color: var(--gold); border: 1px solid rgba(245,158,11,0.25); }
.badge-purple { background: rgba(124,58,237,0.12); color: #a78bfa; border: 1px solid rgba(124,58,237,0.25); }
.badge-red   { background: rgba(239,68,68,0.12); color: #f87171; border: 1px solid rgba(239,68,68,0.25); }
.entry-desc {
  font-size: 0.88rem;
  color: var(--muted2);
  line-height: 1.65;
  margin-bottom: 0.75rem;
}
.entry-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.tag {
  font-family: var(--font-m);
  font-size: 0.6rem;
  letter-spacing: 0.06em;
  padding: 0.2rem 0.55rem;
  border-radius: 100px;
  background: rgba(255,255,255,0.04);
  color: var(--muted2);
  border: 1px solid rgba(255,255,255,0.07);
}

/* ── 13. PROJECTS ──────────────────────────────────────────── */
.proj-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.proj-card {
  display: flex;
  flex-direction: column;
  background: rgba(13,18,32,0.85);
  border: 1px solid var(--border);
  border-radius: var(--r2);
  padding: 2rem;
  position: relative;
  overflow: hidden;
  transition: all 0.35s var(--ease);
  text-decoration: none;
}
.proj-card::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: var(--r2);
  background: linear-gradient(135deg, var(--cyan), var(--purple), var(--gold));
  background-size: 300% 300%;
  opacity: 0;
  z-index: -1;
  transition: opacity 0.35s;
  animation: gradBorder 4s ease infinite;
}
.proj-card::after {
  content: '';
  position: absolute;
  inset: 1px;
  border-radius: calc(var(--r2) - 1px);
  background: rgba(13,18,32,0.95);
  z-index: -1;
}
.proj-card:hover {
  transform: translateY(-6px);
  border-color: rgba(0,255,195,0.4);
  box-shadow: 0 20px 60px rgba(0,0,0,0.5), var(--glow);
}
.proj-card:hover::before { opacity: 1; }
.proj-tag {
  font-family: var(--font-m);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  padding: 0.25rem 0.65rem;
  border-radius: 100px;
  background: rgba(0,255,195,0.08);
  color: var(--cyan);
  border: 1px solid rgba(0,255,195,0.2);
  display: inline-block;
  margin-bottom: 1rem;
  width: fit-content;
}
.proj-title {
  font-family: var(--font-d);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--white);
  margin-bottom: 0.75rem;
  letter-spacing: -0.01em;
}
.proj-desc {
  font-size: 0.85rem;
  color: var(--muted2);
  line-height: 1.7;
  flex: 1;
  margin-bottom: 1.25rem;
}
.proj-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 1.5rem;
}
.proj-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}
.proj-domain {
  font-family: var(--font-m);
  font-size: 0.7rem;
  color: var(--muted);
  letter-spacing: 0.05em;
}
.proj-arrow {
  font-size: 1.1rem;
  color: var(--cyan);
  transition: transform 0.2s;
}
.proj-card:hover .proj-arrow { transform: translate(3px, -3px); }

/* ── 14. SERVICES ──────────────────────────────────────────── */
.serv-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}
.serv-card {
  background: rgba(13,18,32,0.7);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 1.5rem 1.25rem;
  transition: all 0.3s var(--ease);
  text-align: left;
}
.serv-card:hover {
  transform: translateY(-4px);
  border-color: rgba(0,255,195,0.35);
  background: rgba(0,255,195,0.04);
  box-shadow: 0 12px 40px rgba(0,0,0,0.4), 0 0 20px rgba(0,255,195,0.1);
}
.serv-icon {
  font-size: 2.2rem;
  margin-bottom: 0.75rem;
  display: block;
  line-height: 1;
}
.serv-title {
  font-family: var(--font-d);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 0.35rem;
}
.serv-sub {
  font-family: var(--font-b);
  font-size: 0.75rem;
  color: var(--muted);
  line-height: 1.5;
}

/* ── 15. SKILLS ────────────────────────────────────────────── */
.sgrid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}
.sgroup {
  background: rgba(13,18,32,0.6);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 1.75rem;
}
.sgroup-title {
  font-family: var(--font-m);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  color: var(--cyan);
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}
.skill-item { margin-bottom: 1rem; }
.skill-item:last-child { margin-bottom: 0; }
.skill-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.4rem;
}
.skill-name {
  font-size: 0.82rem;
  color: var(--white);
  font-family: var(--font-b);
  font-weight: 500;
}
.skill-pct {
  font-family: var(--font-m);
  font-size: 0.65rem;
  color: var(--muted);
}
.sbar {
  height: 3px;
  background: rgba(255,255,255,0.06);
  border-radius: 2px;
  overflow: hidden;
}
.sfill {
  height: 100%;
  width: 0%;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--purple), var(--cyan));
  box-shadow: 0 0 8px rgba(0,255,195,0.4);
  transition: width 1.2s var(--ease);
}

/* ── 16. EDUCATION ─────────────────────────────────────────── */
.edu-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
.edu-card {
  background: rgba(13,18,32,0.7);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 1.5rem;
  transition: all 0.3s var(--ease);
}
.edu-card:hover {
  border-color: rgba(124,58,237,0.4);
  transform: translateY(-4px);
  box-shadow: var(--glow-p);
}
.edu-icon { font-size: 1.75rem; margin-bottom: 0.75rem; }
.edu-degree {
  font-family: var(--font-d);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 0.3rem;
}
.edu-school { font-size: 0.8rem; color: var(--cyan); margin-bottom: 0.25rem; }
.edu-period { font-family: var(--font-m); font-size: 0.65rem; color: var(--muted); }
.edu-note {
  font-family: var(--font-m);
  font-size: 0.6rem;
  color: var(--muted);
  letter-spacing: 0.05em;
  margin-top: 0.35rem;
  line-height: 1.4;
}

/* ── 17. CERTIFICATIONS ────────────────────────────────────── */
.cgrid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.cert-card {
  background: rgba(13,18,32,0.6);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 1.25rem;
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  transition: all 0.3s;
}
.cert-card:hover {
  border-color: rgba(245,158,11,0.3);
  background: rgba(245,158,11,0.04);
}
.cert-icon { font-size: 1.5rem; flex-shrink: 0; margin-top: 0.1rem; }
.cert-name { font-size: 0.85rem; font-weight: 600; color: var(--white); margin-bottom: 0.2rem; }
.cert-org  { font-family: var(--font-m); font-size: 0.65rem; color: var(--muted); }
.cert-date {
  font-family: var(--font-m);
  font-size: 0.58rem;
  color: var(--muted);
  letter-spacing: 0.04em;
  margin-top: 0.2rem;
}

/* ── 18. CONTACT ───────────────────────────────────────────── */
#contact { text-align: center; }
.cbox { max-width: 700px; margin: 0 auto; }
.cbox-title {
  font-family: var(--font-d);
  font-size: clamp(1.8rem, 5vw, 3rem);
  font-weight: 800;
  color: var(--white);
  margin-bottom: 1rem;
  line-height: 1.1;
}
.cbox-title span { color: var(--cyan); text-shadow: var(--glow); }
.cbox-sub {
  font-size: 1rem;
  color: var(--muted2);
  margin-bottom: 2rem;
  line-height: 1.6;
}
.cta-btns {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 2rem;
  border-radius: 10px;
  font-family: var(--font-m);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  font-weight: 500;
  border: 1.5px solid transparent;
  transition: all 0.25s var(--ease);
  text-transform: lowercase;
}
.btn-p {
  background: linear-gradient(135deg, var(--purple), #4f46e5);
  color: var(--white);
  border-color: rgba(124,58,237,0.5);
}
.btn-p:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(124,58,237,0.4);
}
.btn-o {
  background: transparent;
  color: var(--cyan);
  border-color: rgba(0,255,195,0.35);
}
.btn-o:hover {
  background: rgba(0,255,195,0.08);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0,255,195,0.15);
}
.btn-wa {
  background: #25D366;
  color: #fff;
  border-color: #25D366;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.btn-wa:hover {
  background: #1ebe5a;
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(37,211,102,0.3);
  border-color: #1ebe5a;
}
.social-grid {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}
.social-link {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(13,18,20,0.6);
  font-family: var(--font-m);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  color: var(--muted2);
  transition: all 0.2s;
}
.social-link:hover {
  border-color: var(--cyan);
  color: var(--cyan);
  background: rgba(0,255,195,0.05);
  transform: translateY(-2px);
}
.social-link svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
  flex-shrink: 0;
}

/* ── 19. FOOTER ────────────────────────────────────────────── */
footer {
  text-align: center;
  padding: 2.5rem 2rem;
  border-top: 1px solid var(--border);
  background: rgba(3,5,8,0.9);
}
.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}
.footer-copy {
  font-family: var(--font-m);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.footer-links {
  display: flex;
  gap: 1.5rem;
}
.footer-links button {
  font-family: var(--font-m);
  font-size: 0.65rem;
  letter-spacing: 0.06em;
  color: var(--muted);
  background: none;
  border: none;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s;
}
.footer-links button:hover { color: var(--cyan); }
.footer-built {
  font-family: var(--font-b);
  font-size: 0.72rem;
  color: var(--muted);
}

/* ── 20. CHATBOT CHARACTER ─────────────────────────────────── */
#chat-char {
  position: fixed;
  bottom: 1rem;
  right: 2rem;
  width: 90px;
  background: none;
  border: none;
  padding: 0;
  z-index: 500;
  cursor: pointer;
  filter: drop-shadow(0 8px 24px rgba(0,255,195,0.35));
  animation: charFloat 3s ease-in-out infinite;
  border-radius: 0;
  overflow: visible;
}
#chat-char:hover {
  filter: drop-shadow(0 12px 32px rgba(0,255,195,0.6));
}
#chat-char .char-img {
  width: 100%;
  height: auto;
  object-fit: contain;
  border-radius: 0;
  display: block;
}
@keyframes charFloat {
  0%,100% { transform: translateY(0) rotate(0deg); }
  40%      { transform: translateY(-10px) rotate(-2deg); }
  70%      { transform: translateY(-5px) rotate(1.5deg); }
}
#chat-char.char-bounce { animation: charBounce 0.5s ease forwards; }
@keyframes charBounce {
  0%   { transform: scale(1); }
  30%  { transform: scale(1.2) translateY(-15px) rotate(-5deg); }
  60%  { transform: scale(0.9) translateY(4px) rotate(3deg); }
  100% { transform: scale(1); }
}
#chat-char.char-wave { animation: charWave 0.8s ease forwards; }
@keyframes charWave {
  0%   { transform: rotate(0); }
  25%  { transform: rotate(-8deg) scale(1.05); }
  75%  { transform: rotate(6deg) scale(1.05); }
  100% { transform: rotate(0); }
}

/* ── 21. SPEECH BUBBLE (comic style, above character) ────── */
#chat-bubble {
  position: fixed;
  bottom: 170px;
  right: 1.5rem;
  background: rgba(7,11,20,0.97);
  border: 1.5px solid var(--cyan);
  border-radius: 16px 16px 16px 4px;
  padding: 0.7rem 1rem;
  font-family: var(--font-b);
  font-size: 0.8rem;
  color: var(--white);
  pointer-events: none;
  z-index: 501;
  opacity: 0;
  transform: translateY(10px) scale(0.9);
  transform-origin: bottom right;
  transition: opacity 0.3s var(--ease), transform 0.35s var(--ease);
  max-width: 200px;
  white-space: normal;
  backdrop-filter: blur(16px);
  box-shadow: 0 0 20px rgba(0,255,195,0.18), 0 6px 24px rgba(0,0,0,0.5);
}
/* Comic tail — triangle pointing DOWN toward character */
#chat-bubble::after {
  content: '';
  position: absolute;
  bottom: -12px;
  right: 22px;
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 4px solid transparent;
  border-top: 12px solid var(--cyan);
}
/* Inner fill of tail to match bg */
#chat-bubble::before {
  content: '';
  position: absolute;
  bottom: -9px;
  right: 23px;
  width: 0;
  height: 0;
  border-left: 7px solid transparent;
  border-right: 3px solid transparent;
  border-top: 10px solid rgba(7,11,20,0.97);
  z-index: 1;
}
#chat-bubble.show {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* ── 22. CHAT PANEL ────────────────────────────────────────── */
#cpanel {
  position: fixed;
  bottom: 115px;
  right: 2rem;
  width: min(440px, calc(100vw - 2rem));
  height: min(580px, calc(100vh - 160px));
  display: flex;
  flex-direction: column;
  background: rgba(7,11,20,0.97);
  border: 1.5px solid var(--cyan);
  border-radius: 16px 16px 16px 4px;
  z-index: 490;
  opacity: 0;
  transform: translateY(20px) scale(0.96);
  pointer-events: none;
  transition: all 0.35s var(--ease);
  backdrop-filter: blur(20px);
  box-shadow: 0 0 20px rgba(0,255,195,0.18), 0 6px 24px rgba(0,0,0,0.5), 0 30px 80px rgba(0,0,0,0.7);
  overflow: hidden;
}
/* Triangle pointer at bottom-right pointing to character */
#cpanel::after {
  content: '';
  position: absolute;
  bottom: -12px;
  right: 22px;
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 4px solid transparent;
  border-top: 12px solid var(--cyan);
  pointer-events: none;
}
#cpanel::before {
  content: '';
  position: absolute;
  bottom: -9px;
  right: 23px;
  width: 0;
  height: 0;
  border-left: 7px solid transparent;
  border-right: 3px solid transparent;
  border-top: 10px solid rgba(7,11,20,0.97);
  z-index: 1;
  pointer-events: none;
}
#cpanel.open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
.chead {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  background: rgba(3,5,8,0.5);
}
.chead-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid var(--cyan);
}
.chead-info { flex: 1; }
.chead-name {
  font-family: var(--font-d);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--white);
}
.chead-status {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-m);
  font-size: 0.6rem;
  color: var(--cyan);
  letter-spacing: 0.08em;
}
.chead-dot {
  width: 6px;
  height: 6px;
  background: var(--cyan);
  border-radius: 50%;
  animation: pulse 2s infinite;
}
.chead-close {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1.2rem;
  line-height: 1;
  padding: 0.25rem;
  transition: color 0.2s;
}
.chead-close:hover { color: var(--white); }

/* API Setup */
.capi {
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  background: rgba(3,5,8,0.3);
}
.capi-tabs {
  display: flex;
  gap: 0.25rem;
  margin-bottom: 0.6rem;
}
.ptab {
  font-family: var(--font-m);
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  transition: all 0.2s;
}
.ptab.active {
  background: rgba(0,255,195,0.1);
  color: var(--cyan);
  border-color: rgba(0,255,195,0.3);
}
.capi-row {
  display: flex;
  gap: 0.5rem;
}
.capi-input {
  flex: 1;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.45rem 0.75rem;
  color: var(--white);
  font-family: var(--font-m);
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  outline: none;
  transition: border-color 0.2s;
}
.capi-input:focus { border-color: var(--cyan); }
.capi-input::placeholder { color: var(--muted); }
.capi-btn {
  padding: 0.45rem 0.9rem;
  background: var(--cyan);
  color: var(--bg);
  border: none;
  border-radius: 8px;
  font-family: var(--font-m);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  transition: all 0.2s;
}
.capi-btn:hover { background: var(--cyan2); }
.capi-status {
  font-family: var(--font-m);
  font-size: 0.6rem;
  color: var(--muted);
  margin-top: 0.4rem;
  min-height: 0.9rem;
}

/* Messages */
.cmsgs {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.cmsg {
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
}
.cmsg.user { flex-direction: row-reverse; }
.cmsg-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--border);
}
.cmsg-avatar-emoji,
.cmsg-avatar-icon {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(124,58,237,0.2);
  border: 1px solid rgba(124,58,237,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  flex-shrink: 0;
}
.cmsg-avatar-icon {
  background: rgba(0,255,195,0.1);
  border-color: rgba(0,255,195,0.25);
}
.cmsg-bubble {
  max-width: 78%;
  padding: 0.65rem 0.9rem;
  border-radius: 14px;
  font-size: 0.82rem;
  line-height: 1.55;
}
.cmsg.ai .cmsg-bubble {
  background: rgba(13,18,32,0.9);
  border: 1px solid var(--border);
  color: var(--white);
  border-radius: 4px 14px 14px 14px;
}
.cmsg.user .cmsg-bubble {
  background: linear-gradient(135deg, var(--purple), #4f46e5);
  color: var(--white);
  border-radius: 14px 14px 4px 14px;
}
.cthink {
  display: none;
  align-items: center;
  gap: 0.5rem;
  padding: 0 1.25rem;
  flex-shrink: 0;
}
.cthink.show { display: flex; }
.think-dots {
  display: flex;
  gap: 0.3rem;
  padding: 0.6rem 0.9rem;
  background: rgba(13,18,32,0.9);
  border: 1px solid var(--border);
  border-radius: 4px 14px 14px 14px;
}
.think-dot {
  width: 6px;
  height: 6px;
  background: var(--cyan);
  border-radius: 50%;
  animation: thinkBounce 1.2s ease-in-out infinite;
}
.think-dot:nth-child(2) { animation-delay: 0.2s; }
.think-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes thinkBounce {
  0%, 80%, 100% { transform: translateY(0); opacity: 0.4; }
  40% { transform: translateY(-6px); opacity: 1; }
}

/* Suggestions */
.csugg {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0.5rem 1.25rem;
  flex-shrink: 0;
}
.csugg-btn {
  font-family: var(--font-m);
  font-size: 0.62rem;
  letter-spacing: 0.04em;
  padding: 0.3rem 0.7rem;
  border-radius: 100px;
  border: 1px solid var(--border);
  background: rgba(13,18,32,0.8);
  color: var(--muted2);
  transition: all 0.2s;
  cursor: pointer;
}
.csugg-btn:hover {
  border-color: var(--cyan);
  color: var(--cyan);
  background: rgba(0,255,195,0.05);
}

/* Input */
.cinput {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem 1rem;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
  background: rgba(3,5,8,0.5);
}
.cinput-ta {
  flex: 1;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.6rem 0.9rem;
  color: var(--white);
  font-family: var(--font-b);
  font-size: 0.82rem;
  line-height: 1.4;
  resize: none;
  outline: none;
  min-height: 40px;
  max-height: 120px;
  transition: border-color 0.2s;
}
.cinput-ta:focus { border-color: var(--cyan); }
.cinput-ta::placeholder { color: var(--muted); }
.cinput-send {
  width: 40px;
  height: 40px;
  background: var(--cyan);
  border: none;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--bg);
  transition: all 0.2s;
  flex-shrink: 0;
}
.cinput-send:hover { background: var(--cyan2); transform: scale(1.05); }
.cinput-send svg { width: 16px; height: 16px; fill: currentColor; }

/* ── 23. MODAL ─────────────────────────────────────────────── */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.88);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
  backdrop-filter: blur(8px);
}
.modal.open {
  opacity: 1;
  pointer-events: auto;
}
.modal-content {
  max-width: 720px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  background: var(--bg1);
  border: 1px solid rgba(0,255,195,0.25);
  border-radius: 16px;
  padding: 3rem;
  position: relative;
  scrollbar-width: thin;
  scrollbar-color: var(--cyan) transparent;
}
.modal-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  border-radius: 8px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted2);
  font-size: 1rem;
  transition: all 0.2s;
}
.modal-close:hover { color: var(--white); background: rgba(255,255,255,0.1); }
.modal-title {
  font-family: var(--font-d);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--cyan);
  margin-bottom: 0.5rem;
}
.modal-date {
  font-family: var(--font-m);
  font-size: 0.65rem;
  color: var(--muted);
  letter-spacing: 0.1em;
  margin-bottom: 2rem;
}
.modal-content h3 {
  font-family: var(--font-d);
  font-size: 1rem;
  font-weight: 700;
  color: var(--white);
  margin: 1.5rem 0 0.5rem;
}
.modal-content p {
  font-size: 0.85rem;
  color: var(--muted2);
  line-height: 1.7;
  margin-bottom: 0.75rem;
}
.modal-content hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 1.5rem 0;
}

/* ── 24. BILINGUAL ─────────────────────────────────────────── */
[data-es], [data-en] { display: none; }
[data-lang="es"] [data-es] { display: block; }
[data-lang="en"] [data-en] { display: block; }
[data-lang="es"] .ls-es { display: inline; }
[data-lang="en"] .ls-en { display: inline; }
.ls-es, .ls-en { display: none; }

/* ── 25. REVEAL ANIMATIONS ─────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ── 26. RESPONSIVE ────────────────────────────────────────── */

/* 1100px — wide tablets / small laptops */
@media (max-width: 1100px) {
  .proj-grid { grid-template-columns: 1fr 1fr; }
  .serv-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ─────────────────────────────────────────────────────────────
   900px — TABLETS & MOBILE
   Bottom nav bar replaces top nav links.
   Hero goes single-column. Photo hidden until 640px.
───────────────────────────────────────────────────────────── */
@media (max-width: 900px) {

  /* ── Body: pad bottom so content clears the fixed bottom bar */
  body { padding-bottom: calc(56px + env(safe-area-inset-bottom, 0px)); }

  /* ── Nav: keep top bar but strip it to logo only */
  nav { padding: 0 1rem; }
  .nav-dot { display: none !important; }
  /* Hide nav links from the top bar — they move to the bottom */
  .nav-links {
    /* Reset top-bar flex context so it doesn't stretch the nav */
    align-items: stretch;
    gap: 0;
    /* Pin to bottom of viewport */
    display: flex !important;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    top: auto;
    flex-direction: row;
    background: rgba(3,5,8,0.97);
    border-top: 1px solid var(--border);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 901;                               /* above nav (900) */
    padding: 0 0 env(safe-area-inset-bottom, 0px);
    justify-content: space-around;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
  }
  .nav-links::-webkit-scrollbar { display: none; }
  .nav-links a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 0.48rem;
    padding: 0.5rem 0.25rem;
    flex: 1;
    min-width: 52px;
    text-align: center;
    letter-spacing: 0.04em;
    min-height: 52px;
    color: var(--muted);
    border-radius: 0;
    white-space: nowrap;
  }
  .nav-links a:hover,
  .nav-links a:active { color: var(--cyan); background: rgba(0,255,195,0.06); }
  /* Hamburger not needed — hide it */
  .nav-mobile-toggle { display: none !important; }

  /* ── Lang toggle: just below nav, never overlaps it */
  #lang-toggle { top: calc(64px + 8px); left: 1rem; }

  /* ── Hero: single column, centred */
  #hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: calc(64px + 2rem) 1.5rem 3rem;
    gap: 2rem;
    text-align: center;
    align-items: start;
    justify-items: center;
  }
  .hero-left     { width: 100%; display: flex; flex-direction: column; align-items: center; }
  .hero-eyebrow  { justify-content: center; }
  .hero-h1       { text-align: center; width: 100%; }
  .hero-chips    { justify-content: center; flex-wrap: wrap; width: 100%; }
  .hero-stats    { justify-content: center; width: 100%; }
  .stat-item     { text-align: center; }
  .hero-right    { display: none; }
  .hero-desc     { margin: 0 auto 2rem; max-width: 520px; text-align: center; }

  /* ── Grids */
  .sgrid    { grid-template-columns: 1fr; }
  .edu-grid { grid-template-columns: 1fr 1fr; }
  .cgrid    { grid-template-columns: 1fr 1fr; }

  /* ── Chat widgets: sit above the 52px bottom bar */
  #chat-char   { bottom: calc(52px + env(safe-area-inset-bottom, 0px) + 0.75rem); }
  #chat-bubble { bottom: calc(52px + env(safe-area-inset-bottom, 0px) + 5rem); }
}

/* ─────────────────────────────────────────────────────────────
   768px — TABLET PORTRAIT
───────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .proj-grid  { grid-template-columns: 1fr; }
  .serv-grid  { grid-template-columns: repeat(2, 1fr); }
  .edu-grid   { grid-template-columns: 1fr; }
  .cgrid      { grid-template-columns: 1fr; }
  section     { padding: 4rem 1.25rem; }

  /* Chat panel: wider on tablet */
  #cpanel     { right: 0.75rem; width: calc(100vw - 1.5rem); }
  #chat-bubble { right: 1rem; }
  #chat-char  { right: 1rem; }
}

/* ─────────────────────────────────────────────────────────────
   640px — LARGE PHONES
───────────────────────────────────────────────────────────── */
@media (max-width: 640px) {

  /* ── Typography */
  .hero-h1      { font-size: clamp(2rem, 8vw, 2.8rem); }
  .sh-title     { font-size: clamp(1.4rem, 5vw, 2rem); }
  .hero-eyebrow { font-size: 0.62rem; letter-spacing: 0.12em; }

  /* ── Lang toggle */
  #lang-toggle { top: calc(64px + 8px); left: 0.5rem; }

  /* ── Hero: show photo above text */
  #hero {
    overflow: visible;
    padding: calc(64px + 1.5rem) 1rem 2rem;
    gap: 1.25rem;
    justify-items: center;
  }
  .hero-left    { width: 100%; display: flex; flex-direction: column; align-items: center; }
  .hero-eyebrow { justify-content: center; }
  .hero-right {
    display: flex;
    order: -1;
    justify-content: center;
    width: 100%;
  }
  .hero-photo-frame { width: min(180px, 48vw); }

  /* ── Layout */
  section        { padding: 3.5rem 1rem; }
  .serv-grid     { grid-template-columns: 1fr 1fr; }
  .cgrid         { grid-template-columns: 1fr; }
  .contact-grid  { grid-template-columns: 1fr; }
  .edu-grid      { grid-template-columns: 1fr; }

  /* ── Chips: wrap instead of horizontal scroll to avoid page overflow */
  .hero-chips {
    flex-wrap: wrap;
    overflow-x: visible;
    justify-content: center;
    gap: 0.45rem;
    max-width: 100%;
    padding-bottom: 0;
  }
  .hero-chips > * { flex-shrink: 0; }

  /* ── Touch targets */
  .cta-btn, .csugg-btn { min-height: 44px; }

  /* ── Chat widgets */
  #chat-char   {
    right: 0.75rem;
    bottom: calc(52px + env(safe-area-inset-bottom, 0px) + 0.75rem);
    width: 56px;
    height: 56px;
  }
  #chat-bubble {
    right: 0.75rem;
    bottom: calc(52px + env(safe-area-inset-bottom, 0px) + 4.5rem);
  }

  /* ── Chat panel: full-width bottom sheet, slides up above bottom nav */
  #cpanel {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 88dvh;
    border-radius: 20px 20px 0 0;
    border-bottom: none;
    transform: translateY(100%);
    opacity: 1;
    transition: transform 0.38s var(--ease);
    z-index: 950;
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
  #cpanel::after, #cpanel::before { display: none; }
  #cpanel.open { transform: translateY(0); pointer-events: auto; }

  /* ── Modal */
  .modal         { padding: 1rem; }
  .modal-content { padding: 1.5rem 1.25rem; }
}

/* ─────────────────────────────────────────────────────────────
   480px — SMALL PHONES
───────────────────────────────────────────────────────────── */
@media (max-width: 480px) {
  .hero-h1       { font-size: clamp(1.8rem, 9vw, 2.4rem); }
  .serv-grid     { grid-template-columns: 1fr 1fr; }
  .cgrid         { grid-template-columns: 1fr; }
  .entry-header  { flex-direction: column; gap: 0.4rem; }
  .badge         { font-size: 0.65rem; }
  .hero-stats    { gap: 1.5rem; }
  .btn           { padding: 0.75rem 1.25rem; font-size: 0.75rem; }
}

/* ─────────────────────────────────────────────────────────────
   360px — TINY PHONES
───────────────────────────────────────────────────────────── */
@media (max-width: 360px) {
  .hero-h1    { font-size: 1.7rem; }
  .hero-chips { gap: 0.35rem; }
  section     { padding: 3rem 0.75rem; }
  .serv-grid  { grid-template-columns: 1fr; }
  nav         { padding: 0 0.75rem; }
  .nav-logo   { font-size: 1.1rem; }
}
