/*
Theme Name: Brutalist Press
Theme URI: https://example.com
Author: Claude
Description: A raw neo-brutalist WordPress theme. Thick borders, offset shadows, acid yellow, and zero compromise.
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: brutalist-press
Tags: blog, portfolio, one-column, two-columns, custom-colors, custom-menu, featured-images, full-width-template, sticky-post, threaded-comments, translation-ready
*/

/* =============================================
   BRUTALIST PRESS — DESIGN TOKENS
   ============================================= */
:root {
  --yellow:      #F5F500;
  --black:       #0A0A0A;
  --white:       #FFFFFF;
  --red:         #FF3A00;
  --gray:        #D4D4D4;
  --light-gray:  #F0F0F0;

  --border:      4px solid var(--black);
  --shadow:      6px 6px 0 var(--yellow);
  --shadow-red:  6px 6px 0 var(--red);
  --shadow-dark: 6px 6px 0 var(--black);

  --font-display: 'Space Grotesk', sans-serif;
  --font-body:    'IBM Plex Mono', monospace;

  --max-width: 1200px;
  --gap: 2rem;
}

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

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

body {
  font-family: var(--font-body);
  background-color: var(--white);
  color: var(--black);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--black);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.1s, background 0.1s;
}

a:hover {
  color: var(--red);
}

ul, ol {
  padding-left: 1.5rem;
}

/* =============================================
   TYPOGRAPHY
   ============================================= */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--black);
}

h1 { font-size: clamp(2.5rem, 6vw, 5rem); }
h2 { font-size: clamp(1.8rem, 4vw, 3rem); }
h3 { font-size: clamp(1.3rem, 2.5vw, 1.8rem); }
h4 { font-size: 1.2rem; }

p { margin-bottom: 1.2rem; }
p:last-child { margin-bottom: 0; }

blockquote {
  border-left: 6px solid var(--yellow);
  padding: 1rem 1.5rem;
  margin: 2rem 0;
  background: var(--light-gray);
  font-style: italic;
  font-size: 1.1rem;
}

code, pre {
  font-family: var(--font-body);
  background: var(--black);
  color: var(--yellow);
  padding: 0.2em 0.5em;
  border-radius: 0;
}

pre {
  padding: 1.5rem;
  overflow-x: auto;
  margin: 1.5rem 0;
}

pre code {
  padding: 0;
  background: none;
}

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

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.site-main {
  flex: 1;
  padding: 3rem 0;
}

/* Grid for blog index */
.content-area {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: var(--gap);
  align-items: start;
}

@media (max-width: 900px) {
  .content-area {
    grid-template-columns: 1fr;
  }
}

/* =============================================
   HEADER
   ============================================= */
.site-header {
  background: var(--yellow);
  border-bottom: var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

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

.site-branding {
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.site-title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--black);
  text-decoration: none;
  letter-spacing: -0.03em;
  line-height: 1;
}

.site-description {
  font-family: var(--font-body);
  font-size: 0.7rem;
  color: var(--black);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.7;
}

/* =============================================
   NAVIGATION
   ============================================= */
.main-navigation {
  display: flex;
  align-items: center;
  gap: 0;
}

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

.main-navigation ul li {
  border-left: var(--border);
}

.main-navigation ul li:last-child {
  border-right: var(--border);
}

.main-navigation ul li a {
  display: block;
  padding: 0.5rem 1rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-decoration: none;
  color: var(--black);
  background: transparent;
  transition: background 0.1s;
}

.main-navigation ul li a:hover,
.main-navigation ul li.current-menu-item > a {
  background: var(--black);
  color: var(--yellow);
}

/* Mobile nav toggle */
.menu-toggle {
  display: none;
  background: var(--black);
  color: var(--yellow);
  border: var(--border);
  padding: 0.4rem 0.8rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }
  .main-navigation ul {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--yellow);
    border-bottom: var(--border);
    z-index: 99;
  }
  .main-navigation ul.toggled {
    display: flex;
  }
  .main-navigation ul li {
    border-left: none;
    border-right: none;
    border-top: var(--border);
  }
  .main-navigation ul li:last-child {
    border-right: none;
  }
}

