/* =============================================
   AHMED ZERABIB — ULTRA PREMIUM PORTFOLIO CSS
   ============================================= */

/* ─── VARIABLES ─────────────────────────────── */
:root {
  --bg: #050508;
  --bg2: #07070f;
  --bg3: #0d0d1a;
  --surface: rgba(255, 255, 255, 0.03);
  --surface2: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.07);
  --border2: rgba(6, 182, 212, 0.3);

  --violet: #06b6d4;
  --violet-dim: #0891b2;
  --violet-bright: #22d3ee;
  --cyan: #06b6d4;
  --cyan-dim: #0891b2;
  --pink: #ec4899;
  --green: #10b981;
  --amber: #f59e0b;

  --grad-violet: linear-gradient(135deg, #06b6d4, #0891b2);
  --grad-cyan: linear-gradient(135deg, #06b6d4, #0891b2);
  --grad-hero: linear-gradient(135deg, #06b6d4 0%, #0891b2 50%, #ec4899 100%);
  --grad-text: linear-gradient(135deg, #22d3ee, #0891b2);

  --text: #f1f0ff;
  --text2: #a09ab8;
  --text3: #6b6585;

  --font-display: "Syne", sans-serif;
  --font-body: "Cabinet Grotesk", sans-serif;
  --font-mono: "DM Mono", monospace;

  --r-sm: 6px;
  --r-md: 12px;
  --r-lg: 20px;
  --r-xl: 32px;

  --shadow-violet: 0 0 60px rgba(6, 182, 212, 0.25);
  --shadow-cyan: 0 0 60px rgba(6, 182, 212, 0.2);
  --shadow-card: 0 8px 40px rgba(0, 0, 0, 0.6);
  --shadow-deep: 0 24px 80px rgba(0, 0, 0, 0.7);

  --transition: cubic-bezier(0.4, 0, 0.2, 1);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ─── LIGHT MODE ────────────────────────────── */
[data-theme="light"] {
  --bg: #f5f5f7;
  --bg2: #eeeef1;
  --bg3: #e4e4e9;
  --surface: rgba(0, 0, 0, 0.03);
  --surface2: rgba(0, 0, 0, 0.06);
  --border: rgba(0, 0, 0, 0.08);
  --border2: rgba(6, 182, 212, 0.35);

  --violet: #0891b2;
  --violet-dim: #0e7490;
  --violet-bright: #06b6d4;
  --cyan: #0891b2;
  --cyan-dim: #0e7490;

  --grad-violet: linear-gradient(135deg, #06b6d4, #0891b2);
  --grad-cyan: linear-gradient(135deg, #06b6d4, #0891b2);
  --grad-hero: linear-gradient(135deg, #06b6d4 0%, #0891b2 50%, #ec4899 100%);
  --grad-text: linear-gradient(135deg, #0891b2, #0e7490);

  --text: #1a1a2e;
  --text2: #4a4a6a;
  --text3: #7a7a9a;

  --shadow-violet: 0 0 60px rgba(6, 182, 212, 0.15);
  --shadow-cyan: 0 0 60px rgba(6, 182, 212, 0.12);
  --shadow-card: 0 8px 40px rgba(0, 0, 0, 0.08);
  --shadow-deep: 0 24px 80px rgba(0, 0, 0, 0.1);
}

/* Light mode — aurora / grain toned down */
[data-theme="light"] body::before {
  background:
    radial-gradient(ellipse 100% 80% at 20% -10%, rgba(6, 182, 212, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse 80% 60% at 80% 110%, rgba(6, 182, 212, 0.04) 0%, transparent 50%),
    radial-gradient(ellipse 60% 60% at 50% 50%, rgba(236, 72, 153, 0.02) 0%, transparent 60%);
  animation: none;
}

[data-theme="light"] body::after {
  opacity: 0.012;
}

/* Navbar */
[data-theme="light"] .navbar.scrolled::before {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(24px) saturate(1.2);
  border-bottom-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04), 0 4px 20px rgba(0, 0, 0, 0.06);
}

/* Mobile menu */
[data-theme="light"] .mob-backdrop {
  background: rgba(0, 0, 0, 0.2);
}
[data-theme="light"] .mob-inner {
  background: var(--bg2);
  border-left-color: rgba(0, 0, 0, 0.08);
}

/* Hamburger */
[data-theme="light"] .hamburger span {
  background: var(--text);
}

/* Hero canvas — reduce opacity */
[data-theme="light"] #heroCanvas {
  opacity: 0.35;
}

/* Hero glows */
[data-theme="light"] .hero-glow {
  opacity: 0.3;
}


/* About code block */
[data-theme="light"] .about-card-inner {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
}
[data-theme="light"] .code-dots {
  background: rgba(0, 0, 0, 0.03);
  border-bottom-color: rgba(0, 0, 0, 0.06);
}
[data-theme="light"] .code-text {
  color: #1a1a2e;
}
[data-theme="light"] .c-purple { color: #7c3aed; }
[data-theme="light"] .c-blue { color: #0891b2; }
[data-theme="light"] .c-green { color: #059669; }
[data-theme="light"] .c-orange { color: #c2410c; }

/* Floating badges */
[data-theme="light"] .floating-badge {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(6, 182, 212, 0.2);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08), 0 0 12px rgba(6, 182, 212, 0.06);
}

/* Timeline cards */
[data-theme="light"] .timeline-card {
  background: rgba(255, 255, 255, 0.7);
  border-color: rgba(0, 0, 0, 0.06);
}
[data-theme="light"] .timeline-card:hover {
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08), 0 0 20px rgba(6, 182, 212, 0.06);
}
[data-theme="light"] .timeline-card.active {
  background: rgba(6, 182, 212, 0.05);
  border-color: rgba(6, 182, 212, 0.2);
}

/* Skill cards */
[data-theme="light"] .skill-card {
  background: rgba(255, 255, 255, 0.7);
  border-color: rgba(0, 0, 0, 0.06);
}
[data-theme="light"] .skill-card:hover {
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08), 0 0 40px rgba(6, 182, 212, 0.06);
}

/* Skill bar */
[data-theme="light"] .skill-bar {
  background: rgba(0, 0, 0, 0.06);
}

/* Project cards */
[data-theme="light"] .project-card {
  background: rgba(255, 255, 255, 0.7);
  border-color: rgba(0, 0, 0, 0.06);
}
[data-theme="light"] .project-card:hover {
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.1), 0 0 40px rgba(6, 182, 212, 0.06);
}
[data-theme="light"] .project-overlay {
  background: rgba(255, 255, 255, 0.85);
}

/* Testimonial cards */
[data-theme="light"] .testi-card {
  background: rgba(255, 255, 255, 0.7);
  border-color: rgba(0, 0, 0, 0.06);
}
[data-theme="light"] .testi-card:hover {
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08), 0 0 40px rgba(6, 182, 212, 0.06);
}

/* Contact form inputs */
[data-theme="light"] .form-group input,
[data-theme="light"] .form-group textarea {
  background: rgba(255, 255, 255, 0.8);
  border-color: rgba(0, 0, 0, 0.1);
  color: var(--text);
}
[data-theme="light"] .form-group input:focus,
[data-theme="light"] .form-group textarea:focus {
  background: #fff;
  border-color: rgba(6, 182, 212, 0.4);
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.08), 0 4px 16px rgba(6, 182, 212, 0.06);
}

/* Contact info items */
[data-theme="light"] .contact-icon {
  background: rgba(6, 182, 212, 0.08);
  border-color: rgba(6, 182, 212, 0.15);
}

/* Social buttons */
[data-theme="light"] .social-btn {
  background: rgba(255, 255, 255, 0.8);
  border-color: rgba(0, 0, 0, 0.08);
}

/* Footer */
[data-theme="light"] .footer {
  border-top-color: rgba(0, 0, 0, 0.06);
}
[data-theme="light"] .back-to-top {
  background: rgba(255, 255, 255, 0.8);
  border-color: rgba(0, 0, 0, 0.08);
}

/* Scroll progress */
[data-theme="light"] .scroll-progress {
  box-shadow: 0 0 6px rgba(6, 182, 212, 0.5);
}

/* Lang switcher */
[data-theme="light"] .lang-btn {
  border-color: rgba(0, 0, 0, 0.1);
  color: var(--text2);
}
[data-theme="light"] .lang-btn:hover {
  background: rgba(6, 182, 212, 0.06);
}

/* Tags */
[data-theme="light"] .tag {
  background: rgba(6, 182, 212, 0.06);
  border-color: rgba(6, 182, 212, 0.15);
}

/* Hero image frame */
[data-theme="light"] .hero-image-bg {
  opacity: 0.15;
}

/* Section highlight text stays vivid */
[data-theme="light"] .highlight {
  background: var(--grad-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Theme toggle button */
.theme-toggle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s var(--transition);
  position: relative;
  flex-shrink: 0;
}

.theme-toggle:hover {
  border-color: var(--border2);
  color: var(--text);
  background: var(--surface2);
  box-shadow: 0 0 20px rgba(6, 182, 212, 0.15);
}

.theme-toggle svg {
  width: 18px;
  height: 18px;
  transition: transform 0.4s var(--spring);
}

.theme-toggle:hover svg {
  transform: rotate(30deg);
}

.theme-toggle .icon-sun,
.theme-toggle .icon-moon {
  position: absolute;
  transition: opacity 0.3s, transform 0.4s var(--spring);
}

.theme-toggle .icon-sun {
  opacity: 0;
  transform: rotate(-90deg) scale(0);
}
.theme-toggle .icon-moon {
  opacity: 1;
  transform: rotate(0) scale(1);
}

[data-theme="light"] .theme-toggle .icon-sun {
  opacity: 1;
  transform: rotate(0) scale(1);
}
[data-theme="light"] .theme-toggle .icon-moon {
  opacity: 0;
  transform: rotate(90deg) scale(0);
}

/* ─── PRELOADER ─────────────────────────────── */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: #030306;
  overflow: hidden;
}
#preloaderCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.preloader-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.preloader-logo {
  font-family: var(--font-display);
  font-size: clamp(64px, 12vw, 100px);
  font-weight: 800;
  letter-spacing: -0.04em;
  display: flex;
  overflow: hidden;
}
.pl-letter {
  display: inline-block;
  color: var(--text);
  opacity: 0;
  transform: translateY(100%) rotateX(-90deg);
  animation: letterReveal 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.pl-letter:nth-child(1) { animation-delay: 0.3s; }
.pl-letter:nth-child(2) { animation-delay: 0.45s; }
.pl-letter.pl-dot {
  color: var(--violet);
  animation-delay: 0.6s;
  text-shadow: 0 0 30px rgba(6, 182, 212, 0.8), 0 0 60px rgba(6, 182, 212, 0.4);
}
@keyframes letterReveal {
  0% { opacity: 0; transform: translateY(100%) rotateX(-90deg); }
  100% { opacity: 1; transform: translateY(0) rotateX(0); }
}

.preloader-logo::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--grad-hero);
  transform: scaleX(0);
  transform-origin: left;
  animation: lineGrow 1s 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  box-shadow: 0 0 20px rgba(6, 182, 212, 0.6);
}
@keyframes lineGrow {
  to { transform: scaleX(1); }
}

.preloader-tagline {
  font-family: var(--font-mono);
  font-size: clamp(11px, 2vw, 14px);
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--violet);
  margin-top: 20px;
  height: 20px;
  opacity: 0;
  animation: fadeUp 0.5s 1.1s ease forwards;
}

.preloader-counter {
  margin-top: 48px;
  font-family: var(--font-display);
  font-size: clamp(14px, 3vw, 18px);
  font-weight: 700;
  color: rgba(255, 255, 255, 0.15);
  letter-spacing: 0.08em;
  opacity: 0;
  animation: fadeUp 0.4s 0.6s ease forwards;
}
.counter-num {
  color: var(--text);
  font-size: clamp(18px, 4vw, 24px);
  background: var(--grad-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.counter-pct {
  color: var(--text3);
}

.preloader-line {
  width: clamp(120px, 30vw, 200px);
  height: 1px;
  background: rgba(255, 255, 255, 0.06);
  margin-top: 16px;
  border-radius: 1px;
  overflow: hidden;
  opacity: 0;
  animation: fadeUp 0.4s 0.6s ease forwards;
}
.preloader-line-fill {
  height: 100%;
  width: 0%;
  background: var(--grad-hero);
  border-radius: 1px;
  box-shadow: 0 0 12px rgba(6, 182, 212, 0.7);
  transition: width 0.1s linear;
}

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

/* Exit */
.preloader-panel {
  display: none;
}
.preloader.exit .preloader-content {
  animation: contentFadeOut 0.6s ease forwards;
}
@keyframes contentFadeOut {
  to { opacity: 0; transform: scale(0.9); }
}
.preloader.exit {
  background: transparent;
  transition: background 0.8s ease;
}
.preloader.done {
  pointer-events: none;
  visibility: hidden;
}

/* ─── AMBIENT LIGHTNING ─────────────────────── */
#ambientLightning {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}
[data-theme="light"] #ambientLightning {
  opacity: 0.4;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  overflow-x: hidden;
  cursor: none;
  transition: background-color 0.4s ease, color 0.4s ease;
}
html,
body {
  overflow-x: hidden;
  max-width: 100%;
}
/* ─── AURORA MESH BACKGROUND ─────────────────── */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(
      ellipse 100% 80% at 20% -10%,
      rgba(6, 182, 212, 0.12) 0%,
      transparent 50%
    ),
    radial-gradient(
      ellipse 80% 60% at 80% 110%,
      rgba(6, 182, 212, 0.08) 0%,
      transparent 50%
    ),
    radial-gradient(
      ellipse 60% 60% at 50% 50%,
      rgba(236, 72, 153, 0.04) 0%,
      transparent 60%
    );
  pointer-events: none;
  z-index: 0;
  animation: auroraDrift 40s ease-in-out infinite alternate;
}

@keyframes auroraDrift {
  0% {
    background:
      radial-gradient(
        ellipse 100% 80% at 20% -10%,
        rgba(6, 182, 212, 0.12) 0%,
        transparent 50%
      ),
      radial-gradient(
        ellipse 80% 60% at 80% 110%,
        rgba(6, 182, 212, 0.08) 0%,
        transparent 50%
      ),
      radial-gradient(
        ellipse 60% 60% at 50% 50%,
        rgba(236, 72, 153, 0.04) 0%,
        transparent 60%
      );
  }
  33% {
    background:
      radial-gradient(
        ellipse 100% 80% at 80% 0%,
        rgba(6, 182, 212, 0.1) 0%,
        transparent 50%
      ),
      radial-gradient(
        ellipse 80% 60% at 10% 80%,
        rgba(6, 182, 212, 0.1) 0%,
        transparent 50%
      ),
      radial-gradient(
        ellipse 60% 60% at 60% 30%,
        rgba(236, 72, 153, 0.05) 0%,
        transparent 60%
      );
  }
  66% {
    background:
      radial-gradient(
        ellipse 100% 80% at 40% 110%,
        rgba(6, 182, 212, 0.08) 0%,
        transparent 50%
      ),
      radial-gradient(
        ellipse 80% 60% at 70% -10%,
        rgba(6, 182, 212, 0.12) 0%,
        transparent 50%
      ),
      radial-gradient(
        ellipse 60% 60% at 20% 60%,
        rgba(236, 72, 153, 0.06) 0%,
        transparent 60%
      );
  }
  100% {
    background:
      radial-gradient(
        ellipse 100% 80% at 60% 20%,
        rgba(6, 182, 212, 0.14) 0%,
        transparent 50%
      ),
      radial-gradient(
        ellipse 80% 60% at 30% 90%,
        rgba(6, 182, 212, 0.07) 0%,
        transparent 50%
      ),
      radial-gradient(
        ellipse 60% 60% at 80% 40%,
        rgba(236, 72, 153, 0.05) 0%,
        transparent 60%
      );
  }
}

/* ─── GRAIN OVERLAY ──────────────────────────── */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='1'/%3E%3C/svg%3E");
  opacity: 0.025;
  pointer-events: none;
  z-index: 1;
}

a {
  text-decoration: none;
  color: inherit;
}
ul {
  list-style: none;
}
img {
  display: block;
  max-width: 100%;
}

::-webkit-scrollbar {
  width: 4px;
}
::-webkit-scrollbar-track {
  background: var(--bg);
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(to bottom, var(--violet), var(--cyan));
  border-radius: 4px;
}

::selection {
  background: rgba(6, 182, 212, 0.4);
  color: #fff;
}

/* ─── CURSOR TRAIL CANVAS ───────────────────── */
#cursorCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
}

