/* ==========================================================================
   1. Global Styles & Variables
   ========================================================================== */

:root {
  --bg-dark: #050505;
  --bg-card: rgba(15, 15, 15, 0.7);
  --bg-light: #2c2c2c;
  --accent: #00f2ff;
  --primary-color: #00aaff;
  --text-color: #e0e0e0;
  --text-muted: #a0a0a0;
  --border-color: #444;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  max-width: 100%;
  overflow-x: hidden;
}

body {
  font-family: "Poppins", sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-color);
  line-height: 1.6;
  max-width: 100%;
  overflow-x: hidden;
}

/* Grain Overlay */
.grain-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.04;
  z-index: 9999;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
  animation: noise 0.4s steps(8) infinite;
  mix-blend-mode: overlay;
}

@keyframes noise {
  0%, 100% { transform: translate(0, 0); }
  10% { transform: translate(-5%, -10%); }
  20% { transform: translate(-15%, 5%); }
  30% { transform: translate(7%, -25%); }
  40% { transform: translate(-5%, 25%); }
  50% { transform: translate(-15%, 10%); }
  60% { transform: translate(15%, 0%); }
  70% { transform: translate(0%, 15%); }
  80% { transform: translate(3%, 35%); }
  90% { transform: translate(-10%, 10%); }
}

/* Vanta Canvas */
#vanta-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

/* Custom Cursor */
.custom-cursor {
  position: fixed;
  width: 20px;
  height: 20px;
  border: 2px solid var(--accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 10000;
  transform: translate(-50%, -50%);
  transition: width 0.3s ease, height 0.3s ease, border-width 0.3s ease, background-color 0.3s ease;
  mix-blend-mode: difference;
  background-color: white;
  will-change: transform;
}

.custom-cursor.expanded {
  width: 60px;
  height: 60px;
  border-width: 1px;
  mix-blend-mode: difference;
  background-color: rgba(255, 255, 255, 0.1);
}

/* Magnetic Button Effect */
.btn-request-access,
.hero-btns .btn,
.social-links a {
  will-change: transform;
  transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  position: relative;
}

/* Hide default cursor on desktop */
@media (pointer: fine) {
  body {
    cursor: none;
  }
  
  /* Show pointer cursor on interactive elements but keep custom cursor visible */
  a, button, .btn, .project-card, .project-media-wrapper, .nav-links a, .request-card {
    cursor: none;
  }
}

/* ==========================================================================
   2. Layout
   ========================================================================== */

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
}

main {
  position: relative;
  z-index: 2;
}

/* ==========================================================================
   3. Typography
   ========================================================================== */

h1,
h2,
h3 {
  font-family: 'Syne', sans-serif;
  font-weight: 600;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 4px;
}

@media (max-width: 768px) {
  h1,
  h2,
  h3 {
    letter-spacing: 2px;
  }
}

h2 {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 3rem;
  color: var(--primary-color);
}

p {
  color: var(--text-muted);
}

a {
  color: var(--primary-color);
  text-decoration: none;
}

/* ==========================================================================
   4. Components & Sections
   ========================================================================== */

/* --- Navigation Bar --- */
nav {
  background: var(--bg-light);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border-color);
}

nav .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

nav .logo {
  font-size: 1.5rem;
  font-weight: 700;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 5px;
  z-index: 101; /* Ensure it's above other elements */
}

.menu-toggle .bar {
  width: 28px; /* Slightly wider bars */
  height: 3px;
  background-color: var(--text-color);
  transition: all 0.3s ease;
}

.menu-toggle.active .bar:nth-child(1) {
  transform: rotate(-45deg) translate(-8px, 8px); /* Increased translate values */
}

.menu-toggle.active .bar:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active .bar:nth-child(3) {
  transform: rotate(45deg) translate(-8px, -8px); /* Increased translate values */
}

nav .nav-links {
  list-style: none;
  display: flex; /* Ensure horizontal display on desktop */
  flex-direction: row; /* Explicitly set row direction */
  gap: 1.5rem;
}

nav a {
  transition: color 0.3s ease;
}

nav a:hover {
  color: #fff;
}

/* --- Hero Section --- */
.hero {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 4rem 0;
  position: relative;
  z-index: 2;
}

