/* ==========================================================================
   AMEESHA NIMSITH — Portfolio 2026
   Ultra-Premium Dark Cyberpunk Theme
   Animated Motion System + Zero-Glitch Responsive Engine
   ========================================================================== */

/* ── Design Tokens ── */
:root {
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --bg: #08080b;
  --card-bg: #121216;
  --card-border: rgba(255, 255, 255, 0.06);
  --inset-bg: #12121c;
  --text: #f0f1f3;
  --text-muted: #8a8f98;
  --cyan: #00e5ff;
  --purple: #8b5cf6;
  --glow-cyan: rgba(0, 229, 255, 0.25);
  --glow-purple: rgba(139, 92, 246, 0.2);
  --shadow-cyan: 0 0 12px rgba(0, 229, 255, 0.4), 0 0 40px rgba(0, 229, 255, 0.1);
  --shadow-purple: 0 0 12px rgba(139, 92, 246, 0.4), 0 0 40px rgba(139, 92, 246, 0.1);
  --text-glow-cyan: 0 0 8px rgba(0, 229, 255, 0.6), 0 0 20px rgba(0, 229, 255, 0.15);
  --text-glow-purple: 0 0 8px rgba(139, 92, 246, 0.5), 0 0 20px rgba(139, 92, 246, 0.12);
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-smooth: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --taskbar-h: 48px;
  --header-h: 64px;
  --r-lg: 24px;
  --r-md: 16px;
  --r-sm: 10px;
  --r-full: 9999px;
}

/* ═══════════════════════════════════════════
   ☀️ LIGHT THEME — Premium Light Mode Override
   Applied via .light-theme class on <body>
   ═══════════════════════════════════════════ */
body.light-theme {
  --bg: #f0f2f5;
  --card-bg: #ffffff;
  --card-border: rgba(0, 0, 0, 0.08);
  --inset-bg: #f5f6f8;
  --text: #1a1a2e;
  --text-muted: #6b7280;
  --cyan: #0891b2;
  --purple: #7c3aed;
  --glow-cyan: rgba(8, 145, 178, 0.15);
  --glow-purple: rgba(124, 58, 237, 0.12);
  --shadow-cyan: 0 0 12px rgba(8, 145, 178, 0.2), 0 0 40px rgba(8, 145, 178, 0.06);
  --shadow-purple: 0 0 12px rgba(124, 58, 237, 0.2), 0 0 40px rgba(124, 58, 237, 0.06);
  --text-glow-cyan: 0 0 6px rgba(8, 145, 178, 0.3);
  --text-glow-purple: 0 0 6px rgba(124, 58, 237, 0.3);
}

