/* ============================================
   GLOBAL VARIABLES & RESET
   ============================================ */
:root {
  --bg-dark: #06040d;
  --glass-bg: rgba(20, 15, 35, 0.45);
  --glass-border: rgba(168, 85, 247, 0.12);
  --neon-primary: #a855f7;
  --neon-secondary: #ec4899;
  --text-main: #f0e6ff;
  --text-muted: #9ca3af;
  --font-heading: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --mouse-x: 50%;
  --mouse-y: 50%;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { 
  scroll-behavior: smooth; 
  scroll-padding-top: 110px; 
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

/* Ambient Mouse Glow */
body::before {
  content: '';
  position: fixed;
  width: 700px; height: 700px;
  background: radial-gradient(circle, rgba(168,85,247,0.07) 0%, transparent 70%);
  transform: translate(-50%, -50%);
  left: var(--mouse-x); top: var(--mouse-y);
  pointer-events: none; z-index: 0;
  transition: left 0.1s ease, top 0.1s ease;
}

/* Animated Background Orbs */
.bg-orbs { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.orb {
  position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.35;
  animation: float 20s infinite alternate var(--ease-out);
}
.orb-1 { width: 400px; height: 400px; background: var(--neon-primary); top: -10%; left: -10%; animation-delay: 0s; }
.orb-2 { width: 300px; height: 300px; background: var(--neon-secondary); bottom: 10%; right: -5%; animation-delay: -5s; }
.orb-3 { width: 250px; height: 250px; background: #3b82f6; top: 40%; left: 60%; animation-delay: -10s; }

@keyframes float {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(40px, -40px) scale(1.1); }
}

/* Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-dark); }
::-webkit-scrollbar-thumb { background: rgba(168,85,247,0.3); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--neon-primary); }

/* Typography & RTL */
h1, h2, h3 { font-family: var(--font-heading); font-weight: 700; }
[dir="rtl"] body { font-family: 'Tajawal', var(--font-body); }
[dir="rtl"] .section-content { text-align: right; }

/* Layout Utilities */
.container { max-width: 1100px; margin: 0 auto; padding: 0 1.5rem; position: relative; z-index: 1; }
section { padding: 7rem 0; min-height: 85vh; display: flex; align-items: center; }

/* Neon Text */
.neon-text {
  background: linear-gradient(135deg, var(--neon-primary), var(--neon-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 12px rgba(168,85,247,0.25));
}

/* Reveal Animations */
.reveal {
  opacity: 0; transform: translateY(40px) scale(0.98);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}
.reveal.visible { opacity: 1; transform: translateY(0) scale(1); }

.stagger > * {
  opacity: 0; transform: translateY(25px);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}
.stagger.visible > *:nth-child(1) { transition-delay: 0.1s; opacity: 1; transform: translateY(0); }
.stagger.visible > *:nth-child(2) { transition-delay: 0.2s; opacity: 1; transform: translateY(0); }
.stagger.visible > *:nth-child(3) { transition-delay: 0.3s; opacity: 1; transform: translateY(0); }
.stagger.visible > *:nth-child(4) { transition-delay: 0.4s; opacity: 1; transform: translateY(0); }

/* Glass Cards Base */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 2rem;
  position: relative;
  overflow: hidden;
  transition: transform 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out), border-color 0.4s var(--ease-out);
}
.glass-card::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.03) 0%, transparent 50%);
  pointer-events: none;
}
.glass-card:hover {
  transform: translateY(-6px) scale(1.01);
  border-color: rgba(168, 85, 247, 0.35);
  box-shadow: 0 15px 40px rgba(0,0,0,0.4), 0 0 25px rgba(168,85,247,0.12);
}

/* ============================================
   PLAYING CARD SYSTEM (Skills Only)
   ============================================ */
.card-stack {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  max-width: 800px;
  margin: 0 auto;
  perspective: 1200px;
}

