/*
Theme Name: Gurtejpal Singh
Theme URI: https://gurtejpalsingh.com
Author: Gurtejpal Singh
Author URI: https://gurtejpalsingh.com
Description: A clean, minimal editorial blog theme — crisp typography, generous whitespace, and distraction-free reading. Inspired by modern tech editorial sites.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: gurtejpalsingh
Tags: blog, minimal, editorial, clean, light, responsive
*/

/* ============================================================
   GOOGLE FONTS — loaded via functions.php
   Using: Lora (serif, display) + Instrument Sans (UI/nav)
   ============================================================ */

/* ============================================================
   CSS CUSTOM PROPERTIES
   ============================================================ */
:root {
  --color-bg:           #f0f0ee;
  --color-surface:      #ffffff;
  --color-border:       #e0ddd8;
  --color-border-light: #eae8e4;
  --color-text:         #1a1a18;
  --color-muted:        #6b6b62;
  --color-faint:        #a8a89e;
  --color-accent:       #d4622a;
  --color-accent-hover: #b84e20;
  --color-tag-bg:       #ede9e4;
  --color-tag-text:     #5a5a52;
  --color-code-bg:      #f5f3ef;

  --card-shadow:        0 1px 3px rgba(0,0,0,0.07), 0 4px 12px rgba(0,0,0,0.05);

  --font-display:  'Lora', Georgia, serif;
  --font-ui:       'Instrument Sans', system-ui, sans-serif;
  --font-mono:     'JetBrains Mono', 'Fira Code', monospace;

  --text-xs:   0.75rem;
  --text-sm:   0.875rem;
  --text-base: 1rem;
  --text-md:   1.125rem;
  --text-lg:   1.375rem;
  --text-xl:   1.75rem;
  --text-2xl:  2.25rem;
  --text-3xl:  3rem;
  --text-4xl:  3.75rem;

  --radius-sm:  4px;
  --radius:     8px;
  --radius-lg:  16px;

  --max-w-content: 720px;
  --max-w-wide:    1100px;
  --transition:    0.2s ease;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.08), 0 2px 6px rgba(0,0,0,0.05);
}

/* ============================================================
   DARK MODE — auto via prefers-color-scheme
   ============================================================ */
@media (prefers-color-scheme: dark) {
  :root {
    --color-bg:           #1a1a18;
    --color-surface:      #222220;
    --color-border:       #333330;
    --color-border-light: #2a2a28;
    --color-text:         #e8e6e0;
    --color-muted:        #8a8a80;
    --color-faint:        #55554e;
    --color-accent:       #e07040;
    --color-accent-hover: #d4622a;
    --color-tag-bg:       #2a2218;
    --color-tag-text:     #c0a080;
    --color-code-bg:      #1e1e1c;

    --card-shadow:        0 1px 4px rgba(0,0,0,0.4), 0 4px 14px rgba(0,0,0,0.3);

    --shadow-sm: 0 1px 3px rgba(0,0,0,0.3), 0 1px 2px rgba(0,0,0,0.2);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.4), 0 2px 6px rgba(0,0,0,0.3);
  }

  /* Header blur darkens correctly */
  .site-header {
    background: rgba(26, 26, 24, 0.94) !important;
  }

  /* Images slightly dimmed to reduce eye strain */
  img {
    filter: brightness(0.92) contrast(1.02);
  }

  /* Author box gets a subtle border emphasis */
  .author-box {
    background: var(--color-surface);
    border-color: var(--color-border);
  }

  /* Back-to-top uses lighter bg in dark */
  .back-to-top {
    background: var(--color-text);
    color: var(--color-bg);
  }

  /* Search form */
  .search-form input[type="search"] {
    background: var(--color-surface);
    color: var(--color-text);
  }

  /* Comment textarea */
  textarea,
  input[type="email"],
  input[type="text"] {
    background: var(--color-surface) !important;
    color: var(--color-text) !important;
    border-color: var(--color-border) !important;
  }

  /* Code blocks */
  .post-content pre {
    background: var(--color-code-bg);
    border-color: var(--color-border);
  }
  .post-content code {
    background: var(--color-code-bg);
    color: #e07040;
  }

  /* Nav menu open state on mobile */
  .site-nav.open {
    background: var(--color-bg) !important;
    border-top-color: var(--color-border) !important;
  }

  /* Footer */
  .site-footer {
    border-top-color: var(--color-border);
  }
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-ui);
  font-size: var(--text-base);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button, input, textarea, select {
  font-family: inherit;
  font-size: inherit;
}
button { cursor: pointer; }

