/*
Theme Name: TheClaudefather.com
Theme URI: https://theclaudefather.com
Author: Claude
Author URI: https://theclaudefather.com
Description: A warm, refined blog theme inspired by the Claude Desktop aesthetic. Features modern serif typography, subtle gradients, and a focus on readability.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.4
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: theclaudefather
Tags: blog, one-column, custom-menu, custom-logo, featured-images, theme-options, translation-ready
*/

/* ==================== CSS VARIABLES ==================== */
:root {
  /* Claude Desktop inspired palette */
  --bg-primary: #2a2825;
  --bg-secondary: #353330;
  --bg-elevated: #3d3a36;
  --text-primary: #f5f1eb;
  --text-secondary: #c4bfb6;
  --text-muted: #8a857d;
  --border-subtle: rgba(245, 241, 235, 0.08);
  --border-medium: rgba(245, 241, 235, 0.12);
  
  /* Primary accent - Gold */
  --accent-gold: #ffbf00;
  --accent-gold-gradient: linear-gradient(180deg, #ffd24d 0%, #ffbf00 50%, #e6ac00 100%);
  --accent-gold-glow: rgba(255, 191, 0, 0.2);
  
  /* Secondary accent - Red */
  --accent-red: #ff0000;
  --accent-red-gradient: linear-gradient(180deg, #ff4d4d 0%, #ff0000 50%, #cc0000 100%);
  --accent-red-subtle-bg: linear-gradient(180deg, rgba(255, 77, 77, 0.15) 0%, rgba(255, 0, 0, 0.12) 50%, rgba(204, 0, 0, 0.18) 100%);
  
  /* Typography */
  --font-serif: 'Crimson Pro', Georgia, serif;
  --font-sans: 'DM Sans', -apple-system, sans-serif;
  
  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --space-2xl: 6rem;
}

/* ==================== 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.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Subtle background texture */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' 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)'/%3E%3C/svg%3E");
  opacity: 0.03;
  pointer-events: none;
  z-index: -1;
}

a {
  color: inherit;
  text-decoration: none;
}

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

/* ==================== HEADER ==================== */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(42, 40, 37, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
}

.header-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: var(--space-md) var(--space-lg);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: var(--space-lg);
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.logo-mark {
  width: 72px;
  height: 72px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--bg-primary);
  overflow: hidden;
}

.logo-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.logo-text {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  margin-left: 0.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

/* Search */
.search-container {
  width: 100%;
  max-width: 400px;
}

.search-field {
  width: 100%;
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 0.625rem 1rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-medium);
  border-radius: 100px;
  transition: all 0.2s ease;
}

.search-field:focus-within {
  background: var(--bg-elevated);
  border-color: rgba(255, 191, 0, 0.4);
  box-shadow: 0 0 0 3px var(--accent-gold-glow);
}

.search-icon {
  flex-shrink: 0;
  color: var(--text-muted);
}

.search-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  color: var(--text-primary);
}

.search-input::placeholder {
  color: var(--text-muted);
}

/* Navigation */
.nav {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: var(--space-md);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-menu li {
  margin: 0;
  padding: 0;
}

.nav-menu a {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-secondary);
  padding: var(--space-xs) 0;
  position: relative;
  transition: color 0.2s ease;
  display: block;
}

.nav-menu a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent-gold);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s ease;
}

.nav-menu a:hover {
  color: var(--text-primary);
}

.nav-menu a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* Last nav item styled as button */
.nav-menu li:last-child a {
  padding: 0.5rem 1.25rem;
  background: var(--accent-gold-gradient);
  border: none;
  border-radius: 100px;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--bg-primary);
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px var(--accent-gold-glow);
}

.nav-menu li:last-child a::after {
  display: none;
}

.nav-menu li:last-child a:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px var(--accent-gold-glow);
  color: var(--bg-primary);
}

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  background: transparent;
  border: none;
  padding: var(--space-xs);
  cursor: pointer;
  color: var(--text-primary);
}

.menu-toggle svg {
  display: block;
}

.menu-toggle .icon-close {
  display: none;
}

.menu-toggle.is-active .icon-hamburger {
  display: none;
}

.menu-toggle.is-active .icon-close {
  display: block;
}

/* ==================== MAIN CONTENT ==================== */
.main {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--space-xl) var(--space-lg) var(--space-2xl);
}

/* ==================== HERO SECTION ==================== */
.hero {
  margin-bottom: var(--space-2xl);
  padding-bottom: var(--space-xl);
  border-bottom: 1px solid var(--border-subtle);
}

