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

:root {
  --primary: #1a2b4a;
  --secondary: #2d5a8c;
  --accent: #f97316;
  --text-dark: #1f2937;
  --text-light: #6b7280;
  --bg-light: #f9fafb;
  --white: #ffffff;
  --border: #e5e7eb;
  --error: #ef4444;
}

body {
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  line-height: 1.6;
  color: var(--text-dark);
  background: var(--bg-light);
  overflow-x: hidden;
}

/* Navigation */
nav {
  position: fixed;
  top: 0;
  width: 100%;
  background: var(--white);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  z-index: 1000;
  transition: all 0.3s ease;
}

nav.scrolled {
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.2rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  z-index: 1001;
  position: relative;
}

.logo img {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}

.brand-name {
  white-space: nowrap;
}

.nav-links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
  align-items: center;
  white-space: nowrap;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-dark);
  font-weight: 500;
  transition: color 0.3s ease;
  font-size: 0.95rem;
}

.nav-links a:hover {
  color: var(--accent);
}

.cta-btn {
  background: var(--accent);
  color: var(--white);
  padding: 0.7rem 1.8rem;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  display: inline-block;
  white-space: nowrap;
}

.cta-btn:hover {
  background: #ea580c;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  z-index: 1001;
  position: relative;
}

.menu-toggle span {
  width: 25px;
  height: 3px;
  background: var(--primary);
  transition: all 0.3s ease;
}

/* Hero Section */
.projects-hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: var(--white);
  padding: 8rem 2rem 3rem;
  text-align: center;
  margin-top: 80px;
}

.projects-hero h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
  font-weight: 800;
  line-height: 1.2;
}

.projects-hero p {
  font-size: 1.3rem;
  opacity: 0.9;
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Filter Section */
.projects-filter {
  background: var(--white);
  padding: 2rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.filter-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.filter-btn {
  background: transparent;
  border: 2px solid var(--border);
  color: var(--text-dark);
  padding: 0.7rem 1.5rem;
  border-radius: 25px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
  font-size: 0.95rem;
}

.filter-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.filter-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--white);
}

/* Projects Container */
.projects-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 4rem 2rem;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 2.5rem;
}

/* Project Card */
.project-card {
  background: var(--white);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  cursor: pointer;
}

.project-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.project-image {
  width: 100%;
  height: 280px;
  overflow: hidden;
  position: relative;
  background: linear-gradient(135deg, var(--secondary), var(--primary));
}

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

.project-card:hover .project-image img {
  transform: scale(1.15);
}

.project-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(26, 43, 74, 0.92);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.project-card:hover .project-overlay {
  opacity: 1;
}

.project-overlay-icon {
  font-size: 3.5rem;
  color: var(--accent);
  margin-bottom: 1rem;
}

.project-overlay-text {
  color: var(--white);
  font-size: 1.2rem;
  font-weight: 600;
}

.project-content {
  padding: 2rem;
}

.project-title {
  font-size: 1.5rem;
  color: var(--primary);
  margin-bottom: 0.8rem;
  font-weight: 700;
}

.project-description {
  color: var(--text-dark);
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

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

.tech-badge {
  background: rgba(249, 115, 22, 0.1);
  color: var(--accent);
  padding: 0.4rem 0.9rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
}

.project-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.project-category {
  color: var(--text-light);
  font-size: 0.9rem;
  font-weight: 600;
}

.project-link-btn {
  background: var(--accent);
  color: var(--white);
  padding: 0.6rem 1.2rem;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
  font-size: 0.9rem;
}

.project-link-btn:hover {
  background: #ea580c;
  transform: translateX(5px);
}

/* Loading State */
.loading-container {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem;
  color: var(--text-light);
}

.spinner {
  border: 4px solid var(--border);
  border-top: 4px solid var(--accent);
  border-radius: 50%;
  width: 60px;
  height: 60px;
  animation: spin 1s linear infinite;
  margin: 0 auto 1.5rem;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Empty State */
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 5rem 2rem;
  max-width: 500px;
  margin: 0 auto;
}

.empty-state i {
  font-size: 5rem;
  color: var(--border);
  margin-bottom: 1.5rem;
}

.empty-state h3 {
  color: var(--primary);
  font-size: 1.8rem;
  margin-bottom: 0.8rem;
}

.empty-state p {
  color: var(--text-light);
  font-size: 1.1rem;
}

/* Footer */
footer {
  background: #0f1419;
  color: rgba(255, 255, 255, 0.8);
  padding: 3rem 2rem 1.5rem;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 2rem;
}

.footer-about h3 {
  color: var(--white);
  margin-bottom: 1rem;
  font-size: 1.3rem;
}

.footer-about p {
  line-height: 1.7;
  margin-bottom: 1rem;
}

.footer-section h4 {
  color: var(--white);
  margin-bottom: 1rem;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.7rem;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: var(--accent);
}

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  color: rgba(255, 255, 255, 0.6);
}

