/* Global Styles */
:root {
  --primary-color: #3498db;
  --secondary-color: #2c3e50;
  --light-color: #ecf0f1;
  --dark-color: #2c3e50;
  --code-bg: #f8f9fa;
  --code-color: #e74c3c;
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s ease;
}

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

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: var(--dark-color);
  background-color: #fff;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  margin-bottom: 1rem;
  color: var(--secondary-color);
  font-weight: 600;
}

h1 {
  font-size: 2.5rem;
  margin-top: 2rem;
}

h2 {
  font-size: 2rem;
  margin-top: 1.5rem;
}

h3 {
  font-size: 1.5rem;
  margin-top: 1.2rem;
}

p {
  margin-bottom: 1.5rem;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: #2980b9;
  text-decoration: underline;
}

/* Header */
header {
  background-color: var(--primary-color);
  color: white;
  padding: 1rem 0;
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo {
  font-size: 1.8rem;
  font-weight: bold;
  display: flex;
  align-items: center;
}

.logo span {
  color: var(--light-color);
}

/* Navigation */
nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
}

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

.nav-links li {
  margin-left: 1.5rem;
}

.nav-links a {
  color: white;
  text-decoration: none;
  font-weight: 500;
  padding: 0.5rem;
  border-radius: 4px;
  transition: var(--transition);
}

.nav-links a:hover, .nav-links a.active {
  background-color: rgba(255, 255, 255, 0.2);
}

.hamburger {
  display: none;
  cursor: pointer;
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, var(--primary-color) 0%, #2980b9 100%);
  color: white;
  padding: 4rem 0;
  text-align: center;
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
  color: white;
}

.hero p {
  font-size: 1.2rem;
  max-width: 800px;
  margin: 0 auto 2rem;
}

.btn {
  display: inline-block;
  background-color: var(--secondary-color);
  color: white;
  padding: 0.8rem 1.5rem;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
  border: none;
  cursor: pointer;
}

.btn:hover {
  background-color: #1a252f;
  transform: translateY(-2px);
  text-decoration: none;
  color: white;
}

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

.btn-primary:hover {
  background-color: #2980b9;
}

.btn-outline {
  background-color: transparent;
  border: 2px solid white;
}

.btn-outline:hover {
  background-color: white;
  color: var(--primary-color);
}

/* Main Content */
main {
  padding: 3rem 0;
}

.section {
  margin-bottom: 3rem;
}

.card {
  background-color: white;
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 2rem;
  margin-bottom: 2rem;
  transition: var(--transition);
}

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

.card h3 {
  color: var(--primary-color);
  margin-top: 0;
}

/* Features Grid */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin: 3rem 0;
}

.feature {
  text-align: center;
  padding: 1.5rem;
}

.feature-icon {
  font-size: 3rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

/* Code Blocks */
.code-block {
  background-color: var(--code-bg);
  border-left: 4px solid var(--primary-color);
  padding: 1rem;
  margin-bottom: 1.5rem;
  border-radius: 0 4px 4px 0;
  overflow-x: auto;
}

code {
  font-family: 'Courier New', Courier, monospace;
  color: var(--code-color);
  background-color: var(--code-bg);
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
}

pre {
  font-family: 'Courier New', Courier, monospace;
  white-space: pre-wrap;
  word-wrap: break-word;
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
}

th, td {
  padding: 0.75rem;
  text-align: left;
  border-bottom: 1px solid #ddd;
}

th {
  background-color: var(--light-color);
  font-weight: 600;
}

tr:hover {
  background-color: rgba(236, 240, 241, 0.5);
}

/* Footer */
footer {
  background-color: var(--secondary-color);
  color: white;
  padding: 2rem 0;
  text-align: center;
}

.footer-links {
  display: flex;
  justify-content: center;
  list-style: none;
  margin-bottom: 1rem;
}

.footer-links li {
  margin: 0 1rem;
}

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

.footer-links a:hover {
  color: white;
}

.copyright {
  font-size: 0.9rem;
  color: #bdc3c7;
}

/* Responsive Design */
@media (max-width: 768px) {
  .hamburger {
    display: block;
  }

  .nav-links {
    position: fixed;
    top: 70px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 70px);
    background-color: var(--primary-color);
    flex-direction: column;
    align-items: center;
    padding-top: 2rem;
    transition: var(--transition);
  }

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

  .nav-links li {
    margin: 1rem 0;
  }

  .features {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 2rem;
  }

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

/* Dark Mode Toggle */
.theme-toggle {
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  font-size: 1.2rem;
  margin-left: 1rem;
}

/* Dark Mode Styles */
body.dark-mode {
  background-color: #1a1a1a;
  color: #f0f0f0;
}

body.dark-mode .card,
body.dark-mode .code-block {
  background-color: #2d2d2d;
  color: #f0f0f0;
}

body.dark-mode h1,
body.dark-mode h2,
body.dark-mode h3,
body.dark-mode h4,
body.dark-mode h5,
body.dark-mode h6 {
  color: #f0f0f0;
}

body.dark-mode code {
  background-color: #3d3d3d;
  color: #ff6b6b;
}

body.dark-mode th {
  background-color: #3d3d3d;
}

body.dark-mode tr:hover {
  background-color: #3d3d3d;
}

/* Projects Page */
.project-card {
  border: 1px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 2rem;
}

.project-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.project-content {
  padding: 1.5rem;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.tag {
  background-color: var(--light-color);
  color: var(--dark-color);
  padding: 0.3rem 0.6rem;
  border-radius: 20px;
  font-size: 0.8rem;
  margin-right: 0.5rem;
  margin-bottom: 0.5rem;
}

/* Resources Page */
.resource-list {
  list-style: none;
}

.resource-item {
  padding: 1rem;
  border-bottom: 1px solid #ddd;
}

.resource-item:last-child {
  border-bottom: none;
}

.resource-title {
  font-weight: 600;
  color: var(--primary-color);
}

.resource-description {
  margin-top: 0.5rem;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.5s ease-out forwards;
}

/* Collapsible Sections */
.collapsible {
  background-color: var(--light-color);
  color: var(--dark-color);
  cursor: pointer;
  padding: 1rem;
  width: 100%;
  border: none;
  text-align: left;
  outline: none;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 4px;
  margin-bottom: 0.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.collapsible:after {
  content: '\002B';
  font-weight: bold;
  float: right;
  margin-left: 5px;
}

.active:after {
  content: "\2212";
}

.collapsible-content {
  padding: 0 1rem;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.2s ease-out;
  background-color: white;
  border-radius: 0 0 4px 4px;
}

body.dark-mode .collapsible {
  background-color: #3d3d3d;
  color: #f0f0f0;
}

body.dark-mode .collapsible-content {
  background-color: #2d2d2d;
}
