/* Base Styles */
:root {
  --primary-cyan: #00ffff;
  --primary-magenta: #ff00ff;
  --dark-bg: #0a0a1a;
  --card-bg: rgba(0, 0, 0, 0.5);
  --text-primary: #ffffff;
  --text-secondary: #b3b3b3;
  --font-heading: 'Montserrat', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-code: 'JetBrains Mono', monospace;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  background-color: var(--dark-bg);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

/* Enhanced Background Effects */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    linear-gradient(to bottom, rgba(10, 10, 26, 0.95) 0%, rgba(10, 10, 26, 0.7) 100%),
    repeating-linear-gradient(45deg, 
      rgba(0, 255, 255, 0.03) 0px,
      rgba(0, 255, 255, 0.03) 2px,
      transparent 2px,
      transparent 20px
    ),
    repeating-linear-gradient(-45deg,
      rgba(255, 0, 255, 0.03) 0px,
      rgba(255, 0, 255, 0.03) 2px,
      transparent 2px,
      transparent 20px
    );
  z-index: -1;
}

body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    linear-gradient(90deg, rgba(0, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255, 0, 255, 0.02) 1px, transparent 1px);
  background-size: 20px 20px;
  z-index: -1;
  pointer-events: none;
  animation: gridMove 20s linear infinite;
  opacity: 0.5;
}

@keyframes gridMove {
  0% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(-50px);
  }
}

/* Header Styles */
header {
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
  border-bottom: 1px solid rgba(0, 255, 255, 0.2);
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
}

.logo a {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 2rem;
  color: var(--primary-cyan);
  text-decoration: none;
  letter-spacing: 2px;
  text-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
  transition: all 0.3s ease;
}

.logo a:hover {
  color: var(--primary-magenta);
  text-shadow: 0 0 15px rgba(255, 0, 255, 0.7);
}

nav ul {
  display: flex;
  list-style: none;
  gap: 2rem;
}

nav a {
  color: var(--text-primary);
  text-decoration: none;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  transition: all 0.3s ease;
  padding: 0.5rem 0;
  position: relative;
}

nav a:after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary-cyan), var(--primary-magenta));
  transition: width 0.3s ease;
}

nav a:hover:after, 
nav a.active:after {
  width: 100%;
}

nav a:hover, 
nav a.active {
  color: var(--primary-cyan);
}

/* Blog Hero Section */
.blog-hero {
  height: 30vh;
  min-height: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)),
              url('data:image/svg+xml,%3Csvg width="100" height="100" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"%3E%3Cpath d="M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z" fill="%2300ffff" fill-opacity="0.05" fill-rule="evenodd"/%3E%3C/svg%3E'),
              linear-gradient(135deg, #1a1a3d 0%, #3d1a3d 100%);
  background-size: cover, 100px 100px, 100% 100%;
  position: relative;
  overflow: hidden;
}

.blog-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(45deg, rgba(0, 255, 255, 0.1), rgba(255, 0, 255, 0.1));
  animation: heroGlow 8s ease-in-out infinite alternate;
}

@keyframes heroGlow {
  0% {
    opacity: 0.2;
    background-position: 0% 50%;
  }
  100% {
    opacity: 0.5;
    background-position: 100% 50%;
  }
}

.blog-hero-content {
  z-index: 1;
  padding: 2rem;
  max-width: 800px;
}

.blog-hero h1 {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 3.5rem;
  letter-spacing: 2px;
  margin-bottom: 1rem;
  background: linear-gradient(90deg, var(--primary-cyan), var(--primary-magenta));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 20px rgba(0, 255, 255, 0.5);
  animation: textGlow 3s ease-in-out infinite alternate;
}

@keyframes textGlow {
  0% { text-shadow: 0 0 20px rgba(0, 255, 255, 0.5); }
  100% { text-shadow: 0 0 30px rgba(255, 0, 255, 0.7); }
}

.blog-hero p {
  font-size: 1.2rem;
  max-width: 600px;
  margin: 0 auto;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-weight: 300;
  letter-spacing: 0.5px;
}

/* Blog Container */
.blog-container {
  max-width: 1000px;
  margin: 4rem auto;
  padding: 0 2rem;
}

.blog-post {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 2rem;
  margin-bottom: 5rem;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 15px;
  padding: 2rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(0, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  opacity: 0;
  transform: translateY(20px);
}

.blog-post::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: linear-gradient(90deg, var(--primary-cyan), var(--primary-magenta));
}

.blog-post.visible {
  opacity: 1;
  transform: translateY(0);
}

.blog-post:hover {
  transform: translateY(-5px);
  box-shadow: 
    0 15px 40px rgba(0, 0, 0, 0.4),
    0 0 20px rgba(0, 255, 255, 0.2);
  border-color: rgba(0, 255, 255, 0.2);
}

.post-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 10px;
  border: 1px solid rgba(0, 255, 255, 0.2);
}

.post-date .day {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--primary-cyan);
  line-height: 1;
  font-family: var(--font-heading);
}

.post-date .month {
  font-size: 1rem;
  font-weight: 600;
  margin: 0.2rem 0;
  color: var(--text-primary);
  font-family: var(--font-heading);
}

.post-date .year {
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-family: var(--font-body);
}

.post-content {
  position: relative;
}

.post-tag {
  display: inline-block;
  background: linear-gradient(45deg, rgba(0, 255, 255, 0.2), rgba(255, 0, 255, 0.2));
  padding: 0.3rem 1rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text-primary);
  font-family: var(--font-heading);
  letter-spacing: 1px;
}

