/* =========================
   Root Variables & Reset
   ========================= */
:root {
  --primary-color: #3b82f6;
  --primary-hover: #2563eb;
  --secondary-color: #1e293b;
  --background: #0f172a;
  --surface: #1e293b;
  --surface-light: #334155;
  --text-primary: #f1f5f9;
  --text-secondary: #cbd5e1;
  --accent: #0ea5e9;
  --accent-2: #8b5cf6;
  --border-color: #334155;
  --shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background-color: var(--background);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

/* =========================
   Navbar
   ========================= */
.navbar {
  background-color: var(--surface);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

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

.nav-brand a {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
  text-decoration: none;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

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

.nav-brand .logo {
  height: 40px;
  width: 40px;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.nav-brand a:hover .logo {
  transform: scale(1.05);
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav-menu a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.nav-menu a:hover {
  color: var(--primary-color);
}

/* =========================
   Hero Section
   ========================= */
.hero {
  background: linear-gradient(135deg, var(--surface) 0%, var(--secondary-color) 100%);
  padding: 6rem 2rem;
  text-align: center;
  border-bottom: 1px solid var(--border-color);
}

.hero-content h1 {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--primary-color), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-content p {
  font-size: 1.25rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

/* =========================
   Main Content
   ========================= */
main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* =========================
   Projects Grid
   ========================= */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
  padding: 4rem 0;
}

.project-card {
  background-color: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.project-card:hover {
  border-color: var(--primary-color);
  box-shadow: 0 0 30px rgba(59, 130, 246, 0.2);
  transform: translateY(-4px);
}

.project-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.project-header h2 {
  font-size: 1.5rem;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.project-type {
  background-color: rgba(59, 130, 246, 0.15);
  color: var(--primary-color);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 600;
  white-space: nowrap;
}

.project-images {
  display: flex;
  gap: 1rem;
  padding: 1.5rem;
  background-color: rgba(0, 0, 0, 0.2);
  border-bottom: 1px solid var(--border-color);
}

.project-images img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  object-fit: cover;
  flex: 1;
  max-height: 300px;
}

.project-description {
  padding: 1.5rem;
  flex-grow: 1;
}

.project-description h3 {
  font-size: 1rem;
  color: var(--primary-color);
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.project-description h3:first-child {
  margin-top: 0;
}

.project-description p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
  line-height: 1.8;
}

.project-description ul {
  list-style: none;
  margin-bottom: 1rem;
}

.project-description ul li {
  color: var(--text-secondary);
  padding-left: 1.5rem;
  margin-bottom: 0.5rem;
  position: relative;
}

.project-description ul li:before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--primary-color);
  font-weight: bold;
}

.tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

.tech-badge {
  background-color: rgba(59, 130, 246, 0.1);
  color: var(--accent);
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-size: 0.875rem;
  border: 1px solid rgba(59, 130, 246, 0.3);
  transition: all 0.2s ease;
}

.tech-badge:hover {
  background-color: rgba(59, 130, 246, 0.2);
  border-color: var(--primary-color);
}

.project-footer {
  padding: 1.5rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  gap: 1rem;
}

/* =========================
   Buttons
   ========================= */
.btn {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: all 0.3s ease;
  text-align: center;
}

.btn-primary {
  background-color: var(--primary-color);
  color: white;
  flex: 1;
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  box-shadow: 0 10px 20px rgba(59, 130, 246, 0.3);
}

/* =========================
   Footer
   ========================= */
.footer {
  background-color: var(--surface);
  border-top: 1px solid var(--border-color);
  margin-top: 4rem;
  padding: 3rem 2rem;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto 2rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.footer-section h3,
.footer-section h4 {
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.footer-section ul {
  list-style: none;
}

.footer-section a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.3s ease;
  display: block;
  margin-bottom: 0.5rem;
}

.footer-section a:hover {
  color: var(--primary-color);
}

.footer-section p {
  color: var(--text-secondary);
  line-height: 1.8;
}

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.875rem;
}

/* =========================
   Responsive Design
   ========================= */
@media (max-width: 768px) {
  .nav-container {
    padding: 1rem 1.5rem;
  }

  .nav-menu {
    gap: 1rem;
  }

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

  .hero {
    padding: 4rem 1.5rem;
  }

  .projects-grid {
    grid-template-columns: 1fr;
    padding: 2rem 0;
  }

  .project-images {
    flex-direction: column;
  }

  .project-footer {
    flex-direction: column;
  }

  .btn {
    padding: 0.75rem 1rem;
  }
}

@media (max-width: 480px) {
  .hero-content h1 {
    font-size: 2rem;
  }

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

  .project-header {
    flex-direction: column;
    gap: 1rem;
  }

  main {
    padding: 0 1rem;
  }

  .nav-menu {
    gap: 0.5rem;
    font-size: 0.875rem;
  }
}
