/* ==========================================================================
   humerez.dev — Mobile Suit HUD theme
   Shared stylesheet for / (EN) and /es/ (ES)
   ========================================================================== */

:root {
  --bg-primary: #0a0c10;
  --bg-secondary: #0f1218;
  --bg-card: #131720;
  --accent-red: #e63946;
  --accent-blue: #00b4d8;
  --accent-gold: #f4a620;
  --text-primary: #e8eaed;
  --text-secondary: #9badc4;
  --text-muted: #6b7a90;
  --panel-line: rgba(255,255,255,0.06);
  --glow-red: 0 0 30px rgba(230,57,70,0.3);
  --glow-blue: 0 0 30px rgba(0,180,216,0.3);
  --glow-gold: 0 0 24px rgba(244,166,32,0.35);
  --font-display: 'Orbitron', sans-serif;
  --font-body: 'Rajdhani', sans-serif;
  --font-mono: 'Share Tech Mono', monospace;
}

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

html { scroll-behavior: auto; }

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  overflow-x: hidden;
  line-height: 1.6;
}

::selection { background: rgba(230,57,70,0.4); color: #fff; }

/* === UTILITY === */
.container { max-width: 1200px; margin: 0 auto; padding: 0 2rem; }
.accent-red { color: var(--accent-red); }
.accent-blue { color: var(--accent-blue); }
.accent-gold { color: var(--accent-gold); }

/* === SCANLINE OVERLAY === */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0,0,0,0.03) 2px,
    rgba(0,0,0,0.03) 4px
  );
}

/* === SCROLL PROGRESS BAR === */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 100%;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--accent-red), var(--accent-gold));
  box-shadow: 0 0 12px rgba(230,57,70,0.6);
  z-index: 1002;
  pointer-events: none;
}

/* === NAV === */
nav.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(10,12,16,0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--panel-line);
  padding: 0.8rem 0;
}
nav.site-nav .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.nav-logo {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.1rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--accent-red);
  text-decoration: none;
}
.nav-logo::after {
  content: '.dev';
  color: var(--text-muted);
  font-weight: 400;
}
.nav-links { display: flex; gap: 1.6rem; list-style: none; }
.nav-links a {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-secondary);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 2px;
  transition: color 0.3s;
  position: relative;
}
.nav-links a:hover { color: var(--accent-red); }
.nav-links a::before {
  content: '//';
  color: var(--text-muted);
  margin-right: 4px;
  font-size: 0.7rem;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-red);
  transition: width 0.3s;
}
.nav-links a.active { color: var(--accent-red); }
.nav-links a.active::after { width: 100%; }

.nav-status {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--accent-blue);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
}
.nav-status .dot {
  width: 8px; height: 8px;
  background: var(--accent-blue);
  border-radius: 50%;
  position: relative;
}
.nav-status .dot::after {
  content: '';
  position: absolute;
  inset: -4px;
  border: 1px solid var(--accent-blue);
  border-radius: 50%;
  animation: radar-ping 2.2s ease-out infinite;
}
@keyframes radar-ping {
  0%   { transform: scale(0.4); opacity: 0.9; }
  80%  { transform: scale(1.6); opacity: 0; }
  100% { transform: scale(1.6); opacity: 0; }
}

/* === LANGUAGE SWITCH (real links) === */
.lang-switch {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 2px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  white-space: nowrap;
}
.lang-switch a, .lang-switch span.current {
  color: var(--text-muted);
  text-decoration: none;
  padding: 0.3rem 0.15rem;
  transition: color 0.2s;
}
.lang-switch a:hover { color: var(--text-secondary); }
.lang-switch .current {
  color: var(--accent-red);
  text-shadow: 0 0 8px rgba(230,57,70,0.5);
}
.lang-switch .sep { margin: 0 0.25rem; color: var(--text-muted); }

/* === MOBILE NAV === */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  margin: 5px 0;
  transition: 0.3s;
}

