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

:root {
  /* Clean, minimal light theme */
  --primary: #171717;
  --primary-dark: #0a0a0a;
  --secondary: #404040;
  --text: #171717;
  --text-light: #525252;
  --text-muted: #a3a3a3;
  --bg: #ffffff;
  --bg-alt: #fafafa;
  --bg-card: #ffffff;
  --accent: #2563eb;
  --accent-light: #3b82f6;
  --accent-glow: rgba(37, 99, 235, 0.08);
  --border: #e5e5e5;
  --shadow-soft: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-strong: 0 4px 12px rgba(0, 0, 0, 0.1);
  --transition: all 0.2s ease;
  --code-bg: #f5f5f5;
  --code-border: #e5e5e5;
  --tag-bg: #f5f5f5;
  --tag-text: #525252;
}

/* Dark Mode - Clean & Comfortable */
[data-theme="dark"] {
  --primary: #e5e5e5;
  --primary-dark: #f5f5f5;
  --secondary: #a3a3a3;
  --text: #e5e5e5;
  --text-light: #a3a3a3;
  --text-muted: #737373;
  --text-primary: #e5e5e5;
  --text-secondary: #a3a3a3;
  --bg: #18181b;
  --bg-alt: #27272a;
  --bg-card: #27272a;
  --accent: #3b82f6;
  --accent-light: #60a5fa;
  --accent-hover: #2563eb;
  --accent-glow: rgba(59, 130, 246, 0.12);
  --border: #3f3f46;
  --shadow-soft: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-strong: 0 4px 12px rgba(0, 0, 0, 0.4);
  --code-bg: #27272a;
  --code-border: #3f3f46;
  --tag-bg: #3f3f46;
  --tag-text: #a3a3a3;
}

[data-theme="dark"] body {
  background: #18181b;
}

[data-theme="dark"] nav {
  background-color: rgba(39, 39, 42, 0.95);
  border-color: var(--border);
}

[data-theme="dark"] .project,
[data-theme="dark"] .blog-card,
[data-theme="dark"] .blog-list-item,
[data-theme="dark"] .contact-form,
[data-theme="dark"] .contact-info {
  background: var(--bg-card);
  border-color: var(--border);
}

[data-theme="dark"] .project-link {
  background: var(--accent);
}

[data-theme="dark"] .btn-primary {
  background: var(--accent);
}

[data-theme="dark"] .btn-secondary {
  background: var(--bg-alt);
  border-color: var(--border);
}

[data-theme="dark"] .tech-tag,
[data-theme="dark"] .blog-tag,
[data-theme="dark"] .project-badge {
  background: var(--tag-bg);
  color: var(--tag-text);
}

[data-theme="dark"] header h1,
[data-theme="dark"] .hero-title .name {
  background: var(--primary);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: var(--primary);
}

[data-theme="dark"] h2::after {
  background: var(--border);
}

[data-theme="dark"] .filter-btn {
  background: var(--bg-alt);
  border-color: var(--border);
  color: var(--text-light);
}

[data-theme="dark"] .filter-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

[data-theme="dark"] .filter-btn.active {
  background: var(--accent);
  color: white;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Poppins', 'Segoe UI', Roboto, sans-serif;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
}

/* Content container */
header, main, footer {
  width: 100%;
  max-width: 1000px;
  padding: 0 25px;
  text-align: center;
}

/* Header styles */
header {
  margin: 3rem 0 2rem;
  position: relative;
}

header h1 {
  font-weight: 700;
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  color: var(--primary);
  display: inline-block;
}

header p {
  color: var(--text-light);
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

nav {
  margin-top: 2rem;
  padding: 0.6rem 1rem;
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  display: inline-block;
}

nav a {
  margin: 0 15px;
  text-decoration: none;
  color: var(--primary);
  font-weight: 600;
  font-size: 1.05rem;
  position: relative;
  transition: color 0.3s;
  cursor: pointer;
}

nav a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -5px;
  left: 0;
  background: var(--accent);
  transition: width 0.2s ease;
}

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

nav a:hover::after {
  width: 100%;
}

/* Main content styles */
main {
  flex: 1;
  padding-top: 1rem;
}

section {
  margin-bottom: 4rem;
  position: relative;
  padding: 2rem 0;
}

h2 {
  margin-bottom: 2rem;
  font-size: 2rem;
  position: relative;
  display: inline-block;
  padding-bottom: 10px;
}

