/* ============================================================
   LIAM ELLIOTT — Personal Site CSS
   ============================================================ */

/* ---- THEME VARIABLES ---------------------------------------- */

[data-theme="light"] {
  --bg:           #fafafa;
  --bg-secondary: #f0f2f5;
  --bg-card:      #ffffff;
  --bg-code:      #f4f4f5;
  --border:       #e4e4e7;
  --text:         #18181b;
  --text-muted:   #71717a;
  --text-light:   #a1a1aa;
  --accent:       #6366f1;
  --accent-hover: #4f46e5;
  --accent-muted: #eef2ff;
  --accent-text:  #4338ca;
  --nav-bg:       rgba(250, 250, 250, 0.85);
  --shadow-sm:    0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md:    0 4px 6px -1px rgba(0,0,0,0.08), 0 2px 4px -1px rgba(0,0,0,0.04);
  --shadow-lg:    0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -2px rgba(0,0,0,0.03);
}

[data-theme="dark"] {
  --bg:           #0c0e16;
  --bg-secondary: #13161f;
  --bg-card:      #181b26;
  --bg-code:      #1e2130;
  --border:       #272a3a;
  --text:         #e2e8f0;
  --text-muted:   #8892a4;
  --text-light:   #4a5568;
  --accent:       #818cf8;
  --accent-hover: #a5b4fc;
  --accent-muted: #1a1d35;
  --accent-text:  #a5b4fc;
  --nav-bg:       rgba(12, 14, 22, 0.88);
  --shadow-sm:    0 1px 3px rgba(0,0,0,0.4), 0 1px 2px rgba(0,0,0,0.3);
  --shadow-md:    0 4px 6px -1px rgba(0,0,0,0.4), 0 2px 4px -1px rgba(0,0,0,0.3);
  --shadow-lg:    0 10px 15px -3px rgba(0,0,0,0.4), 0 4px 6px -2px rgba(0,0,0,0.2);
}

/* ---- RESET & BASE ------------------------------------------- */

/*
 * Hoist [hidden] above UA stylesheet so author-defined display values
 * (e.g. display:flex on list items) don't accidentally override it.
 * This is a standard CSS reset pattern recommended by MDN.
 */
[hidden] { display: none !important; }

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background-color 0.25s ease, color 0.25s ease;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.15s ease;
}

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

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

/* ---- TYPOGRAPHY --------------------------------------------- */

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.025em;
  color: var(--text);
}

/* ---- LAYOUT ------------------------------------------------- */

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.container--narrow {
  max-width: 780px;
}

main {
  flex: 1;
}

.page-content {
  padding-top: 64px; /* height of fixed nav */
}

/* ---- NAVIGATION --------------------------------------------- */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: 64px;
  background: var(--nav-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  transition: background 0.25s ease, border-color 0.25s ease;
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.nav__logo {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.03em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.nav__logo:hover { color: var(--accent); }

.nav__logo-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  flex-shrink: 0;
  border: 2px solid var(--accent);
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 0.125rem;
  list-style: none;
}

.nav__links a {
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.4rem 0.7rem;
  border-radius: 6px;
  transition: color 0.15s ease, background 0.15s ease;
}

.nav__links a:hover,
.nav__links a[aria-current="page"] {
  color: var(--text);
  background: var(--bg-secondary);
}

.nav__links a[aria-current="page"] {
  color: var(--accent);
}

.nav__actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

/* Theme toggle button */
.theme-toggle {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9375rem;
  transition: all 0.15s ease;
  line-height: 1;
}

.theme-toggle:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-muted);
}

/* Mobile menu toggle */
.nav__hamburger {
  display: none;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-muted);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  transition: all 0.15s ease;
}

.nav__hamburger span {
  display: block;
  width: 16px;
  height: 1.5px;
  background: currentColor;
  border-radius: 2px;
  transition: all 0.2s ease;
}

.nav__hamburger:hover {
  color: var(--accent);
  border-color: var(--accent);
}

@media (max-width: 660px) {
  .nav__links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--nav-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    flex-direction: column;
    align-items: stretch;
    padding: 0.75rem 1rem 1rem;
    border-bottom: 1px solid var(--border);
    gap: 0.125rem;
  }

  .nav__links.is-open { display: flex; }

  .nav__links a {
    padding: 0.65rem 0.75rem;
    font-size: 0.9375rem;
  }

  .nav__hamburger { display: flex; }
}