/* === HERO === */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding-top: 5rem;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(230,57,70,0.07) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 30%, rgba(0,180,216,0.05) 0%, transparent 50%);
}
.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--panel-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--panel-line) 1px, transparent 1px);
  background-size: 60px 60px;
  opacity: 0.4;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
}
.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 2rem;
  align-items: center;
  width: 100%;
}
.hero-content { max-width: 680px; }
.hero-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--accent-blue);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.hero-label::before {
  content: '';
  width: 40px;
  height: 1px;
  background: var(--accent-blue);
  flex-shrink: 0;
}
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 4.3rem);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -1px;
  margin-bottom: 0.5rem;
}
.hero-title .line-2 {
  color: var(--accent-red);
  display: block;
  position: relative;
  padding-left: 1rem;
}
.hero-title .line-2::before {
  content: '';
  position: absolute;
  left: 0;
  top: 15%;
  bottom: 15%;
  width: 3px;
  background: var(--accent-red);
  box-shadow: var(--glow-red);
}
.hero-role {
  font-family: var(--font-mono);
  font-size: clamp(0.85rem, 1.6vw, 1.05rem);
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--accent-gold);
  margin: 1rem 0 0;
  min-height: 1.5em;
}
.hero-role .cursor {
  display: inline-block;
  width: 0.55em;
  height: 1.1em;
  background: var(--accent-gold);
  vertical-align: text-bottom;
  margin-left: 2px;
  animation: blink 0.9s step-start infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.hero-subtitle {
  font-size: 1.22rem;
  font-weight: 300;
  color: var(--text-secondary);
  margin: 1.4rem 0 2.4rem;
  max-width: 560px;
}
.hero-subtitle strong { color: var(--text-primary); font-weight: 600; }

.hero-ctas {
  display: flex;
  gap: 1.2rem;
  flex-wrap: wrap;
}
.btn {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 1rem 2rem;
  border: none;
  cursor: pointer;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s, color 0.3s;
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
  will-change: transform;
}
.btn::after {  /* light sweep */
  content: '';
  position: absolute;
  top: 0; left: -80%;
  width: 50%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,0.25), transparent);
  transform: skewX(-20deg);
  transition: left 0.5s ease;
}
.btn:hover::after { left: 130%; }
.btn--primary { background: var(--accent-red); color: #fff; }
.btn--primary:hover { box-shadow: var(--glow-red); transform: translateY(-2px); }
.btn--secondary {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--text-muted);
}
.btn--secondary:hover {
  border-color: var(--accent-blue);
  color: var(--accent-blue);
  box-shadow: var(--glow-blue);
  transform: translateY(-2px);
}

.hero-stats {
  display: flex;
  gap: 1.4rem 2.2rem;
  margin-top: 3.6rem;
  padding-top: 2rem;
  border-top: 1px solid var(--panel-line);
  flex-wrap: wrap;
}
.hero-stat { text-align: left; }
.hero-stat-value {
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 900;
  color: var(--accent-gold);
  white-space: nowrap;
}
.hero-stat-label {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

/* === HERO STARFIELD (canvas) === */
.hero-stars {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

/* === HERO 3D PERSPECTIVE FLOOR === */
.hero-floor {
  position: absolute;
  left: -25%;
  right: -25%;
  bottom: -14%;
  height: 44%;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(0,180,216,0.16) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,180,216,0.16) 1px, transparent 1px);
  background-size: 52px 52px;
  transform: perspective(620px) rotateX(72deg);
  transform-origin: 50% 0;
  animation: floor-scroll 14s linear infinite;
  mask-image: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.75) 35%, transparent 96%);
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.75) 35%, transparent 96%);
}
@keyframes floor-scroll {
  to { background-position: 0 52px, 0 0; }
}