/* ─── HIDE CUSTOM CURSOR ON MOBILE / TOUCH ──── */
@media (max-width: 768px), (pointer: coarse) {
  body,
  body * {
    cursor: auto !important;
  }
  #cursorCanvas {
    display: none !important;
  }
}

/* ─── SCROLL PROGRESS ────────────────────────── */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0%;
  background: var(--grad-hero);
  z-index: 9998;
  box-shadow:
    0 0 8px rgba(6, 182, 212, 1),
    0 0 20px rgba(6, 182, 212, 0.6);
  transition: width 0.08s linear;
}

/* ─── CONTAINER ──────────────────────────────── */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(20px, 5vw, 60px);
}

/* ─── SECTION BASE ───────────────────────────── */
.section {
  padding: clamp(80px, 10vw, 140px) 0;
  position: relative;
  z-index: 2;
}

.section-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--violet);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-label::before {
  content: "";
  display: block;
  width: 36px;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--violet));
  box-shadow: 0 0 8px var(--violet);
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(32px, 4vw, 56px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 24px;
}

.section-title.centered {
  text-align: center;
}
.section-label.centered {
  justify-content: center;
}
.section-label.centered::before {
  display: none;
}

.section-sub {
  text-align: center;
  color: var(--text2);
  margin-bottom: 60px;
  font-size: 16px;
}