h2::after {
  content: '';
  position: absolute;
  left: 25%;
  right: 25%;
  bottom: 0;
  height: 2px;
  background: var(--border);
}

/* Project cards */
.project {
  background: var(--bg-card);
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  text-align: left;
  transition: var(--transition);
  border: 1px solid var(--border);
}

.project:hover {
  border-color: var(--text-muted);
}

.project h3 {
  margin-bottom: 12px;
  color: var(--primary-dark);
  font-size: 1.3rem;
}

.project-meta {
  color: var(--text-light);
  font-size: 0.9rem;
  margin-bottom: 1rem;
  font-style: italic;
}

.project-description {
  margin-bottom: 1rem;
  line-height: 1.6;
}

.project-highlights {
  margin: 1rem 0;
  padding-left: 1.5rem;
}

.project-highlights li {
  margin-bottom: 0.5rem;
}

.project-links {
  margin-top: 1.5rem;
}

.project-link {
  display: inline-block;
  padding: 8px 16px;
  background: var(--accent);
  color: white;
  text-decoration: none;
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: var(--transition);
}

.project-link:hover {
  background: var(--accent-hover);
}

/* Button styles */
.cta-buttons {
  margin-top: 2rem;
}

.btn {
  display: inline-block;
  padding: 12px 25px;
  background: var(--accent);
  color: white;
  text-decoration: none;
  border-radius: 6px;
  margin: 10px;
  font-weight: 600;
  letter-spacing: 0.5px;
  transition: var(--transition);
  border: none;
}

.btn:hover {
  background: var(--accent-hover);
}

.btn:active {
  opacity: 0.9;
}

/* Footer styles */
footer {
  margin-top: auto;
  padding: 25px 0;
  color: var(--text-light);
  font-size: 0.95rem;
}

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

.social-links a {
  color: var(--accent);
  text-decoration: none;
  margin: 0 0.5rem;
  transition: color 0.3s;
}

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

/* About page styling */
.about-container {
  display: flex;
  gap: 40px;
  align-items: flex-start;
  margin-bottom: 2rem;
  text-align: left;
}

.profile-image {
  flex-shrink: 0;
}

.profile-image img {
  width: 200px;
  height: 200px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.about-content {
  flex: 1;
}

.about-content h2 {
  text-align: left;
}

.about-content h3 {
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  font-size: 1.25rem;
  color: var(--primary);
}

.about-content p {
  margin-bottom: 1rem;
  line-height: 1.6;
}

.about-content ul {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}

.about-content li {
  margin-bottom: 0.5rem;
}

.certificates-list li {
  margin-bottom: 0.75rem;
}

.experience-list li {
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.experience-list li:last-child {
  border-bottom: none;
}

.award-list li {
  margin-bottom: 0.75rem;
}

/* Contact section styling */
#contact p {
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

#contact a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s;
}

#contact a:hover {
  color: var(--accent);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  header h1 {
    font-size: 2rem;
  }
  
  nav a {
    margin: 0 8px;
    font-size: 0.95rem;
  }
  
  .about-container {
    flex-direction: column;
    align-items: center;
  }
  
  .profile-image {
    margin-bottom: 1.5rem;
  }
  
  .about-content h2 {
    text-align: center;
  }
}

/* Skills Section Styles */
.skills-container {
  max-width: 1000px;
  margin: 0 auto;
}

.skills-category {
  margin-bottom: 3rem;
  text-align: left;
}

.skills-category h3 {
  font-size: 1.5rem;
  color: var(--primary);
  margin-bottom: 1.5rem;
  text-align: center;
  position: relative;
}

.skills-category h3::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 3px;
  background: var(--primary);
  border-radius: 2px;
}

.skill-bars {
  margin-bottom: 2rem;
}

.skill-bar {
  margin-bottom: 1.5rem;
}

