/* ========================================
   VPuNk - Matrix + Editorial Theme
   ======================================== */

/* === CSS Variables === */
:root {
  --bg-primary: #0a0a0a;
  --bg-secondary: #111111;
  --bg-card: #1a1a1a;
  --text-primary: #e0e0e0;
  --text-secondary: #a0a0a0;
  --accent: #00ff41;
  --accent-dim: #00cc33;
  --accent-glow: rgba(0, 255, 65, 0.3);
  --border: #2a2a2a;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --max-width: 1200px;
  --header-height: 60px;
}

/* === Reset & Base === */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
}

/* === Matrix Rain Canvas === */
#matrix-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  opacity: 0.08;
  pointer-events: none;
}

/* === Typography === */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-mono);
  font-weight: 600;
  line-height: 1.3;
  color: var(--accent);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 1.8rem; }
h3 { font-size: 1.4rem; }
h4 { font-size: 1.1rem; }

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

a {
  color: var(--accent);
  text-decoration: none;
  transition: all 0.2s ease;
}

a:hover {
  color: var(--accent-dim);
  text-shadow: 0 0 8px var(--accent-glow);
}

/* === Header === */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: rgba(10, 10, 10, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
}

.header-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-family: var(--font-mono);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 2px;
  text-shadow: 0 0 10px var(--accent-glow);
}

.logo:hover {
  text-shadow: 0 0 20px var(--accent-glow);
}

/* === Navigation === */
.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-transform: lowercase;
  letter-spacing: 1px;
  padding: 0.5rem 0;
  border-bottom: 1px solid transparent;
  transition: all 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  text-shadow: 0 0 8px var(--accent-glow);
}

/* === Hamburger Menu === */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 5px;
}

.hamburger span {
  width: 25px;
  height: 2px;
  background: var(--accent);
  transition: all 0.3s ease;
}

/* === Main Content === */
main {
  margin-top: var(--header-height);
  padding: 4rem 2rem;
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
}

/* === Hero Section === */
.hero {
  text-align: center;
  padding: 4rem 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4rem;
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
  text-shadow: 0 0 30px var(--accent-glow);
}

.hero .tagline {
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--text-secondary);
  font-style: italic;
}

.hero .description {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 1.5rem auto 0;
}

/* === Section Titles === */
.section-title {
  font-family: var(--font-mono);
  font-size: 1.2rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 3px;
  margin-bottom: 2rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

/* === Article Grid === */
.article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 2rem;
  margin-bottom: 4rem;
}

/* === Article Card === */
.article-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 1.5rem;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.article-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: var(--accent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.article-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(0, 255, 65, 0.1);
}

.article-card:hover::before {
  opacity: 1;
}

.article-card .meta {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
  display: flex;
  gap: 1rem;
}

.article-card .meta .date {
  color: var(--accent-dim);
}

.article-card h3 {
  font-size: 1.2rem;
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

.article-card h3 a {
  color: var(--text-primary);
}

.article-card h3 a:hover {
  color: var(--accent);
}

.article-card .excerpt {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1rem;
}

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

.article-card .tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--accent);
  background: rgba(0, 255, 65, 0.1);
  padding: 0.25rem 0.5rem;
  border: 1px solid rgba(0, 255, 65, 0.2);
}

.article-card .read-more {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent);
  display: inline-block;
  margin-top: 1rem;
}

.article-card .read-more:hover {
  text-shadow: 0 0 10px var(--accent-glow);
}

/* === Headlines List (home) === */
.headlines-list {
  list-style: none;
  padding: 0;
}

.headlines-list li {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}

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

.headlines-list .date {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-secondary);
  white-space: nowrap;
}

.headlines-list a {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  color: var(--text-primary);
}

.headlines-list a:hover {
  color: var(--accent);
}

/* === Featured Article === */
.featured-article {
  background: var(--bg-card);
  border: 1px solid var(--accent);
  padding: 2rem;
  margin-bottom: 3rem;
  position: relative;
}

.featured-article::after {
  content: 'FEATURED';
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--bg-primary);
  background: var(--accent);
  padding: 0.25rem 0.5rem;
  letter-spacing: 1px;
}

.featured-article .meta {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.featured-article h2 {
  font-size: 1.8rem;
  margin-bottom: 1rem;
}

.featured-article h2 a {
  color: var(--text-primary);
}

.featured-article h2 a:hover {
  color: var(--accent);
}

.featured-article .excerpt {
  font-size: 1.1rem;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 800px;
}

/* === Blog Post Content === */
.post-content {
  max-width: 700px;
  margin: 0 auto;
  padding: 2rem 0;
}

.post-content h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  text-align: center;
}

