/* Shared styles for consistent theme across all pages */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: #333;
  background: linear-gradient(to right, #a1c4fd, #c2e9fb);
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
  transition: opacity 0.5s ease, transform 0.5s ease;
}

/* Page transition animation */
body.fade-out {
  opacity: 0;
  transform: translateY(20px);
}

body.fade-in {
  opacity: 1;
  transform: translateY(0);
}
/* Navbar shared styles */
.navbar {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
  background-color: rgba(255, 255, 255, 0.9);
  padding: 12px 20px;
  margin: 20px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  z-index: 100;
  position: sticky;
  top: 0;
  backdrop-filter: blur(5px);
}

.navbar a {
  text-decoration: none;
  color: #000;
  font-weight: bold;
  font-size: 16px;
  padding: 8px 16px;
  position: relative;
  transition: color 0.3s ease, transform 0.3s ease;
}

.navbar a:hover {
  color: #0077cc;
  transform: translateY(-2px);
}

.navbar a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -5px;
  width: 100%;
  height: 2px;
  background: #0077cc;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s ease;
}

.navbar a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* Floating circles animation */
.circle {
  position: absolute;
  border-radius: 50%;
  opacity: 0.2;
  animation: float 10s ease-in-out infinite;
  z-index: 0;
}

.circle:nth-child(1) {
  width: 180px;
  height: 180px;
  background: #ffffff;
  top: 10%;
  left: -50px;
}

.circle:nth-child(2) {
  width: 250px;
  height: 250px;
  background: #d7f3ff;
  top: 65%;
  left: 85%;
}

.circle:nth-child(3) {
  width: 140px;
  height: 140px;
  background: #c2e9fb;
  top: 85%;
  left: 10%;
}

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

/* Button styles */
.btn {
  padding: 12px 24px;
  background: #0077cc;
  color: white;
  text-decoration: none;
  border-radius: 8px;
  display: inline-block;
  margin-top: 20px;
  transition: background 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.btn:hover {
  background: #005fa3;
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Modal styles for projects, achievements, and photos */
.modal, .photo-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.7);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999;
  animation: fadeIn 0.5s ease-out;
}

.modal-content, .photo-modal-content {
  background: white;
  max-width: 800px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  border-radius: 16px;
  padding: 30px;
  position: relative;
  animation: zoomIn 0.5s ease-out;
}

.modal-content h3, .photo-modal-content h3 {
  color: #0077cc;
}

.modal-content p, .photo-modal-content p {
  margin: 15px 0;
}

.modal-content a, .photo-modal-content a {
  display: inline-block;
  margin: 10px 10px 0 0;
  color: #fff;
  background: #0077cc;
  padding: 8px 16px;
  border-radius: 6px;
  text-decoration: none;
  transition: background 0.3s ease, transform 0.3s ease;
}

.modal-content a:hover, .photo-modal-content a:hover {
  background: #005fa3;
  transform: scale(1.05);
}

.photo-modal-content img {
  max-width: 100%;
  height: auto;
  margin: 10px 0;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.close-btn {
  position: absolute;
  top: 10px;
  right: 20px;
  font-size: 1.5rem;
  cursor: pointer;
  transition: transform 0.3s ease, color 0.3s ease;
}

.close-btn:hover {
  transform: rotate(90deg);
  color: #0077cc;
}

/* Footer styles */
footer {
  text-align: center;
  padding: 20px;
  background-color: rgba(255, 255, 255, 0.9);
  color: #2c3e50;
  font-size: 14px;
  margin-top: 40px;
  border-top: 1px solid #e0e0e0;
  position: relative;
  z-index: 2;
  animation: fadeInUp 1s ease-out;
}

footer p {
  margin: 0;
}

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

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

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

/* Responsive adjustments */
@media (max-width: 768px) {
  .navbar {
    gap: 10px;
    padding: 10px;
  }
  .navbar a {
    font-size: 14px;
    padding: 6px 12px;
  }
  footer {
    font-size: 12px;
    padding: 15px;
  }
}