/* ============================================
   FALUBI.DEV — Retro Pixel Art Portfolio v2
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&family=Share+Tech+Mono&display=swap');

/* === VARIABLES === */
:root {
  --bg:        #07070f;
  --surface:   #0c0c1c;
  --card:      #111126;
  --border:    #1c1c40;
  --p1:        #00ff88;
  --p2:        #ff2d78;
  --p3:        #7b2fff;
  --gold:      #ffd700;
  --text:      #d0d0f0;
  --muted:     #60608a;
  --nav-h:     64px;
  --font-px:   'Press Start 2P', monospace;
  --font-mono: 'Share Tech Mono', monospace;
}

/* === CURSOR === */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0; padding: 0;
  cursor: url('/assets/miffy-cursor.png') 0 0, auto;
}
a, button, [role="button"], label, select, .filter-btn, .nav-toggle {
  cursor: url('/assets/snoopy-cursor.png') 0 0, pointer;
}

/* === BASE === */
html { scroll-behavior: smooth; font-size: 16px; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 1rem;
  line-height: 1.7;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img, video { max-width: 100%; display: block; }
ul { list-style: none; }

/* === SCANLINES === */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    rgba(0,0,0,0.035) 0px,
    rgba(0,0,0,0.035) 1px,
    transparent 1px,
    transparent 3px
  );
  pointer-events: none;
  z-index: 9998;
}

/* === SCROLLBAR === */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--p1); }

/* === SELECTION === */
::selection { background: var(--p1); color: var(--bg); }

/* ============================================
   NAVBAR
   ============================================ */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: rgba(7,7,15,0.96);
  border-bottom: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2.5rem;
  z-index: 1000;
  backdrop-filter: blur(12px);
  transition: border-color 0.3s, box-shadow 0.3s;
}
.navbar.scrolled {
  border-bottom-color: rgba(0,255,136,0.4);
  box-shadow: 0 0 30px rgba(0,255,136,0.08);
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.nav-logo-img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  image-rendering: pixelated;
  filter: drop-shadow(0 0 6px rgba(0,255,136,0.7));
}
.nav-logo-text {
  font-family: var(--font-px);
  font-size: 0.65rem;
  color: var(--p1);
  letter-spacing: 2px;
  text-shadow: 0 0 12px rgba(0,255,136,0.5);
}
.nav-logo-text em {
  font-style: normal;
  color: var(--p2);
  text-shadow: 0 0 12px rgba(255,45,120,0.5);
}

/* Nav links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 0;
}
.nav-links li a {
  display: block;
  padding: 0.45rem 0.8rem;
  font-family: var(--font-px);
  font-size: 0.42rem;
  color: var(--muted);
  letter-spacing: 1px;
  position: relative;
  transition: color 0.1s;
}
.nav-links li a::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0.8rem; right: 0.8rem;
  height: 2px;
  background: var(--p1);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.15s steps(4);
}
.nav-links li a:hover,
.nav-links li a.active {
  color: var(--p1);
}
.nav-links li a:hover::after,
.nav-links li a.active::after {
  transform: scaleX(1);
}

/* Nav CTA */
.nav-cta {
  font-family: var(--font-px);
  font-size: 0.42rem;
  color: var(--p1);
  border: 1px solid var(--p1);
  padding: 6px 12px;
  margin-left: 0.5rem;
  box-shadow: 3px 3px 0 var(--p1);
  transition: transform 0.08s steps(2), box-shadow 0.08s steps(2);
}
.nav-cta:hover {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--p1);
}

/* Mobile toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
  border: none;
  background: none;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--p1);
  transition: transform 0.15s steps(3), opacity 0.15s;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================
   HERO
   ============================================ */
.hero {
  min-height: 100vh;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-video-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-video-bg video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.6;
  animation: vbreathe 8s ease-in-out infinite;
}
@keyframes vbreathe {
  0%,100% { transform: scale(1);    filter: brightness(0.9) saturate(1.1); }
  50%      { transform: scale(1.04); filter: brightness(1.2) saturate(1.4); }
}
.hero-video-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top,   rgba(7,7,15,0.9) 0%, transparent 30%),
    linear-gradient(to bottom, rgba(7,7,15,0.7) 0%, transparent 20%),
    radial-gradient(ellipse at 50% 50%, rgba(7,7,15,0.45) 0%, transparent 70%);
}

.hero-grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0,255,136,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,255,136,0.025) 1px, transparent 1px);
  background-size: 40px 40px;
  z-index: 1;
  pointer-events: none;
}

.hero-watermark {
  position: absolute;
  right: 3%;
  bottom: 6%;
  width: 210px;
  opacity: 0.08;
  filter: grayscale(1) brightness(3);
  image-rendering: pixelated;
  z-index: 1;
  pointer-events: none;
}

/* hero-gif-deco removed — replaced by hero-video-card */

/* ---- Layout interno: foto izq | texto der ---- */
.hero-inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 4rem;
  padding: calc(var(--nav-h) + 60px) 6% 4rem;
  max-width: 1060px;
  width: 100%;
}

.hero-visual {
  flex-shrink: 0;
}

.hero-content {
  flex: 1;
  min-width: 0;
}

/* Terminal */
.terminal {
  background: rgba(11,11,25,0.95);
  border: 1px solid var(--border);
  border-left: 3px solid var(--p1);
  margin-bottom: 2rem;
  max-width: 500px;
  box-shadow: 0 0 0 1px rgba(0,255,136,0.05), 4px 4px 0 var(--border);
}
.terminal-bar {
  background: var(--border);
  padding: 7px 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.terminal-dot {
  width: 8px; height: 8px;
  display: inline-block;
}
.terminal-dot.r { background: var(--p2); }
.terminal-dot.g { background: var(--gold); }
.terminal-dot.b { background: var(--p1); }
.terminal-title {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--muted);
  margin-left: 4px;
}
.terminal-body { padding: 10px 16px; min-height: 52px; }
.terminal-line {
  color: var(--p1);
  font-size: 0.88rem;
  font-family: var(--font-mono);
}
.terminal-line::after {
  content: '▮';
  animation: blink 1s step-end infinite;
}
@keyframes blink { 0%,49%{opacity:1} 50%,100%{opacity:0} }

/* Hero text */
.hero-eyebrow {
  display: inline-block;
  font-family: var(--font-px);
  font-size: 0.42rem;
  color: #fff;
  background: var(--p3);
  border: 1px solid #a060ff;
  padding: 5px 12px;
  margin-bottom: 1.2rem;
  letter-spacing: 2px;
  animation: pulse-border 2s ease-in-out infinite;
  box-shadow: 3px 3px 0 rgba(123,47,255,0.4);
}
@keyframes pulse-border {
  0%,100% { box-shadow: 3px 3px 0 rgba(123,47,255,0.4), 0 0 0 0 rgba(123,47,255,0.3); }
  50%      { box-shadow: 3px 3px 0 rgba(123,47,255,0.4), 0 0 0 5px rgba(123,47,255,0); }
}
.hero-name {
  font-family: var(--font-px);
  font-size: clamp(1.6rem, 4vw, 2.8rem);
  color: var(--text);
  line-height: 1.4;
  margin-bottom: 0.5rem;
  text-shadow: 4px 4px 0 rgba(0,0,0,0.5);
}
.hero-name span {
  color: var(--p1);
  text-shadow: 4px 4px 0 rgba(0,0,0,0.5), 0 0 30px rgba(0,255,136,0.3);
}
.hero-subtitle-card {
  background: rgba(7,7,15,0.72);
  border: 1px solid var(--border);
  border-left: 3px solid var(--p1);
  padding: 1rem 1.2rem;
  margin-bottom: 2.5rem;
  max-width: 520px;
  backdrop-filter: blur(8px);
  box-shadow: 4px 4px 0 rgba(0,0,0,0.4);
}
.hero-subtitle {
  font-family: var(--font-mono);
  font-size: clamp(0.82rem, 1.4vw, 0.97rem);
  color: var(--muted);
  line-height: 1.85;
  margin: 0;
}
.hero-subtitle span { color: var(--p1); }
.hero-btns {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ============================================
   HERO PHOTO
   ============================================ */
.hero-photo-wrap {
  position: relative;
  width: 280px;
}
.hero-photo-wrap::before {
  content: '';
  position: absolute;
  top: -10px; left: -10px;
  width: 32px; height: 32px;
  border-top: 2px solid var(--p1);
  border-left: 2px solid var(--p1);
  z-index: 3;
  animation: cglow 2s ease-in-out infinite alternate;
}
.hero-photo-wrap::after {
  content: '';
  position: absolute;
  bottom: -10px; right: -10px;
  width: 32px; height: 32px;
  border-bottom: 2px solid var(--p2);
  border-right: 2px solid var(--p2);
  z-index: 3;
  animation: cglow2 2s ease-in-out infinite alternate;
}
@keyframes cglow  { from{opacity:0.3} to{opacity:1} }
@keyframes cglow2 { from{opacity:1}   to{opacity:0.3} }

.hero-photo-frame {
  position: relative;
  overflow: hidden;
  border: 2px solid rgba(0,255,136,0.25);
  box-shadow: 6px 6px 0 rgba(0,255,136,0.3), -3px -3px 0 rgba(255,45,120,0.2);
}
.hero-photo {
  width: 280px;
  height: 420px;
  object-fit: cover;
  object-position: top center;
  filter: contrast(1.1) saturate(0.85) brightness(0.92);
  display: block;
}
.hero-photo-frame::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg, transparent 0px, transparent 3px,
    rgba(0,0,0,0.09) 3px, rgba(0,0,0,0.09) 4px
  );
  pointer-events: none;
  z-index: 1;
}
.hero-badge {
  position: absolute;
  bottom: 24px;
  left: -10px;
  background: var(--bg);
  border: 1px solid var(--p2);
  border-left: 3px solid var(--p2);
  padding: 8px 12px;
  font-family: var(--font-px);
  font-size: 0.38rem;
  color: var(--p2);
  letter-spacing: 1px;
  line-height: 1.8;
  box-shadow: 3px 3px 0 var(--p2);
  z-index: 3;
  text-transform: uppercase;
}