.highlight {
  background: var(--grad-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
}

/* ─── REVEAL ANIMATIONS ──────────────────────── */
.reveal-up,
.reveal-right {
  opacity: 0;
  transition:
    opacity 0.6s var(--transition),
    transform 0.6s var(--transition);
}

.reveal-up {
  transform: translateY(30px);
}
.reveal-right {
  transform: translateX(40px);
}

.reveal-up.visible,
.reveal-right.visible {
  opacity: 1;
  transform: translate(0, 0);
}

/* ─── BUTTONS ────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 30px;
  border-radius: 100px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 700;
  cursor: none;
  transition: all 0.35s var(--transition);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
  letter-spacing: 0.01em;
}

.btn svg {
  width: 16px;
  height: 16px;
  transition: transform 0.35s var(--spring);
}

.btn-primary {
  background: linear-gradient(135deg, #9d70ff, #0891b2 50%, #7c3aed);
  background-size: 200% 200%;
  color: #fff;
  box-shadow:
    0 4px 20px rgba(6, 182, 212, 0.5),
    0 0 60px rgba(6, 182, 212, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
  animation: btnGradientShift 4s ease infinite;
}

@keyframes btnGradientShift {
  0%,
  100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

.btn-primary::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

.btn-primary:hover::before {
  opacity: 1;
}
.btn-primary:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow:
    0 12px 40px rgba(6, 182, 212, 0.65),
    0 0 80px rgba(6, 182, 212, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}
.btn-primary:hover svg {
  transform: translateX(5px);
}

/* Shimmer sweep */
.btn-primary::after {
  content: "";
  position: absolute;
  top: 0;
  left: -120%;
  width: 60%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.22),
    transparent
  );
  skew: -15deg;
  transition: left 0.7s var(--transition);
}
.btn-primary:hover::after {
  left: 160%;
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(6, 182, 212, 0.35);
  backdrop-filter: blur(10px);
  box-shadow: inset 0 0 20px rgba(6, 182, 212, 0.03);
}

.btn-outline:hover {
  background: rgba(6, 182, 212, 0.12);
  border-color: var(--violet);
  transform: translateY(-3px);
  box-shadow:
    0 8px 30px rgba(6, 182, 212, 0.25),
    inset 0 0 20px rgba(6, 182, 212, 0.05);
}

.btn:active {
  transform: translateY(0) scale(0.97);
  transition-duration: 0.1s;
}

.btn-full {
  width: 100%;
  justify-content: center;
}

/* ─── CV DROPDOWN ───────────────────────────── */
.cv-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.cv-overlay.open {
  opacity: 1;
  visibility: visible;
  cursor: default;
}
.cv-overlay.open ~ #cursorCanvas {
  display: none;
}
.cv-overlay * {
  cursor: default;
}
.cv-overlay a,
.cv-overlay button {
  cursor: pointer;
}
.cv-popup {
  position: relative;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
  min-width: 280px;
  max-width: 340px;
  width: 90vw;
  transform: scale(0.9) translateY(20px);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5), 0 0 32px rgba(6, 182, 212, 0.1);
}
.cv-overlay.open .cv-popup {
  transform: scale(1) translateY(0);
}
.cv-popup-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  color: var(--text3);
  font-size: 24px;
  cursor: pointer;
  line-height: 1;
  transition: color 0.2s;
}
.cv-popup-close:hover {
  color: var(--text);
}
.cv-popup-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 4px;
}
.cv-popup-sub {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text3);
  margin: 0 0 24px;
}
.cv-popup-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.cv-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--text2);
  text-decoration: none;
  border: 1px solid var(--border);
  transition: all 0.2s ease;
}
.cv-option:hover {
  background: rgba(6, 182, 212, 0.1);
  border-color: rgba(6, 182, 212, 0.3);
  color: var(--text);
  transform: translateY(-1px);
}
.cv-option:active {
  transform: scale(0.98);
}
.cv-flag {
  width: 24px;
  height: 16px;
  object-fit: cover;
  border-radius: 2px;
  flex-shrink: 0;
}

[data-theme="light"] .cv-popup {
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.12), 0 0 32px rgba(6, 182, 212, 0.06);
}

/* ─── NAVBAR ─────────────────────────────────── */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%; /* ← ADD THIS */
  max-width: 100vw; /* ← ADD THIS */
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px clamp(20px, 5vw, 60px);
  transition: all 0.5s var(--transition);
}
.navbar::before {
  content: "";
  position: absolute;
  inset: 0;
  background: transparent;
  backdrop-filter: blur(0px);
  border-bottom: 1px solid transparent;
  transition: all 0.5s var(--transition);
  z-index: -1;
}

.navbar.scrolled::before {
  background: rgba(5, 5, 8, 0.88);
  backdrop-filter: blur(24px) saturate(1.8);
  border-bottom-color: rgba(6, 182, 212, 0.1);
  box-shadow:
    0 1px 0 rgba(6, 182, 212, 0.05),
    0 8px 32px rgba(0, 0, 0, 0.4);
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.03em;
  cursor: none;
  position: relative;
}

.nav-logo .dot {
  color: var(--violet);
  display: inline-block;
  animation: dotPulse 3s ease-in-out infinite;
}

@keyframes dotPulse {
  0%,
  100% {
    text-shadow: 0 0 8px var(--violet);
  }
  50% {
    text-shadow:
      0 0 20px var(--violet),
      0 0 40px var(--violet),
      0 0 60px rgba(6, 182, 212, 0.5);
  }
}

.nav-links {
  display: flex;
  gap: 2px;
}

.nav-link {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.05em;
  padding: 8px 16px;
  border-radius: 100px;
  color: var(--text2);
  transition: all 0.3s var(--transition);
  position: relative;
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: 5px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: linear-gradient(to right, var(--violet), var(--cyan));
  border-radius: 1px;
  transition: width 0.3s var(--spring);
  box-shadow: 0 0 8px rgba(6, 182, 212, 0.8);
}

.nav-link:hover,
.nav-link.active {
  color: var(--text);
}
.nav-link.active::after {
  width: 22px;
}
.nav-link:hover::after {
  width: 16px;
}

.nav-cta {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  padding: 9px 22px;
  border-radius: 100px;
  background: var(--grad-violet);
  color: #fff;
  box-shadow:
    0 2px 16px rgba(6, 182, 212, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  transition: all 0.3s var(--transition);
  position: relative;
  overflow: hidden;
}
.nav-cta::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}
.nav-cta:hover {
  transform: translateY(-2px);
  box-shadow:
    0 6px 24px rgba(6, 182, 212, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}
.nav-cta:hover::after {
  opacity: 1;
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: transparent;
  border: none;
  cursor: none;
  padding: 4px;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 1.5px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.35s var(--transition);
  transform-origin: center;
}
.hamburger.active span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}
.hamburger.active span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.hamburger.active span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

/* Mobile Menu */
/* ─── MOBILE MENU ────────────────────────────── */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 999;
  visibility: hidden;
  pointer-events: none;
}

.mobile-menu.open {
  visibility: visible;
  pointer-events: all;
  z-index: 1001;
}

/* Blurred dark backdrop */
.mob-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 5, 8, 0.6);
  backdrop-filter: blur(2px);
  opacity: 0;
  transition: opacity 0.5s var(--transition);
}
.mobile-menu.open .mob-backdrop {
  opacity: 1;
}

/* Slide-in panel from right */
.mob-inner {
  position: absolute;
  top: 0;
  right: 0;
  width: min(360px, 88vw);
  height: 100%;
  background: var(--bg2);
  border-left: 1px solid rgba(6, 182, 212, 0.15);
  display: flex;
  flex-direction: column;
  padding: 32px 32px 40px;
  overflow: hidden;
  transform: translateX(100%);
  transition: transform 0.55s cubic-bezier(0.77, 0, 0.18, 1);
  box-shadow: -24px 0 80px rgba(0, 0, 0, 0.6);
}
.mobile-menu.open .mob-inner {
  transform: translateX(0);
}

/* Ambient glows inside panel */
.mob-glow-1 {
  position: absolute;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(6, 182, 212, 0.12) 0%,
    transparent 70%
  );
  top: -80px;
  right: -80px;
  pointer-events: none;
}
.mob-glow-2 {
  position: absolute;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(6, 182, 212, 0.07) 0%,
    transparent 70%
  );
  bottom: 40px;
  left: -60px;
  pointer-events: none;
}

/* Close button */
.mob-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: all 0.3s var(--transition);
  opacity: 0;
  transform: rotate(-90deg) scale(0.5);
}
.mobile-menu.open .mob-close {
  opacity: 1;
  transform: rotate(0) scale(1);
  transition-delay: 0.3s;
}
.mob-close svg {
  width: 18px;
  height: 18px;
}
.mob-close:hover {
  border-color: var(--border2);
  color: var(--text);
  background: var(--surface2);
  transform: rotate(90deg) scale(1.1);
}

/* Header */
.mob-header {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-top: 48px;
  margin-bottom: 48px;
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity 0.4s var(--transition) 0.3s,
    transform 0.4s var(--transition) 0.3s;
}
.mobile-menu.open .mob-header {
  opacity: 1;
  transform: translateY(0);
}
.mob-logo {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
}
.mob-logo .dot {
  color: var(--violet);
  animation: dotPulse 3s ease-in-out infinite;
}
.mob-tagline {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text3);
}

