/* styles.css */
:root {
  /* Light Theme Variables */
  --bg-primary: #f8f9fa;
  --bg-secondary: #ffffff;
  --text-primary: #212529;
  --text-secondary: #495057;
  --accent-primary: #0d6efd; /* A bright blue */
  --accent-secondary: #6f42c1; /* A purple for highlights */
  --code-bg: #f1f3f5;
  --nav-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --card-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] {
  /* Dark Theme Variables */
  --bg-primary: #121212;
  --bg-secondary: #1e1e1e;
  --text-primary: #e6e6e6;
  --text-secondary: #b3b3b3;
  --accent-primary: #4dabf7; /* A softer blue for dark mode */
  --accent-secondary: #9775fa;
  --code-bg: #2d2d2d;
  --nav-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.7);
  --card-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.4);
}

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

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  transition: background-color 0.3s ease, color 0.3s ease;
}

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

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

h1 {
  font-size: 3.5rem;
}

h2 {
  font-size: 2.5rem;
  margin-bottom: 2rem;
  position: relative;
}

h2::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -10px;
  height: 3px;
  width: 50px;
  background: var(--accent-primary);
}

p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.highlight {
  color: var(--accent-primary);
}

/* Navigation */
.navbar {
  background-color: var(--bg-secondary);
  box-shadow: var(--nav-shadow);
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 1rem 0;
}

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

.nav-logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-primary);
  text-decoration: none;
}

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

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

.nav-link:hover {
  color: var(--accent-primary);
}

.theme-btn {
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.theme-btn:hover {
  transform: rotate(30deg);
}

/* Hero Section */
.hero {
  min-height: 80vh;
  display: flex;
  align-items: center;
  text-align: center;
}

.hero-container {
  width: 100%;
}

.hero h1 {
  margin-bottom: 1rem;
}

#typing-text {
  color: var(--accent-primary);
  font-weight: 600;
}

/* Buttons */
.btn {
  display: inline-block;
  margin-top: 2rem;
  padding: 0.8rem 2rem;
  background-color: var(--accent-primary);
  color: white;
  text-decoration: none;
  border-radius: 5px;
  font-weight: 500;
  transition: transform 0.3s ease, background-color 0.3s ease;
}

.btn:hover {
  transform: translateY(-3px);
  background-color: var(--accent-secondary);
}

/* Sections General */
section {
  padding: 5rem 0;
}

/* Projects Section */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.project-card {
  background-color: var(--bg-secondary);
  padding: 1.5rem;
  border-radius: 10px;
  box-shadow: var(--card-shadow);
  transition: transform 0.3s ease;
}

.project-card:hover {
  transform: translateY(-5px);
}

.project-tech {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  color: var(--accent-primary);
  margin: 1rem 0;
}

.project-link {
  color: var(--accent-primary);
  text-decoration: none;
  font-weight: 500;
}

.project-link::after {
  content: ' →';
  transition: transform 0.3s ease;
}

.project-link:hover::after {
  transform: translateX(5px);
}

/* Blog Styles */
.blog-container {
  width: 90%;
  max-width: 800px;
  margin: 3rem auto;
  padding: 0 1rem;
}

.blog-post {
  background-color: var(--bg-secondary);
  padding: 3rem;
  border-radius: 15px;
  box-shadow: var(--card-shadow);
}

.blog-meta {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  font-style: italic;
}

.blog-post h2 {
  margin-top: 2.5rem;
}

.blog-post ul {
  margin-left: 2rem;
  margin-bottom: 1.5rem;
}

.blog-post li {
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
}

/* Code Snippets */
pre {
  background-color: var(--code-bg);
  padding: 1rem;
  border-radius: 5px;
  overflow-x: auto;
  margin: 1.5rem 0;
}

code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9rem;
}

/* Footer (Optional, can add later) */

/* Responsive Design */
@media (max-width: 768px) {
  h1 {
    font-size: 2.5rem;
  }

  h2 {
    font-size: 2rem;
  }

  .nav-menu {
    gap: 1.2rem;
  }

  .blog-post {
    padding: 2rem;
  }

  .project-grid {
    grid-template-columns: 1fr;
  }
}
/* Blog Hub Styles */
.blog-hub-container {
    width: 90%;
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.blog-header {
    text-align: center;
    margin-bottom: 3rem;
}

.blog-header h1 {
    font-size: 2.8rem;
    margin-bottom: 1rem;
}

.blog-header h1::after {
    display: none; /* Remove the underline from the main title */
}

.blog-header p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto;
}

/* Blog Filter Styles */
.blog-filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2.5rem;
}

.filter-btn {
    padding: 0.6rem 1.2rem;
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--text-secondary);
    border-radius: 25px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

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