.hero-label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  margin-bottom: var(--space-md);
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

.hero-label::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-gold);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.9); }
}

.hero-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  align-items: center;
}

.hero-text {
  display: flex;
  flex-direction: column;
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

.hero-category {
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--accent-red-subtle-bg);
  color: var(--accent-gold);
  padding: 0.25rem 0.75rem;
  border-radius: 100px;
  border: 1px solid rgba(255, 0, 0, 0.2);
}

.hero-category a {
  color: inherit;
}

.hero-date {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: var(--space-md);
}

.hero-title a {
  transition: opacity 0.2s ease;
}

.hero-title a:hover {
  opacity: 0.8;
}

.hero-excerpt {
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: var(--space-lg);
}

.hero-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
  transition: all 0.2s ease;
}

.hero-link-arrow {
  transition: transform 0.2s ease;
}

.hero-link:hover {
  color: var(--accent-gold);
}

.hero-link:hover .hero-link-arrow {
  transform: translateX(4px);
}

.hero-image {
  aspect-ratio: 4/3;
  border-radius: 16px;
  background: var(--bg-secondary);
  overflow: hidden;
  position: relative;
}

.hero-image::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--accent-gold);
  opacity: 0.05;
}

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* ==================== POSTS GRID (Homepage) ==================== */
.posts-section {
  margin-top: var(--space-xl);
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-lg);
}

.section-title {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
  position: relative;
  padding-left: var(--space-md);
}

.section-title::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 80%;
  border-radius: 2px;
  background: var(--accent-gold-gradient);
}

.section-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.2s ease;
}

.section-link:hover {
  color: var(--accent-gold);
}

.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  overflow: hidden;
}

.post-card {
  background: var(--bg-primary);
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  transition: background 0.2s ease;
}

.post-card:hover {
  background: var(--bg-secondary);
}

.post-number {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent-red);
  opacity: 0.5;
  line-height: 1;
}

.post-date {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.post-title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 500;
  line-height: 1.35;
  color: var(--text-primary);
  flex-grow: 1;
}

.post-title a {
  transition: color 0.2s ease;
}

.post-title a:hover {
  color: var(--accent-gold);
}

/* ==================== ARCHIVE/SEARCH LIST ==================== */
.archive-header {
  margin-bottom: var(--space-xl);
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid var(--border-subtle);
}

.archive-title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
}

.archive-description {
  font-size: 1.125rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.posts-list {
  display: flex;
  flex-direction: column;
}

.post-row {
  padding: var(--space-lg) 0;
  border-bottom: 1px solid var(--border-subtle);
  transition: background 0.2s ease;
}

.post-row:first-child {
  padding-top: 0;
}

.post-row:hover {
  background: var(--bg-secondary);
  margin-left: calc(-1 * var(--space-md));
  margin-right: calc(-1 * var(--space-md));
  padding-left: var(--space-md);
  padding-right: var(--space-md);
  border-radius: 8px;
}

.post-row-title {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 500;
  line-height: 1.35;
  color: var(--text-primary);
  margin-bottom: var(--space-xs);
}

.post-row-title a {
  transition: color 0.2s ease;
}

.post-row-title a:hover {
  color: var(--accent-gold);
}

.post-row-meta {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.post-row-meta span {
  color: var(--text-secondary);
}

/* Pagination */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  margin-top: var(--space-xl);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--border-subtle);
}

.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 var(--space-sm);
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-secondary);
  border: 1px solid var(--border-medium);
  border-radius: 8px;
  transition: all 0.2s ease;
}

.pagination a:hover {
  color: var(--text-primary);
  background: var(--bg-elevated);
  border-color: var(--accent-gold);
}

.pagination .current {
  color: var(--bg-primary);
  background: var(--accent-gold-gradient);
  border-color: transparent;
  font-weight: 600;
}

.pagination .dots {
  background: transparent;
  border: none;
  color: var(--text-muted);
}

/* ==================== SINGLE POST ==================== */
.single-header {
  margin-bottom: var(--space-xl);
  text-align: center;
}

.single-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
  flex-wrap: wrap;
}

.single-category {
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--accent-red-subtle-bg);
  color: var(--accent-gold);
  padding: 0.25rem 0.75rem;
  border-radius: 100px;
  border: 1px solid rgba(255, 0, 0, 0.2);
}

.single-category a {
  color: inherit;
}

