/*
Theme Name:  TechnoStatus
Theme URI:   https://technostatus.com
Author:      TechnoStatus
Author URI:  https://technostatus.com
Description: A modern dark editorial technology news theme for TechnoStatus. Features a hero featured grid, sticky header, reading progress bar, share rail, review scores, and full Gutenberg compatibility.
Version:     1.0.0
Requires at least: 6.0
Tested up to: 6.7
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: technostatus
Tags: dark, news, magazine, technology, blog, custom-menu, featured-images, post-formats, sticky-post, threaded-comments, translation-ready
*/

/* =============================================
   CSS CUSTOM PROPERTIES
   ============================================= */
:root {
  --red:           #ff2442;
  --red-dim:       #cc1a32;
  --red-glow:      rgba(255,36,66,0.22);
  --bg:            #0a0a0c;
  --bg2:           #111116;
  --bg3:           #18181f;
  --surface:       #1c1c24;
  --surface2:      #24242f;
  --border:        rgba(255,255,255,0.07);
  --border-bright: rgba(255,255,255,0.14);
  --white:         #ffffff;
  --off-white:     #e8e8ee;
  --muted:         #7a7a8c;
  --subtle:        #3a3a4a;
  --max-width:     1280px;
  --content-width: 860px;
}

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

body {
  font-family: 'Barlow', sans-serif;
  background: var(--bg);
  color: var(--off-white);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}

/* Grain texture overlay — must stay BELOW sticky header (z-index:200) and progress bar (z-index:300) */
body::before {
  content: '';
  position: fixed; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none; z-index: 1; opacity: 0.4;
}

a { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; height: auto; }
ul, ol { list-style: none; }
button { cursor: pointer; font-family: inherit; }
input, textarea { font-family: inherit; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* Screen reader text */
.screen-reader-text {
  clip: rect(1px,1px,1px,1px);
  position: absolute !important;
  height: 1px; width: 1px;
  overflow: hidden;
}

/* =============================================
   READING PROGRESS BAR
   ============================================= */
#reading-progress {
  position: fixed; top: 0; left: 0; height: 3px;
  background: var(--red); z-index: 300; width: 0%;
  box-shadow: 0 0 10px var(--red-glow);
  transition: width 0.1s linear;
}

/* =============================================
   BREAKING NEWS TICKER
   ============================================= */