/* === HERO MECHA (3D rig) === */
.hero-mecha {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 420px;
  perspective: 900px;
}
.mecha-rig {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  transform-style: preserve-3d;
  will-change: transform;
}
.hero-mecha svg {
  width: min(380px, 80%);
  height: auto;
  overflow: visible;
  animation: mecha-float 7s ease-in-out infinite;
  filter: drop-shadow(0 20px 50px rgba(0,0,0,0.55));
}
@keyframes mecha-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}
.mecha-ring {
  position: absolute;
  border: 1px solid rgba(0,180,216,0.18);
  border-radius: 50%;
  pointer-events: none;
}
.mecha-ring--1 { width: 420px; height: 420px; animation: ring-spin 26s linear infinite; border-style: dashed; }
.mecha-ring--2 { width: 510px; height: 510px; border-color: rgba(230,57,70,0.12); animation: ring-spin 40s linear infinite reverse; }
@keyframes ring-spin { to { transform: rotate(360deg); } }
/* radar sweep arc */
.mecha-sweep {
  position: absolute;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  pointer-events: none;
  background: conic-gradient(from 0deg, rgba(0,180,216,0.22), rgba(0,180,216,0.05) 55deg, transparent 70deg);
  mask-image: radial-gradient(circle, transparent 54%, black 56%, black 99%, transparent 100%);
  -webkit-mask-image: radial-gradient(circle, transparent 54%, black 56%, black 99%, transparent 100%);
  animation: ring-spin 5s linear infinite;
}

/* thruster flames */
.mecha-thruster {
  transform-box: fill-box;
  transform-origin: 50% 0%;
  animation: thrust-flicker 0.16s ease-in-out infinite alternate;
}
.mecha-thruster--l { animation-duration: 0.21s; }
.mecha-thruster--r { animation-duration: 0.24s; }
@keyframes thrust-flicker {
  from { transform: scaleY(0.7);  opacity: 0.5; }
  to   { transform: scaleY(1.18); opacity: 0.95; }
}

/* SVG part animations */
.mecha-eye { animation: eye-pulse 2.6s ease-in-out infinite; }
@keyframes eye-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}
.mecha-scan {
  animation: visor-scan 4.5s ease-in-out infinite;
  opacity: 0;
}
@keyframes visor-scan {
  0%, 55%, 100% { opacity: 0; transform: translateY(0); }
  60% { opacity: 0.9; transform: translateY(0); }
  80% { opacity: 0.7; transform: translateY(26px); }
  90% { opacity: 0; transform: translateY(30px); }
}
.mecha-vfin { animation: vfin-glint 6s ease-in-out infinite; }
@keyframes vfin-glint {
  0%, 88%, 100% { filter: none; }
  92% { filter: drop-shadow(0 0 10px rgba(244,166,32,0.9)); }
}
.mecha-lines path, .mecha-lines polyline {
  stroke-dasharray: 600;
  stroke-dashoffset: 0;
}
.mecha-draw .mecha-lines path,
.mecha-draw .mecha-lines polyline {
  animation: line-draw 2.2s ease forwards;
  stroke-dashoffset: 600;
}
@keyframes line-draw { to { stroke-dashoffset: 0; } }

/* Angular floating shapes (kept from v1) */
.hero-shape {
  position: absolute;
  border: 1px solid;
  opacity: 0.15;
  will-change: transform;
}
.hero-shape--1 {
  top: 12%; right: 6%;
  width: 180px; height: 180px;
  border-color: var(--accent-red);
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  animation: float-slow 12s ease-in-out infinite;
}
.hero-shape--2 {
  bottom: 16%; left: 42%;
  width: 110px; height: 110px;
  border-color: var(--accent-blue);
  clip-path: polygon(30% 0%, 70% 0%, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0% 70%, 0% 30%);
  animation: float-slow 9s ease-in-out infinite reverse;
}
@keyframes float-slow {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(5deg); }
}

/* === SECTION COMMON === */
section { padding: 6rem 0; position: relative; }
.section-header { margin-bottom: 3.6rem; }
.section-tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--accent-red);
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.8rem;
}
.section-tag::before {
  content: '';
  width: 30px;
  height: 2px;
  background: var(--accent-red);
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  letter-spacing: 1px;
}

/* === ABOUT === */
.about-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 4rem;
  align-items: start;
}
.about-text p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  margin-bottom: 1.2rem;
  font-weight: 400;
}
.about-text strong { color: var(--text-primary); font-weight: 600; }
.about-text a { color: var(--accent-blue); text-decoration: none; }
.about-text a:hover { text-decoration: underline; }