/* ============================================================
   LAYOUT UTILITIES
   ============================================================ */
.container {
  width: 90%;
  max-width: var(--max-w-wide);
  margin-inline: auto;
}
.container--narrow {
  width: 90%;
  max-width: var(--max-w-content);
  margin-inline: auto;
}

/* ============================================================
   HEADER / NAV
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(240, 240, 238, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}
.site-logo {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: -0.02em;
  transition: color var(--transition);
}
.site-logo:hover { color: var(--color-accent); }

.site-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}
.site-nav a {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-muted);
  transition: color var(--transition);
  letter-spacing: 0.01em;
}
.site-nav a:hover,
.site-nav a.current-menu-item { color: var(--color-text); }

.nav-rss {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px; height: 32px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-muted) !important;
  transition: all var(--transition) !important;
}
.nav-rss:hover {
  border-color: var(--color-accent) !important;
  color: var(--color-accent) !important;
}
.nav-rss svg { width: 14px; height: 14px; }

.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  padding: 4px;
}
.menu-toggle span {
  display: block;
  width: 22px; height: 1.5px;
  background: var(--color-text);
  transition: var(--transition);
}

/* ============================================================
   HERO / SITE INTRO
   ============================================================ */
.site-intro {
  padding: 64px 0 52px;
  border-bottom: 1px solid var(--color-border);
}
.site-intro__label {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 16px;
}
.site-intro__title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, var(--text-3xl));
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--color-text);
  margin-bottom: 18px;
  max-width: 26ch;
}
.site-intro__desc {
  font-size: var(--text-md);
  color: var(--color-muted);
  line-height: 1.7;
  max-width: 52ch;
}

/* ============================================================
   HOME: FEATURED ARTICLE
   ============================================================ */
.featured-section {
  padding: 52px 0 0;
}
.featured-section__heading {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-faint);
  margin-bottom: 24px;
}
.featured-post {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  align-items: stretch;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--card-shadow);
  overflow: hidden;
  margin-bottom: 12px;
}
.featured-post__content {
  padding: 32px 36px;
}
.featured-post__image {
  aspect-ratio: 16/10;
  overflow: hidden;
  background: var(--color-border-light);
}
.featured-post__image img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.featured-post__image:hover img { transform: scale(1.03); }

.featured-post__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}
.tag {
  display: inline-block;
  padding: 3px 10px;
  background: var(--color-tag-bg);
  color: var(--color-tag-text);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 999px;
  transition: all var(--transition);
}
.tag:hover {
  background: var(--color-accent);
  color: #fff;
}
.tag--accent {
  background: var(--color-accent);
  color: #fff;
}
.post-date {
  font-size: var(--text-xs);
  color: var(--color-faint);
}

.featured-post__title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.5vw, var(--text-2xl));
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.2;
  color: var(--color-text);
  margin-bottom: 14px;
  transition: color var(--transition);
}
.featured-post__title:hover { color: var(--color-accent); }

.featured-post__excerpt {
  font-size: var(--text-base);
  color: var(--color-muted);
  line-height: 1.75;
  margin-bottom: 24px;
  max-width: 100%;
}
.read-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-accent);
  transition: gap var(--transition);
}
.read-more:hover { gap: 10px; }
.read-more svg { width: 14px; height: 14px; }

/* ============================================================
   HOME: POST GRID
   ============================================================ */
.posts-section {
  padding: 52px 0;
}
.posts-section__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
}
.posts-section__heading {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-faint);
}
.view-all {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-accent);
  transition: color var(--transition);
}
.view-all:hover { color: var(--color-accent-hover); }

.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.post-card {
  display: flex;
  flex-direction: column;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--card-shadow);
  overflow: hidden;
  transition: box-shadow var(--transition), transform var(--transition);
}
.post-card:hover {
  box-shadow: 0 6px 24px rgba(0,0,0,0.10);
  transform: translateY(-2px);
}
.post-card__body {
  padding: 22px 24px 28px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.post-card__image {
  aspect-ratio: 16/10;
  overflow: hidden;
  background: var(--color-border-light);
  margin-bottom: 0;
}
.post-card__image img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.post-card:hover .post-card__image img { transform: scale(1.04); }
.post-card__image--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
}
.post-card__image--placeholder svg {
  width: 40px; height: 40px;
  color: var(--color-border);
}
.post-card__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.post-card__title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.3;
  color: var(--color-text);
  margin-bottom: 10px;
  transition: color var(--transition);
}
.post-card__title:hover { color: var(--color-accent); }
.post-card__excerpt {
  font-size: var(--text-sm);
  color: var(--color-muted);
  line-height: 1.7;
  flex: 1;
}

