/* ═══════════════════════════════════════════════
   PORTFOLIO — styles.css
   Bakhitzhan Nurtas
   ═══════════════════════════════════════════════ */

/* ─── CSS Variables ──────────────────────────── */
:root {
  --bg: #0a0a0f;
  --bg2: #0f0f1a;
  --bg3: #13131f;
  --surface: #16161f;
  --surface2: #1c1c2e;
  --border: rgba(255,255,255,0.07);
  --accent: #7c3aed;
  --accent2: #a855f7;
  --accent3: #c084fc;
  --glow: rgba(124,58,237,0.4);
  --text: #f0f0f5;
  --text2: #a0a0b0;
  --text3: #606070;
  --beta: #f59e0b;
  --python: #3b82f6;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 8px 32px rgba(0,0,0,0.4);
  --font-main: 'Plus Jakarta Sans', sans-serif;
  --font-display: 'Clash Display', sans-serif;
  --font-mono: 'Fira Code', monospace;
  --nav-h: 70px;
  --transition: 0.3s cubic-bezier(.4,0,.2,1);
}

/* ─── Reset & Base ───────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-main);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
body.intro-active { overflow: hidden; }
body::before,
body::after {
  content: "";
  position: fixed;
  inset: -20%;
  pointer-events: none;
  z-index: -1;
}
body::before {
  background:
    radial-gradient(circle at 10% 15%, rgba(168,85,247,0.12), transparent 40%),
    radial-gradient(circle at 85% 75%, rgba(59,130,246,0.1), transparent 42%);
  filter: blur(36px);
  animation: pageAmbient 24s ease-in-out infinite alternate;
}
body::after {
  background: repeating-linear-gradient(
    90deg,
    transparent 0px,
    transparent 119px,
    rgba(168,85,247,0.04) 120px,
    transparent 121px
  );
  opacity: 0.25;
  animation: pageScan 20s linear infinite;
}

@keyframes pageAmbient {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(2%, -1%, 0) scale(1.05); }
  100% { transform: translate3d(-1%, 2%, 0) scale(1.02); }
}

@keyframes pageScan {
  0% { transform: translateX(0); }
  100% { transform: translateX(120px); }
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: var(--scroll-progress, 0%);
  z-index: 3000;
  background: linear-gradient(90deg, #7c3aed, #a855f7, #60a5fa);
  box-shadow: 0 0 14px rgba(168,85,247,0.75);
  transition: width 0.08s linear;
}

a { text-decoration: none; color: inherit; }

/* ─── Custom Cursor ──────────────────────────── */
.cursor-dot {
  width: 6px; height: 6px;
  background: var(--accent2);
  border-radius: 50%;
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: transform 0.1s;
}
.cursor-ring {
  width: 30px; height: 30px;
  border: 1.5px solid rgba(168,85,247,0.5);
  border-radius: 50%;
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: transform 0.15s ease, width 0.2s, height 0.2s, border-color 0.2s;
}
.cursor-ring.hovered {
  width: 50px; height: 50px;
  border-color: var(--accent2);
}
@media (max-width: 768px) {
  .cursor-dot, .cursor-ring { display: none; }
}

/* ─── Navigation ─────────────────────────────── */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 5%;
  background: rgba(10,10,15,0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  transition: background var(--transition);
}
.nav-logo {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent2), var(--accent3));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 2px;
}
.nav-links {
  display: flex; align-items: center; gap: 2rem;
}
.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text2);
  transition: color var(--transition);
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute; bottom: -4px; left: 0; right: 0;
  height: 2px;
  background: var(--accent2);
  transform: scaleX(0);
  transition: transform var(--transition);
  border-radius: 2px;
}
.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after { transform: scaleX(1); }

.lang-toggle {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text2);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 6px 14px;
  border-radius: 20px;
  cursor: pointer;
  transition: all var(--transition);
}
.lang-toggle:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

/* ─── Hamburger ──────────────────────────────── */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 1001;
}
.hamburger span {
  display: block;
  width: 24px; height: 2px;
  background: var(--text2);
  border-radius: 2px;
  transition: all var(--transition);
}
.hamburger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ─── Mobile Menu ────────────────────────────── */
.mobile-menu {
  position: fixed; top: 0; right: -100%;
  width: min(300px, 80vw);
  height: 100vh;
  background: var(--bg2);
  border-left: 1px solid var(--border);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 2rem;
  z-index: 999;
  transition: right var(--transition);
  padding: 2rem;
}
.mobile-menu.open { right: 0; }
.mobile-menu a {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text2);
  transition: color var(--transition);
}
.mobile-menu a:hover { color: var(--accent2); }

/* ─── Sections ───────────────────────────────── */
section {
  padding: 100px 5% 80px;
  max-width: 1200px;
  margin: 0 auto;
}
section:first-of-type { padding-top: calc(var(--nav-h) + 60px); }

.section-header { text-align: center; margin-bottom: 64px; }
.section-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent2);
  background: rgba(124,58,237,0.1);
  border: 1px solid rgba(124,58,237,0.3);
  padding: 6px 16px;
  border-radius: 20px;
  margin-bottom: 16px;
  letter-spacing: 1px;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  color: var(--text);
  margin-bottom: 20px;
  line-height: 1.2;
}
.section-line {
  width: 60px; height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  border-radius: 2px;
  margin: 0 auto;
  transform-origin: left center;
  animation: lineIdle 2.4s ease-in-out infinite;
}

@keyframes lineIdle {
  0%, 100% { transform: scaleX(0.85); opacity: 0.7; }
  50% { transform: scaleX(1.15); opacity: 1; }
}

/* ─── Hero ───────────────────────────────────── */
.hero {
  min-height: 100vh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
  position: relative;
  padding-top: var(--nav-h);
  overflow: hidden;
  max-width: 100%;
}

.hero-bg {
  position: absolute; inset: 0;
  pointer-events: none;
  perspective: 900px;
}

.grid-plane {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(168,85,247,0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(168,85,247,0.1) 1px, transparent 1px),
    linear-gradient(rgba(168,85,247,0.04) 2px, transparent 2px),
    linear-gradient(90deg, rgba(168,85,247,0.04) 2px, transparent 2px);
  background-size: 60px 60px;
  background-position: 0 0, 0 0, 0 0, 0 0;
  mask-image: radial-gradient(ellipse 90% 90% at 50% 50%, black, transparent);
  opacity: 0.58;
  animation: gridDrift 24s linear infinite, gridSoftPulse 10s ease-in-out infinite;
}

.grid-plane::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(
      45deg,
      transparent 0px,
      transparent 52px,
      rgba(168,85,247,0.06) 56px,
      transparent 60px
    ),
    repeating-linear-gradient(
      -45deg,
      transparent 0px,
      transparent 64px,
      rgba(59,130,246,0.045) 68px,
      transparent 72px
    );
  opacity: 0.28;
  mix-blend-mode: screen;
  animation: gridShimmer 16s linear infinite;
}

@keyframes gridDrift {
  0% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(0, -20px, 0); }
  100% { transform: translate3d(0, 0, 0); }
}

@keyframes gridSoftPulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 0.62; }
}

@keyframes gridShimmer {
  0% { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(80px, -40px, 0); }
}

.hero-bg::before,
.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero-bg::before {
  background:
    radial-gradient(1200px 700px at 12% 20%, rgba(168,85,247,0.2), transparent 62%),
    radial-gradient(900px 600px at 88% 78%, rgba(59,130,246,0.16), transparent 64%),
    linear-gradient(135deg, rgba(168,85,247,0.08) 0%, transparent 45%, rgba(59,130,246,0.06) 100%);
  filter: blur(20px) saturate(115%);
  opacity: 0.65;
  animation: heroMeshMove 20s ease-in-out infinite alternate;
}

.hero-bg::after {
  background:
    conic-gradient(
      from 220deg at 50% 50%,
      transparent 0deg,
      rgba(168,85,247,0.1) 70deg,
      transparent 145deg,
      rgba(59,130,246,0.08) 235deg,
      transparent 360deg
    );
  mix-blend-mode: screen;
  filter: blur(26px);
  opacity: 0.32;
  transform: scale(1.06);
  animation: heroPrismSpin 26s linear infinite;
}

@keyframes heroMeshMove {
  0% {
    transform: translate3d(-2%, 2%, 0) scale(1);
    opacity: 0.55;
  }
  50% {
    transform: translate3d(3%, -2%, 0) scale(1.05);
    opacity: 0.72;
  }
  100% {
    transform: translate3d(1%, 3%, 0) scale(1.02);
    opacity: 0.6;
  }
}

@keyframes heroPrismSpin {
  0% { transform: rotate(0deg) scale(1.05); opacity: 0.2; }
  35% { opacity: 0.32; }
  70% { opacity: 0.25; }
  100% { transform: rotate(360deg) scale(1.05); opacity: 0.2; }
}

/* ─── Hero Content Layout ────────────────────── */
.hero-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 60px;
  flex-wrap: wrap;
  position: relative;
  z-index: 2;
  padding: 40px 5%;
  opacity: 0;
  transform: translateY(42px) scale(0.98);
  filter: blur(6px);
  transition: opacity 0.9s ease, transform 0.9s ease, filter 0.9s ease;
}
.hero-content.wow-in {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0);
}

.hero-photo-container,
.hero-text > * {
  opacity: 0;
  transform: translateY(22px);
}
.hero-content.wow-in .hero-photo-container {
  animation: wowRise 0.75s cubic-bezier(.22,.9,.2,1) 0.1s forwards;
}
.hero-content.wow-in .hero-portfolio-ribbon {
  animation: wowRise 0.75s cubic-bezier(.22,.9,.2,1) 0.14s forwards;
}
.hero-content.wow-in .hero-name {
  animation: wowRise 0.75s cubic-bezier(.22,.9,.2,1) 0.28s forwards;
}
.hero-content.wow-in .hero-subtitle {
  animation: wowRise 0.75s cubic-bezier(.22,.9,.2,1) 0.42s forwards;
}
.hero-content.wow-in .hero-age {
  animation: wowRise 0.75s cubic-bezier(.22,.9,.2,1) 0.54s forwards;
}
.hero-content.wow-in .hero-cta {
  animation: wowRise 0.75s cubic-bezier(.22,.9,.2,1) 0.66s forwards;
}