.about-details {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--panel-line);
  padding: 2rem;
  clip-path: polygon(0 0, calc(100% - 20px) 0, 100% 20px, 100% 100%, 20px 100%, 0 calc(100% - 20px));
}
.about-detail-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--panel-line);
  font-size: 0.9rem;
}
.about-detail-row:last-child { border-bottom: none; }
.about-detail-key {
  font-family: var(--font-mono);
  color: var(--text-muted);
  font-size: 0.72rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  white-space: nowrap;
}
.about-detail-val { color: var(--text-primary); font-weight: 500; text-align: right; }

/* === SERVICES === */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.6rem;
}
.service-card {
  background: var(--bg-card);
  border: 1px solid var(--panel-line);
  border-top: 2px solid var(--accent-red);
  padding: 2rem 1.7rem;
  position: relative;
  overflow: hidden;
  transition: transform 0.35s, box-shadow 0.35s, border-color 0.35s;
  clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 16px 100%, 0 calc(100% - 16px));
}
.service-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent-red);
  box-shadow: 0 18px 40px rgba(0,0,0,0.35), 0 0 24px rgba(230,57,70,0.08);
}
.service-card::before {  /* corner blip */
  content: '';
  position: absolute;
  top: 8px; right: 14px;
  width: 6px; height: 6px;
  background: var(--accent-red);
  opacity: 0.5;
}
.service-icon {
  width: 46px; height: 46px;
  margin-bottom: 1.2rem;
  color: var(--accent-blue);
}
.service-icon svg { width: 100%; height: 100%; }
.service-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 1px;
  margin-bottom: 0.8rem;
  text-transform: uppercase;
}
.service-desc {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 1.2rem;
}
.service-meta {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 1px;
  color: var(--accent-gold);
  text-transform: uppercase;
  border-top: 1px solid var(--panel-line);
  padding-top: 0.9rem;
}

/* === TECH STACK === */
.stack-group { margin-bottom: 2.2rem; }
.stack-group:last-child { margin-bottom: 0; }
.stack-group-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--accent-blue);
  margin-bottom: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
}
.stack-group-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--panel-line);
}
.tech-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.9rem;
}
.tech-item {
  background: var(--bg-card);
  border: 1px solid var(--panel-line);
  padding: 1.05rem 0.9rem;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 1px;
  color: var(--text-secondary);
  transition: border-color 0.3s, color 0.3s, transform 0.3s, box-shadow 0.3s;
  position: relative;
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
  will-change: transform;
}
.tech-item:hover {
  border-color: var(--accent-red);
  color: var(--text-primary);
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(230,57,70,0.1);
}
.tech-item::before {
  content: '';
  position: absolute;
  top: 4px; left: 4px;
  width: 4px; height: 4px;
  background: var(--accent-red);
  opacity: 0;
  transition: opacity 0.3s;
}
.tech-item:hover::before { opacity: 1; }
.tech-item[data-level] { position: relative; }
.tech-item[data-level]::after {
  content: attr(data-level);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: var(--bg-card);
  border: 1px solid var(--accent-blue);
  color: var(--accent-blue);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  padding: 3px 8px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  z-index: 100;
  clip-path: polygon(4px 0%, 100% 0%, calc(100% - 4px) 100%, 0% 100%);
}
.tech-item[data-level]:hover::after,
.tech-item[data-level]:focus-within::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* === TECH MARQUEE === */
.marquee {
  overflow: hidden;
  border-top: 1px solid var(--panel-line);
  border-bottom: 1px solid var(--panel-line);
  padding: 0.9rem 0;
  margin-top: 3rem;
  position: relative;
  mask-image: linear-gradient(90deg, transparent, black 8%, black 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, black 8%, black 92%, transparent);
}
.marquee-track {
  display: flex;
  gap: 2.6rem;
  width: max-content;
  animation: marquee-scroll 30s linear infinite;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-muted);
  white-space: nowrap;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track .sep { color: var(--accent-red); }