/* ============================================
   HERO VIDEO CARD (flotante sobre la foto)
   ============================================ */
.hero-video-card {
  position: absolute;
  bottom: -22px;
  right: -26px;
  width: 128px;
  background: var(--card);
  border: 2px solid var(--p1);
  box-shadow: 4px 4px 0 rgba(0,255,136,0.25), 0 0 20px rgba(0,255,136,0.12);
  z-index: 4;
  overflow: hidden;
}
.hero-video-gif {
  width: 100%;
  height: 88px;
  object-fit: cover;
  display: block;
  image-rendering: pixelated;
}
.hero-video-label {
  display: block;
  font-family: var(--font-px);
  font-size: 0.26rem;
  color: var(--p1);
  text-align: center;
  padding: 4px 6px;
  letter-spacing: 1px;
  border-top: 1px solid var(--border);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ============================================
   SECTIONS
   ============================================ */
.section {
  padding: 6rem 5%;
  position: relative;
}
.section-alt { background: var(--surface); }
.section-alt::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0,255,136,0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,255,136,0.018) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
}
.section-inner { max-width: 1280px; margin: 0 auto; }

.section-title {
  font-family: var(--font-px);
  font-size: clamp(0.7rem, 1.8vw, 0.95rem);
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}
.prefix { color: var(--p2); }
.section-divider {
  width: 72px;
  height: 3px;
  background: linear-gradient(90deg, var(--p1), transparent);
  margin-bottom: 3rem;
  margin-top: 0.6rem;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  font-family: var(--font-px);
  font-size: 0.52rem;
  letter-spacing: 1px;
  border: 2px solid currentColor;
  background: transparent;
  text-decoration: none;
  line-height: 1;
  transition: transform 0.06s steps(2), box-shadow 0.06s steps(2), background 0.1s;
}
.btn-primary {
  color: var(--p1);
  box-shadow: 4px 4px 0 var(--p1);
}
.btn-primary:hover {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--p1);
  background: rgba(0,255,136,0.07);
}
.btn-secondary {
  color: var(--p2);
  box-shadow: 4px 4px 0 var(--p2);
}
.btn-secondary:hover {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--p2);
  background: rgba(255,45,120,0.07);
}
.btn-ghost {
  color: var(--muted);
  box-shadow: 3px 3px 0 var(--border);
  border-color: var(--border);
  font-size: 0.44rem;
  padding: 8px 14px;
}
.btn-ghost:hover {
  color: var(--p1);
  border-color: var(--p1);
  box-shadow: 3px 3px 0 var(--p1);
}

/* ============================================
   ABOUT
   ============================================ */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 4rem;
  align-items: start;
}
.about-text p {
  color: var(--muted);
  margin-bottom: 1.4rem;
  line-height: 1.85;
}
.about-text p strong { color: var(--text); }
.about-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: 2rem 0;
}
.stat-box {
  border: 1px solid var(--border);
  padding: 1.2rem 0.8rem;
  text-align: center;
  background: var(--card);
  position: relative;
  overflow: hidden;
}
.stat-box::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--p1);
}
.stat-num {
  font-family: var(--font-px);
  font-size: 1.4rem;
  color: var(--p1);
  display: block;
  margin-bottom: 6px;
  text-shadow: 0 0 20px rgba(0,255,136,0.4);
}
.stat-label { font-size: 0.72rem; color: var(--muted); }

/* Skills */
.skills { margin-bottom: 2.5rem; }
.skill-item { margin-bottom: 1.1rem; }
.skill-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 5px;
  font-family: var(--font-px);
  font-size: 0.45rem;
  color: var(--text);
}
.skill-pct { color: var(--p1); }
.skill-bar {
  height: 10px;
  background: var(--card);
  border: 1px solid var(--border);
  overflow: hidden;
}
.skill-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--p1), var(--p3));
  width: 0;
  transition: width 1.3s cubic-bezier(0.4,0,0.2,1);
  position: relative;
}
.skill-fill::after {
  content: '';
  position: absolute;
  right: 0; top: 0; bottom: 0;
  width: 3px;
  background: rgba(255,255,255,0.6);
}

/* About video */
.about-video-wrap {
  position: relative;
}
.about-video-wrap::before {
  content: '';
  position: absolute;
  top: 14px; left: -14px;
  right: 14px; bottom: -14px;
  border: 1px solid var(--p3);
  opacity: 0.25;
  z-index: 0;
}
.about-video-inner {
  position: relative;
  z-index: 1;
  overflow: hidden;
  clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 16px 100%, 0 calc(100% - 16px));
  border: 1px solid var(--border);
  box-shadow: -8px 8px 0 rgba(123,47,255,0.3);
}
.about-video-inner video {
  width: 100%;
  height: 420px;
  object-fit: cover;
  filter: contrast(1.08) saturate(0.85);
}
/* Overlay scanlines on video */
.about-video-inner::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(0deg, transparent 0px, transparent 3px, rgba(0,0,0,0.08) 3px, rgba(0,0,0,0.08) 4px);
  pointer-events: none;
  z-index: 1;
}
.about-video-label {
  position: absolute;
  bottom: -14px;
  right: 0;
  font-family: var(--font-px);
  font-size: 0.38rem;
  color: var(--p3);
  border: 1px solid var(--p3);
  padding: 3px 8px;
  background: var(--bg);
  z-index: 2;
  letter-spacing: 1px;
}

/* ============================================
   ABOUT v2 (ab-* classes)
   ============================================ */

/* Reveal animation */
.ab-reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.55s ease, transform 0.55s ease;
  transition-delay: var(--ab-delay, 0ms);
}
.ab-reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* Intro row: photo | bio | video */
.ab-intro {
  display: grid;
  grid-template-columns: 260px 1fr 240px;
  gap: 2.5rem;
  align-items: start;
  margin-bottom: 3rem;
}