.ts-ticker {
  background: var(--red); height: 30px;
  display: flex; align-items: center; overflow: hidden;
  position: relative; z-index: 10;
}
.ts-ticker__tag {
  background: #000; color: var(--red);
  font-family: 'DM Mono', monospace; font-size: 9px; font-weight: 500;
  letter-spacing: 2px; text-transform: uppercase;
  padding: 0 16px; height: 100%;
  display: flex; align-items: center; flex-shrink: 0; white-space: nowrap;
}
.ts-ticker__scroll {
  flex: 1; overflow: hidden;
  mask-image: linear-gradient(to right, transparent, black 4%, black 96%, transparent);
}
.ts-ticker__inner {
  display: flex; white-space: nowrap;
  animation: ts-ticker-scroll 40s linear infinite;
}
.ts-ticker__inner:hover { animation-play-state: paused; }
.ts-ticker__item {
  font-family: 'Barlow Condensed', sans-serif; font-size: 12px;
  font-weight: 600; letter-spacing: 0.5px; color: #fff;
  padding: 0 32px;
}
.ts-ticker__item::before { content: '/ '; opacity: 0.6; }
.ts-ticker__item a { color: #fff; }

@keyframes ts-ticker-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* =============================================
   HEADER
   ============================================= */
.site-header {
  position: sticky; top: 0; z-index: 200;
  background: rgba(10,10,12,0.93);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.site-header__inner {
  max-width: var(--max-width); margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; gap: 28px; height: 64px;
}

/* Logo */
.site-logo { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.site-logo__mark {
  width: 36px; height: 36px; background: var(--red);
  display: grid; grid-template-columns: 1fr 1fr 1fr; grid-template-rows: 1fr 1fr 1fr;
  gap: 2.5px; padding: 5px; border-radius: 6px;
  box-shadow: 0 0 20px var(--red-glow); flex-shrink: 0;
}
.site-logo__mark span { background: rgba(255,255,255,0.9); border-radius: 1px; display: block; }
.site-logo__mark span:nth-child(2n) { background: rgba(255,255,255,0.35); }
.site-logo__text {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 900; font-size: 26px; letter-spacing: -0.5px; line-height: 1;
}
.site-logo__text em { color: var(--red); font-style: normal; }

/* Primary Nav */
.primary-nav { flex: 1; display: flex; align-items: center; }
.primary-nav ul { display: flex; gap: 2px; }
.primary-nav a {
  font-family: 'Barlow Condensed', sans-serif; font-size: 13px;
  font-weight: 600; letter-spacing: 1px; text-transform: uppercase;
  color: var(--muted); padding: 6px 12px; border-radius: 4px;
  transition: color 0.2s, background 0.2s; white-space: nowrap; display: block;
}
.primary-nav a:hover,
.primary-nav .current-menu-item > a,
.primary-nav .current-menu-ancestor > a { color: var(--white); background: var(--surface); }
.primary-nav .current-menu-item > a { color: var(--red); }

/* Search */
.header-search { display: flex; align-items: center; gap: 10px; }
.header-search__form {
  display: flex; align-items: center;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 8px; padding: 6px 12px; gap: 8px;
  transition: border-color 0.2s;
}
.header-search__form:focus-within { border-color: var(--red); }
.header-search__form input {
  background: none; border: none; outline: none; font-size: 13px;
  color: var(--off-white); width: 150px;
}
.header-search__form input::placeholder { color: var(--muted); }
.header-search__icon { color: var(--muted); font-size: 13px; }

/* Mobile menu toggle */
.menu-toggle {
  display: none; background: none; border: 1px solid var(--border);
  color: var(--muted); border-radius: 6px; padding: 6px 10px; font-size: 18px;
}

/* Social icons in header */
.header-social { display: flex; gap: 6px; }
.header-social a {
  width: 30px; height: 30px; border-radius: 6px;
  background: var(--surface); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; color: var(--muted); transition: all 0.2s;
}
.header-social a:hover { background: var(--red); border-color: var(--red); color: #fff; transform: translateY(-1px); }

/* =============================================
   CATEGORY NAV BAR
   ============================================= */
.ts-cat-bar {
  border-bottom: 1px solid var(--border); overflow-x: auto;
}
.ts-cat-bar::-webkit-scrollbar { display: none; }
.ts-cat-bar__inner {
  max-width: var(--max-width); margin: 0 auto; padding: 0 24px;
  display: flex; gap: 0;
}
.ts-cat-bar a {
  font-family: 'Barlow Condensed', sans-serif; font-size: 12px;
  font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--muted); padding: 12px 16px;
  border-bottom: 2px solid transparent; transition: all 0.2s;
  white-space: nowrap; display: block; margin-bottom: -1px;
}
.ts-cat-bar a:hover { color: var(--white); border-bottom-color: var(--border-bright); }
.ts-cat-bar a.current { color: var(--red); border-bottom-color: var(--red); }

/* =============================================
   HERO FEATURED GRID (Homepage)
   ============================================= */
.ts-hero {
  max-width: var(--max-width); margin: 0 auto; padding: 28px 24px 0;
  display: grid; grid-template-columns: 1.5fr 1fr; grid-template-rows: auto auto; gap: 3px;
}

.ts-card {
  position: relative; overflow: hidden; cursor: pointer; background: var(--bg3);
}
.ts-card::after {
  content: ''; position: absolute; inset: 0;
  border: 2px solid transparent; pointer-events: none; z-index: 3;
  transition: border-color 0.3s;
}
.ts-card:hover::after { border-color: var(--red); }

.ts-card__img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform 0.6s cubic-bezier(0.25,0.46,0.45,0.94);
}
.ts-card:hover .ts-card__img { transform: scale(1.05); }

.ts-card__grad {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(to bottom, transparent 20%, rgba(0,0,0,0.45) 55%, rgba(0,0,0,0.92) 100%);
}
.ts-card__body {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 20px 20px 18px; z-index: 2;
}
.ts-card__tag {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--red); color: #fff;
  font-family: 'DM Mono', monospace; font-size: 9px;
  letter-spacing: 1.5px; text-transform: uppercase;
  padding: 3px 8px; border-radius: 3px; margin-bottom: 8px;
}
.ts-card__title {
  font-family: 'Barlow Condensed', sans-serif; font-weight: 800;
  font-size: 22px; color: #fff; line-height: 1.15;
  text-transform: uppercase; letter-spacing: 0.3px; margin-bottom: 12px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}
.ts-card__meta {
  font-size: 11px; color: rgba(255,255,255,0.55);
  font-family: 'DM Mono', monospace; letter-spacing: 0.5px; margin-bottom: 10px;
}
.ts-card__btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,0.1); backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.25); color: #fff;
  font-family: 'Barlow Condensed', sans-serif; font-size: 11px;
  font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase;
  padding: 7px 14px; border-radius: 4px; transition: all 0.2s;
}
.ts-card__btn:hover { background: var(--red); border-color: var(--red); }

