/*
Theme Name: Harrypedia
Theme URI: https://harrypedia.com
Author: Harrypedia Team
Author URI: https://harrypedia.com
Description: Custom theme for Harrypedia — the internet culture encyclopedia. Clean, authoritative, and meme-native. Built for speed, readability, and SEO.
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: harrypedia
Tags: blog, one-column, custom-menu, featured-images, sticky-post, translation-ready, accessibility-ready
*/


/* ===========================================
   Harrypedia Custom Theme Styles
   Brand Kit: v1.0
   Last Updated: 2026-03-03
   =========================================== */


/* -------------------------------------------
   1. CSS Custom Properties (Design Tokens)
   ------------------------------------------- */

:root {
  /* Colors — Core */
  --hp-primary: #6C3CE1;
  --hp-primary-dark: #5229B8;
  --hp-primary-light: #F0EBFD;
  --hp-secondary: #FF6B6B;
  --hp-secondary-dark: #E04E4E;
  --hp-accent: #00D4AA;
  --hp-bg: #FAFAF8;
  --hp-surface: #FFFFFF;
  --hp-surface-alt: #F3F2EF;
  --hp-border: #E5E3DF;
  --hp-text: #1A1A1A;
  --hp-text-secondary: #6B6B6B;
  --hp-text-tertiary: #9B9B9B;

  /* Colors — Semantic */
  --hp-success: #00D4AA;
  --hp-error: #E04E4E;
  --hp-warning: #F5A623;
  --hp-info: #6C3CE1;

  /* Colors — Special */
  --hp-code-bg: #F3F2EF;
  --hp-code-text: #D63384;
  --hp-code-block-bg: #1A1A1A;
  --hp-code-block-text: #E8E8E8;
  --hp-badge-trending-bg: #FF6B6B;
  --hp-badge-trending-text: #FFFFFF;
  --hp-badge-category-bg: #F0EBFD;
  --hp-badge-category-text: #6C3CE1;
  --hp-footer-bg: #1A1A1A;
  --hp-footer-text: #E8E8E8;
  --hp-footer-link: #9B7AEF;

  /* Typography */
  --hp-font-heading: 'Space Grotesk', system-ui, -apple-system, sans-serif;
  --hp-font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --hp-font-mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;
  --hp-font-size-base: 17px;
  --hp-line-height-body: 1.7;
  --hp-line-height-heading: 1.15;

  /* Type Scale (1.25 — Major Third) */
  --hp-text-xs: 0.75rem;    /* ~13px */
  --hp-text-sm: 0.875rem;   /* ~15px */
  --hp-text-base: 1rem;     /* 17px */
  --hp-text-lg: 1.125rem;   /* ~19px */
  --hp-text-xl: 1.25rem;    /* ~21px */
  --hp-text-2xl: 1.563rem;  /* ~27px */
  --hp-text-3xl: 1.953rem;  /* ~33px */
  --hp-text-4xl: 2.441rem;  /* ~41px */

  /* Spacing (8px base) */
  --hp-space-xs: 4px;
  --hp-space-sm: 8px;
  --hp-space-md: 16px;
  --hp-space-lg: 24px;
  --hp-space-xl: 32px;
  --hp-space-2xl: 48px;
  --hp-space-3xl: 64px;

  /* Layout */
  --hp-content-width: 740px;
  --hp-container-width: 1200px;
  --hp-content-padding: 20px;

  /* Visual */
  --hp-radius-sm: 4px;
  --hp-radius-md: 8px;
  --hp-radius-lg: 12px;
  --hp-radius-full: 50%;
  --hp-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --hp-shadow-md: 0 2px 8px rgba(0, 0, 0, 0.08);
  --hp-shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.10);
  --hp-shadow-xl: 0 8px 32px rgba(0, 0, 0, 0.12);

  /* Transitions */
  --hp-transition-fast: 150ms ease;
  --hp-transition-normal: 200ms ease;
  --hp-transition-slow: 300ms ease;
}


/* -------------------------------------------
   2. Reset & Base
   ------------------------------------------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: var(--hp-font-size-base);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--hp-font-body);
  font-size: 1rem;
  line-height: var(--hp-line-height-body);
  color: var(--hp-text);
  background-color: var(--hp-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

figure {
  margin: 0;
}


/* -------------------------------------------
   3. Typography
   ------------------------------------------- */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--hp-font-heading);
  line-height: var(--hp-line-height-heading);
  color: var(--hp-text);
  margin-top: 0;
}

