/* ===== RESET & VARIABLES ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #10b981;
  --primary-dark: #059669;
  --secondary: #3b82f6;
  --dark: #1f2937;
  --light: #f9fafb;
  --text: #374151;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
  font-family: 'Poppins', sans-serif;
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

/* ===== NAVIGATION MOBILE-FIRST ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
  z-index: 1000;
  padding: 1rem;
  transition: var(--transition);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
}

.nav-toggle {
  display: block;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--dark);
}

.main-nav {
  position: fixed;
  top: 70px;
  left: -100%;
  width: 100%;
  height: calc(100vh - 70px);
  background: white;
  display: flex;
  flex-direction: column;
  padding: 2rem;
  gap: 1rem;
  transition: var(--transition);
  box-shadow: var(--shadow);
  z-index: 999;
}

.main-nav.active {
  left: 0;
}

.main-nav a {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  padding: 0.8rem 1rem;
  border-radius: 8px;
  transition: var(--transition);
}

.main-nav a:hover {
  background: var(--light);
  color: var(--primary);
  transform: translateX(5px);
}

/* ===== HERO SECTION ===== */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 6rem 1.5rem 3rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 1px, transparent 1px);
  background-size: 50px 50px;
  animation: moveGrid 20s linear infinite;
  opacity: 0.3;
}

@keyframes moveGrid {
  0% { transform: translate(0, 0); }
  100% { transform: translate(50px, 50px); }
}

.profile-photo {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  border: 5px solid white;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
  animation: float 3s ease-in-out infinite;
  margin-bottom: 2rem;
  position: relative;
  z-index: 1;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.hero-text {
  position: relative;
  z-index: 1;
}

.hero-text h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1rem;
  animation: fadeInUp 0.8s ease-out;
}

#typing {
  color: #fbbf24;
  border-right: 3px solid #fbbf24;
  padding-right: 5px;
  animation: blink 0.7s infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.subtitle {
  font-size: 1rem;
  margin-bottom: 2rem;
  opacity: 0.95;
  animation: fadeInUp 0.8s ease-out 0.2s both;
}

.hero-cta {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  animation: fadeInUp 0.8s ease-out 0.4s both;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== BUTTONS ===== */
.btn, .btn-outline {
  display: inline-block;
  padding: 0.9rem 2rem;
  border-radius: 30px;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
  cursor: pointer;
  border: 2px solid white;
}

.btn {
  background: white;
  color: #667eea;
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.btn-outline {
  background: transparent;
  color: white;
}

.btn-outline:hover {
  background: white;
  color: #667eea;
  transform: translateY(-3px);
}

/* ===== MAIN CONTENT ===== */
main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 4rem 1.5rem;
}

.intro {
  text-align: center;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 0.8s ease-out 0.6s forwards;
}

.intro h2 {
  font-size: 2rem;
  color: var(--dark);
  margin-bottom: 1rem;
  position: relative;
  display: inline-block;
}

.intro h2::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: 2px;
}

.intro p {
  font-size: 1.1rem;
  max-width: 700px;
  margin: 2rem auto 0;
  color: var(--text);
}

/* ===== FOOTER ===== */
footer {
  background: var(--dark);
  color: white;
  padding: 2rem 1.5rem;
  text-align: center;
}

footer p {
  margin-bottom: 1.5rem;
}

.hire-btn {
  background: var(--primary);
  color: white;
  border: none;
  padding: 1rem 2.5rem;
  border-radius: 30px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.hire-btn:hover {
  background: var(--primary-dark);
  transform: scale(1.05);
}

/* ===== RESPONSIVE TABLET ===== */
@media (min-width: 768px) {
  .nav-toggle {
    display: none;
  }

  .main-nav {
    position: static;
    flex-direction: row;
    height: auto;
    width: auto;
    padding: 0;
    box-shadow: none;
    background: transparent;
    gap: 0.5rem;
  }

  .profile-photo {
    width: 180px;
    height: 180px;
  }

  .hero-text h1 {
    font-size: 2.5rem;
  }

  .subtitle {
    font-size: 1.2rem;
  }

  .hero-cta {
    flex-direction: row;
    justify-content: center;
  }

  .intro h2 {
    font-size: 2.5rem;
  }
}

/* ===== RESPONSIVE DESKTOP ===== */
@media (min-width: 1024px) {
  .hero {
    flex-direction: row;
    text-align: left;
    padding: 8rem 3rem;
    gap: 4rem;
  }

  .profile-photo {
    width: 220px;
    height: 220px;
    margin-bottom: 0;
  }

  .hero-text h1 {
    font-size: 3.5rem;
  }

  .subtitle {
    font-size: 1.3rem;
  }

  .hero-cta {
    justify-content: flex-start;
  }

  main {
    padding: 5rem 3rem;
  }
}

/* ===== SCROLL ANIMATIONS ===== */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== PROJECTS PAGE STYLES ===== */

/* Page Header */
.page-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 8rem 1.5rem 3rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-header::before {
  content: '';
  position: absolute;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 1px, transparent 1px);
  background-size: 50px 50px;
  animation: moveGrid 20s linear infinite;
  opacity: 0.3;
}

.page-header h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  position: relative;
  z-index: 1;
  animation: fadeInUp 0.6s ease-out;
}

.header-subtitle {
  font-size: 1.1rem;
  opacity: 0.9;
  position: relative;
  z-index: 1;
  animation: fadeInUp 0.6s ease-out 0.2s both;
}