/* Card variants */
.ts-card--main { grid-row: 1 / 3; min-height: 480px; }
.ts-card--main .ts-card__title { font-size: 30px; }
.ts-card--text {
  background: var(--bg3); border: 1px solid var(--border);
  display: flex; flex-direction: column; justify-content: center;
  padding: 28px 24px; min-height: 220px; transition: background 0.3s;
}
.ts-card--text:hover { background: var(--surface); }
.ts-card--text .ts-card__title { color: var(--off-white); font-size: 20px; }
.ts-card--text .ts-card__tag { background: var(--surface2); color: var(--red); }
.ts-card--text .ts-card__btn { background: transparent; border-color: var(--border-bright); color: var(--off-white); align-self: flex-start; }
.ts-card--text .ts-card__btn:hover { background: var(--red); border-color: var(--red); color: #fff; }
.ts-card--sm { min-height: 220px; }
.ts-card--sm .ts-card__title { font-size: 16px; }

/* =============================================
   MAIN LAYOUT
   ============================================= */
.ts-layout {
  max-width: var(--max-width); margin: 0 auto;
  padding: 40px 24px 60px;
  display: grid; grid-template-columns: 1fr 300px; gap: 48px;
  align-items: start;
}
.ts-layout--full { grid-template-columns: 1fr; }

/* Section label */
.ts-section-label {
  display: flex; align-items: center; gap: 12px; margin-bottom: 24px;
}
.ts-section-label h2 {
  font-family: 'Barlow Condensed', sans-serif; font-size: 11px; font-weight: 700;
  letter-spacing: 3px; text-transform: uppercase; color: var(--red);
}
.ts-section-label::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* =============================================
   POST LIST (Archive / Blog)
   ============================================= */
.ts-post-list { display: flex; flex-direction: column; }

.ts-post-item {
  display: grid; grid-template-columns: 140px 1fr; gap: 18px;
  padding: 20px 0; border-bottom: 1px solid var(--border);
  position: relative; transition: background 0.2s;
}
.ts-post-item::before {
  content: ''; position: absolute;
  left: -24px; right: -24px; top: 0; bottom: 0;
  background: var(--surface); opacity: 0; transition: opacity 0.2s; z-index: -1;
}
.ts-post-item:hover::before { opacity: 1; }

.ts-post-item__thumb {
  width: 140px; height: 94px; border-radius: 4px;
  overflow: hidden; flex-shrink: 0; position: relative;
}
.ts-post-item__thumb img { width: 100%; height: 100%; object-fit: cover; }
.ts-post-item__thumb-placeholder {
  width: 100%; height: 100%;
  background: var(--surface2); display: flex; align-items: center;
  justify-content: center; color: var(--muted); font-size: 28px;
}
.ts-date-badge {
  position: absolute; top: 0; left: 0;
  background: var(--red); color: #fff;
  font-family: 'Barlow Condensed', sans-serif; font-weight: 800;
  font-size: 15px; line-height: 1; padding: 4px 7px 5px;
  border-radius: 4px 0 6px 0; text-align: center;
}
.ts-date-badge .mo { display: block; font-size: 8px; font-weight: 600; letter-spacing: 0.5px; text-transform: uppercase; margin-top: 1px; }

.ts-post-item__cat {
  font-family: 'DM Mono', monospace; font-size: 9px; letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--red); margin-bottom: 5px;
}
.ts-post-item__title {
  font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: 19px;
  color: var(--off-white); line-height: 1.2; margin-bottom: 6px;
  transition: color 0.2s;
}
.ts-post-item:hover .ts-post-item__title { color: var(--white); }
.ts-post-item__meta {
  font-size: 11px; color: var(--muted); font-family: 'DM Mono', monospace;
  letter-spacing: 0.3px; margin-bottom: 8px;
}
.ts-post-item__meta a { color: var(--red); }
.ts-post-item__excerpt { font-size: 13px; color: var(--muted); line-height: 1.65; }