h1 {
  font-size: var(--hp-text-4xl);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: var(--hp-space-lg);
}

h2 {
  font-size: var(--hp-text-3xl);
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.2;
  margin-bottom: var(--hp-space-md);
  margin-top: var(--hp-space-2xl);
}

h3 {
  font-size: var(--hp-text-2xl);
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.25;
  margin-bottom: var(--hp-space-md);
  margin-top: var(--hp-space-xl);
}

h4 {
  font-size: var(--hp-text-xl);
  font-weight: 500;
  line-height: 1.3;
  margin-bottom: var(--hp-space-sm);
  margin-top: var(--hp-space-lg);
}

h5, h6 {
  font-size: var(--hp-text-lg);
  font-weight: 500;
  line-height: 1.3;
  margin-bottom: var(--hp-space-sm);
  margin-top: var(--hp-space-lg);
}

p {
  margin-top: 0;
  margin-bottom: 1.5rem;
}

/* Lead / intro paragraph */
.entry-content > p:first-of-type {
  font-size: var(--hp-text-lg);
  color: var(--hp-text);
  line-height: 1.65;
}

ul, ol {
  margin-top: 0;
  margin-bottom: 1.5rem;
  padding-left: 1.5em;
}

li {
  margin-bottom: 0.5em;
}


/* -------------------------------------------
   4. Links
   ------------------------------------------- */

a {
  color: var(--hp-primary);
  text-decoration: underline;
  text-decoration-color: rgba(108, 60, 225, 0.3);
  text-underline-offset: 3px;
  transition: color var(--hp-transition-fast),
              text-decoration-color var(--hp-transition-fast);
}

a:hover {
  color: var(--hp-primary-dark);
  text-decoration-color: var(--hp-primary-dark);
}

a:focus-visible {
  outline: 3px solid rgba(108, 60, 225, 0.4);
  outline-offset: 2px;
  border-radius: 2px;
}


/* -------------------------------------------
   5. Buttons
   ------------------------------------------- */

.wp-block-button__link,
.button,
button[type="submit"] {
  font-family: var(--hp-font-body);
  font-size: var(--hp-text-sm);
  font-weight: 600;
  letter-spacing: 0.03em;
  padding: 12px 24px;
  border-radius: var(--hp-radius-md);
  border: none;
  cursor: pointer;
  transition: background-color var(--hp-transition-fast),
              box-shadow var(--hp-transition-fast),
              transform var(--hp-transition-fast);
  text-decoration: none;
  display: inline-block;
  line-height: 1;
}

/* Primary button */
.wp-block-button__link,
.button-primary,
button[type="submit"] {
  background-color: var(--hp-primary);
  color: #FFFFFF;
}

.wp-block-button__link:hover,
.button-primary:hover,
button[type="submit"]:hover {
  background-color: var(--hp-primary-dark);
  box-shadow: var(--hp-shadow-md);
  color: #FFFFFF;
  text-decoration: none;
}

.wp-block-button__link:focus-visible,
.button-primary:focus-visible,
button[type="submit"]:focus-visible {
  outline: 3px solid rgba(108, 60, 225, 0.4);
  outline-offset: 2px;
}

/* Secondary / outline button */
.button-secondary,
.wp-block-button.is-style-outline .wp-block-button__link {
  background-color: transparent;
  color: var(--hp-primary);
  border: 2px solid var(--hp-primary);
}

.button-secondary:hover,
.wp-block-button.is-style-outline .wp-block-button__link:hover {
  background-color: var(--hp-primary);
  color: #FFFFFF;
}


/* -------------------------------------------
   6. Layout Containers
   ------------------------------------------- */