/* Projects Section */
.projects-section {
  padding: 5rem 1.5rem;
  background: linear-gradient(180deg, #f9fafb 0%, white 100%);
}

.projects-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

/* Project Cards */
.project-card {
  background: white;
  border-radius: 20px;
  padding: 2rem;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  position: relative;
  overflow: hidden;
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, #10b981, #3b82f6);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.project-card:hover::before {
  transform: scaleX(1);
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.project-icon {
  font-size: 3.5rem;
  text-align: center;
  animation: float 3s ease-in-out infinite;
}

.project-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.project-badge {
  display: inline-block;
  padding: 0.4rem 1rem;
  background: #d1fae5;
  color: #065f46;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  width: fit-content;
}

.project-badge.water {
  background: #dbeafe;
  color: #1e40af;
}

.project-badge.civic {
  background: #fef3c7;
  color: #92400e;
}

.project-card h3 {
  font-size: 1.5rem;
  color: #1f2937;
  margin: 0;
}

.project-card p {
  color: #6b7280;
  line-height: 1.7;
  margin: 0;
}

.project-stats {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  padding: 1rem 0;
  border-top: 1px solid #e5e7eb;
  border-bottom: 1px solid #e5e7eb;
}

.project-stats span {
  color: #6b7280;
  font-size: 0.95rem;
}

.project-stats strong {
  color: #667eea;
  font-weight: 600;
}

.btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 0.9rem 2rem;
  border-radius: 30px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  width: fit-content;
}

.btn-primary:hover {
  transform: translateX(5px);
  box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}

/* Modals */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2000;
  animation: fadeIn 0.3s ease-out;
}

.modal.active {
  display: flex;
  justify-content: center;
  align-items: center;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
}

.modal-content {
  position: relative;
  background: white;
  border-radius: 20px;
  max-width: 700px;
  max-height: 90vh;
  overflow-y: auto;
  margin: 1rem;
  animation: slideUp 0.4s ease-out;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: #f3f4f6;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6b7280;
  z-index: 1;
}

.modal-close:hover {
  background: #e5e7eb;
  transform: rotate(90deg);
  color: #1f2937;
}

.modal-header {
  padding: 2.5rem 2rem 1.5rem;
  text-align: center;
  background: linear-gradient(135deg, #f9fafb 0%, white 100%);
  border-radius: 20px 20px 0 0;
}

.modal-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
  animation: float 3s ease-in-out infinite;
}

.modal-header h2 {
  font-size: 2rem;
  color: #1f2937;
  margin-bottom: 0.5rem;
}

.modal-badge {
  display: inline-block;
  padding: 0.4rem 1rem;
  background: #d1fae5;
  color: #065f46;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
}

.modal-badge.water {
  background: #dbeafe;
  color: #1e40af;
}

.modal-badge.civic {
  background: #fef3c7;
  color: #92400e;
}

.modal-body {
  padding: 2rem;
}

.modal-description {
  font-size: 1.1rem;
  line-height: 1.8;
  color: #374151;
  margin-bottom: 2rem;
}

.modal-section {
  margin-bottom: 2rem;
}

.modal-section h3 {
  font-size: 1.3rem;
  color: #1f2937;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #e5e7eb;
}

.modal-list {
  list-style: none;
  padding: 0;
}

.modal-list li {
  padding: 0.7rem 0 0.7rem 2rem;
  position: relative;
  color: #6b7280;
  line-height: 1.6;
}

.modal-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: #10b981;
  font-weight: bold;
  font-size: 1.2rem;
}

.impact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.impact-item {
  text-align: center;
  padding: 1.5rem;
  background: linear-gradient(135deg, #f9fafb 0%, white 100%);
  border-radius: 15px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
}

.impact-number {
  font-size: 2.5rem;
  font-weight: 700;
  color: #667eea;
  margin-bottom: 0.5rem;
}

.impact-label {
  color: #6b7280;
  font-size: 0.9rem;
}

.status-badge {
  display: inline-block;
  padding: 0.6rem 1.5rem;
  border-radius: 25px;
  font-weight: 600;
  margin-bottom: 1rem;
}

.status-badge.completed {
  background: #d1fae5;
  color: #065f46;
}

.status-badge.progress {
  background: #dbeafe;
  color: #1e40af;
}

.status-badge.proposal {
  background: #fef3c7;
  color: #92400e;
}

/* Responsive */
@media (min-width: 768px) {
  .page-header h1 {
    font-size: 3rem;
  }

  .header-subtitle {
    font-size: 1.2rem;
  }

  .projects-container {
    grid-template-columns: repeat(2, 1fr);
  }

  .project-card {
    padding: 2.5rem;
  }
}

@media (min-width: 1024px) {
  .projects-container {
    grid-template-columns: repeat(3, 1fr);
  }

  .modal-content {
    margin: 2rem;
  }
}

/* Scroll bar styling for modal */
.modal-content::-webkit-scrollbar {
  width: 8px;
}

.modal-content::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

.modal-content::-webkit-scrollbar-thumb {
  background: #667eea;
  border-radius: 10px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
  background: #5568d3;
}

/* style projects nampina farany */
/* Badge Prototype */
.project-badge.prototype {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white;
  padding: 5px 15px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  position: absolute;
  top: 15px;
  right: 15px;
  z-index: 10;
}

/* Status badges */
.project-status {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0;
}

.status-badge {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 15px;
  font-size: 0.85rem;
  font-weight: 500;
}

.status-badge.research {
  background: #dbeafe;
  color: #1e40af;
}

.status-badge.design {
  background: #fef3c7;
  color: #92400e;
}

.status-badge.pending {
  background: #fee2e2;
  color: #991b1b;
}

/* Project targets */
.project-targets {
  background: #f0fdf4;
  border-left: 4px solid #10b981;
  padding: 15px;
  border-radius: 8px;
  margin: 20px 0;
}

.project-targets h4 {
  color: #059669;
  font-size: 1rem;
  margin-bottom: 10px;
}

.project-targets ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.project-targets li {
  padding: 5px 0;
  color: #065f46;
}