/* Pagination */
.ts-pagination { display: flex; gap: 6px; margin-top: 32px; }
.ts-pagination a, .ts-pagination span {
  width: 38px; height: 38px; display: flex; align-items: center; justify-content: center;
  font-family: 'Barlow Condensed', sans-serif; font-size: 14px; font-weight: 700;
  border-radius: 6px; background: var(--surface); border: 1px solid var(--border);
  color: var(--muted); transition: all 0.2s;
}
.ts-pagination a:hover,
.ts-pagination .current { background: var(--red); border-color: var(--red); color: #fff; }

/* =============================================
   SINGLE POST
   ============================================= */

/* Breadcrumb */
.ts-breadcrumb {
  max-width: var(--max-width); margin: 0 auto; padding: 16px 24px 0;
  display: flex; align-items: center; gap: 8px;
  font-family: 'DM Mono', monospace; font-size: 10px;
  letter-spacing: 1px; text-transform: uppercase; color: var(--muted);
}
.ts-breadcrumb a { color: var(--muted); transition: color 0.2s; }
.ts-breadcrumb a:hover { color: var(--red); }
.ts-breadcrumb .sep { color: var(--subtle); }

/* Post hero */
.ts-post-hero {
  max-width: var(--max-width); margin: 20px auto 0; padding: 0 24px;
  position: relative; border-radius: 12px; overflow: hidden;
  min-height: 480px; display: flex; flex-direction: column; justify-content: flex-end;
}
.ts-post-hero__bg {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, #050d1a 0%, #0d1a2d 30%, #1a0d2d 60%, #0a0a18 100%);
  z-index: 0;
}
.ts-post-hero__bg::after {
  content: ''; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,36,66,0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,36,66,0.05) 1px, transparent 1px);
  background-size: 48px 48px;
}
.ts-post-hero__img {
  position: absolute; inset: 0; z-index: 1;
}
.ts-post-hero__img img { width: 100%; height: 100%; object-fit: cover; opacity: 0.4; }
.ts-post-hero__grad {
  position: absolute; inset: 0; z-index: 2;
  background: linear-gradient(to bottom, transparent 20%, rgba(10,10,12,0.65) 55%, var(--bg) 100%);
}
.ts-post-hero__content {
  position: relative; z-index: 3; padding: 40px 48px 44px; max-width: 860px;
}
.ts-post-hero__tag {
  display: inline-flex; background: var(--red); color: #fff;
  font-family: 'DM Mono', monospace; font-size: 9px; letter-spacing: 2px;
  text-transform: uppercase; padding: 4px 10px; border-radius: 4px; margin-bottom: 16px;
}
.ts-post-hero__title {
  font-family: 'Barlow Condensed', sans-serif; font-weight: 900;
  font-size: clamp(30px,5vw,54px); color: var(--white);
  line-height: 1.05; letter-spacing: -0.5px; text-transform: uppercase;
  margin-bottom: 18px;
}
.ts-post-hero__title em { color: var(--red); font-style: italic; }
.ts-post-hero__deck {
  font-family: 'Barlow', sans-serif; font-size: 17px; font-weight: 300;
  color: rgba(255,255,255,0.75); line-height: 1.6; max-width: 680px; margin-bottom: 24px;
}
.ts-post-hero__meta { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }

.ts-author-chip { display: flex; align-items: center; gap: 10px; }
.ts-author-chip__avatar {
  width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, var(--red), #7a0020);
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 900; color: #fff;
  font-family: 'Barlow Condensed', sans-serif;
  border: 2px solid rgba(255,255,255,0.15); overflow: hidden;
}
.ts-author-chip__avatar img { width: 100%; height: 100%; object-fit: cover; }
.ts-author-chip__name { font-size: 13px; font-weight: 600; color: var(--off-white); }
.ts-author-chip__role { font-size: 11px; color: var(--muted); font-family: 'DM Mono', monospace; }

.ts-meta-divider { width: 1px; height: 28px; background: var(--border-bright); }
.ts-meta-item { font-family: 'DM Mono', monospace; font-size: 10px; letter-spacing: 0.5px; color: var(--muted); display: flex; flex-direction: column; gap: 2px; }
.ts-meta-item strong { color: var(--off-white); font-size: 12px; font-family: 'Barlow', sans-serif; font-weight: 600; letter-spacing: 0; }

/* Article layout */
.ts-article-wrap {
  max-width: var(--max-width); margin: 0 auto; padding: 40px 24px 60px;
  display: grid; grid-template-columns: 44px 1fr 300px; gap: 40px; align-items: start;
}

