:root {
  --accent: #1e3a8a;
  --silver: #cbd5e1;
}

.glass {
  background: linear-gradient(135deg, rgba(255,255,255,0.55), rgba(255,255,255,0.30));
  backdrop-filter: blur(6px);
}

.logo-mark { 
  font-family: var(--playfair, 'Playfair Display'); 
}

@keyframes slideUp {
  from { transform: translateY(100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.animate-slideUp {
  animation: slideUp 0.4s ease-out;
}

/* ===== INTRO OVERLAY FIXES ===== */
#introOverlay {
  position: fixed;
  z-index: 50;
  background: white;
  inset: 0;
  overflow: hidden;
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Intro content - FIXED for mobile centering */
.intro-content {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 1rem;
  box-sizing: border-box;
}

/* Logo - FIXED responsive sizing */
#introLogo {
  height: auto;
  width: min(70%, 200px);
  max-height: 80px;
  animation: logoPop 1.2s ease-out forwards;
  transform-origin: center center;
  z-index: 20;
  position: relative;
}

/* Halo rings - FIXED for mobile centering */
.halo-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 2px solid var(--accent);
  width: min(20vw, 5rem);
  height: min(20vw, 5rem);
  opacity: 0;
  animation: ringExpandFade 1.5s ease-out forwards;
  box-shadow: 0 0 15px rgba(30,58,138,0.5);
}

.ring2 {
  border-color: var(--silver);
  width: min(24vw, 6rem);
  height: min(24vw, 6rem);
  animation-delay: 0.1s;
}

.ring3 {
  border-color: var(--accent);
  width: min(28vw, 7rem);
  height: min(28vw, 7rem);
  animation-delay: 0.2s;
}

/* Animations */
@keyframes logoPop {
  0% { transform: scale(0.6); opacity: 0; }
  40% { transform: scale(1.15); opacity: 1; }
  60% { transform: scale(0.95); opacity: 1; }
  80% { transform: scale(1.05); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes ringExpandFade {
  0% { transform: translate(-50%, -50%) scale(0.5); opacity: 0.6; }
  50% { transform: translate(-50%, -50%) scale(2.5); opacity: 0.3; }
  100% { transform: translate(-50%, -50%) scale(4); opacity: 0; }
}

@keyframes fadeOutOverlay {
  0% { opacity: 1; }
  100% { opacity: 0; pointer-events: none; }
}

#introOverlay.fadeOut {
  animation: fadeOutOverlay 0.6s forwards;
}

@keyframes contentFade {
  0% { opacity: 0; transform: translateY(20px); }
  100% { opacity: 1; transform: translateY(0); }
}

main.fadeIn {
  animation: contentFade 0.6s forwards;
}

@keyframes fadeDown {
  0% { opacity: 0; transform: translateY(-20px); }
  100% { opacity: 1; transform: translateY(0); }
}

.fade-down {
  animation: fadeDown 0.8s ease forwards;
}

/* ===== HEADER STYLES ===== */
header {
  background-color: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(6px);
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.text-evoblue {
  color: var(--accent);
}

.border-evoblue {
  border-color: var(--accent);
}

.bg-evoblue {
  background-color: var(--accent);
}

.bg-evolight {
  background-color: #eef2ff;
}

.font-serifHead {
  font-family: 'Playfair Display', serif;
}

.font-body {
  font-family: 'Poppins', sans-serif;
}

/* ===== SWIPER STYLES ===== */
.swiper {
  width: 100%;
  padding-bottom: 2rem;
}

.swiper-slide {
  display: flex;
  justify-content: center;
}

.swiper-slide .project-card {
  width: 100%;
  max-width: 320px;
}

.swiper-slide .project-card:hover,
.swiper-slide .project-card:active {
  transform: translateY(-8px) scale(1.03);
  box-shadow: 0 15px 25px rgba(0,0,0,0.15);
}

/* ===== PROJECT CARD STYLES ===== */
.project-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover,
.project-card:active {
  transform: translateY(-8px) scale(1.03);
  box-shadow: 0 15px 25px rgba(0,0,0,0.15);
}

.project-card.hover {
  transform: translateY(-8px) scale(1.03);
  box-shadow: 0 15px 25px rgba(0,0,0,0.15);
}

/* Details button hover */
.project-card .details-btn,
.project-modal .project-buttons a:last-child {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.project-card .details-btn:hover,
.project-modal .project-buttons a:last-child:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 8px 15px rgba(0,0,0,0.12);
}

/* ===== SWIPER PAGINATION ===== */
.swiper-pagination-bullet {
  width: 12px;
  height: 12px;
  background-color: #2563eb;
  opacity: 0.7;
  transition: all 0.3s;
}

.swiper-pagination-bullet-active {
  background-color: #7c3aed;
  opacity: 1;
  transform: scale(1.2);
}

/* ===== MODAL STYLES ===== */
.project-modal {
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  transition: background-color 0.3s ease;
}

.modal-content {
  animation: slideUp 0.4s ease forwards;
  max-height: 90vh;
  overflow-y: auto;
}

/* Scrollbar styling */
.modal-content::-webkit-scrollbar {
  width: 8px;
}

.modal-content::-webkit-scrollbar-thumb {
  background-color: rgba(128, 90, 250, 0.6);
  border-radius: 4px;
}

.modal-content::-webkit-scrollbar-track {
  background: #f1f1f1;
}

/* Slide-up keyframes */
@keyframes slideUp {
  0% { transform: translateY(100px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}

/* Professional font and spacing */
.modal-content h2, .modal-content h3 {
  font-family: 'Inter', sans-serif;
}

.modal-content p, .modal-content li {
  font-family: 'Roboto', sans-serif;
  line-height: 1.6;
}

/* ===== RESPONSIVE FIXES ===== */
@media (max-width: 768px) {
  #introLogo {
    width: min(80%, 180px);
    max-height: 70px;
  }
  
  .halo-ring {
    width: min(25vw, 4rem);
    height: min(25vw, 4rem);
  }
  
  .ring2 {
    width: min(30vw, 5rem);
    height: min(30vw, 5rem);
  }
  
  .ring3 {
    width: min(35vw, 6rem);
    height: min(35vw, 6rem);
  }
  
  /* Ensure proper mobile viewport */
  #introOverlay {
    height: 100dvh; /* Use dynamic viewport height for mobile */
  }
}

@media (max-height: 600px) {
  #introLogo {
    width: min(60%, 150px);
    max-height: 60px;
  }
  
  .halo-ring {
    width: min(20vw, 3.5rem);
    height: min(20vw, 3.5rem);
  }
  
  .ring2 {
    width: min(24vw, 4rem);
    height: min(24vw, 4rem);
  }
  
  .ring3 {
    width: min(28vw, 4.5rem);
    height: min(28vw, 4.5rem);
  }
}

/* Additional mobile optimization */
@media (max-width: 480px) {
  .intro-content {
    padding: 0.5rem;
  }
  
  #introLogo {
    width: min(85%, 160px);
    max-height: 65px;
  }
}

/* Fix for iOS Safari */
@supports (-webkit-touch-callout: none) {
  #introOverlay {
    height: -webkit-fill-available;
  }
}