@import url('https://fonts.googleapis.com/css2?family=VT323&family=Space+Grotesk:wght@400;700&display=swap');

body {
  font-family: 'Space Grotesk', sans-serif;
  background-color: #0f0f0f;
  color: #00ffcc;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  line-height: 1.6;
  font-size: clamp(0.95rem, 2.5vw, 1.1rem); /* dynamic scaling font size */
}

/* Header */
header {
  text-align: center;
  padding: 2rem 1rem;
  border-bottom: 2px dashed #00ffcc;
}

header h1 {
  font-family: 'VT323', monospace;
  font-size: 3rem;
  color: #00ffff;
  text-shadow: 0 0 10px #00ffff;
  margin: 0;
}

.tagline {
  font-size: 1.2rem;
  color: #ff66cc;
  margin-top: 0.5rem;
}

/* Shared containers for main sections & posts */
.intro, .post-list, article, nav, .post-container {
  width: 90%;
  max-width: 800px;
  margin: 2rem auto;
  padding: 1rem 1.5rem;
  background-color: #1a1a1a;
  border-radius: 12px;
  box-sizing: border-box;
  box-shadow: 0 0 15px rgba(0,255,255,0.2);
}

/* Intro text */
.intro p {
  font-size: 1.1rem;
}

/* Post list styling */
.post-list h2, article h2 {
  font-family: 'VT323', monospace;
  color: #ff66cc;
  text-shadow: 0 0 5px #ff66cc;
  font-size: 2rem;
  margin-bottom: 1rem;
}

.post-list ul {
  list-style: square;
  padding-left: 1.5rem;
  margin: 0;
}

.post-list li {
  margin: 1rem 0;
}

.post-list a {
  color: #00ffcc;
  text-decoration: none;
  font-weight: bold;
  transition: color 0.2s, text-shadow 0.2s;
}

.post-list a:hover {
  color: #ff66cc;
  text-shadow: 0 0 5px #ff66cc;
}

.date {
  color: #999;
  font-size: 0.9rem;
  margin-left: 0.5rem;
}

/* Navigation */
nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2rem;
}

nav a {
  color: #00ffcc;
  text-decoration: none;
  border: 1px dashed #00ffcc;
  padding: 8px 12px;
  border-radius: 4px;
  transition: background 0.3s, color 0.3s, transform 0.2s;
}

nav a:hover {
  background-color: #00ffcc;
  color: #121212;
  transform: scale(1.05);
}

/* Footer */
footer {
  text-align: center;
  padding: 1rem;
  color: #888;
  font-size: 0.9rem;
  border-top: 2px dashed #00ffcc;
  margin-top: auto;
}

/* Images */
img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 1rem 0;
}

/* Code & preformatted blocks */
pre {
  overflow-x: auto;
  white-space: pre-wrap;       /* allow wrapping in narrow viewports */
  word-break: break-all;       /* break long words/lines */
  background-color: #000000cc;
  color: #00ffcc;
  padding: 1rem;
  border-radius: 8px;
  margin: 1rem 0;
  font-family: monospace;
  max-width: 100%;
}

code {
  word-wrap: break-word;
  max-width: 100%;
}

/* Improve article readability on narrow screens */
.post-container article {
  word-break: break-word;
  hyphens: auto;
  line-height: 1.6;
}

/* Responsive typography & layout tweaks */
@media (max-width: 768px) {
  header h1 {
    font-size: 2.2rem;
  }
  .tagline {
    font-size: 1rem;
  }
  nav {
    flex-direction: column;
    gap: 0.75rem;
  }
}

@media (max-width: 480px) {
  header h1 {
    font-size: 1.8rem;
  }
  .tagline {
    font-size: 0.95rem;
  }
  article h2, .post-list h2 {
    font-size: 1.5rem;
  }
}

@media (max-width: 400px) {
  nav a {
    font-size: 0.9rem;
    padding: 6px 8px;
  }
}