.hero h1 {
  font-size: clamp(1.8rem, 5vw, 3.5rem);
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.hero .tagline {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  min-height: 2em; /* Prevents layout shift from typing effect */
}

.hero-btns {
  display: flex;
  gap: 1rem;
  justify-content: center;
  align-items: center;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.hero-btns .btn-primary {
  background-color: var(--primary-color);
  color: #fff;
  border: none;
  padding: 0.8rem 2rem;
  font-size: 1.1rem;
  font-weight: 600;
  border-radius: 5px;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
}

.hero-btns .btn-primary:hover {
  background-color: #0088cc;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 170, 255, 0.3);
}

.hero-btns .btn-secondary {
  background-color: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
  padding: 0.8rem 2rem;
  font-size: 1.1rem;
  font-weight: 600;
  border-radius: 5px;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
}

.hero-btns .btn-secondary:hover {
  background-color: var(--primary-color);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 170, 255, 0.3);
}

.social-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0.5rem;
  font-size: 1.1rem;
  padding: 0.5rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: 5px;
  transition: all 0.3s ease;
}

.social-links a:hover {
  background-color: var(--primary-color);
  color: #fff;
  border-color: var(--primary-color);
}

/* --- Projects Section --- */
#projects,
#about {
  padding: 4rem 0;
  position: relative;
  z-index: 2;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
}

.project-card {
  background: var(--bg-light);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.8);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  position: relative;
  --x: 50%;
  --y: 50%;
}

/* Fallback for browsers that don't support backdrop-filter */
@supports not (backdrop-filter: blur(12px)) {
  .project-card {
    background: var(--bg-light);
  }
}

.card-glow {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  border-radius: 10px;
  background: radial-gradient(
    600px circle at var(--x) var(--y),
    rgba(0, 242, 255, 0.15),
    transparent 40%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1;
}

.project-card:hover .card-glow {
  opacity: 1;
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.project-card img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  background-color: #000;
  transition: transform 0.3s ease;
}

/* Override for images inside media wrapper */
.project-media-wrapper img {
  height: auto;
  background-color: transparent;
}

.project-media-wrapper.is-revealed:hover .project-dashboard {
  transform: scale(1.02);
}

.project-card h3,
.project-card p,
.project-card .tech-stack,
.project-card .project-links {
  padding: 0 1.5rem;
  position: relative;
  z-index: 2;
}

.project-card .project-media-wrapper {
  position: relative;
  z-index: 2;
}

.project-card h3 {
  margin-top: 1.5rem;
  color: #fff;
}

.tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
  margin-bottom: 1.5rem; /* Add bottom margin to tech stack */
}

.tech-stack span {
  background-color: #3e3e3e;
  color: var(--text-muted);
  padding: 0.25rem 0.75rem;
  border-radius: 15px;
  font-size: 0.8rem;
}

.project-links {
  margin-top: auto;
  padding-top: 0.5rem; /* Reduced top padding */
  padding-bottom: 1.5rem;
  display: flex;
  gap: 1rem;
  justify-content: center; /* Center buttons horizontally */
  flex-wrap: wrap; /* Allow wrapping on smaller screens */
}

.project-links.has-buttons {
  padding-bottom: 2.5rem; /* Extra padding for projects with buttons */
}

/* --- Reusable Button Styles --- */
.btn {
  display: inline-block;
  padding: 0.6rem 1.2rem;
  background: var(--primary-color);
  color: #fff;
  border-radius: 5px;
  font-weight: 600;
  transition: background-color 0.3s ease;
}

.btn:hover {
  background: #0088cc;
}

.btn-secondary {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
}

.btn-secondary:hover {
  background: var(--bg-dark);
  color: #fff;
}

.btn-disabled {
  background-color: #444;
  color: #888;
  cursor: not-allowed;
  pointer-events: none;
  opacity: 0.7;
  border: 1px solid #555;
}

.btn-secondary.btn-disabled {
  background-color: #333;
  color: #666;
  border-color: #555;
}

/* --- About & Footer Sections --- */
#about {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.featured-highlight {
  position: relative;
  background-color: #252525;
  border: 2px solid rgba(0, 170, 255, 0.3);
  padding: 20px;
  border-radius: 10px;
  margin-bottom: 3rem;
  margin-top: 2rem;
}

.featured-highlight::before {
  content: "Flagship";
  position: absolute;
  top: -12px;
  right: 20px;
  background-color: var(--primary-color);
  color: #fff;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.featured-highlight h3 {
  font-size: 1.5rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
  font-weight: 600;
  margin-top: 0;
}

.featured-highlight p {
  margin: 0;
  line-height: 1.6;
  color: var(--text-color);
}