.single-date {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.single-author {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.single-author a {
  color: var(--accent-gold);
}

.single-title {
  font-family: var(--font-serif);
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: var(--space-lg);
}

.single-featured-image {
  margin-bottom: var(--space-xl);
  border-radius: 16px;
  overflow: hidden;
  background: var(--bg-secondary);
}

.single-featured-image img {
  width: 100%;
  height: auto;
}

/* Post Content */
.post-content {
  font-family: var(--font-serif);
  font-size: 1.125rem;
  line-height: 1.8;
  color: var(--text-secondary);
}

.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4,
.post-content h5,
.post-content h6 {
  font-family: var(--font-serif);
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
  margin-top: var(--space-xl);
  margin-bottom: var(--space-md);
}

.post-content h2 {
  font-size: 1.75rem;
}

.post-content h3 {
  font-size: 1.5rem;
}

.post-content h4 {
  font-size: 1.25rem;
}

.post-content p {
  margin-bottom: var(--space-md);
}

.post-content a {
  color: var(--accent-gold);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: opacity 0.2s ease;
}

.post-content a:hover {
  opacity: 0.8;
}

.post-content ul,
.post-content ol {
  margin-bottom: var(--space-md);
  padding-left: var(--space-lg);
}

.post-content li {
  margin-bottom: var(--space-xs);
}

.post-content blockquote {
  margin: var(--space-lg) 0;
  padding: var(--space-md) var(--space-lg);
  border-left: 4px solid var(--accent-gold);
  background: var(--bg-secondary);
  border-radius: 0 8px 8px 0;
  font-style: italic;
}

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

.post-content pre {
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-wrap: break-word;
    background: rgba(0, 0, 0, 0.3);
    padding: 1rem 1.25rem;
    border-radius: 3px;
    border-left: 3px solid var(--accent-gold);
    margin: 1.5rem 0;
    font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-primary);
}

.post-content code {
  font-family: 'SF Mono', Monaco, 'Courier New', monospace;
  font-size: 0.875em;
  background: var(--bg-secondary);
  padding: 0.125rem 0.375rem;
  border-radius: 4px;
}

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

.post-content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: var(--space-lg) 0;
}

.post-content figure {
  margin: var(--space-lg) 0;
}

.post-content figcaption {
  margin-top: var(--space-xs);
  font-family: var(--font-sans);
  font-size: 0.875rem;
  color: var(--text-muted);
  text-align: center;
}

.post-content hr {
  margin: var(--space-xl) 0;
  border: none;
  border-top: 1px solid var(--border-subtle);
}

.post-content table {
  width: 100%;
  margin: var(--space-lg) 0;
  border-collapse: collapse;
}

.post-content th,
.post-content td {
  padding: var(--space-sm);
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
}

.post-content th {
  font-family: var(--font-sans);
  font-weight: 600;
  color: var(--text-primary);
  background: var(--bg-secondary);
}

/* Article Footer Widget Area */
.article-footer-widget {
  margin-top: var(--space-xl);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--border-subtle);
}

/* Social Sharing */
.social-sharing {
  margin-top: var(--space-xl);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--border-subtle);
}

.social-sharing-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-sm);
}

.social-sharing-buttons {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

.share-button {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
  background: var(--bg-secondary);
  border: 1px solid var(--border-medium);
  border-radius: 100px;
  transition: all 0.2s ease;
  cursor: pointer;
  text-decoration: none;
}

.share-button:hover {
  background: var(--bg-elevated);
  border-color: var(--accent-gold);
  color: var(--accent-gold);
}

.share-button svg {
  width: 16px;
  height: 16px;
}

/* Post Navigation */
.post-navigation {
  margin-top: var(--space-xl);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--border-subtle);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
}

.post-navigation .nav-previous,
.post-navigation .nav-next {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.post-navigation .nav-next {
  text-align: right;
}

.post-navigation .nav-label {
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.post-navigation .nav-title {
  font-family: var(--font-serif);
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--text-primary);
  transition: color 0.2s ease;
}

.post-navigation a:hover .nav-title {
  color: var(--accent-gold);
}

/* Related Posts */
.related-posts {
  margin-top: var(--space-2xl);
  padding-top: var(--space-xl);
  border-top: 1px solid var(--border-subtle);
}

.related-posts-title {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-lg);
  position: relative;
  padding-left: var(--space-md);
}

.related-posts-title::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 80%;
  border-radius: 2px;
  background: var(--accent-gold-gradient);
}

