/* ===== EXTENDED MAIN STYLES FOR COMPLETE PORTFOLIO ===== */

/* === LOADING SCREEN === */
.loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: linear-gradient(135deg, var(--primary-600), var(--accent-600));
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loading-screen.hidden {
  opacity: 0;
  visibility: hidden;
}

.loading-content {
  text-align: center;
  color: white;
}

.loading-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}

.loading-spinner {
  width: 60px;
  height: 60px;
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-top: 4px solid white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* === BACKGROUND EFFECTS === */
.bg-effects {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}

.bg-gradient-orb {
  position: absolute;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-500), var(--accent-500));
  opacity: 0.1;
  animation: float 6s ease-in-out infinite;
  filter: blur(40px);
}

.bg-gradient-orb.orb-1 {
  width: 400px;
  height: 400px;
  top: -200px;
  left: -200px;
  animation-delay: 0s;
}

.bg-gradient-orb.orb-2 {
  width: 300px;
  height: 300px;
  top: 50%;
  right: -150px;
  animation-delay: 2s;
}

.bg-gradient-orb.orb-3 {
  width: 500px;
  height: 500px;
  bottom: -250px;
  left: 30%;
  animation-delay: 4s;
}

/* === THEME TOGGLE === */
.theme-toggle {
  position: fixed;
  top: var(--space-6);
  right: var(--space-6);
  width: 50px;
  height: 50px;
  border: none;
  border-radius: var(--border-radius-full);
  cursor: pointer;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-base);
}

.theme-toggle:hover {
  transform: scale(1.1);
}

.theme-icon {
  position: absolute;
  transition: all var(--transition-base);
}

[data-theme="light"] .dark-icon {
  opacity: 0;
  transform: rotate(180deg) scale(0);
}

[data-theme="dark"] .light-icon {
  opacity: 0;
  transform: rotate(-180deg) scale(0);
}

/* === NAVIGATION === */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: var(--space-4) 0;
  transition: all var(--transition-base);
  backdrop-filter: blur(10px);
}

.navbar.scrolled {
  padding: var(--space-2) 0;
  box-shadow: var(--shadow-lg);
}

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

.nav-brand {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-weight: var(--font-bold);
  font-size: var(--text-xl);
}

.brand-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--gradient-primary);
  border-radius: var(--border-radius-lg);
  color: white;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-6);
}

.nav-link {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--border-radius-lg);
  text-decoration: none;
  color: var(--text-secondary);
  font-weight: var(--font-medium);
  transition: all var(--transition-base);
  position: relative;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary-600);
  background: var(--glass-bg);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 2px;
  background: var(--gradient-primary);
  border-radius: var(--border-radius-full);
}

/* Navigation Badges */
.nav-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  background: var(--primary-600);
  color: white;
  font-size: var(--text-xs);
  font-weight: var(--font-bold);
  border-radius: var(--border-radius-full);
  padding: 0 var(--space-1);
}

.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: var(--space-2);
  background: none;
  border: none;
  cursor: pointer;
}

.mobile-menu-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: var(--border-radius-full);
  transition: all var(--transition-base);
}

/* === MOBILE MENU === */
.mobile-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 280px;
  height: 100vh;
  z-index: 1100;
  padding: var(--space-6);
  transition: right var(--transition-base);
}

.mobile-menu.active {
  right: 0;
}

.mobile-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-8);
}

.mobile-menu-close {
  background: none;
  border: none;
  font-size: var(--text-xl);
  cursor: pointer;
  color: var(--text-primary);
}

.mobile-nav-links {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.mobile-nav-link {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--border-radius-lg);
  text-decoration: none;
  color: var(--text-primary);
  font-weight: var(--font-medium);
  transition: all var(--transition-base);
}

.mobile-nav-link:hover {
  background: var(--bg-secondary);
}

/* === SCROLL TO TOP === */
.scroll-to-top {
  position: fixed;
  bottom: var(--space-6);
  right: var(--space-6);
  width: 50px;
  height: 50px;
  border: none;
  border-radius: var(--border-radius-full);
  cursor: pointer;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all var(--transition-base);
}