@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* === PROJECTS === */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 2rem;
}
.project-card {
  background: var(--bg-card);
  border: 1px solid var(--panel-line);
  padding: 2rem;
  position: relative;
  transition: border-color 0.4s, box-shadow 0.4s;
  clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 16px 100%, 0 calc(100% - 16px));
  will-change: transform;
  transform-style: preserve-3d;
}
.project-card:hover {
  border-color: var(--accent-blue);
  box-shadow: 0 15px 40px rgba(0,0,0,0.3), 0 0 20px rgba(0,180,216,0.08);
}
.project-card--flagship { border-color: rgba(244,166,32,0.35); }
.project-card--flagship:hover { border-color: var(--accent-gold); box-shadow: 0 15px 40px rgba(0,0,0,0.3), 0 0 24px rgba(244,166,32,0.12); }
.project-card[data-url]:not([data-url="#"]) { cursor: pointer; }

.project-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
  gap: 0.6rem;
}
.project-number {
  font-family: var(--font-display);
  font-size: 0.65rem;
  color: var(--text-muted);
  letter-spacing: 2px;
}
.project-badges { display: flex; gap: 0.45rem; flex-wrap: wrap; justify-content: flex-end; }
.project-status {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 0.2rem 0.6rem;
  border: 1px solid;
}
.project-status--live { color: #2ecc71; border-color: #2ecc71; }
.project-status--live::before {
  content: '●';
  margin-right: 0.4rem;
  animation: live-blink 1.6s ease-in-out infinite;
}
@keyframes live-blink { 50% { opacity: 0.3; } }
.project-status--dev { color: var(--accent-gold); border-color: var(--accent-gold); }
.project-status--flagship { color: var(--accent-gold); border-color: var(--accent-gold); background: rgba(244,166,32,0.08); }

.project-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  letter-spacing: 0.5px;
}
.project-desc {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 1.3rem;
  line-height: 1.6;
}
.project-outcome {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent-blue);
  letter-spacing: 0.5px;
  margin-bottom: 1.3rem;
  padding-left: 0.9rem;
  border-left: 2px solid var(--accent-blue);
}
.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.4rem;
}
.project-tag {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--accent-red);
  letter-spacing: 1px;
  padding: 0.25rem 0.6rem;
  border: 1px solid rgba(230,57,70,0.25);
  background: rgba(230,57,70,0.05);
}
.project-link {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent-blue);
  text-decoration: none;
  letter-spacing: 1px;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: color 0.3s, gap 0.3s;
}
.project-link:hover { color: #fff; gap: 0.8rem; }
.project-link::after { content: '→'; }

.projects-more {
  margin-top: 2.4rem;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 1px;
  color: var(--text-muted);
}
.projects-more a { color: var(--accent-blue); text-decoration: none; }
.projects-more a:hover { text-decoration: underline; }

/* === SECTION INTRO (SEO-rich lead paragraph) === */
.section-intro {
  color: var(--text-secondary);
  font-size: 1.05rem;
  max-width: 760px;
  margin-top: 1rem;
  font-weight: 400;
}
.section-intro strong { color: var(--text-primary); font-weight: 600; }

/* === FAQ === */
.faq-list {
  max-width: 780px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}
.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--panel-line);
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px));
  transition: border-color 0.3s;
}
.faq-item[open] { border-color: var(--accent-blue); }
.faq-item summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 1.4rem;
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  transition: color 0.3s;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+';
  font-family: var(--font-mono);
  color: var(--accent-red);
  font-size: 1.2rem;
  flex-shrink: 0;
  transition: transform 0.3s;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item summary:hover { color: var(--accent-blue); }
.faq-answer {
  padding: 0 1.4rem 1.2rem;
  color: var(--text-secondary);
  font-size: 0.98rem;
}
.faq-answer a { color: var(--accent-blue); text-decoration: none; }
.faq-answer a:hover { text-decoration: underline; }