.related-posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}

.related-post-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.related-post-image {
  aspect-ratio: 16/9;
  border-radius: 12px;
  background: var(--bg-secondary);
  overflow: hidden;
  margin-bottom: var(--space-xs);
}

.related-post-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.related-post-card:hover .related-post-image img {
  transform: scale(1.05);
}

.related-post-date {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.related-post-title {
  font-family: var(--font-serif);
  font-size: 1.125rem;
  font-weight: 500;
  line-height: 1.35;
  color: var(--text-primary);
  transition: color 0.2s ease;
}

.related-post-card:hover .related-post-title {
  color: var(--accent-gold);
}

/* ==================== 404 PAGE ==================== */
.error-404 {
  text-align: center;
  padding: var(--space-2xl) 0;
}

.error-404-code {
  font-family: var(--font-serif);
  font-size: clamp(6rem, 15vw, 12rem);
  font-weight: 700;
  color: var(--accent-red);
  opacity: 0.3;
  line-height: 1;
  margin-bottom: var(--space-md);
}

.error-404-title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-md);
}

.error-404-message {
  font-size: 1.125rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-xl);
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.error-404 .search-form {
  max-width: 400px;
  margin: 0 auto var(--space-lg);
}

.error-404-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
  transition: color 0.2s ease;
}

.error-404-link:hover {
  color: var(--accent-gold);
}

/* ==================== FOOTER ==================== */
.footer-widgets {
  border-top: 1px solid var(--border-subtle);
  padding: var(--space-xl) 0;
}

.footer-widgets-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.footer-widgets .widget {
  margin-bottom: var(--space-lg);
}

.footer-widgets .widget:last-child {
  margin-bottom: 0;
}

.footer-widgets .widget-title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-md);
}

.footer {
  border-top: 1px solid var(--border-subtle);
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--space-xl) var(--space-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-text {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  gap: var(--space-md);
}

.footer-menu {
  display: flex;
  gap: var(--space-md);
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-menu a {
  font-size: 0.875rem;
  color: var(--text-muted);
  transition: color 0.2s ease;
}

.footer-menu a:hover {
  color: var(--text-primary);
}

/* ==================== WIDGETS ==================== */
.widget {
  margin-bottom: var(--space-lg);
}

.widget-title {
  font-family: var(--font-serif);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
}

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

.widget li {
  margin-bottom: var(--space-xs);
}

.widget a {
  color: var(--text-secondary);
  transition: color 0.2s ease;
}

.widget a:hover {
  color: var(--accent-gold);
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 1024px) {
  .hero-content {
    grid-template-columns: 1fr;
  }
  
  .hero-image {
    order: -1;
    aspect-ratio: 16/9;
  }
  
  .posts-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .related-posts-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .header-inner {
    grid-template-columns: 1fr auto;
    gap: var(--space-sm);
  }
  
  .search-container {
    display: none;
  }
  
  .menu-toggle {
    display: block;
  }
  
  .nav {
    position: fixed;
    top: 73px;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-primary);
    padding: var(--space-lg);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 99;
  }
  
  .nav.is-active {
    transform: translateX(0);
  }
  
  .nav-menu {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }
  
  .nav-menu li {
    border-bottom: 1px solid var(--border-subtle);
  }
  
  .nav-menu a {
    padding: var(--space-md) 0;
    font-size: 1.125rem;
  }
  
  .nav-menu a::after {
    display: none;
  }
  
  .nav-menu li:last-child a {
    display: block;
    text-align: center;
    margin-top: var(--space-md);
    border-radius: 100px;
  }
  
  .main {
    padding: var(--space-lg) var(--space-sm);
  }
  
  .posts-grid {
    grid-template-columns: 1fr;
  }
  
  .related-posts-grid {
    grid-template-columns: 1fr;
  }
  
  .post-navigation {
    grid-template-columns: 1fr;
  }
  
  .post-navigation .nav-next {
    text-align: left;
  }
  
  .footer-inner {
    flex-direction: column;
    gap: var(--space-md);
    text-align: center;
  }
  
  .footer-menu {
    flex-wrap: wrap;
    justify-content: center;
  }
}

/* ==================== SCREEN READER TEXT ==================== */
.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;
}

.screen-reader-text:focus {
  background-color: var(--bg-elevated);
  clip: auto !important;
  clip-path: none;
  color: var(--text-primary);
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  height: auto;
  left: 5px;
  line-height: normal;
  padding: 15px 23px 14px;
  text-decoration: none;
  top: 5px;
  width: auto;
  z-index: 100000;
}