@keyframes wowRise {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Intro overlay */
.intro-overlay {
  position: fixed;
  inset: 0;
  z-index: 5000;
  background: radial-gradient(circle at 50% 50%, #111125 0%, #070710 60%, #030308 100%);
  display: grid;
  place-items: center;
  overflow: hidden;
  opacity: 1;
  transition: opacity 0.65s ease, visibility 0.65s ease;
}
.intro-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.intro-grid {
  position: absolute;
  inset: -10%;
  background-image:
    linear-gradient(rgba(168,85,247,0.16) 1px, transparent 1px),
    linear-gradient(90deg, rgba(168,85,247,0.16) 1px, transparent 1px);
  background-size: 52px 52px;
  animation: introGridZoom 1.9s cubic-bezier(.25,.9,.2,1) forwards;
}
.intro-core {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.intro-logo {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 8vw, 6rem);
  font-weight: 900;
  letter-spacing: 4px;
  color: #f5eefe;
  text-shadow: 0 0 18px rgba(168,85,247,0.9), 0 0 44px rgba(168,85,247,0.5);
  animation: introLogoPop 1.2s cubic-bezier(.2,.9,.2,1) forwards;
}
.intro-loading {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 2.5px;
  color: rgba(192,132,252,0.9);
  opacity: 0;
  animation: introLoadBlink 1.1s ease-in-out 0.7s forwards;
}
@keyframes introGridZoom {
  0% { transform: scale(1.25) rotate(-1deg); opacity: 0.2; }
  55% { opacity: 0.95; }
  100% { transform: scale(1) rotate(0); opacity: 0.55; }
}
@keyframes introLogoPop {
  0% { transform: scale(0.6); opacity: 0; }
  60% { transform: scale(1.08); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}
@keyframes introLoadBlink {
  0% { opacity: 0; transform: translateY(8px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* ─── Hero Photo ─────────────────────────────── */
.hero-photo-wrapper {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-photo-container {
  position: relative;
  width: 220px; height: 220px;
  flex-shrink: 0;
}

.hero-photo {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 20%;
  border-radius: 50%;
  display: block;
  position: relative;
  z-index: 2;
  border: 3px solid rgba(124,58,237,0.4);
  transform: scale(1.15);
}

.photo-ring {
  position: absolute; inset: -8px;
  border-radius: 50%;
  border: 2px solid transparent;
  background: linear-gradient(var(--bg), var(--bg)) padding-box,
              linear-gradient(135deg, var(--accent), var(--accent2), var(--accent3)) border-box;
  animation: rotateSpin 6s linear infinite;
  z-index: 1;
}

@keyframes rotateSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.photo-glow {
  position: absolute; inset: -20px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--glow) 0%, transparent 70%);
  z-index: 0;
  animation: glowPulse 3s ease-in-out infinite;
}

@keyframes glowPulse {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.05); }
}

/* ─── Hero Text ──────────────────────────────── */
.hero-text {
  text-align: left;
  max-width: 520px;
}

.hero-name {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 900;
  line-height: 1.05;
  margin-bottom: 16px;
}
.hero-name .first {
  background: linear-gradient(135deg, var(--text), var(--accent3));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.hero-name .last {
  background: linear-gradient(135deg, var(--accent2), var(--accent3));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}

.hero-subtitle {
  font-size: 1.6rem;
  color: var(--accent3);
  font-weight: 500;
  margin-bottom: 8px;
  font-family: var(--font-mono);
}

.hero-age {
  font-size: 0.95rem;
  color: var(--text2);
  margin-bottom: 32px;
}

/* Hero — unmistakable portfolio identity */
.hero-portfolio-ribbon {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 14px;
  padding: 10px 20px 10px 18px;
  margin-bottom: 20px;
  border-radius: 100px;
  background: linear-gradient(135deg, rgba(124,58,237,0.22), rgba(59,130,246,0.12));
  border: 1px solid rgba(168,85,247,0.45);
  box-shadow:
    0 0 0 1px rgba(0,0,0,0.2) inset,
    0 8px 32px rgba(124,58,237,0.2),
    0 0 40px rgba(168,85,247,0.12);
  backdrop-filter: blur(12px);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text);
}
.hero-ribbon-glow {
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,0.12), transparent);
  opacity: 0.5;
  animation: ribbonShine 5s ease-in-out infinite;
  pointer-events: none;
}
.hero-ribbon-pulse {
  position: absolute;
  left: 14px;
  top: 50%;
  width: 8px;
  height: 8px;
  margin-top: -4px;
  border-radius: 50%;
  background: var(--accent2);
  box-shadow: 0 0 0 0 rgba(168,85,247,0.55);
  animation: ribbonPulse 2.2s ease-out infinite;
  pointer-events: none;
}
.hero-portfolio-ribbon .hero-ribbon-label {
  margin-left: 18px;
  color: var(--accent3);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
}
.hero-ribbon-sep {
  color: var(--text3);
  font-weight: 400;
  letter-spacing: 0;
}
.hero-ribbon-name {
  color: var(--text);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: none;
  font-size: 0.88rem;
}
@keyframes ribbonPulse {
  0% { box-shadow: 0 0 0 0 rgba(168,85,247,0.5); }
  70% { box-shadow: 0 0 0 10px rgba(168,85,247,0); }
  100% { box-shadow: 0 0 0 0 rgba(168,85,247,0); }
}
@keyframes ribbonShine {
  0%, 100% { opacity: 0.35; transform: translateX(-20%); }
  50% { opacity: 0.7; transform: translateX(20%); }
}

.hero-cta {
  display: flex; gap: 16px; flex-wrap: wrap;
}

.btn-cv {
  background: rgba(22,22,31,0.9);
  border: 2px solid rgba(96,165,250,0.45);
  color: #93c5fd;
  box-shadow: 0 4px 24px rgba(59,130,246,0.15);
}
.btn-cv:hover {
  background: rgba(59,130,246,0.12);
  border-color: #60a5fa;
  color: #bfdbfe;
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(59,130,246,0.25);
}

.nav-cv-link {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent3) !important;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid rgba(168,85,247,0.35);
  background: rgba(124,58,237,0.08);
  transition: background var(--transition), border-color var(--transition), color var(--transition);
}
.nav-cv-link::after { display: none !important; }
.nav-cv-link:hover {
  color: var(--text) !important;
  background: rgba(124,58,237,0.22);
  border-color: var(--accent2);
}

/* Projects — portfolio zone masthead */
.projects-section {
  position: relative;
}
.portfolio-zone-banner {
  max-width: 920px;
  margin: 0 auto 28px;
  padding: 0 5%;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.portfolio-zone-banner.visible {
  opacity: 1;
  transform: translateY(0);
}
.portfolio-zone-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 16px 24px;
  border-radius: var(--radius);
  background: linear-gradient(90deg, transparent, rgba(124,58,237,0.12) 20%, rgba(59,130,246,0.1) 50%, rgba(124,58,237,0.12) 80%, transparent);
  border: 1px solid rgba(168,85,247,0.25);
  border-left: none;
  border-right: none;
  box-shadow: 0 12px 40px rgba(0,0,0,0.25);
}
.portfolio-zone-title {
  font-family: var(--font-mono);
  font-size: clamp(0.75rem, 2.5vw, 0.9rem);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent3);
  text-align: center;
  line-height: 1.5;
}
.portfolio-zone-mark {
  color: var(--accent);
  font-size: 0.65rem;
  opacity: 0.85;
}

/* ─── Buttons ────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 28px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all var(--transition);
  border: 2px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
  transform-style: preserve-3d;
  will-change: transform;
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: white;
  box-shadow: 0 4px 20px rgba(124,58,237,0.4);
}
.btn-primary:hover {
  transform: translateY(-2px) translateZ(6px);
  box-shadow: 0 8px 30px rgba(124,58,237,0.6);
}
.btn::after {
  content: "";
  position: absolute;
  top: 0;
  left: -120%;
  width: 80%;
  height: 100%;
  background: linear-gradient(105deg, transparent, rgba(255,255,255,0.35), transparent);
  transform: skewX(-18deg);
}
.btn:hover::after {
  animation: btnShine 0.8s ease;
}

@keyframes btnShine {
  from { left: -120%; }
  to { left: 140%; }
}
.btn-outline {
  border-color: rgba(124,58,237,0.5);
  color: var(--accent3);
  background: transparent;
}
.btn-outline:hover {
  background: rgba(124,58,237,0.1);
  border-color: var(--accent2);
  transform: translateY(-2px) translateZ(6px);
}

/* ─── Scroll Indicator ───────────────────────── */
.scroll-indicator {
  position: absolute; bottom: 40px; left: 50%;
  transform: translateX(-50%);
  z-index: 2;
}
.scroll-line {
  width: 2px; height: 50px;
  background: linear-gradient(to bottom, var(--accent2), transparent);
  margin: 0 auto;
  animation: scrollPulse 2s ease-in-out infinite;
}
@keyframes scrollPulse {
  0%, 100% { opacity: 1; transform: scaleY(1); }
  50% { opacity: 0.3; transform: scaleY(0.7); }
}

/* ─── About ──────────────────────────────────── */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}
.about-text {
  font-size: 1.05rem;
  color: var(--text2);
  line-height: 1.8;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
}
.about-text strong { color: var(--accent3); }

.about-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  text-align: center;
  transition: all var(--transition);
  transform-style: preserve-3d;
  will-change: transform;
}
.stat-card:hover {
  border-color: rgba(124,58,237,0.4);
  transform: translateY(-4px) rotateX(6deg) rotateY(-6deg);
  box-shadow: 0 8px 24px rgba(124,58,237,0.15);
}
.stat-number {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 900;
  background: linear-gradient(135deg, var(--accent2), var(--accent3));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  margin-bottom: 6px;
}
.stat-label { font-size: 0.85rem; color: var(--text2); font-weight: 500; }



