/* ============================================================
   style.css — Portfolio custom styles
   Companion to Tailwind CSS (loaded via CDN)
   ============================================================ */

/* ── CSS custom properties ────────────────────────────────── */
:root {
  --accent:        #7C3AED;
  --accent-light:  #A78BFA;
  --accent-dark:   #5B21B6;
  --accent-glow:   rgba(124, 58, 237, 0.35);
  --bg-primary:    #0D0D14;
  --bg-secondary:  #0A0A10;
  --bg-card:       rgba(255,255,255,0.035);
  --border-card:   rgba(255,255,255,0.08);
  --text-primary:  #F1F0FB;
  --text-muted:    #6B7280;
  --radius-card:   1.25rem;
  --transition:    250ms cubic-bezier(0.4,0,0.2,1);
}

/* Light mode overrides */
html.light {
  --bg-primary:   #F8F7FF;
  --bg-secondary: #F0EEF9;
  --bg-card:      rgba(255,255,255,0.8);
  --border-card:  rgba(124,58,237,0.12);
  --text-primary: #18181B;
  --text-muted:   #71717A;
}

/* ── Reset / base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;   /* stop in-app browsers (Telegram) auto-resizing text */
  text-size-adjust: 100%;
}

/* Never allow sideways scroll / zoom-out in in-app browsers */
html, body {
  max-width: 100%;
  overflow-x: hidden;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  transition: background-color 0.3s, color 0.3s;
}

/* Fallback cursor for touch devices */
@media (hover: none) {
  body { cursor: auto; }
  #cursor, #cursor-follower { display: none; }
}

::selection {
  background: var(--accent);
  color: #fff;
}

/* ── Custom scrollbar ─────────────────────────────────────── */
::-webkit-scrollbar             { width: 5px; }
::-webkit-scrollbar-track       { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb       { background: var(--accent); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent-light); }

/* ── Noise texture overlay ────────────────────────────────── */
.noise-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1000;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 200px;
}
html.light .noise-overlay { opacity: 0.015; }

/* ── Gradient mesh hero background ───────────────────────── */
.mesh-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.mesh-bg::before,
.mesh-bg::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  animation: meshFloat 12s ease-in-out infinite alternate;
}

.mesh-bg::before {
  width: 55vw;
  height: 55vw;
  top: -15%;
  right: -10%;
  background: radial-gradient(circle, rgba(124,58,237,0.18) 0%, transparent 70%);
}

.mesh-bg::after {
  width: 40vw;
  height: 40vw;
  bottom: -5%;
  left: -5%;
  background: radial-gradient(circle, rgba(91,33,182,0.12) 0%, transparent 70%);
  animation-delay: -6s;
}

@keyframes meshFloat {
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(30px, 20px) scale(1.08); }
}

/* ── Custom cursor ────────────────────────────────────────── */
/* Native cursor stays visible; the dot is removed and the follower is a
   subtle accent ring that gently trails the real pointer. */
#cursor { display: none; }

#cursor-follower {
  position: fixed;
  width: 28px;
  height: 28px;
  border: 1.5px solid rgba(124,58,237,0.45);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  mix-blend-mode: screen;
  transition: width 0.2s ease, height 0.2s ease, border-color 0.2s ease, background 0.2s ease, opacity 0.2s ease;
}

body:has(a:hover) #cursor-follower,
body:has(button:hover) #cursor-follower,
body:has([role="button"]:hover) #cursor-follower {
  width: 46px;
  height: 46px;
  border-color: var(--accent);
  background: var(--accent-glow);
}
html.light #cursor-follower { mix-blend-mode: normal; border-color: rgba(124,58,237,0.4); }

/* ── Navbar ───────────────────────────────────────────────── */
#navbar {
  background: transparent;
}

#navbar.scrolled {
  background: rgba(13,13,20,0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  box-shadow: 0 4px 30px rgba(0,0,0,0.3);
}

html.light #navbar.scrolled {
  background: rgba(248,247,255,0.85);
  border-bottom-color: rgba(124,58,237,0.1);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  border-radius: 99px;
  transition: width var(--transition);
}
.nav-link:hover::after,
.nav-link.active::after { width: 100%; }