/* Photo card */
.ab-photo-card {
  position: relative;
  padding: 10px;
  background: var(--card);
  border: 1px solid var(--border);
}
.ab-photo-frame {
  position: relative;
  overflow: hidden;
}
.ab-photo-frame img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  object-position: top;
  display: block;
  filter: contrast(1.05) saturate(0.9);
}
.ab-scan-line {
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(0,255,136,0.6), transparent);
  pointer-events: none;
  animation: abScan 3s ease-in-out infinite;
}
@keyframes abScan {
  0%   { top: 0%;   opacity: 1; }
  90%  { top: 100%; opacity: 0.3; }
  100% { top: 100%; opacity: 0; }
}
.ab-corner {
  position: absolute;
  width: 14px; height: 14px;
  border-color: var(--p1);
  border-style: solid;
}
.ab-c-tl { top: 4px;    left: 4px;  border-width: 2px 0 0 2px; }
.ab-c-tr { top: 4px;    right: 4px; border-width: 2px 2px 0 0; }
.ab-c-bl { bottom: 4px; left: 4px;  border-width: 0 0 2px 2px; }
.ab-c-br { bottom: 4px; right: 4px; border-width: 0 2px 2px 0; }
.ab-online {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-px);
  font-size: 0.38rem;
  color: var(--p1);
  letter-spacing: 1px;
  margin-top: 10px;
  justify-content: center;
}
.ab-dot {
  width: 8px; height: 8px;
  background: var(--p1);
  border-radius: 50%;
  flex-shrink: 0;
  animation: abPulse 1.4s ease-in-out infinite;
}
@keyframes abPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0,255,136,0.5); }
  50%       { box-shadow: 0 0 0 6px rgba(0,255,136,0); }
}

/* Bio column */
.ab-bio { padding: 0.5rem 0; }
.ab-code-cmt {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 1rem;
  letter-spacing: 1px;
}
.ab-tagline {
  font-family: var(--font-px);
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text);
  margin-bottom: 1.4rem;
}
.ab-tagline span { color: var(--p1); text-shadow: 0 0 14px rgba(0,255,136,0.4); }
.ab-bio-p {
  color: var(--muted);
  line-height: 1.85;
  margin-bottom: 1.1rem;
  font-size: 0.9rem;
}
.ab-bio-p strong { color: var(--text); }
.ab-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.4rem 0;
}
.ab-chip {
  font-family: var(--font-px);
  font-size: 0.38rem;
  padding: 5px 10px;
  border: 1px solid;
  letter-spacing: 1px;
}
.ab-chip-g { color: var(--p1);   border-color: rgba(0,255,136,0.4);   background: rgba(0,255,136,0.06); }
.ab-chip-r { color: var(--p2);   border-color: rgba(255,45,120,0.4);  background: rgba(255,45,120,0.06); }
.ab-chip-v { color: var(--p3);   border-color: rgba(123,47,255,0.4);  background: rgba(123,47,255,0.06); }
.ab-chip-o { color: var(--gold); border-color: rgba(255,215,0,0.4);   background: rgba(255,215,0,0.06); }

/* Video column */
.ab-vid-col { position: relative; }
.ab-vid-frame {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px));
  box-shadow: -6px 6px 0 rgba(123,47,255,0.3);
}
.ab-vid-frame video {
  width: 100%;
  height: 100%;
  min-height: 280px;
  object-fit: cover;
  filter: contrast(1.05) saturate(0.85);
  display: block;
}
.ab-vid-overlay {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(0deg, transparent 0px, transparent 3px, rgba(0,0,0,0.07) 3px, rgba(0,0,0,0.07) 4px);
  pointer-events: none;
}
.ab-vid-tag {
  display: inline-block;
  font-family: var(--font-px);
  font-size: 0.36rem;
  color: var(--p3);
  border: 1px solid var(--p3);
  padding: 3px 8px;
  background: var(--bg);
  letter-spacing: 1px;
  margin-top: 10px;
}

/* Stats row */
.ab-stats {
  display: flex;
  gap: 1.2rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}
.ab-stat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
  background: var(--card);
  border: 1px solid var(--border);
  padding: 1.5rem 1.5rem;
  min-width: 148px;
  flex: 1 1 148px;
  max-width: 190px;
  position: relative;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.1s steps(2);
}
.ab-stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--rc, var(--p1));
}
.ab-stat-card:hover {
  border-color: var(--rc, var(--p1));
  box-shadow: 0 4px 20px rgba(0,255,136,0.1);
  transform: translateY(-3px);
}
.ab-ring-wrap {
  position: relative;
  width: 80px; height: 80px;
}
.ab-ring-svg {
  width: 80px; height: 80px;
  transform: rotate(-90deg);
  display: block;
}
.ab-ring-track {
  fill: none;
  stroke: var(--border);
  stroke-width: 4;
}
.ab-ring-fill {
  fill: none;
  stroke: var(--rc, var(--p1));
  stroke-width: 4;
  stroke-linecap: square;
  stroke-dasharray: 201.06;
  stroke-dashoffset: 201.06;
  transition: stroke-dashoffset 1.4s cubic-bezier(0.4,0,0.2,1);
  filter: drop-shadow(0 0 4px var(--rc, var(--p1)));
}
.ab-ring-num {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-px);
  font-size: 0.65rem;
  color: var(--rc, var(--p1));
  text-shadow: 0 0 12px var(--rc, var(--p1));
  pointer-events: none;
}
.ab-stat-lbl {
  font-family: var(--font-px);
  font-size: 0.38rem;
  color: var(--muted);
  text-align: center;
  line-height: 1.9;
  letter-spacing: 1px;
}

/* Skills row: radar | bars */
.ab-skills-row {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 2.5rem;
  align-items: start;
  margin-bottom: 3rem;
}
.ab-block-hd {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--p1);
  margin-bottom: 1.2rem;
  letter-spacing: 1px;
}
.ab-radar-wrap {
  background: var(--card);
  border: 1px solid var(--border);
  padding: 1.5rem 1rem;
}
.ab-radar-svg { width: 100%; max-width: 320px; display: block; margin: 0 auto; }
.ab-rg        { fill: none; stroke: var(--border); stroke-width: 1; }
.ab-rg-out    { stroke-opacity: 0.45; }
.ab-rax       { stroke: var(--border); stroke-width: 1; }
.ab-rarea {
  fill: rgba(0,255,136,0.1);
  stroke: var(--p1);
  stroke-width: 2;
  filter: drop-shadow(0 0 6px rgba(0,255,136,0.3));
  opacity: 0;
  transition: opacity 0.8s ease 0.5s;
}
.ab-radar-wrap.in-view .ab-rarea { opacity: 1; }
.ab-rdot {
  fill: var(--p1);
  filter: drop-shadow(0 0 4px rgba(0,255,136,0.8));
  opacity: 0;
  transition: opacity 0.4s ease var(--dot-d, 1s);
}
.ab-radar-wrap.in-view .ab-rdot { opacity: 1; }
.ab-rlbl {
  font-family: var(--font-px);
  font-size: 5.5px;
  fill: var(--muted);
  letter-spacing: 0.5px;
}
.ab-rpct {
  font-family: var(--font-mono);
  font-size: 9px;
  fill: var(--p1);
  opacity: 0.85;
}

/* Skill bars */
.ab-skill-list {
  background: var(--card);
  border: 1px solid var(--border);
  padding: 1.5rem;
}
.ab-sk-item { margin-bottom: 1.3rem; }
.ab-sk-item:last-child { margin-bottom: 0; }
.ab-sk-hd {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 6px;
}
.ab-sk-name {
  font-family: var(--font-px);
  font-size: 0.42rem;
  color: var(--text);
  letter-spacing: 1px;
}
.ab-sk-pct {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--bar-c, var(--p1));
}
.ab-sk-bar {
  height: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  overflow: hidden;
  margin-bottom: 4px;
}
.ab-sk-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--bar-c, var(--p1)), rgba(255,255,255,0.25));
  transition: width 1.3s cubic-bezier(0.4,0,0.2,1);
  position: relative;
}
.ab-sk-fill::after {
  content: '';
  position: absolute;
  right: 0; top: 0; bottom: 0;
  width: 3px;
  background: rgba(255,255,255,0.5);
}
.ab-sk-sub {
  font-size: 0.76rem;
  color: var(--muted);
  letter-spacing: 0.3px;
}