.technical-skills {
  margin-top: 3rem;
}

.technical-skills h3 {
  font-size: 1.5rem;
  color: var(--primary-color);
  margin-bottom: 1.5rem;
  font-weight: 600;
}

.skill-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  align-items: center;
}

.skill-badge {
  background-color: #2c2c2c;
  color: var(--text-color);
  border: 1px solid var(--border-color);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.3s ease;
  display: inline-block;
}

.skill-badge:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
  transform: translateY(-2px);
}

/* Footer & Contact Section */
footer {
  background: var(--bg-light);
  text-align: center;
  margin-top: 2rem;
  padding: 4rem 0;
  position: relative;
  z-index: 2;
}

footer p {
  margin-bottom: 1.5rem;
}

.footer-social-links {
  margin-top: 2rem;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-social-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: 5px;
  transition: all 0.3s ease;
  color: var(--text-color); /* Changed to text-color for better contrast */
}

.footer-social-links a:hover {
  background-color: var(--primary-color);
  color: #fff;
  border-color: var(--primary-color);
}

/* --- Contact Form --- */
.contact-form {
  max-width: 600px;
  margin: 2rem auto 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-form .form-group {
  display: flex;
  gap: 1rem;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.8rem 1rem;
  background-color: var(--bg-light);
  border: 1px solid var(--border-color);
  border-radius: 5px;
  color: var(--text-color);
  font-family: "Poppins", sans-serif;
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--primary-color);
}

.contact-form .btn {
  width: auto;
  align-self: center;
  cursor: pointer;
  border: none;
}

/* --- Image Lightbox --- */
.project-image-link {
  display: block;
  cursor: pointer;
}

/* --- Project Media Wrapper & Logo Reveal System --- */
.project-media-wrapper {
  position: relative;
  overflow: hidden;
  background-color: #1a1a1a;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  height: 250px;
  cursor: pointer;
}

.project-logo {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: 60%;
  max-height: 60%;
  width: auto;
  height: auto;
  object-fit: contain;
  z-index: 2;
  opacity: 1;
  transition: filter 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  animation: logoFloat 3s ease-in-out infinite;
  filter: drop-shadow(0 0 10px rgba(0, 170, 255, 0));
}

@keyframes logoFloat {
  0%, 100% {
    transform: translate(-50%, calc(-50% + 0px));
  }
  50% {
    transform: translate(-50%, calc(-50% - 10px));
  }
}

.project-media-wrapper:hover .project-logo {
  animation: logoFloatHover 3s ease-in-out infinite;
  filter: drop-shadow(0 0 20px rgba(0, 170, 255, 0.6));
}

@keyframes logoFloatHover {
  0%, 100% {
    transform: translate(-50%, calc(-50% + 0px)) scale(1.1);
  }
  50% {
    transform: translate(-50%, calc(-50% - 10px)) scale(1.1);
  }
}

.project-media-wrapper.is-revealed .project-logo {
  opacity: 0;
  transform: translate(-50%, -50%) scale(1.2);
  animation: none;
}

.project-dashboard {
  display: none;
}

.reveal-hint {
  position: absolute;
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(10px);
  padding: 8px 16px;
  border-radius: 20px;
  color: var(--primary-color);
  font-size: 0.85rem;
  font-weight: 600;
  z-index: 3;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
  border: 1px solid rgba(0, 170, 255, 0.3);
  box-shadow: 0 0 15px rgba(0, 170, 255, 0.2);
}

.project-card:hover .reveal-hint,
.project-media-wrapper:hover .reveal-hint {
  opacity: 1;
  animation: hintPulse 2s ease-in-out infinite;
}

/* Show reveal hint on mobile by default */
@media (max-width: 768px) {
  .reveal-hint {
    opacity: 0.8;
  }
  
  .project-media-wrapper:hover .reveal-hint,
  .project-card:hover .reveal-hint {
    opacity: 1;
  }
}

@keyframes hintPulse {
  0%, 100% {
    opacity: 1;
    transform: translateX(-50%) scale(1);
    box-shadow: 0 0 15px rgba(0, 170, 255, 0.2);
  }
  50% {
    opacity: 0.8;
    transform: translateX(-50%) scale(1.05);
    box-shadow: 0 0 25px rgba(0, 170, 255, 0.5);
  }
}

.reveal-hint i {
  margin-right: 6px;
  color: var(--primary-color);
}

.reveal-hint span {
  display: flex;
  align-items: center;
  justify-content: center;
}

