/* ----------------------------------
   BASE + THEME
---------------------------------- */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  transition: background 0.4s ease, color 0.4s ease;
}

/* Light Mode */
:root {
  --bg: radial-gradient(circle at top, #f9fbff, #e5e8f0);
  --text: #0d0d0d;
  --accent: #3a7bff;

  /* Apple‑style glass gradients */
  --glass-grad-1: rgba(255, 255, 255, 0.55);
  --glass-grad-2: rgba(255, 255, 255, 0.18);

  /* Borders + shadows */
  --glass-border: rgba(255, 255, 255, 0.65);
  --glass-inner: rgba(255, 255, 255, 0.9);
  --glass-shadow: rgba(0, 0, 0, 0.18);
}

/* Dark Mode */
body.dark {
  --bg: radial-gradient(circle at top, #0a0c16, #050509);
  --text: #f5f5f5;
  --accent: #7aa8ff;

  --glass-grad-1: rgba(255, 255, 255, 0.12);
  --glass-grad-2: rgba(0, 0, 0, 0.45);

  --glass-border: rgba(255, 255, 255, 0.18);
  --glass-inner: rgba(255, 255, 255, 0.25);
  --glass-shadow: rgba(0, 0, 0, 0.55);
}

body {
  background: var(--bg);
  color: var(--text);
}

/* ----------------------------------
   REALISTIC LIQUID GLASS
---------------------------------- */

.glass {
  background: linear-gradient(
      145deg,
      var(--glass-grad-1),
      var(--glass-grad-2)
    );
  backdrop-filter: blur(22px) saturate(180%) brightness(1.15);
  -webkit-backdrop-filter: blur(22px) saturate(180%) brightness(1.15);

  border-radius: 28px;
  border: 1px solid var(--glass-border);

  box-shadow:
    0 8px 32px var(--glass-shadow);

  position: relative;
}

/* Inner rim light */
.glass::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(
      145deg,
      var(--glass-inner),
      transparent
    );
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
}

/* ----------------------------------
   TOP PILL NAVBAR WITH BOWED GLASS EFFECT
---------------------------------- */

.navbar {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%) translateZ(0);
  padding: 14px 32px;
  border-radius: 999px;

  display: flex;
  align-items: center;
  gap: 26px;

  z-index: 1000;
  transition: 0.3s ease;
  isolation: isolate;
  will-change: transform;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

/* Bowed highlight */
.navbar::before {
  content: "";
  position: absolute;
  top: -40%;
  left: 0;
  width: 100%;
  height: 180%;
  background: radial-gradient(
      ellipse at top,
      rgba(255, 255, 255, 0.35),
      rgba(255, 255, 255, 0.05) 60%,
      transparent 100%
    );
  pointer-events: none;
}

/* Bottom shadow curve */
.navbar::after {
  content: "";
  position: absolute;
  bottom: -30%;
  left: 0;
  width: 100%;
  height: 120%;
  background: radial-gradient(
      ellipse at bottom,
      rgba(0, 0, 0, 0.15),
      transparent 70%
    );
  pointer-events: none;
}

.navbar:hover {
  transform: translateX(-50%) translateZ(0) scale(1.02);
}

.navbar a {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 999px;
  transition: 0.25s ease;
}

.navbar a:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* Theme button */
.theme-btn {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--text);
  transition: 0.2s ease;
}

.theme-btn:hover {
  transform: scale(1.1);
}

/* Mobile hamburger - hidden on desktop */
.hamburger {
  display: none;
  background: none;
  border: none;
  font-size: 24px;
  color: var(--text);
  cursor: pointer;
  transition: 0.2s ease;
  padding: 4px 8px;
  border-radius: 8px;
  position: relative;
  z-index: 10001;
}

@media (max-width: 768px) {
  .hamburger {
    display: inline-block;
  }
}

/* ----------------------------------
   MOBILE DROPDOWN MENU (GLASS + ANIMATION + RIPPLE)
---------------------------------- */

.mobile-menu {
  display: none;
  list-style: none;
  margin: 0;
  padding: 0;
}

.mobile-menu li {
  list-style: none;
}

.mobile-menu li a {
  color: var(--text);
  text-decoration: none;
  display: block;
  font-weight: 500;
  transition: background 0.25s ease;
}