.site {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.site-main {
  flex: 1;
}

.container {
  width: 100%;
  max-width: var(--hp-container-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--hp-content-padding);
  padding-right: var(--hp-content-padding);
}

.content-width {
  max-width: var(--hp-content-width);
  margin-left: auto;
  margin-right: auto;
}


/* -------------------------------------------
   7. Site Header
   ------------------------------------------- */

.site-header {
  background-color: var(--hp-surface);
  border-bottom: 1px solid var(--hp-border);
  position: sticky;
  top: 0;
  z-index: 100;
  transition: box-shadow var(--hp-transition-normal);
}

.site-header.scrolled {
  box-shadow: var(--hp-shadow-md);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

/* Site branding — logo text treatment */
.site-branding {
  flex-shrink: 0;
}

.site-branding a {
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: var(--hp-space-sm);
}

.site-title {
  font-family: var(--hp-font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
  line-height: 1;
}

.site-title a {
  text-decoration: none;
  color: var(--hp-text);
}

/* Two-tone logo text: "Harry" dark, "pedia" violet */
.logo-harry {
  color: var(--hp-text);
}

.logo-pedia {
  color: var(--hp-primary);
}

.site-description {
  display: none; /* Hidden visually, still in markup for SEO */
}

/* Custom logo image */
.custom-logo-link {
  display: flex;
  align-items: center;
}

.custom-logo {
  max-height: 40px;
  width: auto;
}


/* -------------------------------------------
   8. Navigation
   ------------------------------------------- */

.main-navigation {
  display: none; /* Hidden on mobile by default */
}

.main-navigation ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: var(--hp-space-xs);
}

.main-navigation li {
  margin: 0;
}

.main-navigation a {
  font-family: var(--hp-font-body);
  font-size: var(--hp-text-sm);
  font-weight: 500;
  color: var(--hp-text);
  text-decoration: none;
  padding: var(--hp-space-sm) var(--hp-space-md);
  border-radius: var(--hp-radius-sm);
  transition: color var(--hp-transition-fast),
              background-color var(--hp-transition-fast);
}

.main-navigation a:hover,
.main-navigation .current-menu-item > a,
.main-navigation .current_page_item > a {
  color: var(--hp-primary);
  background-color: var(--hp-primary-light);
}

/* Mobile menu toggle */
.menu-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  color: var(--hp-text);
  border-radius: var(--hp-radius-sm);
}

.menu-toggle:hover {
  background-color: var(--hp-surface-alt);
}

.menu-toggle:focus-visible {
  outline: 3px solid rgba(108, 60, 225, 0.4);
  outline-offset: 2px;
}

.menu-toggle svg {
  width: 24px;
  height: 24px;
}

/* Mobile nav open state */
.main-navigation.toggled {
  display: block;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background-color: var(--hp-surface);
  border-bottom: 1px solid var(--hp-border);
  box-shadow: var(--hp-shadow-lg);
  padding: var(--hp-space-md);
  z-index: 99;
}

.main-navigation.toggled ul {
  flex-direction: column;
  gap: 0;
}

.main-navigation.toggled a {
  display: block;
  padding: var(--hp-space-md);
  font-size: var(--hp-text-base);
}

/* Desktop: show nav, hide toggle */
@media (min-width: 768px) {
  .main-navigation {
    display: block;
  }

  .menu-toggle {
    display: none;
  }
}


/* -------------------------------------------
   9. Post Cards (Index & Archive)
   ------------------------------------------- */

.posts-grid {
  display: grid;
  gap: var(--hp-space-xl);
  padding-top: var(--hp-space-2xl);
  padding-bottom: var(--hp-space-3xl);
}

/* Single column on mobile, two on tablet+ */
@media (min-width: 768px) {
  .posts-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Featured (first) post spans full width */
@media (min-width: 768px) {
  .posts-grid .post-card:first-child {
    grid-column: 1 / -1;
  }

  .posts-grid .post-card:first-child .post-card__image {
    max-height: 400px;
  }
}

.post-card {
  background-color: var(--hp-surface);
  border: 1px solid var(--hp-border);
  border-radius: var(--hp-radius-lg);
  box-shadow: var(--hp-shadow-sm);
  overflow: hidden;
  transition: box-shadow var(--hp-transition-normal),
              transform var(--hp-transition-normal);
  display: flex;
  flex-direction: column;
}

@media (prefers-reduced-motion: no-preference) {
  .post-card:hover {
    box-shadow: var(--hp-shadow-lg);
    transform: translateY(-2px);
  }
}

.post-card a {
  text-decoration: none;
  color: inherit;
}

.post-card__image {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
}

.post-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* No-thumbnail placeholder */
.post-card__image--placeholder {
  background: linear-gradient(135deg, var(--hp-primary-light) 0%, var(--hp-surface-alt) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.post-card__image--placeholder svg {
  width: 48px;
  height: 48px;
  color: var(--hp-primary);
  opacity: 0.4;
}

.post-card__badges {
  position: absolute;
  top: var(--hp-space-md);
  left: var(--hp-space-md);
  display: flex;
  gap: var(--hp-space-xs);
  flex-wrap: wrap;
}

.post-card__body {
  padding: var(--hp-space-lg);
  display: flex;
  flex-direction: column;
  flex: 1;
}

.post-card__title {
  font-family: var(--hp-font-heading);
  font-size: var(--hp-text-xl);
  font-weight: 700;
  line-height: 1.25;
  margin: 0 0 var(--hp-space-sm) 0;
  color: var(--hp-text);
}

.post-card__title a:hover {
  color: var(--hp-primary);
}

.post-card__excerpt {
  font-size: var(--hp-text-sm);
  color: var(--hp-text-secondary);
  line-height: 1.6;
  margin: 0 0 var(--hp-space-md) 0;
  flex: 1;

  /* Clamp to 3 lines */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card__meta {
  font-size: var(--hp-text-xs);
  color: var(--hp-text-tertiary);
  display: flex;
  align-items: center;
  gap: var(--hp-space-sm);
  margin-top: auto;
}

.post-card__meta-separator {
  width: 3px;
  height: 3px;
  background-color: var(--hp-text-tertiary);
  border-radius: var(--hp-radius-full);
  display: inline-block;
}

/* Featured first card gets larger title */
@media (min-width: 768px) {
  .posts-grid .post-card:first-child .post-card__title {
    font-size: var(--hp-text-2xl);
  }

  .posts-grid .post-card:first-child .post-card__excerpt {
    font-size: var(--hp-text-base);
    -webkit-line-clamp: 4;
  }
}


/* -------------------------------------------
   10. Badges & Tags
   ------------------------------------------- */

.badge-trending {
  display: inline-block;
  background-color: var(--hp-badge-trending-bg);
  color: var(--hp-badge-trending-text);
  font-family: var(--hp-font-body);
  font-size: var(--hp-text-xs);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: var(--hp-radius-sm);
  line-height: 1;
  text-decoration: none;
}

.badge-category,
.cat-links a {
  display: inline-block;
  background-color: var(--hp-badge-category-bg);
  color: var(--hp-badge-category-text);
  font-family: var(--hp-font-body);
  font-size: var(--hp-text-xs);
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 4px 10px;
  border-radius: var(--hp-radius-sm);
  line-height: 1;
  text-decoration: none;
}

.badge-category:hover,
.cat-links a:hover {
  background-color: var(--hp-primary);
  color: #FFFFFF;
  text-decoration: none;
}

/* Tag pills (used in single post footer) */
.tag-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--hp-space-sm);
}

.tag-links a {
  display: inline-block;
  font-size: var(--hp-text-xs);
  font-weight: 500;
  color: var(--hp-text-secondary);
  background-color: var(--hp-surface-alt);
  padding: 4px 12px;
  border-radius: var(--hp-radius-sm);
  text-decoration: none;
  transition: color var(--hp-transition-fast),
              background-color var(--hp-transition-fast);
}

.tag-links a:hover {
  color: var(--hp-primary);
  background-color: var(--hp-primary-light);
}


/* -------------------------------------------
   11. Single Post
   ------------------------------------------- */

.single-post-header {
  padding-top: var(--hp-space-2xl);
  padding-bottom: var(--hp-space-xl);
  text-align: left;
}

.single-post-badges {
  display: flex;
  flex-wrap: wrap;
  gap: var(--hp-space-sm);
  margin-bottom: var(--hp-space-md);
}

.single-post-title {
  font-size: var(--hp-text-3xl);
  margin-bottom: var(--hp-space-md);
}

@media (min-width: 768px) {
  .single-post-title {
    font-size: var(--hp-text-4xl);
  }
}

.single-post-meta {
  display: flex;
  align-items: center;
  gap: var(--hp-space-md);
  flex-wrap: wrap;
  font-size: var(--hp-text-sm);
  color: var(--hp-text-secondary);
}

.single-post-meta .meta-separator {
  width: 4px;
  height: 4px;
  background-color: var(--hp-text-tertiary);
  border-radius: var(--hp-radius-full);
  display: inline-block;
}

/* Featured image on single post */
.single-featured-image {
  margin-bottom: var(--hp-space-2xl);
  border-radius: var(--hp-radius-md);
  overflow: hidden;
}

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

/* Entry content — the main article body */
.entry-content {
  padding-bottom: var(--hp-space-2xl);
}

.entry-content > * {
  max-width: var(--hp-content-width);
  margin-left: auto;
  margin-right: auto;
}

/* Allow certain blocks to break out to full width */
.entry-content > .alignwide {
  max-width: calc(var(--hp-content-width) + 200px);
}

.entry-content > .alignfull {
  max-width: none;
  margin-left: calc(-1 * var(--hp-content-padding));
  margin-right: calc(-1 * var(--hp-content-padding));
}

/* Post footer — tags, share, etc. */
.single-post-footer {
  padding-top: var(--hp-space-xl);
  padding-bottom: var(--hp-space-xl);
  border-top: 1px solid var(--hp-border);
}

.single-post-footer .tag-links {
  margin-bottom: var(--hp-space-lg);
}


/* -------------------------------------------
   12. Author Bio
   ------------------------------------------- */

.author-bio {
  display: flex;
  gap: var(--hp-space-lg);
  padding: var(--hp-space-xl);
  background-color: var(--hp-surface-alt);
  border-radius: var(--hp-radius-lg);
  margin-top: var(--hp-space-xl);
  margin-bottom: var(--hp-space-xl);
}

.author-bio__avatar {
  flex-shrink: 0;
}

.author-bio__avatar img {
  width: 64px;
  height: 64px;
  border-radius: var(--hp-radius-full);
  object-fit: cover;
}

.author-bio__info {
  flex: 1;
  min-width: 0;
}

.author-bio__name {
  font-family: var(--hp-font-heading);
  font-size: var(--hp-text-lg);
  font-weight: 600;
  margin: 0 0 var(--hp-space-xs) 0;
  color: var(--hp-text);
}

.author-bio__name a {
  color: inherit;
  text-decoration: none;
}

.author-bio__name a:hover {
  color: var(--hp-primary);
}

.author-bio__description {
  font-size: var(--hp-text-sm);
  color: var(--hp-text-secondary);
  line-height: 1.6;
  margin: 0;
}

/* Stack on mobile */
@media (max-width: 480px) {
  .author-bio {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}


/* -------------------------------------------
   13. Related Posts
   ------------------------------------------- */

.related-posts {
  padding-top: var(--hp-space-2xl);
  padding-bottom: var(--hp-space-3xl);
}

.related-posts__heading {
  font-size: var(--hp-text-2xl);
  margin-bottom: var(--hp-space-lg);
}

.related-posts__grid {
  display: grid;
  gap: var(--hp-space-lg);
}

@media (min-width: 768px) {
  .related-posts__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.related-posts .post-card__title {
  font-size: var(--hp-text-lg);
}


/* -------------------------------------------
   14. Blockquotes
   ------------------------------------------- */

blockquote,
.wp-block-quote {
  border-left: 3px solid var(--hp-primary);
  background-color: var(--hp-surface-alt);
  padding: var(--hp-space-lg);
  border-radius: 0 var(--hp-radius-md) var(--hp-radius-md) 0;
  margin: var(--hp-space-xl) 0;
  font-style: italic;
}

blockquote p:last-child,
.wp-block-quote p:last-child {
  margin-bottom: 0;
}

blockquote cite,
.wp-block-quote cite {
  display: block;
  margin-top: var(--hp-space-sm);
  font-size: var(--hp-text-sm);
  color: var(--hp-text-secondary);
  font-style: normal;
}


/* -------------------------------------------
   15. Code
   ------------------------------------------- */

/* Inline code */
code,
kbd {
  font-family: var(--hp-font-mono);
  font-size: 0.9em;
  background-color: var(--hp-code-bg);
  color: var(--hp-code-text);
  padding: 2px 6px;
  border-radius: var(--hp-radius-sm);
}

/* Code blocks */
pre,
.wp-block-code {
  font-family: var(--hp-font-mono);
  font-size: var(--hp-text-sm);
  background-color: var(--hp-code-block-bg);
  color: var(--hp-code-block-text);
  padding: var(--hp-space-lg);
  border-radius: var(--hp-radius-md);
  overflow-x: auto;
  margin: var(--hp-space-xl) 0;
  line-height: 1.6;
}

pre code {
  background: none;
  color: inherit;
  padding: 0;
  border-radius: 0;
  font-size: inherit;
}


/* -------------------------------------------
   16. Tables
   ------------------------------------------- */

table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
  font-size: var(--hp-text-sm);
}

th {
  font-family: var(--hp-font-heading);
  font-weight: 600;
  text-align: left;
  padding: var(--hp-space-md);
  border-bottom: 2px solid var(--hp-border);
  background-color: var(--hp-surface-alt);
}

td {
  padding: var(--hp-space-md);
  border-bottom: 1px solid var(--hp-border);
}

tr:last-child td {
  border-bottom: none;
}


/* -------------------------------------------
   17. Images
   ------------------------------------------- */

.entry-content img,
.wp-block-image img {
  border-radius: var(--hp-radius-md);
  height: auto;
  max-width: 100%;
}

/* Screenshots and embeds with border */
.wp-block-image.is-style-framed img,
figure.screenshot img {
  border: 1px solid var(--hp-border);
  box-shadow: var(--hp-shadow-sm);
}

figcaption {
  font-size: var(--hp-text-sm);
  color: var(--hp-text-secondary);
  text-align: center;
  margin-top: var(--hp-space-sm);
}


/* -------------------------------------------
   18. Meta & Secondary Text
   ------------------------------------------- */

.entry-meta,
.post-meta,
.byline,
.posted-on {
  font-size: var(--hp-text-sm);
  color: var(--hp-text-secondary);
  line-height: 1.5;
}

.entry-meta a {
  color: var(--hp-text-secondary);
  text-decoration: none;
}

.entry-meta a:hover {
  color: var(--hp-primary);
}


/* -------------------------------------------
   19. Table of Contents (Easy TOC plugin)
   ------------------------------------------- */

#ez-toc-container {
  background-color: var(--hp-bg);
  border: 1px solid var(--hp-border);
  border-radius: var(--hp-radius-lg);
  padding: var(--hp-space-lg);
  margin-bottom: var(--hp-space-xl);
  font-family: var(--hp-font-body);
}

#ez-toc-container .ez-toc-title {
  font-family: var(--hp-font-heading);
  font-size: var(--hp-text-xl);
  font-weight: 500;
  color: var(--hp-text);
}

#ez-toc-container a {
  color: var(--hp-text-secondary);
  text-decoration: none;
  transition: color var(--hp-transition-fast);
}

#ez-toc-container a:hover {
  color: var(--hp-primary);
}