.project-media-wrapper.is-revealed .reveal-hint {
  opacity: 0;
  transform: translateX(-50%) translateY(10px);
  animation: none;
}

.expand-icon {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  border-radius: 6px;
  color: var(--primary-color);
  font-size: 0.9rem;
  z-index: 4;
  opacity: 0;
  transition: opacity 0.3s ease, background 0.3s ease;
  pointer-events: none;
  border: 1px solid rgba(0, 170, 255, 0.3);
}

.project-media-wrapper:hover .expand-icon {
  opacity: 1;
}

.expand-icon i {
  position: absolute;
}

.expand-icon-hide {
  display: none;
}

.project-media-wrapper.is-revealed .expand-icon-show {
  display: none;
}

.project-media-wrapper.is-revealed .expand-icon-hide {
  display: block;
}

.lightbox-close-button {
  position: fixed;
  top: 2rem;
  right: 2rem;
  background: none;
  border: none;
  font-size: 4rem;
  font-weight: 200;
  color: white;
  opacity: 0.8;
  cursor: pointer;
  transition: opacity 0.3s ease;
  z-index: 1010;
  padding: 0;
  line-height: 1;
}

.lightbox-close-button:hover {
  opacity: 1;
}

/* ==========================================================================
   5. Testimonials Section
   ========================================================================== */

#testimonials {
  display: none; /* Temporarily hidden until real testimonials are available */
  padding: 4rem 0;
  background: var(--bg-dark);
  position: relative;
  z-index: 2;
}

.testimonials-container {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
  padding: 1.5rem 2rem; /* Increased top padding for hover effect */
}

.testimonials-wrapper {
  display: flex;
  transition: transform 0.5s ease-in-out;
}

.testimonial-card {
  min-width: 100%;
  opacity: 0;
  transform: translateX(100px);
  transition: all 0.5s ease-in-out;
  padding: 0 1rem;
}

.testimonial-card.active {
  opacity: 1;
  transform: translateX(0);
}

.testimonial-content {
  background: var(--bg-light);
  border-radius: 15px;
  padding: 2.5rem;
  text-align: center;
  border: 1px solid var(--border-color);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.testimonial-content:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
}

.testimonial-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  margin: 0 auto 1.5rem;
  border: 3px solid var(--primary-color);
  object-fit: cover;
}

.testimonial-content blockquote {
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--text-color);
  margin-bottom: 2rem;
  font-style: italic;
  position: relative;
}

.testimonial-content blockquote::before {
  content: '"';
  font-size: 4rem;
  color: var(--primary-color);
  position: absolute;
  top: -1rem;
  left: -1rem;
  font-family: serif;
  opacity: 0.3;
}

.testimonial-content blockquote::after {
  content: '"';
  font-size: 4rem;
  color: var(--primary-color);
  position: absolute;
  bottom: -2rem;
  right: -1rem;
  font-family: serif;
  opacity: 0.3;
}

.testimonial-content figcaption {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.testimonial-content figcaption strong {
  color: #fff;
  font-size: 1.1rem;
  font-weight: 600;
}

.testimonial-content figcaption span {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Navigation Buttons */
.testimonial-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: var(--bg-light);
  border: 1px solid var(--border-color);
  color: var(--text-color);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  display: none; /* Hide navigation when only one card */
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  transition: all 0.3s ease;
  z-index: 10;
}

.testimonial-nav:hover {
  background: var(--primary-color);
  color: #fff;
  border-color: var(--primary-color);
  transform: translateY(-50%) scale(1.1);
}

.prev-btn {
  left: 10px;
}

.next-btn {
  right: 10px;
}

/* Coming Soon Styling */
.coming-soon-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  margin: 0 auto 1.5rem;
  background: linear-gradient(135deg, var(--primary-color), #0088cc);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: #fff;
  box-shadow: 0 8px 25px rgba(0, 170, 255, 0.3);
}

.testimonial-content.coming-soon {
  border: 2px solid var(--primary-color);
  background: linear-gradient(135deg, var(--bg-light), #2a2a2a);
}

.testimonial-content.coming-soon blockquote {
  color: var(--text-color);
  font-style: normal;
}

.testimonial-content.coming-soon figcaption strong {
  color: var(--primary-color);
  font-size: 1.2rem;
}

/* Dots Indicator */
.testimonial-dots {
  display: none; /* Hide dots when only one card */
  justify-content: center;
  gap: 0.5rem;
  margin-top: 2rem;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--border-color);
  cursor: pointer;
  transition: all 0.3s ease;
}

.dot.active,
.dot:hover {
  background: var(--primary-color);
  transform: scale(1.2);
}

/* ==========================================================================
   6. Responsive Design
   ========================================================================== */

/* Tablet and small desktop */
@media (max-width: 1024px) {
  .container {
    padding: 0 1.5rem;
  }

  .hero h1 {
    font-size: 3rem;
  }

  .project-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
  }
}