/* Blog Grid & Card Styles */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 2rem;
}

.blog-preview-card {
    background-color: var(--bg-secondary);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: fit-content;
}

.blog-preview-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 25px -3px rgba(0, 0, 0, 0.2);
}

.card-content {
    padding: 1.8rem;
}

.blog-preview-card h2 {
    font-size: 1.5rem;
    margin-bottom: 0.8rem;
}

.blog-preview-card h2 a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.blog-preview-card h2 a:hover {
    color: var(--accent-primary);
}

.preview-meta {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.read-time {
    font-style: italic;
}

.preview-excerpt {
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.preview-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    background-color: var(--code-bg);
    color: var(--accent-primary);
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-family: 'JetBrains Mono', monospace;
}

/* Responsive Design for Blog Hub */
@media (max-width: 768px) {
    .blog-grid {
        grid-template-columns: 1fr;
    }

    .blog-header h1 {
        font-size: 2.2rem;
    }

    .blog-header p {
        font-size: 1rem;
    }

    .card-content {
        padding: 1.5rem;
    }
}

/* Footer Styles */
.site-footer {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
    border-top: 1px solid var(--code-bg);
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

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

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

.footer-section h3 {
    color: var(--accent-primary);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.footer-section h4 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 1.1rem;
    position: relative;
}

.footer-section h4::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -5px;
    width: 30px;
    height: 2px;
    background: var(--accent-primary);
}

.footer-section p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1rem;
}

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

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease, transform 0.2s ease;
    display: inline-block;
}

.footer-section ul li a:hover {
    color: var(--accent-primary);
    transform: translateX(5px);
}

.social-links {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.social-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s ease;
    padding: 0.5rem 0;
}

.social-link:hover {
    color: var(--accent-primary);
    transform: translateX(5px);
}

.social-link svg {
    transition: transform 0.3s ease;
}

.social-link:hover svg {
    transform: scale(1.1);
}

.footer-bottom {
    border-top: 1px solid var(--code-bg);
    padding-top: 1.5rem;
    text-align: center;
}

.footer-bottom p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2.5rem;
    }
    
    .footer-section h4::after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .social-links {
        align-items: center;
    }
}

/* Ensure footer stays at bottom */
html, body {
    height: 100%;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1 0 auto;
}
/* ==================== */
/* MOBILE RESPONSIVENESS */
/* ==================== */

@media (max-width: 768px) {
  /* General fixes for mobile viewport */
  html, body {
    width: 100%;
    overflow-x: hidden; /* Prevents horizontal scrolling */
  }
  
  .container, .nav-container, .blog-container {
    width: 95%;
    padding: 0 0.5rem;
  }

  /* Navigation fixes */
  .nav-menu {
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
  }

  .nav-logo {
    font-size: 1.3rem;
  }

  /* Hero section fixes */
  .hero h1 {
    font-size: 2.2rem;
    line-height: 1.2;
  }

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

  /* Project grid fixes */
  .project-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .project-card {
    padding: 1.2rem;
  }

  /* Section padding adjustments */
  section {
    padding: 3rem 0;
  }

  /* Heading fixes for mobile */
  h1 {
    font-size: 2.5rem;
  }

  h2 {
    font-size: 2rem;
  }

  h2::after {
    left: 50%;
    transform: translateX(-50%);
  }

  /* Button sizing */
  .btn {
    padding: 0.7rem 1.5rem;
    font-size: 0.9rem;
  }

  /* Blog hub specific fixes */
  .blog-grid {
    grid-template-columns: 1fr;
  }

  .blog-filters {
    flex-direction: column;
    align-items: center;
  }

  .filter-btn {
    width: 80%;
    margin: 0.3rem 0;
  }

  /* Blog post specific fixes */
  .blog-post {
    padding: 1.5rem;
    margin: 1rem 0;
  }

  .blog-post pre {
    overflow-x: auto;
    font-size: 0.8rem;
    padding: 0.8rem;
  }

  /* Code blocks */
  pre {
    white-space: pre-wrap;
    word-wrap: break-word;
  }

  /* Typing animation adjustment */
  #typing-text {
    font-size: 1.2rem;
  }
}

@media (max-width: 480px) {
  /* Extra small devices */
  .hero h1 {
    font-size: 1.8rem;
  }
  
  .hero p {
    font-size: 1rem;
  }
  
  h1 {
    font-size: 2rem;
  }
  
  h2 {
    font-size: 1.7rem;
  }
  
  .nav-menu {
    gap: 0.7rem;
  }
  
  .nav-link {
    font-size: 0.9rem;
  }
  
  /* Ensure images don't overflow */
  img {
    max-width: 100%;
    height: auto;
  }
}