/* Tech stack */
.ab-stack {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 1.5rem;
}
.ab-stack-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.ab-tech {
  font-family: var(--font-px);
  font-size: 0.38rem;
  padding: 5px 10px;
  border: 1px solid;
  letter-spacing: 1px;
  opacity: 0;
  transform: scale(0.88);
  transition: opacity 0.35s ease var(--sd, 0ms), transform 0.35s ease var(--sd, 0ms),
              background 0.1s, box-shadow 0.1s;
}
.ab-stack.in-view .ab-tech { opacity: 1; transform: scale(1); }
.ab-tg { color: var(--p1);   border-color: rgba(0,255,136,0.3); }
.ab-tr { color: var(--p2);   border-color: rgba(255,45,120,0.3); }
.ab-tv { color: var(--p3);   border-color: rgba(123,47,255,0.3); }
.ab-to { color: var(--gold); border-color: rgba(255,215,0,0.3); }
.ab-tg:hover { background: rgba(0,255,136,0.1);  box-shadow: 2px 2px 0 rgba(0,255,136,0.3); }
.ab-tr:hover { background: rgba(255,45,120,0.1); box-shadow: 2px 2px 0 rgba(255,45,120,0.3); }
.ab-tv:hover { background: rgba(123,47,255,0.1); box-shadow: 2px 2px 0 rgba(123,47,255,0.3); }
.ab-to:hover { background: rgba(255,215,0,0.1);  box-shadow: 2px 2px 0 rgba(255,215,0,0.3); }

/* ============================================
   PROJECTS
   ============================================ */
.projects-filter {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}
.filter-btn {
  font-family: var(--font-px);
  font-size: 0.4rem;
  padding: 6px 12px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  letter-spacing: 1px;
  transition: color 0.08s, border-color 0.08s;
}
.filter-btn.active, .filter-btn:hover {
  border-color: var(--p1);
  color: var(--p1);
  background: rgba(0,255,136,0.04);
}
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}
.project-card {
  background: var(--card);
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
  transition: transform 0.06s steps(2), border-color 0.1s, box-shadow 0.06s steps(2);
}
.project-card:hover {
  border-color: var(--p1);
  transform: translate(-2px, -2px);
  box-shadow: 4px 4px 0 var(--p1);
}
.project-card::before {
  content: attr(data-num);
  position: absolute;
  top: 8px; right: 12px;
  font-family: var(--font-px);
  font-size: 0.45rem;
  color: var(--border);
  z-index: 3;
}
.card-media {
  position: relative;
  overflow: hidden;
  height: 200px;
  background: var(--surface);
}
.card-media img,
.card-media video {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
  filter: grayscale(15%) contrast(1.05);
}
.project-card:hover .card-media img,
.project-card:hover .card-media video {
  transform: scale(1.04);
  filter: grayscale(0%);
}
.card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(7,7,15,0.88) 0%, transparent 55%);
  display: flex;
  align-items: flex-end;
  padding: 12px;
  gap: 5px;
  flex-wrap: wrap;
  z-index: 1;
}
.tag {
  font-family: var(--font-px);
  font-size: 0.35rem;
  padding: 3px 6px;
  border: 1px solid;
  letter-spacing: 0.5px;
}
.tag-g { color: var(--p1);   border-color: var(--p1);   background: rgba(0,255,136,0.08); }
.tag-p { color: var(--p2);   border-color: var(--p2);   background: rgba(255,45,120,0.08); }
.tag-v { color: var(--p3);   border-color: var(--p3);   background: rgba(123,47,255,0.08); }
.tag-o { color: var(--gold); border-color: var(--gold); background: rgba(255,215,0,0.08); }
.card-body { padding: 1.2rem; }
.card-body h3 {
  font-family: var(--font-px);
  font-size: 0.6rem;
  color: var(--text);
  margin-bottom: 0.6rem;
  line-height: 1.6;
}
.card-body p {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 1rem;
  line-height: 1.65;
}
.card-links { display: flex; gap: 0.5rem; }

/* ============================================
   ARTICLES
   ============================================ */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}
.article-card {
  background: var(--card);
  border: 1px solid var(--border);
  position: relative;
  transition: transform 0.06s steps(2), border-color 0.1s, box-shadow 0.06s steps(2);
}
.article-card-link {
  display: block;
  padding: 1.5rem;
  color: inherit;
  text-decoration: none;
  height: 100%;
}
.article-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 3px; height: 100%;
  background: var(--p2);
  transition: width 0.08s steps(2);
}
.article-card:hover {
  border-color: var(--p2);
  transform: translate(-2px, -2px);
  box-shadow: 4px 4px 0 var(--p2);
}
.article-card:hover::before { width: 5px; }
.article-card:focus-within {
  border-color: var(--p2);
  transform: translate(-2px, -2px);
  box-shadow: 4px 4px 0 var(--p2);
}
.article-card:focus-within::before { width: 5px; }
.article-card-link:focus-visible {
  outline: 2px solid var(--p2);
  outline-offset: -2px;
}
.article-meta {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 0.9rem;
}
.article-date { font-size: 0.72rem; color: var(--muted); }
.article-tag {
  font-family: var(--font-px);
  font-size: 0.34rem;
  color: var(--p2);
  border: 1px solid var(--p2);
  padding: 2px 5px;
}
.article-card h3 {
  font-family: var(--font-px);
  font-size: 0.56rem;
  color: var(--text);
  margin-bottom: 0.7rem;
  line-height: 1.9;
}
.article-card p {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 1.2rem;
  line-height: 1.7;
}
.read-more {
  font-family: var(--font-px);
  font-size: 0.38rem;
  color: var(--p2);
  letter-spacing: 1px;
}
.read-more:hover { text-decoration: underline; }

/* ============================================
   RESEARCH
   ============================================ */
.research-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.5rem;
}
.research-card {
  background: var(--card);
  border: 1px solid var(--border);
  padding: 1.8rem;
  position: relative;
  transition: transform 0.06s steps(2), border-color 0.1s, box-shadow 0.06s steps(2);
}
.research-card-link {
  display: block;
  color: inherit;
  text-decoration: none;
}
.research-card-link:focus-visible {
  outline: 2px solid var(--p3);
  outline-offset: 3px;
}
.research-card:hover {
  border-color: var(--p3);
  transform: translate(-2px, -2px);
  box-shadow: 4px 4px 0 var(--p3);
}
.research-ico {
  width: 28px; height: 28px;
  margin-bottom: 1.2rem;
  color: var(--p3);
  fill: currentColor;
}
.research-card h3 {
  font-family: var(--font-px);
  font-size: 0.56rem;
  color: var(--p3);
  margin-bottom: 0.75rem;
  line-height: 1.9;
}
.research-card p {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.75;
  margin-bottom: 1rem;
}
.research-status {
  display: inline-block;
  font-family: var(--font-px);
  font-size: 0.34rem;
  padding: 3px 8px;
  border: 1px solid var(--p3);
  color: var(--p3);
  letter-spacing: 1px;
}
.research-status.ongoing { color: var(--gold); border-color: var(--gold); }
.research-status.done    { color: var(--p1);   border-color: var(--p1); }
.research-card--feature {
  max-width: 920px;
}
.research-thumb {
  display: block;
  width: 100%;
  max-height: 420px;
  object-fit: contain;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border);
  margin-bottom: 1.25rem;
}
.research-meta-line {
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 0.85rem;
  line-height: 1.7;
}
.research-meta-line a {
  color: var(--p3);
  text-decoration: none;
}
.research-meta-line a:hover {
  text-decoration: underline;
}
.research-note {
  font-size: 0.78rem;
  color: var(--muted);
}
.research-actions {
  margin: 1rem 0 1.1rem;
}

/* ============================================
   SERVICES
   ============================================ */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
}
.service-card {
  background: var(--card);
  border: 1px solid var(--border);
  padding: 2rem 1.5rem;
  position: relative;
  overflow: hidden;
  transition: transform 0.06s steps(2), border-color 0.1s, box-shadow 0.06s steps(2);
}
.service-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--p1), var(--p3));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.15s steps(4);
}
.service-card:hover {
  border-color: var(--p1);
  transform: translate(-2px, -2px);
  box-shadow: 4px 4px 0 var(--p1);
}
.service-card:hover::before { transform: scaleX(1); }
.service-ico {
  width: 32px; height: 32px;
  margin-bottom: 1.2rem;
  color: var(--p1);
  fill: currentColor;
}
.service-card h3 {
  font-family: var(--font-px);
  font-size: 0.58rem;
  color: var(--p1);
  margin-bottom: 0.9rem;
  line-height: 1.8;
}
.service-card p {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 1.4rem;
  line-height: 1.75;
}
.service-features {
  list-style: none;
  margin-bottom: 1.5rem;
}
.service-features li {
  font-size: 0.78rem;
  color: var(--muted);
  padding: 3px 0;
  padding-left: 12px;
  position: relative;
}
.service-features li::before {
  content: '>';
  position: absolute;
  left: 0;
  color: var(--p1);
  font-family: var(--font-px);
  font-size: 0.38rem;
}
.service-price {
  font-family: var(--font-px);
  font-size: 0.42rem;
  color: var(--gold);
  margin-bottom: 1.2rem;
  display: block;
}