.scroll-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.scroll-to-top:hover {
  transform: translateY(-2px);
}

/* === HERO SECTION === */
.hero-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  padding: var(--space-20) 0;
}

.hero-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-16);
  align-items: center;
}

.hero-greeting {
  margin-bottom: var(--space-4);
}

.greeting-text {
  color: var(--text-secondary);
  font-size: var(--text-lg);
  font-weight: var(--font-medium);
}

.hero-title {
  font-size: var(--text-6xl);
  font-weight: var(--font-extrabold);
  line-height: var(--leading-tight);
  margin-bottom: var(--space-6);
}

.hero-subtitle {
  font-size: var(--text-2xl);
  color: var(--text-secondary);
  margin-bottom: var(--space-6);
  min-height: 40px;
}

.hero-description {
  font-size: var(--text-lg);
  color: var(--text-secondary);
  line-height: var(--leading-relaxed);
  margin-bottom: var(--space-8);
}

.hero-buttons {
  display: flex;
  gap: var(--space-4);
  margin-bottom: var(--space-12);
}

/* CTA Highlight for "Digitale Bewerbung" */
#btn-bewerbung {
  position: relative;
}

#btn-bewerbung.cta-highlight,
#btn-bewerbung:focus-visible {
  box-shadow: 0 0 18px rgba(168, 85, 247, 0.55), 0 0 0 6px rgba(168, 85, 247, 0.15);
}

#btn-bewerbung.cta-pulse::after {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: var(--border-radius-lg);
  border: 2px solid rgba(168, 85, 247, 0.6); /* accent-500 */
  box-shadow: 0 0 18px rgba(168, 85, 247, 0.6);
  animation: ctaPulse 1.8s ease-out infinite;
  pointer-events: none;
}

@keyframes ctaPulse {
  0% { transform: scale(0.98); opacity: 1; }
  70% { transform: scale(1.08); opacity: 0; }
  100% { transform: scale(1.1); opacity: 0; }
}

/* Fake cursor that guides to the Bewerbung-Button */
.fake-cursor {
  position: fixed;
  z-index: 2000;
  width: 0;
  height: 0;
  border-left: 16px solid #fff;
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3));
  transform: translate(20vw, 20vh);
  opacity: 0;
  transition: transform 900ms var(--transition-bezier), opacity 300ms ease;
  pointer-events: none;
}

.fake-cursor.visible {
  opacity: 1;
}

.fake-cursor.click {
  transition: transform 150ms ease;
}

/* Cursor halo and label for strong guidance */
.cursor-halo {
  position: fixed;
  z-index: 1999;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 2px solid rgba(168, 85, 247, 0.9);
  box-shadow: 0 0 24px rgba(168, 85, 247, 0.9), 0 0 48px rgba(168, 85, 247, 0.35);
  transform: translate(18vw, 18vh);
  opacity: 0;
  transition: transform 900ms var(--transition-bezier), opacity 300ms ease;
  pointer-events: none;
  background: radial-gradient(closest-side, rgba(168,85,247,0.15), transparent 70%);
}

.cursor-halo.visible,
.fake-cursor.visible {
  opacity: 1;
}

.cursor-label {
  position: fixed;
  z-index: 3000;
  background: rgba(0,0,0,0.8);
  color: #fff;
  font-size: 12px;
  line-height: 1;
  padding: 6px 8px;
  border-radius: 6px;
  transform: translate(-9999px, -9999px) scale(0.9);
  opacity: 0;
  transition: transform 250ms ease, opacity 250ms ease;
  pointer-events: none;
  box-shadow: 0 6px 18px rgba(0,0,0,0.35);
}

.cursor-label.show {
  opacity: 1;
  transform: translate(var(--x), var(--y)) scale(1);
}

.cursor-click-ring {
  position: fixed;
  z-index: 2500;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(168,85,247,0.9);
  border-radius: 999px;
  opacity: 0.9;
  pointer-events: none;
  animation: clickRing 500ms ease-out forwards;
}