.flip-card {
  position: relative;
  width: 100%;
  height: 100px;
  cursor: pointer;
  z-index: 1;
  transition: height 0.5s cubic-bezier(0.16, 1, 0.3, 1),
              z-index 0s linear 0.5s,
              transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.flip-card:hover {
  height: 380px;
  z-index: 100;
  transform: translateY(-12px);
  transition: height 0.5s cubic-bezier(0.16, 1, 0.3, 1),
              z-index 0s linear 0s,
              transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  text-align: center;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  transform-style: preserve-3d;
}

.flip-card:hover .flip-card-inner { transform: rotateX(180deg); }

.flip-card-front, .flip-card-back {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 22px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--glass-bg);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  border: 1px solid var(--glass-border);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.flip-card-back {
  transform: rotateX(0deg);
  flex-direction: row;
  gap: 1.2rem;
  padding: 0 2rem;
}

.flip-card-back .card-icon {
  width: 56px; height: 56px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(168, 85, 247, 0.1);
  border-radius: 16px;
  border: 1px solid rgba(168, 85, 247, 0.2);
  flex-shrink: 0;
}

.flip-card-back .card-label {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

.flip-card-front {
  transform: rotateX(180deg);
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  padding: 2.5rem;
  text-align: left;
  background: rgba(15, 10, 30, 0.85);
  border-color: rgba(168, 85, 247, 0.3);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5), 0 0 25px rgba(168, 85, 247, 0.1);
}

[dir="rtl"] .flip-card-front { text-align: right; align-items: flex-end; }

.flip-card-front h3 { font-size: 1.5rem; color: #fff; margin-bottom: 0.8rem; }
.flip-card-front p { font-size: 1rem; color: var(--text-muted); line-height: 1.7; margin-bottom: 1.5rem; }

.flip-card-front .card-tags {
  list-style: none; display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: auto;
}

.flip-card-front .card-tags li {
  font-size: 0.8rem; padding: 0.35rem 0.9rem;
  border: 1px solid var(--glass-border); border-radius: 20px;
  color: var(--neon-primary); background: rgba(168, 85, 247, 0.06);
}

.flip-card:hover .flip-card-front { border-color: rgba(168, 85, 247, 0.4); }

@media (max-width: 768px) {
  .flip-card { height: 90px; }
  .flip-card.active { height: 360px; z-index: 100; transform: translateY(-5px); }
  .flip-card.active .flip-card-inner { transform: rotateX(180deg); }
  .flip-card:hover .flip-card-inner { transform: rotateX(0deg); }
  .flip-card.active:hover .flip-card-inner { transform: rotateX(180deg); }
  .flip-card-back { flex-direction: column; gap: 0.5rem; padding: 0; }
}

/* ============================================
   PROJECTS GRID (Max 3 Columns Desktop)
   ============================================ */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* ✅ Fixed 3 columns on desktop */
  gap: 2rem;
}

/* Tablet: 2 columns */
@media (max-width: 1024px) {
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Mobile: 1 column */
@media (max-width: 650px) {
  .projects-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

.project-preview {
  height: 180px;
  background: linear-gradient(135deg, rgba(168,85,247,0.08), rgba(236,72,153,0.08));
  border-radius: 12px; margin-bottom: 1.2rem;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted); font-size: 0.9rem;
  position: relative; overflow: hidden;
}

.project-preview::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(45deg, transparent 40%, rgba(255,255,255,0.05) 50%, transparent 60%);
  transform: translateX(-100%); transition: transform 0.6s;
}
.glass-card:hover .project-preview::after { transform: translateX(100%); }

.project-links { display: flex; gap: 1rem; margin-top: 1rem; }
.project-links a {
  display: flex; align-items: center; gap: 0.4rem;
  color: var(--text-muted); text-decoration: none; font-size: 0.85rem;
  transition: color 0.3s;
}
.project-links a:hover { color: var(--neon-primary); }

/* Fix Tags Overlap */
.skill-tags, .card-tags {
  list-style: none; display: flex; flex-wrap: wrap; gap: 0.5rem;
  padding: 0; margin: 0.5rem 0 1rem;
}
.skill-tags li, .card-tags li {
  font-size: 0.75rem; padding: 0.25rem 0.75rem;
  border: 1px solid var(--glass-border); border-radius: 20px;
  color: var(--neon-primary); background: rgba(168, 85, 247, 0.06);
  white-space: nowrap; line-height: 1.4; transition: all 0.3s ease;
}
.skill-tags li:hover, .card-tags li:hover {
  background: var(--neon-primary); color: #000; border-color: var(--neon-primary);
}

/* ============================================
   LOGO & PROFILE IMAGE (INTEGRATED PNG)
   ============================================ */

/* Shark logo SVG coloring override */
.nav-logo svg path,
.footer-brand svg path {
  fill: var(--neon-primary) !important;
  stroke: none !important;
}

.nav-logo svg,
.footer-brand svg {
  filter: drop-shadow(0 0 8px rgba(168, 85, 247, 0.4));
}

/* Profile Wrapper & Photo - NO CROPPING */
.profile-wrapper {
  position: relative;
  width: 280px; height: 280px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-photo {
  width: 100%; height: 100%;
  border-radius: 0; /* Image is already circular with decoration */
  object-fit: contain; /* ✅ CRITICAL: Prevents cropping edges/decoration */
  filter: drop-shadow(0 0 20px rgba(168, 85, 247, 0.2));
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1; position: relative;
}

.profile-wrapper:hover .profile-photo {
  transform: scale(1.05);
  filter: drop-shadow(0 0 30px rgba(168, 85, 247, 0.4));
}

@media (max-width: 768px) {
  .profile-wrapper { width: 220px; height: 220px; }
}
@media (max-width: 400px) {
  .profile-wrapper { width: 180px; height: 180px; }
}

/* ============================================
   ENHANCED CTA BUTTON
   ============================================ */
.cta-button {
  display: inline-flex; align-items: center; gap: 0.6rem;
  padding: 1rem 2.2rem; border-radius: 50px;
  text-decoration: none; font-family: var(--font-heading);
  font-weight: 600; font-size: 1rem; letter-spacing: 0.3px;
  position: relative; overflow: hidden;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1;
  background: linear-gradient(135deg, var(--neon-primary), var(--neon-secondary));
  color: #fff; border: none;
  box-shadow: 0 4px 20px rgba(168, 85, 247, 0.3);
}

.cta-button::before {
  content: ''; position: absolute; top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent);
  transition: left 0.6s ease; z-index: -1;
}
.cta-button:hover::before { left: 100%; }

.cta-button:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 8px 30px rgba(168, 85, 247, 0.4), 0 0 0 4px rgba(168, 85, 247, 0.1);
}
.cta-button:active { transform: translateY(-1px) scale(1.01); }
.cta-button svg { transition: transform 0.3s ease; }
.cta-button:hover svg { transform: translateX(4px); }