/* Responsive Design */

/* Tablets (1024px) */
@media (max-width: 1024px) {
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .projects-hero h1 {
    font-size: 2.5rem;
  }

  .projects-hero p {
    font-size: 1.2rem;
  }
}

/* Medium devices (968px) - Mobile menu activates */
@media (max-width: 978px) {
  .nav-container {
    padding: 1rem 1.5rem;
  }

  .nav-links {
    position: fixed;
    left: -100%;
    top: 0;
    height: 100vh;
    flex-direction: column;
    background: var(--white);
    width: 280px;
    text-align: left;
    transition: left 0.3s ease;
    box-shadow: 2px 0 20px rgba(0, 0, 0, 0.1);
    padding: 100px 2rem 2rem;
    gap: 1.5rem;
    align-items: flex-start;
    overflow-y: auto;
  }

  .nav-links.active {
    left: 0;
  }

  .nav-links li {
    width: 100%;
  }

  .nav-links a {
    display: block;
    padding: 0.5rem 1rem;
  }

  .menu-toggle {
    display: flex;
  }

  .projects-hero {
    padding: 6rem 1.5rem 2.5rem;
  }

  .projects-hero h1 {
    font-size: 2.2rem;
  }

  .projects-hero p {
    font-size: 1.1rem;
  }

  .projects-container {
    padding: 3rem 1.5rem;
  }

  .projects-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .footer-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

/* Tablets (768px) */
@media (max-width: 768px) {
  .projects-hero h1 {
    font-size: 2rem;
  }

  .projects-hero p {
    font-size: 1rem;
  }

  .project-image {
    height: 240px;
  }

  .filter-btn {
    font-size: 0.9rem;
    padding: 0.6rem 1.2rem;
  }

  .project-content {
    padding: 1.5rem;
  }

  .project-title {
    font-size: 1.3rem;
  }

  .project-description {
    font-size: 0.95rem;
  }
}

/* Mobile (640px) */
@media (max-width: 640px) {
  .nav-container {
    padding: 1rem;
  }

  .logo {
    font-size: 1.2rem;
  }

  .logo img {
    width: 35px;
    height: 35px;
  }

  .brand-name {
    font-size: 1.1rem;
  }

  .projects-hero {
    margin-top: 70px;
    padding: 4rem 1rem 2rem;
  }

  .projects-hero h1 {
    font-size: 1.8rem;
  }

  .projects-hero p {
    font-size: 0.95rem;
  }

  .projects-filter {
    padding: 1.5rem 1rem;
  }

  .filter-btn {
    font-size: 0.85rem;
    padding: 0.5rem 1rem;
  }

  .projects-container {
    padding: 2.5rem 1rem;
  }

  .projects-grid {
    gap: 1.5rem;
  }

  .project-image {
    height: 220px;
  }

  .project-overlay-icon {
    font-size: 2.5rem;
  }

  .project-overlay-text {
    font-size: 1rem;
  }

  .empty-state {
    padding: 3rem 1rem;
  }

  .empty-state i {
    font-size: 3.5rem;
  }

  .empty-state h3 {
    font-size: 1.5rem;
  }

  .empty-state p {
    font-size: 1rem;
  }
}

/* Extra small (480px) */
@media (max-width: 480px) {
  .projects-hero h1 {
    font-size: 1.6rem;
  }

  .project-image {
    height: 200px;
  }

  .project-footer {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }

  .project-link-btn {
    width: 100%;
    justify-content: center;
  }
}

/* Very small (360px) */
@media (max-width: 360px) {
  .brand-name {
    font-size: 0.95rem;
  }

  .logo img {
    width: 30px;
    height: 30px;
  }

  .projects-hero h1 {
    font-size: 1.4rem;
  }

  .filter-container {
    gap: 0.5rem;
  }
}
