/* Font and Theme Variables */
:root {
  --primary: #0072ff;
  --accent: #00c6ff;
  --bg: transparent;
  --text: white;
  --card: rgba(0, 0, 0, 0.6);
}

/* Reset and layout */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  font-family: 'Playfair Display', serif;
  background-color: var(--bg);
  color: var(--text);
  scroll-behavior: smooth;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Neural network canvas background */
#network {
  position: fixed;
  top: 0;
  left: 0;
  z-index: -1;
  width: 100vw;
  height: 100vh;
  background: #0d0d0d;
}

/* Content wrapper */
.content {
  position: relative;
  z-index: 1;
}

/* Container */
.container {
  width: min(1100px, 90%);
  margin: auto;
}

/* Navbar */
.navbar {
  background-color: transparent;
  position: absolute;
  top: 0;
  width: 100%;
  z-index: 1000;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
}

.logo {
  color: white;
  font-weight: 600;
  text-decoration: none;
  font-size: 1.2rem;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 1rem;
}

.nav-links a {
  color: white;
  text-decoration: none;
  padding: 0.5rem;
  font-weight: 500;
  text-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
}

.nav-links a:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 5px;
}

/* Hero Section */
.hero {
  text-align: center;
  padding: 6rem 2rem;
  color: white;
}

.hero h1 {
  font-size: 3rem;
  font-weight: 700;
  text-shadow: 0 0 5px rgba(0,0,0,0.6);
}

.tagline {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  font-weight: 400;
  text-shadow: 0 0 5px rgba(0,0,0,0.6);
}

.btn {
  display: inline-block;
  background-color: white;
  color: var(--primary);
  padding: 0.7rem 1.2rem;
  border-radius: 5px;
  text-decoration: none;
  font-weight: 500;
  transition: transform 0.3s ease;
}

.btn:hover {
  transform: scale(1.05);
}

/* Sections */
.section {
  padding: 4rem 2rem;
  background: transparent;
  color: white;
}

.section h2 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1rem;
  text-shadow: 0 0 5px rgba(0,0,0,0.6);
}

/* Lists */
ul {
  list-style: none;
  padding-left: 0;
}

/* Project & Blog Cards */
.project-grid,
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.project-card,
.blog-card {
  background-color: var(--card);
  padding: 1rem;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  color: white;
}

.project-card:hover,
.blog-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.4);
}

.project-img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.blog-card h3 {
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.blog-card a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

/* FAQ */
.faq-grid {
  display: grid;
  gap: 1rem;
}

.faq-item h3 {
  font-weight: 500;
  margin-bottom: 0.3rem;
}

/* Footer */
footer {
  background-color: transparent;
  color: white;
  text-align: center;
  padding: 2rem;
}

.social-links {
  margin-top: 1rem;
  font-size: 0.9rem;
}

.social-links a {
  color: white;
  text-decoration: none;
  margin: 0 0.5rem;
}

.social-links a:hover {
  text-decoration: underline;
}

/* Dark Mode */
body.dark-mode {
  --bg: transparent;
  --text: #e0e0e0;
  --card: rgba(255, 255, 255, 0.1);
}

body.dark-mode .btn {
  background-color: var(--accent);
  color: white;
}

/* Theme Toggle */
.theme-toggle {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.5);
  padding: 0.5rem 0.8rem;
  border-radius: 8px;
  backdrop-filter: blur(4px);
  box-shadow: 0 0 10px rgba(0,0,0,0.3);
}

/* Responsive */
@media (max-width: 768px) {
  .nav-links {
    flex-direction: column;
    align-items: center;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .tagline {
    font-size: 1rem;
  }

  .project-grid,
  .blog-grid {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 2rem 1rem;
  }

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

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

  .tagline {
    font-size: 0.9rem;
  }

  .nav-container {
    flex-direction: column;
    gap: 0.5rem;
  }

  .logo {
    font-size: 1rem;
  }

  .theme-toggle {
    bottom: 1rem;
    right: 1rem;
    padding: 0.4rem 0.6rem;
  }
}

/* Responsive Images */
img {
  max-width: 100%;
  height: auto;
}

/* Hamburger Icon */
.menu-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 5px;
}

.menu-toggle span {
  width: 25px;
  height: 3px;
  background-color: white;
  border-radius: 2px;
}

/* Mobile Menu */
@media (max-width: 768px) {
  .menu-toggle {
    display: flex;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    background-color: rgba(0, 0, 0, 0.8);
    position: absolute;
    top: 60px;
    right: 10px;
    padding: 1rem;
    border-radius: 8px;
    z-index: 999;
  }

  .nav-links.show {
    display: flex;
  }
}
