/* spa.css */
/* #pragma region SPA Base Styles */
.page {
  display: none;
  width: 100%;
  animation: fadeOut 0.3s ease-in-out;
}

.page.active {
  display: block;
  animation: fadeIn 0.3s ease-in-out;
}

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

@keyframes fadeOut {
  from { 
    opacity: 1; 
    transform: translateY(0);
  }
  to { 
    opacity: 0; 
    transform: translateY(-10px);
  }
}
/* #pragma endregion */

/* #pragma region SPA Navigation */
.nav-link {
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: "Styrene A Web", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  position: relative;
  overflow: hidden;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.nav-link.active::after {
  width: 80%;
}

.nav-link:hover::after {
  width: 60%;
}
/* #pragma endregion */

/* #pragma region SPA Buttons */
.actions {
  display: flex;
  gap: 14px;
  margin-top: 20px;
}

.btn {
  background: var(--panel);
  padding: 12px 18px;
  border-radius: 10px;
  color: var(--text);
  text-decoration: none;
  display: inline-block;
  box-shadow: 0 6px 18px rgba(0,0,0,0.35);
  border: none;
  cursor: pointer;
  font-family: "Styrene A Web", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 0.95rem;
  transition: all 0.2s ease;
  font-weight: 500;
  letter-spacing: 0.01em;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
  transition: left 0.5s ease;
}

.btn:hover::before {
  left: 100%;
}

.btn:hover {
  box-shadow: 0 10px 26px rgba(77,163,255,0.06);
  transform: translateY(-2px);
}

.btn.ghost {
  background: #191f24;
  color: var(--muted);
}

.btn.ghost:hover {
  background: #1a2026;
  color: var(--text);
}
/* #pragma endregion */

/* #pragma region SPA Layout */
.container {
  position: relative;
  min-height: 60vh;
}

.page {
  width: 100%;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s ease;
}

.page.active {
  opacity: 1;
  transform: translateY(0);
}

.hero {
  margin-bottom: 40px;
}

.about-skills {
  margin-bottom: 40px;
}

.skills-cards {
  margin-bottom: 40px;
}

.page-transition {
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s ease-in-out;
}

.page-transition.active {
  opacity: 1;
  transform: translateY(0);
}

.page.loading {
  opacity: 0.6;
  pointer-events: none;
}

.page.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 40px;
  height: 40px;
  margin: -20px 0 0 -20px;
  border: 3px solid var(--accent);
  border-top: 3px solid transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  z-index: 1000;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
/* #pragma endregion */

/* #pragma region SPA Mobile */
@media (max-width: 768px) {
  .page {
    animation-duration: 0.2s;
  }
  
  @keyframes fadeIn {
    from { 
      opacity: 0; 
      transform: translateY(5px);
    }
    to { 
      opacity: 1; 
      transform: translateY(0);
    }
  }
  
  @keyframes fadeOut {
    from { 
      opacity: 1; 
      transform: translateY(0);
    }
    to { 
      opacity: 0; 
      transform: translateY(-5px);
    }
  }
  
  .actions {
    flex-direction: column;
    align-items: center;
  }
  
  .btn {
    width: 100%;
    max-width: 280px;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .page {
    animation-duration: 0.15s;
  }
  
  .hero {
    margin-bottom: 30px;
  }
  
  .about-skills {
    margin-bottom: 30px;
  }
  
  .skills-cards {
    margin-bottom: 30px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .page,
  .page.active,
  .btn,
  .nav-link {
    animation: none;
    transition: none;
  }
  
  .btn::before {
    display: none;
  }
  
  .nav-link::after {
    display: none;
  }
}
/* #pragma endregion */