/* Base Styles */
:root {
  --primary-color: #0a192f;
  --secondary-color: #64ffda;
  --text-color: #8892b0;
  --heading-color: #ccd6f6;
  --background-color: #f5f5f7;
  --card-bg: #ffffff;
  --hover-color: #f0f5ff;
  --shadow-color: rgba(0, 0, 0, 0.1);
  --transition-speed: 0.3s;
  --tag-background: #e0f7fa;
  --tag-color: #00796b;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Poppins', sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--background-color);
  overflow-x: hidden;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header Styles */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 20px 0;
  z-index: 1000;
  background-color: rgba(255, 255, 255, 0.95);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

header.scrolled {
  padding: 12px 0;
  background-color: rgba(255, 255, 255, 0.98);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

header .logo {
  float: left;
  margin-left: 30px;
}

header .logo a {
  color: var(--primary-color);
  font-size: 24px;
  font-weight: 700;
  text-decoration: none;
  padding: 5px 12px;
  border: 2px solid var(--primary-color);
  border-radius: 5px;
  transition: all 0.3s ease;
}

header .logo a:hover {
  background-color: var(--primary-color);
  color: white;
}

nav {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

nav ul {
  display: flex;
  list-style: none;
  margin-right: 30px;
}

nav ul li {
  margin-left: 30px;
}

nav ul li a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
  font-size: 16px;
  position: relative;
  padding: 5px 0;
  transition: all 0.3s ease;
}

nav ul li a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--primary-color);
  transition: width 0.3s ease;
}

nav ul li a:hover::after, 
nav ul li a.active::after {
  width: 100%;
}

nav ul li a.active {
  font-weight: 600;
}

.mobile-menu-btn {
  display: none;
  cursor: pointer;
  margin-right: 20px;
  font-size: 24px;
}

/* Projects Hero Section */
.projects-hero {
  background: linear-gradient(135deg, var(--primary-color), #1a365d);
  color: white;
  padding: 150px 0 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.projects-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="none"><path d="M0,0 L100,100 L0,100 Z" fill="rgba(255,255,255,0.05)"/></svg>');
  background-size: 100% 100%;
}

.projects-hero .hero-content {
  position: relative;
  z-index: 10;
  max-width: 800px;
  margin: 0 auto;
}

.projects-hero h1 {
  font-size: 48px;
  margin-bottom: 20px;
  color: var(--heading-color);
}

.projects-hero p {
  font-size: 18px;
  color: #a8b2d1;
  max-width: 600px;
  margin: 0 auto;
}

/* Projects Content */
.projects-content {
  padding: 80px 0;
}

.intro-section {
  text-align: center;
  margin-bottom: 40px;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.5s ease;
}

.intro-section.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.intro-section h2 {
  font-size: 32px;
  color: var(--primary-color);
  margin-bottom: 15px;
  position: relative;
  display: inline-block;
}

.intro-section h2::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 3px;
  background-color: var(--secondary-color);
}

.intro-text {
  font-size: 18px;
  color: #555;
  max-width: 800px;
  margin: 0 auto;
}

/* Category Filter */
.category-filter {
  display: flex;
  justify-content: center;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 10px 20px;
  margin: 0 8px 10px;
  background-color: transparent;
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
  border-radius: 30px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.3s ease;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.filter-btn.active,
.filter-btn:hover {
  background-color: var(--primary-color);
  color: white;
}

/* Project Categories */
.project-category {
  margin-bottom: 30px;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.5s ease;
}

.project-category.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Category Header - Clickable */
.category-header {
  display: flex;
  align-items: center;
  background-color: var(--primary-color);
  padding: 15px 20px;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: all 0.3s ease;
}

.category-header:hover {
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
  transform: translateY(-3px);
}

.category-icon {
  width: 40px;
  height: 40px;
  background-color: var(--secondary-color);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-right: 15px;
  flex-shrink: 0;
}

.category-icon i {
  color: var(--primary-color);
  font-size: 20px;
}

.category-header h3 {
  color: white;
  font-size: 22px;
  font-weight: 600;
  margin: 0;
  flex: 1;
}

.toggle-icon {
  color: white;
  font-size: 18px;
  transition: all 0.3s ease;
}

.project-category.active .toggle-icon i {
  transform: rotate(180deg);
}

/* Projects Panel - Collapsible */
.projects-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s ease;
  background-color: white;
  border-radius: 0 0 8px 8px;
  box-shadow: 0 5px 15px var(--shadow-color);
  margin-top: -5px;
}

.project-category.active .projects-panel {
  max-height: 5000px; /* Large enough to fit all content */
}

/* Projects List */
.projects-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 20px;
}

.project-item {
  display: flex;
  background-color: #f8f9fa;
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.3s ease;
  opacity: 0;
  transform: translateY(15px);
  margin-bottom: 15px;
}

.project-item.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.project-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
  background-color: var(--hover-color);
}