/* Nav list */
.mob-nav {
  flex: 1;
}
.mob-nav ul {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.mob-nav li {
  opacity: 0;
  transform: translateX(28px);
  transition:
    opacity 0.4s var(--transition),
    transform 0.4s var(--transition);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
/* Stagger each nav item when open */
.mobile-menu.open .mob-nav li:nth-child(1) {
  opacity: 1;
  transform: translateX(0);
  transition-delay: 0.25s;
}
.mobile-menu.open .mob-nav li:nth-child(2) {
  opacity: 1;
  transform: translateX(0);
  transition-delay: 0.32s;
}
.mobile-menu.open .mob-nav li:nth-child(3) {
  opacity: 1;
  transform: translateX(0);
  transition-delay: 0.39s;
}
.mobile-menu.open .mob-nav li:nth-child(4) {
  opacity: 1;
  transform: translateX(0);
  transition-delay: 0.46s;
}
.mobile-menu.open .mob-nav li:nth-child(5) {
  opacity: 1;
  transform: translateX(0);
  transition-delay: 0.53s;
}
.mobile-menu.open .mob-nav li:nth-child(6) {
  opacity: 1;
  transform: translateX(0);
  transition-delay: 0.6s;
}

.mob-link {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text2);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 0;
  position: relative;
  transition:
    color 0.3s var(--transition),
    gap 0.3s var(--spring);
  -webkit-text-fill-color: unset;
}
.mob-link::before {
  content: attr(data-num);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.1em;
  color: var(--violet);
  opacity: 0.6;
  min-width: 22px;
  transition: opacity 0.3s;
}
.mob-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 1px;
  background: linear-gradient(to right, var(--violet), var(--cyan));
  transition: width 0.4s var(--spring);
  box-shadow: 0 0 8px rgba(6, 182, 212, 0.6);
}
.mob-link:hover {
  color: var(--text);
  gap: 20px;
  -webkit-text-fill-color: unset;
  transform: none;
  background: none;
  -webkit-background-clip: unset;
  background-clip: unset;
}
.mob-link:hover::before {
  opacity: 1;
}
.mob-link:hover::after {
  width: 100%;
}

/* Footer — CTA + socials */
.mob-footer {
  display: flex;
  flex-direction: column;
  gap: 20px;
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity 0.4s var(--transition) 0.7s,
    transform 0.4s var(--transition) 0.7s;
}
.mobile-menu.open .mob-footer {
  opacity: 1;
  transform: translateY(0);
}
.mob-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 24px;
  border-radius: 100px;
  background: var(--grad-violet);
  color: #fff !important;
  font-family: var(--font-mono) !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  letter-spacing: 0.05em;
  box-shadow: 0 4px 20px rgba(6, 182, 212, 0.4);
  transition:
    transform 0.3s var(--spring),
    box-shadow 0.3s !important;
  -webkit-text-fill-color: #fff !important;
}
.mob-cta::before,
.mob-cta::after {
  display: none;
}
.mob-cta:hover {
  transform: translateY(-3px) !important;
  box-shadow: 0 10px 30px rgba(6, 182, 212, 0.6) !important;
  color: #fff !important;
  gap: 8px !important;
}
.mob-socials {
  display: flex;
  gap: 12px;
}
.mob-social {
  width: 40px;
  height: 40px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text2);
  transition: all 0.3s var(--spring);
}
.mob-social:hover {
  border-color: var(--violet);
  color: #fff;
  background: rgba(6, 182, 212, 0.12);
  transform: translateY(-3px);
}

.mobile-menu.open {
  opacity: 1;
  visibility: visible;
}
.mobile-menu ul {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.mob-link {
  font-family: var(--font-display);
  font-size: clamp(16px, 3vw, 16px);
  font-weight: 800;
  color: var(--text2);
  transition: all 0.3s var(--transition);
  display: block;
  text-align: center;
  letter-spacing: -0.03em;
  padding: 10px;
}

/* ─── HERO ────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: var(--hero-vh, 100vh);
  display: flex;
  align-items: center;
  overflow: hidden;
  z-index: 2;
}

#heroCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.hero-bg-grid {
  display: none;
}

@keyframes gridDrift {
  0% {
    background-position:
      0 0,
      0 0;
  }
  100% {
    background-position:
      60px 60px,
      60px 60px;
  }
}

.hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
  z-index: 0;
  will-change: transform;
}

.glow-1 {
  width: 700px;
  height: 700px;
  background: radial-gradient(
    circle,
    rgba(6, 182, 212, 0.22) 0%,
    rgba(6, 182, 212, 0.05) 40%,
    transparent 70%
  );
  top: -15%;
  left: -10%;
  animation: glowPulse1 8s ease-in-out infinite;
}

.glow-2 {
  width: 500px;
  height: 500px;
  background: radial-gradient(
    circle,
    rgba(6, 182, 212, 0.18) 0%,
    rgba(6, 182, 212, 0.04) 40%,
    transparent 70%
  );
  bottom: 0%;
  right: 0%;
  animation: glowPulse2 10s ease-in-out infinite;
}

@keyframes glowPulse1 {
  0%,
  100% {
    opacity: 0.8;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.1);
  }
}

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

/* Floating orbs */
.hero::before {
  content: "";
  position: absolute;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(236, 72, 153, 0.07) 0%,
    transparent 70%
  );
  top: 60%;
  left: 40%;
  filter: blur(60px);
  pointer-events: none;
  z-index: 0;
  animation: orbFloat 14s ease-in-out infinite;
}

@keyframes orbFloat {
  0%,
  100% {
    transform: translate(0, 0);
  }
  33% {
    transform: translate(40px, -30px);
  }
  66% {
    transform: translate(-20px, 20px);
  }
}

.hero-inner {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 60px;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 100px clamp(20px, 5vw, 60px) 60px;
}

.hero-content {
  flex: 1;
  max-width: 580px;
}

/* Hero Tag */
.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 18px 6px 10px;
  background: rgba(16, 185, 129, 0.07);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: 100px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--green);
  margin-bottom: 28px;
  backdrop-filter: blur(8px);
  box-shadow:
    0 0 20px rgba(16, 185, 129, 0.08),
    inset 0 1px 0 rgba(16, 185, 129, 0.1);
}

.tag-dot {
  width: 7px;
  height: 7px;
  background: var(--green);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--green);
  animation: tagPulse 2s ease-in-out infinite;
}

@keyframes tagPulse {
  0%,
  100% {
    box-shadow: 0 0 6px var(--green);
    transform: scale(1);
  }
  50% {
    box-shadow:
      0 0 16px var(--green),
      0 0 32px rgba(16, 185, 129, 0.5);
    transform: scale(1.4);
  }
}

/* Hero Name */
.hero-name {
  font-family: var(--font-display);
  font-size: clamp(52px, 8.5vw, 88px);
  font-weight: 800;
  line-height: 0.92;
  letter-spacing: -0.045em;
  margin-bottom: 22px;
  display: block;
}

.name-line {
  display: block;
  color: var(--text);
  position: relative;
}

.hero-letter {
  display: inline-block;
  opacity: 0;
  transform: translateY(60px) rotateX(-80deg);
  animation: heroLetterIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: calc(0.6s + var(--i) * 0.06s);
  cursor: pointer;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.3s;
  transform-origin: bottom center;
}

.hero-letter:hover {
  transform: translateY(-8px) scale(1.15) rotate(-5deg);
  color: var(--cyan);
  -webkit-text-fill-color: currentColor;
}

.accent-name .hero-letter:hover {
  -webkit-text-fill-color: transparent;
  filter: brightness(1.4);
}

.hero-letter.clicked {
  animation: letterBounce 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.hero-letter.scatter {
  animation: letterScatter 0.7s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes heroLetterIn {
  0% { opacity: 0; transform: translateY(60px) rotateX(-80deg); }
  60% { opacity: 1; transform: translateY(-6px) rotateX(5deg); }
  100% { opacity: 1; transform: translateY(0) rotateX(0); }
}

@keyframes letterBounce {
  0% { transform: scale(1); }
  20% { transform: scale(0.8) rotate(10deg); }
  50% { transform: scale(1.3) rotate(-8deg) translateY(-15px); }
  70% { transform: scale(0.95) rotate(3deg); }
  100% { transform: scale(1) rotate(0); }
}

@keyframes letterScatter {
  0% { transform: translate(0, 0) rotate(0deg); opacity: 1; }
  30% { transform: translate(var(--sx), var(--sy)) rotate(var(--sr)); opacity: 0.8; }
  60% { transform: translate(calc(var(--sx) * 0.3), calc(var(--sy) * 0.3)) rotate(calc(var(--sr) * 0.3)); opacity: 0.9; }
  100% { transform: translate(0, 0) rotate(0deg); opacity: 1; }
}

.accent-name {
  display: block;
  position: relative;
}
.accent-name .hero-letter {
  background: var(--grad-hero);
  background-size: 300% 300%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: heroLetterIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards, nameGradientFlow 6s ease infinite;
  animation-delay: calc(0.6s + var(--i) * 0.06s), 0s;
}

@keyframes nameGradientFlow {
  0%,
  100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

/* Hero Title */
.hero-title {
  font-family: var(--font-mono);
  font-size: clamp(14px, 2vw, 18px);
  color: var(--text2);
  margin-bottom: 22px;
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: 30px;
}

.title-prefix,
.title-suffix {
  color: var(--cyan);
  opacity: 0.7;
}

#typingText {
  color: var(--cyan);
  font-weight: 500;
  text-shadow: 0 0 20px rgba(6, 182, 212, 0.6);
}

.cursor-blink {
  color: var(--violet);
  animation: blink 1s step-end infinite;
  text-shadow: 0 0 12px var(--violet);
}

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

/* Hero Bio */
.hero-bio {
  font-size: 16px;
  color: var(--text2);
  line-height: 1.8;
  margin-bottom: 38px;
  max-width: 480px;
}

/* Hero Buttons */
.hero-btns {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 52px;
}

/* Hero Stats */
.hero-stats {
  display: flex;
  align-items: center;
  gap: 32px;
}

.stat {
  text-align: center;
}

.stat-num {
  font-family: var(--font-display);
  font-size: 38px;
  font-weight: 800;
  line-height: 1;
  background: var(--grad-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline-block;
  filter: drop-shadow(0 0 12px rgba(6, 182, 212, 0.4));
}

.stat-plus {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--violet);
  vertical-align: super;
}

.stat-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text3);
  margin-top: 5px;
}