/* Tablet */
@media (max-width: 768px) {
  .container {
    padding: 0 1rem;
  }

  .hero {
    min-height: 50vh;
    padding: 3rem 0;
  }

  .hero h1 {
    font-size: 2.5rem;
    line-height: 1.2;
  }

  .hero .tagline {
    font-size: 1.1rem;
  }

  .hero-btns {
    flex-direction: column;
    width: 100%;
    max-width: 300px;
    margin-left: auto;
    margin-right: auto;
  }

  .hero-btns .btn-primary,
  .hero-btns .btn-secondary {
    width: 100%;
    text-align: center;
  }

  .social-links {
    flex-wrap: wrap;
    justify-content: center;
  }

  .social-links a {
    margin: 0.25rem;
    font-size: 1rem;
    padding: 0.4rem 0.8rem;
  }

  nav .container {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
    position: relative;
  }

  /* Mobile menu backdrop overlay */
  body.menu-open::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 98;
    pointer-events: none;
  }

  nav .nav-links {
    display: none; /* Hidden by default on small screens */
    flex-direction: column; /* Vertical alignment for mobile */
    width: 100%;
    position: absolute;
    top: 60px; /* Adjust based on your nav height */
    left: 0;
    background: var(--bg-light);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid var(--border-color);
    padding: 1rem 0;
    gap: 0.5rem;
    z-index: 99;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.5s ease-in-out, opacity 0.5s ease-in-out;
  }

  /* Fallback for backdrop-filter */
  @supports not (backdrop-filter: blur(10px)) {
    nav .nav-links {
      background: var(--bg-light);
    }
  }

  nav .nav-links.active {
    display: flex; /* Display as flex when active */
    max-height: 500px; /* Sufficiently large to show all links */
    opacity: 1;
  }

  nav .nav-links li a {
    padding: 0.5rem 1rem;
    display: block;
    text-align: center;
  }

  /* .menu-toggle is only displayed in the media query */
  .menu-toggle {
    display: flex; /* Show burger icon on small screens */
  }

  .project-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .project-card {
    margin: 0 auto;
    max-width: 400px;
  }

  .project-card img {
    height: 220px;
  }

  .project-media-wrapper {
    height: 220px;
  }

  .skill-badges {
    gap: 0.6rem;
  }

  .skill-badge {
    font-size: 0.85rem;
    padding: 0.45rem 0.9rem;
  }

  .tech-stack {
    margin-bottom: 1rem;
  }

  .project-links {
    padding-top: 0.25rem;
    padding-bottom: 2rem;
  }

  .project-links.has-buttons {
    padding-bottom: 2.5rem;
  }

  h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
  }

  #about {
    padding: 3rem 0;
  }

  #about p {
    font-size: 1rem;
    line-height: 1.6;
  }

  .featured-highlight {
    padding: 15px;
    margin-bottom: 2rem;
  }

  .featured-highlight h3 {
    font-size: 1.3rem;
  }

  .featured-highlight::before {
    right: 15px;
    font-size: 0.7rem;
    padding: 3px 10px;
  }

  .testimonials-container {
    max-width: 100%;
    padding: 0 1rem;
  }

  .testimonial-content {
    padding: 2rem 1.5rem;
  }

  .modal-content {
    padding: 2.5rem 2rem;
    max-width: 90%;
    width: 90%;
  }

  .close-modal {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    font-size: 1.8rem;
    top: 0.75rem;
    right: 0.75rem;
  }

  .modal-header h3 {
    font-size: 1.6rem;
  }

  .request-card {
    padding: 1.3rem 1.8rem;
  }

  .privacy-note {
    font-size: 0.8rem;
    margin-top: 1.5rem;
    padding-top: 1.2rem;
  }

  .testimonial-content blockquote {
    font-size: 1rem;
  }

  .testimonial-content blockquote::before,
  .testimonial-content blockquote::after {
    font-size: 3rem;
  }

  .testimonial-nav {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }

  .prev-btn {
    left: 5px;
  }

  .next-btn {
    right: 5px;
  }

  footer {
    padding: 3rem 0;
  }

  .contact-form {
    max-width: 100%;
  }

  nav .nav-links {
    display: none;
    flex-direction: column;
    width: 100%;
    position: absolute;
    top: 60px; /* Adjust based on your nav height */
    left: 0;
    background: var(--bg-light);
    border-top: 1px solid var(--border-color);
    padding: 1rem 0;
    gap: 0.5rem;
    z-index: 99;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.5s ease-in-out, opacity 0.5s ease-in-out;
  }

  nav .nav-links.active {
    max-height: 500px; /* Sufficiently large to show all links */
    opacity: 1;
  }

  nav .nav-links li a {
    padding: 0.5rem 1rem;
    display: block;
    text-align: center;
  }

  .menu-toggle {
    display: flex;
  }
}

