:root {
  --primary-color: #2584ba;
  --primary-dark: #18587c;
  --accent-color: #ff6b6b;
  --text-main: #1a1a1a;
  --text-muted: #636e72;
  --bg-light: #f8fafc;
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(0, 0, 0, 0.08); /* Stronger border for visibility without shadow */
  --card-border: rgba(0, 0, 0, 0.05);
}

body {
  font-family: "Plus Jakarta Sans", sans-serif;
  color: var(--text-main);
  background-color: #fff;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

/* Typography Enhancements */
.fw-800 {
  font-weight: 800;
}
.ls-1 {
  letter-spacing: 1px;
}

/* Custom Gradients */
.text-gradient-premium {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.bg-premium-gradient {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
}

/* Floating Animation */
@keyframes float {
  0% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-15px);
  }
  100% {
    transform: translateY(0px);
  }
}

.floating {
  animation: float 5s ease-in-out infinite;
  will-change: transform;
}

/* Glassmorphism Classes */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  transition: transform 0.3s ease, background 0.3s ease;
}

.glass-card:hover {
  transform: translateY(-5px);
  background: rgba(255, 255, 255, 0.85);
  border-color: var(--primary-color);
}

/* Modern Floating Navbar */
.navbar {
  backdrop-filter: blur(20px);
  background: rgba(255, 255, 255, 0.7) !important;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
  margin-top: 20px;
  border-radius: 100px;
  width: 90%;
  max-width: 1200px;
  left: 50% !important;
  transform: translateX(-50%);
  padding: 10px 30px !important;
  z-index: 1000;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease, margin 0.4s ease !important;
}

.navbar.nav-hidden {
  transform: translate(-50%, -120%);
  opacity: 0;
}

.navbar.scrolled {
  margin-top: 10px;
  background: rgba(255, 255, 255, 0.95) !important;
  border: 1px solid rgba(0, 0, 0, 0.1);
  width: 85%;
}

.navbar-brand {
  font-size: 1.25rem;
  letter-spacing: -0.5px;
}

.nav-link {
  position: relative;
  transition: all 0.3s ease;
  margin: 0 15px;
  padding: 5px 0 !important;
  font-size: 0.95rem;
  color: var(--text-main) !important;
  opacity: 0.7;
}

.nav-link:hover,
.nav-link.active {
  opacity: 1;
  color: var(--primary-color) !important;
}

.nav-link::after {
  content: "";
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary-color);
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

/* --- Mobile Navigation Optimizations --- */
@media (max-width: 991.98px) {
  .navbar {
    width: 95% !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    border-radius: 20px !important;
    margin-top: 10px !important;
    padding: 12px 20px !important;
  }

  .navbar.nav-hidden {
    transform: translate(-50%, -120%) !important;
  }

  .navbar-brand {
    font-size: 1.05rem;
    max-width: 75%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .navbar-toggler {
    border: none;
    padding: 0;
    outline: none !important;
  }

  .navbar-toggler:focus {
    box-shadow: none;
  }

  .navbar-collapse {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    margin-top: 15px;
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.05);
  }

  .navbar-nav {
    padding: 10px 0;
  }

  .nav-item {
    width: 100%;
    margin-bottom: 5px;
  }

  .nav-link {
    margin: 0 !important;
    padding: 12px !important;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
  }

  .nav-link.active {
    background: rgba(37, 132, 186, 0.08);
    color: var(--primary-color) !important;
  }

  .nav-link::after {
    display: none;
  }

  .navbar-cta {
    margin: 15px 0 5px 0 !important;
    width: 100%;
    text-align: center;
    display: block;
  }
}

.navbar-cta {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  color: white !important;
  padding: 10px 25px !important;
  border-radius: 50px;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.1);
  margin-left: 20px;
  opacity: 1 !important;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
}

.navbar-cta:hover {
  transform: translateY(-2px) scale(1.05);
  filter: brightness(1.1);
  color: white !important;
}

.navbar-cta::after {
  display: none;
}

/* Hero Section */
.hero-section {
  padding: 160px 0 100px;
  background: radial-gradient(circle at 90% 10%, rgba(37, 132, 186, 0.08), transparent 40%),
    radial-gradient(circle at 10% 90%, rgba(24, 88, 124, 0.05), transparent 40%);
  position: relative;
}

.profile-container {
  position: relative;
  z-index: 1;
  perspective: 1000px;
  max-width: 500px;
  margin: 0 auto;
}