.stat-divider {
  width: 1px;
  height: 44px;
  background: linear-gradient(
    to bottom,
    transparent,
    rgba(6, 182, 212, 0.4),
    transparent
  );
}

/* Hero Image */
.hero-image-wrap {
  flex: 0 0 auto;
  width: clamp(280px, 35vw, 420px);
  aspect-ratio: 1;
  position: relative;
  transform-style: preserve-3d;
  will-change: transform;
  transition: transform 0.1s linear;
}

.lightning-canvas {
  position: absolute;
  inset: -80px;
  width: calc(100% + 160px);
  height: calc(100% + 160px);
  z-index: 10;
  pointer-events: none;
}

.hero-image-bg {
  position: absolute;
  inset: -30px;
  background: conic-gradient(
    from 0deg,
    var(--violet),
    var(--cyan),
    var(--pink),
    var(--violet-bright),
    var(--violet)
  );
  border-radius: 50%;
  opacity: 0.15;
  filter: blur(50px);
  animation: rotateBg 10s linear infinite;
}

@keyframes rotateBg {
  to {
    transform: rotate(360deg);
  }
}

.hero-image-frame {
  width: 100%;
  height: 100%;
  border-radius: var(--r-xl);
  background: var(--bg3);
  border: 1px solid rgba(6, 182, 212, 0.25);
  overflow: hidden;
  position: relative;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.04),
    0 0 80px rgba(6, 182, 212, 0.2),
    0 40px 80px rgba(0, 0, 0, 0.6),
    inset 0 0 60px rgba(6, 182, 212, 0.04);
}

/* Animated border on frame */
.hero-image-frame::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: var(--r-xl);
  background: conic-gradient(
    from var(--angle, 0deg),
    var(--violet),
    var(--cyan),
    var(--pink),
    var(--violet)
  );
  z-index: -1;
  opacity: 0;
  transition: opacity 0.5s;
  animation: rotateBorderAngle 4s linear infinite;
}

.hero-image-wrap:hover .hero-image-frame::before {
  opacity: 0.6;
}

@property --angle {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}
@keyframes rotateBorderAngle {
  to {
    --angle: 360deg;
  }
}

.hero-image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(
    145deg,
    rgba(6, 182, 212, 0.06),
    rgba(6, 182, 212, 0.04)
  );
}

.placeholder-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: var(--text3);
  font-family: var(--font-mono);
  font-size: 12px;
  width: 100%;
  height: 100%;
}

.placeholder-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transition: opacity 0.5s ease;
}

.placeholder-icon svg {
  width: 80px;
  height: 80px;
}

/* Frame corners */
.frame-corner {
  position: absolute;
  width: 22px;
  height: 22px;
  border-color: var(--violet);
  border-style: solid;
  opacity: 0.9;
  animation: cornerPulse 3s ease-in-out infinite;
  z-index: 4;
}
.frame-corner.tl {
  top: 12px;
  left: 12px;
  border-width: 2px 0 0 2px;
}
.frame-corner.tr {
  top: 12px;
  right: 12px;
  border-width: 2px 2px 0 0;
}
.frame-corner.bl {
  bottom: 12px;
  left: 12px;
  border-width: 0 0 2px 2px;
}
.frame-corner.br {
  bottom: 12px;
  right: 12px;
  border-width: 0 2px 2px 0;
  animation-delay: 0.5s;
}

@keyframes cornerPulse {
  0%,
  100% {
    opacity: 0.4;
  }
  50% {
    opacity: 1;
    box-shadow:
      0 0 12px var(--violet),
      0 0 24px rgba(6, 182, 212, 0.4);
  }
}

/* Floating badges */
.floating-badge {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 16px;
  background: rgba(5, 5, 8, 0.88);
  border: 1px solid rgba(6, 182, 212, 0.3);
  border-radius: 100px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--text);
  backdrop-filter: blur(20px);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.5),
    0 0 20px rgba(6, 182, 212, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  white-space: nowrap;
  z-index: 3;
  transition: all 0.3s var(--spring);
}

.floating-badge:hover {
  border-color: rgba(6, 182, 212, 0.6);
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.6),
    0 0 30px rgba(6, 182, 212, 0.2);
  transform: scale(1.05) !important;
}

.badge-icon {
  font-size: 15px;
}
.badge-icon-img {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.badge-1 {
  bottom: 15%;
  left: -12%;
  animation: floatBadge 4s ease-in-out infinite;
}
.badge-2 {
  top: 10%;
  right: -10%;
  animation: floatBadge 4s ease-in-out infinite 1.4s;
}
.badge-3 {
  bottom: 30%;
  right: -14%;
  animation: floatBadge 4s ease-in-out infinite 0.7s;
}

@keyframes floatBadge {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text3);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  z-index: 2;
  animation: fadeInUp 1s 1.5s both;
}

.scroll-line {
  width: 1px;
  height: 44px;
  background: linear-gradient(to bottom, transparent, var(--violet));
  animation: scrollLine 2.2s ease-in-out infinite;
  box-shadow: 0 0 8px rgba(6, 182, 212, 0.6);
}

@keyframes scrollLine {
  0% {
    transform: scaleY(0);
    transform-origin: top;
  }
  50% {
    transform: scaleY(1);
    transform-origin: top;
  }
  51% {
    transform-origin: bottom;
  }
  100% {
    transform: scaleY(0);
    transform-origin: bottom;
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

.hero::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    var(--violet) 30%,
    var(--cyan) 70%,
    transparent 100%
  );
  opacity: 0.4;
  box-shadow: 0 0 20px var(--violet);
}

/* ─── ABOUT ───────────────────────────────────── */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 70px;
  align-items: center;
}

.about-text .section-title {
  margin-bottom: 20px;
}

.about-para {
  color: var(--text2);
  margin-bottom: 16px;
  font-size: 15.5px;
  line-height: 1.8;
}

.about-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.tag {
  padding: 6px 18px;
  border-radius: 100px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--text2);
  transition: all 0.35s var(--spring);
  cursor: none;
}

.tag:hover {
  background: rgba(6, 182, 212, 0.12);
  border-color: var(--violet);
  color: var(--violet-bright);
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 6px 20px rgba(6, 182, 212, 0.2);
}

/* Code block */
.about-card {
  perspective: 1400px;
}

.about-card-inner {
  background: rgba(8, 8, 16, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow:
    var(--shadow-deep),
    0 0 0 1px rgba(255, 255, 255, 0.02);
  transition:
    transform 0.7s var(--transition),
    box-shadow 0.7s var(--transition);
  position: relative;
}

/* Glowing border on about card */
.about-card-inner::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--r-lg);
  padding: 1px;
  background: linear-gradient(
    135deg,
    rgba(6, 182, 212, 0.3),
    rgba(6, 182, 212, 0.15),
    transparent
  );
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.5s;
  pointer-events: none;
}

.about-card:hover .about-card-inner {
  transform: rotateY(-7deg) rotateX(4deg);
  box-shadow: var(--shadow-deep), var(--shadow-violet);
}
.about-card:hover .about-card-inner::before {
  opacity: 1;
}

.code-block {
  padding: 0;
}

.code-dots {
  display: flex;
  gap: 7px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.025);
  border-bottom: 1px solid var(--border);
}

.code-dots span {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  display: block;
}
.code-dots span:nth-child(1) {
  background: #ff5f57;
  box-shadow: 0 0 6px rgba(255, 95, 87, 0.6);
}
.code-dots span:nth-child(2) {
  background: #febc2e;
  box-shadow: 0 0 6px rgba(254, 188, 46, 0.6);
}
.code-dots span:nth-child(3) {
  background: #28c840;
  box-shadow: 0 0 6px rgba(40, 200, 64, 0.6);
}

.code-text {
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.9;
  padding: 24px 28px;
  white-space: pre;
  overflow-x: auto;
  color: var(--text2);
}

.c-purple {
  color: #22d3ee;
}
.c-blue {
  color: #60a5fa;
}
.c-green {
  color: #34d399;
}
.c-orange {
  color: #fb923c;
}
.c-cyan {
  color: var(--cyan);
}

/* ─── EXPERIENCE ──────────────────────────────── */
.experience {
  background: var(--bg2);
  overflow: hidden;
}

.experience::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      ellipse 70% 50% at 50% 100%,
      rgba(6, 182, 212, 0.07) 0%,
      transparent 60%
    ),
    radial-gradient(
      ellipse 50% 40% at 0% 50%,
      rgba(6, 182, 212, 0.04) 0%,
      transparent 50%
    );
  pointer-events: none;
}