/* Mobile landscape and small tablets */
@media (max-width: 600px) {
  .hero h1 {
    font-size: 2rem;
  }

  .hero .tagline {
    font-size: 1rem;
  }

  .hero-btns .btn-primary,
  .hero-btns .btn-secondary {
    font-size: 1rem;
    padding: 0.7rem 1.5rem;
  }

  .social-links a {
    font-size: 0.9rem;
    padding: 0.3rem 0.6rem;
  }

  .project-card img {
    height: 200px;
  }

  .project-media-wrapper {
    height: 200px;
  }

  .skill-badges {
    gap: 0.5rem;
  }

  .skill-badge {
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
  }

  .tech-stack span {
    font-size: 0.75rem;
    padding: 0.2rem 0.6rem;
  }

  .btn {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
  }

  .contact-form .form-group {
    flex-direction: column;
  }

  .contact-form input,
  .contact-form textarea {
    font-size: 0.9rem;
  }
}

/* Mobile portrait */
@media (max-width: 480px) {
  .container {
    padding: 0 0.75rem;
  }

  .hero {
    min-height: 40vh;
    padding: 2rem 0;
  }

  .hero h1 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
  }

  .hero .tagline {
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
  }

  .hero-btns {
    max-width: 280px;
    gap: 0.75rem;
  }

  .hero-btns .btn-primary,
  .hero-btns .btn-secondary {
    font-size: 0.95rem;
    padding: 0.65rem 1.25rem;
  }

  .social-links {
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
  }

  .social-links a {
    width: 200px;
    justify-content: center;
    font-size: 0.9rem;
  }

  nav .nav-links {
    flex-direction: column;
    gap: 0.5rem;
  }

  .project-card {
    margin: 0;
    max-width: 100%;
  }

  .project-card img {
    height: 180px;
  }

  .project-media-wrapper {
    height: 180px;
  }

  .reveal-hint {
    font-size: 0.75rem;
    padding: 6px 12px;
    bottom: 10px;
  }

  .skill-badges {
    gap: 0.5rem;
  }

  .skill-badge {
    font-size: 0.75rem;
    padding: 0.35rem 0.7rem;
  }

  .project-card h3 {
    font-size: 1.1rem;
    margin-top: 1rem;
  }

  .project-card p {
    font-size: 0.9rem;
    line-height: 1.5;
  }

  .tech-stack {
    gap: 0.3rem;
    margin-top: 0.8rem;
    margin-bottom: 0.8rem;
  }

  .tech-stack span {
    font-size: 0.7rem;
    padding: 0.15rem 0.5rem;
  }

  .project-links {
    padding-top: 0;
    padding-bottom: 1.5rem;
  }

  .project-links.has-buttons {
    padding-bottom: 2rem;
  }

  .btn {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
  }

  h2 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
  }

  #about {
    padding: 2rem 0;
  }

  #about p {
    font-size: 0.9rem;
  }

  .featured-highlight {
    padding: 12px;
    margin-bottom: 1.5rem;
  }

  .featured-highlight h3 {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
  }

  .featured-highlight p {
    font-size: 0.9rem;
  }

  .featured-highlight::before {
    right: 12px;
    top: -10px;
    font-size: 0.65rem;
    padding: 2px 8px;
  }

  .testimonial-content {
    padding: 1.5rem 1rem;
  }

  .testimonial-avatar {
    width: 60px;
    height: 60px;
  }

  .testimonial-content blockquote {
    font-size: 0.95rem;
  }

  .testimonial-nav {
    display: none; /* Hide navigation buttons on very small screens */
  }

  .testimonial-dots {
    margin-top: 1.5rem;
  }

  .modal-content {
    padding: 2rem 1.5rem;
  }

  .modal-header h3 {
    font-size: 1.5rem;
  }

  .modal-header p {
    font-size: 0.95rem;
  }

  .request-card {
    padding: 1.2rem 1.5rem;
  }

  .request-card i {
    font-size: 1.8rem;
  }

  .request-card span {
    font-size: 1.1rem;
  }

  .privacy-note {
    font-size: 0.8rem;
    margin-top: 1.5rem;
    padding-top: 1.2rem;
  }

  .coming-soon-icon {
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
  }

  footer {
    padding: 2rem 0;
  }

  footer h2 {
    font-size: 1.5rem;
  }

  .contact-form input,
  .contact-form textarea {
    padding: 0.6rem 0.8rem;
    font-size: 0.85rem;
  }

  .modal-content {
    padding: 2rem 1.5rem;
    width: 95%;
  }

  .modal-header h3 {
    font-size: 1.4rem;
  }

  .modal-header p {
    font-size: 0.9rem;
  }

  .modal-header i {
    font-size: 2rem;
  }

  .project-name-display {
    font-size: 1rem;
    padding: 0.8rem 1.2rem;
  }

  .request-card {
    padding: 1.2rem 1.5rem;
  }

  .request-card i {
    font-size: 1.6rem;
  }

  .request-card span {
    font-size: 1rem;
  }

  .request-card small {
    font-size: 0.8rem;
  }

  .privacy-note {
    font-size: 0.75rem;
    margin-top: 1.2rem;
    padding-top: 1rem;
  }
}