/* -------------------------------------------
   20. Pagination
   ------------------------------------------- */

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--hp-space-sm);
  padding: var(--hp-space-2xl) 0;
}

.pagination .nav-links {
  display: flex;
  gap: var(--hp-space-sm);
  align-items: center;
}

.pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 44px;
  padding: var(--hp-space-sm) var(--hp-space-md);
  font-size: var(--hp-text-sm);
  font-weight: 500;
  color: var(--hp-text);
  text-decoration: none;
  border-radius: var(--hp-radius-md);
  border: 1px solid var(--hp-border);
  background-color: var(--hp-surface);
  transition: color var(--hp-transition-fast),
              background-color var(--hp-transition-fast),
              border-color var(--hp-transition-fast);
}

.pagination .page-numbers:hover {
  color: var(--hp-primary);
  border-color: var(--hp-primary);
  background-color: var(--hp-primary-light);
}

.pagination .page-numbers.current {
  background-color: var(--hp-primary);
  color: #FFFFFF;
  border-color: var(--hp-primary);
}

.pagination .page-numbers.dots {
  border: none;
  background: none;
  min-width: auto;
  padding: 0;
  color: var(--hp-text-tertiary);
}


/* -------------------------------------------
   21. Archive & Category Headers
   ------------------------------------------- */