/* Share rail */
.ts-share-rail {
  position: sticky; top: 80px;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  width: 44px; flex-shrink: 0; align-self: flex-start; padding-top: 4px;
}
.ts-share-rail__label {
  font-family: 'DM Mono', monospace; font-size: 8px; letter-spacing: 2px;
  text-transform: uppercase; color: var(--subtle);
  writing-mode: vertical-rl; transform: rotate(180deg); margin-bottom: 4px;
}
.ts-share-btn {
  width: 38px; height: 38px; border-radius: 8px;
  background: var(--surface); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; color: var(--muted); cursor: pointer; transition: all 0.2s;
}
.ts-share-btn:hover { background: var(--red); border-color: var(--red); color: #fff; transform: scale(1.08); }
.ts-share-rail__count { font-family: 'DM Mono', monospace; font-size: 9px; color: var(--muted); text-align: center; }
.ts-share-rail__count strong { display: block; font-size: 12px; color: var(--off-white); font-family: 'Barlow', sans-serif; }
.ts-share-rail__divider { width: 20px; height: 1px; background: var(--border); }

/* Article content typography */
.ts-article-content {
  font-family: 'Lora', serif; font-size: 17px; line-height: 1.85; color: #c8c8d4; min-width: 0;
}
.ts-article-content p { margin-bottom: 1.5em; }
.ts-article-content h2 {
  font-family: 'Barlow Condensed', sans-serif; font-weight: 800; font-size: 28px;
  text-transform: uppercase; color: var(--off-white); margin: 2em 0 0.7em; line-height: 1.15;
  padding-left: 14px; border-left: 3px solid var(--red); letter-spacing: 0.3px;
}
.ts-article-content h3 {
  font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: 20px;
  text-transform: uppercase; color: var(--off-white); margin: 1.6em 0 0.6em; letter-spacing: 0.3px;
}
.ts-article-content a { color: var(--red); border-bottom: 1px solid rgba(255,36,66,0.3); transition: border-color 0.2s; }
.ts-article-content a:hover { border-bottom-color: var(--red); }
.ts-article-content strong { color: var(--off-white); font-weight: 600; }
.ts-article-content em { font-style: italic; }
.ts-article-content ul, .ts-article-content ol { margin: 1em 0 1.5em 1.4em; }
.ts-article-content ul { list-style: disc; }
.ts-article-content ol { list-style: decimal; }
.ts-article-content li { margin-bottom: 0.4em; }
.ts-article-content blockquote {
  margin: 2em 0; padding: 24px 28px;
  background: var(--surface); border-left: 4px solid var(--red); border-radius: 0 8px 8px 0;
  font-style: italic; color: var(--off-white); font-size: 18px; line-height: 1.5;
}
.ts-article-content figure { margin: 2em 0; }
.ts-article-content figure img { border-radius: 8px; border: 1px solid var(--border); }
.ts-article-content figcaption {
  padding: 8px 14px; background: var(--surface);
  font-family: 'DM Mono', monospace; font-size: 10px;
  letter-spacing: 0.5px; color: var(--muted); border-radius: 0 0 8px 8px;
}
.ts-article-content table { width: 100%; border-collapse: collapse; margin: 1.8em 0; font-family: 'Barlow', sans-serif; font-size: 14px; }
.ts-article-content th {
  background: var(--surface2); color: var(--off-white);
  font-family: 'Barlow Condensed', sans-serif; font-size: 11px; font-weight: 700;
  letter-spacing: 1.5px; text-transform: uppercase; padding: 10px 14px;
  text-align: left; border-bottom: 2px solid var(--red);
}
.ts-article-content td { padding: 10px 14px; border-bottom: 1px solid var(--border); color: #c8c8d4; vertical-align: top; }
.ts-article-content tr:hover td { background: var(--surface); }
.ts-article-content pre { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 20px; overflow-x: auto; margin: 1.5em 0; }
.ts-article-content code { font-family: 'DM Mono', monospace; font-size: 13px; color: var(--red); }
.ts-article-content pre code { color: var(--off-white); font-size: 13px; }

/* Tags */
.ts-post-tags {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin: 32px 0 28px; padding-top: 28px; border-top: 1px solid var(--border);
}
.ts-post-tags a {
  background: var(--surface); border: 1px solid var(--border); color: var(--muted);
  font-family: 'DM Mono', monospace; font-size: 9px; letter-spacing: 1px;
  text-transform: uppercase; padding: 5px 11px; border-radius: 4px; transition: all 0.2s;
}
.ts-post-tags a:hover { background: var(--red); border-color: var(--red); color: #fff; }

/* Author box */
.ts-author-box {
  display: flex; gap: 20px; padding: 24px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; margin-bottom: 36px;
}
.ts-author-box__avatar {
  width: 72px; height: 72px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, var(--red), #7a0020);
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; font-weight: 900; color: #fff;
  font-family: 'Barlow Condensed', sans-serif;
  border: 3px solid rgba(255,36,66,0.3); overflow: hidden;
}
.ts-author-box__avatar img { width: 100%; height: 100%; object-fit: cover; }
.ts-author-box__name { font-family: 'Barlow Condensed', sans-serif; font-weight: 800; font-size: 20px; color: var(--white); margin-bottom: 4px; }
.ts-author-box__role { font-family: 'DM Mono', monospace; font-size: 9px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--red); margin-bottom: 10px; }
.ts-author-box__bio { font-size: 13px; color: var(--muted); line-height: 1.65; }

/* Related posts */
.ts-related { margin-top: 12px; }
.ts-related h2 {
  font-family: 'Barlow Condensed', sans-serif; font-size: 11px; font-weight: 700;
  letter-spacing: 3px; text-transform: uppercase; color: var(--red);
  margin-bottom: 20px; padding-bottom: 10px; border-bottom: 1px solid var(--border);
}
.ts-related__grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; }
.ts-related__card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 8px; overflow: hidden; transition: border-color 0.2s, transform 0.2s;
}
.ts-related__card:hover { border-color: var(--red); transform: translateY(-3px); }
.ts-related__card img { width: 100%; height: 130px; object-fit: cover; }
.ts-related__card-placeholder { height: 130px; background: var(--surface2); display: flex; align-items: center; justify-content: center; font-size: 40px; }
.ts-related__info { padding: 14px 16px; }
.ts-related__cat { font-family: 'DM Mono', monospace; font-size: 9px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--red); margin-bottom: 6px; }
.ts-related__title { font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: 15px; color: var(--off-white); line-height: 1.25; margin-bottom: 6px; }
.ts-related__date { font-family: 'DM Mono', monospace; font-size: 9px; color: var(--muted); }

