/*
Theme Name: Gamma Zone
Theme URI: https://example.com/gamma-zone
Author: Custom for Stalker GAMMA
Author URI: https://example.com
Description: A dark, grim, purple-accented modern blog theme inspired by the Zone and coder aesthetics. Built for Stalker GAMMA content – high contrast, monospace touches, terminal-like details.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: gamma-zone
Tags: dark, blog, purple, custom-menu, featured-images, threaded-comments, translation-ready, block-styles
*/

/* ==========================================================================
   CSS Variables – Dark Grim Purple Palette
   ========================================================================== */
:root {
  --bg-deep: #07060b;
  --bg-primary: #0c0b12;
  --bg-secondary: #13121c;
  --bg-card: #18171f;
  --bg-elevated: #1e1d28;
  --border: #2a2836;
  --border-subtle: #1f1e2a;

  --accent: #8b5cf6;          /* violet-500 */
  --accent-dim: #6d28d9;      /* violet-700 */
  --accent-bright: #a78bfa;   /* violet-400 */
  --accent-glow: rgba(139, 92, 246, 0.25);
  --accent-soft: rgba(139, 92, 246, 0.12);

  --text: #e2e0eb;
  --text-muted: #9b97ab;
  --text-dim: #6b6780;
  --text-inverse: #0c0b12;

  --success: #34d399;
  --warning: #fbbf24;
  --danger: #f87171;

  --font-sans: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", "Fira Code", "SF Mono", Consolas, "Liberation Mono", Menlo, monospace;

  --radius: 6px;
  --radius-lg: 10px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.45);
  --shadow-glow: 0 0 20px var(--accent-glow);

  --content-width: 720px;
  --wide-width: 1100px;
  --header-height: 64px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background-color: var(--bg-deep);
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(109, 40, 217, 0.15), transparent),
    radial-gradient(ellipse 60% 40% at 100% 0%, rgba(139, 92, 246, 0.08), transparent);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

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

a:hover {
  color: #c4b5fd;
  text-shadow: 0 0 12px var(--accent-glow);
}

/* ==========================================================================
   Typography
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-sans);
  font-weight: 650;
  line-height: 1.25;
  color: var(--text);
  margin: 0 0 0.75em;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(1.85rem, 4vw, 2.4rem); }
h2 { font-size: clamp(1.5rem, 3vw, 1.85rem); }
h3 { font-size: 1.35rem; }
h4 { font-size: 1.15rem; }

p {
  margin: 0 0 1.25em;
}

.entry-content > *:first-child {
  margin-top: 0;
}

code, kbd, samp, pre {
  font-family: var(--font-mono);
  font-size: 0.9em;
}

code {
  background: var(--bg-elevated);
  color: var(--accent-bright);
  padding: 0.15em 0.4em;
  border-radius: 4px;
  border: 1px solid var(--border);
}

pre {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  overflow-x: auto;
  margin: 1.5em 0;
  line-height: 1.55;
  box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.3);
}

pre code {
  background: none;
  border: none;
  padding: 0;
  color: var(--text);
  font-size: 0.875rem;
}

/* ==========================================================================
   Layout
   ========================================================================== */
.site {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.site-content {
  flex: 1;
  width: 100%;
  max-width: var(--wide-width);
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
}

.content-area {
  max-width: var(--content-width);
  margin: 0 auto;
}

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(12, 11, 18, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  height: var(--header-height);
}

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

.site-branding {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.site-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.site-title a {
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.site-title a:hover {
  color: var(--accent-bright);
  text-shadow: none;
}

.site-title .logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, var(--accent-dim), var(--accent));
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: white;
  box-shadow: 0 0 12px var(--accent-glow);
}

.site-description {
  display: none;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0;
  font-family: var(--font-mono);
}

@media (min-width: 768px) {
  .site-description {
    display: block;
  }
}

/* Navigation */
.main-navigation {
  display: flex;
  align-items: center;
}

.main-navigation ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 0.25rem;
}

.main-navigation a {
  display: block;
  padding: 0.45rem 0.85rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: var(--radius);
  transition: all 0.2s ease;
}

.main-navigation a:hover,
.main-navigation .current-menu-item > a {
  color: var(--text);
  background: var(--accent-soft);
  text-shadow: none;
}

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.4rem 0.7rem;
  border-radius: var(--radius);
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

@media (max-width: 767px) {
  .menu-toggle {
    display: block;
  }
  .main-navigation ul {
    display: none;
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 0.75rem;
    gap: 0.15rem;
  }
  .main-navigation.toggled ul {
    display: flex;
  }
}

/* ==========================================================================
   Posts – Archive / Index
   ========================================================================== */
.posts-header {
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.posts-header h1 {
  margin-bottom: 0.35rem;
}

.posts-header .archive-description {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin: 0;
}

.post-list {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.post-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.post-card:hover {
  border-color: var(--accent-dim);
  box-shadow: var(--shadow), 0 0 0 1px var(--accent-soft);
  transform: translateY(-2px);
}

.post-card .post-thumbnail {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--bg-secondary);
}

.post-card .post-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.post-card:hover .post-thumbnail img {
  transform: scale(1.03);
}

.post-card .post-body {
  padding: 1.35rem 1.5rem 1.5rem;
}

.post-card .entry-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  font-size: 0.8rem;
  font-family: var(--font-mono);
  color: var(--text-dim);
  margin-bottom: 0.65rem;
}

.post-card .entry-meta a {
  color: var(--text-muted);
}

.post-card .entry-meta a:hover {
  color: var(--accent-bright);
}

.post-card .entry-title {
  margin: 0 0 0.6rem;
  font-size: 1.3rem;
}

.post-card .entry-title a {
  color: var(--text);
}

.post-card .entry-title a:hover {
  color: var(--accent-bright);
  text-shadow: none;
}