/* ==========================================================================
   7. Request Access Modal
   ========================================================================== */

/* Badge Verified Styling */
.badge-verified {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(0, 170, 255, 0.1);
  border: 1px solid var(--primary-color);
  color: var(--primary-color);
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-left: 0.75rem;
  vertical-align: middle;
}

.badge-verified i {
  font-size: 0.7rem;
}

.project-card h3 {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* Modal Pop Animation */
@keyframes modalPop {
  from {
    transform: scale(0.9);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  transition: opacity 0.3s ease;
}

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

.modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
}

.modal-content {
  position: relative;
  background: var(--bg-light);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 15px;
  padding: 3rem 2.5rem;
  max-width: 450px;
  width: 90%;
  margin: 0 auto;
  z-index: 10001;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.8);
  transform: scale(0.9);
  opacity: 0;
}

/* Fallback for browsers that don't support backdrop-filter */
@supports not (backdrop-filter: blur(12px)) {
  .modal-content {
    background: var(--bg-light);
  }
}

.modal.active .modal-content {
  animation: modalPop 0.3s ease forwards;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.8);
}

.close-modal {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 2rem;
  cursor: pointer;
  width: 48px;
  height: 48px;
  min-width: 48px;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.3s ease;
  z-index: 10002;
  line-height: 1;
  padding: 0;
  touch-action: manipulation;
}

.close-modal:hover {
  color: var(--primary-color);
  background: rgba(0, 170, 255, 0.1);
  transform: rotate(90deg);
}

.modal-header {
  margin-bottom: 2rem;
}

.modal-header i {
  font-size: 2.5rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
  display: block;
}

.modal-header h3 {
  color: var(--primary-color);
  margin-bottom: 0.75rem;
  font-size: 1.8rem;
  font-weight: 600;
}

.modal-header p {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.6;
  margin: 0;
}

.project-name-display {
  background: var(--bg-dark);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1rem 1.5rem;
  margin-bottom: 2rem;
  color: var(--text-color);
  font-size: 1.1rem;
  font-weight: 600;
}

.request-options {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.request-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 20px;
  border: 1px solid #444;
  border-radius: 12px;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background: var(--bg-dark);
  color: var(--text-color);
  position: relative;
  overflow: hidden;
}

.request-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.5s ease;
}

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

.request-card i {
  font-size: 2rem;
  transition: all 0.3s ease;
}

.request-card span {
  font-size: 1.2rem;
  font-weight: 600;
  transition: all 0.3s ease;
}

.request-card small {
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: all 0.3s ease;
}

.request-card.whatsapp {
  border-color: rgba(37, 211, 102, 0.3);
  background: rgba(37, 211, 102, 0.05);
}

