/* Smooth Scroll */
html {
  scroll-behavior: smooth;
}

/* General Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* General Styles */
body {
  font-family: 'Poppins', sans-serif;
  color: #000;
  background: #ffffff;
  line-height: 1.6;
  position: relative;
}

/* Particles Background */
#particles-js {
  position: absolute;
  width: 100%;
  height: 100%;
  background: #1C1C1E;
  z-index: 0;
}

/* Header & Nav */
header {
  position: relative;
  background: transparent;
  color: #fff;
  z-index: 1;
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 50px;
  position: relative;
  z-index: 2;
}

nav h1 {
  margin: 0;
  color: #FFD700;
  font-weight: 600;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 25px;
}

nav a {
  color: #FFD700;
  text-decoration: none;
  font-size: 1rem;
  transition: color 0.3s ease;
}

nav a:hover {
  color: #CFAF5F;
}

/* Hero Section */
.hero {
  position: relative;
  z-index: 2;
  color: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 80px 20px;
}

.hero-content {
  display: flex;
  align-items: center;
  gap: 20px;
  max-width: 1000px;
  margin: 0 auto;
  padding: 20px;
  z-index: 2;
}

.hero-photo-wrapper {
  position: relative;
  width: 425px;
  height: 425px;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-photo {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  transform: scale(1.05);
  transition: opacity 3s ease-in-out, transform 3s ease-in-out;
}

.hero-photo.active {
  opacity: 1;
  transform: scale(1);
}

.hero-text {
  flex: 1;
  text-align: left;
}

.hero-text h2 {
  color: #FFD700;
  font-size: 2.8rem;
  margin-bottom: 10px;
}

.hero-text p {
  font-size: 1.3rem;
  margin-bottom: 20px;
  color: #fff;
}

.hero .btn {
  background: #FFD700;
  color: #1C1C1E;
  padding: 12px 30px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  transition: background 0.3s ease, transform 0.2s ease;
}

.hero .btn:hover {
  background: #CFAF5F;
  transform: translateY(-3px);
}

/* Sections */
section {
  padding: 40px 20px;
}

#about, #projects, #contact {
  background: #ffffff;
  color: #000;
}

#projects {
  margin-top: -10px;
}

#contact {
  padding-top: 10px;
  padding-bottom: 30px;
}

/* Section Headings */
section h2, section h3 {
  margin-top: 0;
  margin-bottom: 15px;
  color: #1C1C1E;
}

.category-title {
  font-size: 1.5rem;
  margin-bottom: 15px;
  color: #1C1C1E;
  border-bottom: 2px solid #FFD700;
  padding-bottom: 5px;
  text-align: left;
}

/* Project Grid and Cards */
.project-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* 2 cards per row on desktop */
  gap: 20px;
  margin-top: 15px;
  align-items: stretch; /* Equal card heights */
}

.project-card {
  background: #f5f5f5;
  color: #000;
  padding: 25px;
  border-left: 4px solid #FFD700;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: flex-start; /* Remove vertical centering */
  text-align: left;
  height: 100%;
}

.project-card h4 {
  margin-bottom: 8px; /* Tighter spacing under titles */
  text-align: left;   /* Force all titles to align left */
}

.project-card p {
  margin: 0 0 10px; /* Consistent spacing after descriptions */
}

.project-card p a {
  color: #1C1C1E; /* Default black links */
  border-bottom: 2px solid #FFD700;
  text-decoration: none;
  padding-bottom: 2px;
  transition: color 0.3s ease, border-color 0.3s ease;
}

.project-card p a:hover {
  color: #FFD700; /* Gold on hover */
  border-color: #FFD700;
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

/* On mobile, stack cards 1 per row */
@media (max-width: 768px) {
  .project-grid {
    grid-template-columns: 1fr;
  }
}

/* Contact Links */
#contact a {
  color: #1C1C1E;
  border-bottom: 2px solid #FFD700;
  text-decoration: none;
  padding-bottom: 2px;
  transition: color 0.3s ease, border-color 0.3s ease;
}

#contact a:hover {
  color: #FFD700;
  border-color: #FFD700;
}

/* Footer */
footer {
  text-align: center;
  padding: 20px;
  background: #1C1C1E;
  color: #FFD700;
}

/* Responsive */
@media (max-width: 768px) {
  nav {
    flex-direction: column;
    gap: 10px;
  }

  .hero-content {
    flex-direction: column;
    text-align: center;
  }

  .hero-photo-wrapper {
    width: 100%;
    height: auto;
  }

  .hero-text {
    padding-left: 0;
  }
}
