/* =========================================
   VARIABLES & DESIGN TOKENS
   ========================================= */
:root {
  /* User requested palette */
  --green-900: #1B5E20; /* Primary Dark */
  --green-500: #66BB6A; /* Medium */
  --green-300: #A5D6A7; /* Light */
  --green-50:  #E8F5E9; /* Lightest Background */

  --bg-color: var(--green-50);
  --surface-color: #ffffff;
  --surface-color-light: rgba(255, 255, 255, 0.6);
  
  --primary-color: var(--green-900);
  --secondary-color: var(--green-500);
  
  --text-primary: #1a1a1a;
  --text-secondary: #4a5568;
  
  --font-sans: 'Inter', sans-serif;
  --font-display: 'Outfit', sans-serif;
  
  --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  --border-radius: 12px;
}

/* =========================================
   RESET & BASE STYLES
   ========================================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-color);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
}

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

ul {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

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

/* =========================================
   UTILITIES (Glassmorphism, Gradients)
   ========================================= */
.glass {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
}

.text-gradient {
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline-block;
}

.btn {
  display: inline-block;
  padding: 0.8rem 2rem;
  border-radius: 30px;
  font-family: var(--font-sans);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  font-size: 1rem;
}

.btn-primary {
  background: linear-gradient(135deg, var(--green-500), var(--green-900));
  color: #fff;
  box-shadow: 0 4px 15px rgba(27, 94, 32, 0.3);
}

.btn-primary:hover {
  box-shadow: 0 6px 20px rgba(27, 94, 32, 0.4);
  transform: translateY(-2px);
}

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

.btn-outline:hover {
  background: rgba(27, 94, 32, 0.1);
  transform: translateY(-2px);
}

/* =========================================
   HEADER & NAVIGATION
   ========================================= */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 1.2rem 0;
  transition: var(--transition);
}

header.scrolled {
  padding: 0.8rem 0;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: 0 2px 10px rgba(0,0,0,0.02);
}

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

.logo {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -1px;
}

.nav-links {
  display: flex;
  gap: 2.5rem;
}

.nav-links a {
  font-weight: 600;
  font-size: 1rem;
  position: relative;
  color: var(--text-primary);
}

.nav-links a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -4px;
  left: 0;
  background-color: var(--secondary-color);
  transition: var(--transition);
}

.nav-links a:hover::after {
  width: 100%;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
}

/* =========================================
   SECTIONS
   ========================================= */
section {
  padding: 6rem 0;
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-title {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
}

.section-subtitle {
  color: var(--text-secondary);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto;
}

/* HERO SECTION */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding-top: 80px;
}

.hero-content {
  max-width: 800px;
  position: relative;
  z-index: 2;
}

.hero-badge {
  display: inline-block;
  padding: 0.4rem 1rem;
  background: var(--green-300);
  border: 1px solid var(--green-500);
  border-radius: 20px;
  color: var(--green-900);
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

.hero-title {
  font-size: 4.5rem;
  margin-bottom: 1.5rem;
  line-height: 1.1;
  color: var(--primary-color);
}

.hero-desc {
  font-size: 1.2rem;
  color: var(--text-secondary);
  margin-bottom: 2.5rem;
  max-width: 600px;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
}

/* Hero Background Glow */
.hero-glow {
  position: absolute;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(165, 214, 167, 0.4) 0%, rgba(232, 245, 233, 0) 70%);
  top: 50%;
  right: -100px;
  transform: translateY(-50%);
  z-index: 1;
  pointer-events: none;
}

/* ABOUT SECTION */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.about-img {
  border-radius: var(--border-radius);
  overflow: hidden;
  position: relative;
  box-shadow: 0 10px 30px rgba(27, 94, 32, 0.1);
}

.about-img::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--border-radius);
  border: 4px solid transparent;
  background: linear-gradient(135deg, var(--green-500), var(--green-900)) border-box;
  -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.about-text p {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
}

.skills-container {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2rem;
}

.skill-tag {
  background: var(--surface-color);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.9rem;
  border: 1px solid var(--green-300);
  color: var(--green-900);
  font-weight: 500;
  transition: var(--transition);
  box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}

.skill-tag:hover {
  background: var(--green-900);
  color: #fff;
  border-color: var(--green-900);
  transform: translateY(-2px);
}

/* PROJECTS SECTION */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
}

.project-card {
  border-radius: var(--border-radius);
  overflow: hidden;
  transition: var(--transition);
  position: relative;
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(27, 94, 32, 0.15);
  border-color: var(--green-300);
}

.project-img-wrapper {
  width: 100%;
  height: 220px;
  overflow: hidden;
  background-color: var(--green-50);
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid rgba(0,0,0,0.05);
}

.project-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.project-card:hover .project-img-wrapper img {
  transform: scale(1.05);
}

.project-content {
  padding: 1.5rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.project-title {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
  color: var(--primary-color);
}

.project-desc {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.project-tags span {
  font-size: 0.8rem;
  color: var(--green-900);
  background: var(--green-300);
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  font-weight: 500;
}

.project-links {
  display: flex;
  gap: 1rem;
}

.project-links a {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
}

.project-links a:hover {
  color: var(--secondary-color);
}

/* CONTACT SECTION */
.contact-container {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.contact-card {
  padding: 3rem;
  border-radius: var(--border-radius);
  text-align: left;
}

.contact-form {
  display: grid;
  gap: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
}

.form-control {
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--green-300);
  padding: 1rem;
  border-radius: 8px;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 1rem;
  transition: var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--green-900);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(102, 187, 106, 0.2);
}

textarea.form-control {
  resize: vertical;
  min-height: 150px;
}

/* FOOTER */
footer {
  padding: 3rem 0;
  border-top: 1px solid var(--green-300);
  text-align: center;
  background: var(--surface-color);
}

.footer-content p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* ANIMATIONS (Triggered via JS class) */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* =========================================
   MEDIA QUERIES
   ========================================= */
@media (max-width: 992px) {
  .hero-title {
    font-size: 3.5rem;
  }
  .about-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }
  
  .mobile-menu-btn {
    display: block;
  }
  
  .hero-title {
    font-size: 2.8rem;
  }
  
  .section-title {
    font-size: 2rem;
  }
  
  .hero-buttons {
    flex-direction: column;
  }
  
  .contact-card {
    padding: 2rem 1.5rem;
  }
}