/* ============================================
   CONTACT (with video bg)
   ============================================ */
.contact-video-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.contact-video-bg video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.06;
}
.contact-video-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--surface);
  opacity: 0.92;
}
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
  position: relative;
  z-index: 1;
}
.contact-info h3 {
  font-family: var(--font-px);
  font-size: 0.7rem;
  color: var(--text);
  margin-bottom: 1rem;
  line-height: 1.9;
}
.contact-info p { color: var(--muted); margin-bottom: 2rem; line-height: 1.8; }
.contact-links { display: flex; flex-direction: column; gap: 0.75rem; }
.contact-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  background: var(--card);
  transition: border-color 0.1s, color 0.1s;
}
.contact-link:hover { border-color: var(--p1); }
.contact-link svg { width: 18px; height: 18px; flex-shrink: 0; fill: var(--p1); }
.link-label { font-family: var(--font-px); font-size: 0.38rem; color: var(--muted); display: block; margin-bottom: 2px; }
.link-value { font-size: 0.85rem; color: var(--text); }
.contact-form { display: flex; flex-direction: column; gap: 1rem; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-family: var(--font-px); font-size: 0.42rem; color: var(--muted); letter-spacing: 1px; }
.form-group input, .form-group textarea {
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  padding: 10px 14px;
  outline: none;
  resize: none;
  transition: border-color 0.1s;
}
.form-group input:focus, .form-group textarea:focus {
  border-color: var(--p1);
  box-shadow: 0 0 0 1px rgba(0,255,136,0.2);
}
.form-group textarea { min-height: 130px; }
.form-note { font-size: 0.74rem; color: var(--muted); }

/* ============================================
   FOOTER
   ============================================ */
footer {
  background: var(--bg);
  border-top: 2px solid var(--border);
  padding: 3.5rem 5% 2rem;
  position: relative;
}
.footer-gif {
  position: absolute;
  top: -1px; right: 5%;
  height: 60px;
  opacity: 0.5;
  image-rendering: pixelated;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 2.5rem;
}
.footer-brand .nav-logo-text {
  margin-bottom: 1rem;
  display: block;
}
.footer-logo-img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  image-rendering: pixelated;
  margin-bottom: 1rem;
  filter: drop-shadow(0 0 8px rgba(0,255,136,0.4));
}
.footer-brand p { font-size: 0.85rem; color: var(--muted); line-height: 1.7; max-width: 280px; }
.footer-col h4 { font-family: var(--font-px); font-size: 0.45rem; color: var(--text); margin-bottom: 1rem; letter-spacing: 1px; }
.footer-col ul li { margin-bottom: 0.5rem; }
.footer-col ul li a { font-size: 0.85rem; color: var(--muted); transition: color 0.1s; }
.footer-col ul li a:hover { color: var(--p1); }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}
.footer-bottom p { font-size: 0.75rem; color: var(--muted); }
.footer-bottom span { color: var(--p2); }
.footer-socials { display: flex; gap: 0.5rem; }
.social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border: 1px solid var(--border);
  background: var(--card);
  transition: border-color 0.1s;
}
.social-btn svg { width: 18px; height: 18px; fill: var(--muted); transition: fill 0.1s; }
.social-btn:hover { border-color: var(--p1); }
.social-btn:hover svg { fill: var(--p1); }

/* ============================================
   CLIENTS STRIP
   ============================================ */
.clients-strip {
  padding: 2.5rem 5%;
  background: var(--card);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 3rem;
  overflow: hidden;
}
.clients-label {
  font-family: var(--font-px);
  font-size: 0.38rem;
  color: var(--muted);
  white-space: nowrap;
  letter-spacing: 2px;
}
.clients-logos {
  display: flex;
  gap: 3rem;
  align-items: center;
  flex-wrap: wrap;
}
.clients-logos img {
  height: 40px;
  object-fit: contain;
  filter: grayscale(1) brightness(0.5);
  transition: filter 0.2s;
}
.clients-logos img:hover { filter: grayscale(0) brightness(1); }

/* ============================================
   SECTION VARIETY — cada sección tiene su toque
   ============================================ */

/* Sobre Mí: borde izquierdo neon + bg ligeramente diferente */
#sobre-mi {
  border-left: 4px solid var(--p1);
}

/* Proyectos: fondo alterno con textura punto */
#proyectos::before {
  background-image: radial-gradient(rgba(0,255,136,0.07) 1px, transparent 1px);
  background-size: 24px 24px;
}

/* Artículos: accent color rosa/magenta */
#articulos {
  background: var(--bg);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
#articulos .section-divider {
  background: linear-gradient(90deg, var(--p2), transparent);
}
#articulos .section-title .prefix { color: var(--p2); }

/* Investigación: efecto blueprint (cuadrícula azul) */
#investigacion::before {
  background-image:
    linear-gradient(rgba(123,47,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(123,47,255,0.04) 1px, transparent 1px);
  background-size: 28px 28px;
}
#investigacion .section-divider {
  background: linear-gradient(90deg, var(--p3), transparent);
}
#investigacion .section-title .prefix { color: var(--p3); }

/* Servicios: separador dorado */
#servicios .section-divider {
  background: linear-gradient(90deg, var(--gold), transparent);
}
#servicios .section-title .prefix { color: var(--gold); }

/* Contacto: accent de líneas diagonales */
#contacto::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    -45deg,
    transparent,
    transparent 20px,
    rgba(0,255,136,0.012) 20px,
    rgba(0,255,136,0.012) 21px
  );
  pointer-events: none;
  z-index: 0;
}

/* ============================================
   SCROLL ANIMATIONS
   ============================================ */
.fade-up {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.fade-up.visible { opacity: 1; transform: translateY(0); }
.stagger > *:nth-child(1) { transition-delay: 0ms; }
.stagger > *:nth-child(2) { transition-delay: 80ms; }
.stagger > *:nth-child(3) { transition-delay: 160ms; }
.stagger > *:nth-child(4) { transition-delay: 240ms; }
.stagger > *:nth-child(5) { transition-delay: 320ms; }
.stagger > *:nth-child(6) { transition-delay: 400ms; }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 860px) {
  .hero-inner {
    flex-direction: column;
    gap: 2rem;
    padding: calc(var(--nav-h) + 60px) 6% 4rem;
    text-align: center;
  }
  .hero-photo-wrap { width: 200px; }
  .hero-photo { width: 200px; height: 300px; }
  .hero-btns { justify-content: center; }
  .hero-watermark { display: none; }
  .hero-video-card { width: 100px; bottom: -18px; right: -18px; }
  .hero-video-gif { height: 68px; }
  .hero-subtitle-card { max-width: 100%; }
  .about-grid { grid-template-columns: 1fr; }
  .about-video-wrap { display: none; }
  .ab-intro { grid-template-columns: 220px 1fr; }
  .ab-vid-col { display: none; }
  .ab-skills-row { grid-template-columns: 1fr; }
  .ab-radar-wrap { display: none; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
}
@media (max-width: 720px) {
  .nav-links {
    display: none;
    position: fixed;
    top: var(--nav-h); left: 0; right: 0;
    background: rgba(7,7,15,0.98);
    border-bottom: 2px solid var(--p1);
    flex-direction: column;
    padding: 1rem 0;
  }
  .nav-links.open { display: flex; }
  .nav-links li a { padding: 0.8rem 2rem; font-size: 0.48rem; }
  .nav-cta { display: none; }
  .nav-toggle { display: flex; }
  .about-stats { grid-template-columns: 1fr 1fr; }
  .ab-intro { grid-template-columns: 1fr; }
  .ab-vid-col { display: none; }
  .ab-stat-card { min-width: 120px; padding: 1.2rem 1rem; }
  .hero-name { font-size: 1.4rem; }
  .clients-strip { flex-direction: column; gap: 1.5rem; }
}
@media (max-width: 480px) {
  .section { padding: 4rem 1.2rem; }
  .navbar { padding: 0 1.2rem; }
  .hero { padding-left: 1.2rem; padding-right: 1.2rem; }
  .about-stats { grid-template-columns: 1fr; }
  .footer-grid { padding: 0; }
}

/* ============================================
   PROJECT MODAL
   ============================================ */
.pmodal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(7,7,15,0.88);
  backdrop-filter: blur(6px);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  transition: opacity 0.22s ease;
}
.pmodal-overlay:not([hidden]) {
  opacity: 1;
}
.pmodal-overlay[hidden] {
  display: none !important;
}
.pmodal-box {
  position: relative;
  background: var(--card);
  border: 1px solid var(--border);
  border-top: 3px solid var(--p1);
  box-shadow: 0 0 40px rgba(0,255,136,0.12), 6px 6px 0 rgba(0,255,136,0.08);
  max-width: 760px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  border-radius: 2px;
  transform: translateY(24px);
  transition: transform 0.25s ease;
}
.pmodal-overlay:not([hidden]) .pmodal-box {
  transform: translateY(0);
}
.pmodal-close {
  position: sticky;
  top: 0;
  float: right;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 1.4rem;
  line-height: 1;
  padding: 0.3rem 0.7rem;
  margin: 0.8rem 0.8rem 0 0;
  z-index: 10;
  transition: color 0.15s, border-color 0.15s;
}
.pmodal-close:hover { color: var(--p2); border-color: var(--p2); }
.pmodal-num {
  font-family: var(--font-px);
  font-size: 0.55rem;
  color: var(--p1);
  letter-spacing: 2px;
  padding: 1.2rem 1.6rem 0;
  clear: both;
}
.pmodal-media {
  width: 100%;
  height: 260px;
  overflow: hidden;
  background: var(--surface);
  margin-top: 0.8rem;
}
.pmodal-media img,
.pmodal-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.pmodal-content {
  padding: 1.4rem 1.6rem 2rem;
}
.pmodal-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.9rem;
}
.pmodal-title {
  font-family: var(--font-px);
  font-size: 0.75rem;
  color: var(--text);
  line-height: 1.7;
  margin-bottom: 1rem;
}
.pmodal-desc {
  font-family: var(--font-mono);
  font-size: 0.97rem;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 1.2rem;
}
.pmodal-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.6rem;
}
.pmodal-features li {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--text);
  padding-left: 1.2rem;
  position: relative;
}
.pmodal-features li::before {
  content: '>';
  position: absolute;
  left: 0;
  color: var(--p1);
  font-weight: bold;
}
.pmodal-cta {
  display: inline-block;
  text-decoration: none;
}
@media (max-width: 600px) {
  .pmodal-media { height: 180px; }
  .pmodal-title { font-size: 0.6rem; }
  .pmodal-content { padding: 1rem 1rem 1.6rem; }
}