/* ── Reset ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 16px; -webkit-font-smoothing: antialiased; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow: hidden;
  padding-bottom: var(--taskbar-h);
  /* Smooth theme transition */
  transition: background-color 0.4s var(--ease-smooth),
              color 0.4s var(--ease-smooth);
}
/* Transition helper for all themed elements */
.portfolio-card, .card-header, .card-footer, .os-taskbar,
.project-card, .contact-btn, .contact-link, .about-avatar-ring {
  transition: background-color 0.4s var(--ease-smooth),
              border-color 0.4s var(--ease-smooth),
              color 0.4s var(--ease-smooth),
              box-shadow 0.4s var(--ease-smooth);
}
/* Light theme specific overrides */
body.light-theme .portfolio-card {
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.06);
}
body.light-theme .os-taskbar {
  background: rgba(255, 255, 255, 0.88);
  border-top-color: rgba(0, 0, 0, 0.06);
  box-shadow: 0 -2px 20px rgba(0, 0, 0, 0.06);
}
body.light-theme .os-taskbar,
body.light-theme .taskbar-icon,
body.light-theme .taskbar-app,
body.light-theme .taskbar-clock { color: #4b5563; }
body.light-theme .taskbar-app.active { color: var(--cyan); }
body.light-theme .taskbar-app:hover { background: rgba(0,0,0,0.05); }
body.light-theme .contact-btn--email {
  background: var(--text); color: #ffffff;
}
body.light-theme .cta-btn {
  background: var(--text); color: #ffffff;
}
body.light-theme #starfield { opacity: 0.15; }
body.light-theme .portrait-img {
  filter: grayscale(0.3) brightness(1.05) contrast(1.1);
}
body.light-theme .card-header {
  background: var(--card-bg);
}

/* ── Starfield Canvas ── */
#starfield {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* ==========================================================================
   DESKTOP LAYOUT
   ========================================================================== */
.main-container {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  height: calc(100vh - var(--taskbar-h));
  padding: 1.5rem;
}

.portfolio-card {
  width: 100%;
  max-width: 960px;
  height: 580px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--r-lg);
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.6),
    0 0 120px rgba(0, 229, 255, 0.03),
    inset 0 1px 0 rgba(255, 255, 255, 0.03);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  transition: box-shadow 0.6s var(--ease-smooth);
}
.portfolio-card:hover {
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.7),
    0 0 150px rgba(0, 229, 255, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

/* LED accent strips on card edges */
.portfolio-card::before,
.portfolio-card::after {
  content: '';
  position: absolute;
  z-index: 10;
  pointer-events: none;
  animation: ledPulse 3s ease-in-out infinite;
}
.portfolio-card::before {
  top: 0; left: 12%; right: 12%; height: 1px;
  background: linear-gradient(90deg, transparent, var(--glow-cyan), var(--glow-purple), transparent);
}
.portfolio-card::after {
  bottom: 0; left: 18%; right: 18%; height: 1px;
  background: linear-gradient(90deg, transparent, var(--glow-purple), var(--glow-cyan), transparent);
  animation-delay: 1.5s;
}
@keyframes ledPulse { 0%,100% { opacity: 0.3; } 50% { opacity: 1; } }

/* ── Header ── */
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  min-height: var(--header-h);
  padding: 0 2rem;
  border-bottom: 1px solid var(--card-border);
  flex-shrink: 0;
}
.logo-section { display: flex; align-items: center; }
.brand-logo {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  font-size: 1.6rem; font-weight: 800;
  color: var(--text); letter-spacing: -0.03em;
  text-decoration: none;
  white-space: nowrap;
  transition: text-shadow 0.3s var(--ease-smooth);
}
.brand-logo:hover { text-shadow: var(--text-glow-cyan); }
.logo-dot { color: var(--cyan); }
.developer-name {
  font-size: 0.72rem; font-weight: 600;
  color: var(--text-muted); letter-spacing: 0.04em;
  transition: color 0.3s;
}

/* ═══════════════════════════════════════════
   🎯 NAVIGATION — Premium Hover Glow System
   ═══════════════════════════════════════════ */
.nav-section { display: flex; align-items: center; gap: 1rem; }
.nav-menu {
  display: flex; list-style: none; gap: 1.5rem;
}
.nav-link {
  font-size: 0.82rem; font-weight: 500;
  color: var(--text-muted); text-decoration: none;
  position: relative; cursor: pointer;
  transition: color 0.3s var(--ease-smooth),
              text-shadow 0.3s var(--ease-smooth),
              transform 0.3s var(--ease-smooth);
}
.nav-link::after {
  content: ''; position: absolute;
  bottom: -4px; left: 0; width: 0; height: 1.5px;
  background: linear-gradient(90deg, var(--cyan), var(--purple));
  transition: width 0.4s var(--ease-out-expo);
  box-shadow: 0 0 6px rgba(0, 229, 255, 0.4);
}
.nav-link:hover {
  color: var(--text);
  text-shadow: var(--text-glow-cyan);
  transform: translateY(-1px);
}
.nav-link:hover::after { width: 100%; }
.nav-link.active {
  color: var(--text); font-weight: 600;
  text-shadow: var(--text-glow-cyan);
}
.nav-link.active::after { width: 100%; }

/* ═══════════════════════════════════════════
   🍔 HAMBURGER BUTTON — Premium Morph Animation
   ═══════════════════════════════════════════ */