/* =============================================
   HERO BANNER (front page / home)
   ============================================= */
.hero-section {
  background: var(--black);
  color: var(--white);
  border-bottom: var(--border);
  padding: 5rem 1.5rem;
  text-align: left;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '//';
  position: absolute;
  top: -1rem;
  right: 2rem;
  font-family: var(--font-display);
  font-size: 12rem;
  font-weight: 900;
  color: var(--yellow);
  opacity: 0.12;
  line-height: 1;
  pointer-events: none;
  user-select: none;
}

.hero-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.hero-eyebrow {
  display: inline-block;
  background: var(--yellow);
  color: var(--black);
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 0.3rem 0.6rem;
  margin-bottom: 1.5rem;
  border: 2px solid var(--black);
}

.hero-title {
  color: var(--white);
  margin-bottom: 1.5rem;
  max-width: 800px;
}

.hero-title span {
  color: var(--yellow);
}

.hero-description {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--gray);
  max-width: 560px;
  margin-bottom: 2.5rem;
  line-height: 1.7;
}

.btn {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.8rem 1.6rem;
  text-decoration: none;
  border: var(--border);
  cursor: pointer;
  transition: transform 0.08s, box-shadow 0.08s;
  position: relative;
}

.btn-primary {
  background: var(--yellow);
  color: var(--black);
  box-shadow: var(--shadow-dark);
}

.btn-primary:hover {
  transform: translate(-3px, -3px);
  box-shadow: 9px 9px 0 var(--black);
  color: var(--black);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border-color: var(--white);
  box-shadow: 6px 6px 0 rgba(255,255,255,0.3);
  margin-left: 1rem;
}

.btn-outline:hover {
  background: var(--white);
  color: var(--black);
  transform: translate(-3px, -3px);
  box-shadow: 9px 9px 0 rgba(255,255,255,0.3);
}

/* =============================================
   POST CARDS
   ============================================= */
.posts-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.post-card {
  border: var(--border);
  box-shadow: var(--shadow);
  background: var(--white);
  transition: transform 0.1s, box-shadow 0.1s;
  overflow: hidden;
}

.post-card:hover {
  transform: translate(-3px, -3px);
  box-shadow: 9px 9px 0 var(--yellow);
}

.post-card-image {
  display: block;
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  border-bottom: var(--border);
}

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

.post-card-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.post-category {
  display: inline-block;
  background: var(--black);
  color: var(--yellow);
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0.25rem 0.5rem;
  text-decoration: none;
}

.post-category:hover {
  background: var(--red);
  color: var(--white);
}