.request-card.whatsapp:hover {
  background: rgba(37, 211, 102, 0.15);
  border-color: #25D366;
  transform: translateY(-3px) scale(1.02);
  box-shadow: 
    0 10px 30px rgba(37, 211, 102, 0.3),
    0 0 20px rgba(37, 211, 102, 0.2),
    0 0 40px rgba(37, 211, 102, 0.4),
    inset 0 0 20px rgba(37, 211, 102, 0.1);
}

.request-card.whatsapp:hover i,
.request-card.whatsapp:hover span {
  color: #25D366;
}

.request-card.email {
  border-color: rgba(0, 170, 255, 0.3);
  background: rgba(0, 170, 255, 0.05);
}

.request-card.email:hover {
  background: rgba(0, 170, 255, 0.15);
  border-color: var(--primary-color);
  transform: translateY(-3px) scale(1.02);
  box-shadow: 
    0 10px 30px rgba(0, 170, 255, 0.3),
    0 0 20px rgba(0, 170, 255, 0.2),
    0 0 40px rgba(0, 170, 255, 0.4),
    inset 0 0 20px rgba(0, 170, 255, 0.1);
}

.request-card.email:hover i,
.request-card.email:hover span {
  color: var(--primary-color);
}

.privacy-note {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.5;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.privacy-note i {
  color: var(--primary-color);
  font-size: 0.9rem;
}

/* Request Access Button Styles with Pulse Animation */
.btn-request-access {
  background: var(--primary-color);
  color: #fff;
  border: none;
  padding: 0.6rem 1.2rem;
  border-radius: 5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: "Poppins", sans-serif;
  font-size: 1rem;
  position: relative;
  animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%, 100% {
    box-shadow: 0 0 10px rgba(0, 170, 255, 0.4);
  }
  50% {
    box-shadow: 0 0 20px rgba(0, 170, 255, 0.6), 0 0 30px rgba(0, 170, 255, 0.4);
  }
}

.btn-request-access:hover {
  background: #0088cc;
  transform: translateY(-2px);
  animation: none;
  box-shadow: 0 8px 25px rgba(0, 170, 255, 0.5);
}

/* Very small screens */
@media (max-width: 320px) {
  .container {
    padding: 0 0.5rem;
  }

  .hero h1 {
    font-size: 1.5rem;
  }

  .hero .tagline {
    font-size: 0.9rem;
  }

  .social-links a {
    width: 180px;
    font-size: 0.8rem;
  }

  .project-card img {
    height: 160px;
  }

  .project-media-wrapper {
    height: 160px;
  }

  .reveal-hint {
    font-size: 0.7rem;
    padding: 5px 10px;
    bottom: 8px;
  }

  .skill-badges {
    gap: 0.4rem;
  }

  .skill-badge {
    font-size: 0.7rem;
    padding: 0.3rem 0.6rem;
  }

  .project-card h3 {
    font-size: 1rem;
  }

  .project-card p {
    font-size: 0.85rem;
  }

  .tech-stack span {
    font-size: 0.65rem;
    padding: 0.1rem 0.4rem;
  }

  .btn {
    padding: 0.3rem 0.6rem;
    font-size: 0.8rem;
  }

  h2 {
    font-size: 1.6rem;
  }

  .testimonial-content {
    padding: 1rem 0.75rem;
  }

  .testimonial-content blockquote {
    font-size: 0.9rem;
  }

  .coming-soon-icon {
    width: 50px;
    height: 50px;
    font-size: 1.2rem;
  }

  .modal-content {
    padding: 1.5rem 1rem;
  }

  .modal-header h3 {
    font-size: 1.2rem;
  }

  .modal-header p {
    font-size: 0.85rem;
  }

  .modal-header i {
    font-size: 1.8rem;
  }

  .project-name-display {
    font-size: 0.95rem;
    padding: 0.75rem 1rem;
  }

  .request-card {
    padding: 1rem 1.2rem;
  }

  .request-card i {
    font-size: 1.5rem;
  }

  .request-card span {
    font-size: 0.95rem;
  }

  .request-card small {
    font-size: 0.75rem;
  }

  .btn-request-access {
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
  }

  .privacy-note {
    font-size: 0.7rem;
    margin-top: 1rem;
    padding-top: 0.8rem;
    gap: 0.4rem;
  }

  .privacy-note i {
    font-size: 0.8rem;
  }

  .badge-verified {
    font-size: 0.7rem;
    padding: 0.25rem 0.6rem;
    margin-left: 0.5rem;
  }
}