.hamburger-menu {
  display: none;
  flex-direction: column; align-items: center; justify-content: center;
  gap: 5px;
  width: 44px; height: 44px;
  background: #ffffff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  position: relative;
  z-index: 100000;
  transition: box-shadow 0.3s var(--ease-smooth),
              transform 0.3s var(--ease-spring);
}
.hamburger-menu:hover {
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
  transform: scale(1.05);
}
.hamburger-menu.active {
  box-shadow: 0 0 25px rgba(255, 255, 255, 0.3);
}
.hamburger-menu span {
  display: block; width: 18px; height: 2px;
  background: #000000;
  border-radius: 2px;
  transition: transform 0.4s ease-in-out,
              opacity 0.3s ease-in-out,
              background 0.3s;
  transform-origin: center;
}
.hamburger-menu.active span { background: var(--cyan); }
/* X animation — smooth rotation */
.hamburger-menu.active span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.hamburger-menu.active span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger-menu.active span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ── Card Body & Tab Panels ── */
.card-body {
  flex: 1 1 0%;
  min-height: 0;
  overflow: hidden;
  position: relative;
}
.tab-panel {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 1.5rem 2.5rem;
  overflow-y: auto;
  animation: tabFadeIn 0.5s var(--ease-out-expo);
}
.tab-panel.active { display: flex; }
@keyframes tabFadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ═══════════════════════════════════════════
   🏠 HOME TAB — Portrait Glow & CTA Motion
   ═══════════════════════════════════════════ */