/* =============================================
   COMMENTS
   ============================================= */
.ts-comments { margin-top: 48px; }
.ts-comments h2 {
  font-family: 'Barlow Condensed', sans-serif; font-size: 11px; font-weight: 700;
  letter-spacing: 3px; text-transform: uppercase; color: var(--red);
  margin-bottom: 20px; padding-bottom: 10px; border-bottom: 1px solid var(--border);
}
.ts-comments .comment {
  display: flex; gap: 14px; padding: 18px 0; border-bottom: 1px solid var(--border);
}
.ts-comments .comment-author .avatar {
  width: 42px; height: 42px; border-radius: 50%; border: 2px solid var(--surface2);
}
.ts-comments .comment-meta { display: flex; align-items: baseline; gap: 10px; margin-bottom: 6px; }
.ts-comments .comment-meta .fn { font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: 15px; color: var(--off-white); font-style: normal; }
.ts-comments .comment-meta .comment-metadata a { font-family: 'DM Mono', monospace; font-size: 9px; color: var(--muted); }
.ts-comments .comment-content p { font-size: 13px; color: var(--muted); line-height: 1.65; }
.ts-comments .reply { margin-top: 8px; }
.ts-comments .reply a { font-family: 'DM Mono', monospace; font-size: 9px; letter-spacing: 1px; text-transform: uppercase; color: var(--subtle); transition: color 0.2s; }
.ts-comments .reply a:hover { color: var(--red); }

/* Comment form */
.comment-respond { margin-top: 32px; }
.comment-respond h3 { font-family: 'Barlow Condensed', sans-serif; font-size: 20px; font-weight: 700; color: var(--off-white); margin-bottom: 20px; }
.comment-form .comment-form-author,
.comment-form .comment-form-email { display: inline-block; width: 48%; margin-right: 3%; }
.comment-form .comment-form-email { margin-right: 0; }
.comment-form label { font-family: 'DM Mono', monospace; font-size: 9px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted); display: block; margin-bottom: 6px; }
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%; background: var(--surface); border: 1px solid var(--border);
  border-radius: 6px; padding: 10px 14px;
  font-size: 14px; color: var(--off-white); outline: none;
  transition: border-color 0.2s; margin-bottom: 14px;
}
.comment-form input:focus,
.comment-form textarea:focus { border-color: var(--red); }
.comment-form textarea { min-height: 120px; resize: vertical; }
.comment-form input[type="submit"] {
  background: var(--red); color: #fff; border: none; border-radius: 6px;
  padding: 12px 28px;
  font-family: 'Barlow Condensed', sans-serif; font-size: 14px; font-weight: 700;
  letter-spacing: 1.5px; text-transform: uppercase; transition: all 0.2s;
}
.comment-form input[type="submit"]:hover { background: var(--red-dim); transform: translateY(-1px); }