/* --- Form feedback message --- */
.form-msg {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  padding: 0.7rem 1rem;
  border-left: 3px solid;
  margin-top: 0.8rem;
}
.form-msg--ok    { color: var(--p1); border-color: var(--p1); background: rgba(0,255,136,0.06); }
.form-msg--error { color: var(--p2); border-color: var(--p2); background: rgba(255,45,120,0.06); }

/* --- reCAPTCHA v2 checkbox --- */
.g-recaptcha {
  margin: 1rem 0 0.5rem;
}

/* ============================================
   SCROLL PROGRESS BAR
   ============================================ */
#scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--p1), var(--p2), var(--p3));
  width: 0%;
  z-index: 9999;
  box-shadow: 0 0 8px rgba(0,255,136,0.6);
  pointer-events: none;
  transition: width 0.08s linear;
}

/* ============================================
   FLOAT: hero video card
   ============================================ */
@keyframes floatCard {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-10px); }
}
.hero-video-card {
  animation: floatCard 3.2s ease-in-out infinite;
}

/* ============================================
   FLOAT: hero watermark slow drift
   ============================================ */
@keyframes watermarkDrift {
  0%, 100% { transform: translateY(0) rotate(0deg); opacity: 0.08; }
  50%       { transform: translateY(-14px) rotate(2deg); opacity: 0.11; }
}
.hero-watermark {
  animation: watermarkDrift 9s ease-in-out infinite;
}

/* ============================================
   GLITCH: hero name on hover
   ============================================ */
.hero-name span {
  position: relative;
  display: inline-block;
}
.hero-name span::before,
.hero-name span::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
}
.hero-name:hover span::before {
  color: var(--p2);
  opacity: 1;
  animation: glitchA 0.45s steps(2) infinite;
}
.hero-name:hover span::after {
  color: var(--p3);
  opacity: 0.8;
  animation: glitchB 0.45s steps(2) infinite;
}
@keyframes glitchA {
  0%   { clip-path: inset(5%  0 85% 0); transform: translate(-4px, 0); }
  25%  { clip-path: inset(55% 0 25% 0); transform: translate( 4px, 0); }
  50%  { clip-path: inset(75% 0 5%  0); transform: translate(-2px, 0); }
  75%  { clip-path: inset(25% 0 55% 0); transform: translate( 2px, 0); }
  100% { clip-path: inset(90% 0 0   0); transform: translate( 0,   0); }
}
@keyframes glitchB {
  0%   { clip-path: inset(80% 0 5%  0); transform: translate( 4px, 0); }
  25%  { clip-path: inset(30% 0 50% 0); transform: translate(-4px, 0); }
  50%  { clip-path: inset(5%  0 75% 0); transform: translate( 2px, 0); }
  75%  { clip-path: inset(60% 0 20% 0); transform: translate(-2px, 0); }
  100% { clip-path: inset(0   0 90% 0); transform: translate( 0,   0); }
}

/* ============================================
   SECTION TITLE: slide in from left on scroll
   ============================================ */