[data-theme="light"] .cta-button { color: #fff; box-shadow: 0 4px 20px rgba(168, 85, 247, 0.25); }
[data-theme="light"] .cta-button:hover { box-shadow: 0 8px 30px rgba(168, 85, 247, 0.35), 0 0 0 4px rgba(168, 85, 247, 0.08); }

[data-color="red"] .cta-button { box-shadow: 0 4px 20px rgba(239, 68, 68, 0.3); }
[data-color="red"] .cta-button:hover { box-shadow: 0 8px 30px rgba(239, 68, 68, 0.4), 0 0 0 4px rgba(239, 68, 68, 0.1); }

/* Discord Section */
.discord-card { padding: 3rem 2rem; text-align: center; }
.discord-username {
  display: inline-flex; align-items: center; gap: 1rem;
  background: rgba(168, 85, 247, 0.06); border: 1px dashed var(--glass-border);
  padding: 1rem 1.5rem; border-radius: 14px; margin-top: 1.5rem;
}
.discord-username code {
  font-size: 1.15rem; color: var(--neon-primary);
  font-family: 'Space Grotesk', monospace;
}
.copy-btn {
  background: transparent; border: 1px solid var(--neon-primary);
  color: var(--neon-primary); padding: 0.4rem 1rem; border-radius: 8px;
  cursor: pointer; font-size: 0.8rem; transition: all 0.3s var(--ease-out);
}
.copy-btn:hover {
  background: var(--neon-primary); color: #000;
  box-shadow: 0 0 15px rgba(168,85,247,0.3);
}

/* Theme Joke Text */
.theme-joke {
  font-size: 0.7rem; color: var(--text-muted); text-align: center;
  margin: -0.4rem 0 0.6rem; padding: 0 0.3rem;
  line-height: 1.3; opacity: 0.8;
  animation: joke-fade-in 0.3s ease-out;
}
@keyframes joke-fade-in {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 0.8; transform: translateY(0); }
}