/* ==========================================================================
   Base Callout Styles
   ========================================================================== */

.callout {
    position: relative;
    margin: 2rem 0;
    padding: 1.25rem 1.5rem 1.25rem 4rem;
    border-radius: 3px;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-primary, #e8e4df);
}

.callout::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    border-radius: 3px 0 0 3px;
}

.callout-icon {
    position: absolute;
    left: 1.25rem;
    top: 1.25rem;
    width: 24px;
    height: 24px;
}

.callout-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.callout p {
    margin: 0;
}

.callout p + p {
    margin-top: 0.75rem;
}

/* ==========================================================================
   TRAP - Pitfalls and Ambiguities
   Color: Red (#ff0000)
   ========================================================================== */

.callout-trap {
    background: rgba(255, 0, 0, 0.06);
    border: 1px solid rgba(255, 0, 0, 0.15);
    border-left: none;
}

.callout-trap::before {
    background: linear-gradient(
        to bottom,
        #ff3333 0%,
        #ff0000 50%,
        #cc0000 100%
    );
}

.callout-trap .callout-icon {
    color: #ff0000;
}

.callout-trap .callout-label {
    color: #ff4444;
}

/* ==========================================================================
   TECHNIQUE - Actionable Approaches
   Color: Gold (#ffbf00)
   ========================================================================== */

.callout-technique {
    background: rgba(255, 191, 0, 0.06);
    border: 1px solid rgba(255, 191, 0, 0.15);
    border-left: none;
}

.callout-technique::before {
    background: linear-gradient(
        to bottom,
        #ffcc33 0%,
        #ffbf00 50%,
        #cc9900 100%
    );
}

.callout-technique .callout-icon {
    color: #ffbf00;
}

.callout-technique .callout-label {
    color: #ffbf00;
}

/* ==========================================================================
   BOUNDARY - Claude's Capabilities and Defaults
   Color: Electric Blue (#0040ff)
   ========================================================================== */

.callout-boundary {
    background: rgba(0, 64, 255, 0.06);
    border: 1px solid rgba(0, 64, 255, 0.15);
    border-left: none;
}

.callout-boundary::before {
    background: linear-gradient(
        to bottom,
        #3366ff 0%,
        #0040ff 50%,
        #0033cc 100%
    );
}

.callout-boundary .callout-icon {
    color: #0040ff;
}

.callout-boundary .callout-label {
    color: #4477ff;
}

/* ==========================================================================
   INSIGHT - Key Takeaways
   Color: Kelly Green (#00ff40)
   ========================================================================== */

.callout-insight {
    background: rgba(0, 255, 64, 0.06);
    border: 1px solid rgba(0, 255, 64, 0.15);
    border-left: none;
}

.callout-insight::before {
    background: linear-gradient(
        to bottom,
        #33ff66 0%,
        #00ff40 50%,
        #00cc33 100%
    );
}

.callout-insight .callout-icon {
    color: #00ff40;
}

.callout-insight .callout-label {
    color: #33ff66;
}

/* ==========================================================================
   Responsive Adjustments
   ========================================================================== */

@media (max-width: 600px) {
    .callout {
        padding: 1rem 1rem 1rem 3.25rem;
    }
    
    .callout-icon {
        left: 0.875rem;
        top: 1rem;
        width: 20px;
        height: 20px;
    }
}

/* ==========================================================================
   Light Mode Adjustments (if needed for preview contexts)
   ========================================================================== */

@media (prefers-color-scheme: light) {
    .callout {
        color: #333333;
    }
    
    .callout-trap {
        background: rgba(255, 0, 0, 0.08);
        border-color: rgba(255, 0, 0, 0.2);
    }
    
    .callout-technique {
        background: rgba(255, 191, 0, 0.1);
        border-color: rgba(255, 191, 0, 0.25);
    }
    
    .callout-boundary {
        background: rgba(0, 64, 255, 0.08);
        border-color: rgba(0, 64, 255, 0.2);
    }
    
    .callout-insight {
        background: rgba(0, 255, 64, 0.08);
        border-color: rgba(0, 255, 64, 0.2);
    }
    
    .callout-trap .callout-label { color: #cc0000; }
    .callout-technique .callout-label { color: #996600; }
    .callout-boundary .callout-label { color: #0033cc; }
    .callout-insight .callout-label { color: #00aa2a; }
}