.section-title {
  opacity: 0;
  transform: translateX(-28px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.section-title.in-view {
  opacity: 1;
  transform: translateX(0);
}
.section-divider {
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.55s ease 0.22s;
}
.section-title.in-view + .section-divider {
  transform: scaleX(1);
}

/* ============================================
   STAT BOX: hover lift + glow
   ============================================ */
.stat-box {
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.stat-box:hover {
  transform: translateY(-5px);
  border-color: rgba(0,255,136,0.45);
  box-shadow: 0 8px 24px rgba(0,255,136,0.14);
}
.stat-num {
  transition: color 0.3s ease;
}
.stat-num.counting {
  color: var(--gold);
}

/* ============================================
   ABOUT VIDEO: pulse glow on hover
   ============================================ */
@keyframes aboutVideoPulse {
  0%, 100% { box-shadow: -8px 8px 0 rgba(123,47,255,0.3); }
  50%       { box-shadow: -8px 8px 0 rgba(123,47,255,0.3), 0 0 28px 6px rgba(0,255,136,0.12); }
}
.about-video-wrap:hover .about-video-inner {
  animation: aboutVideoPulse 1.8s ease-in-out infinite;
}

/* ============================================
   PIXEL PARTICLES: hero floating dots
   ============================================ */
@keyframes pixelFloat {
  0%   { transform: translateY(0) translateX(0); opacity: 0; }
  10%  { opacity: 0.9; }
  85%  { opacity: 0.5; }
  100% { transform: translateY(-90px) translateX(var(--dx, 0px)); opacity: 0; }
}
.pixel-particle {
  position: absolute;
  width: 4px;
  height: 4px;
  pointer-events: none;
  image-rendering: pixelated;
  animation: pixelFloat var(--dur, 5s) linear infinite;
  animation-delay: var(--delay, 0s);
  opacity: 0;
  z-index: 1;
}

/* ============================================
   PARALLAX: hero bg (JS-driven)
   ============================================ */
.hero-video-bg {
  will-change: transform;
}

/* ============================================
   HERO GRID OVERLAY: subtle slow drift
   ============================================ */
@keyframes gridShift {
  0%   { background-position: 0 0; }
  100% { background-position: 40px 40px; }
}
.hero-grid-overlay {
  animation: gridShift 20s linear infinite;
}

/* ============================================
   SERVICE CARD: shimmer on hover (retro line sweep)
   ============================================ */
.service-card {
  overflow: hidden;
}
.service-card::after {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(0,255,136,0.04), transparent);
  transition: left 0.4s ease;
}
.service-card:hover::after {
  left: 160%;
}

/* ============================================
   LANG TOGGLE BUTTON
   ============================================ */
.nav-lang-btn {
  font-family: var(--font-px);
  font-size: 0.42rem;
  color: var(--p3);
  border: 1px solid var(--p3);
  padding: 5px 10px;
  background: transparent;
  letter-spacing: 1px;
  transition: color 0.1s, background 0.1s;
  margin-left: 0.5rem;
  cursor: pointer;
  line-height: 1.4;
}
.nav-lang-btn:hover {
  background: rgba(123,47,255,0.1);
}

/* ============================================
   ARTICLE / RESEARCH PAGE STYLES
   ============================================ */
.art-page {
  max-width: 760px;
  margin: 0 auto;
  padding: 7rem 1.5rem 4rem;
}
.art-breadcrumb {
  font-family: var(--font-px);
  font-size: 0.42rem;
  color: var(--muted);
  margin-bottom: 2rem;
  letter-spacing: 0.5px;
}
.art-breadcrumb a {
  color: var(--p1);
  text-decoration: none;
}
.art-breadcrumb a:hover { text-decoration: underline; }
.art-breadcrumb span { margin: 0 0.5rem; }
.art-header {
  margin-bottom: 2.5rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 1.5rem;
}
.art-meta {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.art-date {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--muted);
}
.art-tag {
  font-family: var(--font-px);
  font-size: 0.38rem;
  color: var(--p1);
  border: 1px solid var(--p1);
  padding: 3px 8px;
  letter-spacing: 1px;
}
.art-reading-time {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--muted);
}
.art-header h1 {
  font-family: var(--font-px);
  font-size: clamp(0.7rem, 2.5vw, 1rem);
  line-height: 1.8;
  color: var(--text);
  margin: 0;
}
.art-body h2 {
  font-family: var(--font-px);
  font-size: 0.6rem;
  color: var(--p1);
  margin: 2.5rem 0 1rem;
  letter-spacing: 1px;
}
.art-body h2::before {
  content: '// ';
  color: var(--p1);
  opacity: 0.7;
}
.art-body p {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.8;
  color: var(--text-dim, #c8c8d8);
  margin-bottom: 1.2rem;
}
.art-body ul, .art-body ol {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.8;
  color: var(--text-dim, #c8c8d8);
  margin-bottom: 1.2rem;
  padding-left: 1.5rem;
}
.art-body li { margin-bottom: 0.4rem; }
.art-body code {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  background: var(--surface);
  color: var(--p2);
  padding: 2px 6px;
  border-radius: 2px;
}
.art-body pre {
  background: var(--surface);
  border-left: 3px solid var(--p1);
  padding: 1rem 1.2rem;
  margin: 1.5rem 0;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--p2);
  line-height: 1.7;
}
.art-back {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}
.art-status {
  display: inline-block;
  font-family: var(--font-px);
  font-size: 0.38rem;
  letter-spacing: 1px;
  padding: 4px 10px;
  border-radius: 2px;
  margin-bottom: 1.2rem;
}
.art-status.ongoing {
  color: var(--gold);
  border: 1px solid var(--gold);
  background: rgba(255,196,0,0.07);
}
.art-status.done {
  color: var(--p1);
  border: 1px solid var(--p1);
  background: rgba(0,255,136,0.07);
}

.art-figure {
  margin: 1.5rem 0 2rem;
  padding: 1rem;
  border: 1px solid var(--border);
  background: var(--card);
}
.art-figure img {
  display: block;
  width: 100%;
  max-height: 720px;
  object-fit: contain;
  background: rgba(255,255,255,0.02);
}
.art-figure figcaption {
  margin-top: 0.9rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.7;
  color: var(--muted);
}
.art-cta-row {
  margin-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

/* ============================================
   CERTIFICATIONS SECTION
   ============================================ */
#about {
  background: var(--bg);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  position: relative;
}
/* Subtle grid + glow background — no animation, no overflow issues */
#about::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(123,47,255,0.08) 0%, transparent 55%),
    radial-gradient(ellipse at 80% 30%, rgba(0,255,136,0.06) 0%, transparent 50%),
    linear-gradient(rgba(0,255,136,0.012) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,255,136,0.012) 1px, transparent 1px);
  background-size: auto, auto, 28px 28px, 28px 28px;
  pointer-events: none;
  z-index: 0;
}
/* All children sit above the pseudo bg */
#about > * { position: relative; z-index: 1; }

/* About Me bio wrapper */
.abt-bio { margin-bottom: 2.5rem; }

/* Tab navigation */
.about-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 2.5rem;
  padding-bottom: 1.2rem;
  border-bottom: 1px solid var(--border);
}
.about-tab {
  font-family: var(--font-px);
  font-size: 0.42rem;
  letter-spacing: 1px;
  padding: 0.8rem 2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: color 0.08s steps(2), border-color 0.15s, background 0.08s steps(2);
}
/* top accent bar */
.about-tab::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--tab-c, var(--p1));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s steps(3);
}
.about-tab[data-tab="certs"] { --tab-c: var(--p3); }
.about-tab:hover {
  color: var(--text);
  border-color: rgba(255,255,255,0.15);
}
.about-tab--active {
  background: rgba(0,0,0,0.25);
  border-color: var(--tab-c, var(--p1));
  color: var(--tab-c, var(--p1));
  text-shadow: 0 0 10px rgba(0,255,136,0.25);
  box-shadow: 3px 3px 0 rgba(0,255,136,0.1);
}
.about-tab[data-tab="certs"].about-tab--active {
  text-shadow: 0 0 10px rgba(123,47,255,0.35);
  box-shadow: 3px 3px 0 rgba(123,47,255,0.15);
}
.about-tab--active::before { transform: scaleX(1); }

/* Panels */
.about-panel { display: none; }
.about-panel--active { display: block; animation: panelFadeIn 0.25s ease; }
@keyframes panelFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

#about .section-divider {
  background: linear-gradient(90deg, var(--p3), var(--p1), transparent);
}
#about .section-title .prefix { color: var(--p3); }
#about .section-title.in-view {
  text-shadow: 0 0 18px rgba(123,47,255,0.25);
}

/* Stats ribbon */
.certs-ribbon {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 3rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--p3);
  box-shadow: 0 0 24px rgba(123,47,255,0.06);
  flex-wrap: wrap;
}
.certs-ribbon-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.1rem 2rem;
  gap: 0.3rem;
  flex: 1 1 100px;
}
.certs-ribbon-num {
  font-family: var(--font-px);
  font-size: 0.9rem;
  color: var(--p3);
  text-shadow: 0 0 12px rgba(123,47,255,0.4);
  line-height: 1;
}
.certs-ribbon-lbl {
  font-family: var(--font-px);
  font-size: 0.32rem;
  color: var(--muted);
  letter-spacing: 1px;
  text-align: center;
}
.certs-ribbon-sep {
  width: 1px;
  height: 40px;
  background: var(--border);
  flex-shrink: 0;
}

/* Grid */
.certs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 1.5rem;
}
.certs-grid--wide {
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
}

/* Cert card */
.cert-card {
  background: var(--card);
  border: 1px solid var(--border);
  padding: 1.8rem 1.8rem 1.5rem;
  position: relative;
  overflow: hidden;
  transition: transform 0.08s steps(2), border-color 0.18s, box-shadow 0.12s steps(2);
}
/* Top accent bar */
.cert-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--cc, var(--p1));
  box-shadow: 0 0 10px var(--cc, var(--p1));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.22s steps(4);
}
.cert-card.visible::before,
.cert-card:hover::before { transform: scaleX(1); }
/* Left accent line on hover */
.cert-card::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0; left: 0;
  width: 0;
  background: linear-gradient(180deg, var(--cc, var(--p1)), transparent);
  opacity: 0.12;
  transition: width 0.18s ease;
}
.cert-card:hover::after { width: 3px; }
.cert-card:hover {
  border-color: var(--cc, var(--p1));
  transform: translate(-3px, -3px);
  box-shadow: 5px 5px 0 var(--cc, var(--p1)), 0 0 20px rgba(0,0,0,0.3);
}

/* Shimmer sweep on hover */
.cert-shimmer {
  position: absolute;
  top: 0; left: -120%;
  width: 60%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.025), transparent);
  transition: left 0.5s ease;
  pointer-events: none;
}
.cert-card:hover .cert-shimmer { left: 160%; }

/* Card top row: icon + status badge */
.cert-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.2rem;
}