.archive-header {
  padding-top: var(--hp-space-2xl);
  padding-bottom: var(--hp-space-lg);
  border-bottom: 1px solid var(--hp-border);
  margin-bottom: var(--hp-space-xl);
}

.archive-title {
  font-size: var(--hp-text-3xl);
  margin-bottom: var(--hp-space-sm);
}

.archive-title .archive-label {
  font-size: var(--hp-text-lg);
  font-weight: 400;
  color: var(--hp-text-secondary);
  display: block;
  margin-bottom: var(--hp-space-xs);
}

.archive-description {
  font-size: var(--hp-text-lg);
  color: var(--hp-text-secondary);
  max-width: var(--hp-content-width);
}

.archive-description p {
  margin: 0;
}


/* -------------------------------------------
   22. Search
   ------------------------------------------- */

/* Search form */
.search-form {
  display: flex;
  gap: var(--hp-space-sm);
  max-width: 500px;
}

.search-form .search-field {
  flex: 1;
  font-family: var(--hp-font-body);
  font-size: var(--hp-text-base);
  padding: 12px var(--hp-space-md);
  border: 1px solid var(--hp-border);
  border-radius: var(--hp-radius-md);
  background-color: var(--hp-surface);
  color: var(--hp-text);
  transition: border-color var(--hp-transition-fast),
              box-shadow var(--hp-transition-fast);
}