#section-home {
  position: relative;
  overflow: hidden;
}
#home-particles {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 0;
  pointer-events: none;
}
.home-content {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  text-align: center;
}
.portrait-wrapper {
  position: relative;
  width: 160px; height: 160px;
  flex-shrink: 0;
}
.portrait-img {
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: 50%;
  filter: grayscale(100%);
  position: relative; z-index: 2;
  transition: filter 0.5s var(--ease-smooth),
              transform 0.5s var(--ease-smooth),
              box-shadow 0.5s var(--ease-smooth);
}
.portrait-img:hover {
  filter: grayscale(100%);
  transform: scale(1.03);
  box-shadow: 0 0 40px rgba(0, 229, 255, 0.2);
}
.portrait-ring {
  position: absolute; inset: -3px;
  border-radius: 50%;
  border: 2px solid transparent;
  background: conic-gradient(from 0deg, var(--cyan), #1e1b4b, transparent, var(--cyan)) border-box;
  -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: ringRotate 5s linear infinite;
  z-index: 3;
}
@keyframes ringRotate { to { transform: rotate(360deg); } }
.portrait-glow {
  position: absolute; inset: -20%;
  background: radial-gradient(circle, var(--glow-cyan) 0%, var(--glow-purple) 40%, transparent 70%);
  filter: blur(30px);
  border-radius: 50%;
  z-index: 0;
  animation: glowPulse 4s ease-in-out infinite;
}
@keyframes glowPulse { 0%,100% { opacity: 0.5; transform: scale(1); } 50% { opacity: 0.85; transform: scale(1.1); } }

.home-text { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; }
.sub-label {
  font-size: 0.68rem; font-weight: 600;
  color: var(--text-muted); letter-spacing: 0.15em;
  text-transform: uppercase;
  animation: fadeInUp 0.6s var(--ease-out-expo) 0.1s both;
}
.headline {
  font-size: clamp(1.2rem, 2.5vw, 1.6rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
  animation: fadeInUp 0.6s var(--ease-out-expo) 0.2s both;
}

/* ── CTA Button: Premium Motion ── */
.cta-btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  margin-top: 0.5rem;
  padding: 12px 28px;
  background: #ffffff !important;
  color: #000000 !important;
  border: none; border-radius: 50px;
  font-family: var(--font); font-size: 0.85rem; font-weight: 600;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s var(--ease-spring),
              box-shadow 0.4s var(--ease-smooth),
              background 0.3s;
  animation: fadeInUp 0.6s var(--ease-out-expo) 0.3s both;
}
/* Shimmer sweep on hover */
.cta-btn::before {
  content: '';
  position: absolute; top: 0; left: -75%;
  width: 50%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transform: skewX(-20deg);
  transition: left 0.6s var(--ease-out-expo);
}
.cta-btn:hover::before { left: 130%; }
.cta-btn:hover {
  transform: translateY(-3px) scale(1.04);
  box-shadow:
    0 10px 35px rgba(0, 0, 0, 0.4),
    0 0 20px rgba(0, 229, 255, 0.15),
    0 0 50px rgba(139, 92, 246, 0.08);
}
.cta-btn:active {
  transform: translateY(-1px) scale(0.98);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}
.cta-arrow {
  transition: transform 0.3s var(--ease-spring);
  display: inline-block;
}
.cta-btn:hover .cta-arrow { transform: translateX(5px); }

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

/* ═══════════════════════════════════════════
   👤 ABOUT TAB
   ═══════════════════════════════════════════ */
.about-container {
  max-width: 620px; width: 100%; text-align: center;
  overflow-y: auto; max-height: 100%;
  padding: 0.5rem;
}
.about-header { margin-bottom: 1rem; }
.about-avatar-ring {
  width: 64px; height: 64px;
  border-radius: 50%;
  margin: 0 auto 0.5rem;
  overflow: hidden;
  border: 2px solid rgba(0, 229, 255, 0.15);
  box-shadow: 0 0 20px rgba(0, 229, 255, 0.1);
  transition: box-shadow 0.4s var(--ease-smooth),
              border-color 0.4s var(--ease-smooth);
}
.about-avatar-ring:hover {
  box-shadow: 0 0 30px rgba(0, 229, 255, 0.2);
  border-color: rgba(0, 229, 255, 0.3);
}
.about-avatar {
  width: 100%; height: 100%;
  object-fit: cover; object-position: center 20%;
  filter: grayscale(1) brightness(1.1) contrast(1.2);
  border-radius: 50%;
  transition: filter 0.4s;
}
.about-avatar-ring:hover .about-avatar {
  filter: grayscale(0.5) brightness(1.2) contrast(1.1);
}
.about-name {
  font-size: 1.2rem; font-weight: 700;
  color: var(--text); margin-bottom: 2px;
}
.about-title {
  font-size: 0.65rem; font-weight: 500;
  color: var(--cyan); letter-spacing: 0.06em;
  text-transform: uppercase;
  text-shadow: 0 0 10px rgba(0, 229, 255, 0.2);
}
.about-body { text-align: left; }
.about-body p {
  font-size: 0.82rem; color: var(--text-muted);
  line-height: 1.7; margin-bottom: 0.75rem;
}
.about-body p:last-child { margin-bottom: 0; }
.about-cta-text {
  font-weight: 600 !important; color: var(--text) !important;
  font-style: italic; text-align: center;
  margin-top: 0.25rem; font-size: 0.88rem !important;
  text-shadow: var(--text-glow-cyan);
}

/* ═══════════════════════════════════════════
   📂 PORTFOLIO TAB — Dynamic Hover Cards
   ═══════════════════════════════════════════ */
.portfolio-dashboard {
  width: 100%; max-width: 860px;
  position: relative;
}
.portfolio-header {
  display: flex; align-items: center; gap: 0.5rem;
  margin-bottom: 1rem;
}
.portfolio-label {
  font-size: 0.65rem; font-weight: 600;
  color: var(--cyan); letter-spacing: 0.08em;
  text-transform: uppercase;
  text-shadow: 0 0 6px rgba(0, 229, 255, 0.3);
}
.portfolio-user {
  font-size: 0.7rem; font-weight: 600;
  color: var(--text);
}
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}
.project-card {
  background: var(--inset-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--r-sm);
  padding: 1rem;
  cursor: pointer;
  display: flex; flex-direction: column;
  min-height: 90px;
  position: relative;
  overflow: hidden;
  transition: transform 0.35s var(--ease-spring),
              border-color 0.35s var(--ease-smooth),
              box-shadow 0.4s var(--ease-smooth),
              background 0.35s var(--ease-smooth);
}
/* Gradient accent bar — hidden by default */
.project-card::before {
  content: ''; position: absolute;
  top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--cyan), var(--purple));
  opacity: 0;
  transition: opacity 0.35s var(--ease-smooth);
}
/* Inner glow shimmer — hidden by default */
.project-card::after {
  content: ''; position: absolute;
  inset: 0; border-radius: var(--r-sm);
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.03) 0%, transparent 50%, rgba(139, 92, 246, 0.03) 100%);
  opacity: 0;
  transition: opacity 0.35s var(--ease-smooth);
  pointer-events: none;
}
.project-card:hover {
  transform: translateY(-3px) scale(1.02);
  border-color: rgba(0, 229, 255, 0.2);
  box-shadow:
    0 8px 30px rgba(0, 0, 0, 0.4),
    0 0 15px rgba(0, 229, 255, 0.08),
    0 0 40px rgba(139, 92, 246, 0.05);
  background: rgba(18, 18, 28, 0.95);
}
.project-card:hover::before { opacity: 1; }
.project-card:hover::after { opacity: 1; }
.project-card:active {
  transform: translateY(-1px) scale(0.99);
}
.project-name {
  font-size: 0.78rem; font-weight: 600;
  color: var(--cyan); margin-bottom: 4px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: text-shadow 0.3s;
}
.project-card:hover .project-name {
  text-shadow: 0 0 8px rgba(0, 229, 255, 0.4);
}
.project-desc {
  font-size: 0.68rem; color: var(--text-muted);
  line-height: 1.4; margin-bottom: 0.5rem;
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}
.project-meta {
  display: flex; align-items: center; gap: 0.75rem;
  margin-top: auto;
  font-size: 0.6rem; color: var(--text-muted);
}
.project-lang {
  display: flex; align-items: center; gap: 4px;
}
.lang-dot {
  width: 7px; height: 7px;
  border-radius: 50%; flex-shrink: 0;
  transition: box-shadow 0.3s;
}
.project-card:hover .lang-dot {
  box-shadow: 0 0 6px currentColor;
}
.grid-loading {
  grid-column: 1 / -1; text-align: center;
  color: var(--text-muted); font-size: 0.8rem;
  padding: 2rem;
}

