/*
Theme Name: PeteThings
Theme URI: https://example.com/petethings
Author: Pete
Author URI: https://example.com
Description: A retro-futuristic dark WordPress theme for nerd and pop culture blogging.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: petethings
Tags: blog, dark, custom-menu, featured-images, threaded-comments, one-column, two-columns
*/

:root {
  --space-black: #0f0f1a;
  --charcoal: #1a1a2e;
  --green: #4a7c59;
  --red: #c0392b;
  --gold: #d4a843;
  --cyan: #00d4ff;
  --text: #eef4fb;
  --muted: #9da9b8;
  --border: #2f3648;
  --card-bg: linear-gradient(145deg, rgba(44, 49, 67, 0.95), rgba(22, 24, 36, 0.95));
  --container: 1200px;
  --radius: 12px;
  --shadow: 0 18px 38px rgba(0, 0, 0, 0.52), 0 3px 10px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Exo 2", "Segoe UI", sans-serif;
  color: var(--text);
  background: radial-gradient(circle at top, #1f2438 0%, var(--space-black) 45%, #090911 100%);
  line-height: 1.65;
  min-height: 100vh;
  position: relative;
  isolation: isolate;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
}

body::before {
  background-image:
    radial-gradient(2px 2px at 20% 30%, rgba(255, 255, 255, 0.35), transparent 65%),
    radial-gradient(2px 2px at 80% 40%, rgba(255, 255, 255, 0.3), transparent 65%),
    radial-gradient(1px 1px at 30% 70%, rgba(255, 255, 255, 0.24), transparent 60%),
    radial-gradient(1px 1px at 70% 85%, rgba(255, 255, 255, 0.2), transparent 60%),
    radial-gradient(2px 2px at 55% 15%, rgba(255, 255, 255, 0.22), transparent 60%),
    repeating-linear-gradient(
      70deg,
      rgba(255, 255, 255, 0.035) 0 1px,
      rgba(0, 0, 0, 0.03) 1px 2px,
      transparent 2px 4px
    ),
    repeating-linear-gradient(
      -55deg,
      rgba(255, 255, 255, 0.02) 0 1px,
      rgba(0, 0, 0, 0.025) 1px 3px,
      transparent 3px 6px
    );
  background-size: auto, auto, auto, auto, auto, 260px 260px, 220px 220px;
  mix-blend-mode: soft-light;
  opacity: 0.38;
}

body::after {
  background-image:
    linear-gradient(120deg, rgba(74, 124, 89, 0.11), rgba(0, 212, 255, 0.03), rgba(212, 168, 67, 0.11)),
    repeating-linear-gradient(
      to bottom,
      rgba(255, 255, 255, 0.05) 0 1px,
      rgba(0, 0, 0, 0.03) 1px 2px,
      transparent 2px 4px
    );
  opacity: 0.22;
}

a {
  color: var(--gold);
  text-decoration: none;
}

a:hover,
a:focus {
  color: var(--cyan);
}

img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

.site-container {
  width: min(92%, var(--container));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 15, 26, 0.88);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(212, 168, 67, 0.2);
}

.site-header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 3px;
  background:
    linear-gradient(90deg, rgba(212, 168, 67, 0.5), rgba(0, 212, 255, 0.34), rgba(212, 168, 67, 0.18)),
    repeating-linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.2) 0 8px,
      rgba(0, 0, 0, 0.24) 8px 15px,
      transparent 15px 23px
    );
  opacity: 0.64;
  pointer-events: none;
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 0;
}

.branding {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  min-width: 0;
}

.branding-text {
  min-width: 0;
}

.branding .custom-logo-link {
  display: inline-flex;
  align-items: center;
  line-height: 0;
}

.branding .custom-logo {
  width: 56px;
  max-height: 56px;
  height: auto;
  border-radius: 0;
}