.stack-main {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  justify-content: center;
  margin-bottom: 48px;
}
.stack-main-icon {
  font-size: 3.2rem;
  transition: transform 0.2s ease, filter 0.2s ease;
  filter: grayscale(20%);
}
.stack-main-icon:hover {
  transform: translateY(-6px) scale(1.15);
  filter: grayscale(0%) drop-shadow(0 4px 12px rgba(124,58,237,0.4));
}
.stack-used {
  text-align: center;
  border-top: 1px solid var(--border);
  padding-top: 28px;
}
.stack-used-label {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 12px;
}
.stack-used-list {
  font-size: 0.9rem;
  color: var(--text2);
  line-height: 2;
}
.stack-tab {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text2);
  padding: 8px 20px;
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: var(--font-mono);
  cursor: pointer;
  transition: var(--transition);
}
.stack-tab:hover {
  border-color: var(--accent);
  color: var(--text);
}
.stack-tab.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.stack-tab-content {
  display: none;
}
.stack-tab-content.active {
  display: grid;
}

/* ─── Stack ──────────────────────────────────── */
.stack-section { background: transparent; }

.stack-category { margin-bottom: 40px; }
.stack-category-title {
  font-size: 0.75rem;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--accent2);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 16px;
  padding-left: 4px;
  border-left: 2px solid var(--accent);
  padding-left: 10px;
}

.stack-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 16px;
}
.stack-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 16px;
  text-align: center;
  cursor: default;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}
.stack-item::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(124,58,237,0.1), transparent);
  opacity: 0;
  transition: opacity var(--transition);
}
.stack-item:hover {
  border-color: rgba(124,58,237,0.4);
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(124,58,237,0.15);
}
.stack-item:hover::before { opacity: 1; }

/* ─── Devicon helpers ────────────────────────── */
.stack-icon { font-size: 2.2rem; display: block; margin-bottom: 10px; }
.stack-icon--light { color: rgba(255,255,255,0.85) !important; }
.stack-name { font-size: 0.9rem; font-weight: 600; color: var(--text); margin-bottom: 4px; }
.stack-level { font-size: 0.72rem; color: var(--text3); font-family: var(--font-mono); }

.section-tag-icon { font-size: 0.9rem; vertical-align: middle; margin-right: 4px; }
.hero-inline-icon { font-size: 1.6rem; vertical-align: middle; margin-right: 10px; }
.hero-svg-icon { width: 14px; height: 14px; vertical-align: middle; margin-right: 6px; opacity: 0.6; }
.btn-icon { font-size: 1rem; vertical-align: middle; }
.btn-svg-icon { width: 16px; height: 16px; vertical-align: middle; }
.stat-icon { font-size: 0.9rem; vertical-align: middle; margin-right: 4px; }
.stat-number-icon { font-size: 2rem; }
.ptype-icon { font-size: 0.85rem; vertical-align: middle; margin-right: 4px; }
.placeholder-devicon { font-size: 2.8rem; opacity: 0.4; display: block; }
.placeholder-devicon--dim { opacity: 0.2; }
.project-tag i { font-size: 0.75rem; vertical-align: middle; margin-right: 3px; }
.tag-icon-light { color: rgba(255,255,255,0.7) !important; }
.footer-icon { font-size: 1rem; vertical-align: middle; margin-right: 8px; opacity: 0.4; }

/* ─── Projects ───────────────────────────────── */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 24px;
}

.tilt-card{
  transform-style: preserve-3d;
  will-change: transform;
}

.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all var(--transition);
  display: flex; flex-direction: column;
  position: relative;
  transform-style: preserve-3d;
}
.project-card::before{
  content:"";
  position:absolute;
  inset:-2px;
  border-radius: inherit;
  background:
    radial-gradient(260px 140px at 20% 15%, rgba(124,58,237,0.22), transparent 65%),
    radial-gradient(240px 140px at 85% 70%, rgba(34,211,238,0.18), transparent 65%);
  opacity: 0;
  pointer-events: none;
  filter: blur(0.2px);
  transform: translateZ(2px);
  transition: opacity 300ms ease;
}
.project-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(168,85,247,0.18) 50%, transparent 70%);
  transform: translateX(-130%);
  opacity: 0;
  pointer-events: none;
}
.project-card:hover {
  border-color: rgba(124,58,237,0.4);
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(124,58,237,0.15);
}
.project-card:hover::before{
  opacity: 1;
  animation: cardAura 3.4s ease-in-out infinite;
}
.project-card:hover::after {
  opacity: 1;
  animation: cardShine 0.9s ease;
}

@keyframes cardShine {
  from { transform: translateX(-130%); }
  to { transform: translateX(130%); }
}
@keyframes cardAura{
  0%,100% { filter: blur(0.2px); transform: translateZ(2px) scale(1); }
  50%     { filter: blur(0.6px); transform: translateZ(2px) scale(1.01); }
}

.project-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 20px;
  background: var(--surface2);
  border-bottom: 1px solid var(--border);
  transform: translateZ(10px);
}
.project-type { font-size: 0.8rem; font-weight: 600; color: var(--accent3); }
.project-year { font-family: var(--font-mono); font-size: 0.72rem; color: var(--text3); }

.project-body { padding: 20px; display: flex; flex-direction: column; gap: 14px; flex: 1; }

/* 3D depth layers inside tilted cards */
.tilt-card .project-preview-img,
.tilt-card .project-preview-placeholder{
  transform: translateZ(26px);
  transition: transform 300ms ease;
}
.tilt-card .project-title{ transform: translateZ(22px); transition: transform 300ms ease; }
.tilt-card .project-info-chip{ transform: translateZ(18px); transition: transform 300ms ease; }
.tilt-card .project-desc{ transform: translateZ(14px); transition: transform 300ms ease; }
.tilt-card .project-tags{ transform: translateZ(18px); transition: transform 300ms ease; }
.tilt-card .project-btn-row,
.tilt-card .project-demo-btn{ transform: translateZ(20px); transition: transform 300ms ease; }

.tilt-card:hover .project-preview-img,
.tilt-card:hover .project-preview-placeholder{ transform: translateZ(34px); }
.tilt-card:hover .project-title{ transform: translateZ(28px); }
.tilt-card:hover .project-tags{ transform: translateZ(24px); }

.project-badges { display: flex; gap: 8px; flex-wrap: wrap; }

.beta-badge {
  display: inline-flex; align-items: center; gap: 4px;
  background: rgba(245,158,11,0.15);
  color: var(--beta);
  border: 1px solid rgba(245,158,11,0.35);
  font-size: 0.7rem; font-weight: 700;
  font-family: var(--font-mono);
  padding: 4px 10px;
  border-radius: 20px;
  animation: betaPulse 2s ease-in-out infinite;
}
@keyframes betaPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(245,158,11,0.3); }
  50% { box-shadow: 0 0 8px 2px rgba(245,158,11,0.2); }
}

.python-badge {
  display: inline-flex; align-items: center; gap: 4px;
  background: rgba(59,130,246,0.15);
  color: #60a5fa;
  border: 1px solid rgba(59,130,246,0.35);
  font-size: 0.7rem; font-weight: 700;
  font-family: var(--font-mono);
  padding: 4px 10px;
  border-radius: 20px;
}

/* ─── Project Preview Placeholder ───────────── */
.project-preview-placeholder {
  width: 100%;
  height: 140px;
  background: var(--bg3);
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 8px;
  /* ← ЖОБА КОДЫН ОСЫҒАН ҚОСЫҢЫЗ / ADD YOUR PROJECT SCREENSHOT HERE */
  /* background-image: url('screenshots/your-project.jpg'); */
  /* background-size: cover; background-position: center; */
}
.placeholder-icon { font-size: 2rem; opacity: 0.5; }
.placeholder-text { font-size: 0.75rem; color: var(--text3); font-family: var(--font-mono); }

/* ─── AI Soon Placeholder ───────────────────────── */
.project-preview-placeholder--ai-soon {
  height: 160px;
  border-style: solid;
  border-color: rgba(168,85,247,0.35);
  background:
    radial-gradient(circle at 20% 30%, rgba(124,58,237,0.25), transparent 45%),
    radial-gradient(circle at 85% 65%, rgba(59,130,246,0.18), transparent 40%),
    linear-gradient(135deg, rgba(124,58,237,0.08), rgba(59,130,246,0.05));
  position: relative;
  overflow: hidden;
}
.project-preview-placeholder--ai-soon::before{
  content:'';
  position:absolute; inset:-30%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.18), transparent);
  transform: rotate(12deg) translateX(-40%);
  animation: aiSoonShine 3.8s ease-in-out infinite;
  opacity: 0.7;
  pointer-events:none;
}
@keyframes aiSoonShine{
  0%{ transform: rotate(12deg) translateX(-55%); opacity: 0.25;}
  45%{ opacity: 0.85;}
  100%{ transform: rotate(12deg) translateX(55%); opacity: 0.25;}
}
.ai-soon-visual{
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  display:flex;
  flex-direction: column;
  align-items:center;
  justify-content:center;
  gap: 10px;
  text-align:center;
}
.ai-soon-chip{
  display:inline-flex;
  align-items:center;
  gap: 10px;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(168,85,247,0.35);
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 30px rgba(124,58,237,0.18);
}
.ai-soon-emoji{ font-size: 1.25rem; }
.ai-soon-ai-icon{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:34px;
  height:34px;
  border-radius:12px;
  background: rgba(168,85,247,0.10);
  border: 1px solid rgba(168,85,247,0.30);
  box-shadow: 0 0 0 1px rgba(96,165,250,0.10) inset;
}
.ai-soon-mini{
  color: var(--accent3);
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 0.78rem;
  letter-spacing: 0.02em;
}
.ai-soon-big{
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.65rem;
  letter-spacing: 0.18em;
  color: #fff;
  text-shadow: 0 0 18px rgba(124,58,237,0.55), 0 0 40px rgba(59,130,246,0.22);
}
.ai-soon-sub{
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.72rem;
  color: rgba(160,160,190,0.95);
}

/* ─── Project Info ───────────────────────────── */
.project-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
}
.project-desc { font-size: 0.85rem; color: var(--text2); line-height: 1.6; flex: 1; }