/* ═══════════════════════════════════════════
   📧 CONTACT TAB — Two-Column Grid + Map
   ═══════════════════════════════════════════ */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  width: 100%; max-width: 780px;
  align-items: center;
}
.contact-info {
  display: flex; flex-direction: column;
  gap: 0.75rem;
}
.contact-heading {
  font-size: 1.4rem; font-weight: 700;
  color: var(--text); margin-bottom: 0;
}
.contact-subtext {
  font-size: 0.8rem; color: var(--text-muted);
  margin-bottom: 0.5rem; line-height: 1.5;
}
.contact-links {
  display: flex; gap: 0.75rem;
  margin-bottom: 0.25rem;
}
.contact-link {
  display: flex; align-items: center; gap: 6px;
  text-decoration: none; font-size: 0.75rem; font-weight: 500;
  color: var(--text-muted);
  padding: 0.5rem 0.75rem;
  border-radius: var(--r-sm);
  border: 1px solid var(--card-border);
  transition: all 0.3s var(--ease-smooth);
}
.contact-link:hover {
  color: var(--cyan);
  border-color: rgba(0, 229, 255, 0.25);
  background: rgba(0, 229, 255, 0.05);
  box-shadow: 0 0 15px rgba(0, 229, 255, 0.1);
  transform: translateY(-2px);
}
.contact-link svg { flex-shrink: 0; }
.contact-actions {
  display: flex; flex-direction: column;
  gap: 0.5rem;
}
.contact-btn {
  display: flex; align-items: center; justify-content: center;
  gap: 0.5rem; padding: 0.7rem 1.2rem;
  border-radius: var(--r-full);
  text-decoration: none; font-size: 0.78rem; font-weight: 500;
  position: relative; overflow: hidden;
  transition: transform 0.3s var(--ease-spring),
              box-shadow 0.4s var(--ease-smooth);
}
.contact-btn::before {
  content: '';
  position: absolute; top: 0; left: -75%;
  width: 50%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
  transform: skewX(-20deg);
  transition: left 0.6s var(--ease-out-expo);
}
.contact-btn:hover::before { left: 130%; }
.contact-btn:hover { transform: translateY(-2px); }
.contact-btn:active { transform: translateY(0) scale(0.98); }
.contact-btn--email { background: var(--text); color: var(--bg); }
.contact-btn--email:hover {
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3), 0 0 20px rgba(255, 255, 255, 0.05);
}
.contact-btn--whatsapp { background: #25D366; color: white; }
.contact-btn--whatsapp:hover {
  box-shadow: 0 8px 30px rgba(37, 211, 102, 0.3), 0 0 15px rgba(37, 211, 102, 0.15);
}

/* ── 3D Hologram Globe ── */
.contact-map {
  display: flex; align-items: center; justify-content: center;
}
#cyber-globe-container {
  position: relative;
  width: 300px;
  height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
}
/* Subtle radial glow matching the theme's cyan */
#cyber-globe-container::after {
  content: '';
  position: absolute;
  top: 15%; left: 15%; right: 15%; bottom: 15%;
  background: radial-gradient(circle, var(--glow-cyan) 0%, transparent 70%);
  filter: blur(35px);
  opacity: 0.4;
  pointer-events: none;
  z-index: 0;
}
#globe-canvas {
  width: 100%;
  height: 100%;
  position: relative;
  z-index: 1;
}