/* ---- BUTTONS ------------------------------------------------ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.625rem 1.125rem;
  border-radius: 8px;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn--primary {
  background: var(--accent);
  color: white;
}

.btn--primary:hover {
  background: var(--accent-hover);
  color: white;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn--secondary {
  background: var(--bg-card);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn--secondary:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-muted);
  transform: translateY(-1px);
}

/* ---- HERO --------------------------------------------------- */

.hero {
  padding: 5.5rem 0 4.5rem;
  position: relative;
  overflow: hidden;
}

/* Subtle radial glow in the background */
.hero::after {
  content: '';
  position: absolute;
  top: -20%;
  right: -10%;
  width: 700px;
  height: 700px;
  background: radial-gradient(circle at center, var(--accent-muted) 0%, transparent 65%);
  pointer-events: none;
  z-index: 0;
}

.hero > .container { position: relative; z-index: 1; }

/* Two-column layout: text left, photo right */
.hero__layout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3rem;
}

.hero__content {
  flex: 1;
  min-width: 0;
}

.hero__photo {
  flex-shrink: 0;
}

.hero__photo img {
  width: 280px;
  height: 280px;
  border-radius: 20px;
  object-fit: cover;
  object-position: center top;
  border: 2px solid var(--border);
  box-shadow: var(--shadow-lg);
  display: block;
}

@media (max-width: 700px) {
  .hero__layout {
    flex-direction: column-reverse;
    gap: 2rem;
  }

  .hero__photo img {
    width: 160px;
    height: 160px;
    border-radius: 14px;
  }
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  background: var(--accent-muted);
  padding: 0.3rem 0.7rem;
  border-radius: 100px;
  margin-bottom: 1.25rem;
  border: 1px solid transparent;
  transition: border-color 0.15s ease;
}

.hero__title {
  font-size: clamp(2.5rem, 6vw, 4rem);
  margin-bottom: 1.125rem;
  letter-spacing: -0.04em;
  line-height: 1.1;
}

.hero__title em {
  font-style: normal;
  color: var(--accent);
}

.hero__tagline {
  font-size: clamp(1rem, 2.5vw, 1.1875rem);
  color: var(--text-muted);
  max-width: 540px;
  line-height: 1.65;
  margin-bottom: 2.25rem;
}

.hero__actions {
  display: flex;
  gap: 0.875rem;
  flex-wrap: wrap;
}

/* ---- SECTION BASE ------------------------------------------- */

.section {
  padding: 4rem 0;
}

.section--alt {
  background: var(--bg-secondary);
}

.section__label {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 0.4rem;
}

.section__header {
  margin-bottom: 2rem;
}

.section__title {
  font-size: clamp(1.375rem, 3vw, 1.875rem);
  margin-bottom: 0.375rem;
}

.section__subtitle {
  font-size: 1rem;
  color: var(--text-muted);
}

/* ---- DIVIDER ------------------------------------------------ */

.divider {
  height: 1px;
  background: var(--border);
}

/* ---- STATUS / "WHAT I'M UP TO" CARDS ----------------------- */

.status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.status-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.5rem 1.375rem;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  cursor: default;
}

.status-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.status-card__icon {
  font-size: 1.625rem;
  margin-bottom: 0.875rem;
  display: block;
  line-height: 1;
}

.status-card__logo {
  width: 64px;
  height: 64px;
  object-fit: contain;
  object-position: left center;
  margin-bottom: 0.875rem;
  display: block;
}

.status-card__label {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 0.3rem;
}

.status-card__title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  line-height: 1.35;
}

.status-card__link {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 1px;
}

.status-card__link:hover {
  color: var(--accent);
}

.status-card__desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ---- POST CARDS (homepage grid) ----------------------------- */

.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.125rem;
}

.post-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.post-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.post-card__meta {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.post-card__date {
  font-size: 0.75rem;
  color: var(--text-light);
  font-weight: 500;
}

.post-card__tag {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--accent);
  background: var(--accent-muted);
  padding: 0.175rem 0.5rem;
  border-radius: 4px;
}

.post-card__title {
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.015em;
  margin-bottom: 0.6rem;
}

.post-card__title a { color: var(--text); }
.post-card__title a:hover { color: var(--accent); }

.post-card__excerpt {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.65;
  flex: 1;
  margin-bottom: 1.25rem;
}

.post-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  margin-top: auto;
}

.post-card__read-more {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  transition: gap 0.15s ease;
}

.post-card__read-more:hover {
  color: var(--accent-hover);
  gap: 0.45rem;
}