/* Small info button inside project cards */
.project-info-chip{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:6px 10px;
  margin:6px 0 10px;
  border-radius:999px;
  border:1px solid rgba(148,163,184,0.4);
  background:rgba(15,23,42,0.7);
  color:rgba(226,232,240,0.9);
  font-size:0.7rem;
  font-family:var(--font-mono);
  cursor:pointer;
  transition:all var(--transition);
}
.project-info-chip-icon{
  width:14px;
  height:14px;
  border-radius:999px;
  background:linear-gradient(135deg,var(--accent),var(--accent2));
  display:flex;
  align-items:center;
  justify-content:center;
  color:#0b1020;
  font-size:0.65rem;
}
.project-info-chip:hover{
  border-color:var(--accent2);
  box-shadow:0 6px 18px rgba(148,163,184,0.35);
  transform:translateY(-1px);
}

/* Project info modal */
.project-info-overlay{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,0.7);
  z-index:12000;
  display:flex;
  align-items:center;
  justify-content:center;
  opacity:0;
  pointer-events:none;
  transition:opacity 0.25s ease;
}
.project-info-overlay.open{
  opacity:1;
  pointer-events:all;
}
.project-info-modal{
  width: min(420px, 92vw);
  background:var(--surface2);
  border-radius:18px;
  border:1px solid rgba(148,163,184,0.4);
  box-shadow:0 24px 60px rgba(15,23,42,0.9);
  padding:20px 20px 18px;
  position:relative;
}
.project-info-close{
  position:absolute;
  top:10px;
  right:10px;
  width:28px;
  height:28px;
  border-radius:999px;
  border:1px solid rgba(148,163,184,0.5);
  background:var(--surface);
  color:var(--text2);
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:0.8rem;
  transition:all var(--transition);
}
.project-info-close:hover{
  background:rgba(239,68,68,0.16);
  color:#fee2e2;
}
.project-info-title{
  font-family:var(--font-display);
  font-size:1rem;
  font-weight:700;
  margin-bottom:6px;
}
.project-info-body{
  font-size:0.8rem;
  line-height:1.5;
  color:var(--text2);
  font-family:var(--font-mono);
}

.project-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.project-tag {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  color: var(--text2);
  font-size: 0.72rem;
  padding: 4px 10px;
  border-radius: 20px;
  font-family: var(--font-mono);
}

/* ─── Project Buttons ────────────────────────── */
.project-demo-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  width: 100%;
  margin-top: auto;
  font-family: var(--font-main);
  text-decoration: none;
}
.project-demo-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(124,58,237,0.5);
}

.beta-demo-btn {
  background: linear-gradient(135deg, #b45309, var(--beta));
}
.beta-demo-btn:hover { box-shadow: 0 6px 20px rgba(245,158,11,0.4); }

/* ─── "More" Card ────────────────────────────── */
.project-card--more {
  background: linear-gradient(135deg, var(--surface), rgba(124,58,237,0.05));
  border-style: dashed;
}
.more-placeholder {
  background: linear-gradient(135deg, rgba(124,58,237,0.05), rgba(168,85,247,0.05));
}

/* ─── Contact ────────────────────────────────── */
.contact-section { text-align: center; }

.socials {
  display: flex; justify-content: center; gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}
.social-link {
  display: flex; align-items: center; justify-content: center;
  width: 52px; height: 52px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--text2);
  transition: all var(--transition);
}
.social-link:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(124,58,237,0.4);
}


.contact-email, .contact-phone {
  font-size: 1rem;
  color: var(--text2);
  margin-bottom: 8px;
}
.contact-email a { color: var(--accent3); transition: color var(--transition); }
.contact-email a:hover { color: var(--accent2); }

.contact-telegram-channel{
  margin: 12px 0 10px;
  font-size: 1rem;
  color: var(--text2);
}
.contact-telegram-channel a{
  color: var(--accent3);
  transition: color var(--transition);
}
.contact-telegram-channel a:hover{
  color: var(--accent2);
}

/* ─── Hire / Job Invite ─────────────────────── */
.hire-section{
  padding: 110px 7%;
}
.hire-card{
  max-width: 980px;
  margin: 0 auto;
  padding: 22px 22px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.10);
  background: radial-gradient(900px 400px at 20% 0%, rgba(124,58,237,0.18), transparent 60%),
              radial-gradient(700px 420px at 90% 10%, rgba(34,211,238,0.14), transparent 60%),
              rgba(255,255,255,0.04);
  box-shadow: 0 18px 60px rgba(0,0,0,0.35);
}
.hire-card-top{
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
}
.hire-card-text{
  min-width: 0;
  flex: 1 1 auto;
}
.hire-visual{
  flex: 0 0 auto;
  width: 320px;
  height: 120px;
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.10);
  background:
    radial-gradient(160px 110px at 30% 45%, rgba(124,58,237,0.34), transparent 62%),
    radial-gradient(180px 120px at 82% 62%, rgba(34,211,238,0.24), transparent 64%),
    rgba(255,255,255,0.02);
  transform-style: preserve-3d;
  perspective: 800px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.06),
              0 18px 50px rgba(0,0,0,0.35);
  margin-left: auto;
}
.hire-visual::before{
  content:"";
  position:absolute;
  inset:-40% -30%;
  background:
    radial-gradient(circle at 30% 30%, rgba(255,255,255,0.22), transparent 52%),
    radial-gradient(circle at 70% 60%, rgba(255,255,255,0.14), transparent 55%),
    linear-gradient(rgba(255,255,255,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: auto, auto, 22px 22px, 22px 22px;
  mix-blend-mode: screen;
  opacity: 0.55;
  transform: translateZ(6px) rotate(8deg);
  animation: hireGridDrift 12s linear infinite;
  pointer-events: none;
}
.hire-visual{
  isolation: isolate;
}
.hire-visual .hire-actor,
.hire-visual .hire-bubbles,
.hire-visual .hire-orb,
.hire-visual .hire-cube{ z-index: 2; }
.hire-visual::before,
.hire-visual::after{ z-index: 1; }
.hire-visual::after{
  content:"";
  position:absolute;
  inset:0;
  background: radial-gradient(220px 140px at 86% 28%, rgba(124,58,237,0.26), transparent 62%),
              radial-gradient(220px 150px at 18% 85%, rgba(34,211,238,0.18), transparent 66%);
  opacity: 0.75;
  transform: translateZ(10px);
  pointer-events: none;
}
/* keep visual stable; the outer tilt-card already rotates the whole card */
.hire-card:hover .hire-visual{ transform: none; }

/* Scene actor */
.hire-actor{
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  animation: none;
}

/* Bot particles (assemble into bot silhouette) */
.hire-bot-particles{
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  animation: bot3DDrift 8s ease-in-out infinite;
}
.bp{
  position: absolute;
  left: 0;
  top: 0;
  --d: 2px;
  width: 12px;
  height: 12px;
  border-radius: 10px;
  background: linear-gradient(140deg, rgba(138,92,250,0.9), rgba(61,224,241,0.72));
  box-shadow: 0 14px 34px rgba(0,0,0,0.34);
  opacity: 0;
  transform: translate3d(calc(var(--sx, 260px)), calc(var(--sy, 16px)), var(--z, 14px)) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) scale(0.7);
  animation: botAssemble 7.2s cubic-bezier(.2,.85,.2,1) infinite;
  will-change: transform, opacity, filter;
  transform-style: preserve-3d;
}
.bp::before,
.bp::after{
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}
/* right side */
.bp::before{
  width: var(--d);
  left: 100%;
  height: 100%;
  top: 0;
  background: linear-gradient(180deg, rgba(70,150,220,0.55), rgba(30,70,130,0.45));
  transform-origin: left center;
  transform: rotateY(90deg);
}
/* top side */
.bp::after{
  height: var(--d);
  top: calc(-1 * var(--d));
  width: 100%;
  left: 0;
  background: linear-gradient(90deg, rgba(190,220,255,0.4), rgba(120,170,255,0.25));
  transform-origin: bottom center;
  transform: rotateX(90deg);
}
.bp--layer-front{
  opacity: 0;
  filter: brightness(1.05) saturate(1.05);
}
.bp--layer-mid1{
  opacity: 0;
  filter: brightness(0.82) saturate(0.9);
}
.bp--layer-mid2{
  opacity: 0;
  filter: brightness(0.66) saturate(0.8);
}
.bp--layer-back{
  opacity: 0;
  filter: brightness(0.5) saturate(0.7);
}
.bp--head{ width: 16px; height: 16px; opacity: 0.95; border-radius: 14px; }
.bp--body{ width: 18px; height: 18px; opacity: 0.90; border-radius: 16px; }
.bp--ear{ width: 18px; height: 22px; opacity: 0.88; border-radius: 16px; }
.bp--spark{ width: 8px; height: 8px; opacity: 0.75; filter: blur(0.1px); }
.bp--antenna{
  width: 9px;
  height: 9px;
  opacity: 0.85;
  background: radial-gradient(circle at 35% 35%, rgba(255,255,255,0.85), rgba(124,58,237,0.75) 55%, rgba(34,211,238,0.35) 100%);
}
.bp--eye{
  width: 16px;
  height: 22px;
  border-radius: 999px;
  background: radial-gradient(circle at 35% 30%, rgba(255,255,255,0.92), rgba(255,255,255,0.18) 45%, rgba(255,255,255,0.0) 72%);
  box-shadow: 0 0 0 7px rgba(255,255,255,0.05);
  opacity: 0.95;
}
.bp--mouth{
  width: 54px;
  height: 14px;
  border-radius: 6px;
  background: linear-gradient(180deg, rgba(255,255,255,0.10), rgba(255,255,255,0.02));
  border: 1px solid rgba(255,255,255,0.14);
  opacity: 0.72;
}

/* Target positions inside 320x120 visual (stronger bot silhouette) */
.bp:nth-child(1){  --tx: 156px; --ty: 6px;   --sx: 300px; --sy: 10px;  --z: 26px; } /* antenna */
.bp:nth-child(2){  --tx: 78px;  --ty: 20px;  --sx: 270px; --sy: 10px;  --z: 14px; } /* top-left */
.bp:nth-child(3){  --tx: 216px; --ty: 20px;  --sx: 270px; --sy: 38px;  --z: 14px; } /* top-right */
.bp:nth-child(4){  --tx: 78px;  --ty: 88px;  --sx: 300px; --sy: 54px;  --z: 14px; } /* bottom-left */
.bp:nth-child(5){  --tx: 216px; --ty: 88px;  --sx: 320px; --sy: 70px;  --z: 14px; } /* bottom-right */
.bp:nth-child(6){  --tx: 54px;  --ty: 52px;  --sx: 250px; --sy: 18px;  --z: 16px; } /* left ear */
.bp:nth-child(7){  --tx: 244px; --ty: 52px;  --sx: 250px; --sy: 92px;  --z: 16px; } /* right ear */
.bp:nth-child(8){  --tx: 118px; --ty: 44px;  --sx: 320px; --sy: 18px;  --z: 24px; } /* left eye */
.bp:nth-child(9){  --tx: 188px; --ty: 44px;  --sx: 320px; --sy: 44px;  --z: 24px; } /* right eye */
.bp:nth-child(10){ --tx: 132px; --ty: 78px;  --sx: 320px; --sy: 78px;  --z: 20px; } /* mouth */

/* Body / outline blocks */
.bp:nth-child(11){ --tx: 112px; --ty: 36px;  --sx: 270px; --sy: 62px;  --z: 12px; }
.bp:nth-child(12){ --tx: 210px; --ty: 36px;  --sx: 270px; --sy: 78px;  --z: 12px; }
.bp:nth-child(13){ --tx: 112px; --ty: 84px;  --sx: 290px; --sy: 26px;  --z: 12px; }
.bp:nth-child(14){ --tx: 210px; --ty: 84px;  --sx: 290px; --sy: 92px;  --z: 12px; }
.bp:nth-child(15){ --tx: 124px; --ty: 28px;  --sx: 260px; --sy: 10px;  --z: 10px; }
.bp:nth-child(16){ --tx: 198px; --ty: 28px;  --sx: 260px; --sy: 96px;  --z: 10px; }
.bp:nth-child(17){ --tx: 124px; --ty: 92px;  --sx: 310px; --sy: 12px;  --z: 10px; }
.bp:nth-child(18){ --tx: 198px; --ty: 92px;  --sx: 310px; --sy: 98px;  --z: 10px; }
.bp:nth-child(19){ --tx: 156px; --ty: 26px;  --sx: 320px; --sy: 40px;  --z: 8px; }
.bp:nth-child(20){ --tx: 168px; --ty: 96px;  --sx: 320px; --sy: 70px;  --z: 8px; }

/* small sparks around */
.bp:nth-child(21){ --tx: 262px; --ty: 38px;  --sx: 220px; --sy: 20px;  --z: 16px; opacity: 0.55; }
.bp:nth-child(22){ --tx: 272px; --ty: 72px;  --sx: 220px; --sy: 90px;  --z: 16px; opacity: 0.55; }
.bp:nth-child(23){ --tx: 250px; --ty: 92px;  --sx: 240px; --sy: 54px;  --z: 16px; opacity: 0.45; }
.bp:nth-child(24){ --tx: 262px; --ty: 58px;  --sx: 240px; --sy: 76px;  --z: 16px; opacity: 0.45; }

@keyframes botAssemble{
  0%   { opacity: 0; transform: translate3d(var(--sx), var(--sy), var(--z)) scale(0.55) rotate(-10deg); filter: blur(1px) brightness(0.9); }
  16%  { opacity: 0.95; filter: blur(0px) brightness(1.05); }
  30%  { opacity: 1; transform: translate3d(calc(var(--tx) + var(--ox)), calc(var(--ty) + var(--oy)), var(--z)) scale(1) rotate(0deg); }
  38%  { transform: translate3d(calc(var(--tx) + var(--ox)), calc(var(--ty) + var(--oy) - 2px), var(--z)) scale(1.04) rotate(0deg); }
  52%  { transform: translate3d(calc(var(--tx) + var(--ox) + 42px), calc(var(--ty) + var(--oy) + 0px), var(--z)) scale(1.02) rotate(0deg); }
  64%  { transform: translate3d(calc(var(--tx) + var(--ox) + 58px), calc(var(--ty) + var(--oy) + 4px), var(--z)) scale(1.0) rotate(0deg); }
  78%  { transform: translate3d(calc(var(--tx) + var(--ox) + 46px), calc(var(--ty) + var(--oy) + 8px), var(--z)) scale(1.0) rotate(0deg); }
  100% { opacity: 0; transform: translate3d(var(--sx), var(--sy), var(--z)) scale(0.55) rotate(10deg); filter: blur(1px) brightness(0.9); }
}
.hire-orb{
  position: absolute;
  width: 150px;
  height: 150px;
  left: 18px;
  top: 50%;
  transform: translate3d(-34px, -42px, 10px) scale(0.75);
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.9), rgba(255,255,255,0.0) 55%),
              conic-gradient(from 120deg, rgba(124,58,237,0.9), rgba(34,211,238,0.85), rgba(124,58,237,0.9));
  filter: blur(0.2px) drop-shadow(0 14px 22px rgba(124,58,237,0.22));
  opacity: 0.9;
  animation: hireAssembleOrb 7.2s cubic-bezier(.2,.8,.2,1) infinite;
  transform-origin: center;
}
.hire-card:hover .hire-orb{ filter: blur(0.2px) drop-shadow(0 16px 26px rgba(124,58,237,0.26)); }
.hire-orb::before{
  content:"";
  position:absolute;
  inset: 16px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.9), rgba(255,255,255,0.0) 60%);
  opacity: 0.35;
  filter: blur(0.6px);
}
.hire-bubbles{
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
}