.skill-info {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.skill-percentage {
  color: var(--primary);
}

.skill-progress {
  height: 8px;
  background: rgba(0, 0, 0, 0.1);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.skill-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 4px;
  width: 0;
  transition: width 1.5s ease;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1.5rem;
  margin-top: 1rem;
}

.skill-item {
  background: var(--bg-card);
  padding: 1.5rem;
  border-radius: 6px;
  text-align: center;
  transition: var(--transition);
  border: 1px solid var(--border);
}

.skill-item:hover {
  border-color: var(--text-muted);
}

.skill-icon {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  display: block;
}

.skill-name {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.9rem;
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

/* Enhanced Project Styles */
.section-subtitle {
  text-align: center;
  color: var(--text-light);
  font-size: 1.1rem;
  margin-bottom: 3rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.projects-grid {
  display: grid;
  gap: 2rem;
  max-width: 1000px;
  margin: 0 auto;
}

.project {
  background: var(--bg-card);
  border-radius: 8px;
  padding: 2rem;
  transition: var(--transition);
  border: 1px solid var(--border);
  position: relative;
}

.project:hover {
  border-color: var(--text-muted);
}

.project-header {
  margin-bottom: 1.5rem;
}

.project-badge {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  background: var(--accent);
  color: white;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.project-featured .project-badge {
  background: var(--primary);
}

.project-research .project-badge {
  background: var(--secondary);
}

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

.tech-tag {
  background: var(--tag-bg);
  color: var(--tag-text);
  padding: 0.4rem 0.8rem;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 500;
}

.project-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.project-link.secondary {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.project-link.secondary:hover {
  background: var(--primary);
  color: white;
}

/* Contact Section Styles */
.contact-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  max-width: 1000px;
  margin: 0 auto;
}

.contact-info h3,
.contact-form h3 {
  color: var(--primary-dark);
  margin-bottom: 1rem;
  font-size: 1.3rem;
}

.contact-info p {
  color: var(--text);
  margin-bottom: 2rem;
  line-height: 1.6;
}

.contact-methods {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-method {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: var(--bg-card);
  border-radius: 6px;
  border: 1px solid var(--border);
  transition: var(--transition);
}

.contact-method:hover {
  border-color: var(--text-muted);
}

.contact-icon {
  font-size: 1.25rem;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  border-radius: 6px;
  color: white;
}

.contact-details h4 {
  color: var(--text-primary);
  margin-bottom: 0.3rem;
  font-size: 1rem;
}

.contact-details a {
  color: var(--accent);
  text-decoration: none;
  transition: var(--transition);
}

.contact-details a:hover {
  color: var(--accent-light);
}

.contact-form {
  background: var(--bg-card);
  padding: 2rem;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-family: inherit;
  font-size: 1rem;
  transition: var(--transition);
  background: var(--bg);
  color: var(--text);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-muted);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

/* Responsive Design */
@media (max-width: 768px) {
  .hero-content {
    flex-direction: column;
    text-align: center;
    gap: 2rem;
  }

  .hero-text {
    text-align: center;
  }

  .name {
    font-size: 2.5rem;
  }

  .hero-buttons {
    justify-content: center;
    flex-wrap: wrap;
  }

  .hero-stats {
    justify-content: center;
  }

  .main-nav {
    position: relative;
    top: auto;
    right: auto;
    margin-top: 2rem;
  }

  .contact-container {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .skills-grid {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  }

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

/* Floating animation for skill items */
.float-animation {
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

/* Loading animation for skill bars */
.skill-fill {
  position: relative;
}

/* Enhanced project hover effects */
.project:hover .project-badge {
  transition: transform 0.3s ease;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--border);
}

::-webkit-scrollbar-thumb {
  background: var(--text-muted);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-secondary);
}

/* Smooth scrolling for anchor links */
.section-anchor {
  scroll-margin-top: 100px;
}

/* Hero Section Styles */
.hero-section {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  background: var(--bg);
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="%23ffffff" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
  opacity: 0.3;
  z-index: -1;
}

.hero-content {
  display: flex;
  align-items: center;
  gap: 4rem;
  max-width: 1200px;
  width: 100%;
  padding: 0 2rem;
  margin-bottom: 3rem;
}

.hero-text {
  flex: 1;
  text-align: left;
}

.hero-title {
  display: flex;
  flex-direction: column;
  margin-bottom: 1.5rem;
}

.greeting {
  font-size: 1.2rem;
  color: var(--text-light);
  margin-bottom: 0.5rem;
  opacity: 0;
  animation: fadeInUp 0.8s ease forwards 0.2s;
}

.name {
  font-size: 3.5rem;
  font-weight: 700;
  background: var(--primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
  opacity: 0;
  animation: fadeInUp 0.8s ease forwards 0.4s;
}

.title-typing {
  font-size: 1.8rem;
  color: var(--primary);
  font-weight: 600;
  opacity: 0;
  animation: fadeInUp 0.8s ease forwards 0.6s;
}

.hero-description {
  font-size: 1.2rem;
  color: var(--text-light);
  margin-bottom: 2rem;
  line-height: 1.6;
  opacity: 0;
  animation: fadeInUp 0.8s ease forwards 0.8s;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  margin-bottom: 3rem;
  opacity: 0;
  animation: fadeInUp 0.8s ease forwards 1s;
}

.btn-primary {
  background: var(--primary);
  color: white;
  padding: 0.875rem 1.75rem;
  border-radius: 6px;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
}

.btn-primary:hover {
  opacity: 0.9;
}

.btn-secondary {
  background: transparent;
  color: var(--primary);
  padding: 0.875rem 1.75rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
}

.btn-secondary:hover {
  border-color: var(--primary);
}

.hero-stats {
  display: flex;
  gap: 2rem;
  opacity: 0;
  animation: fadeInUp 0.8s ease forwards 1.2s;
}

.stat {
  text-align: center;
}

.stat-number {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
  background: var(--accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label {
  font-size: 0.9rem;
  color: var(--text-light);
  font-weight: 500;
}

.hero-image {
  flex-shrink: 0;
  opacity: 0;
  animation: fadeInRight 1s ease forwards 1.4s;
}

.profile-container {
  position: relative;
}

.profile-photo {
  width: 300px;
  height: 300px;
  object-fit: cover;
  border-radius: 20px;
  box-shadow: var(--shadow-strong);
  border: 4px solid white;
}

.profile-badge {
  position: absolute;
  bottom: -10px;
  right: -10px;
  background: var(--accent);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  font-size: 0.9rem;
  font-weight: 600;
}

.main-nav {
  position: absolute;
  top: 2rem;
  right: 2rem;
  background: var(--bg-card);
  padding: 1rem 2rem;
  border-radius: 6px;
  border: 1px solid var(--border);
}

.main-nav a {
  margin: 0 1rem;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 600;
  transition: var(--transition);
  position: relative;
}

.main-nav a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -5px;
  left: 50%;
  background: var(--accent);
  transition: var(--transition);
  transform: translateX(-50%);
}

.main-nav a:hover::after {
  width: 100%;
}

.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
  animation: fadeIn 1s ease forwards 2s;
}

.scroll-arrow {
  width: 2px;
  height: 30px;
  background: var(--primary);
  position: relative;
  animation: bounce 2s infinite;
}

.scroll-arrow::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: -3px;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--primary);
  border-bottom: 2px solid var(--primary);
  transform: rotate(45deg);
}

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

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  60% {
    transform: translateY(-5px);
  }
}
/* ===== BLOG STYLES ===== */

/* Blog Preview Grid (Homepage) */
.blog-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  margin: 2.5rem 0;
}

.blog-card {
  background: var(--bg-card);
  border-radius: 8px;
  padding: 1.5rem;
  text-align: left;
  transition: var(--transition);
  border: 1px solid var(--border);
  cursor: pointer;
  text-decoration: none;
  display: block;
}

.blog-card:hover {
  border-color: var(--text-muted);
}

.blog-card-date {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.blog-card-title {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 0.75rem;
  line-height: 1.4;
  transition: var(--transition);
}

.blog-card:hover .blog-card-title {
  color: var(--accent);
}

.blog-card-summary {
  color: var(--text-light);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 1rem;
}

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

.blog-tag {
  background: var(--tag-bg);
  color: var(--tag-text);
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 500;
}

.blog-cta {
  margin-top: 2rem;
}

/* Blog List Page */
.blog-posts-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 2rem 0;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.blog-list-item {
  background: var(--bg-card);
  border-radius: 8px;
  padding: 1.5rem;
  text-align: left;
  transition: var(--transition);
  border: 1px solid var(--border);
  cursor: pointer;
}

.blog-list-item:hover {
  border-color: var(--text-muted);
}

.blog-list-item:hover .blog-card-title {
  color: var(--accent);
}

.blog-filters {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.filter-btn {
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 0.5rem 1rem;
  border-radius: 4px;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-light);
  transition: var(--transition);
}

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

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

/* Single Blog Post View - Reading Optimized */
#blog-post-view {
  text-align: left;
  max-width: 750px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

#blog-post-view.hidden {
  display: none;
}

#blog-list.hidden {
  display: none;
}

.back-to-blog {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 2.5rem;
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  transition: var(--transition);
  background: var(--accent-glow);
}

.back-to-blog:hover {
  background: var(--accent);
  color: white;
}

.blog-post-header {
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.blog-post-title {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--primary-dark);
  margin-bottom: 1rem;
  line-height: 1.25;
  letter-spacing: -0.5px;
}

.blog-post-meta {
  color: var(--text-muted);
  font-size: 1rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.blog-post-meta::before {
  content: '📅';
}

/* Blog Post Body - Enhanced Reading Experience */
.blog-post-body {
  line-height: 1.9;
  font-size: 1.125rem;
  color: var(--text);
  letter-spacing: 0.01em;
}

.blog-post-body h2 {
  font-size: 1.75rem;
  font-weight: 700;
  margin: 3rem 0 1.25rem;
  color: var(--primary-dark);
  letter-spacing: -0.3px;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--accent-glow);
}

.blog-post-body h2::after {
  display: none;
}

.blog-post-body h3 {
  font-size: 1.35rem;
  font-weight: 600;
  margin: 2.5rem 0 1rem;
  color: var(--primary-dark);
}

.blog-post-body p {
  margin-bottom: 1.75rem;
}

.blog-post-body a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  transition: var(--transition);
}

.blog-post-body a:hover {
  color: var(--accent-light);
  text-decoration-color: var(--accent-light);
}

.blog-post-body ul,
.blog-post-body ol {
  margin: 1.5rem 0 2rem 1.5rem;
}

.blog-post-body li {
  margin-bottom: 0.75rem;
  padding-left: 0.5rem;
}

.blog-post-body li::marker {
  color: var(--accent);
}

/* Inline Code */
.blog-post-body code {
  background: var(--code-bg);
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
  font-size: 0.875em;
  border: 1px solid var(--code-border);
  color: var(--accent);
}

/* Code Blocks */
.blog-post-body pre {
  background: #0d1117;
  color: #e6edf3;
  padding: 1.75rem;
  border-radius: 12px;
  overflow-x: auto;
  margin: 2rem 0;
  border: 1px solid #30363d;
  position: relative;
}

.blog-post-body pre code {
  background: none;
  padding: 0;
  color: inherit;
  font-size: 0.9rem;
  line-height: 1.7;
  border: none;
}

/* Blog images */
.blog-image {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  margin: 2rem 0;
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--border);
}

