/**
 * critical.css - Contains only the critical styles needed for initial page rendering
 * This helps improve First Contentful Paint (FCP) and Largest Contentful Paint (LCP) metrics
 */

/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Montserrat', sans-serif;
  background-color: #fff;
  color: #333;
  line-height: 1.6;
}

/* Header and navigation styles */
.navbar {
  background: #FFD600;
  padding: 0.6rem 2.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
  position: sticky;
  top: 0;
  z-index: 999;
}

.logo-bar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.main-logo {
  height: 90px;
  width: auto;
  border-radius: 12px;
  background: #fff;
  margin: 0 1.5rem 0 0;
  display: block;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  padding: 4px;
}

nav {
  display: flex;
  align-items: center;
  gap: 2.5rem;
}

nav a {
  color: #222;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.15rem;
  padding: 0.4rem 0;
  transition: color 0.2s;
  position: relative;
}

/* Hero section styles */
.hero {
  min-height: 80vh;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 0 1.5rem;
  overflow: hidden;
}

.home-hero {
  background-image: url('../images/skanda-banner.jpg');
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('../images/banner.jpg');
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  z-index: -2;
  opacity: 1 !important;
}

.hero::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(76, 175, 80, 0.3);
  z-index: 0;
}

.hero-content {
  max-width: 700px;
  margin: 0 auto;
  background: rgba(34, 34, 34, 0.15);
  border-radius: 18px;
  padding: 2.5rem 2rem;
  box-shadow: 0 6px 32px rgba(0,0,0,0.09);
  position: relative;
  z-index: 2;
}

.hero h1 {
  font-size: 2.8rem;
  font-weight: 800;
  margin-bottom: 1rem;
}

.hero .highlight {
  color: #FFD600;
  display: inline-block;
}

.hero p {
  font-size: 1.3rem;
  margin-bottom: 2rem;
}

.hero-buttons {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
}

/* Button styles */
.primary-btn {
  background: #c3951b;
  color: white;
  text-decoration: none;
  padding: 14px 28px;
  border-radius: 6px;
  font-weight: 700;
  transition: background 0.3s;
}

.secondary-btn {
  background: rgba(255, 255, 255, 0.9);
  color: #222;
  text-decoration: none;
  padding: 14px 28px;
  border-radius: 6px;
  font-weight: 700;
  transition: all 0.3s;
}

/* Mobile navigation */
/* Hide hamburger by default (desktop) */
.hamburger {
  display: none !important;
}

/* Show hamburger only on mobile and move to right */
@media (max-width: 768px) {
  .hamburger {
    display: flex !important;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: absolute;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    margin-left: 0;
    margin-right: 0;
    z-index: 1200;
    background: rgba(255, 214, 0, 0.4);
    border-radius: 8px;
    padding: 8px;
    width: 44px;
    height: 44px;
    cursor: pointer;
  }
  .hamburger span {
    display: block;
    width: 28px;
    height: 3px;
    margin: 5px 0;
    background: #222;
    border-radius: 2px;
    transition: all 0.3s;
  }
  .hamburger.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }
  .hamburger.active span:nth-child(2) {
    opacity: 0;
  }
  .hamburger.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }
.hamburger.active span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
  background: #333;
}
.hamburger.active span:nth-child(2) {
  opacity: 0;
}
.hamburger.active span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
  background: #333;
}

/* Responsive styles */
@media (max-width: 768px) {
  .navbar {
    padding: 0.6rem 1.5rem;
  }
  .main-logo {
    height: 70px;
    margin: 0 1rem 0 0;
  }
  .logo-bar {
    width: 100%;
    justify-content: space-between;
  }
  
  .project-grid {
    grid-template-columns: 1fr !important;
    padding: 0 15px !important;
  }
  
  .project-card {
    margin-bottom: 20px;
  }
  
  .hamburger {
    display: flex !important;
    margin-left: auto;
    position: relative;
    z-index: 1200;
    cursor: pointer;
    background: rgba(255, 214, 0, 0.4);
    border-radius: 8px;
    padding: 8px;
    width: 44px;
    height: 44px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border: 1px solid rgba(0, 0, 0, 0.1);
  }
  
  nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background: #fff;
    flex-direction: column;
    align-items: flex-start;
    padding: 120px 2rem 2rem;
    transition: right 0.3s ease;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    overflow-y: auto;
  }
  
  nav a {
    width: 100%;
    padding: 12px 0;
    border-bottom: 1px solid #eee;
    font-size: 1.2rem;
  }
  
  nav.open, nav.active {
    right: 0 !important;
    box-shadow: -5px 0 25px rgba(0, 0, 0, 0.2);
  }
  
  .hero h1 {
    font-size: 2.2rem;
  }
  
  .hero p {
    font-size: 1.1rem;
  }
  
  .hero-buttons {
    flex-direction: column;
    gap: 1rem;
  }
}

/* Loading state for images */
img.loaded {
  animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}