/* ============================================================
   DIVIDER ROW (between grid and list posts)
   ============================================================ */
.posts-list {
  margin-top: 40px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.post-list-item {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
  gap: 20px;
  padding: 22px 24px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--card-shadow);
  transition: box-shadow var(--transition), transform var(--transition);
}
.post-list-item:hover {
  box-shadow: 0 6px 24px rgba(0,0,0,0.10);
  transform: translateY(-1px);
  opacity: 1;
}
.post-list-item__left { display: flex; flex-direction: column; gap: 8px; }
.post-list-item__meta { display: flex; align-items: center; gap: 8px; }
.post-list-item__title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--color-text);
  line-height: 1.25;
  transition: color var(--transition);
}
.post-list-item__title:hover { color: var(--color-accent); }
.post-list-item__excerpt {
  font-size: var(--text-sm);
  color: var(--color-muted);
  line-height: 1.6;
  max-width: 60ch;
}
.post-list-item__image {
  width: 120px; height: 80px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--color-border-light);
  flex-shrink: 0;
}
.post-list-item__image img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.post-list-item:hover .post-list-item__image img { transform: scale(1.06); }

/* ============================================================
   PAGINATION
   ============================================================ */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 48px 0;
}
.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-muted);
  transition: all var(--transition);
}
.pagination a:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}
.pagination .current {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: #fff;
}

/* ============================================================
   SINGLE POST
   ============================================================ */
.single-post-wrap {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--card-shadow);
  overflow: hidden;
  margin: 40px 0 60px;
}
.post-header {
  padding: 52px 56px 40px;
  border-bottom: 1px solid var(--color-border);
}
.post-header__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}
.post-header__title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, var(--text-4xl));
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--color-text);
  margin-bottom: 20px;
}
.post-header__excerpt {
  font-size: var(--text-md);
  color: var(--color-muted);
  line-height: 1.7;
  max-width: 58ch;
  margin-bottom: 28px;
}
.post-byline {
  display: flex;
  align-items: center;
  gap: 12px;
}
.post-byline__avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--color-border);
}
.post-byline__avatar img { width: 100%; height: 100%; object-fit: cover; }
.post-byline__name {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
}
.post-byline__details {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-xs);
  color: var(--color-faint);
}
.post-byline__details span { display: flex; align-items: center; gap: 4px; }
.post-byline__sep { color: var(--color-border); }

.post-featured-image {
  margin: 40px 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 2/1;
}
.post-featured-image img { width: 100%; height: 100%; object-fit: cover; }

/* ============================================================
   POST CONTENT (article body)
   ============================================================ */
.post-content {
  padding: 40px 56px 60px;
  font-family: var(--font-display);
  font-size: 1.125rem;
  line-height: 1.85;
  color: var(--color-text);
}
.post-content > *,
.post-header > * {
  max-width: var(--max-w-content);
  margin-left: auto;
  margin-right: auto;
}
.post-content p { margin-bottom: 1.6em; }
.post-content h2 {
  font-size: var(--text-2xl);
  letter-spacing: -0.025em;
  margin: 2.2em 0 0.7em;
  line-height: 1.2;
}
.post-content h3 {
  font-size: var(--text-xl);
  letter-spacing: -0.02em;
  margin: 2em 0 0.6em;
  line-height: 1.25;
}
.post-content h4 {
  font-size: var(--text-lg);
  margin: 1.8em 0 0.5em;
}
.post-content a {
  color: var(--color-accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: color var(--transition);
}
.post-content a:hover { color: var(--color-accent-hover); }
.post-content ul, .post-content ol {
  padding-left: 1.5em;
  margin-bottom: 1.6em;
  list-style: disc;
}
.post-content ol { list-style: decimal; }
.post-content li { margin-bottom: 0.4em; }
.post-content blockquote {
  border-left: 3px solid var(--color-accent);
  padding: 4px 0 4px 24px;
  margin: 2em 0;
  font-style: italic;
  color: var(--color-muted);
}
.post-content blockquote p { margin-bottom: 0; }
.post-content code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background: var(--color-code-bg);
  padding: 2px 7px;
  border-radius: var(--radius-sm);
  color: var(--color-accent-hover);
}
.post-content pre {
  background: var(--color-code-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 20px 24px;
  overflow-x: auto;
  margin: 1.8em 0;
}
.post-content pre code {
  background: none;
  padding: 0;
  color: var(--color-text);
  font-size: 0.9em;
}
.post-content img {
  border-radius: var(--radius);
  margin: 2em 0;
}
.post-content .wp-block-image figcaption,
.post-content figcaption {
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  color: var(--color-faint);
  text-align: center;
  margin-top: 8px;
}
.post-content hr {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: 2.5em 0;
}
.post-content table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
  margin: 1.8em 0;
  font-family: var(--font-ui);
}
.post-content th {
  text-align: left;
  font-weight: 600;
  padding: 10px 14px;
  border-bottom: 2px solid var(--color-border);
  color: var(--color-text);
}
.post-content td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--color-border-light);
  color: var(--color-muted);
}

