/* Custom CSS for enhanced styling */

/* CSS Reset and Normalize for better browser compatibility */
* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
}

body {
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Enhanced focus styles for accessibility - WCAG AA Compliant */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus {
  outline: 2px solid var(--focus-ring);
  outline-offset: var(--focus-ring-offset);
  border-radius: 4px;
}

/* Skip link for keyboard navigation */
.skip-link {
  position: absolute;
  top: -40px;
  left: 6px;
  background: var(--primary);
  color: white;
  padding: 8px;
  text-decoration: none;
  border-radius: 4px;
  z-index: 1000;
  transition: top 0.3s;
}

.skip-link:focus {
  top: 6px;
}

/* High contrast text for better readability */
.high-contrast-text {
  color: var(--text);
}

.high-contrast-muted {
  color: var(--muted);
}

/* Error and success states with proper contrast */
.error-text {
  color: var(--error-text);
}

.success-text {
  color: var(--success-text);
}

/* Custom utilities */
.text-shadow {
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Browser compatibility fallbacks */
.glass-effect {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px); /* Safari support */
}

/* Fallback for browsers that don't support backdrop-filter */
@supports not (backdrop-filter: blur(10px)) {
  .glass-effect {
    background: rgba(255, 255, 255, 0.1);
  }
}

/* Grid fallbacks for older browsers */
.grid {
  display: -ms-grid; /* IE 10-11 */
  display: grid;
}

.grid-cols-2 {
  -ms-grid-columns: 1fr 1fr;
  grid-template-columns: repeat(2, 1fr);
}

.grid-cols-3 {
  -ms-grid-columns: 1fr 1fr 1fr;
  grid-template-columns: repeat(3, 1fr);
}

.grid-cols-4 {
  -ms-grid-columns: 1fr 1fr 1fr 1fr;
  grid-template-columns: repeat(4, 1fr);
}

/* Flexbox fallbacks */
.flex {
  display: -webkit-box; /* Safari 6.1+ */
  display: -ms-flexbox; /* IE 10 */
  display: flex;
}

.flex-col {
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
}

.items-center {
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
}

.justify-center {
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
}

.justify-between {
  -webkit-box-pack: justify;
  -ms-flex-pack: justify;
  justify-content: space-between;
}

/* Theming via CSS variables (dark default) - WCAG AA Compliant */
:root {
  --bg: #0b0b0c;
  --bg-elev: #12161c;
  --card: #1b1f27;
  --card-2: #232937;
  --border: rgba(255, 255, 255, 0.12); /* Improved contrast */
  --primary: #6366f1; /* brand-500 - main accent */
  --primary-600: #4f46e5;
  --primary-700: #4338ca;
  --secondary: #8b5cf6; /* purple-500 - secondary accent */
  --accent: #06b6d4; /* cyan-500 - tertiary accent */
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --text: rgba(255, 255, 255, 0.95); /* Improved contrast for main text */
  --muted: rgba(255, 255, 255, 0.75); /* Improved contrast for secondary text */
  --surface: rgba(255, 255, 255, 0.05);
  --surface-hover: rgba(255, 255, 255, 0.08);

  /* Accessibility improvements */
  --focus-ring: #3b82f6; /* High contrast focus ring */
  --focus-ring-offset: 2px;
  --error-text: #fca5a5; /* High contrast error text */
  --success-text: #86efac; /* High contrast success text */
}

.bg-card {
  background-color: var(--card);
}
.bg-card-2 {
  background-color: var(--card-2);
}
.border-default {
  border-color: var(--border);
}
.text-primary {
  color: var(--text);
}
.text-secondary {
  color: var(--muted);
}
.chip-primary {
  background: rgba(99, 102, 241, 0.12);
  color: #c7d2fe;
  border: 1px solid rgba(99, 102, 241, 0.35);
}
.chip-secondary {
  background: rgba(139, 92, 246, 0.12);
  color: #c4b5fd;
  border: 1px solid rgba(139, 92, 246, 0.35);
}
.chip-accent {
  background: rgba(6, 182, 212, 0.12);
  color: #a5f3fc;
  border: 1px solid rgba(6, 182, 212, 0.35);
}

/* Unified button system */
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-600));
  color: white;
  border: 1px solid var(--primary-600);
  transition: all 0.3s ease;
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-600), var(--primary-700));
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(99, 102, 241, 0.3);
}

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  transition: all 0.3s ease;
}