.post-card .entry-summary {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card .read-more {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: var(--font-mono);
  color: var(--accent);
}

.post-card .read-more:hover {
  color: var(--accent-bright);
}

.post-card .read-more::after {
  content: "→";
  transition: transform 0.2s ease;
}

.post-card .read-more:hover::after {
  transform: translateX(3px);
}

/* ==========================================================================
   Single Post
   ========================================================================== */
.single-post .entry-header {
  margin-bottom: 2rem;
  text-align: center;
  max-width: var(--content-width);
  margin-left: auto;
  margin-right: auto;
}

.single-post .entry-title {
  margin-bottom: 0.85rem;
}

.single-post .entry-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1.25rem;
  font-size: 0.85rem;
  font-family: var(--font-mono);
  color: var(--text-dim);
}

.single-post .entry-meta a {
  color: var(--text-muted);
}

.single-post .post-thumbnail {
  margin: 0 auto 2.5rem;
  max-width: 900px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.single-post .entry-content {
  max-width: var(--content-width);
  margin: 0 auto;
}

.single-post .entry-content h2,
.single-post .entry-content h3 {
  margin-top: 2em;
  padding-bottom: 0.35em;
  border-bottom: 1px solid var(--border-subtle);
}

.single-post .entry-content ul,
.single-post .entry-content ol {
  padding-left: 1.4em;
  margin-bottom: 1.4em;
}

.single-post .entry-content li {
  margin-bottom: 0.4em;
}

.single-post .entry-content blockquote {
  margin: 1.75em 0;
  padding: 1rem 1.25rem;
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--text);
  font-style: italic;
}

.single-post .entry-content blockquote p:last-child {
  margin-bottom: 0;
}

.single-post .entry-footer {
  max-width: var(--content-width);
  margin: 2.5rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.875rem;
  color: var(--text-muted);
}

.single-post .entry-footer a {
  color: var(--accent-bright);
}

/* Tags */
.tags-links a {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  margin: 0.15rem 0.25rem 0.15rem 0;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.8rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  transition: all 0.2s ease;
}

.tags-links a:hover {
  border-color: var(--accent);
  color: var(--accent-bright);
  background: var(--accent-soft);
  text-shadow: none;
}

/* ==========================================================================
   Page
   ========================================================================== */
.page .entry-header {
  margin-bottom: 2rem;
  text-align: center;
}

.page .entry-content {
  max-width: var(--content-width);
  margin: 0 auto;
}

/* ==========================================================================
   Comments
   ========================================================================== */
.comments-area {
  max-width: var(--content-width);
  margin: 3rem auto 0;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.comments-title {
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
}

.comment-list {
  list-style: none;
  padding: 0;
  margin: 0 0 2rem;
}

.comment {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1rem;
}

.comment-author {
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.comment-meta {
  font-size: 0.8rem;
  font-family: var(--font-mono);
  color: var(--text-dim);
  margin-bottom: 0.75rem;
}

.comment-content p:last-child {
  margin-bottom: 0;
}

/* Comment form */
.comment-respond {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}

.comment-reply-title {
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

.comment-form label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 0.35rem;
  color: var(--text-muted);
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%;
  padding: 0.65rem 0.85rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  margin-bottom: 1rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.comment-form input:focus,
.comment-form textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.comment-form .submit {
  background: linear-gradient(135deg, var(--accent-dim), var(--accent));
  color: white;
  border: none;
  padding: 0.7rem 1.4rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: opacity 0.2s ease, box-shadow 0.2s ease;
}

.comment-form .submit:hover {
  opacity: 0.92;
  box-shadow: var(--shadow-glow);
}

/* ==========================================================================
   Pagination
   ========================================================================== */
.navigation.pagination {
  margin-top: 3rem;
  display: flex;
  justify-content: center;
}

.nav-links {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.4rem;
  height: 2.4rem;
  padding: 0 0.6rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.875rem;
  transition: all 0.2s ease;
}

.page-numbers:hover,
.page-numbers.current {
  border-color: var(--accent);
  color: var(--accent-bright);
  background: var(--accent-soft);
  text-shadow: none;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 2rem 1.25rem;
  margin-top: auto;
}

.footer-inner {
  max-width: var(--wide-width);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.site-info {
  font-size: 0.85rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
}

.site-info a {
  color: var(--text-muted);
}

.site-info a:hover {
  color: var(--accent-bright);
}

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

.footer-zone span {
  color: var(--accent);
}

/* ==========================================================================
   Widgets / Sidebar (if used)
   ========================================================================== */
.widget {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

.widget-title {
  font-size: 0.95rem;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent-bright);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

/* ==========================================================================
   Utility & Special
   ========================================================================== */
.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
  word-wrap: normal !important;
}

/* Terminal-style accent line */
.terminal-bar {
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0.6;
}

/* Selection */
::selection {
  background: var(--accent);
  color: white;
}

/* Scrollbar (WebKit) */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: var(--bg-deep);
}
::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-dim);
}

/* Focus visible */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Alignments */
.alignwide {
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.alignfull {
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
}

/* Responsive images in content */
.entry-content img {
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

/* Tables */
.entry-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5em 0;
  font-size: 0.9rem;
}

.entry-content th,
.entry-content td {
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--border);
  text-align: left;
}

.entry-content th {
  background: var(--bg-elevated);
  font-weight: 600;
  color: var(--accent-bright);
}

/* ==========================================================================
   404
   ========================================================================== */
.error-404 {
  text-align: center;
  padding: 4rem 1rem;
}

.error-404 .page-title {
  font-family: var(--font-mono);
  font-size: 4rem;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.error-404 .page-content {
  color: var(--text-muted);
  max-width: 420px;
  margin: 0 auto;
}