.post-content h2 {
  font-size: 1.8rem;
  margin-bottom: 1rem;
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--primary-cyan);
  line-height: 1.3;
}

.post-meta {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.post-meta span {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.post-text {
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 1.1rem;
  line-height: 1.8;
}

.post-text p {
  margin-bottom: 1.5rem;
}

.post-text h3 {
  font-size: 1.4rem;
  margin: 2rem 0 1rem;
  color: var(--primary-magenta);
  font-family: var(--font-heading);
  font-weight: 600;
}

.source-link {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.source-link p {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.source-link a {
  color: var(--primary-cyan);
  text-decoration: none;
  transition: color 0.3s ease;
}

.source-link a:hover {
  color: var(--primary-magenta);
  text-decoration: underline;
}

/* Newsletter Section */
.newsletter {
  background: rgba(0, 0, 0, 0.5);
  padding: 4rem 2rem;
  margin: 4rem 0;
}

.newsletter-container {
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
}

.newsletter h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: var(--primary-cyan);
  font-family: var(--font-heading);
  font-weight: 700;
}

.newsletter p {
  font-size: 1.1rem;
  margin-bottom: 2rem;
  color: var(--text-primary);
  font-family: var(--font-body);
}

.newsletter-form {
  display: flex;
  gap: 1rem;
  max-width: 500px;
  margin: 0 auto;
}

.newsletter-form input {
  flex: 1;
  padding: 1rem;
  border: 2px solid rgba(0, 255, 255, 0.3);
  background: rgba(0, 0, 0, 0.5);
  color: var(--text-primary);
  font-family: var(--font-body);
  border-radius: 5px;
  transition: all 0.3s ease;
}

.newsletter-form input:focus {
  outline: none;
  border-color: var(--primary-cyan);
  box-shadow: 0 0 15px rgba(0, 255, 255, 0.3);
}

.newsletter-form button {
  padding: 0 2rem;
  background: linear-gradient(45deg, var(--primary-cyan), var(--primary-magenta));
  color: var(--text-primary);
  font-family: var(--font-heading);
  font-weight: 600;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.3s ease;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-size: 0.9rem;
}

.newsletter-form button:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* Footer */
footer {
  background-color: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(0, 255, 255, 0.1);
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 3rem 2rem;
  gap: 2rem;
}

.footer-left h3 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-cyan);
  margin-bottom: 0.5rem;
}

.footer-left p {
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 1rem;
}

.footer-right {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.social-links {
  display: flex;
  gap: 1.5rem;
}

.social-links a {
  color: var(--text-primary);
  font-size: 1.5rem;
  transition: all 0.3s ease;
}

.social-links a:hover {
  color: var(--primary-cyan);
  transform: translateY(-3px);
}

.footer-bottom {
  text-align: center;
  padding: 1.5rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  .header-container {
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
  }
  
  nav ul {
    gap: 1rem;
  }
  
  .blog-hero h1 {
    font-size: 2.5rem;
  }
  
  .blog-post {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .post-date {
    display: flex;
    flex-direction: row;
    padding: 0.5rem 1rem;
    gap: 0.5rem;
    margin-bottom: 1rem;
  }
  
  .post-date .day, .post-date .month, .post-date .year {
    font-size: 1rem;
  }
  
  .post-content h2 {
    font-size: 1.5rem;
  }
  
  .newsletter-form {
    flex-direction: column;
  }
  
  .footer-container {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 1rem;
  }
  
  .footer-right {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .blog-hero {
    min-height: 200px;
  }
  
  .blog-hero h1 {
    font-size: 2rem;
  }
  
  nav ul {
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .post-meta {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .post-text {
    font-size: 1rem;
  }
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.blog-post:nth-child(1) { animation: fadeIn 0.6s ease forwards 0.1s; }
.blog-post:nth-child(2) { animation: fadeIn 0.6s ease forwards 0.2s; }
.blog-post:nth-child(3) { animation: fadeIn 0.6s ease forwards 0.3s; }
.blog-post:nth-child(4) { animation: fadeIn 0.6s ease forwards 0.4s; }

/* Code blocks styling */
.post-text pre {
  background: rgba(0, 0, 0, 0.7);
  padding: 1.5rem;
  border-radius: 8px;
  overflow-x: auto;
  border: 1px solid rgba(0, 255, 255, 0.2);
  margin: 1.5rem 0;
  font-family: var(--font-code);
  font-size: 0.9rem;
  line-height: 1.5;
}

.post-text code {
  font-family: var(--font-code);
  font-size: 0.9em;
  background: rgba(0, 0, 0, 0.3);
  padding: 0.2em 0.4em;
  border-radius: 3px;
  color: var(--primary-cyan);
}

.post-text blockquote {
  border-left: 4px solid var(--primary-cyan);
  padding-left: 1.5rem;
  margin-left: 0;
  margin-right: 0;
  font-style: italic;
  color: var(--text-secondary);
}

.post-text a {
  color: var(--primary-cyan);
  text-decoration: none;
  border-bottom: 1px dashed var(--primary-cyan);
  transition: all 0.3s ease;
}

.post-text a:hover {
  color: var(--primary-magenta);
  border-bottom-color: var(--primary-magenta);
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.3);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(var(--primary-cyan), var(--primary-magenta));
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(var(--primary-magenta), var(--primary-cyan));
}