/* === INTERESTS === */
.interests-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}
.interest-card {
  background: var(--bg-card);
  border: 1px solid var(--panel-line);
  padding: 2rem 1.5rem;
  text-align: center;
  transition: border-color 0.3s, transform 0.3s;
  position: relative;
  overflow: hidden;
}
.interest-card:hover { border-color: var(--accent-gold); transform: translateY(-3px); }
.interest-card:hover .interest-icon { transform: scale(1.15) rotate(-4deg); }
.interest-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  display: block;
  transition: transform 0.3s;
}
.interest-label {
  font-family: var(--font-display);
  font-size: 0.7rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-secondary);
}
.interest-sub {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
  margin-top: 0.4rem;
}

/* === CONTACT === */
.contact-section { text-align: center; padding: 8rem 0; position: relative; }
.contact-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(230,57,70,0.05) 0%, transparent 60%);
}
.contact-headline {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3.5vw, 2.5rem);
  font-weight: 900;
  margin-bottom: 1rem;
  position: relative;
}
.contact-sub {
  color: var(--text-secondary);
  font-size: 1.1rem;
  font-weight: 300;
  margin: 0 auto 3rem;
  max-width: 540px;
  position: relative;
}
.contact-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  position: relative;
}
.contact-link {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 1rem 2rem;
  border: 1px solid var(--panel-line);
  transition: border-color 0.3s, color 0.3s, box-shadow 0.3s;
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
  will-change: transform;
}
.contact-link:hover {
  border-color: var(--accent-red);
  color: var(--accent-red);
  box-shadow: var(--glow-red);
}

/* Contact form (mailto compose) */
.contact-form {
  max-width: 560px;
  margin: 3rem auto 0;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  position: relative;
  text-align: left;
}
.form-group { display: flex; flex-direction: column; gap: 0.4rem; }
.form-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent-blue);
  letter-spacing: 0.15em;
}
.form-input {
  background: var(--bg-card);
  border: 1px solid var(--panel-line);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.75rem 1rem;
  outline: none;
  transition: border-color 0.3s, box-shadow 0.3s;
  clip-path: polygon(8px 0%, 100% 0%, calc(100% - 8px) 100%, 0% 100%);
  width: 100%;
  resize: none;
}
.form-input::placeholder { color: var(--text-muted); }
.form-input:focus {
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 1px var(--accent-blue), var(--glow-blue);
}
.form-input:focus-visible { outline: none; }
.form-textarea { min-height: 120px; }
.form-submit { align-self: flex-start; margin-top: 0.5rem; min-height: 44px; }
.form-hint {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}
.form-hint a { color: var(--accent-blue); text-decoration: none; }

/* === FOOTER === */
footer {
  border-top: 1px solid var(--panel-line);
  padding: 2rem 0;
  text-align: center;
}
.footer-text {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 2px;
}
.footer-text a { color: var(--text-muted); text-decoration: none; }
.footer-text a:hover { color: var(--accent-blue); }

/* === BACK TO TOP === */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 48px;
  height: 48px;
  background: var(--bg-card);
  border: 1px solid var(--accent-red);
  color: var(--accent-red);
  font-size: 1rem;
  cursor: pointer;
  clip-path: polygon(12px 0%, 100% 0%, calc(100% - 12px) 100%, 0% 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.3s, transform 0.3s, background 0.3s;
  z-index: 500;
  will-change: transform, opacity;
}
.back-to-top.visible { opacity: 1; transform: translateY(0); }
.back-to-top:hover { background: var(--accent-red); color: var(--bg-primary); box-shadow: var(--glow-red); }