/* Extra 3D element: rotating wireframe cube */
.hire-cube{
  position: absolute;
  right: 18px;
  top: 50%;
  width: 46px;
  height: 46px;
  transform-style: preserve-3d;
  transform: translate3d(36px, 22px, 8px) rotateX(18deg) rotateY(22deg) scale(0.9);
  animation: hireAssembleCube 7.2s cubic-bezier(.2,.8,.2,1) infinite;
  filter: drop-shadow(0 10px 18px rgba(34,211,238,0.18));
}
.hire-cube-face{
  position: absolute;
  inset: 0;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.22);
  background: linear-gradient(135deg, rgba(124,58,237,0.10), rgba(34,211,238,0.08));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.06);
  backdrop-filter: blur(2px);
}
.hire-cube-face:nth-child(1){ transform: translateZ(24px); }
.hire-cube-face:nth-child(2){ transform: rotateY(180deg) translateZ(24px); }
.hire-cube-face:nth-child(3){ transform: rotateY(90deg) translateZ(24px); }
.hire-cube-face:nth-child(4){ transform: rotateY(-90deg) translateZ(24px); }
.hire-cube-face:nth-child(5){ transform: rotateX(90deg) translateZ(24px); }
.hire-cube-face:nth-child(6){ transform: rotateX(-90deg) translateZ(24px); }

@keyframes hireCubeSpin{
  0%   { transform: translate3d(calc(var(--mx, 0) * -6px), calc(-50% + (var(--my, 0) * -4px)), 26px) rotateX(18deg) rotateY(22deg) rotateZ(0deg); }
  50%  { transform: translate3d(calc(var(--mx, 0) * -10px - 6px), calc(-50% + (var(--my, 0) * -6px) - 6px), 34px) rotateX(34deg) rotateY(210deg) rotateZ(20deg); }
  100% { transform: translate3d(calc(var(--mx, 0) * -6px), calc(-50% + (var(--my, 0) * -4px)), 26px) rotateX(18deg) rotateY(382deg) rotateZ(0deg); }
}
.hire-bubble{
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.95), rgba(255,255,255,0.2) 55%, rgba(255,255,255,0.0) 75%);
  box-shadow: 0 0 0 7px rgba(255,255,255,0.07);
  opacity: 0.9;
  transform: translate3d(0,0,14px);
}

/* Bot details (eyes + antenna) */
.hire-bubble--eye1{ left: 86px; top: 50%; margin-top: -6px; width: 10px; height: 10px; animation: hireAssembleEye1 7.2s cubic-bezier(.2,.8,.2,1) infinite; }
.hire-bubble--eye2{ left: 114px; top: 50%; margin-top: -6px; width: 10px; height: 10px; animation: hireAssembleEye2 7.2s cubic-bezier(.2,.8,.2,1) infinite; }
.hire-bubble--antenna{ left: 100px; top: 22px; width: 9px; height: 9px; opacity: 0.85; animation: hireAssembleAntenna 7.2s cubic-bezier(.2,.8,.2,1) infinite; }

