:root {
  /* Light Mode */
  --primary: #35530E;
  --primary-light: #4A7019;
  --accent: #8EB163;
  --text: #1a1a1a;
  --bg: #fdfdfb;
  --bg-alt: #f4f7f0;
  --card: #ffffff;
  --nav-bg: rgba(255, 255, 255, 0.85);
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  --border: rgba(53, 83, 14, 0.1);
  /* Hero Light Mode */
  --hero-bg: linear-gradient(135deg, #fdfdfb 0%, #e8efde 100%);
  --hero-text: #1a1a1a;
  --hero-btn-bg: #35530E;
  --hero-btn-text: #ffffff;
}

body.dark {
  /* Dark Mode */
  --primary: #8EB163;
  --primary-light: #A5C87E;
  --accent: #35530E;
  --text: #e0e0e0;
  --bg: #0b0f05;
  --bg-alt: #12180a;
  --card: #151d0a;
  --nav-bg: rgba(11, 15, 5, 0.85);
  --shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
  --border: rgba(142, 177, 99, 0.1);
  /* Hero Dark Mode */
  --hero-bg: linear-gradient(135deg, #152206 0%, #35530E 100%);
  --hero-text: #ffffff;
  --hero-btn-bg: #ffffff;
  --hero-btn-text: #35530E;
}

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

body {
  font-family: 'Poppins', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  transition: background 0.4s ease, color 0.4s ease;
  overflow-x: hidden;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

html { scroll-behavior: smooth; }

/* Navbar */
.navbar {
  position: fixed;
  top: 0; width: 100%;
  background: var(--nav-bg);
  backdrop-filter: blur(12px);
  z-index: 1000;
  padding: 15px 0;
  box-shadow: var(--shadow);
  border-bottom: 1px solid var(--border);
}

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

.nav-menu { display: flex; gap: 20px; list-style: none; }
.nav-menu a {
  text-decoration: none;
  color: var(--text);
  font-weight: 500;
  font-size: 0.9rem;
  transition: 0.3s;
  opacity: 0.8;
}
.nav-menu a:hover, .nav-menu a.active { color: var(--primary); opacity: 1; }

.nav-actions { display: flex; align-items: center; gap: 15px; }

/* Mobile Menu Button */
.menu-btn {
  display: none;
  flex-direction: column; gap: 6px;
  cursor: pointer;
  z-index: 1001;
}
.menu-btn span {
  width: 30px;
  height: 3px;
  background: var(--text);
  border-radius: 2px;
  transition: 0.3s;
}
.menu-btn.active span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.menu-btn.active span:nth-child(2) { opacity: 0; }
.menu-btn.active span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

/* Language Switch in Nav */
.lang-switch { display: flex; gap: 5px; background: var(--border); padding: 4px; border-radius: 20px; }
.lang-btn {
  background: transparent;
  border: none;
  color: var(--text);
  padding: 4px 10px;
  border-radius: 15px;
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 600;
  transition: 0.3s;
  display: flex;
  align-items: center;
  gap: 5px;
}
.lang-btn.active { background: var(--primary); color: var(--bg); }

.theme-switch {
  cursor: pointer;
  font-size: 1.1rem;
  color: var(--primary);
  width: 35px; height: 35px;
  display: flex; align-items: center; justify-content: center;
  background: var(--border);
  border-radius: 50%;
  transition: 0.3s;
}

.theme-switch .fa-moon { display: none; }
body.dark .fa-sun { display: none; }
body.dark .fa-moon { display: inline; }

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: var(--hero-bg);
  color: var(--hero-text);
  padding: 120px 20px 80px;
  transition: background 0.4s ease, color 0.4s ease;
}

.hero-content { max-width: 850px; }
.profile-img {
  width: 200px; height: 200px;
  border-radius: 50%;
  object-fit: cover;
  border: 6px solid var(--primary);
  margin-bottom: 30px;
  box-shadow: var(--shadow);
}

.hero h1 { font-size: 3.5rem; font-weight: 700; margin-bottom: 10px; }
.hero p { font-size: 1.3rem; margin-bottom: 30px; opacity: 0.9; }

.contact-info {
  margin-bottom: 30px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
}
.contact-info a {
  color: var(--hero-text);
  text-decoration: none;
  font-size: 0.92rem;
  opacity: 1;
  transition: 0.3s;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid rgba(53, 83, 14, 0.2);
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}
.contact-info a:hover {
  color: var(--bg);
  background: var(--primary);
  border-color: var(--primary);
  transform: translateY(-2px);
}
body.dark .contact-info a {
  background: rgba(11, 15, 5, 0.55);
  border-color: rgba(142, 177, 99, 0.3);
}

.btn-cv {
  display: inline-block;
  padding: 16px 36px;
  background: var(--hero-btn-bg);
  color: var(--hero-btn-text);
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  transition: 0.3s;
  box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

/* Sections & Cards */
.section { padding: 100px 0; }
.section:nth-of-type(even) { background: var(--bg-alt); }
h2 { text-align: center; margin-bottom: 50px; color: var(--primary); font-size: 2.2rem; }

.job, .skill-category li, .award-card {
  background: var(--card);
  padding: 25px;
  border-radius: 15px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  margin-bottom: 20px;
  transition: 0.3s;
}
.job:hover, .award-card:hover { transform: translateY(-5px); border-color: var(--primary); }

/* Experience Section */
.experience-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}
.experience-card {
  background: linear-gradient(180deg, var(--bg-alt) 0%, var(--card) 100%);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 24px;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
.experience-card:hover {
  transform: translateY(-6px);
  border-color: var(--primary);
  box-shadow: 0 16px 35px rgba(0, 0, 0, 0.15);
}
.experience-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}
.experience-card h3 {
  font-size: 1.2rem;
  color: var(--primary);
}
.experience-org {
  font-weight: 500;
  opacity: 0.9;
  margin-bottom: 12px;
}
.experience-tag {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.75rem;
  letter-spacing: 0.02em;
  font-weight: 600;
  color: var(--primary);
  background: var(--border);
  border: 1px solid var(--border);
}
.experience-points {
  margin-top: 14px;
  padding-left: 18px;
  display: grid;
  gap: 8px;
}
.experience-points li {
  color: var(--text);
  opacity: 0.9;
}

/* Project Cards Improvement */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 30px;
}
.project-card {
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
}
.project-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-bottom: 1px solid var(--border);
}
.project-content {
  padding: 25px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}