.post-card__read-time {
  font-size: 0.75rem;
  color: var(--text-light);
}

/* ---- VIEW ALL LINK ------------------------------------------ */

.view-all {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent);
  margin-top: 1.75rem;
  transition: gap 0.15s ease, color 0.15s ease;
}

.view-all:hover {
  color: var(--accent-hover);
  gap: 0.6rem;
}

/* ---- ABOUT SNIPPET ------------------------------------------ */

.about-snippet {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3rem;
  align-items: center;
}

@media (max-width: 600px) {
  .about-snippet {
    grid-template-columns: 1fr;
  }

  .about-snippet__image {
    order: -1;
    display: flex;
    justify-content: center;
  }
}

.about-snippet__label {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.about-snippet__body h2 {
  font-size: clamp(1.375rem, 3vw, 1.875rem);
  margin-bottom: 0.875rem;
}

.about-snippet__body p {
  font-size: 1.0625rem;
  color: var(--text-muted);
  line-height: 1.75;
  margin-bottom: 0;
}

.about-snippet__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.625rem;
}

.about-snippet__image img {
  width: 200px;
  height: 200px;
  border-radius: 16px;
  object-fit: cover;
  border: 2px solid var(--border);
  box-shadow: var(--shadow-lg);
}

.about-snippet__image-placeholder {
  width: 200px;
  height: 200px;
  border-radius: 16px;
  background: var(--bg-card);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.5rem;
}

/* ---- FOOTER ------------------------------------------------- */

.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 3rem 0 2rem;
  transition: background 0.25s ease, border-color 0.25s ease;
}

.footer__grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2.5rem;
  align-items: start;
  margin-bottom: 2.5rem;
}

@media (max-width: 580px) {
  .footer__grid { grid-template-columns: 1fr; }
}

.footer__brand {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.025em;
  margin-bottom: 0.4rem;
}

.footer__tagline {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.55;
  max-width: 340px;
  margin-bottom: 1.125rem;
}

.footer__socials {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.footer__social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-muted);
  transition: all 0.15s ease;
}

.footer__social-link:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-muted);
}

.footer__nav-title {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 0.875rem;
}

.footer__nav-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer__nav-links a {
  font-size: 0.875rem;
  color: var(--text-muted);
  font-weight: 500;
  transition: color 0.15s ease;
}

.footer__nav-links a:hover { color: var(--accent); }

.footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 0.5rem;
}

.footer__copy {
  font-size: 0.8125rem;
  color: var(--text-light);
}

/* ---- SINGLE POST -------------------------------------------- */

.post-header {
  padding: 3.5rem 0 2.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2.75rem;
}

.post-header__back {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 2rem;
  transition: color 0.15s ease, gap 0.15s ease;
}

.post-header__back:hover {
  color: var(--accent);
  gap: 0.55rem;
}

.post-header__meta {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.post-header__date {
  font-size: 0.875rem;
  color: var(--text-muted);
  font-weight: 500;
}

.post-header__tag {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--accent);
  background: var(--accent-muted);
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
}

.post-header__read-time {
  font-size: 0.8125rem;
  color: var(--text-light);
}

.post-header__title {
  font-size: clamp(1.875rem, 5vw, 2.75rem);
  margin-bottom: 0.875rem;
  letter-spacing: -0.03em;
}

.post-header__teaser {
  font-size: 1.125rem;
  color: var(--text-muted);
  line-height: 1.65;
  max-width: 640px;
  margin-bottom: 1.125rem;
}

.post-header__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.tag {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  background: var(--bg-secondary);
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  border: 1px solid var(--border);
  transition: all 0.15s ease;
}

.tag:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-muted);
}

/* Post body typography */
.post-body {
  font-size: 1.0625rem;
  line-height: 1.85;
  color: var(--text);
  padding-bottom: 4rem;
}

.post-body > * + * { margin-top: 1.375rem; }

.post-body h2 {
  font-size: 1.5rem;
  margin-top: 2.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.post-body h3 {
  font-size: 1.25rem;
  margin-top: 2rem;
}

.post-body h4 {
  font-size: 1.0625rem;
  margin-top: 1.5rem;
}

.post-body p { margin-bottom: 0; }

.post-body a {
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 1px;
}

.post-body a:hover {
  text-decoration-thickness: 2px;
}

.post-body code {
  font-family: 'Fira Code', 'Cascadia Code', 'Consolas', ui-monospace, monospace;
  font-size: 0.875em;
  background: var(--bg-code);
  color: var(--accent-text);
  padding: 0.15em 0.4em;
  border-radius: 4px;
  border: 1px solid var(--border);
}

.post-body pre {
  background: var(--bg-code);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.25rem 1.375rem;
  overflow-x: auto;
  margin: 1.75rem 0;
}

.post-body pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: 0.875rem;
  color: var(--text);
}