.branding .site-title {
  margin: 0;
  font-family: "Orbitron", "Exo 2", sans-serif;
  font-size: clamp(1.4rem, 3vw, 2rem);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.branding .site-title a {
  color: #f5f7fa;
}

.site-description {
  margin: 0.2rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

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

.main-navigation a {
  display: block;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  color: var(--text);
  border: 1px solid transparent;
  transition: 0.2s ease;
}

.main-navigation a:hover,
.main-navigation .current-menu-item > a {
  border-color: rgba(0, 212, 255, 0.45);
  color: var(--cyan);
  background: rgba(0, 212, 255, 0.08);
}

.hero {
  margin: 2rem auto;
  border-radius: var(--radius);
  border: 1px solid rgba(95, 114, 132, 0.55);
  background:
    linear-gradient(120deg, rgba(26, 26, 46, 0.96), rgba(15, 15, 26, 0.96)),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.02) 0 2px, transparent 2px 4px);
  padding: clamp(1.4rem, 4vw, 3rem);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero::before {
  background:
    repeating-linear-gradient(
      35deg,
      rgba(255, 255, 255, 0.03) 0 1px,
      rgba(0, 0, 0, 0.06) 1px 3px,
      transparent 3px 5px
    ),
    radial-gradient(circle at 22% 28%, rgba(255, 255, 255, 0.09), transparent 42%),
    radial-gradient(circle at 76% 72%, rgba(255, 255, 255, 0.06), transparent 46%);
  mix-blend-mode: overlay;
  opacity: 0.26;
}

.hero::after {
  background: radial-gradient(ellipse at center, transparent 40%, rgba(0, 0, 0, 0.55) 100%);
  opacity: 0.85;
}

.hero h2 {
  font-family: "Orbitron", "Exo 2", sans-serif;
  margin-top: 0;
  color: #f6f8ff;
  font-size: clamp(1.6rem, 4vw, 2.8rem);
  text-shadow: 0 0 18px rgba(0, 212, 255, 0.22), 0 1px 0 rgba(0, 0, 0, 0.9), 0 0 1px rgba(212, 168, 67, 0.3);
  position: relative;
  z-index: 1;
}

.hero p {
  max-width: 70ch;
  color: #c8d0da;
  position: relative;
  z-index: 1;
}

.hero .hero-kicker {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.8rem;
  color: var(--green);
  margin-bottom: 0.35rem;
  position: relative;
  z-index: 1;
}

.section-title {
  font-family: "Orbitron", "Exo 2", sans-serif;
  margin: 0 0 1rem;
  font-size: clamp(1.2rem, 3vw, 1.8rem);
}

h1,
h2,
h3,
h4,
.site-title,
.section-title,
.entry-title,
.widget-title {
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.9), 0 0 1px rgba(212, 168, 67, 0.24), 0 0 13px rgba(0, 212, 255, 0.14);
}

.content-grid {
  display: grid;
  gap: 1.2rem;
}

.post-grid {
  display: grid;
  gap: 1rem;
}

.post-card,
.widget,
.page-card,
.not-found,
.comment-respond,
.comment-list .comment-body,
.search-card {
  background: var(--card-bg);
  border: 1px solid rgba(93, 103, 122, 0.6);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.03);
  position: relative;
  overflow: hidden;
}

.post-card::before,
.widget::before,
.page-card::before,
.search-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    linear-gradient(130deg, rgba(212, 168, 67, 0.08), transparent 33%, rgba(0, 212, 255, 0.1)),
    repeating-linear-gradient(
      115deg,
      rgba(255, 255, 255, 0.03) 0 1px,
      rgba(0, 0, 0, 0.08) 1px 2px,
      transparent 2px 5px
    );
  opacity: 0.75;
  pointer-events: none;
}

.post-card {
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease, filter 0.22s ease;
}

.post-card:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 212, 255, 0.58);
  box-shadow: 0 24px 42px rgba(0, 0, 0, 0.72), 0 0 20px rgba(0, 212, 255, 0.14);
  filter: contrast(1.06);
}