/* ── Buttons ──────────────────────────────────────────────── */
.btn-accent {
  background: linear-gradient(135deg, var(--accent), #9333EA);
  color: #fff;
  transition: all var(--transition);
  box-shadow: 0 0 0 0 var(--accent-glow);
  position: relative;
  overflow: hidden;
}
.btn-accent::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #9333EA, var(--accent));
  opacity: 0;
  transition: opacity var(--transition);
}
.btn-accent:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px var(--accent-glow);
}
.btn-accent:hover::before { opacity: 1; }
.btn-accent:active { transform: translateY(0); }

.btn-outline {
  border: 1.5px solid rgba(255,255,255,0.15);
  color: var(--text-primary);
  background: transparent;
  transition: all var(--transition);
}
.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent-light);
  background: rgba(124,58,237,0.08);
}

/* Ripple effect */
.ripple {
  position: absolute;
  border-radius: 50%;
  transform: scale(0);
  animation: ripple-anim 0.55s linear;
  background: rgba(255,255,255,0.25);
  pointer-events: none;
}
@keyframes ripple-anim {
  to { transform: scale(4); opacity: 0; }
}

/* ── Glass card ───────────────────────────────────────────── */
.glass-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}
.glass-card:hover {
  transform: translateY(-3px);
  border-color: rgba(124,58,237,0.28);
  box-shadow: 0 12px 40px rgba(0,0,0,0.30);
}
.project-card { cursor: pointer; }

/* ── Client logos ─────────────────────────────────────────── */
.client-card { text-decoration: none; cursor: default; }
a.client-card { cursor: pointer; }
.client-logo {
  filter: grayscale(1) brightness(1.8) opacity(0.75);
  transition: filter var(--transition), transform var(--transition);
}
.client-card:hover .client-logo {
  filter: grayscale(0) brightness(1) opacity(1);
  transform: scale(1.06);
}
html.light .client-logo { filter: grayscale(1) opacity(0.65); }
html.light .client-card:hover .client-logo { filter: grayscale(0) opacity(1); }

/* ── Profile blob shape ───────────────────────────────────── */
.profile-blob {
  border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
  animation: morphBlob 8s ease-in-out infinite;
}
@keyframes morphBlob {
  0%,100% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
  25%     { border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%; }
  50%     { border-radius: 50% 60% 30% 60% / 30% 70% 40% 70%; }
  75%     { border-radius: 60% 40% 60% 40% / 60% 40% 70% 30%; }
}

/* Slow spin for ring decoration */
@keyframes spin-slow {
  to { transform: rotate(360deg); }
}
.animate-spin-slow {
  animation: spin-slow 20s linear infinite;
}

/* ── Section helpers ──────────────────────────────────────── */
.section-padding { padding-top: 6rem; padding-bottom: 6rem; }
@media (min-width: 1024px) { .section-padding { padding-top: 8rem; padding-bottom: 8rem; } }

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-light);
  padding: 0.35rem 1rem;
  border-radius: 99px;
  border: 1px solid rgba(124,58,237,0.3);
  background: rgba(124,58,237,0.08);
}

.section-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1.1;
  color: var(--text-primary);
}

/* ── Gradient text ────────────────────────────────────────── */
.gradient-text {
  background: linear-gradient(135deg, var(--accent-light) 0%, #E879F9 50%, var(--accent) 100%);
  background-size: 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradient-x 5s ease infinite;
}
@keyframes gradient-x {
  0%,100% { background-position: 0% 50%; }
  50%     { background-position: 100% 50%; }
}

/* ── Scroll line ──────────────────────────────────────────── */
.scroll-line {
  animation: scrollPulse 2s ease-in-out infinite;
}
@keyframes scrollPulse {
  0%,100% { opacity: 1; }
  50%     { opacity: 0.3; }
}

/* ── Tech tags ────────────────────────────────────────────── */
.tech-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 500;
  padding: 0.2rem 0.6rem;
  border-radius: 99px;
  background: rgba(124,58,237,0.12);
  color: var(--accent-light);
  border: 1px solid rgba(124,58,237,0.2);
  letter-spacing: 0.02em;
  transition: background var(--transition);
}
.tech-tag:hover { background: rgba(124,58,237,0.25); }

/* ── Filter buttons (projects) ────────────────────────────── */
.filter-btn {
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.4rem 1.1rem;
  border-radius: 99px;
  border: 1px solid var(--border-card);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
}
.filter-btn:hover,
.filter-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* Hidden project cards during filter */
.project-card.hidden { display: none; }