.post-date {
  font-family: var(--font-body);
  font-size: 0.75rem;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.post-card-title {
  font-size: 1.4rem;
  margin-bottom: 0.75rem;
  line-height: 1.15;
}

.post-card-title a {
  text-decoration: none;
  color: var(--black);
}

.post-card-title a:hover {
  color: var(--red);
}

.post-card-excerpt {
  font-size: 0.9rem;
  color: #444;
  margin-bottom: 1.2rem;
  line-height: 1.6;
}

.read-more {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.8rem;
  border: 2px solid var(--black);
  background: var(--white);
  transition: background 0.1s, color 0.1s;
}

.read-more:hover {
  background: var(--black);
  color: var(--yellow);
}

.read-more::after {
  content: '→';
}

/* Featured post (first post) */
.post-card.featured {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.post-card.featured .post-card-image {
  border-bottom: none;
  border-right: var(--border);
  height: 100%;
  aspect-ratio: auto;
}

@media (max-width: 600px) {
  .post-card.featured {
    grid-template-columns: 1fr;
  }
  .post-card.featured .post-card-image {
    border-right: none;
    border-bottom: var(--border);
    aspect-ratio: 16/9;
  }
}

/* =============================================
   PAGINATION
   ============================================= */
.pagination {
  margin-top: 3rem;
  display: flex;
  gap: 0;
  align-items: center;
  flex-wrap: wrap;
}

.pagination .page-numbers {
  display: inline-block;
  padding: 0.6rem 1rem;
  border: var(--border);
  font-family: var(--font-display);
  font-weight: 700;
  text-decoration: none;
  background: var(--white);
  color: var(--black);
  margin-right: -4px;
  transition: background 0.1s, color 0.1s;
}

.pagination .page-numbers:hover,
.pagination .page-numbers.current {
  background: var(--black);
  color: var(--yellow);
  z-index: 1;
  position: relative;
}

/* =============================================
   SINGLE POST
   ============================================= */
.single-post-header {
  border-bottom: var(--border);
  padding-bottom: 2rem;
  margin-bottom: 2rem;
}

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

.single-post-meta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
}

.author-chip {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-size: 0.8rem;
}

.author-chip img {
  border: 2px solid var(--black);
  width: 32px;
  height: 32px;
  border-radius: 0;
}

.single-post-thumbnail {
  width: 100%;
  aspect-ratio: 16/7;
  object-fit: cover;
  border: var(--border);
  box-shadow: var(--shadow);
  margin-bottom: 2rem;
}

.entry-content {
  font-size: 1rem;
  line-height: 1.8;
  max-width: 720px;
}

.entry-content h2,
.entry-content h3,
.entry-content h4 {
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.entry-content img {
  border: var(--border);
  box-shadow: var(--shadow);
  margin: 1.5rem 0;
}

.entry-content a {
  font-weight: 700;
  text-decoration-color: var(--yellow);
  text-decoration-thickness: 3px;
}

.entry-content a:hover {
  background: var(--yellow);
  color: var(--black);
  text-decoration: none;
}

/* Post tags */
.entry-tags {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.tag-label {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-right: 0.5rem;
}

.tag-link {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border: 2px solid var(--black);
  font-family: var(--font-body);
  font-size: 0.75rem;
  text-decoration: none;
  font-weight: 700;
  transition: background 0.1s, color 0.1s;
}

.tag-link:hover {
  background: var(--black);
  color: var(--yellow);
}

/* =============================================
   SIDEBAR / WIDGETS
   ============================================= */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.widget {
  border: var(--border);
  box-shadow: var(--shadow);
  background: var(--white);
  overflow: hidden;
}

.widget-title {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0.75rem 1rem;
  background: var(--black);
  color: var(--yellow);
  margin: 0;
}

.widget-content {
  padding: 1.25rem;
}

.widget ul {
  list-style: none;
  padding: 0;
}

.widget ul li {
  padding: 0.4rem 0;
  border-bottom: 2px solid var(--light-gray);
}

.widget ul li:last-child {
  border-bottom: none;
}

.widget ul li a {
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 700;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.widget ul li a::after {
  content: '→';
  font-size: 0.8rem;
  opacity: 0.5;
}

.widget ul li a:hover::after {
  opacity: 1;
}

/* Search widget */
.search-form {
  display: flex;
  border: var(--border);
}

.search-field {
  flex: 1;
  padding: 0.6rem 0.8rem;
  border: none;
  font-family: var(--font-body);
  font-size: 0.85rem;
  outline: none;
  background: var(--white);
}

.search-submit {
  padding: 0.6rem 1rem;
  background: var(--black);
  color: var(--yellow);
  border: none;
  border-left: var(--border);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  cursor: pointer;
  letter-spacing: 0.05em;
  transition: background 0.1s;
}

.search-submit:hover {
  background: var(--red);
}

/* =============================================
   COMMENTS
   ============================================= */
.comments-area {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: var(--border);
}

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

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

.comment-list .comment {
  border: var(--border);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow);
}

.comment-author {
  font-family: var(--font-display);
  font-weight: 700;
  margin-bottom: 0.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.comment-author img {
  border: 2px solid var(--black);
  width: 36px;
  height: 36px;
}

.comment-meta {
  font-size: 0.75rem;
  color: #666;
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.comment-body p {
  font-size: 0.9rem;
}

.comment-reply-link {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-decoration: none;
  padding: 0.2rem 0.5rem;
  border: 2px solid var(--black);
  display: inline-block;
  margin-top: 0.5rem;
}

.comment-reply-link:hover {
  background: var(--black);
  color: var(--yellow);
}

/* Comment form */
.comment-form label {
  display: block;
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.4rem;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%;
  padding: 0.7rem;
  border: var(--border);
  font-family: var(--font-body);
  font-size: 0.9rem;
  background: var(--white);
  outline: none;
  transition: box-shadow 0.1s;
}

.comment-form input:focus,
.comment-form textarea:focus {
  box-shadow: 4px 4px 0 var(--yellow);
}

.comment-form .form-submit input {
  background: var(--black);
  color: var(--yellow);
  border: var(--border);
  padding: 0.75rem 1.5rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  cursor: pointer;
  box-shadow: var(--shadow-dark);
  transition: transform 0.08s, box-shadow 0.08s;
}

.comment-form .form-submit input:hover {
  transform: translate(-3px, -3px);
  box-shadow: 9px 9px 0 var(--yellow);
}

/* =============================================
   FOOTER
   ============================================= */
.site-footer {
  background: var(--black);
  color: var(--white);
  border-top: var(--border);
  padding: 3rem 1.5rem;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2rem;
}

@media (max-width: 768px) {
  .footer-inner {
    grid-template-columns: 1fr;
  }
}

.footer-brand {
  display: block;
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 900;
  color: var(--yellow);
  text-decoration: none;
  letter-spacing: -0.03em;
  margin-bottom: 0.75rem;
}

.footer-tagline {
  font-family: var(--font-body);
  font-size: 0.8rem;
  color: var(--gray);
  line-height: 1.6;
}

.footer-heading {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--yellow);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #333;
}

.footer-links {
  list-style: none;
  padding: 0;
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-links a {
  color: var(--gray);
  text-decoration: none;
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: color 0.1s;
}

.footer-links a:hover {
  color: var(--yellow);
}

.footer-links a::before {
  content: '—';
  font-size: 0.7rem;
  color: var(--red);
}

.footer-bottom {
  max-width: var(--max-width);
  margin: 2rem auto 0;
  padding-top: 1.5rem;
  border-top: 2px solid #222;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-copy {
  font-family: var(--font-body);
  font-size: 0.75rem;
  color: #555;
}

.footer-copy a {
  color: var(--yellow);
  text-decoration: none;
}

/* =============================================
   PAGE — 404
   ============================================= */
.error-404 {
  text-align: center;
  padding: 5rem 1.5rem;
}

.error-code {
  font-family: var(--font-display);
  font-size: 8rem;
  font-weight: 900;
  color: var(--yellow);
  line-height: 1;
  display: block;
  -webkit-text-stroke: 4px var(--black);
}

/* =============================================
   UTILITIES
   ============================================= */
.section-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin-bottom: 1.5rem;
}

.section-label::before {
  content: '';
  display: inline-block;
  width: 20px;
  height: 3px;
  background: var(--red);
}

.no-results {
  padding: 3rem;
  border: var(--border);
  box-shadow: var(--shadow);
  text-align: center;
}

/* =============================================
   ACCESSIBILITY
   ============================================= */
.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
  width: auto;
  height: auto;
  z-index: 9999;
  background: var(--yellow);
  padding: 0.5rem 1rem;
  border: var(--border);
  font-weight: 700;
  font-family: var(--font-display);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