.btn-secondary:hover {
  background: var(--surface-hover);
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
  transition: all 0.3s ease;
}

.btn-outline:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(99, 102, 241, 0.3);
}

/* Glass effect utilities */
.glass-primary {
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.2);
  backdrop-filter: blur(10px);
}

.glass-secondary {
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.2);
  backdrop-filter: blur(10px);
}

.glass-accent {
  background: rgba(6, 182, 212, 0.1);
  border: 1px solid rgba(6, 182, 212, 0.2);
  backdrop-filter: blur(10px);
}

/* Gradient text */
.gradient-text {
  background: linear-gradient(135deg, #3b82f6, #10b981);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

::-webkit-scrollbar-track {
  background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Loading animation */
.loading {
  position: relative;
  overflow: hidden;
}

.loading::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.4),
    transparent
  );
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}

/* Responsive images */
img {
  max-width: 100%;
  height: auto;
}

/* Print styles */
@media print {
  .no-print {
    display: none !important;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .bg-gradient-to-br {
    background: white !important;
  }

  .text-gray-600 {
    color: black !important;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }
}

/* Premium Animation Styles */
body {
  font-family: "SF Pro Text", -apple-system, BlinkMacSystemFont, system-ui,
    sans-serif;
}

.sf-pro-display {
  font-family: "SF Pro Display", -apple-system, BlinkMacSystemFont, system-ui,
    sans-serif;
}

.fade-in {
  opacity: 0;
}

.slide-up {
  transform: translateY(40px);
  opacity: 0;
}

.blur-in {
  filter: blur(10px);
  opacity: 0;
}

.stagger-1 {
  animation-delay: 0.2s;
}

.stagger-2 {
  animation-delay: 0.4s;
}

.stagger-3 {
  animation-delay: 0.6s;
}

.stagger-4 {
  animation-delay: 0.8s;
}

.stagger-5 {
  animation-delay: 1s;
}

.stagger-6 {
  animation-delay: 1.2s;
}

@keyframes slideUp {
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes blurIn {
  to {
    filter: blur(0);
    opacity: 1;
  }
}

.glass-effect {
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

/* Premium card hover effects */
.premium-card {
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.premium-card::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.8s ease-in-out;
  z-index: 1;
}

.premium-card:hover::before {
  left: 100%;
}

.premium-card:hover {
  transform: translateY(-12px) scale(1.02);
  box-shadow: 0 25px 50px -12px rgba(59, 130, 246, 0.4);
}

/* Beam Saber Glow Button */
:root {
  --glow-core: rgba(255, 255, 255, 0.8);
  --glow-color: rgba(59, 130, 246, 0.35);
  --glow-color-strong: rgba(59, 130, 246, 0.55);
}

.glow-btn {
  --x: 50%;
  --y: 50%;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  appearance: none;
  border: 1px solid var(--primary-600);
  background: linear-gradient(135deg, var(--primary), var(--primary-600));
  color: white;
  padding: 14px 28px;
  font-weight: 700;
  border-radius: 9999px;
  cursor: pointer;
  letter-spacing: 0.2px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.2);
  isolation: isolate;
}

.glow-btn:hover {
  transform: translateY(-2px);
  background: linear-gradient(135deg, var(--primary-600), var(--primary-700));
  border-color: var(--primary-700);
  box-shadow: 0 8px 25px rgba(99, 102, 241, 0.3);
}

.glow-btn::before,
.glow-btn::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
  will-change: background;
  z-index: -1;
}

.glow-btn::before {
  background: radial-gradient(
      90px 90px at var(--x) var(--y),
      var(--glow-core) 0%,
      rgba(255, 255, 255, 0.25) 45%,
      transparent 70%
    ),
    radial-gradient(
      140px 140px at var(--x) var(--y),
      var(--glow-color-strong) 0%,
      transparent 75%
    );
  mix-blend-mode: screen;
}

.glow-btn::after {
  inset: -8px;
  border-radius: inherit;
  background: radial-gradient(
    200px 200px at var(--x) var(--y),
    var(--glow-color) 0%,
    transparent 80%
  );
  filter: blur(20px);
  z-index: -2;
}

.glow-btn:hover::before,
.glow-btn:hover::after {
  opacity: 1;
}

.icon-box {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.icon-box svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
}

/* Saber beam effect */
.hero-saber {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  transform: translateX(-50%);
  width: 2px;
  pointer-events: none;
  z-index: 0;
}

.hero-saber::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -15%;
  bottom: -15%;
  transform: translateX(-50%);
  width: 2px;
  background: linear-gradient(
    to bottom,
    rgba(34, 211, 238, 0),
    rgba(56, 189, 248, 0.95) 35%,
    rgba(56, 189, 248, 0.95) 65%,
    rgba(34, 211, 238, 0)
  );
  box-shadow: 0 0 24px rgba(56, 189, 248, 0.85),
    0 0 60px rgba(56, 189, 248, 0.55), 0 0 120px rgba(56, 189, 248, 0.35);
  animation: beamFlicker 3s ease-in-out infinite;
}