/* ═══════════════════════════════════════════
   ↕️ SIDE TEXT (PREV / NEXT)
   ═══════════════════════════════════════════ */
.side-text {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  writing-mode: vertical-rl;
  letter-spacing: 3px;
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.3);
  z-index: 50;
  cursor: pointer;
  transition: color 0.3s ease, text-shadow 0.3s ease;
}
.side-text:hover {
  color: var(--text);
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
}
.prev-text {
  left: 20px;
  transform: translateY(-50%) rotate(180deg);
}
.next-text {
  right: 20px;
}

/* ═══════════════════════════════════════════
   🦶 CARD FOOTER — Dot Glow
   ═══════════════════════════════════════════ */
.card-footer {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.6rem 2rem;
  border-top: 1px solid var(--card-border);
  flex-shrink: 0;
}
.footer-info {
  flex: 1; text-align: left;
}
.footer-label {
  flex: 1; text-align: right;
}
.footer-info, .footer-label {
  font-size: 0.6rem; color: var(--text-muted);
  letter-spacing: 0.1em; text-transform: uppercase;
}
.footer-dots { display: flex; gap: 8px; align-items: center; justify-content: center; }
.footer-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--text-muted); opacity: 0.3;
  cursor: pointer;
  transition: all 0.3s var(--ease-spring);
}
.footer-dot.active {
  opacity: 1; background: var(--cyan);
  transform: scale(1.4);
  box-shadow: 0 0 8px rgba(0, 229, 255, 0.5);
}
.footer-dot:hover {
  opacity: 0.8; transform: scale(1.2);
  box-shadow: 0 0 6px rgba(0, 229, 255, 0.3);
}

/* ═══════════════════════════════════════════
   🖥️ OS TASKBAR — Fixed Bottom
   ═══════════════════════════════════════════ */
.os-taskbar {
  position: fixed; bottom: 0; left: 0; width: 100%;
  height: var(--taskbar-h);
  background: rgba(10, 10, 14, 0.92);
  backdrop-filter: blur(20px) saturate(1.8);
  -webkit-backdrop-filter: blur(20px) saturate(1.8);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 1.5rem;
  z-index: 1000;
  box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.4);
}
.taskbar-left, .taskbar-right { display: flex; align-items: center; gap: 0.75rem; }
.taskbar-center { display: flex; align-items: center; gap: 4px; }
.taskbar-icon {
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  color: rgba(255, 255, 255, 0.6); cursor: pointer;
  border-radius: var(--r-sm);
  transition: background 0.25s var(--ease-smooth),
              color 0.25s var(--ease-smooth),
              box-shadow 0.25s;
}
.taskbar-icon:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--cyan);
  box-shadow: 0 0 10px rgba(0, 229, 255, 0.1);
}
.taskbar-app {
  width: 40px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  color: rgba(255, 255, 255, 0.5); cursor: pointer;
  border-radius: var(--r-sm); position: relative;
  transition: background 0.25s var(--ease-smooth),
              color 0.25s var(--ease-smooth),
              transform 0.2s var(--ease-spring);
}
.taskbar-app:hover {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.9);
  transform: translateY(-1px);
}
.taskbar-app.active { color: rgba(255, 255, 255, 0.95); }
.taskbar-app.active::after {
  content: ''; position: absolute; bottom: 2px;
  left: 50%; transform: translateX(-50%);
  width: 14px; height: 2px;
  background: var(--cyan); border-radius: 1px;
  box-shadow: 0 0 6px rgba(0, 229, 255, 0.4);
}
/* ═══════════════════════════════════════════
   🌗 THEME TOGGLE BUTTON (in Taskbar)
   ═══════════════════════════════════════════ */