.project-content p { margin-bottom: 12px; }
.project-links {
  margin-top: auto;
  padding: 0 25px 25px;
  display: flex;
  gap: 15px;
}
.btn-project {
  text-decoration: none;
  color: var(--primary);
  font-weight: 600;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border: 1.5px solid var(--primary);
  border-radius: 8px;
  transition: 0.3s;
}
.btn-project:hover {
  background: var(--primary);
  color: var(--bg);
}
.project-card:hover .project-img {
  transform: scale(1.03);
}

/* Skills Improvement */
.skills-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }
.skill-category h3 { margin-bottom: 20px; display: flex; align-items: center; gap: 10px; }
.skill-category ul { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; }
.skill-category li {
  background: var(--border);
  padding: 8px 15px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 0;
  transition: 0.3s;
  display: flex;
  align-items: center;
  gap: 8px;
}
.skill-category li i { color: var(--primary); }
.skill-category li:hover { background: var(--primary); color: var(--bg); transform: translateY(-3px); }

/* Awards Grid */
.awards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}


/* Contact Form */
.contact-container {
  max-width: 700px;
  margin: 0 auto;
}
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-top: 40px;
}
.contact-form input, .contact-form textarea {
  padding: 15px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
  width: 100%;
}
.contact-form input:focus, .contact-form textarea:focus {
  border-color: var(--primary);
  outline: 2px solid var(--border);
  outline-offset: 1px;
}
.contact-form textarea { min-height: 150px; resize: vertical; }
.contact-form button {
  padding: 15px;
  background: var(--primary);
  color: var(--bg);
  border: none;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.3s;
}
.contact-form button:hover { opacity: 0.9; transform: translateY(-2px); }

/* Contact Section & Footer */
.contact-section { text-align: center; background: var(--card); }
.social-links { 
  display: flex; 
  justify-content: center; 
  gap: 30px; 
  margin-top: 30px; 
}
.social-links a { font-size: 2rem; color: var(--primary); transition: 0.3s; }
.social-links a:hover { transform: translateY(-5px); }

.visit-counter {
  margin-top: 20px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 14px 18px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: linear-gradient(160deg, var(--card) 0%, var(--bg-alt) 100%);
}
.visit-title {
  font-weight: 600;
  color: var(--primary);
  font-size: 0.95rem;
}
.visit-number-wrap {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.05rem;
}
.visit-number-wrap i {
  color: var(--primary);
}
.visit-number-wrap strong {
  color: var(--primary);
  font-size: 1.15rem;
}
.visit-note {
  font-size: 0.82rem;
  opacity: 0.85;
}

footer {
  text-align: center;
  padding: 40px;
  background: var(--bg);
  color: var(--text);
  border-top: 1px solid var(--border);
}

/* Mobile */
@media (max-width: 992px) {
  .menu-btn { display: flex; }
  .nav-menu {
    position: fixed;
    top: 70px;
    right: -100%;
    width: 250px;
    height: calc(100vh - 70px);
    background: var(--nav-bg);
    backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 40px;
    transition: 0.4s;
    box-shadow: -10px 0 30px rgba(0,0,0,0.1);
  }
  .nav-menu.active { right: 0; }
  .hero h1 { font-size: 2.5rem; }
  .experience-card-header { flex-direction: column; align-items: flex-start; }
  .projects-grid { grid-template-columns: 1fr; }
}