.profile-img-wrapper {
  transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  z-index: 2;
  /* Mask to fade out the sharp crop at the bottom - increased thickness */
  -webkit-mask-image: linear-gradient(to bottom, black 60%, transparent 95%);
  mask-image: linear-gradient(to bottom, black 60%, transparent 95%);
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 500px;
  will-change: transform;
}

@media (max-width: 991.98px) {
  .hero-section {
    padding-top: 130px !important;
    padding-bottom: 60px !important;
  }
  .profile-container {
    min-height: 350px;
  }
}

.profile-img-wrapper img {
  max-height: 500px;
  position: absolute;
  transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.profile-img-wrapper .profile-hover {
  opacity: 0;
}

.profile-img-wrapper:hover .profile-hover {
  opacity: 1;
}

/* Base image stays visible to prevent background flash during transition */
.profile-img-wrapper .profile-base {
  opacity: 1;
}

.profile-img-wrapper:hover {
  transform: rotateY(5deg) scale(1.02);
}

.profile-blob {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 130%;
  height: 130%;
  background: radial-gradient(circle, rgba(37, 132, 186, 0.2) 0%, transparent 70%);
  border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
  animation: blob 15s infinite linear;
  z-index: -1;
  filter: blur(30px);
}

/* Secondary decorative ring */
.profile-container::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  /* Force a square aspect ratio to keep it a circle */
  width: 450px;
  height: 450px;
  max-width: 90vw;
  max-height: 90vw;
  transform: translate(-50%, -50%);
  border: 2px dashed rgba(37, 132, 186, 0.1);
  border-radius: 50%;
  z-index: 0;
  animation: rotate 30s linear infinite;
  pointer-events: none;
}

@media (max-width: 991.98px) {
  .profile-container::after {
    width: 320px;
    height: 320px;
    animation: none !important;
  }
  .profile-blob {
    animation: none !important;
  }
}

@keyframes rotate {
  from {
    transform: translate(-50%, -50%) rotate(0deg);
  }
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

@keyframes blob {
  0% {
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
  }
  33% {
    border-radius: 50% 50% 33% 67% / 55% 27% 73% 45%;
  }
  66% {
    border-radius: 33% 67% 58% 42% / 63% 68% 32% 37%;
  }
  100% {
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
  }
}

.btn-premium {
  padding: 15px 35px;
  border-radius: 50px;
  font-weight: 600;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: none;
  text-decoration: none; /* Remove underscores */
  display: inline-block;
}

.btn-premium-primary {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  color: white;
  border: 1px solid var(--primary-color);
}

.btn-premium-primary:hover {
  transform: translateY(-5px);
  filter: brightness(1.1);
  color: white;
}

.btn-premium-outline {
  background: transparent;
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
}

.btn-premium-outline:hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-5px);
}

/* Feature Cards */
.expertise-card {
  padding: 40px;
  border-radius: 20px;
  background: #fff;
  transition: all 0.4s ease;
  border: 1px solid var(--card-border);
  height: 100%;
}

.expertise-card:hover {
  transform: translateY(-10px);
  border-color: var(--primary-color);
  background: var(--bg-light);
}

.icon-box {
  width: 60px;
  height: 60px;
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-bottom: 25px;
  background: rgba(37, 132, 186, 0.1);
  color: var(--primary-color);
  transition: all 0.3s ease;
}

.expertise-card:hover .icon-box {
  background: var(--primary-color);
  color: white;
}

/* Specialized Badge */
.specialized-badge {
  display: inline-block;
  padding: 5px 15px;
  background: rgba(37, 132, 186, 0.1);
  color: var(--primary-color);
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 15px;
  letter-spacing: 1px;
}

.skill-badge {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 50px;
  background: rgba(37, 132, 186, 0.08);
  color: var(--primary-color);
  font-size: 0.8rem;
  font-weight: 700;
  border: 1px solid rgba(37, 132, 186, 0.15);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  cursor: default;
}

.skill-badge:hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-3px) scale(1.05);
  border-color: var(--primary-color);
}

/* Footer Section */
footer {
  background: #111 !important;
  color: #fff !important;
}

footer a {
  color: #ccc !important;
}

footer a:hover {
  color: var(--primary-color) !important;
}

/* Brand Color Overrides */
.text-primary {
  color: var(--primary-color) !important;
}
/* Scroll to Top Button */
.scroll-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  color: white !important;
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  cursor: pointer;
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 10px 20px rgba(37, 132, 186, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.scroll-to-top i {
  color: white !important;
}

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

.scroll-to-top:hover {
  transform: translateY(-5px) scale(1.1);
  color: white;
  box-shadow: 0 15px 30px rgba(37, 132, 186, 0.4);
}