.hero-haze {
  position: absolute;
  left: 50%;
  top: 45%;
  transform: translate(-50%, -50%);
  width: 900px;
  height: 900px;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(
    closest-side,
    rgba(56, 189, 248, 0.2),
    rgba(0, 0, 0, 0) 60%
  );
  filter: blur(60px);
  opacity: 0.35;
}

@keyframes beamFlicker {
  0%,
  100% {
    opacity: 0.95;
  }

  50% {
    opacity: 0.8;
  }
}

/* Project-specific styles */
.project-card {
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.project-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.tech-badge {
  transition: all 0.3s ease;
}

.tech-badge:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.project-image-overlay {
  opacity: 0;
  transition: opacity 0.3s ease;
}

.project-card:hover .project-image-overlay {
  opacity: 1;
}

.feature-item {
  opacity: 0;
  transform: translateX(-20px);
  animation: slideInLeft 0.6s ease forwards;
}

.feature-item:nth-child(1) {
  animation-delay: 0.1s;
}

.feature-item:nth-child(2) {
  animation-delay: 0.2s;
}

.feature-item:nth-child(3) {
  animation-delay: 0.3s;
}

.feature-item:nth-child(4) {
  animation-delay: 0.4s;
}

.feature-item:nth-child(5) {
  animation-delay: 0.5s;
}

@keyframes slideInLeft {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.filter-btn {
  transition: all 0.3s ease;
}

.filter-btn.active {
  background: linear-gradient(135deg, #3b82f6, #10b981);
  color: white;
  transform: scale(1.05);
}

.modal {
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

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

.modal-content {
  transform: scale(0.7);
  transition: transform 0.3s ease;
}

.modal.active .modal-content {
  transform: scale(1);
}

/* Service-specific styles */
.service-card {
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.service-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.service-icon {
  transition: all 0.3s ease;
}

.service-card:hover .service-icon {
  transform: scale(1.1) rotate(5deg);
}

.service-badge {
  transition: all 0.3s ease;
}

.service-badge:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.service-feature {
  opacity: 0;
  transform: translateY(20px);
  animation: slideInUp 0.6s ease forwards;
}

.service-feature:nth-child(1) {
  animation-delay: 0.1s;
}

.service-feature:nth-child(2) {
  animation-delay: 0.2s;
}

.service-feature:nth-child(3) {
  animation-delay: 0.3s;
}

.service-feature:nth-child(4) {
  animation-delay: 0.4s;
}

@keyframes slideInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.pricing-card {
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
}

.pricing-card::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.8s ease-in-out;
  z-index: 1;
}

.pricing-card:hover::before {
  left: 100%;
}

.pricing-card:hover {
  transform: translateY(-12px) scale(1.02);
  box-shadow: 0 25px 50px -12px rgba(59, 130, 246, 0.4);
}

.pricing-badge {
  position: absolute;
  top: -10px;
  right: 20px;
  background: linear-gradient(135deg, #3b82f6, #10b981);
  color: white;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
  z-index: 2;
}

/* ===== ABOUT PAGE STYLES ===== */

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

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

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

.animate-fade-in-up {
  animation: fadeInUp 0.6s ease-out;
}

.animate-fade-in {
  animation: fadeIn 0.6s ease-out;
}

.animate-slide-in-left {
  animation: slideInLeft 0.6s ease-out;
}

.animate-slide-in-right {
  animation: slideInRight 0.6s ease-out;
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Focus styles for accessibility */
a:focus,
button:focus {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

/* Custom gradient text */
.gradient-text {
  background: linear-gradient(135deg, #3b82f6, #10b981);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Timeline styles */
.timeline-item::before {
  content: "";
  position: absolute;
  left: -6px;
  top: 24px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #3b82f6;
  border: 3px solid white;
  box-shadow: 0 0 0 3px #3b82f6;
}

.timeline-line {
  position: absolute;
  left: -1px;
  top: 36px;
  width: 2px;
  height: calc(100% - 36px);
  background: linear-gradient(to bottom, #3b82f6, #e5e7eb);
}

/* Skill progress bars */
.skill-progress {
  animation: fillProgress 1.5s ease-out forwards;
  animation-delay: 0.5s;
}

@keyframes fillProgress {
  from {
    width: 0%;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html {
    scroll-behavior: auto;
  }
}

/* ===== WORK PAGE STYLES ===== */

/* Additional animations for work page */
@keyframes slideInFromLeft {
  from {
    opacity: 0;
    transform: translateX(-100px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInFromRight {
  from {
    opacity: 0;
    transform: translateX(100px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.animate-slide-left {
  animation: slideInFromLeft 0.6s ease-out;
}

.animate-slide-right {
  animation: slideInFromRight 0.6s ease-out;
}

.animate-scale-in {
  animation: scaleIn 0.6s ease-out;
}

/* Timeline enhancements */
.timeline-dot {
  position: relative;
}

.timeline-dot::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.2;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.2;
  }
  50% {
    transform: translate(-50%, -50%) scale(1.2);
    opacity: 0.1;
  }
  100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.2;
  }
}

/* Achievement cards hover effects */
.achievement-card {
  transition: all 0.3s ease;
}

.achievement-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1),
    0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Skill tags animation */
.skill-tag {
  transition: all 0.3s ease;
}

.skill-tag:hover {
  transform: scale(1.05);
}

/* ===== PREMIUM ANIMATION STYLES ===== */

body {
  font-family: "SF Pro Text", -apple-system, BlinkMacSystemFont, system-ui,
    sans-serif;
}

.sf-pro-display {
  font-family: "SF Pro Display", -apple-system, BlinkMacSystemFont, system-ui,
    sans-serif;
}

.fade-in {
  opacity: 0;
}

.slide-up {
  transform: translateY(40px);
  opacity: 0;
}

.blur-in {
  filter: blur(10px);
  opacity: 0;
}

.stagger-1 {
  animation-delay: 0.2s;
}

.stagger-2 {
  animation-delay: 0.4s;
}

.stagger-3 {
  animation-delay: 0.6s;
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Reveal-triggered unified fade-in animation */
.fade-in.reveal {
  animation: fadeIn 0.8s ease-out forwards;
}
.slide-up.reveal {
  animation: fadeIn 0.8s ease-out forwards;
}
.blur-in.reveal {
  animation: fadeIn 0.8s ease-out forwards;
}

/* Additional enhanced animations */
.slide-right {
  opacity: 0;
  transform: translateX(30px);
}
.slide-left {
  opacity: 0;
  transform: translateX(-30px);
}
.zoom-in {
  opacity: 0;
  transform: scale(0.96);
}

.slide-right.reveal {
  animation: slideRight 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.slide-left.reveal {
  animation: slideLeft 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.zoom-in.reveal {
  animation: zoomIn 0.6s ease-out forwards;
}

@keyframes slideRight {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
@keyframes slideLeft {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
@keyframes zoomIn {
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Back to top button */
.back-to-top {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  width: 44px;
  height: 44px;
  border-radius: 9999px;
  background: linear-gradient(135deg, var(--primary), var(--success));
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease,
    box-shadow 0.2s ease;
  z-index: 50;
}

.back-to-top:hover {
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.35);
}

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

@keyframes blurIn {
  to {
    filter: blur(0);
    opacity: 1;
  }
}

.glass-effect {
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.premium-card {
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.premium-card::before {
  content: "";
  position: absolute;
  inset: 0;
  left: -100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.1),
    transparent
  );
  transition: left 0.8s ease-in-out;
  z-index: 1;
}

.premium-card:hover::before {
  left: 100%;
}

.premium-card:hover {
  transform: translateY(-12px) scale(1.02);
  box-shadow: 0 25px 50px -12px rgba(59, 130, 246, 0.4);
}

:root {
  --glow-core: rgba(255, 255, 255, 0.8);
  --glow-color: rgba(59, 130, 246, 0.35);
  --glow-color-strong: rgba(59, 130, 246, 0.55);
}

.glow-btn {
  --x: 50%;
  --y: 50%;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  appearance: none;
  border: 1px solid #e5e7eb;
  background: #fff;
  color: #111827;
  padding: 14px 28px;
  font-weight: 700;
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.glow-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at var(--x) var(--y),
    var(--glow-color) 0%,
    transparent 70%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 0;
}

.glow-btn:hover::before {
  opacity: 1;
}

.glow-btn:hover {
  border-color: #3b82f6;
  box-shadow: 0 0 20px var(--glow-color-strong);
  transform: translateY(-2px);
}

.glow-btn:active {
  transform: translateY(0);
}

.glow-btn > * {
  position: relative;
  z-index: 1;
}

/* ===== CONTACT PAGE STYLES ===== */

/* Form animations */
.form-group {
  opacity: 0;
  transform: translateY(20px);
  animation: formSlideIn 0.6s ease forwards;
}

.form-group:nth-child(1) {
  animation-delay: 0.1s;
}

.form-group:nth-child(2) {
  animation-delay: 0.2s;
}

.form-group:nth-child(3) {
  animation-delay: 0.3s;
}

.form-group:nth-child(4) {
  animation-delay: 0.4s;
}

.form-group:nth-child(5) {
  animation-delay: 0.5s;
}

.form-group:nth-child(6) {
  animation-delay: 0.6s;
}

@keyframes formSlideIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Contact card animations */
.contact-card {
  opacity: 0;
  transform: translateY(30px);
  animation: slideInUp 0.6s ease forwards;
}

.contact-card:nth-child(1) {
  animation-delay: 0.2s;
}

.contact-card:nth-child(2) {
  animation-delay: 0.4s;
}

.contact-card:nth-child(3) {
  animation-delay: 0.6s;
}

@keyframes slideInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Hover effects */
.contact-card {
  transition: all 0.3s ease;
}

.contact-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.contact-icon {
  transition: all 0.3s ease;
}

.contact-card:hover .contact-icon {
  transform: scale(1.1);
}

/* Success/Error messages */
.alert {
  opacity: 0;
  transform: translateY(-20px);
  transition: all 0.3s ease;
}

.alert.show {
  opacity: 1;
  transform: translateY(0);
}

.alert-success {
  background: linear-gradient(135deg, #10b981, #059669);
}

.alert-error {
  background: linear-gradient(135deg, #ef4444, #dc2626);
}

/* Form field focus effects */
.form-field {
  transition: all 0.3s ease;
  border: 2px solid #e5e7eb;
}

.form-field:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
  transform: translateY(-2px);
}

/* Submit button animation */
.submit-btn {
  position: relative;
  overflow: hidden;
}

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

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

/* Loading spinner */
.spinner {
  border: 2px solid transparent;
  border-top: 2px solid #ffffff;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}