@keyframes hireWander{
  0%, 42% { transform: translate3d(0,0,0); }
  55%     { transform: translate3d(10px,-2px,0); }
  70%     { transform: translate3d(28px,4px,0); }
  82%     { transform: translate3d(18px,8px,0); }
  100%    { transform: translate3d(0,0,0); }
}
@keyframes hireAssembleOrb{
  0%   { transform: translate3d(-34px,-42px,10px) scale(0.75); opacity: 0.85; filter: blur(0.2px) drop-shadow(0 10px 18px rgba(124,58,237,0.18)); }
  18%  { transform: translate3d(22px, -50%, 16px) scale(0.95); opacity: 0.95; }
  40%  { transform: translate3d(22px, -50%, 22px) scale(1.0); opacity: 1; }
  62%  { transform: translate3d(22px, calc(-50% + 4px), 24px) scale(1.02); }
  78%  { transform: translate3d(30px, calc(-50% + 6px), 20px) scale(1.0); }
  100% { transform: translate3d(-34px,-42px,10px) scale(0.75); opacity: 0.85; filter: blur(0.2px) drop-shadow(0 10px 18px rgba(124,58,237,0.18)); }
}
@keyframes hireAssembleCube{
  0%   { transform: translate3d(36px,22px,8px) rotateX(10deg) rotateY(25deg) scale(0.85); opacity: 0.7; }
  22%  { transform: translate3d(148px, -50%, 18px) rotateX(18deg) rotateY(22deg) scale(1.0); opacity: 0.95; }
  40%  { transform: translate3d(148px, -50%, 22px) rotateX(22deg) rotateY(36deg) scale(1.02); opacity: 1; }
  62%  { transform: translate3d(148px, calc(-50% + 6px), 24px) rotateX(18deg) rotateY(44deg) scale(1.02); }
  78%  { transform: translate3d(156px, calc(-50% + 12px), 18px) rotateX(12deg) rotateY(20deg) scale(0.98); }
  100% { transform: translate3d(36px,22px,8px) rotateX(10deg) rotateY(25deg) scale(0.85); opacity: 0.7; }
}
@keyframes hireAssembleEye1{
  0%   { opacity: 0.0; transform: translate3d(220px,24px,10px) scale(0.6); }
  22%  { opacity: 0.9; transform: translate3d(0,0,22px) scale(1); }
  62%  { opacity: 1; transform: translate3d(0,2px,24px) scale(1.05); }
  78%  { opacity: 1; transform: translate3d(0,0,22px) scale(1); }
  100% { opacity: 0.0; transform: translate3d(220px,24px,10px) scale(0.6); }
}
@keyframes hireAssembleEye2{
  0%   { opacity: 0.0; transform: translate3d(240px,44px,10px) scale(0.6); }
  22%  { opacity: 0.9; transform: translate3d(0,0,22px) scale(1); }
  62%  { opacity: 1; transform: translate3d(0,2px,24px) scale(1.05); }
  78%  { opacity: 1; transform: translate3d(0,0,22px) scale(1); }
  100% { opacity: 0.0; transform: translate3d(240px,44px,10px) scale(0.6); }
}
@keyframes hireAssembleAntenna{
  0%   { opacity: 0.0; transform: translate3d(200px,12px,10px) scale(0.6); }
  22%  { opacity: 0.85; transform: translate3d(0,0,22px) scale(1); }
  62%  { opacity: 1; transform: translate3d(0,-2px,28px) scale(1.05); }
  78%  { opacity: 0.9; transform: translate3d(0,0,22px) scale(1); }
  100% { opacity: 0.0; transform: translate3d(200px,12px,10px) scale(0.6); }
}
@keyframes hireGridDrift{
  0%   { transform: translateZ(6px) translate3d(-10px, -6px, 0) rotate(8deg); }
  50%  { transform: translateZ(6px) translate3d(14px, 10px, 0) rotate(8deg); }
  100% { transform: translateZ(6px) translate3d(-10px, -6px, 0) rotate(8deg); }
}
@media (prefers-reduced-motion: reduce){
  .hire-visual::before,
  .hire-actor,
  .hire-orb,
  .hire-bubble,
  .hire-cube{
    animation: none !important;
  }
}
.hire-bot-badge{
  flex: 0 0 auto;
  font-family: var(--font-mono);
  font-weight: 900;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
  padding: 8px 10px;
  border-radius: 10px;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent3));
  box-shadow: 0 10px 24px rgba(124,58,237,0.35);
}
.hire-card-title{
  margin: 0 0 6px;
  font-size: 1.2rem;
}
.hire-card-desc{
  margin: 0;
  color: var(--text2);
  line-height: 1.6;
}
.hire-actions{
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}
.hire-open-btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

/* ===== HI (3s) -> BOT (5s) particle choreography ===== */
.hire-actor{
  animation: none;
}
.hire-hi-particles,
.hire-micro-particles,
.hire-bot-particles{
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
}

.hire-hi-particles .hp,
.hire-bot-particles .bp{
  position: absolute;
  left: 0;
  top: 0;
  width: 8px;
  height: 8px;
  background: linear-gradient(135deg, rgba(124,58,237,0.85), rgba(34,211,238,0.65));
  box-shadow: 0 6px 14px rgba(0,0,0,0.24);
  opacity: 0;
  transform: translate3d(var(--sx, 260px), var(--sy, 24px), var(--z, 12px)) scale(0.5);
}
.hire-micro-particles{
  display: none;
  pointer-events: none;
}
.hire-micro-particles .mp{
  position: absolute;
  left: 0;
  top: 0;
  width: 5px;
  height: 5px;
  background: linear-gradient(135deg, rgba(124,58,237,0.7), rgba(34,211,238,0.65));
  opacity: 0.38;
  box-shadow: none;
  animation: none;
}

/* shape variety */
/* keep an IT look: circles + small hard-edge squares only */
.hire-hi-particles .hp:nth-child(2n),
.hire-bot-particles .bp:nth-child(2n){ border-radius: 50%; }
.hire-hi-particles .hp:nth-child(2n+1),
.hire-bot-particles .bp:nth-child(2n+1){ border-radius: 2px; }
.hp--circle, .bp--circle, .mp--circle{ border-radius: 2px; }
.hp--square, .bp--square, .mp--square{ border-radius: 2px; }
.hp--diamond, .bp--diamond, .mp--diamond{ border-radius: 2px; transform: none; }
.hp--pill, .bp--pill, .mp--pill{ border-radius: 2px; }
.hp--star, .bp--star{ clip-path: none; border-radius: 2px; }
.mp--triangle{ clip-path: none; border-radius: 2px; }

/* HI particles */
.hire-hi-particles .hp{ animation: hiParticles 8s cubic-bezier(.2,.8,.2,1) infinite; }

/* H (left + middle + right bars) */
.hire-hi-particles .hp:nth-child(1){ --tx: 86px; --ty: 28px; --sx: 286px; --sy: 18px; }
.hire-hi-particles .hp:nth-child(2){ --tx: 86px; --ty: 46px; --sx: 298px; --sy: 28px; }
.hire-hi-particles .hp:nth-child(3){ --tx: 86px; --ty: 64px; --sx: 304px; --sy: 44px; }
.hire-hi-particles .hp:nth-child(4){ --tx: 86px; --ty: 82px; --sx: 294px; --sy: 62px; }
.hire-hi-particles .hp:nth-child(5){ --tx: 104px; --ty: 56px; --sx: 284px; --sy: 78px; }
.hire-hi-particles .hp:nth-child(6){ --tx: 122px; --ty: 56px; --sx: 274px; --sy: 88px; }
.hire-hi-particles .hp:nth-child(7){ --tx: 140px; --ty: 28px; --sx: 262px; --sy: 18px; }
.hire-hi-particles .hp:nth-child(8){ --tx: 140px; --ty: 46px; --sx: 252px; --sy: 36px; }
.hire-hi-particles .hp:nth-child(9){ --tx: 140px; --ty: 64px; --sx: 244px; --sy: 54px; }
.hire-hi-particles .hp:nth-child(10){ --tx: 140px; --ty: 82px; --sx: 238px; --sy: 72px; }

/* I (top + stem + bottom) */
.hire-hi-particles .hp:nth-child(11){ --tx: 188px; --ty: 28px; --sx: 302px; --sy: 14px; }
.hire-hi-particles .hp:nth-child(12){ --tx: 206px; --ty: 28px; --sx: 312px; --sy: 24px; }
.hire-hi-particles .hp:nth-child(13){ --tx: 224px; --ty: 28px; --sx: 318px; --sy: 38px; }
.hire-hi-particles .hp:nth-child(14){ --tx: 206px; --ty: 46px; --sx: 296px; --sy: 52px; }
.hire-hi-particles .hp:nth-child(15){ --tx: 206px; --ty: 64px; --sx: 286px; --sy: 66px; }
.hire-hi-particles .hp:nth-child(16){ --tx: 206px; --ty: 82px; --sx: 272px; --sy: 82px; }
.hire-hi-particles .hp:nth-child(17){ --tx: 188px; --ty: 82px; --sx: 260px; --sy: 18px; }
.hire-hi-particles .hp:nth-child(18){ --tx: 206px; --ty: 82px; --sx: 248px; --sy: 30px; }
.hire-hi-particles .hp:nth-child(19){ --tx: 224px; --ty: 82px; --sx: 238px; --sy: 44px; }
.hire-hi-particles .hp:nth-child(20){ --tx: 206px; --ty: 56px; --sx: 232px; --sy: 88px; }

/* BOT particles (clean, straight silhouette) */
.hire-bot-particles .bp{
  animation: botParticles 8s cubic-bezier(.2,.85,.2,1) infinite;
}
.hire-bot-particles .bp--head{ width: 4px; height: 4px; border-radius: 1px; }
.hire-bot-particles .bp--body{ width: 4px; height: 4px; border-radius: 1px; }
.hire-bot-particles .bp--ear{ width: 4px; height: 4px; border-radius: 1px; }
.hire-bot-particles .bp--eye{
  width: 4px;
  height: 4px;
  border-radius: 1px;
  background: #f8fbff;
  border: 1px solid rgba(192,210,244,0.55);
  box-shadow: 0 0 3px rgba(255,255,255,0.28);
}
.hire-bot-particles .bp--eye-left{
  animation: none;
}
.hire-bot-particles .bp--eye-right{
  animation: none;
}
.hire-bot-particles .bp--pupil{
  background: #0b1424;
  border-color: rgba(38,56,90,0.7);
}
.hire-bot-particles .bp--pupil.bp--eye-left,
.hire-bot-particles .bp--pupil.bp--eye-right{
  animation: pupilLookSync 6.5s ease-in-out infinite;
}
.hire-bot-particles .bp--mouth{
  width: 5px;
  height: 5px;
  border-radius: 1px;
  background: rgba(235,242,255,0.78);
  border: none;
  box-shadow: 0 0 2px rgba(255,255,255,0.22);
  animation: mouthAfterPulse 10s ease-in-out infinite !important;
}
.hire-bot-particles .bp--antenna{
  background: linear-gradient(140deg, rgba(255,77,77,0.95), rgba(255,35,35,0.88));
  box-shadow: 0 0 6px rgba(255,70,70,0.45);
  animation: antennaPulse 10s ease-in-out infinite !important;
}
.hire-bot-particles .bp--layer-back.bp--eye,
.hire-bot-particles .bp--layer-mid2.bp--eye{
  box-shadow: 0 0 2px rgba(255,255,255,0.08);
}