@keyframes clickRing {
  0% { transform: translate(var(--x), var(--y)) scale(0.7); opacity: 0.9; box-shadow: 0 0 10px rgba(168,85,247,0.8); }
  70% { transform: translate(var(--x), var(--y)) scale(1.6); opacity: 0.35; box-shadow: 0 0 22px rgba(168,85,247,0.6); }
  100% { transform: translate(var(--x), var(--y)) scale(1.9); opacity: 0; box-shadow: 0 0 0 rgba(0,0,0,0); }
}

.hero-stats {
  display: flex;
  gap: var(--space-8);
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-size: var(--text-3xl);
  font-weight: var(--font-bold);
  line-height: var(--leading-tight);
}

.stat-label {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  font-weight: var(--font-medium);
}

/* === HERO VISUAL === */
.hero-image-container {
  position: relative;
  display: flex;
  justify-content: center;
}

.hero-image-border {
  position: relative;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: var(--gradient-primary);
  padding: 6px;
  animation: float 3s ease-in-out infinite;
}

.hero-image {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 20%;
  border: 4px solid var(--bg-primary);
}

/* ==========================================
   ENHANCED FLOATING ELEMENTS SYSTEM
   ========================================== */

.floating-elements {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
}

.floating-icon {
  position: absolute;
  width: 56px;
  height: 56px;
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: var(--primary-600);
  animation: float 3s ease-in-out infinite;
  animation-delay: var(--delay);
  transition: all var(--transition-base);
  box-shadow: var(--shadow-lg);
  cursor: pointer;
  pointer-events: auto;
  z-index: 1; /* Lower than profile image */
}

.floating-icon:hover {
  transform: translateY(-8px) scale(1.1);
  box-shadow: var(--shadow-xl);
  background: var(--glass-bg-medium);
}

/* ==========================================
   SAFE FLOATING ICONS POSITIONING
   Positioned to avoid overlapping profile image
   ========================================== */

.hero-image-border {
  position: relative;
  z-index: 10; /* Higher than floating icons */
}

.tech-icon-1 { 
  top: 8%; 
  right: 5%; 
  animation-duration: 3.2s;
  color: #e34c26; /* HTML5 orange */
}

.tech-icon-2 { 
  top: 45%; 
  left: 2%; 
  animation-duration: 3.6s;
  color: #1572b6; /* CSS3 blue */
}

.tech-icon-3 { 
  bottom: 25%; 
  right: 3%; 
  animation-duration: 3.0s;
  color: #f7df1e; /* JavaScript yellow */
}

.tech-icon-4 { 
  bottom: 8%; 
  left: 15%; 
  animation-duration: 3.4s;
  color: #61dafb; /* React cyan */
}

.tech-icon-5 { 
  top: 2%; 
  left: 25%; 
  animation-duration: 3.8s;
  color: var(--primary-600); /* AI/ML theme color */
}

/* Tooltip system for floating icons */
.floating-icon::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: -35px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-base);
  pointer-events: none;
  z-index: 10;
}

.floating-icon:hover::after {
  opacity: 1;
  visibility: visible;
  bottom: -30px;
}

/* === TYPEWRITER EFFECT === */
.typewriter::after {
  content: '|';
  animation: blink 1s infinite;
}

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

/* === SECTIONS === */
.section-padding {
  padding: var(--space-32) 0;
}

.section-header {
  margin-bottom: var(--space-16);
}

.section-badge {
  display: inline-block;
  padding: var(--space-2) var(--space-4);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius-full);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  color: var(--primary-600);
  margin-bottom: var(--space-4);
}

.section-title {
  font-size: var(--text-5xl);
  font-weight: var(--font-bold);
  line-height: var(--leading-tight);
  margin-bottom: var(--space-6);
}

.section-description {
  font-size: var(--text-lg);
  color: var(--text-secondary);
  line-height: var(--leading-relaxed);
  max-width: 600px;
  margin: 0 auto;
}

/* === APP CATEGORIES === */
.app-categories {
  display: flex;
  justify-content: center;
  gap: var(--space-3);
  margin-bottom: var(--space-12);
  flex-wrap: wrap;
}

.category-filter {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-full);
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: var(--font-medium);
  transition: all var(--transition-base);
  cursor: pointer;
}