.theme-toggle {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.6);
  transition: all 0.3s var(--ease-smooth);
  position: relative;
}
.theme-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--cyan);
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.15);
  transform: scale(1.08);
}
/* Dark mode: show moon, hide sun */
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }
/* Light mode: show sun, hide moon */
body.light-theme .theme-toggle .icon-sun { display: block; }
body.light-theme .theme-toggle .icon-moon { display: none; }
body.light-theme .theme-toggle {
  background: rgba(0, 0, 0, 0.06);
  border-color: rgba(0, 0, 0, 0.1);
  color: #6b7280;
}
body.light-theme .theme-toggle:hover {
  background: rgba(0, 0, 0, 0.1);
  color: var(--purple);
  box-shadow: 0 0 12px rgba(124, 58, 237, 0.15);
}

.taskbar-clock {
  font-size: 0.68rem; color: rgba(255, 255, 255, 0.6);
  letter-spacing: 0.02em; min-width: 56px; text-align: right;
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(0, 229, 255, 0.12); border-radius: 2px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 229, 255, 0.25);
}
::selection { background: var(--cyan); color: var(--bg); }


/* ==========================================================================
   📱 MOBILE RESPONSIVE — max-width: 768px
   Zero-glitch glassmorphism matrix with premium motion
   ========================================================================== */