/* ============================================================
   POST FOOTER (tags, share, author box)
   ============================================================ */
.post-footer {
  border-top: 1px solid var(--color-border);
  padding: 36px 56px 48px;
  margin-bottom: 0;
}
.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 32px;
}
.post-tags__label {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-muted);
  margin-right: 4px;
}
.author-box {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 28px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
}
.author-box__avatar {
  width: 64px; height: 64px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--color-border);
  flex-shrink: 0;
}
.author-box__avatar img { width: 100%; height: 100%; object-fit: cover; }
.author-box__name {
  font-family: var(--font-display);
  font-size: var(--text-md);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 6px;
}
.author-box__bio {
  font-size: var(--text-sm);
  color: var(--color-muted);
  line-height: 1.65;
  max-width: 100%;
}

/* ============================================================
   RELATED POSTS
   ============================================================ */
.related-posts {
  padding: 0 0 72px;
}
.related-posts__heading {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-faint);
  margin-bottom: 28px;
}
.related-posts__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.site-layout--sidebar {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 64px;
  align-items: start;
}
.sidebar { padding-top: 8px; }
.widget {
  margin-bottom: 40px;
}
.widget-title {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-faint);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--color-border);
}
.widget ul li {
  padding: 10px 0;
  border-bottom: 1px solid var(--color-border-light);
}
.widget ul li a {
  font-size: var(--text-sm);
  color: var(--color-muted);
  transition: color var(--transition);
}
.widget ul li a:hover { color: var(--color-accent); }
.widget ul li:last-child { border-bottom: none; }

.widget--about p {
  font-size: var(--text-sm);
  color: var(--color-muted);
  line-height: 1.7;
  max-width: 100%;
}
.widget--about .widget-avatar {
  width: 56px; height: 56px;
  border-radius: 50%;
  overflow: hidden;
  margin-bottom: 14px;
  background: var(--color-border);
}
.widget--about .widget-avatar img { width: 100%; height: 100%; object-fit: cover; }

.widget--newsletter input[type="email"] {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  color: var(--color-text);
  font-size: var(--text-sm);
  margin-bottom: 10px;
  transition: border-color var(--transition);
  outline: none;
}
.widget--newsletter input[type="email"]:focus { border-color: var(--color-accent); }
.widget--newsletter button {
  width: 100%;
  padding: 10px;
  background: var(--color-accent);
  color: #fff;
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  font-weight: 600;
  transition: background var(--transition);
}
.widget--newsletter button:hover { background: var(--color-accent-hover); }

/* ============================================================
   ARCHIVE / CATEGORY PAGE
   ============================================================ */
.archive-header {
  padding: 52px 0 36px;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 48px;
}
.archive-header__eyebrow {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-faint);
  margin-bottom: 12px;
}
.archive-header__title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, var(--text-3xl));
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--color-text);
  margin-bottom: 12px;
}
.archive-header__desc {
  font-size: var(--text-base);
  color: var(--color-muted);
  max-width: 54ch;
}

/* ============================================================
   SEARCH
   ============================================================ */
.search-form {
  display: flex;
  align-items: center;
  gap: 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--color-surface);
  transition: border-color var(--transition);
}
.search-form:focus-within { border-color: var(--color-accent); }
.search-form input[type="search"] {
  flex: 1;
  padding: 12px 16px;
  border: none;
  background: transparent;
  color: var(--color-text);
  font-size: var(--text-base);
  outline: none;
}
.search-form button {
  padding: 12px 16px;
  background: var(--color-accent);
  color: #fff;
  border: none;
  font-weight: 600;
  font-size: var(--text-sm);
  transition: background var(--transition);
}
.search-form button:hover { background: var(--color-accent-hover); }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  border-top: 1px solid var(--color-border);
  padding: 48px 0 32px;
  margin-top: 0;
}
.site-footer__top {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.footer-about__logo {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}
.footer-about__desc {
  font-size: var(--text-sm);
  color: var(--color-muted);
  line-height: 1.7;
  max-width: 100%;
}
.footer-col__heading {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-faint);
  margin-bottom: 16px;
}
.footer-col ul { display: flex; flex-direction: column; gap: 10px; }
.footer-col ul a {
  font-size: var(--text-sm);
  color: var(--color-muted);
  transition: color var(--transition);
}
.footer-col ul a:hover { color: var(--color-accent); }