.category-filter:hover,
.category-filter.active {
  background: var(--primary-600);
  color: white;
  border-color: var(--primary-600);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* === APPS GRID === */
.apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: var(--space-8);
}

.app-card {
  position: relative;
  overflow: hidden;
  transition: all var(--transition-base);
}

.app-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-primary);
  transform: translateX(-100%);
  transition: transform var(--transition-base);
}

.app-card:hover::before {
  transform: translateX(0);
}

.app-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-4);
}

.app-icon {
  width: 60px;
  height: 60px;
  background: var(--gradient-primary);
  border-radius: var(--border-radius-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-2xl);
  color: white;
}

.app-status {
  display: flex;
  align-items: center;
}

.status-badge {
  padding: var(--space-1) var(--space-3);
  border-radius: var(--border-radius-full);
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-badge.new {
  background: var(--gradient-accent);
  color: white;
}

.status-badge.updated {
  background: var(--gradient-secondary);
  color: white;
}

.app-title {
  font-size: var(--text-xl);
  font-weight: var(--font-semibold);
  margin-bottom: var(--space-3);
}

.app-description {
  color: var(--text-secondary);
  line-height: var(--leading-relaxed);
  margin-bottom: var(--space-4);
}

.app-features {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-6);
}

.feature-tag {
  padding: var(--space-1) var(--space-3);
  background: var(--bg-tertiary);
  border-radius: var(--border-radius-full);
  font-size: var(--text-xs);
  font-weight: var(--font-medium);
  color: var(--text-secondary);
}

.app-actions {
  display: flex;
  gap: var(--space-3);
}

/* === GAMES SECTION === */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-6);
}

.game-card {
  position: relative;
  overflow: hidden;
  transition: all var(--transition-base);
}

.game-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-accent);
  transform: translateX(-100%);
  transition: transform var(--transition-base);
}

.game-card:hover::before {
  transform: translateX(0);
}

.game-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

.game-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-4);
}

.game-icon {
  width: 50px;
  height: 50px;
  background: var(--gradient-accent);
  border-radius: var(--border-radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-xl);
  color: white;
}

.game-title {
  font-size: var(--text-lg);
  font-weight: var(--font-semibold);
  margin-bottom: var(--space-3);
}

.game-description {
  color: var(--text-secondary);
  line-height: var(--leading-relaxed);
  margin-bottom: var(--space-4);
}

.game-features {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}

.game-actions {
  display: flex;
  gap: var(--space-3);
}

/* === CERTIFICATES === */
.certificates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: var(--space-6);
}

.certificate-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: all var(--transition-base);
  position: relative;
}

.certificate-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-primary);
  transform: scaleX(0);
  transition: transform var(--transition-base);
}

.certificate-card:hover::before {
  transform: scaleX(1);
}

.certificate-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

.cert-image {
  width: 100%;
  height: 160px;
  overflow: hidden;
  border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-primary);
  position: relative;
}

.cert-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-base);
}

.cert-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  color: white;
  text-align: center;
}

.cert-placeholder i {
  font-size: 3rem;
  opacity: 0.9;
}

.cert-placeholder span {
  font-size: var(--text-lg);
  font-weight: var(--font-semibold);
  opacity: 0.8;
}

.certificate-card:hover .cert-image img {
  transform: scale(1.05);
}

.cert-content {
  padding: var(--space-6);
  flex: 1;
  display: flex;
  flex-direction: column;
}

.cert-content h3 {
  font-size: var(--text-lg);
  font-weight: var(--font-semibold);
  margin-bottom: var(--space-2);
  line-height: var(--leading-tight);
}

.cert-issuer {
  color: var(--primary-600);
  font-weight: var(--font-medium);
  margin-bottom: var(--space-3);
  font-size: var(--text-sm);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.cert-description {
  color: var(--text-secondary);
  line-height: var(--leading-relaxed);
  margin-bottom: var(--space-4);
  flex: 1;
}

.cert-skills {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}

.skill-tag {
  padding: var(--space-1) var(--space-3);
  background: var(--primary-100);
  color: var(--primary-700);
  border-radius: var(--border-radius-full);
  font-size: var(--text-xs);
  font-weight: var(--font-medium);
  border: 1px solid var(--primary-200);
}

[data-theme="dark"] .skill-tag {
  background: var(--primary-900);
  color: var(--primary-300);
  border-color: var(--primary-800);
}

.cert-actions {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.cert-preview-btn {
  flex: 1;
  min-width: 100px;
}

/* === CONTACT SECTION === */
.contact-content {
  max-width: 800px;
  margin: 0 auto;
}

.contact-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-6);
}