/* ============================================
   ACTIVE NAV INDICATOR
   ============================================ */
.nav-links a.active {
  background: rgba(168, 85, 247, 0.15);
  color: #fff;
}

.nav-links a.active svg {
  opacity: 1;
  stroke: var(--neon-primary);
  filter: drop-shadow(0 0 6px var(--neon-primary));
  transform: scale(1.1);
}

/* ============================================
   THEME SWITCHER PANEL
   ============================================ */
.theme-switcher {
  position: relative;
  margin-left: 0.5rem;
}

[dir="rtl"] .theme-switcher { margin-left: 0; margin-right: 0.5rem; }

.theme-btn {
  width: 40px; height: 40px; border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--glass-border);
  color: var(--text-main);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all 0.3s ease;
}

.theme-btn:hover {
  border-color: var(--neon-primary);
  background: rgba(168, 85, 247, 0.08);
}

.theme-btn svg { width: 20px; height: 20px; }

.theme-panel {
  position: absolute;
  top: calc(100% + 12px); right: 0;
  width: 180px;
  background: rgba(15, 10, 30, 0.95);
  backdrop-filter: blur(24px);
  border: 1px solid var(--glass-border);
  border-radius: 16px; padding: 1rem;
  opacity: 0; visibility: hidden;
  transform: translateY(-8px) scale(0.95);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1002;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6);
}

[dir="rtl"] .theme-panel { right: auto; left: 0; }

.theme-switcher.open .theme-panel {
  opacity: 1; visibility: visible;
  transform: translateY(0) scale(1);
}

.theme-panel-label {
  font-size: 0.7rem; text-transform: uppercase;
  letter-spacing: 1px; color: var(--text-muted);
  margin-bottom: 0.6rem; display: block;
}

.theme-toggle-btn {
  width: 100%; padding: 0.6rem; border-radius: 10px;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-main); font-size: 0.85rem;
  cursor: pointer; transition: all 0.3s;
  margin-bottom: 0.8rem;
  display: flex; align-items: center; justify-content: center; gap: 0.5rem;
}

.theme-toggle-btn:hover {
  background: rgba(168, 85, 247, 0.1);
  border-color: var(--neon-primary);
}

.color-options { display: flex; gap: 0.5rem; }

.color-option {
  flex: 1; height: 36px; border-radius: 10px;
  border: 2px solid transparent; cursor: pointer;
  transition: all 0.3s; position: relative; overflow: hidden;
}