.timeline-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  margin-top: 60px;
}

.timeline-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 36px;
}
.timeline-header svg {
  width: 22px;
  height: 22px;
  color: var(--violet);
}
.timeline-header h3 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
}

.timeline {
  position: relative;
  padding-left: 24px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, rgba(6, 182, 212, 0.5), transparent);
  box-shadow: 0 0 8px rgba(6, 182, 212, 0.3);
}

.timeline-item {
  position: relative;
  padding-bottom: 32px;
}

.timeline-dot {
  position: absolute;
  left: -28px;
  top: 8px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border);
  border: 2px solid var(--bg2);
  box-shadow: 0 0 0 3px var(--bg2);
}

.timeline-dot.accent {
  background: var(--violet);
  box-shadow:
    0 0 0 3px var(--bg2),
    0 0 16px rgba(6, 182, 212, 0.5);
}

.timeline-dot.pulse {
  animation: dotPulseTimeline 2s ease-in-out infinite;
}

@keyframes dotPulseTimeline {
  0%,
  100% {
    box-shadow:
      0 0 0 3px var(--bg2),
      0 0 16px rgba(6, 182, 212, 0.5);
  }
  50% {
    box-shadow:
      0 0 0 3px var(--bg2),
      0 0 24px rgba(6, 182, 212, 0.9),
      0 0 48px rgba(6, 182, 212, 0.3);
    transform: scale(1.2);
  }
}

.timeline-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 20px 22px;
  transition: all 0.4s var(--transition);
  position: relative;
  overflow: hidden;
}

.timeline-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.06), transparent);
  opacity: 0;
  transition: opacity 0.4s;
}

.timeline-card::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--violet), var(--cyan));
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.4s var(--transition);
  box-shadow: 0 0 8px rgba(6, 182, 212, 0.5);
}

.timeline-card:hover {
  border-color: var(--border2);
  transform: translateX(6px);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.3),
    0 0 20px rgba(6, 182, 212, 0.08);
}
.timeline-card:hover::before {
  opacity: 1;
}
.timeline-card:hover::after {
  transform: scaleY(1);
}

.timeline-card.active {
  border-color: rgba(6, 182, 212, 0.35);
  background: rgba(6, 182, 212, 0.05);
}

.timeline-year {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--violet);
  letter-spacing: 0.12em;
  display: block;
  margin-bottom: 6px;
}

.timeline-card h4 {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 4px;
}

.timeline-company {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--cyan);
  margin-bottom: 8px;
  text-shadow: 0 0 16px rgba(6, 182, 212, 0.3);
}

.timeline-card p {
  font-size: 13px;
  color: var(--text2);
  line-height: 1.65;
}

.active-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: 100px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--green);
  margin-top: 10px;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.1);
}

.active-badge::before {
  content: "";
  width: 5px;
  height: 5px;
  background: var(--green);
  border-radius: 50%;
  animation: tagPulse 2s ease-in-out infinite;
}

/* ─── SKILLS ─────────────────────────────────── */
.skills {
  background: var(--bg);
  position: relative;
  overflow: hidden;
}

.skills::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      ellipse 80% 60% at 50% 50%,
      rgba(6, 182, 212, 0.05) 0%,
      transparent 60%
    ),
    radial-gradient(
      ellipse 40% 40% at 100% 0%,
      rgba(6, 182, 212, 0.05) 0%,
      transparent 50%
    );
  pointer-events: none;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}

.skill-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 26px;
  transition: all 0.45s var(--transition);
  position: relative;
  overflow: hidden;
  cursor: none;
  isolation: isolate;
}

/* Spotlight effect on skill cards */
.skill-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at var(--mx, 50%) var(--my, 50%),
    rgba(6, 182, 212, 0.12) 0%,
    rgba(6, 182, 212, 0.06) 40%,
    transparent 70%
  );
  opacity: 0;
  transition: opacity 0.35s;
}

.skill-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--grad-hero);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.45s var(--transition);
  box-shadow: 0 0 12px rgba(6, 182, 212, 0.7);
}

.skill-card:hover {
  border-color: rgba(6, 182, 212, 0.35);
  transform: translateY(-8px) scale(1.01);
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.5),
    0 0 40px rgba(6, 182, 212, 0.12);
}

.skill-card:hover::before {
  opacity: 1;
}
.skill-card:hover::after {
  transform: scaleX(1);
}

.skill-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 16px;
  transition: transform 0.45s var(--spring);
}

.skill-card:hover .skill-icon {
  transform: scale(1.15) rotate(-6deg);
  filter: drop-shadow(0 0 16px rgba(6, 182, 212, 0.5));
}

.skill-icon img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  filter: drop-shadow(0 0 8px rgba(6, 182, 212, 0.25));
  transition: filter 0.4s;
}
.skill-card:hover .skill-icon img {
  filter: drop-shadow(0 0 20px rgba(6, 182, 212, 0.5));
}

.skill-emoji {
  font-size: 38px;
  line-height: 48px;
}

.skill-card h4 {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 14px;
}

.skill-bar-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.skill-bar {
  flex: 1;
  height: 4px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 2px;
  overflow: hidden;
}

.skill-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--violet), var(--cyan));
  border-radius: 2px;
  transition: width 1.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.7);
  position: relative;
}

.skill-fill::after {
  content: "";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow:
    0 0 10px var(--cyan),
    0 0 20px rgba(6, 182, 212, 0.5);
}

.skill-pct {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text3);
  flex-shrink: 0;
}

/* ─── PROJECTS ────────────────────────────────── */
.projects {
  background: var(--bg2);
  overflow: hidden;
}

.projects::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse 70% 50% at 50% 50%,
    rgba(6, 182, 212, 0.04) 0%,
    transparent 60%
  );
  pointer-events: none;
}

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

.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition:
    border-color 0.45s var(--transition),
    box-shadow 0.45s var(--transition),
    transform 0.1s linear;
  cursor: none;
  transform-style: preserve-3d;
  will-change: transform;
  position: relative;
  isolation: isolate;
}

.project-card.reveal-up {
  opacity: 0;
  transform: translateY(60px) scale(0.95);
  filter: blur(6px);
  transition:
    opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.7s cubic-bezier(0.16, 1, 0.3, 1),
    filter 0.7s cubic-bezier(0.16, 1, 0.3, 1),
    border-color 0.45s var(--transition),
    box-shadow 0.45s var(--transition);
}

.project-card.reveal-up.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0);
}

.project-card .project-img img {
  transition: transform 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.15s, opacity 0.7s ease 0.15s;
}

.project-card.reveal-up:not(.visible) .project-img img {
  transform: scale(1.15);
  opacity: 0;
}

.project-card .project-info {
  transition: opacity 0.5s ease 0.25s, transform 0.5s cubic-bezier(0.16, 1, 0.3, 1) 0.25s;
}

.project-card.reveal-up:not(.visible) .project-info {
  opacity: 0;
  transform: translateY(12px);
}

/* Spotlight radial on project card */
.project-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at var(--gx, 50%) var(--gy, 50%),
    rgba(6, 182, 212, 0.1) 0%,
    rgba(6, 182, 212, 0.05) 40%,
    transparent 65%
  );
  opacity: 0;
  transition: opacity 0.35s;
  pointer-events: none;
  z-index: 1;
}

.project-card:hover {
  border-color: rgba(6, 182, 212, 0.35);
  box-shadow:
    0 24px 80px rgba(0, 0, 0, 0.6),
    0 0 50px rgba(6, 182, 212, 0.12);
}
.project-card:hover::before {
  opacity: 1;
}

.project-img {
  position: relative;
  height: 205px;
  overflow: hidden;
}

.project-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    hsl(var(--ph-hue, 270), 60%, 10%),
    hsl(var(--ph-hue, 270), 50%, 6%)
  );
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text3);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  transition: transform 0.7s var(--transition);
  position: relative;
  overflow: hidden;
}

.project-placeholder::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(6, 182, 212, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(6, 182, 212, 0.06) 1px, transparent 1px);
  background-size: 28px 28px;
}

.project-placeholder::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at 50% 50%,
    rgba(6, 182, 212, 0.06) 0%,
    transparent 60%
  );
  animation: cardGlow 4s ease-in-out infinite;
}

@keyframes cardGlow {
  0%,
  100% {
    opacity: 0.5;
  }
  50% {
    opacity: 1;
  }
}

.project-card:hover .project-placeholder {
  transform: scale(1.07);
}

.project-overlay {
  position: absolute;
  inset: 0;
  background: rgba(5, 5, 8, 0.82);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.35s var(--transition);
  backdrop-filter: blur(6px);
  z-index: 2;
}

.project-card:hover .project-overlay {
  opacity: 1;
}

.project-live-btn {
  padding: 10px 26px;
  background: var(--grad-violet);
  color: #fff;
  border-radius: 100px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  transform: translateY(12px) scale(0.95);
  transition:
    transform 0.35s var(--spring),
    box-shadow 0.35s;
  box-shadow: 0 4px 24px rgba(6, 182, 212, 0.55);
}

.project-card:hover .project-live-btn {
  transform: translateY(0) scale(1);
  box-shadow: 0 8px 40px rgba(6, 182, 212, 0.7);
}