.contact-item {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-6);
  transition: all var(--transition-base);
}

.contact-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.contact-icon {
  width: 50px;
  height: 50px;
  background: var(--gradient-primary);
  border-radius: var(--border-radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-lg);
  color: white;
}

.contact-details h4 {
  font-weight: var(--font-semibold);
  margin-bottom: var(--space-1);
}

.contact-details p {
  color: var(--text-secondary);
}

.contact-link {
  color: var(--primary-600);
  text-decoration: none;
  font-weight: var(--font-medium);
}

.contact-link:hover {
  text-decoration: underline;
}

/* === FOOTER === */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: var(--space-16) 0 var(--space-8);
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-8);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-weight: var(--font-bold);
  font-size: var(--text-lg);
}

.footer-links {
  display: flex;
  gap: var(--space-6);
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: var(--font-medium);
  transition: color var(--transition-base);
}

.footer-links a:hover {
  color: var(--primary-600);
}


.footer-bottom {
  text-align: center;
  padding-top: var(--space-8);
  border-top: 1px solid var(--border-color);
  color: var(--text-secondary);
}

.footer-bottom p {
  margin-bottom: var(--space-2);
}

.footer-bottom i {
  color: var(--error);
  animation: pulse 2s infinite;
}

/* === MODAL === */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-base);
}

.modal.active {
  opacity: 1;
  visibility: visible;
}

.modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(4px);
}

.modal-content {
  position: relative;
  background: var(--bg-primary);
  border-radius: var(--border-radius-xl);
  box-shadow: var(--shadow-2xl);
  max-width: 600px;
  width: 90%;
  max-height: 80vh;
  overflow: hidden;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-6);
  border-bottom: 1px solid var(--border-color);
}

.modal-close {
  background: none;
  border: none;
  font-size: var(--text-xl);
  cursor: pointer;
  color: var(--text-secondary);
  transition: color var(--transition-base);
}

.modal-close:hover {
  color: var(--text-primary);
}

.modal-body {
  padding: var(--space-6);
  max-height: 60vh;
  overflow-y: auto;
}

/* === FILTER ANIMATIONS === */
.app-card.filter-hidden {
  opacity: 0;
  transform: scale(0.8);
  pointer-events: none;
}

.app-card.filter-visible {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

/* === RESPONSIVE DESIGN === */
@media (max-width: 1024px) {
  .hero-content {
    grid-template-columns: 1fr;
    gap: var(--space-8);
    text-align: center;
  }
  
  .hero-title {
    font-size: var(--text-5xl);
  }
  
  .apps-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  }
  
  .app-categories {
    gap: var(--space-2);
  }
  
  .category-filter {
    padding: var(--space-2) var(--space-4);
    font-size: var(--text-sm);
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }
  
  .mobile-menu-toggle {
    display: flex;
  }
  
  .hero-title {
    font-size: var(--text-4xl);
  }
  
  .section-title {
    font-size: var(--text-4xl);
  }
  
  .hero-buttons {
    flex-direction: column;
  }
  
  .hero-stats {
    justify-content: center;
  }
  
  /* ==========================================
     MOBILE FLOATING ICONS - SAFE POSITIONING
     ========================================== */
  .floating-icon {
    width: 44px;
    height: 44px;
    font-size: 1.1rem;
    opacity: 0.8; /* Slightly more subtle on mobile */
  }
  
  /* Mobile-safe positions that definitely avoid profile image */
  .tech-icon-1 { top: 5%; right: 2%; }
  .tech-icon-2 { top: 50%; left: 1%; }
  .tech-icon-3 { bottom: 20%; right: 1%; }
  .tech-icon-4 { bottom: 5%; left: 8%; }
  .tech-icon-5 { top: 0%; left: 20%; }
  
  .apps-grid {
    grid-template-columns: 1fr;
  }
  
  .games-grid {
    grid-template-columns: 1fr;
  }
  
  .footer-content {
    flex-direction: column;
    gap: var(--space-6);
    text-align: center;
  }
  
  .footer-links {
    order: -1;
  }
  
  .app-categories {
    flex-direction: column;
    align-items: center;
  }
}