.post-content .post-meta {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.post-content h2 {
  font-size: 1.5rem;
  margin: 2.5rem 0 1rem;
  color: var(--accent);
}

.post-content h3 {
  font-size: 1.2rem;
  margin: 2rem 0 0.75rem;
  color: var(--accent-dim);
}

.post-content p {
  font-size: 1.1rem;
  line-height: 1.8;
  margin-bottom: 1.5rem;
}

.post-content blockquote {
  border-left: 3px solid var(--accent);
  padding-left: 1.5rem;
  margin: 2rem 0;
  font-style: italic;
  color: var(--text-secondary);
}

.post-content code {
  font-family: var(--font-mono);
  background: var(--bg-secondary);
  padding: 0.2rem 0.4rem;
  font-size: 0.9em;
  color: var(--accent);
  border: 1px solid var(--border);
}

.post-content pre {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  padding: 1.5rem;
  overflow-x: auto;
  margin: 2rem 0;
}

.post-content pre code {
  background: none;
  border: none;
  padding: 0;
}

.post-content ul, .post-content ol {
  margin: 1.5rem 0;
  padding-left: 2rem;
}

.post-content li {
  margin-bottom: 0.5rem;
  line-height: 1.7;
}

.post-content img {
  max-width: 100%;
  height: auto;
  margin: 2rem 0;
  border: 1px solid var(--border);
}

/* === Summary Box (note page) === */
.post-content .summary-box {
  font-size: 1.15rem;
  line-height: 1.8;
  color: var(--text-secondary);
  border-left: 3px solid var(--accent);
  padding-left: 1.5rem;
  margin-bottom: 2rem;
}

/* === Source Link === */
.post-content .source-link {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  text-align: center;
}

.post-content .source-link a {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: 0.6rem 1.4rem;
}

.post-content .source-link a:hover {
  background: var(--accent);
  color: #000;
  text-shadow: none;
}

.article-card .source-link {
  margin-top: 1rem;
}

.article-card .source-link a {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent);
}

.article-card .source-link a:hover {
  text-shadow: 0 0 10px var(--accent-glow);
}

/* === Footer === */
.footer {
  margin-top: 4rem;
  padding: 2rem;
  border-top: 1px solid var(--border);
  text-align: center;
}

.footer .copyright {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.footer .copyright a {
  color: var(--accent);
}

.footer .socials {
  margin-top: 1rem;
}

.footer .socials a {
  color: var(--text-secondary);
  margin: 0 0.75rem;
}

.footer .socials a:hover {
  color: var(--accent);
}

/* === Responsive Design === */
@media (max-width: 768px) {
  :root {
    --header-height: 50px;
  }

  .hamburger {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: rgba(10, 10, 10, 0.98);
    flex-direction: column;
    padding: 1rem 2rem;
    gap: 0;
    border-bottom: 1px solid var(--border);
    transform: translateY(-100%);
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
  }

  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
  }

  .nav-links li {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
  }

  .nav-links li:last-child {
    border-bottom: none;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .article-grid {
    grid-template-columns: 1fr;
  }

  .featured-article h2 {
    font-size: 1.4rem;
  }

  main {
    padding: 2rem 1rem;
  }
}

/* === Utility Classes === */
.text-accent { color: var(--accent); }
.text-muted { color: var(--text-secondary); }
.font-mono { font-family: var(--font-mono); }
.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

/* === Scroll Sections === */
.scroll-section {
  padding: 4rem 0;
  border-bottom: 1px solid var(--border);
}

.scroll-section:last-child {
  border-bottom: none;
}

/* === About Content === */
.about-content {
  max-width: 700px;
}

.about-content p {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text-secondary);
}

/* === Contact Content === */
.contact-content {
  max-width: 700px;
}

.contact-content p {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text-secondary);
}

.contact-links {
  margin-top: 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.95rem;
}

.contact-links a {
  color: var(--accent);
}

.contact-links .text-muted {
  margin: 0 0.75rem;
}

/* === Empty State === */
.empty-state {
  text-align: center;
  padding: 4rem 0;
}

.empty-state p {
  font-size: 1.1rem;
}

/* === Subscribe Content === */
.subscribe-content {
  max-width: 500px;
}

.subscribe-content p {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.subscribe-form {
  display: flex;
  gap: 0.5rem;
}

.subscribe-form input {
  flex: 1;
  padding: 0.75rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.2s ease;
}

.subscribe-form input:focus {
  border-color: var(--accent);
}

.subscribe-form input::placeholder {
  color: var(--text-secondary);
}

.subscribe-form button {
  padding: 0.75rem 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  background: var(--accent);
  color: var(--bg-primary);
  border: none;
  cursor: pointer;
  text-transform: lowercase;
  transition: all 0.2s ease;
}

.subscribe-form button:hover {
  background: var(--accent-dim);
  text-shadow: none;
}

/* === Social Links === */
.social-links {
  display: flex;
  gap: 1.5rem;
  margin-top: 1rem;
}

.social-links a {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--accent);
  padding: 0.5rem 0;
  border-bottom: 1px solid transparent;
  transition: all 0.2s ease;
}

.social-links a:hover {
  border-bottom-color: var(--accent);
  text-shadow: 0 0 8px var(--accent-glow);
}