.post-body blockquote {
  border-left: 3px solid var(--accent);
  padding: 0.25rem 0 0.25rem 1.25rem;
  color: var(--text-muted);
  font-style: italic;
}

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

.post-body li + li { margin-top: 0.375rem; }

.post-body img {
  border-radius: 10px;
  margin: 2rem auto;
  box-shadow: var(--shadow-lg);
}

.post-body hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2.5rem 0;
}

.post-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

.post-body th,
.post-body td {
  text-align: left;
  padding: 0.65rem 0.875rem;
  border: 1px solid var(--border);
}

.post-body th {
  background: var(--bg-secondary);
  font-weight: 600;
}

/* ---- LIST PAGE ---------------------------------------------- */

.list-header {
  padding: 3.5rem 0 2.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0;
}

.list-header__title {
  font-size: clamp(1.875rem, 4vw, 2.5rem);
  margin-bottom: 0.4rem;
}

.list-header__desc {
  font-size: 1.0625rem;
  color: var(--text-muted);
}

.post-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.post-list-item {
  display: flex;
  gap: 1.5rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border);
  transition: padding-left 0.15s ease;
}

.post-list-item:hover {
  padding-left: 0.5rem;
}

@media (max-width: 520px) {
  .post-list-item { flex-direction: column; gap: 0.375rem; }
  .post-list-item__date { min-width: unset; }
}

.post-list-item__date {
  flex-shrink: 0;
  font-size: 0.8125rem;
  color: var(--text-light);
  font-weight: 500;
  min-width: 90px;
  padding-top: 0.175rem;
}

.post-list-item__title {
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.015em;
  margin-bottom: 0.35rem;
}

.post-list-item__title a { color: var(--text); }
.post-list-item__title a:hover { color: var(--accent); }

.post-list-item__excerpt {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 0.5rem;
}

.post-list-item__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}

/* ---- PAGINATION --------------------------------------------- */

.pagination-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  padding: 2.5rem 0 4rem;
}

.pagination-wrap a,
.pagination-wrap span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 0.625rem;
  border-radius: 7px;
  font-size: 0.875rem;
  font-weight: 600;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-muted);
  transition: all 0.15s ease;
}

.pagination-wrap a:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-muted);
}

.pagination-wrap .page-item.active a,
.pagination-wrap .active {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

/* ---- UTILITY ------------------------------------------------ */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

/* ---- POSTS TOOLBAR (search + tag filter) -------------------- */

.posts-toolbar {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Search input wrapper */
.posts-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.posts-search-icon {
  position: absolute;
  left: 0.875rem;
  color: var(--text-light);
  pointer-events: none;
  flex-shrink: 0;
}

.posts-search {
  width: 100%;
  padding: 0.625rem 2.75rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  font-size: 0.9375rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  /* Remove native browser search styling */
  -webkit-appearance: none;
  appearance: none;
}

.posts-search::placeholder { color: var(--text-light); }

.posts-search:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-muted);
}

.posts-search::-webkit-search-cancel-button { display: none; }

/* Clear button inside search */
.posts-search-clear {
  position: absolute;
  right: 0.625rem;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: none;
  background: var(--bg-secondary);
  color: var(--text-muted);
  font-size: 0.6875rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, color 0.15s ease;
}

.posts-search-clear:hover {
  background: var(--accent-muted);
  color: var(--accent);
}

/* Tag filter buttons row */
.posts-tag-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}

/* Tag filter buttons are <button> elements that use the .tag base styles */
.tag--filter {
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--bg-secondary);
  font-family: inherit;
  transition: all 0.15s ease;
}

.tag--filter:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-muted);
}

.tag--filter.tag--active {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-muted);
}

/* Result meta text */
.posts-meta {
  font-size: 0.8125rem;
  color: var(--text-light);
  padding: 0.625rem 0 0;
  min-height: 1.5rem;
}

/* Empty state */
.posts-empty {
  text-align: center;
  padding: 4rem 0 3rem;
  color: var(--text-muted);
  font-size: 1rem;
}