/* Blockquotes */
.blog-post-body blockquote {
  border-left: 3px solid var(--accent);
  padding: 1rem 1.5rem;
  margin: 2rem 0;
  background: var(--bg-alt);
  border-radius: 0 4px 4px 0;
  font-style: italic;
  color: var(--text-light);
}

/* Math blocks */
.math-block {
  background: var(--bg-alt);
  padding: 1.5rem 2rem;
  border-radius: 6px;
  margin: 2rem 0;
  overflow-x: auto;
  font-family: 'Times New Roman', serif;
  font-style: italic;
  text-align: center;
  font-size: 1.1rem;
  border: 1px solid var(--border);
}

.math-inline {
  font-family: 'Times New Roman', serif;
  font-style: italic;
}

.blog-post-tags {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.blog-post-tags::before {
  content: 'Tags:';
  font-weight: 600;
  color: var(--text-muted);
  margin-right: 0.5rem;
}

.loading {
  text-align: center;
  padding: 3rem;
  color: var(--text-muted);
  font-size: 1rem;
}

.read-more-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.25rem;
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: var(--transition);
}

.read-more-link:hover {
  color: var(--accent-light);
  gap: 0.75rem;
}

/* Dark Mode Toggle */
.theme-toggle {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  z-index: 1000;
  transition: var(--transition);
}

.theme-toggle:hover {
  border-color: var(--text-muted);
}

.theme-toggle .icon-sun,
.theme-toggle .icon-moon {
  position: absolute;
  transition: var(--transition);
}

.theme-toggle .icon-sun {
  opacity: 1;
}

.theme-toggle .icon-moon {
  opacity: 0;
}

[data-theme="dark"] .theme-toggle .icon-sun {
  opacity: 0;
}

[data-theme="dark"] .theme-toggle .icon-moon {
  opacity: 1;
}

/* Reading Progress Bar */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 2px;
  background: var(--accent);
  z-index: 1001;
}

/* Responsive Blog Styles */
@media (max-width: 768px) {
  .blog-preview-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .blog-post-title {
    font-size: 1.75rem;
  }
  
  .blog-list-item {
    padding: 1.5rem;
  }
  
  .blog-post-body {
    font-size: 1.05rem;
  }
  
  .blog-post-body h2 {
    font-size: 1.5rem;
  }
  
  #blog-post-view {
    padding: 0 1rem;
  }
  
  .theme-toggle {
    bottom: 1.5rem;
    right: 1.5rem;
    width: 45px;
    height: 45px;
  }
}