@media (max-width: 768px) {
  .navbar::before,
  .navbar::after {
    display: none;
  }

  .mobile-menu {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 80px;
    right: 16px;
    padding: 16px 20px;
    border-radius: 22px;
    gap: 12px;
    width: 220px;

    background: rgba(240, 242, 248, 0.92);
    border: 1px solid var(--glass-border);
    box-shadow: 0 8px 32px var(--glass-shadow);

    opacity: 0;
    transform: translateY(-10px) scale(0.98);
    pointer-events: none;

    transition:
      opacity 0.35s ease,
      transform 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);

    z-index: 100000;
    will-change: opacity, transform;
  }

  body.dark .mobile-menu {
    background: rgba(15, 17, 30, 0.95);
  }

  .mobile-menu.show {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;

    box-shadow:
      0 12px 40px rgba(0, 0, 0, 0.25),
      0 0 0 1px var(--glass-border) inset;
  }

  .mobile-menu li a {
    padding: 10px 14px;
    border-radius: 12px;
  }

  .mobile-menu li a:hover {
    background: rgba(255, 255, 255, 0.25);
  }
}

/* Ripple effect */
.ripple {
  position: absolute;
  width: 12px;
  height: 12px;
  background: rgba(255, 255, 255, 0.45);
  border-radius: 50%;
  pointer-events: none;
  transform: scale(0);
  opacity: 0.9;
  animation: rippleEffect 0.6s ease-out forwards;
}

body.dark .ripple {
  background: rgba(255, 255, 255, 0.25);
}

@keyframes rippleEffect {
  0% {
    transform: scale(0);
    opacity: 0.9;
  }
  70% {
    transform: scale(18);
    opacity: 0.25;
  }
  100% {
    transform: scale(22);
    opacity: 0;
  }
}

/* ----------------------------------
   BOTTOM NAV
---------------------------------- */

.bottom-nav {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  padding: 12px 22px;
  border-radius: 999px;

  display: flex;
  gap: 16px;
  z-index: 900;
}

.bottom-nav .bottom-item {
  background: transparent;
  border: none;
  color: var(--text);
  padding: 6px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: 0.25s ease;
}

.bottom-nav .bottom-item:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* ----------------------------------
   HERO SECTION
---------------------------------- */

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 140px 20px 80px;
}

.hero-inner {
  max-width: 650px;
  padding: 40px 32px;
  text-align: center;
}

.hero h1 {
  font-size: 2.6rem;
  margin-bottom: 14px;
  letter-spacing: -0.5px;
}

.hero h1 span {
  color: var(--accent);
}

.hero-actions {
  margin-top: 28px;
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ----------------------------------
   ANIMATED GLASS BUTTONS
---------------------------------- */

.glass-btn {
  position: relative;
  padding: 12px 24px;
  border-radius: 999px;
  border: 1px solid var(--glass-border);

  background: linear-gradient(
      145deg,
      rgba(255, 255, 255, 0.45),
      rgba(255, 255, 255, 0.15)
    );

  color: var(--text);
  cursor: pointer;
  overflow: hidden;
  font-weight: 600;
  transition: 0.2s ease;
  backdrop-filter: blur(12px);
  /* Add a small spacing at the top */
  margin-top: 15px;
}

.glass-btn.secondary {
  background: linear-gradient(
      145deg,
      rgba(255, 255, 255, 0.22),
      rgba(255, 255, 255, 0.08)
    );
}

.glass-btn::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -20%;
  width: 40%;
  height: 200%;
  background: linear-gradient(120deg, rgba(255,255,255,0.8), transparent);
  transform: translateX(-100%) rotate(15deg);
  transition: 0.5s ease;
}

.glass-btn:hover::before {
  transform: translateX(250%) rotate(15deg);
}

.glass-btn:hover {
  transform: translateY(-2px);
}

/* ----------------------------------
   GLOW EFFECTS
---------------------------------- */

.glass.glow-active::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(
    circle at var(--glow-x, 50%) var(--glow-y, 50%),
    rgba(255,255,255,0.25),
    transparent 60%
  );
}

/* ----------------------------------
   SECTIONS
---------------------------------- */

.section {
  padding: 90px 20px;
}

.section-title {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 40px;
}

/* ----------------------------------
   PARALLAX PANELS
---------------------------------- */

.parallax-panel {
  transform: translateY(0) translateZ(0);
  transition: transform 0.6s ease-out;
  will-change: transform;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

/* ----------------------------------
   SCROLL REACTIVE
---------------------------------- */

.scroll-reactive {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

/* ----------------------------------
   CARDS + GRID
---------------------------------- */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  max-width: 1100px;
  margin: 0 auto;
}

.card,
.about-card,
.contact-card {
  padding: 28px 24px;
  border-radius: 24px;
}

/* ----------------------------------
   3D TILT
---------------------------------- */

.tilt {
  transform-style: preserve-3d;
  transition: transform 0.2s ease;
}

.tilt:hover {
  transform: scale(1.02);
}

/* ----------------------------------
   FOOTER
---------------------------------- */

footer {
  text-align: center;
  padding: 50px 20px 90px;
  opacity: 0.7;
}
