/* Global Variables */
:root {
  --bg-primary: #0a0e17;
  --bg-secondary: #131a2b;
  --accent-primary: #00ff9d;
  --accent-secondary: #7b68ee;
  --text-primary: #e0e0e0;
  --text-secondary: #a0a0a0;
  --danger: #ff3860;
  --grid-width: min(90ch, 95%);
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  --font-sans: 'Inter', 'Roboto', sans-serif;
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-size: 1rem;
  line-height: 1.6;
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(circle at 20% 30%, rgba(123, 104, 238, 0.05), transparent 30%),
    radial-gradient(circle at 80% 70%, rgba(0, 255, 157, 0.07), transparent 40%);
  z-index: -1;
}

.wrapper {
  display: grid;
  grid-template-columns:
    1fr
    var(--grid-width)
    1fr;
  min-height: 100vh;
}

.wrapper > * {
  grid-column: 2;
}

.full-bleed {
  width: 100%;
  grid-column: 1 / 4;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-mono);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.2;
  margin-bottom: 1rem;
  position: relative;
  overflow: hidden;
}

h1 {
  font-size: 2.5rem;
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 10px rgba(0, 255, 157, 0.3);
  margin-top: 2rem;
  margin-bottom: 1.5rem;
  position: relative;
}

h1::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -5px;
  height: 3px;
  width: 60px;
  background: linear-gradient(90deg, var(--accent-primary), transparent);
}

h2 {
  font-size: 1.75rem;
  color: var(--accent-secondary);
  margin-top: 2rem;
}

h3 {
  font-size: 1.25rem;
  color: var(--accent-primary);
}

p {
  margin-bottom: 1.5rem;
}

/* Links */
a {
  color: var(--accent-primary);
  text-decoration: none;
  position: relative;
  transition: all 0.2s ease;
  border-bottom: 1px solid transparent;
}

a:hover {
  color: var(--accent-secondary);
  border-bottom: 1px solid var(--accent-secondary);
}

/* Code blocks */
pre, code {
  font-family: var(--font-mono);
  background-color: rgba(0, 0, 0, 0.3);
  border-radius: 4px;
  padding: 0.2em 0.4em;
}

pre {
  padding: 1rem;
  overflow-x: auto;
  border-left: 3px solid var(--accent-primary);
  margin: 1.5rem 0;
}

pre code {
  padding: 0;
  background-color: transparent;
}

/* Header & Navigation */
header {
  margin-top: 2rem;
  margin-bottom: 3rem;
  position: relative;
}

header::before {
  content: ">";
  color: var(--accent-primary);
  position: absolute;
  left: -1.5rem;
  top: 1.2rem;
  font-family: var(--font-mono);
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

nav {
  margin-top: 1.5rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 1rem;
}

nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
}

nav ul li a {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-secondary);
  border: none;
  position: relative;
}

nav ul li a::before {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
  transition: width 0.3s ease;
}

nav ul li a:hover {
  color: var(--accent-primary);
  border: none;
}

nav ul li a:hover::before {
  width: 100%;
}

/* Main Content */
main {
  background-color: var(--bg-secondary);
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 0 20px rgba(0, 255, 157, 0.05), 
              0 0 40px rgba(123, 104, 238, 0.05);
  margin-bottom: 3rem;
  position: relative;
  overflow: hidden;
}

main::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary), transparent);
}

/* Posts */
.post-date {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-secondary);
  display: block;
  margin-bottom: 1.5rem;
  border-left: 2px solid var(--accent-secondary);
  padding-left: 0.5rem;
}

.post-summary {
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.1);
}

.post-summary:last-child {
  border-bottom: none;
}

/* Tags */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
  margin-bottom: 1.5rem;
}

.tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  background-color: rgba(0, 255, 157, 0.1);
  color: var(--accent-primary);
  padding: 0.25rem 0.5rem;
  border-radius: 3px;
  transition: all 0.2s ease;
}

.tag:hover {
  background-color: rgba(0, 255, 157, 0.2);
}

/* Responsive */
@media (max-width: 768px) {
  :root {
    --grid-width: 95%;
  }
  
  h1 {
    font-size: 2rem;
  }
  
  h2 {
    font-size: 1.5rem;
  }
  
  nav ul {
    gap: 1rem;
  }
  
  main {
    padding: 1.5rem;
  }
}

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

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

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

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-primary);
}