/* =============================================
   SIDEBAR WIDGETS
   ============================================= */
.ts-sidebar { display: flex; flex-direction: column; gap: 28px; }

.widget { }
.widget-title {
  font-family: 'Barlow Condensed', sans-serif; font-size: 10px; font-weight: 700;
  letter-spacing: 3px; text-transform: uppercase; color: var(--red);
  margin-bottom: 16px; padding-bottom: 10px; border-bottom: 1px solid var(--border);
}

/* Generic widget list */
.widget ul { display: flex; flex-direction: column; gap: 8px; }
.widget ul li a { font-size: 13px; color: var(--muted); transition: color 0.2s; display: flex; align-items: center; gap: 8px; }
.widget ul li a::before { content: '→'; font-size: 10px; color: var(--subtle); }
.widget ul li a:hover { color: var(--red); }

/* Ad placeholder */
.ts-ad {
  background: var(--surface); border: 1px dashed var(--border-bright);
  border-radius: 8px; min-height: 250px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  color: var(--subtle);
}
.ts-ad__label { font-family: 'DM Mono', monospace; font-size: 9px; letter-spacing: 2px; text-transform: uppercase; }
.ts-ad__size { font-size: 11px; color: var(--muted); }

/* Tag cloud widget */
.tagcloud { display: flex; flex-wrap: wrap; gap: 6px; }
.tagcloud a {
  background: var(--surface); border: 1px solid var(--border); color: var(--muted);
  font-family: 'DM Mono', monospace !important; font-size: 9px !important;
  letter-spacing: 1px; text-transform: uppercase; padding: 5px 10px;
  border-radius: 4px; transition: all 0.2s;
}
.tagcloud a:hover { background: var(--red); border-color: var(--red); color: #fff; }

/* Recent posts widget */
.ts-recent-post { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.ts-recent-post:last-child { border-bottom: none; }
.ts-recent-post img { width: 64px; height: 44px; object-fit: cover; border-radius: 4px; flex-shrink: 0; }
.ts-recent-post__title { font-family: 'Barlow Condensed', sans-serif; font-size: 14px; font-weight: 700; color: var(--off-white); line-height: 1.25; margin-bottom: 4px; transition: color 0.2s; }
.ts-recent-post:hover .ts-recent-post__title { color: var(--red); }
.ts-recent-post__date { font-family: 'DM Mono', monospace; font-size: 9px; color: var(--muted); }

/* Newsletter widget */
.ts-newsletter { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 20px; }
.ts-newsletter p { font-size: 13px; color: var(--muted); line-height: 1.6; margin-bottom: 14px; }
.ts-newsletter input[type="email"] {
  width: 100%; background: var(--bg3); border: 1px solid var(--border);
  border-radius: 6px; padding: 10px 12px; font-size: 13px; color: var(--off-white);
  outline: none; margin-bottom: 8px; transition: border-color 0.2s;
}
.ts-newsletter input[type="email"]:focus { border-color: var(--red); }
.ts-newsletter input[type="submit"] {
  width: 100%; background: var(--red); color: #fff; border: none;
  border-radius: 6px; padding: 10px;
  font-family: 'Barlow Condensed', sans-serif; font-size: 13px; font-weight: 700;
  letter-spacing: 1.5px; text-transform: uppercase; transition: background 0.2s;
}
.ts-newsletter input[type="submit"]:hover { background: var(--red-dim); }

/* TOC widget */
.ts-toc { display: flex; flex-direction: column; gap: 2px; }
.ts-toc a {
  font-size: 13px; color: var(--muted); padding: 7px 12px; border-radius: 5px;
  border-left: 2px solid transparent; transition: all 0.2s;
  display: flex; align-items: center; gap: 8px;
}
.ts-toc a:hover, .ts-toc a.active { color: var(--off-white); border-left-color: var(--red); background: var(--surface); }
.ts-toc__num { font-family: 'DM Mono', monospace; font-size: 9px; color: var(--subtle); }

/* =============================================
   FOOTER
   ============================================= */
.site-footer { background: var(--bg2); border-top: 1px solid var(--border); }
.site-footer__main {
  max-width: var(--max-width); margin: 0 auto; padding: 48px 24px 32px;
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px;
}
.site-footer__brand-logo {
  font-family: 'Barlow Condensed', sans-serif; font-weight: 900; font-size: 30px;
  letter-spacing: -0.5px; display: block; margin-bottom: 14px; color: var(--white);
}
.site-footer__brand-logo em { color: var(--red); font-style: normal; }
.site-footer__brand p { font-size: 13px; color: var(--muted); line-height: 1.7; margin-bottom: 18px; }
.site-footer__social { display: flex; gap: 8px; }
.site-footer__social a {
  width: 32px; height: 32px; border-radius: 6px;
  background: var(--surface); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; color: var(--muted); transition: all 0.2s;
}
.site-footer__social a:hover { background: var(--red); border-color: var(--red); color: #fff; }
.site-footer__col-title {
  font-family: 'Barlow Condensed', sans-serif; font-size: 10px; font-weight: 700;
  letter-spacing: 2.5px; text-transform: uppercase; color: var(--white);
  margin-bottom: 16px; padding-bottom: 10px; border-bottom: 1px solid var(--border);
}
.site-footer__links { display: flex; flex-direction: column; gap: 8px; }
.site-footer__links a { font-size: 13px; color: var(--muted); transition: color 0.2s; display: flex; align-items: center; gap: 6px; }
.site-footer__links a::before { content: '→'; font-size: 10px; color: var(--subtle); }
.site-footer__links a:hover { color: var(--red); }

.site-footer__bottom {
  border-top: 1px solid var(--border); max-width: var(--max-width); margin: 0 auto; padding: 16px 24px;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px;
  font-size: 11px; color: var(--muted); font-family: 'DM Mono', monospace; letter-spacing: 0.3px;
}
.site-footer__bottom a { color: var(--subtle); transition: color 0.2s; }
.site-footer__bottom a:hover { color: var(--red); }

/* =============================================
   GUTENBERG / BLOCK EDITOR COMPAT
   ============================================= */
.wp-block-image img { border-radius: 8px; }
.wp-block-quote {
  background: var(--surface); border-left: 4px solid var(--red) !important;
  padding: 24px 28px; margin: 2em 0; border-radius: 0 8px 8px 0;
}
.wp-block-quote p { font-size: 18px; font-style: italic; color: var(--off-white); margin: 0; }
.wp-block-quote cite { font-family: 'DM Mono', monospace; font-size: 10px; color: var(--muted); }
.wp-block-separator { border: none; border-top: 1px solid var(--border); margin: 2em 0; }
.wp-block-code { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 20px; }
.wp-block-pullquote { border-top: 4px solid var(--red); border-bottom: 4px solid var(--red); padding: 24px; margin: 2em 0; }
.wp-block-pullquote p { font-family: 'Barlow Condensed', sans-serif; font-size: 24px; font-weight: 700; color: var(--off-white); }

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 1100px) {
  .ts-hero { grid-template-columns: 1fr; }
  .ts-card--main { grid-row: auto; min-height: 320px; }
  .ts-article-wrap { grid-template-columns: 44px 1fr; }
  .ts-layout { grid-template-columns: 1fr; }
  .site-footer__main { grid-template-columns: 1fr 1fr; }
  .ts-related__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .primary-nav { display: none; }
  .primary-nav.is-open { display: flex; position: fixed; inset: 64px 0 0; background: var(--bg); z-index: 99; flex-direction: column; padding: 20px; }
  .primary-nav.is-open ul { flex-direction: column; }
  .menu-toggle { display: block; }
  .header-social { display: none; }
  .ts-article-wrap { grid-template-columns: 1fr; padding: 20px 16px 40px; }
  .ts-share-rail { display: none; }
  .ts-post-hero__content { padding: 24px 20px 28px; }
  .comment-form .comment-form-author,
  .comment-form .comment-form-email { width: 100%; margin-right: 0; }
  .ts-related__grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .ts-post-item { grid-template-columns: 1fr; }
  .ts-post-item__thumb { width: 100%; height: 160px; }
  .site-footer__main { grid-template-columns: 1fr; }
}

/* Scrollbar */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--surface2); border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: var(--red); }