.site-footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 24px;
  border-top: 1px solid var(--color-border-light);
}
.footer-copy {
  font-size: var(--text-xs);
  color: var(--color-faint);
}
.footer-socials {
  display: flex;
  align-items: center;
  gap: 16px;
}
.footer-socials a {
  font-size: var(--text-xs);
  color: var(--color-faint);
  transition: color var(--transition);
}
.footer-socials a:hover { color: var(--color-accent); }

/* ============================================================
   READING PROGRESS BAR
   ============================================================ */
.reading-progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  background: var(--color-accent);
  z-index: 9999;
  width: 0%;
  transition: width 0.1s linear;
}

/* ============================================================
   BACK TO TOP
   ============================================================ */
.back-to-top {
  position: fixed;
  bottom: 28px; right: 28px;
  width: 40px; height: 40px;
  background: var(--color-text);
  color: var(--color-bg);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: all var(--transition);
  z-index: 90;
}
.back-to-top.visible { opacity: 1; pointer-events: all; }
.back-to-top:hover { background: var(--color-accent); transform: translateY(-2px); }
.back-to-top svg { width: 16px; height: 16px; }

/* ============================================================
   404 / NO RESULTS
   ============================================================ */
.not-found {
  padding: 100px 0;
  text-align: center;
}
.not-found__code {
  font-family: var(--font-display);
  font-size: 8rem;
  font-weight: 700;
  color: var(--color-border);
  line-height: 1;
  margin-bottom: 16px;
}
.not-found__title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  color: var(--color-text);
  margin-bottom: 12px;
}
.not-found p {
  font-size: var(--text-md);
  color: var(--color-muted);
  margin: 0 auto 28px;
}

/* ============================================================
   COMMENTS
   ============================================================ */
.comments-area { padding: 0 0 60px; }
.comments-title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  margin-bottom: 28px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--color-border);
}
.comment-body { padding: 20px 0; border-bottom: 1px solid var(--color-border-light); }
.comment-author { font-size: var(--text-sm); font-weight: 600; color: var(--color-text); }
.comment-meta { font-size: var(--text-xs); color: var(--color-faint); margin-bottom: 8px; }
.comment-text { font-size: var(--text-sm); color: var(--color-muted); line-height: 1.7; }
.comment-reply-link {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-accent);
  margin-top: 8px;
  display: inline-block;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .site-footer__top { grid-template-columns: 1fr 1fr; }
  .posts-grid { grid-template-columns: repeat(2, 1fr); }
  .featured-post { grid-template-columns: 1fr; }
  .related-posts__grid { grid-template-columns: 1fr 1fr; }
  .site-layout--sidebar { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .post-header { padding: 36px 28px 32px; }
  .post-content { padding: 32px 28px 48px; }
  .post-footer { padding: 28px 28px 36px; }
}

@media (max-width: 640px) {
  :root { --section-gap: 60px; }
  .site-nav { display: none; }
  .site-nav.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    inset: 60px 0 0 0;
    background: var(--color-bg);
    padding: 32px 20px;
    gap: 20px;
    align-items: flex-start;
    z-index: 99;
    border-top: 1px solid var(--color-border);
  }
  .site-nav.open a { font-size: var(--text-md); }
  .menu-toggle { display: flex; }
  .posts-grid { grid-template-columns: 1fr; }
  .related-posts__grid { grid-template-columns: 1fr; }
  .site-footer__top { grid-template-columns: 1fr; gap: 28px; }
  .post-list-item { grid-template-columns: 1fr; }
  .post-list-item__image { display: none; }
  .site-footer__bottom { flex-direction: column; gap: 12px; text-align: center; }
  .single-post-wrap { margin: 20px 0 40px; border-radius: var(--radius); }
  .post-header { padding: 28px 20px 24px; }
  .post-content { padding: 24px 20px 36px; }
  .post-footer { padding: 24px 20px 32px; }
}

/* ============================================================
   PRINT
   ============================================================ */
@media print {
  .site-header, .site-footer, .related-posts, .sidebar, .back-to-top { display: none; }
  .post-content { font-size: 12pt; line-height: 1.6; }
}