.post-card:hover::before {
  background:
    linear-gradient(125deg, rgba(141, 149, 165, 0.22), rgba(38, 43, 58, 0.08) 36%, rgba(0, 212, 255, 0.14) 100%),
    repeating-linear-gradient(
      105deg,
      rgba(255, 255, 255, 0.1) 0 1px,
      rgba(0, 0, 0, 0.14) 1px 3px,
      transparent 3px 6px
    );
  opacity: 0.85;
}

.post-card .entry-title,
.page-card .entry-title,
.single-post .entry-title {
  margin: 0.6rem 0 0.5rem;
  font-family: "Orbitron", "Exo 2", sans-serif;
  font-size: 1.25rem;
}

.entry-meta,
.entry-footer {
  color: var(--muted);
  font-size: 0.88rem;
}

.entry-content {
  color: #d5dde7;
}

.entry-content blockquote {
  margin: 1rem 0;
  padding: 0.9rem 1rem;
  border-left: 4px solid var(--green);
  background: rgba(0, 0, 0, 0.2);
}

.category-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 1rem 0 1.25rem;
}

.category-filter a {
  display: inline-block;
  border: 1px solid rgba(212, 168, 67, 0.3);
  color: var(--text);
  border-radius: 999px;
  padding: 0.4rem 0.8rem;
  font-size: 0.86rem;
  background: rgba(26, 26, 46, 0.7);
}

.category-filter a:hover {
  border-color: var(--cyan);
  color: var(--cyan);
}

.layout-main {
  padding: 1.2rem 0 2.5rem;
}

.layout-columns {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.2rem;
}

.widget-title {
  margin-top: 0;
  font-family: "Orbitron", "Exo 2", sans-serif;
  color: #f2f4f8;
  font-size: 1.05rem;
}

.search-form {
  display: flex;
  gap: 0.4rem;
}

.search-field,
input[type="text"],
input[type="email"],
input[type="url"],
textarea {
  width: 100%;
  border: 1px solid #40475f;
  background: #101423;
  color: #f0f4f8;
  border-radius: 8px;
  padding: 0.6rem 0.75rem;
}

.search-submit,
button,
input[type="submit"] {
  border: 1px solid rgba(74, 124, 89, 0.75);
  background: linear-gradient(120deg, #355640, var(--green));
  color: #f3f7f5;
  border-radius: 8px;
  padding: 0.6rem 0.9rem;
  cursor: pointer;
  transition: 0.2s ease;
}

.search-submit:hover,
button:hover,
input[type="submit"]:hover {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.15);
}

.pagination {
  margin-top: 1.2rem;
}

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

.pagination .page-numbers {
  border: 1px solid rgba(212, 168, 67, 0.35);
  border-radius: 8px;
  padding: 0.35rem 0.6rem;
  color: var(--text);
}

.pagination .current {
  background: rgba(212, 168, 67, 0.2);
}

.site-footer {
  border-top: 1px solid rgba(212, 168, 67, 0.2);
  margin-top: 2rem;
  padding: 1.5rem 0;
  background: rgba(10, 10, 18, 0.8);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.social-links {
  list-style: none;
  display: flex;
  gap: 0.6rem;
  margin: 0;
  padding: 0;
}

.social-links a {
  border: 1px solid rgba(212, 168, 67, 0.4);
  border-radius: 999px;
  padding: 0.3rem 0.7rem;
  color: var(--text);
  font-size: 0.85rem;
}

.social-links a:hover {
  border-color: var(--cyan);
  color: var(--cyan);
}

.screen-reader-text {
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute !important;
  width: 1px;
  word-wrap: normal !important;
}

@media (min-width: 720px) {
  .post-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .layout-columns {
    grid-template-columns: 2fr minmax(240px, 320px);
  }
}

@media (max-width: 680px) {
  .branding .custom-logo {
    width: 44px;
    max-height: 44px;
  }

  .site-description {
    font-size: 0.85rem;
  }
}

@media (min-width: 1024px) {
  .post-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