.project-info {
  padding: 22px;
}

.project-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.project-tag {
  padding: 3px 10px;
  background: rgba(6, 182, 212, 0.1);
  border: 1px solid rgba(6, 182, 212, 0.2);
  border-radius: 100px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--violet-bright);
  letter-spacing: 0.05em;
  transition: all 0.3s var(--spring);
}

.project-card:hover .project-tag {
  background: rgba(6, 182, 212, 0.15);
  border-color: rgba(6, 182, 212, 0.35);
}

.project-info h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
  transition: color 0.3s;
}
.project-card:hover .project-info h3 {
  color: var(--violet-bright);
}

.project-info p {
  font-size: 13.5px;
  color: var(--text2);
  line-height: 1.65;
  margin-bottom: 16px;
}

.project-links {
  display: flex;
  gap: 12px;
}

.project-link {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  color: var(--text3);
  transition: all 0.3s var(--transition);
  position: relative;
}

.project-link::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--violet);
  transition: width 0.3s var(--transition);
  box-shadow: 0 0 6px var(--violet);
}

.project-link:hover {
  color: var(--violet-bright);
}
.project-link:hover::after {
  width: 100%;
}

.project-link svg {
  width: 14px;
  height: 14px;
  transition: transform 0.3s var(--spring);
}
.project-link:hover svg {
  transform: translateY(-2px) scale(1.1);
}

/* ─── TESTIMONIALS ────────────────────────────── */
.testimonials {
  background: var(--bg);
}

.testimonials::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse 60% 50% at 50% 50%,
    rgba(236, 72, 153, 0.03) 0%,
    transparent 60%
  );
  pointer-events: none;
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

.testi-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 28px;
  position: relative;
  overflow: hidden;
  transition: all 0.45s var(--transition);
  isolation: isolate;
}

.testi-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.05), transparent);
  opacity: 0;
  transition: opacity 0.4s;
}

.testi-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--violet),
    var(--cyan),
    transparent
  );
  opacity: 0;
  transition: opacity 0.4s;
}

.testi-card:hover {
  border-color: rgba(6, 182, 212, 0.3);
  transform: translateY(-8px);
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.4),
    0 0 40px rgba(6, 182, 212, 0.08);
}
.testi-card:hover::before {
  opacity: 1;
}
.testi-card:hover::after {
  opacity: 1;
}

.testi-quote {
  font-family: var(--font-display);
  font-size: 72px;
  line-height: 0.8;
  color: var(--violet);
  opacity: 0.25;
  margin-bottom: 12px;
  transition: opacity 0.4s;
  filter: drop-shadow(0 0 16px rgba(6, 182, 212, 0.4));
}
.testi-card:hover .testi-quote {
  opacity: 0.5;
}

.testi-card p {
  font-size: 14.5px;
  color: var(--text2);
  line-height: 1.75;
  margin-bottom: 22px;
  font-style: italic;
}

.testi-author {
  display: flex;
  align-items: center;
  gap: 12px;
}

.testi-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--violet), var(--cyan));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  box-shadow: 0 0 20px rgba(6, 182, 212, 0.4);
  flex-shrink: 0;
}

.testi-author strong {
  font-size: 14px;
  font-weight: 700;
  display: block;
}

.testi-author span {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text3);
}

/* ─── CONTACT ────────────────────────────────── */
.contact {
  background: var(--bg2);
}

.contact::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      ellipse 70% 60% at 50% 100%,
      rgba(6, 182, 212, 0.1) 0%,
      transparent 60%
    ),
    radial-gradient(
      ellipse 40% 40% at 100% 50%,
      rgba(6, 182, 212, 0.04) 0%,
      transparent 50%
    );
  pointer-events: none;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 60px;
  align-items: start;
  margin-top: 20px;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  transition: all 0.35s var(--transition);
  cursor: none;
  position: relative;
  overflow: hidden;
}

.contact-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--violet), var(--cyan));
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.4s var(--transition);
  box-shadow: 0 0 8px rgba(6, 182, 212, 0.5);
}

.contact-item:hover {
  border-color: var(--border2);
  transform: translateX(8px);
  background: rgba(6, 182, 212, 0.04);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
}
.contact-item:hover::before {
  transform: scaleY(1);
}

.contact-icon {
  width: 46px;
  height: 46px;
  border-radius: var(--r-sm);
  background: rgba(6, 182, 212, 0.1);
  border: 1px solid rgba(6, 182, 212, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.35s var(--transition);
}
.contact-item:hover .contact-icon {
  background: rgba(6, 182, 212, 0.2);
  box-shadow: 0 0 20px rgba(6, 182, 212, 0.3);
}

.contact-icon svg {
  width: 18px;
  height: 18px;
  color: var(--violet);
}

.contact-item span {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text3);
  display: block;
  margin-bottom: 2px;
}

.contact-item strong {
  font-size: 14px;
  font-weight: 600;
}

.social-links {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}

.social-btn {
  width: 46px;
  height: 46px;
  border-radius: var(--r-sm);
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text2);
  transition: all 0.35s var(--spring);
  position: relative;
  overflow: hidden;
}
.social-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--grad-violet);
  opacity: 0;
  transition: opacity 0.3s;
}
.social-btn svg {
  width: 18px;
  height: 18px;
  position: relative;
  z-index: 1;
  transition: transform 0.35s var(--spring);
}
.social-btn:hover {
  border-color: var(--violet);
  color: #fff;
  transform: translateY(-5px) scale(1.05);
  box-shadow: 0 8px 24px rgba(6, 182, 212, 0.45);
}
.social-btn:hover::before {
  opacity: 1;
}
.social-btn:hover svg {
  transform: scale(1.15);
}

/* Contact Form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
}

.form-group label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text2);
  transition: color 0.3s;
}

.form-group:focus-within label {
  color: var(--violet-bright);
}

.form-group input,
.form-group textarea {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 14px 18px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  outline: none;
  transition: all 0.35s var(--transition);
  resize: none;
  cursor: none;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text3);
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: rgba(6, 182, 212, 0.5);
  background: rgba(6, 182, 212, 0.04);
  box-shadow:
    0 0 0 3px rgba(6, 182, 212, 0.1),
    0 4px 20px rgba(6, 182, 212, 0.08);
}

.form-group::after {
  content: "";
  position: absolute;
  bottom: 1px;
  left: 18px;
  right: 18px;
  width: calc(100% - 36px);
  height: 2px;
  background: linear-gradient(to right, var(--violet), var(--cyan));
  border-radius: 1px;
  transform: scaleX(0);
  transition: transform 0.45s var(--transition);
  box-shadow: 0 0 8px rgba(6, 182, 212, 0.5);
}

.form-group:focus-within::after {
  transform: scaleX(1);
}

.form-success {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 18px;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: var(--r-md);
  color: var(--green);
  font-size: 14px;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.45s var(--transition);
  pointer-events: none;
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.1);
}

.form-success.show {
  opacity: 1;
  transform: translateY(0);
}

.form-error {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 18px;
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: var(--r-md);
  color: #ef4444;
  font-size: 14px;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.45s var(--transition);
  pointer-events: none;
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.1);
}
.form-error.show {
  opacity: 1;
  transform: translateY(0);
}

/* ─── FOOTER ─────────────────────────────────── */
.footer {
  padding: 40px 0;
  border-top: 1px solid rgba(6, 182, 212, 0.1);
  position: relative;
  z-index: 2;
}

.footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 40%;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--violet),
    var(--cyan),
    transparent
  );
  box-shadow: 0 0 20px rgba(6, 182, 212, 0.4);
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(20px, 5vw, 60px);
}

.footer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.footer-logo {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.footer-socials {
  display: flex;
  gap: 12px;
}

.footer-social-link {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text3);
  transition: all 0.3s ease;
  cursor: pointer;
}
.footer-social-link svg {
  width: 16px;
  height: 16px;
}
.footer-social-link:hover {
  color: var(--cyan);
  border-color: rgba(6, 182, 212, 0.4);
  background: rgba(6, 182, 212, 0.08);
  transform: translateY(-2px);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer p {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text3);
}

.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text2);
  transition: all 0.35s var(--spring);
  overflow: hidden;
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  cursor: pointer;
}
.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.back-to-top::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--grad-violet);
  opacity: 0;
  transition: opacity 0.3s;
}
.back-to-top svg {
  width: 18px;
  height: 18px;
  position: relative;
  z-index: 1;
  transition: transform 0.35s var(--spring);
}
.back-to-top:hover {
  border-color: var(--violet);
  color: #fff;
  transform: translateY(-5px);
  box-shadow: 0 8px 24px rgba(6, 182, 212, 0.45);
}
.back-to-top:hover::before {
  opacity: 1;
}
.back-to-top:hover svg {
  transform: translateY(-2px);
}

/* ─── DECORATIVE ELEMENTS ────────────────────── */
.section::after {
  content: none;
}

/* ─── NEON UTILITIES ─────────────────────────── */
.neon-violet {
  box-shadow: 0 0 24px rgba(6, 182, 212, 0.6);
}
.neon-cyan {
  box-shadow: 0 0 24px rgba(6, 182, 212, 0.6);
}

/* ─── CHAR SPLIT ─────────────────────────────── */
.char {
  display: inline-block;
  transition:
    transform 0.4s var(--transition),
    color 0.4s;
}