.color-option.purple { background: linear-gradient(135deg, #a855f7, #ec4899); }
.color-option.red { background: linear-gradient(135deg, #ef4444, #f97316); }

.color-option.active {
  border-color: #fff;
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.2);
}

.color-option::after {
  content: '✓'; position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: bold; font-size: 0.9rem;
  opacity: 0; transition: opacity 0.3s;
}

.color-option.active::after { opacity: 1; }

/* ============================================
   LIGHT THEME OVERRIDES
   ============================================ */
[data-theme="light"] {
  --bg-dark: #f5f3ff;
  --glass-bg: rgba(255, 255, 255, 0.6);
  --glass-border: rgba(168, 85, 247, 0.15);
  --text-main: #1e1b2e;
  --text-muted: #6b7280;
}

[data-theme="light"] body { background-color: var(--bg-dark); color: var(--text-main); }
[data-theme="light"] .navbar { background: rgba(255, 255, 255, 0.7); border-color: rgba(168, 85, 247, 0.1); }
[data-theme="light"] .glass-card { 
  background: var(--glass-bg); border-color: var(--glass-border); 
  box-shadow: 0 4px 20px rgba(0,0,0,0.06), inset 0 1px 0 rgba(255,255,255,0.8); 
}
[data-theme="light"] .flip-card-front { background: rgba(255, 255, 255, 0.9); }
[data-theme="light"] .lang-options, [data-theme="light"] .theme-panel { background: rgba(255, 255, 255, 0.95); }
[data-theme="light"] .nav-links a.active { background: rgba(168, 85, 247, 0.1); }
[data-theme="light"] .orb { opacity: 0.15; }

/* Light Theme Text Fixes */
[data-theme="light"] h1, [data-theme="light"] h2, [data-theme="light"] h3,
[data-theme="light"] .nav-logo span, [data-theme="light"] .footer-brand span { color: #1e1b2e; }
[data-theme="light"] p, [data-theme="light"] .skill-desc, [data-theme="light"] .footer-tagline { color: #4b5563; }
[data-theme="light"] .nav-links a { color: #6b7280; }
[data-theme="light"] .nav-links a:hover, [data-theme="light"] .nav-links a.active { color: var(--neon-primary); }
[data-theme="light"] .lang-current, [data-theme="light"] .theme-btn { color: #1e1b2e; background: rgba(0, 0, 0, 0.04); }
[data-theme="light"] .lang-options li, [data-theme="light"] .theme-panel-label { color: #6b7280; }
[data-theme="light"] .lang-options li:hover { color: var(--neon-primary); background: rgba(168, 85, 247, 0.08); }
[data-theme="light"] .flip-card-back .card-label { color: #4b5563; }
[data-theme="light"] .flip-card-front h3 { color: #1e1b2e; }
[data-theme="light"] .flip-card-front p { color: #4b5563; }
[data-theme="light"] .discord-username code { color: var(--neon-primary); }
[data-theme="light"] .copy-btn { color: var(--neon-primary); border-color: var(--neon-primary); }
[data-theme="light"] .project-links a { color: #6b7280; }
[data-theme="light"] .project-links a:hover { color: var(--neon-primary); }
[data-theme="light"] .footer-bottom { color: #9ca3af; border-top-color: rgba(0, 0, 0, 0.06); }
[data-theme="light"] .hamburger { color: #1e1b2e; }
[data-theme="light"] .neon-text { filter: drop-shadow(0 0 8px rgba(168, 85, 247, 0.2)); }
[data-theme="light"] .theme-joke { color: #9ca3af; }

/* Light Theme Scrolled Navbar Fix */
[data-theme="light"] .navbar.scrolled {
  background: rgba(255, 255, 255, 0.85) !important;
  border-color: rgba(168, 85, 247, 0.08) !important;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.06) !important;
}
[data-theme="light"] .navbar.scrolled .nav-logo span,
[data-theme="light"] .navbar.scrolled .nav-links a { color: #1e1b2e; }
[data-theme="light"] .navbar.scrolled .nav-links a.active { color: var(--neon-primary); background: rgba(168, 85, 247, 0.08); }
[data-theme="light"] .navbar.scrolled .lang-current,
[data-theme="light"] .navbar.scrolled .theme-btn { color: #1e1b2e; background: rgba(0, 0, 0, 0.04); border-color: rgba(0, 0, 0, 0.08); }
[data-theme="light"] .navbar.scrolled .hamburger { color: #1e1b2e; }

/* Light Theme Discord Fix */
[data-theme="light"] .discord-card h3 { color: #1e1b2e !important; }
[data-theme="light"] .discord-username { background: rgba(168, 85, 247, 0.06); border-color: rgba(168, 85, 247, 0.15); }
[data-theme="light"] .contact-desc, [data-theme="light"] section#contact p { color: #4b5563 !important; }

/* ============================================
   RED THEME OVERRIDES
   ============================================ */
[data-color="red"] {
  --neon-primary: #ef4444;
  --neon-secondary: #f97316;
  --glass-border: rgba(239, 68, 68, 0.12);
}

[data-color="red"] .skill-icon { background: rgba(239, 68, 68, 0.08); border-color: rgba(239, 68, 68, 0.15); }
[data-color="red"] .skill-tags li, [data-color="red"] .card-tags li { color: var(--neon-primary); background: rgba(239, 68, 68, 0.06); border-color: var(--glass-border); }
[data-color="red"] .discord-username code { color: var(--neon-primary); }
[data-color="red"] .copy-btn { border-color: var(--neon-primary); color: var(--neon-primary); }
[data-color="red"] .copy-btn:hover { background: var(--neon-primary); }
[data-color="red"] .back-to-top { border-color: var(--neon-primary); color: var(--neon-primary); background: rgba(239, 68, 68, 0.1); }
[data-color="red"] .back-to-top:hover { background: var(--neon-primary); }
[data-color="red"] .nav-logo svg path, [data-color="red"] .footer-brand svg path { fill: var(--neon-primary) !important; }
[data-color="red"] .profile-photo { filter: drop-shadow(0 0 20px rgba(239, 68, 68, 0.2)); }
[data-color="red"] .profile-wrapper:hover .profile-photo { filter: drop-shadow(0 0 30px rgba(239, 68, 68, 0.4)); }

[data-theme="light"][data-color="red"] .navbar.scrolled { border-color: rgba(239, 68, 68, 0.08) !important; }
[data-theme="light"][data-color="red"] .navbar.scrolled .nav-links a.active { background: rgba(239, 68, 68, 0.08); }
[data-theme="light"][data-color="red"] { --glass-border: rgba(239, 68, 68, 0.15); }

/* ============================================
   RESPONSIVE GLOBAL
   ============================================ */
/* ============================================
   MOBILE RESPONSIVE FIXES
   ============================================ */
@media (max-width: 850px) {
  /* === NAVBAR MOBILE FIX === */
  /* Keep text visible in mobile menu - override desktop scrolled behavior */
  .navbar.scrolled .nav-links a span,
  .navbar.scrolled .nav-logo span,
  .navbar.scrolled .lang-code {
    display: inline !important; /* ✅ Force show text on mobile */
  }

  .navbar.scrolled .nav-links a {
    padding: 0.8rem 1rem !important; /* Full padding with text */
  }

  .navbar.scrolled .lang-current {
    padding: 0.35rem 0.7rem !important;
  }

  /* Mobile menu panel styling */
  .nav-links {
    position: fixed;
    top: 4.5rem;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    width: 90vw;
    max-width: 380px;
    flex-direction: column;
    gap: 0.4rem;
    background: rgba(10, 6, 20, 0.96);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
    z-index: 999;
  }

  .nav-links.active {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
  }

  .nav-links a {
    justify-content: flex-start;
    padding: 0.8rem 1rem;
    border-radius: 16px;
    font-size: 0.95rem;
  }

  .navbar {
    max-width: 94vw;
    border-radius: 28px;
    padding: 0.4rem 0.6rem;
  }

  .hamburger { display: block; }

    /* === FLIP CARDS MOBILE FIX (WIDER CLOSED STATE) === */
  .card-stack {
    max-width: 100%;
    gap: 0.8rem;
  }

  .flip-card {
    height: 85px; /* Slightly shorter to feel wider proportionally */
    border-radius: 18px;
  }

  /* ✅ WIDER closed state: bigger icon + text side by side */
  .flip-card-back {
    flex-direction: row !important; /* Force horizontal layout even on mobile */
    gap: 1rem;
    padding: 0 1.5rem;
    justify-content: center;
  }

  .flip-card-back .card-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    flex-shrink: 0;
  }

  .flip-card-back .card-icon svg {
    width: 24px;
    height: 24px;
  }

  .flip-card-back .card-label {
    font-size: 1rem;
    white-space: nowrap;
  }

  /* ✅ CRITICAL: On mobile, hover does NOT flip - only .active class flips */
  .flip-card:hover .flip-card-inner {
    transform: rotateX(0deg) !important;
  }

  .flip-card.active {
    height: 340px;
    z-index: 100;
    transform: translateY(-5px);
  }

  .flip-card.active .flip-card-inner {
    transform: rotateX(180deg) !important;
  }

  .flip-card.active:hover .flip-card-inner {
    transform: rotateX(180deg) !important;
  }

  /* Front face adjustments for mobile */
  .flip-card-front {
    padding: 1.8rem;
  }

  .flip-card-front h3 {
    font-size: 1.25rem;
    margin-bottom: 0.6rem;
  }

  .flip-card-front p {
    font-size: 0.88rem;
    line-height: 1.6;
    margin-bottom: 1.2rem;
  }

  .flip-card-front .card-tags {
    gap: 0.4rem;
  }

  .flip-card-front .card-tags li {
    font-size: 0.72rem;
    padding: 0.3rem 0.7rem;
  }

  /* === PROFILE IMAGE MOBILE === */
  .profile-wrapper {
    width: 220px;
    height: 220px;
  }

  /* === SECTIONS SPACING === */
  section {
    padding: 5rem 0;
    min-height: auto;
  }

  .container {
    padding: 0 1rem;
  }

  h1 { font-size: 2.2rem !important; }
  h2 { font-size: 2rem !important; }

  /* === PROJECTS GRID MOBILE === */
  .projects-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  /* === SKILLS STACK MOBILE === */
  .card-stack {
    max-width: 100%;
    gap: 1rem;
  }
}

/* Extra small phones */
@media (max-width: 400px) {
  .profile-wrapper {
    width: 180px;
    height: 180px;
  }

  .flip-card.active {
    height: 320px;
  }

  .flip-card-front {
    padding: 1.5rem;
  }

  .flip-card-front h3 {
    font-size: 1.2rem;
  }

  .flip-card-front p {
    font-size: 0.85rem;
  }
}

/* ============================================
   CONTENT PROTECTION STYLES
   ============================================ */

/* Disable text selection globally */
body {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

/* ALLOW selection only on specific readable content */
p, h1, h2, h3, .skill-desc, .flip-card-front p, 
.discord-username code, .footer-tagline {
  -webkit-user-select: text;
  -moz-user-select: text;
  -ms-user-select: text;
  user-select: text;
}

/* Make all images non-draggable */
img {
  -webkit-user-drag: none;
  -khtml-user-drag: none;
  -moz-user-drag: none;
  -o-user-drag: none;
  user-drag: none;
  pointer-events: auto; /* Keep clickable but not draggable */
}

/* Profile photo specifically non-interactive for dragging */
.profile-photo {
  -webkit-touch-callout: none;
  pointer-events: none; /* Prevents drag-to-new-tab entirely */
}

/* Re-enable pointer events on wrapper for hover effects */
.profile-wrapper {
  pointer-events: auto;
}