.search-form .search-field:focus {
  outline: none;
  border-color: var(--hp-primary);
  box-shadow: 0 0 0 3px rgba(108, 60, 225, 0.15);
}

.search-form .search-submit {
  white-space: nowrap;
}

/* Search results page */
.search-header {
  padding-top: var(--hp-space-2xl);
  padding-bottom: var(--hp-space-lg);
}

.search-header .search-title {
  font-size: var(--hp-text-3xl);
  margin-bottom: var(--hp-space-lg);
}

.search-header .search-query {
  color: var(--hp-primary);
}

/* Search result items */
.search-result {
  padding: var(--hp-space-xl) 0;
  border-bottom: 1px solid var(--hp-border);
}

.search-result:last-child {
  border-bottom: none;
}

.search-result__title {
  font-size: var(--hp-text-xl);
  margin-bottom: var(--hp-space-sm);
}

.search-result__title a {
  color: var(--hp-text);
  text-decoration: none;
}

.search-result__title a:hover {
  color: var(--hp-primary);
}

.search-result__excerpt {
  font-size: var(--hp-text-sm);
  color: var(--hp-text-secondary);
  margin: 0;
}

.search-result__meta {
  font-size: var(--hp-text-xs);
  color: var(--hp-text-tertiary);
  margin-top: var(--hp-space-sm);
}