/* ─── MAGNETIC WRAPPER ───────────────────────── */
.btn-magnetic {
  position: relative;
  display: inline-flex;
}

/* ─── SECTION ISOLATION ──────────────────────── */
.skill-card,
.timeline-card,
.testi-card,
.project-card {
  isolation: isolate;
}

/* ─── FOCUS / ACCESSIBILITY ──────────────────── */
:focus-visible {
  outline: 2px solid var(--violet);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ─── RESPONSIVE ─────────────────────────────── */
@media (max-width: 1024px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .timeline-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .hero-inner {
    flex-direction: column;
    text-align: center;
    padding-top: 120px;
  }
  .hero-content {
    max-width: 100%;
  }
  .hero-btns {
    justify-content: center;
  }
  .hero-stats {
    justify-content: center;
  }
  .hero-bio {
    margin: 0 auto 36px;
  }
  .hero-image-wrap {
    width: clamp(260px, 60vw, 360px);
  }
  .badge-1 {
    left: -6%;
  }
  .badge-3 {
    right: -6%;
  }
  .section-label {
    justify-content: flex-start;
  }
  .about-grid .section-label {
    justify-content: flex-start;
  }
}

@media (max-width: 768px) {
  .nav-links,
  .nav-cta {
    display: none;
  }
  .hamburger {
    display: flex;
  }
  .nav-logo {
    order: 1;
  }
  .lang-switcher {
    order: 2;
  }
  .theme-toggle {
    order: 3;
    width: 34px;
    height: 34px;
    margin-left: auto;
    margin-right: auto;
  }
  .theme-toggle svg {
    width: 16px;
    height: 16px;
  }
  .hamburger {
    order: 4;
  }
  .hero-image-wrap {
    width: min(280px, 80vw);
  }
  .badge-1 {
    display: none;
  }
  .badge-2 {
    top: -8%;
    right: 0;
  }
  .badge-3 {
    bottom: -8%;
    right: 0;
  }
  .skills-grid {
    grid-template-columns: 1fr 1fr;
  }
  .projects-grid {
    grid-template-columns: 1fr;
  }
  .testimonials-grid {
    grid-template-columns: 1fr;
  }
  .hero-stats {
    gap: 16px;
  }
}

@media (max-width: 480px) {
  .skills-grid {
    grid-template-columns: 1fr;
  }
  .hero-btns {
    flex-direction: column;
    align-items: stretch;
  }
  .hero-btns .btn {
    justify-content: center;
  }
  .cv-trigger {
    width: 100%;
  }
}

/* ─── SNAKE GAME ────────────────────────────── */
.snake-section {
  text-align: center;
}
.snake-wrapper {
  position: relative;
  display: inline-block;
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.3), 0 0 30px rgba(6, 182, 212, 0.06);
}
.snake-hud {
  display: flex;
  justify-content: space-between;
  padding: 12px 20px;
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--text2);
  border-bottom: 1px solid var(--border);
}
.snake-hud span {
  color: var(--cyan);
  font-weight: 700;
}
#snakeCanvas {
  display: block;
  background: var(--bg);
}
.snake-overlay {
  position: absolute;
  inset: 0;
  top: 43px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(3, 3, 6, 0.85);
  backdrop-filter: blur(6px);
  z-index: 2;
  transition: opacity 0.3s, visibility 0.3s;
}
.snake-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.snake-overlay-text {
  text-align: center;
}
.snake-emoji {
  font-size: 48px;
  display: block;
  margin-bottom: 12px;
}
.snake-overlay-text p {
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--text2);
  margin-bottom: 20px;
}
.snake-start-btn {
  padding: 12px 32px;
  font-size: 14px;
  cursor: pointer;
}
.snake-controls {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 16px;
}
.snake-ctrl-row {
  display: flex;
  gap: 6px;
}
.snake-ctrl-btn {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 18px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.snake-ctrl-btn:active {
  background: rgba(6, 182, 212, 0.15);
  border-color: var(--cyan);
  transform: scale(0.92);
}

[data-theme="light"] .snake-overlay {
  background: rgba(255, 255, 255, 0.85);
}
[data-theme="light"] .snake-wrapper {
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.08), 0 0 30px rgba(6, 182, 212, 0.04);
}

@media (pointer: coarse) {
  .snake-controls {
    display: flex;
  }
}

@media (max-width: 500px) {
  #snakeCanvas {
    width: 300px;
    height: 300px;
  }
}

/* ─── LOADING SHIMMER ────────────────────────── */
@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

/* ─── PROJECT DETAILS (if present) ──────────── */
.project-tag {
  cursor: none;
}

/* ─── IN-APP BROWSER FIXES ───────────────────── */
body.iab-mode,
body.iab-mode * {
  cursor: auto !important;
}

/* Stop all expensive CSS animations that repaint every frame */
body.iab-mode::before {
  animation: none !important;
}

body.iab-mode .hero-bg-grid {
  animation: none !important;
}

body.iab-mode .floating-badge {
  animation: none !important;
}

/* Disable all will-change hints to free compositor resources */
body.iab-mode .hero-glow {
  will-change: auto !important;
}
body.iab-mode #cursorCanvas {
  display: none !important;
}

/* Disable backdrop-filter (very expensive in IABs) */
body.iab-mode .navbar.scrolled::before {
  backdrop-filter: none;
  background: rgba(5, 5, 8, 0.97);
}

body.iab-mode .mobile-menu .mob-inner {
  backdrop-filter: none;
}

body.iab-mode .mob-backdrop {
  backdrop-filter: none;
  background: rgba(5, 5, 8, 0.85);
}

/* Kill ALL backdrop-filter in IAB — main source of white screen / glitch */
body.iab-mode * {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

/* Disable floating animation loops in IAB */
body.iab-mode .floating-badge,
body.iab-mode .tag-dot,
body.iab-mode .hero-image-bg,
body.iab-mode .nav-logo .dot,
body.iab-mode .btn-primary,
body.iab-mode .scroll-line {
  animation: none !important;
}

/* ─── LANGUAGE SWITCHER ──────────────────────── */
.lang-switcher {
  display: flex;
  align-items: center;
  gap: 2px;
}

.lang-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text2);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  padding: 5px 9px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.25s var(--transition);
}

.lang-btn:hover {
  border-color: rgba(6, 182, 212, 0.5);
  color: var(--text);
  background: rgba(6, 182, 212, 0.08);
}

.lang-btn.active {
  background: var(--grad-violet);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 2px 12px rgba(6, 182, 212, 0.4);
}

.mob-lang {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
}

/* ─── RTL SUPPORT (Arabic) ───────────────────── */
.lang-ar body,
html[dir="rtl"] body {
  direction: rtl;
  text-align: right;
}

html[dir="rtl"] .navbar {
  direction: rtl;
}

@media (max-width: 900px) {
  html[dir="rtl"] .nav-logo {
    order: 4;
    margin-right: 0;
    margin-left: auto;
  }
  html[dir="rtl"] .hamburger {
    order: 1;
    margin-left: 0;
    margin-right: auto;
  }
  html[dir="rtl"] .lang-switcher {
    order: 3;
  }
  html[dir="rtl"] .theme-toggle {
    order: 2;
  }
}

html[dir="rtl"] .hero-inner {
  direction: rtl;
}

html[dir="rtl"] .hero-content {
  text-align: right;
}

html[dir="rtl"] .section-label::before {
  background: linear-gradient(to left, transparent, var(--violet));
}

html[dir="rtl"] .section-label {
  flex-direction: row-reverse;
}

html[dir="rtl"] .about-grid {
  direction: rtl;
}

html[dir="rtl"] .timeline-grid {
  direction: rtl;
}

html[dir="rtl"] .mob-inner {
  right: auto;
  left: 0;
  border-left: none;
  border-right: 1px solid rgba(6, 182, 212, 0.15);
  transform: translateX(-100%);
}

html[dir="rtl"] .mobile-menu.open .mob-inner {
  transform: translateX(0);
}

html[dir="rtl"] .contact-grid {
  direction: rtl;
}

html[dir="rtl"] .hero-btns {
  flex-direction: row;
  justify-content: flex-start;
}

html[dir="rtl"] .hero-stats {
  justify-content: flex-start;
}

html[dir="rtl"] .btn svg {
  transform: scaleX(-1);
}

html[dir="rtl"] .footer-inner {
  direction: rtl;
}

/* ─── PERFORMANCE: prefers-reduced-motion ────── */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal-up,
  .reveal-right {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* On mobile: show lang switcher in navbar beside logo, hide from mobile menu */
@media (max-width: 900px) {
  .lang-switcher {
    display: flex;
    gap: 2px;
    order: 2; /* sits right after the logo */
  }
  .lang-btn {
    font-size: 10px;
    padding: 4px 7px;
  }
  .mob-lang {
    display: none;
  }
}

/* Ensure navbar layout on mobile */
@media (max-width: 900px) {
  .navbar {
    display: flex;
    align-items: center;
  }
  .nav-logo {
    order: 1;
    margin-right: 8px;
  }
  .lang-switcher {
    order: 2;
  }
  .theme-toggle {
    order: 3;
    margin-left: auto;
    margin-right: auto;
  }
  .hamburger {
    order: 4;
  }
}