.project-icon {
  min-width: 80px;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.project-icon i {
  font-size: 30px;
  color: var(--primary-color);
}

.project-details {
  padding: 20px;
  flex: 1;
}

.project-details h4 {
  color: var(--primary-color);
  font-size: 20px;
  margin-bottom: 10px;
  font-weight: 600;
}

.project-details p {
  color: #555;
  margin-bottom: 15px;
  line-height: 1.6;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 15px;
}

.project-tags span {
  background-color: var(--tag-background);
  color: var(--tag-color);
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
}

.project-links {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
}

.project-link {
  display: inline-flex;
  align-items: center;
  color: var(--primary-color);
  font-weight: 500;
  text-decoration: none;
  font-size: 14px;
  transition: all 0.3s ease;
}

.project-link i {
  margin-right: 6px;
}

.project-link:hover {
  color: var(--secondary-color);
}

/* Contact Section */
#contact {
  padding: 80px 0;
  background-color: var(--background-color);
}

#contact h2 {
  text-align: center;
  font-size: 32px;
  color: var(--primary-color);
  margin-bottom: 40px;
  position: relative;
}

#contact h2::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 3px;
  background-color: var(--secondary-color);
}

.contact-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  background-color: white;
  border-radius: 12px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.contact-info {
  padding: 40px;
  background: linear-gradient(135deg, var(--primary-color), #1a365d);
  color: white;
}

.contact-info h3 {
  font-size: 24px;
  margin-bottom: 15px;
  color: var(--heading-color);
}

.contact-info p {
  margin-bottom: 25px;
  color: #a8b2d1;
}

.contact-details {
  list-style: none;
  margin-bottom: 30px;
}

.contact-details li {
  margin-bottom: 15px;
  display: flex;
  align-items: center;
}

.contact-details li i {
  margin-right: 10px;
  width: 20px;
  color: var(--secondary-color);
}

.social-links {
  display: flex;
}

.social-links a {
  width: 40px;
  height: 40px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 10px;
  color: white;
  transition: all 0.3s ease;
}

.social-links a:hover {
  background-color: var(--secondary-color);
  color: var(--primary-color);
  transform: translateY(-3px);
}

form {
  padding: 40px;
}

.form-group {
  margin-bottom: 20px;
}

form label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: #555;
}

form input,
form textarea {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-family: 'Poppins', sans-serif;
  transition: all 0.3s ease;
}

form input:focus,
form textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(10, 25, 47, 0.1);
}

form textarea {
  min-height: 120px;
  resize: vertical;
}

button[type="submit"] {
  display: inline-block;
  padding: 12px 25px;
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: 6px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

button[type="submit"]:hover {
  background-color: #152347;
  transform: translateY(-2px);
}

/* Button Styles */
.btn {
  display: inline-block;
  padding: 12px 25px;
  border-radius: 6px;
  font-weight: 500;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.primary-btn {
  background-color: var(--primary-color);
  color: white;
  border: 2px solid var(--primary-color);
}

.primary-btn:hover {
  background-color: #152347;
  transform: translateY(-2px);
}

/* Footer Styles */
footer {
  background-color: var(--primary-color);
  color: #a8b2d1;
  padding: 40px 0;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.footer-info p {
  margin-bottom: 5px;
}

footer .social-links a {
  background-color: rgba(255, 255, 255, 0.1);
}

/* Animations */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease;
}

.animate-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Hide and Show Project Categories */
.project-category.hidden {
  display: none;
}

/* Media Queries */
@media (max-width: 992px) {
  .contact-wrapper {
    grid-template-columns: 1fr;
  }
  
  .project-item {
    flex-direction: column;
  }
  
  .project-icon {
    min-width: 100%;
    height: 60px;
  }
}

@media (max-width: 768px) {
  header .logo {
    margin-left: 15px;
  }
  
  nav ul {
    display: none;
    position: absolute;
    top: 80px;
    left: 0;
    width: 100%;
    background-color: white;
    flex-direction: column;
    padding: 20px 0;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
  }
  
  nav ul.active {
    display: flex;
  }
  
  nav ul li {
    margin: 0;
    text-align: center;
    padding: 12px 0;
  }
  
  .mobile-menu-btn {
    display: block;
  }
  
  .projects-hero h1 {
    font-size: 36px;
  }
  
  .projects-hero p {
    font-size: 16px;
  }
  
  .category-header {
    flex-direction: column;
    padding: 15px;
    text-align: center;
  }
  
  .category-icon {
    margin-right: 0;
    margin-bottom: 10px;
  }
  
  .project-links {
    flex-direction: column;
    gap: 10px;
  }
  
  .footer-content {
    flex-direction: column;
    text-align: center;
  }
  
  .footer-info {
    margin-bottom: 20px;
  }
}

@media (max-width: 480px) {
  .projects-hero h1 {
    font-size: 28px;
  }
  
  .projects-hero {
    padding: 120px 0 60px;
  }
  
  .intro-section h2 {
    font-size: 26px;
  }
  
  .category-header h3 {
    font-size: 20px;
  }
  
  .project-details h4 {
    font-size: 18px;
  }
  
  .project-details p {
    font-size: 14px;
  }
  
  .filter-btn {
    padding: 8px 15px;
    font-size: 12px;
  }
  
  .contact-info, form {
    padding: 25px;
  }
}

/* Accessibility focus states */
.filter-btn:focus,
.project-link:focus,
form input:focus,
form textarea:focus,
button[type="submit"]:focus,
.social-links a:focus {
  outline: 2px solid var(--secondary-color);
  outline-offset: 2px;
}