/* No results */
.no-results {
  text-align: center;
  padding: var(--hp-space-3xl) var(--hp-content-padding);
}

.no-results__title {
  font-size: var(--hp-text-3xl);
  margin-bottom: var(--hp-space-md);
}

.no-results__message {
  font-size: var(--hp-text-lg);
  color: var(--hp-text-secondary);
  margin-bottom: var(--hp-space-xl);
}

.no-results .search-form {
  margin: 0 auto;
}


/* -------------------------------------------
   23. 404 Page
   ------------------------------------------- */

.error-404 {
  text-align: center;
  padding: var(--hp-space-3xl) var(--hp-content-padding);
}

.error-404__code {
  font-family: var(--hp-font-heading);
  font-size: 8rem;
  font-weight: 700;
  color: var(--hp-primary-light);
  line-height: 1;
  margin-bottom: var(--hp-space-md);
}

.error-404__title {
  font-size: var(--hp-text-3xl);
  margin-bottom: var(--hp-space-md);
}

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

.error-404 .search-form {
  margin: 0 auto var(--hp-space-xl);
}

.error-404__home-link {
  display: inline-block;
  font-weight: 600;
}


/* -------------------------------------------
   24. Page Template
   ------------------------------------------- */

.page-header {
  padding-top: var(--hp-space-2xl);
  padding-bottom: var(--hp-space-xl);
}

.page-title {
  font-size: var(--hp-text-4xl);
  margin-bottom: 0;
}

.page-content {
  padding-bottom: var(--hp-space-3xl);
}

.page-content > * {
  max-width: var(--hp-content-width);
  margin-left: auto;
  margin-right: auto;
}


/* -------------------------------------------
   25. Footer
   ------------------------------------------- */

.site-footer {
  background-color: var(--hp-footer-bg);
  color: var(--hp-footer-text);
  padding: var(--hp-space-3xl) var(--hp-content-padding);
}

.footer-inner {
  max-width: var(--hp-container-width);
  margin: 0 auto;
}

.footer-top {
  display: flex;
  flex-direction: column;
  gap: var(--hp-space-xl);
  padding-bottom: var(--hp-space-2xl);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: var(--hp-space-xl);
}

@media (min-width: 768px) {
  .footer-top {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
  }
}

.footer-brand {
  max-width: 320px;
}

.footer-brand .site-title {
  font-size: 1.25rem;
  margin-bottom: var(--hp-space-sm);
}

.footer-brand .site-title .logo-harry {
  color: var(--hp-footer-text);
}

.footer-brand .site-title .logo-pedia {
  color: var(--hp-footer-link);
}