/* ── Form inputs ──────────────────────────────────────────── */
.form-input {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-card);
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
  color: var(--text-primary);
  font-size: 0.9rem;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  font-family: inherit;
}
.form-input::placeholder { color: var(--text-muted); }
.form-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(124,58,237,0.15);
}

html.light .form-input {
  background: rgba(255,255,255,0.9);
  border-color: rgba(124,58,237,0.2);
  color: var(--text-primary);
}

/* ── Modal ────────────────────────────────────────────────── */
#project-modal.flex { display: flex; }
.modal-content { animation: modalIn 0.3s cubic-bezier(0.34,1.56,0.64,1); }
@keyframes modalIn {
  from { transform: scale(0.9); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}

/* ── Flash messages (admin) ───────────────────────────────── */
.flash {
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  font-size: 0.875rem;
  margin-bottom: 1rem;
}
.flash-green  { background: rgba(34,197,94,0.1);  border: 1px solid rgba(34,197,94,0.2);  color: #4ADE80; }
.flash-red    { background: rgba(239,68,68,0.1);   border: 1px solid rgba(239,68,68,0.2);  color: #F87171; }
.flash-yellow { background: rgba(234,179,8,0.1);   border: 1px solid rgba(234,179,8,0.2);  color: #FDE047; }
.flash-blue   { background: rgba(59,130,246,0.1);  border: 1px solid rgba(59,130,246,0.2); color: #93C5FD; }

/* ── Prose content (bio, project descriptions) ────────────── */
.prose-content h2 { font-size: 1.25rem; font-weight: 700; color: var(--text-primary); margin-bottom: 0.5rem; font-family: 'Space Grotesk', sans-serif; }
.prose-content p  { color: #9CA3AF; line-height: 1.75; }
.prose-content ul { list-style: disc; padding-left: 1.25rem; color: #9CA3AF; line-height: 1.75; }

/* ── Admin sidebar (preview) ──────────────────────────────── */
.admin-sidebar {
  background: #0A0A10;
  border-right: 1px solid rgba(255,255,255,0.06);
  width: 240px;
  flex-shrink: 0;
}

/* ── Responsive adjustments ───────────────────────────────── */
@media (max-width: 768px) {
  .section-padding { padding-top: 4rem; padding-bottom: 4rem; }
}

/* ── Light mode text fixes ────────────────────────────────── */
html.light body            { color: var(--text-primary); }
html.light .text-gray-400  { color: #52525B; }
html.light .text-gray-500  { color: #71717A; }
html.light .text-gray-600  { color: #52525B; }
html.light .text-gray-200  { color: #18181B; }
html.light .text-white     { color: #18181B; }
html.light .text-gray-300  { color: #3F3F46; }
html.light #navbar.scrolled { color: #18181B; }
html.light .glass-card     { background: rgba(255,255,255,0.7); }
html.light .section-title  { color: #18181B; }
html.light .form-input     { color: #18181B; }
html.light .tech-tag       { color: var(--accent-dark); border-color: rgba(124,58,237,0.25); }
html.light .btn-outline    { border-color: rgba(124,58,237,0.25); color: #3F3F46; }
html.light .noise-overlay  { opacity: 0.02; }
html.light .section-label  { color: var(--accent-dark); }

/* ================================================================
   FLATICON UICONS — sizing helpers
   ================================================================ */
.fi { display: inline-block; line-height: 1; vertical-align: middle; }

/* ================================================================
   RESPONSIVE — Mobile-first improvements
   ================================================================ */

/* ── Filter bar horizontal scroll (mobile) ────────────────── */
.filter-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 4px;
}
.filter-scroll::-webkit-scrollbar { display: none; }
.filter-scroll-inner {
  display: flex;
  gap: 0.5rem;
  min-width: min-content;
}

/* ── Very small phones (< 480px) ─────────────────────────── */
@media (max-width: 479px) {
  /* Hero heading */
  h1.font-display { font-size: 2.4rem !important; line-height: 1.1 !important; }

  /* Shrink hero blob */
  .profile-blob { width: 220px !important; height: 220px !important; }

  /* Floating hero badges */
  .hero-badge-exp   { top: -8px !important; right: -8px !important; font-size: 0.65rem; padding: 0.2rem 0.55rem; }
  .hero-badge-proj  { bottom: -8px !important; left: -8px !important; font-size: 0.65rem; padding: 0.2rem 0.55rem; }

  /* Section title */
  .section-title { font-size: 1.7rem !important; }

  /* Stat cards 2x2 */
  .stats-grid-2x2 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }

  /* About bio: no two-col on tiny screens */
  .about-grid { grid-template-columns: 1fr !important; }

  /* Project modal */
  #project-modal .max-w-4xl {
    width: 95vw;
    max-height: 88vh;
    overflow-y: auto;
    border-radius: 1rem;
  }
}

/* ── Phones (< 640px) ─────────────────────────────────────── */
@media (max-width: 639px) {
  /* Reduce hero vertical padding */
  #hero .pt-24 { padding-top: 6rem; }
  #hero .pb-16 { padding-bottom: 3rem; }

  /* Center hero text on mobile */
  #hero .grid { text-align: center; }
  #hero .flex.flex-wrap.gap-4 { justify-content: center; }
  #hero .flex.items-center.gap-4 { justify-content: center; }

  /* Hide profile blob decorative rings on very small screens */
  @media (max-width: 400px) {
    .animate-spin-slow { display: none; }
  }

  /* Experience timeline full-width lines */
  .experience-dot { display: none; }

  /* Contact: stack columns */
  .contact-grid { grid-template-columns: 1fr !important; }

  /* Services: 1 column */
  .services-grid { grid-template-columns: 1fr !important; }
}

/* ── Tablet (768px) ──────────────────────────────────────── */
@media (max-width: 768px) {
  .section-padding { padding-top: 4rem; padding-bottom: 4rem; }

  /* Project modal full-screen feel */
  #project-modal .max-w-4xl {
    width: 94vw;
    max-height: 88vh;
    overflow-y: auto;
  }

  /* Timeline: left-align all items */
  .timeline-connector { display: none; }
}

/* ── Touch devices — bigger tap targets ──────────────────── */
@media (hover: none) and (pointer: coarse) {
  .filter-btn   { min-height: 40px; padding: 0.5rem 1.1rem; }
  .btn-accent,
  .btn-outline  { min-height: 48px; }
  .nav-link     { padding: 0.5rem 0.25rem; }

  /* Disable ripple hover effects on touch */
  .glass-card:hover { transform: none; }
  .btn-accent:hover { transform: none; box-shadow: none; }
}

/* ── Mobile menu animation ────────────────────────────────── */
/* Scoped to mobile so it never overrides the desktop `md:hidden` rule. */
@media (max-width: 767px) {
  #mobile-menu {
    display: block;          /* stay in flow so height can animate */
    max-height: 0;
    opacity: 0;
    pointer-events: none;
    overflow: hidden;
    transition: max-height 0.35s cubic-bezier(0.4,0,0.2,1),
                opacity    0.25s ease;
  }
  #mobile-menu:not(.hidden) {
    max-height: 80vh;
    opacity: 1;
    pointer-events: auto;
    overflow-y: auto;
  }
}

/* Mobile nav link hover */
.mobile-nav-link {
  border-radius: 0.5rem;
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}
.mobile-nav-link:hover {
  background: rgba(124,58,237,0.08);
  padding-left: 0.75rem;
}

/* ── Skill icons on mobile ────────────────────────────────── */
@media (max-width: 640px) {
  .grid.sm\:grid-cols-2.lg\:grid-cols-3 { grid-template-columns: 1fr; }
}

/* ── Prevent horizontal overflow ─────────────────────────── */
.max-w-7xl, section { overflow-x: hidden; }

/* ── In-app browser fixes (Telegram / FB / IG WebView) ───── */
/* Use the *visible* viewport height so the hero isn't pushed
   behind the browser's top/bottom bars. */
#hero { min-height: 100vh; }
@supports (min-height: 100svh) {
  #hero { min-height: 100svh; }
}
/* Respect notch / safe areas */
@supports (padding: max(0px)) {
  nav .max-w-7xl,
  footer .max-w-7xl {
    padding-left:  max(1.5rem, env(safe-area-inset-left));
    padding-right: max(1.5rem, env(safe-area-inset-right));
  }
}

/* ── Image responsiveness ─────────────────────────────────── */
img { max-width: 100%; height: auto; }

/* ════════════════════════════════════════════════════════════
   3D / PREMIUM EFFECTS (desktop only — gated by JS + media query)
   ════════════════════════════════════════════════════════════ */
body { perspective: 1400px; }

.tilt-3d {
  --rx: 0deg;
  --ry: 0deg;
  --s: 1;
  --mx: 50%;
  --my: 50%;
  transform-style: preserve-3d;
  transform: perspective(900px)
             rotateX(var(--rx))
             rotateY(var(--ry))
             scale(var(--s));
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.45s ease,
              border-color 0.45s ease;
  will-change: transform;
  position: relative;
  overflow: hidden;
}

/* Cursor-tracked spotlight */
.tilt-3d::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    320px circle at var(--mx) var(--my),
    rgba(167, 139, 250, 0.18),
    transparent 55%
  );
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
  z-index: 1;
}
.tilt-3d:hover::before { opacity: 1; }

/* Premium hover lift */
.tilt-3d:hover {
  box-shadow:
    0 30px 60px -20px rgba(124, 58, 237, 0.45),
    0 18px 40px -25px rgba(0, 0, 0, 0.6);
  border-color: rgba(124, 58, 237, 0.45) !important;
}

/* Push card content forward in 3D for a layered look */
.project-card.tilt-3d > div { transform: translateZ(30px); }
#services .tilt-3d > *      { transform: translateZ(20px); }

/* Magnetic-button smooth return */
.btn-accent,
.btn-outline {
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow var(--transition),
              background var(--transition);
}

/* Hero parallax layers ease back when cursor leaves */
#hero .mesh-bg,
#hero .animate-float {
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

/* Shine sweep on project cover images */
.project-card .aspect-video { position: relative; overflow: hidden; }
.project-card .aspect-video::after {
  content: '';
  position: absolute;
  top: 0;
  left: -75%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    100deg,
    rgba(255,255,255,0) 0%,
    rgba(255,255,255,0.18) 50%,
    rgba(255,255,255,0) 100%
  );
  transform: skewX(-20deg);
  transition: left 0.8s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
  z-index: 2;
}
.project-card:hover .aspect-video::after { left: 130%; }

/* Scroll-progress bar */
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), #E879F9, var(--accent-light));
  z-index: 9999;
  border-radius: 0 4px 4px 0;
  box-shadow: 0 0 12px var(--accent-glow);
  transition: width 0.1s linear;
}

/* ════════════════════════════════════════════════════════════
   MOBILE / IN-APP BROWSER PERFORMANCE GUARDS
   Telegram, Facebook, Instagram in-app browsers run on tight
   GPU memory budgets. Heavy backdrop-filter + many infinite
   animations will OOM-crash the tab (white screen). Disable
   the expensive effects on small / touch devices.
   ════════════════════════════════════════════════════════════ */
@media (max-width: 768px), (hover: none) and (pointer: coarse) {
  /* Replace backdrop blur with a cheap solid background */
  .glass-card,
  #navbar.scrolled,
  #mobile-menu {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
  .glass-card        { background: rgba(20,20,28,0.72); }
  html.light .glass-card { background: rgba(255,255,255,0.85); }
  #navbar.scrolled   { background: rgba(13,13,20,0.95); }
  html.light #navbar.scrolled { background: rgba(248,247,255,0.95); }

  /* Drop the most expensive blurred radial gradients */
  .mesh-bg::before,
  .mesh-bg::after { filter: blur(60px); opacity: 0.7; }

  /* Kill noise texture (full-screen background-image overlay) */
  .noise-overlay { display: none; }

  /* Stop all infinite decorative animations */
  .animate-float,
  .animate-spin-slow,
  .animate-pulse-slow,
  .profile-blob,
  .gradient-text,
  .mesh-bg::before,
  .mesh-bg::after,
  .scroll-line {
    animation: none !important;
  }

  /* Gradient text needs a fallback color since animation is off */
  .gradient-text {
    background: none;
    -webkit-text-fill-color: var(--accent-light);
    color: var(--accent-light);
  }

  /* Disable 3D effects on touch — keep simple, save GPU memory */
  body { perspective: none; }
  .tilt-3d {
    transform: none !important;
    box-shadow: none;
  }
  .tilt-3d::before { display: none; }
  .project-card .aspect-video::after { display: none; }
  #scroll-progress { display: none; }
}

/* Respect user OS-level reduced-motion preference everywhere */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .tilt-3d { transform: none !important; }
}