/* Static 3D mode (no animation) */
.hire-hi-particles{
  display: none;
}
.hire-bot-particles{
  animation: none !important;
  transform: perspective(900px) rotateX(0deg) rotateY(0deg) translateZ(0);
}
.hire-bot-particles .bp{
  animation: none !important;
  opacity: 1 !important;
  transform: translate3d(var(--tx), var(--ty), var(--z, 12px)) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) scale(1) !important;
  z-index: 1;
}
.hire-bot-particles .bp.bp--antenna{
  animation: none !important;
  background: linear-gradient(140deg, rgba(138,92,250,0.9), rgba(61,224,241,0.72)) !important;
  box-shadow: 0 0 6px rgba(124,58,237,0.22);
}
.hire-bot-particles .bp.bp--mouth{
  animation: none !important;
}
.hire-bot-particles.antenna-active .bp.bp--antenna{
  background: linear-gradient(140deg, rgba(255,120,120,1), rgba(255,40,40,1)) !important;
  box-shadow: 0 0 14px rgba(255,90,90,0.78), 0 0 28px rgba(255,40,40,0.7) !important;
  filter: saturate(1.5) brightness(1.38);
}
.hire-bot-particles.mouth-active .bp.bp--mouth{
  background: #ffffff !important;
  box-shadow: 0 0 8px rgba(255,255,255,0.85), 0 0 18px rgba(255,255,255,0.62) !important;
}
.bp--layer-front{ opacity: 0.98 !important; }
.bp--layer-mid1,
.bp--layer-mid2,
.bp--layer-mid,
.bp--layer-back{ display: none !important; }

@keyframes eyeSplitLeft{
  0%, 100% { transform: translateX(0); }
  22%      { transform: translateX(-1.2px); }
  50%      { transform: translateX(1.2px); }
  78%      { transform: translateX(-0.8px); }
}

@keyframes eyeSplitRight{
  0%, 100% { transform: translateX(0); }
  22%      { transform: translateX(1.2px); }
  50%      { transform: translateX(-1.2px); }
  78%      { transform: translateX(0.8px); }
}

@keyframes pupilLookLeft{
  0%, 12%   { transform: translate(0, 0); }
  26%       { transform: translate(-0.9px, -0.2px); }
  42%       { transform: translate(0.7px, -0.1px); }
  58%       { transform: translate(0.6px, 0.5px); }
  74%       { transform: translate(-0.8px, 0.4px); }
  90%, 100% { transform: translate(0, 0); }
}

@keyframes pupilLookRight{
  0%, 12%   { transform: translate(0, 0); }
  26%       { transform: translate(0.9px, -0.2px); }
  42%       { transform: translate(-0.7px, -0.1px); }
  58%       { transform: translate(-0.6px, 0.5px); }
  74%       { transform: translate(0.8px, 0.4px); }
  90%, 100% { transform: translate(0, 0); }
}

@keyframes pupilLookSync{
  0%, 12%   { transform: translate(0, 0); }
  26%       { transform: translate(-0.8px, -0.2px); }
  42%       { transform: translate(0.9px, -0.1px); }
  58%       { transform: translate(0.7px, 0.5px); }
  74%       { transform: translate(-0.7px, 0.4px); }
  90%, 100% { transform: translate(0, 0); }
}

@keyframes antennaPulse{
  0%, 8%, 100%{
    background: linear-gradient(140deg, rgba(138,92,250,0.9), rgba(61,224,241,0.72));
    box-shadow: 0 0 6px rgba(124,58,237,0.22);
    filter: saturate(1) brightness(1);
  }
  9%, 18%{
    background: linear-gradient(140deg, rgba(255,120,120,1), rgba(255,40,40,1));
    box-shadow: 0 0 14px rgba(255,90,90,0.78), 0 0 28px rgba(255,40,40,0.7);
    filter: saturate(1.5) brightness(1.38);
  }
}

@keyframes mouthAfterPulse{
  0%, 20%, 100%{
    background: rgba(235,242,255,0.78);
    box-shadow: 0 0 2px rgba(255,255,255,0.22);
  }
  20%, 45%{
    background: #ffffff;
    box-shadow: 0 0 8px rgba(255,255,255,0.85), 0 0 18px rgba(255,255,255,0.62);
  }
}

.hire-micro-particles .mp:nth-child(1){ --mx: 18px; --my: 18px; --md: 0s; }
.hire-micro-particles .mp:nth-child(2){ --mx: 40px; --my: 28px; --md: .2s; }
.hire-micro-particles .mp:nth-child(3){ --mx: 62px; --my: 44px; --md: .4s; }
.hire-micro-particles .mp:nth-child(4){ --mx: 84px; --my: 24px; --md: .6s; }
.hire-micro-particles .mp:nth-child(5){ --mx: 108px; --my: 48px; --md: .8s; }
.hire-micro-particles .mp:nth-child(6){ --mx: 134px; --my: 16px; --md: 1s; }
.hire-micro-particles .mp:nth-child(7){ --mx: 156px; --my: 34px; --md: 1.2s; }
.hire-micro-particles .mp:nth-child(8){ --mx: 178px; --my: 22px; --md: 1.4s; }
.hire-micro-particles .mp:nth-child(9){ --mx: 198px; --my: 40px; --md: 1.6s; }
.hire-micro-particles .mp:nth-child(10){ --mx: 222px; --my: 26px; --md: 1.8s; }
.hire-micro-particles .mp:nth-child(11){ --mx: 246px; --my: 18px; --md: 2s; }
.hire-micro-particles .mp:nth-child(12){ --mx: 274px; --my: 36px; --md: 2.2s; }
.hire-micro-particles .mp:nth-child(13){ --mx: 292px; --my: 54px; --md: 2.4s; }
.hire-micro-particles .mp:nth-child(14){ --mx: 20px; --my: 70px; --md: 2.6s; }
.hire-micro-particles .mp:nth-child(15){ --mx: 46px; --my: 92px; --md: 2.8s; }
.hire-micro-particles .mp:nth-child(16){ --mx: 72px; --my: 84px; --md: 3s; }
.hire-micro-particles .mp:nth-child(17){ --mx: 96px; --my: 100px; --md: 3.2s; }
.hire-micro-particles .mp:nth-child(18){ --mx: 126px; --my: 84px; --md: 3.4s; }
.hire-micro-particles .mp:nth-child(19){ --mx: 150px; --my: 98px; --md: 3.6s; }
.hire-micro-particles .mp:nth-child(20){ --mx: 178px; --my: 86px; --md: 3.8s; }
.hire-micro-particles .mp:nth-child(21){ --mx: 206px; --my: 100px; --md: 4s; }
.hire-micro-particles .mp:nth-child(22){ --mx: 232px; --my: 86px; --md: 4.2s; }
.hire-micro-particles .mp:nth-child(23){ --mx: 258px; --my: 102px; --md: 4.4s; }
.hire-micro-particles .mp:nth-child(24){ --mx: 282px; --my: 90px; --md: 4.6s; }
.hire-micro-particles .mp:nth-child(25){ --mx: 302px; --my: 76px; --md: 4.8s; }
.hire-micro-particles .mp{
  transform: translate3d(var(--mx, 12px), var(--my, 12px), 8px);
  animation-delay: var(--md, 0s);
}

@keyframes hiParticles{
  0%   { opacity: 0; transform: translate3d(var(--sx), var(--sy), var(--z,12px)) scale(0.45) rotate(-12deg); }
  10%  { opacity: 0.95; }
  18%  { opacity: 1; transform: translate3d(var(--tx), var(--ty), var(--z,12px)) scale(1) rotate(0deg); }
  35%  { opacity: 1; transform: translate3d(var(--tx), var(--ty), var(--z,12px)) scale(1.02) rotate(0deg); }
  37.5%{ opacity: 1; transform: translate3d(var(--tx), var(--ty), var(--z,12px)) scale(1) rotate(0deg); }
  40%  { opacity: 0; transform: translate3d(calc(var(--tx) + 10px), calc(var(--ty) + 2px), var(--z,12px)) scale(0.68); }
  100% { opacity: 0; transform: translate3d(var(--sx), var(--sy), var(--z,12px)) scale(0.45) rotate(0deg); }
}

@keyframes botParticles{
  0%   { opacity: 0; transform: translate3d(var(--sx), var(--sy), var(--z,12px)) scale(0.5) rotate(0deg); }
  37.5%{ opacity: 0; transform: translate3d(var(--sx), var(--sy), var(--z,12px)) scale(0.5); }
  44%  { opacity: 0.95; transform: translate3d(var(--tx), var(--ty), var(--z,12px)) scale(1); }
  95%  { opacity: 1; transform: translate3d(var(--tx), var(--ty), var(--z,12px)) scale(1.02); }
  100% { opacity: 0; transform: translate3d(var(--sx), var(--sy), var(--z,12px)) scale(0.55) rotate(0deg); }
}

@keyframes bot3DDrift{
  0%, 37.5%{
    transform: perspective(900px) rotateX(0deg) rotateY(0deg) translateZ(0);
  }
  52%{
    transform: perspective(900px) rotateX(16deg) rotateY(-22deg) translateZ(10px);
  }
  74%{
    transform: perspective(900px) rotateX(12deg) rotateY(24deg) translateZ(14px);
  }
  95%{
    transform: perspective(900px) rotateX(14deg) rotateY(-12deg) translateZ(12px);
  }
  100%{
    transform: perspective(900px) rotateX(0deg) rotateY(0deg) translateZ(0);
  }
}

@keyframes microFloat{
  0%,100%{ opacity: 0.2; transform: translate3d(var(--mx, 12px), calc(var(--my, 12px) + 2px), 8px) scale(0.9); }
  50%{ opacity: 0.65; transform: translate3d(var(--mx, 12px), calc(var(--my, 12px) - 2px), 8px) scale(1.08); }
}