@media (max-width: 768px) {

  /* ── Body: enable scroll ── */
  body {
    overflow-y: auto !important;
    overflow-x: hidden !important;
  }

  /* ── Main container: release fixed height ── */
  .main-container {
    height: auto !important;
    min-height: auto;
    padding: 0;
    align-items: flex-start;
    padding-bottom: var(--taskbar-h);
  }

  /* ── Card: full-width, auto-height, no clip ── */
  .portfolio-card {
    height: auto !important;
    max-height: none !important;
    border-radius: 0;
    overflow: visible !important;
    border-left: none; border-right: none;
    box-shadow: none;
  }
  .portfolio-card:hover { box-shadow: none; }
  .portfolio-card::before,
  .portfolio-card::after { display: none; }

  /* ── Header: sticky, 64px clamped ── */
  .card-header {
    height: 64px !important;
    min-height: 64px;
    max-height: 64px;
    padding: 0 1rem !important;
    position: sticky; top: 0;
    z-index: 1000;
    background: var(--card-bg);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  }
  .card-header svg,
  .card-header img {
    max-height: 28px !important;
    width: auto !important;
  }
  /* ── Brand logo: keep name visible, scale down for mobile ── */
  .brand-logo {
    display: flex !important;
    align-items: baseline;
    white-space: nowrap;
    font-size: 1.2rem;
    gap: 0.3rem;
    overflow: visible !important;
  }
  .developer-name {
    display: inline !important;
    font-size: 0.62rem;
    color: var(--text-muted);
  }

  /* ═══════════════════════════════════════════
     📱 MOBILE MENU — iOS Dark Glassmorphism Panel
     Smooth slide-in with premium easing
     ═══════════════════════════════════════════ */
  .nav-menu {
    position: fixed !important;
    top: 0; right: -100%;
    width: 100%; max-width: 290px;
    height: 100vh; height: 100dvh;
    margin: 0; padding: 100px 2rem 2rem;
    background: rgba(18, 18, 24, 0.98) !important;
    backdrop-filter: blur(30px) saturate(1.8) !important;
    -webkit-backdrop-filter: blur(30px) saturate(1.8) !important;
    border-left: 1px solid rgba(0, 229, 255, 0.06);
    display: flex !important;
    flex-direction: column;
    gap: 0;
    list-style: none;
    z-index: 99999 !important;
    transition: right 0.5s cubic-bezier(0.19, 1, 0.22, 1) !important;
    box-shadow: -30px 0 80px rgba(0, 0, 0, 0.9);
    overflow-y: auto;
  }
  .nav-menu.open { right: 0 !important; }

  /* Subtle glow line at left border of menu */
  .nav-menu::before {
    content: ''; position: absolute;
    top: 10%; bottom: 10%; left: 0; width: 1px;
    background: linear-gradient(180deg, transparent, rgba(0, 229, 255, 0.3), rgba(139, 92, 246, 0.2), transparent);
    opacity: 0;
    transition: opacity 0.4s 0.2s;
  }
  .nav-menu.open::before { opacity: 1; }

  .nav-menu li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    transform: translateX(20px);
    opacity: 0;
    transition: transform 0.4s var(--ease-out-expo),
                opacity 0.4s var(--ease-out-expo);
  }
  .nav-menu li:last-child { border-bottom: none; }

  /* Stagger animation for menu items */
  .nav-menu.open li { transform: translateX(0); opacity: 1; }
  .nav-menu.open li:nth-child(1) { transition-delay: 0.08s; }
  .nav-menu.open li:nth-child(2) { transition-delay: 0.14s; }
  .nav-menu.open li:nth-child(3) { transition-delay: 0.20s; }
  .nav-menu.open li:nth-child(4) { transition-delay: 0.26s; }

  .nav-link {
    display: block !important;
    font-size: 1.1rem !important;
    font-weight: 600 !important;
    color: rgba(255, 255, 255, 0.6) !important;
    padding: 1.25rem 0 !important;
    transition: color 0.3s var(--ease-smooth),
                padding-left 0.3s var(--ease-smooth),
                text-shadow 0.3s !important;
    text-shadow: none;
  }
  .nav-link::after { display: none !important; }
  .nav-link:hover,
  .nav-link.active {
    color: var(--cyan) !important;
    padding-left: 12px !important;
    text-shadow: var(--text-glow-cyan) !important;
  }

  .hamburger-menu { display: flex !important; }

  /* ── Card body: release constraints ── */
  .card-body {
    flex: none !important;
    overflow: visible !important;
  }

  /* ── Tab panels: static flow, no absolute ── */
  .tab-panel {
    position: static !important;
    height: auto !important;
    min-height: 0;
    overflow: visible !important;
    display: none !important;
    padding: 1.5rem 1rem 2rem !important;
    justify-content: flex-start;
  }
  .tab-panel.active { display: flex !important; }

  /* Home min-height for nice centering */
  #section-home {
    min-height: calc(100vh - 64px - var(--taskbar-h) - 50px);
    justify-content: center;
  }

  .portrait-wrapper {
    width: 130px !important; height: 130px !important;
  }
  .headline { font-size: 1.15rem; }

  /* About */
  .about-container {
    max-height: none !important; overflow: visible !important;
    padding: 0 !important;
  }

  /* Portfolio grid: 1-column */
  .projects-grid {
    grid-template-columns: 1fr !important;
    gap: 0.75rem;
  }

  /* Contact — single column on mobile */
  .contact-grid {
    grid-template-columns: 1fr !important;
    gap: 1.5rem;
    text-align: center;
  }
  .contact-info { align-items: center; }
  .contact-links { justify-content: center; }
  .contact-heading { font-size: 1.25rem; }
  .contact-link { justify-content: center; }
  .contact-map { order: -1; }
  #cyber-globe-container {
    width: 240px; height: 240px;
  }

  /* Hide Side Texts */
  .side-text { display: none !important; }

  /* Footer */
  .card-footer { padding: 0.6rem 1rem; }

  /* Taskbar stays fixed */
  .os-taskbar { z-index: 9999; padding: 0 0.75rem; }

  /* Reduce starfield on mobile for perf */
  #starfield { opacity: 0.5; }
}

/* ── Extra small screens ── */
@media (max-width: 400px) {
  .portrait-wrapper { width: 110px !important; height: 110px !important; }
  .headline { font-size: 1.05rem; }
  .contact-heading { font-size: 1.1rem; }
}