/* === SCROLL REVEAL SYSTEM === */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal--left  { transform: translateX(-40px); }
.reveal--right { transform: translateX(40px); }
.reveal--clip {
  transform: none;
  clip-path: inset(0 100% 0 0);
  transition: opacity 0.7s ease, clip-path 0.9s cubic-bezier(0.6, 0, 0.2, 1);
}
.reveal.visible {
  opacity: 1;
  transform: none;
  clip-path: inset(0 0 0 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.35s; }
/* stagger children */
.stagger > * {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.stagger.visible > * { opacity: 1; transform: none; }
.stagger.visible > *:nth-child(1)  { transition-delay: 0.05s; }
.stagger.visible > *:nth-child(2)  { transition-delay: 0.1s; }
.stagger.visible > *:nth-child(3)  { transition-delay: 0.15s; }
.stagger.visible > *:nth-child(4)  { transition-delay: 0.2s; }
.stagger.visible > *:nth-child(5)  { transition-delay: 0.25s; }
.stagger.visible > *:nth-child(6)  { transition-delay: 0.3s; }
.stagger.visible > *:nth-child(7)  { transition-delay: 0.35s; }
.stagger.visible > *:nth-child(8)  { transition-delay: 0.4s; }
.stagger.visible > *:nth-child(9)  { transition-delay: 0.45s; }
.stagger.visible > *:nth-child(10) { transition-delay: 0.5s; }
.stagger.visible > *:nth-child(n+11) { transition-delay: 0.55s; }

/* === GLITCH (hero title, once on load) === */
@keyframes glitch-once {
  0%   { clip-path: none; opacity: 1; transform: translateX(0); }
  8%   { clip-path: inset(10% 0 60% 0); opacity: 0.8; transform: translateX(-4px); }
  10%  { clip-path: inset(0 0 100% 0); opacity: 1; transform: translateX(0); }
  18%  { clip-path: inset(50% 0 20% 0); opacity: 0.9; transform: translateX(3px); }
  20%  { clip-path: inset(0 0 100% 0); opacity: 1; transform: translateX(0); }
  28%  { clip-path: inset(20% 0 50% 0); opacity: 0.7; transform: translateX(-2px); }
  30%  { clip-path: none; opacity: 1; transform: translateX(0); }
  100% { clip-path: none; opacity: 1; transform: translateX(0); }
}
.hero-title.glitch-active { animation: glitch-once 0.8s step-start forwards; }

/* === ACCESSIBILITY === */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  background: var(--accent-blue);
  color: var(--bg-primary);
  padding: 0.5rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  z-index: 10000;
  text-decoration: none;
  clip-path: polygon(8px 0%, 100% 0%, calc(100% - 8px) 100%, 0% 100%);
  transition: top 0.2s;
}
.skip-link:focus { top: 1rem; }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent-blue);
  outline-offset: 3px;
  border-radius: 2px;
}
.btn:focus-visible { outline: 2px solid var(--accent-blue); outline-offset: 4px; }

/* === REDUCED MOTION === */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal, .stagger > * { opacity: 1 !important; transform: none !important; clip-path: none !important; }
  .marquee-track { animation: none !important; }
  .hero-mecha svg { animation: none !important; }
}

/* === RESPONSIVE === */
@media (max-width: 1024px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-mecha { order: -1; min-height: 0; margin-bottom: 1rem; }
  .mecha-rig { min-height: 0; }
  .hero-mecha svg { width: min(240px, 60%); }
  .mecha-ring, .mecha-sweep { display: none; }
  .hero-floor { height: 30%; bottom: -8%; }
  .services-grid { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; gap: 2rem; }
  .interests-grid { grid-template-columns: repeat(2, 1fr); }
  .projects-grid { grid-template-columns: 1fr; }
  .hero-stats { gap: 1.6rem; }
  .nav-status { display: none; }
}
@media (max-width: 700px) {
  .nav-links { display: none; }
  .nav-toggle { display: block; min-width: 44px; min-height: 44px; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: rgba(10,12,16,0.97);
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--panel-line);
  }
  .nav-links a { min-height: 44px; display: flex; align-items: center; }
  .hero-stats { flex-direction: column; gap: 1.5rem; }
  .hero-shape { display: none; }
  .interests-grid { grid-template-columns: 1fr 1fr; }
  .contact-links { flex-direction: column; align-items: center; }
  .contact-link { min-height: 44px; display: flex; align-items: center; justify-content: center; }
  .project-link { min-height: 44px; display: inline-flex; align-items: center; }
}
@media (max-width: 360px) {
  .hero-title { font-size: clamp(1.6rem, 9vw, 2.5rem); }
  .hero-ctas { flex-direction: column; gap: 0.75rem; }
  .btn { width: 100%; text-align: center; }
  .back-to-top { bottom: 1rem; right: 1rem; }
}