/* ─── Hire Bot Modal ────────────────────────── */
.hire-bot-overlay{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.86);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.hire-bot-overlay.open{
  opacity: 1;
  pointer-events: all;
}
.hire-bot-modal{
  width: 94vw;
  max-width: 1100px;
  height: min(86vh, 720px);
  background: #0f0f18;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.10);
  transform: scale(0.96);
  transition: transform 0.25s ease;
  display: flex;
  flex-direction: column;
}
.hire-bot-overlay.open .hire-bot-modal{
  transform: scale(1);
}
.hire-bot-header{
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: #1a1a2e;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.hire-bot-title{
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  color: #ddd;
  font-size: 0.95rem;
}
.hire-bot-dot{
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 6px rgba(34,197,94,0.12);
}
.hire-bot-close{
  background: none;
  border: none;
  color: #aaa;
  font-size: 1.2rem;
  cursor: pointer;
  line-height: 1;
  transition: color 0.2s;
}
.hire-bot-close:hover{ color: #fff; }
.hire-bot-body{
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 0;
  overflow: hidden;
}
.hire-bot-faq,
.hire-bot-form{
  padding: 16px 16px 18px;
  overflow: auto;
}
.hire-bot-faq{
  border-right: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.02);
}
.hire-bot-subtitle{
  margin: 0 0 12px;
  font-size: 0.95rem;
  color: #e6e6e6;
  opacity: 0.95;
}
.hire-faq-item{
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.03);
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 10px;
}
.hire-faq-item summary{
  cursor: pointer;
  font-weight: 650;
  color: #ddd;
}
.hire-faq-item p{
  margin: 10px 0 0;
  color: var(--text2);
  line-height: 1.6;
}
.hire-form-grid{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.hire-field{
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.9rem;
  color: var(--text2);
}
.hire-field input,
.hire-field textarea{
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px;
  padding: 10px 12px;
  color: #eee;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.hire-field input:focus,
.hire-field textarea:focus{
  border-color: rgba(124,58,237,0.65);
  box-shadow: 0 0 0 4px rgba(124,58,237,0.18);
}
.hire-field--full{
  margin-top: 12px;
}
.hire-preview{
  margin-top: 14px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.03);
  border-radius: 14px;
  overflow: hidden;
}
.hire-preview-top{
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  background: rgba(0,0,0,0.12);
}
.hire-preview-title{
  font-size: 0.9rem;
  font-weight: 700;
  color: #ddd;
}
.hire-mini-btn{
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.06);
  color: #ddd;
  border-radius: 10px;
  padding: 6px 10px;
  font-weight: 650;
  cursor: pointer;
  transition: all var(--transition);
}
.hire-mini-btn:hover{
  background: rgba(255,255,255,0.12);
  transform: translateY(-1px);
}
#hireGenerated{
  width: 100%;
  border: none;
  padding: 12px 12px 14px;
  background: transparent;
  color: #eee;
  resize: none;
}
.hire-bot-actions{
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 14px;
}
.hire-bot-note{
  margin: 12px 0 0;
  font-size: 0.88rem;
  color: var(--text3);
  line-height: 1.55;
}
@media (max-width: 900px){
  .hire-visual{ display: none; }
  .hire-bot-body{
    grid-template-columns: 1fr;
  }
  .hire-bot-faq{
    border-right: none;
    border-bottom: 1px solid rgba(255,255,255,0.08);
  }
  .hire-form-grid{
    grid-template-columns: 1fr;
  }
}

/* ─── Footer ─────────────────────────────────── */
footer {
  text-align: center;
  padding: 30px;
  border-top: 1px solid var(--border);
  font-size: 0.82rem;
  color: var(--text3);
  font-family: var(--font-mono);
}

/* ─── Reveal Animations ──────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(30px) scale(0.98);
  filter: blur(6px);
  transition: opacity 0.75s ease, transform 0.75s ease, filter 0.75s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0);
}
.stagger-children .reveal:nth-child(1) { transition-delay: 0.05s; }
.stagger-children .reveal:nth-child(2) { transition-delay: 0.10s; }
.stagger-children .reveal:nth-child(3) { transition-delay: 0.15s; }
.stagger-children .reveal:nth-child(4) { transition-delay: 0.20s; }
.stagger-children .reveal:nth-child(5) { transition-delay: 0.25s; }
.stagger-children .reveal:nth-child(6) { transition-delay: 0.30s; }
.stagger-children .reveal:nth-child(7) { transition-delay: 0.35s; }
.stagger-children .reveal:nth-child(8) { transition-delay: 0.40s; }
.stagger-children .reveal:nth-child(9) { transition-delay: 0.45s; }
.stagger-children .reveal:nth-child(10) { transition-delay: 0.50s; }
.stagger-children .reveal:nth-child(11) { transition-delay: 0.55s; }
.stagger-children .reveal:nth-child(12) { transition-delay: 0.60s; }

/* ─── Tilt Card ──────────────────────────────── */
.tilt-card { transform-style: preserve-3d; }

/* ─── Beta Modal ─────────────────────────────── */
.beta-modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity var(--transition);
  padding: 20px;
}
.beta-modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.beta-modal {
  background: var(--surface2);
  border: 1px solid rgba(245,158,11,0.3);
  border-radius: 24px;
  padding: 40px;
  max-width: 480px;
  width: 100%;
  text-align: center;
  position: relative;
  box-shadow: 0 24px 60px rgba(0,0,0,0.5), 0 0 40px rgba(245,158,11,0.1);
  transform: translateY(20px) scale(0.97);
  transition: transform var(--transition);
}
.beta-modal-overlay.open .beta-modal {
  transform: translateY(0) scale(1);
}

.beta-modal-close {
  position: absolute; top: 16px; right: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text2);
  width: 32px; height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 0.85rem;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
}
.beta-modal-close:hover { background: rgba(255,0,0,0.2); color: white; }

.beta-modal-icon { font-size: 3rem; margin-bottom: 16px; }
.beta-modal-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 12px;
}
.beta-modal-desc {
  font-size: 0.9rem;
  color: var(--text2);
  line-height: 1.6;
  margin-bottom: 20px;
}
.beta-modal-status {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(245,158,11,0.1);
  border: 1px solid rgba(245,158,11,0.3);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.8rem;
  color: var(--beta);
  margin-bottom: 24px;
}
.beta-status-dot {
  width: 8px; height: 8px;
  background: var(--beta);
  border-radius: 50%;
  animation: betaStatusPulse 1.5s ease-in-out infinite;
}
@keyframes betaStatusPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}

.beta-modal-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-bottom: 20px; }

.beta-modal-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 24px;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  font-family: var(--font-main);
  border: none;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: white;
  text-decoration: none;
}
.beta-modal-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(124,58,237,0.4); }
.beta-modal-btn--secondary {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text2);
}
.beta-modal-btn--secondary:hover { box-shadow: none; background: var(--surface2); }

.beta-modal-note { font-size: 0.75rem; color: var(--text3); font-family: var(--font-mono); }

/* ─── Responsive ─────────────────────────────── */
@media (max-width: 1024px) {
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
}

@media (max-width: 768px) {
  :root { --nav-h: 60px; }

  .nav-links { display: none; }
  .hamburger { display: flex; }

  section { padding: 80px 5% 60px; }

  /* Hero — mobile: stack vertically, photo centered */
  .hero-content {
    flex-direction: column;
    gap: 32px;
    text-align: center;
  }
  .hero-text { text-align: center; }
  .hero-portfolio-ribbon {
    justify-content: center;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
  }
  .hero-cta { justify-content: center; }
  .hero-photo-container { width: 180px; height: 180px; }

  .hero-name { font-size: clamp(2rem, 10vw, 3.5rem); }

  .projects-grid { grid-template-columns: 1fr; }
  .stack-grid { grid-template-columns: repeat(3, 1fr); }
  .about-stats { grid-template-columns: 1fr 1fr; }

  .beta-modal { padding: 28px 20px; }
  .beta-modal-actions { flex-direction: column; }
  .beta-modal-btn { width: 100%; justify-content: center; }
}

@media (max-width: 480px) {
  .stack-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-cta { flex-direction: column; width: 100%; }
  .btn { width: 100%; justify-content: center; }
  .hero-photo-container { width: 150px; height: 150px; }
}

/* ─── Project Preview Image ─────────────────── */
.project-preview-img {
  position: relative;
  width: 100%;
  height: 270px;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 14px;
  cursor: pointer;
}
.project-preview-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
  display: block;
}
.project-preview-img iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
  display: block;
  pointer-events: none;
  transition: transform 0.4s ease;
  /* Preview терезеде сайттың "негізгі" бөлігін көбірек көрсету */
  transform: translate3d(calc(var(--mx, 0) * 8px), calc((var(--my, 0) * 5px) - 18px), 0) scale(1.08);
  transform-origin: top center;
}
.project-preview-img:hover img {
  transform: scale(1.05);
}
.project-preview-img:hover iframe {
  transform: translate3d(calc(var(--mx, 0) * 10px), calc((var(--my, 0) * 6px) - 22px), 0) scale(1.1);
}
.preview-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.project-preview-img:hover .preview-overlay {
  opacity: 1;
}
.preview-overlay span {
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  background: rgba(255,255,255,0.15);
  padding: 6px 16px;
  border-radius: 20px;
  backdrop-filter: blur(4px);
}

/* ─── Project Button Row ────────────────────── */
.project-btn-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.project-demo-btn--github {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  color: #ccc;
}
.project-demo-btn--github:hover {
  background: rgba(255,255,255,0.15);
  color: #fff;
}

/* ─── IHSAN CAFE Modal ──────────────────────── */
.cafe-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.cafe-modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}
.cafe-modal {
  width: 92vw;
  max-width: 1100px;
  height: 88vh;
  background: #0f0f18;
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(255,255,255,0.1);
  transform: scale(0.95);
  transition: transform 0.3s ease;
}
.cafe-modal-overlay.open .cafe-modal {
  transform: scale(1);
}
.cafe-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  background: #1a1a2e;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  font-size: 0.9rem;
  color: #ccc;
  font-weight: 600;
}
.cafe-modal-close {
  background: none;
  border: none;
  color: #aaa;
  font-size: 1.2rem;
  cursor: pointer;
  line-height: 1;
  transition: color 0.2s;
}
.cafe-modal-close:hover { color: #fff; }
.cafe-modal-iframe {
  flex: 1;
  width: 100%;
  border: none;
}