.footer-tagline {
  font-size: var(--hp-text-sm);
  color: var(--hp-text-tertiary);
  line-height: 1.6;
  margin: 0;
}

.footer-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--hp-space-md) var(--hp-space-xl);
}

.footer-nav a {
  font-size: var(--hp-text-sm);
  color: var(--hp-footer-link);
  text-decoration: none;
  transition: color var(--hp-transition-fast);
}

.footer-nav a:hover {
  color: #FFFFFF;
  text-decoration: underline;
}

.footer-bottom {
  display: flex;
  flex-direction: column;
  gap: var(--hp-space-sm);
  align-items: center;
  text-align: center;
}

@media (min-width: 768px) {
  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

.site-info {
  font-size: var(--hp-text-sm);
  color: var(--hp-text-tertiary);
  margin: 0;
}

.back-to-top {
  font-size: var(--hp-text-sm);
  color: var(--hp-footer-link);
  text-decoration: none;
}

.back-to-top:hover {
  color: #FFFFFF;
}


/* -------------------------------------------
   26. Utility Classes
   ------------------------------------------- */

.text-primary { color: var(--hp-primary); }
.text-secondary-color { color: var(--hp-secondary); }
.text-muted { color: var(--hp-text-secondary); }
.bg-surface { background-color: var(--hp-surface); }
.bg-surface-alt { background-color: var(--hp-surface-alt); }

.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(--hp-surface);
  border-radius: var(--hp-radius-sm);
  box-shadow: var(--hp-shadow-md);
  clip: auto !important;
  clip-path: none;
  color: var(--hp-primary);
  display: block;
  font-size: var(--hp-text-sm);
  font-weight: 600;
  height: auto;
  left: var(--hp-space-sm);
  line-height: normal;
  padding: var(--hp-space-md) var(--hp-space-lg);
  text-decoration: none;
  top: var(--hp-space-sm);
  width: auto;
  z-index: 100000;
}


/* -------------------------------------------
   27. Skip Link (Accessibility)
   ------------------------------------------- */

.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  background-color: var(--hp-primary);
  color: #FFFFFF;
  padding: var(--hp-space-sm) var(--hp-space-md);
  z-index: 1000;
  font-family: var(--hp-font-body);
  font-size: var(--hp-text-sm);
  font-weight: 600;
  text-decoration: none;
  border-radius: 0 0 var(--hp-radius-md) 0;
}

.skip-link:focus {
  top: 0;
  color: #FFFFFF;
}


/* -------------------------------------------
   28. WordPress Block Editor Overrides
   ------------------------------------------- */

/* Separator */
.wp-block-separator {
  border: none;
  border-top: 1px solid var(--hp-border);
  margin: var(--hp-space-2xl) auto;
  max-width: 100px;
}

.wp-block-separator.is-style-wide {
  max-width: 100%;
}

/* Columns */
.wp-block-columns {
  gap: var(--hp-space-xl);
}

/* Cover block */
.wp-block-cover {
  border-radius: var(--hp-radius-md);
  overflow: hidden;
}

/* Group block */
.wp-block-group {
  padding: var(--hp-space-xl);
}

/* List block */
.wp-block-list {
  padding-left: 1.5em;
}


/* -------------------------------------------
   29. Responsive Adjustments
   ------------------------------------------- */

/* Mobile: scale down large headings */
@media (max-width: 767px) {
  h1 {
    font-size: var(--hp-text-3xl);
    letter-spacing: -0.015em;
  }

  h2 {
    font-size: var(--hp-text-2xl);
  }

  h3 {
    font-size: var(--hp-text-xl);
  }

  .error-404__code {
    font-size: 5rem;
  }
}


/* -------------------------------------------
   30. Accessibility: Reduced Motion
   ------------------------------------------- */

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


/* -------------------------------------------
   31. Print Styles
   ------------------------------------------- */

@media print {
  body {
    font-size: 12pt;
    color: #000;
    background: #fff;
  }

  .site-header,
  .site-footer,
  .main-navigation,
  .menu-toggle,
  #ez-toc-container,
  .badge-trending,
  .badge-category,
  .related-posts,
  .author-bio,
  .pagination,
  .back-to-top {
    display: none;
  }

  a {
    color: #000;
    text-decoration: underline;
  }

  a[href]::after {
    content: " (" attr(href) ")";
    font-size: 0.8em;
    color: #666;
  }
}