/* Icon wrap */
.cert-icon-wrap {
  width: 46px; height: 46px;
  border: 1px solid rgba(255,255,255,0.08);
  border-left: 2px solid var(--cc, var(--p1));
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.35);
  flex-shrink: 0;
  transition: box-shadow 0.2s, border-color 0.2s;
}
.cert-card:hover .cert-icon-wrap {
  border-color: var(--cc, var(--p1));
  box-shadow: 0 0 16px var(--cc, var(--p1)), inset 0 0 8px rgba(0,0,0,0.5);
}
.cert-icon-wrap svg {
  width: 22px; height: 22px;
  fill: var(--cc, var(--p1));
  transition: filter 0.2s;
}
.cert-card:hover .cert-icon-wrap svg {
  filter: drop-shadow(0 0 4px var(--cc, var(--p1)));
}

/* Status badge */
.cert-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-px);
  font-size: 0.34rem;
  padding: 4px 10px;
  border: 1px solid var(--cc, var(--p1));
  color: var(--cc, var(--p1));
  letter-spacing: 1px;
  background: rgba(0,0,0,0.25);
}
.cert-status::before {
  content: '';
  width: 6px; height: 6px;
  background: var(--cc, var(--p1));
  display: inline-block;
  animation: abPulse 1.6s ease-in-out infinite;
  flex-shrink: 0;
}

/* Meta row: issuer + year */
.cert-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.45rem;
}
.cert-issuer {
  font-family: var(--font-px);
  font-size: 0.34rem;
  color: var(--muted);
  letter-spacing: 1px;
  text-transform: uppercase;
}
.cert-year {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--cc, var(--p1));
  opacity: 0.7;
}

/* Degree title + level */
.cert-name {
  font-family: var(--font-px);
  font-size: 0.5rem;
  color: var(--text);
  line-height: 1.9;
  margin-bottom: 0.5rem;
  letter-spacing: 0.5px;
}
.cert-level {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--cc, var(--p1));
  margin-bottom: 1rem;
  opacity: 0.8;
}

/* Description */
.cert-desc {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 1.1rem;
}

/* Tag chips */
.cert-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.2rem;
}
.cert-tag {
  font-family: var(--font-px);
  font-size: 0.32rem;
  padding: 3px 7px;
  border: 1px solid var(--border);
  color: var(--muted);
  letter-spacing: 0.5px;
  transition: color 0.1s, border-color 0.1s;
}
.cert-card:hover .cert-tag {
  color: var(--cc, var(--p1));
  border-color: var(--border);
}

/* Completion bar */
.cert-bar {
  height: 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  margin-top: 1rem;
  overflow: hidden;
}
.cert-bar-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--cc, var(--p1)), rgba(255,255,255,0.3));
  transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1) 0.3s;
  position: relative;
}
.cert-bar-fill::after {
  content: '';
  position: absolute;
  right: 0; top: 0; bottom: 0;
  width: 2px;
  background: rgba(255,255,255,0.6);
}
.cert-card.visible .cert-bar-fill {
  width: var(--cert-w, 100%);
}

/* Responsive */
@media (max-width: 860px) {
  .certs-grid--wide { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .certs-grid { grid-template-columns: 1fr; }
  .certs-ribbon-sep { display: none; }
  .certs-ribbon-item { padding: 0.8rem 1rem; }
}

/* ============================================
   AUTO GLITCH: hero name periodic + hover
   ============================================ */
.hero-name span.glitch-active::before {
  color: var(--p2);
  opacity: 1;
  animation: glitchA 0.45s steps(2) infinite;
}
.hero-name span.glitch-active::after {
  color: var(--p3);
  opacity: 0.8;
  animation: glitchB 0.45s steps(2) infinite;
}

/* ============================================
   ENHANCED: tech badge pop on hover
   ============================================ */
.ab-tech:hover {
  transform: translateY(-2px) scale(1.06) !important;
  z-index: 1;
}

/* ============================================
   ENHANCED: hero badge bounce
   ============================================ */
@keyframes badgeBounce {
  0%,100% { transform: translateY(0)   rotate(-2deg); }
  50%      { transform: translateY(-6px) rotate(0deg); }
}
.hero-badge {
  animation: badgeBounce 3.5s ease-in-out infinite;
}

/* ============================================
   ENHANCED: primary button idle pulse
   ============================================ */
@keyframes btnGlowPulse {
  0%,100% { box-shadow: 4px 4px 0 var(--p1); }
  50%      { box-shadow: 4px 4px 0 var(--p1), 0 0 14px rgba(0,255,136,0.25); }
}
.btn-primary {
  animation: btnGlowPulse 3s ease-in-out infinite;
}
.btn-primary:hover {
  animation: none;
}

/* ============================================
   ENHANCED: scroll progress bar glow sweep
   ============================================ */
@keyframes progressGlow {
  0%,100% { box-shadow: 0 0 8px rgba(0,255,136,0.6); }
  50%      { box-shadow: 0 0 18px rgba(0,255,136,0.9), 0 0 4px rgba(255,45,120,0.3); }
}
#scroll-progress {
  animation: progressGlow 2s ease-in-out infinite;
}

/* ============================================
   ENHANCED: project card neon sweep on hover
   ============================================ */
.project-card::after {
  content: '';
  position: absolute;
  top: -2px; left: -120%;
  width: 50%; height: calc(100% + 4px);
  background: linear-gradient(90deg, transparent, rgba(0,255,136,0.04), transparent);
  transition: left 0.5s ease;
  pointer-events: none;
}
.project-card:hover::after { left: 160%; }

/* ============================================
   ENHANCED: service icon spin on hover
   ============================================ */
@keyframes icoSpin {
  0%   { transform: rotate(0deg); }
  25%  { transform: rotate(90deg); }
  50%  { transform: rotate(180deg); }
  75%  { transform: rotate(270deg); }
  100% { transform: rotate(360deg); }
}
.service-card:hover .service-ico {
  animation: icoSpin 0.6s steps(4) forwards;
  filter: drop-shadow(0 0 6px var(--p1));
}

/* ============================================
   ENHANCED: article card left stripe grow
   ============================================ */
@keyframes stripeGrow {
  0%   { height: 0%; top: 50%; }
  100% { height: 100%; top: 0%; }
}
.article-card:hover::before {
  animation: stripeGrow 0.2s steps(4) forwards;
}

/* ============================================
   ENHANCED: section divider gradient animation
   ============================================ */
@keyframes dividerShift {
  0%   { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

/* ============================================
   COOKIE BANNER
   ============================================ */
.cookie-banner {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 8500;
  background: rgba(11,11,26,0.97);
  border-top: 2px solid var(--p1);
  box-shadow: 0 -4px 30px rgba(0,255,136,0.1), 0 -1px 0 rgba(0,255,136,0.05);
  transform: translateY(100%);
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
  padding: 1.2rem 5%;
  backdrop-filter: blur(12px);
}
.cookie-banner.visible {
  transform: translateY(0);
}
.cookie-inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  max-width: 1200px;
  margin: 0 auto;
}
.cookie-pixel-icon {
  flex-shrink: 0;
  filter: drop-shadow(0 0 6px rgba(255,215,0,0.4));
  animation: badgeBounce 4s ease-in-out infinite;
}
.cookie-text {
  flex: 1;
  min-width: 200px;
}
.cookie-hd {
  font-family: var(--font-px);
  font-size: 0.5rem;
  color: var(--p1);
  margin-bottom: 0.35rem;
  letter-spacing: 1px;
}
.cookie-desc {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.6;
  margin: 0;
}
.cookie-btns {
  display: flex;
  gap: 0.75rem;
  flex-shrink: 0;
}
.cookie-btns .btn {
  font-size: 0.45rem;
  padding: 9px 18px;
  animation: none;
}
@media (max-width: 600px) {
  .cookie-inner { flex-direction: column; align-items: flex-start; gap: 1rem; }
  .cookie-btns  { width: 100%; }
}

/* ============================================
   LANG TOGGLE: hide on mobile
   ============================================ */
@media (max-width: 720px) {
  .nav-lang-btn { display: none; }
}

/* ============================================
   HERO CONTACT BTN — secondary style override
   ============================================ */
@keyframes btnSecPulse {
  0%,100% { box-shadow: 4px 4px 0 var(--p2); }
  50%      { box-shadow: 4px 4px 0 var(--p2), 0 0 14px rgba(255,45,120,0.2); }
}
.hero-btns .btn-secondary {
  animation: btnSecPulse 3s ease-in-out infinite 1.5s;
}
.hero-btns .btn-secondary:hover { animation: none; }