@media (max-width: 480px) {
  .theme-toggle,
  .scroll-to-top {
    width: 44px;
    height: 44px;
  }
  
  .hero-title {
    font-size: var(--text-3xl);
  }
  
  .section-title {
    font-size: var(--text-3xl);
  }
  
  .contact-info {
    grid-template-columns: 1fr;
  }
  
  .hero-stats {
    flex-wrap: wrap;
    gap: var(--space-4);
    justify-content: center;
  }
  
  .stat-item {
    min-width: 120px;
    flex: 1;
    max-width: 140px;
  }
  
  .hero-buttons {
    gap: var(--space-2);
  }
  
  .hero-buttons .btn {
    font-size: var(--text-sm);
    padding: var(--space-3) var(--space-4);
  }
  
  .app-categories {
    padding: 0 var(--space-2);
  }
  
  .category-filter {
    font-size: var(--text-xs);
    padding: var(--space-2) var(--space-3);
  }
  
  /* Further optimize floating icons for very small screens */
  .floating-icon {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }
  
  .tech-icon-1 { top: 8%; right: 8%; }
  .tech-icon-2 { top: 30%; left: 3%; }
  .tech-icon-3 { bottom: 25%; right: 3%; }
  .tech-icon-4 { bottom: 8%; left: 12%; }
  .tech-icon-5 { top: -2%; left: 25%; }
  
  /* Hide tooltips on very small screens to prevent clutter */
  .floating-icon::after {
    display: none;
  }
}

/* === ANIMATION DELAYS === */
.animate-fade-in-up {
  animation: fadeInUp 0.6s ease-out;
  animation-delay: var(--delay, 0s);
  animation-fill-mode: both;
}

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

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

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

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

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

/* Animation Utilities */
.animate-fade-in-scale {
  animation: fadeInScale 0.5s ease-out;
}

.animate-float {
  animation: float 3s ease-in-out infinite;
}

.animate-pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.animate-spin {
  animation: spin 1s linear infinite;
}

/* ==========================================
   ENHANCED PERFORMANCE OPTIMIZATIONS
   ========================================== */
.card,
.btn {
  will-change: transform;
  contain: layout style paint;
}

.floating-icon,
.hero-image-border {
  will-change: transform;
  contain: layout style paint;
}

/* Animation performance optimizations */
.floating-icon,
.tech-icon {
  transform: translateZ(0); /* Force hardware acceleration */
  backface-visibility: hidden;
  perspective: 1000px;
}

/* Optimize heavy animations for mobile */
@media (max-width: 768px) {
  .floating-icon {
    animation-duration: 4s; /* Slower for better performance */
  }
  
  .gradient-orb {
    animation-duration: 15s; /* Slower background animations */
  }
}

/* Battery and performance optimizations */
@media (prefers-reduced-motion: reduce) {
  .floating-icon,
  .tech-icon,
  .gradient-orb {
    animation: none !important;
    transform: none !important;
  }
}

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

/* Focus Styles */
:focus-visible {
  outline: 2px solid var(--primary-500);
  outline-offset: 2px;
}

/* Selection */
::selection {
  background: var(--primary-200);
  color: var(--primary-900);
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
  background: var(--primary-500);
  border-radius: var(--border-radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-600);
}

/* === PRINT STYLES === */
@media print {
  .navbar,
  .theme-toggle,
  .scroll-to-top,
  .mobile-menu,
  .bg-effects {
    display: none !important;
  }
  
  .hero-section {
    min-height: auto;
    padding: var(--space-8) 0;
  }
  
  .section-padding {
    padding: var(--space-8) 0;
  }
}
