/* ============================================
   GLOBALS — Design Tokens, Reset, Shared UI
   GIL-AN-NAE Blog v2.0
   ============================================ */

:root {
  --clr-bg: #faf6f2;
  --clr-bg-warm: #f3ebe3;
  --clr-bg-blush: #edddd4;
  --clr-surface: #ffffff;
  --clr-text: #2c2421;
  --clr-text-soft: #6b5e57;
  --clr-text-muted: #9e8e85;
  --clr-accent: #c08b6e;
  --clr-accent-hover: #a8735a;
  --clr-border: #e8ddd5;
  --clr-tag: #e8e0d8;
  --clr-dark: #3a302b;
  --clr-success: #5fa87a;
  --clr-danger: #d94f4f;
  --ff-heading: 'Outfit', system-ui, -apple-system, sans-serif;
  --ff-body: 'Inter', system-ui, -apple-system, sans-serif;
  --fs-xs: 0.75rem;
  --fs-sm: 0.875rem;
  --fs-base: 1rem;
  --fs-md: 1.125rem;
  --fs-lg: 1.375rem;
  --fs-xl: 1.75rem;
  --fs-2xl: 2.25rem;
  --fs-3xl: 3rem;
  --fs-hero: clamp(2.5rem, 6vw, 4.5rem);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-full: 9999px;
  --shadow-soft: 0 2px 20px rgba(44, 36, 33, 0.06);
  --shadow-card: 0 4px 30px rgba(44, 36, 33, 0.08);
  --shadow-hover: 0 8px 40px rgba(44, 36, 33, 0.13);
  --transition: 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --max-width: 1200px;
}

[data-theme='dark'] {
  --clr-bg: #1c1816;
  --clr-bg-warm: #2a2320;
  --clr-bg-blush: #322621;
  --clr-surface: #251f1c;
  --clr-text: #f0e6dd;
  --clr-text-soft: #cbbab1;
  --clr-text-muted: #8b7d75;
  --clr-border: #3c322d;
  --clr-dark: #120f0d;
}

[data-theme='dark'] .hero__overlay {
  background: linear-gradient(135deg, rgba(28, 24, 22, 0.8) 0%, rgba(28, 24, 22, 0.4) 100%);
}

[data-theme='dark'] .navbar {
  background: rgba(28, 24, 22, 0.85);
}

[data-theme='dark'] .mobile-menu {
  background: rgba(28, 24, 22, 0.97);
}

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

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

body {
  font-family: var(--ff-body);
  font-size: var(--fs-base);
  color: var(--clr-text);
  background: var(--clr-bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition);
}

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

ul,
ol {
  list-style: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font: inherit;
}

.container {
  width: 90%;
  max-width: var(--max-width);
  margin: 0 auto;
}

.section-label {
  font-family: var(--ff-body);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--clr-accent);
  margin-bottom: 0.75rem;
}

.section-title {
  font-family: var(--ff-heading);
  font-size: var(--fs-2xl);
  font-weight: 600;
  color: var(--clr-text);
  line-height: 1.25;
}

.section-subtitle {
  font-size: var(--fs-md);
  color: var(--clr-text-soft);
  margin-top: 0.5rem;
  max-width: 540px;
}

.announcement-bar {
  background: linear-gradient(90deg, var(--clr-accent), #a86f52);
  color: #fff;
  text-align: center;
  padding: 10px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 1px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  position: relative;
  z-index: 101;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* ---- View Transitions ---- */
::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 0.3s;
}

/* ---- Navbar ---- */
.navbar {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: transparent;
  transition: all 0.3s ease;
  padding: 24px 0;
}

.navbar.scrolled {
  background: var(--clr-bg);
  padding: 16px 0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

.navbar__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.navbar__logo {
  font-family: var(--ff-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--clr-text);
}

.navbar__logo span {
  color: var(--clr-accent);
}

.navbar__links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.navbar__actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: 16px;
  padding-left: 20px;
  border-left: 2px solid var(--clr-border);
}

.navbar__links a {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--clr-text-soft);
  position: relative;
  padding: 4px 0;
  transition: color var(--transition);
}

.navbar__links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--clr-accent);
  border-radius: 2px;
  transition: width var(--transition);
}

.navbar__links a:hover,
.navbar__links a.active {
  color: var(--clr-text);
}

.navbar__links a:hover::after,
.navbar__links a.active::after {
  width: 100%;
}

/* Search Button */
.nav-search-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--clr-bg-warm);
  border: 1px solid var(--clr-border);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--clr-text);
}

.nav-search-btn:hover {
  background: var(--clr-accent);
  color: #fff;
  border-color: var(--clr-accent);
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 6px 16px rgba(192, 139, 110, 0.35);
}

.nav-search-btn:active {
  transform: scale(0.95);
}

.nav-search-btn svg {
  width: 18px;
  height: 18px;
  stroke-width: 2.2;
  transition: transform 0.2s ease;
}

.nav-search-btn:hover svg {
  transform: scale(1.1);
}

/* Subscribe CTA Button - Soft & Elegant */
.navbar__cta {
  position: relative;
  background: var(--clr-accent);
  color: #fff !important;
  height: 40px;
  padding: 0 32px;
  border-radius: 999px;
  font-family: var(--ff-body);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.5px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  box-shadow: 0 4px 12px rgba(192, 139, 110, 0.25);
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  z-index: 1;
}

[data-theme='dark'] .navbar__cta {
  background: var(--clr-accent);
  color: #fff !important;
  box-shadow: 0 4px 12px rgba(192, 139, 110, 0.15);
}

.navbar__cta:hover {
  transform: translateY(-2px);
  background: var(--clr-accent-hover);
  box-shadow: 0 6px 16px rgba(192, 139, 110, 0.35);
  color: #fff !important;
}

.navbar__cta:active {
  transform: translateY(0) scale(0.96);
}

/* Theme Toggle */
.theme-toggle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--clr-bg-warm);
  border: 1px solid var(--clr-border);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--clr-text);
}

.theme-toggle:hover {
  background: var(--clr-dark);
  color: #fff;
  border-color: var(--clr-dark);
  transform: translateY(-2px) rotate(30deg) scale(1.05);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}

[data-theme='dark'] .theme-toggle:hover {
  background: #fff;
  color: var(--clr-dark);
  border-color: #fff;
  box-shadow: 0 6px 16px rgba(255, 255, 255, 0.25);
}

.theme-toggle svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  transition: transform 0.3s ease;
}

[data-theme='dark'] .theme-toggle .moon {
  display: none;
}

[data-theme='dark'] .theme-toggle .sun {
  display: block !important;
}

[data-theme='light'] .theme-toggle .moon {
  display: block;
}

[data-theme='light'] .theme-toggle .sun {
  display: none;
}

/* Hamburger */
.navbar__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
  z-index: 200;
}

.navbar__hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--clr-text);
  border-radius: 2px;
  transition: var(--transition);
  transform-origin: center;
}

.navbar__hamburger.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.navbar__hamburger.open span:nth-child(2) {
  opacity: 0;
}

.navbar__hamburger.open span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile Menu */
.mobile-menu {
  position: fixed;
  inset: 0;
  background: rgba(250, 246, 242, 0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 150;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.4s ease,
    visibility 0.4s ease;
  padding: 80px 40px 40px;
}

.mobile-menu.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.mobile-menu a {
  font-family: var(--ff-heading);
  font-size: var(--fs-xl);
  color: var(--clr-text);
  font-weight: 500;
  padding: 14px 0;
  display: block;
  width: 100%;
  text-align: center;
  border-bottom: 1px solid var(--clr-border);
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 0.3s ease,
    transform 0.3s ease,
    color 0.2s ease;
}

.mobile-menu.open a {
  opacity: 1;
  transform: translateY(0);
}

.mobile-menu.open a:nth-child(1) {
  transition-delay: 0.05s;
}
.mobile-menu.open a:nth-child(2) {
  transition-delay: 0.1s;
}
.mobile-menu.open a:nth-child(3) {
  transition-delay: 0.15s;
}
.mobile-menu.open a:nth-child(4) {
  transition-delay: 0.2s;
}
.mobile-menu.open a:nth-child(5) {
  transition-delay: 0.25s;
}
.mobile-menu.open a:nth-child(6) {
  transition-delay: 0.3s;
}
.mobile-menu.open a:nth-child(7) {
  transition-delay: 0.35s;
}

.mobile-menu a:last-of-type {
  border-bottom: none;
}

.mobile-menu a:hover,
.mobile-menu a.active {
  color: var(--clr-accent);
}

/* Mobile menu bottom actions (theme toggle + search) */
.mobile-menu__actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: auto;
  padding-top: 32px;
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 0.3s ease 0.35s,
    transform 0.3s ease 0.35s;
}

.mobile-menu.open .mobile-menu__actions {
  opacity: 1;
  transform: translateY(0);
}

.mobile-menu__actions .theme-toggle,
.mobile-menu__actions .nav-search-btn {
  width: 48px;
  height: 48px;
}

.mobile-menu__actions .navbar__cta {
  height: 48px;
  padding: 0 28px;
  font-size: 0.9rem;
}

/* Footer */
.footer {
  background: var(--clr-dark);
  color: #e8ddd5;
  padding: 60px 0 0;
}

.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer__brand .navbar__logo {
  color: #fff;
  margin-bottom: 16px;
  display: block;
}

.footer__brand p {
  color: rgba(255, 255, 255, 0.6);
  font-size: var(--fs-sm);
  line-height: 1.7;
  max-width: 300px;
}

.footer__socials {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.footer__socials a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    background var(--transition),
    transform var(--transition);
}

.footer__socials a:hover {
  background: var(--clr-accent);
  transform: translateY(-2px);
}

.footer__socials a svg {
  width: 18px;
  height: 18px;
  fill: #fff;
}

.footer__col h4 {
  font-family: var(--ff-heading);
  font-size: var(--fs-base);
  font-weight: 600;
  color: #fff;
  margin-bottom: 20px;
}

.footer__col a {
  display: block;
  font-size: var(--fs-sm);
  color: rgba(255, 255, 255, 0.55);
  padding: 5px 0;
  transition:
    color var(--transition),
    padding-left var(--transition);
}

.footer__col a:hover {
  color: var(--clr-accent);
  padding-left: 6px;
}

.footer__bottom {
  text-align: center;
  padding: 24px 0;
  font-size: var(--fs-xs);
  color: rgba(255, 255, 255, 0.35);
}

/* Shared UI */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition:
    opacity 0.7s ease,
    transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--clr-accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity var(--transition),
    transform var(--transition);
  z-index: 90;
  box-shadow: 0 4px 16px rgba(192, 139, 110, 0.3);
}

.back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
}

.back-to-top:hover {
  transform: translateY(-3px);
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--clr-border);
  border-top-color: var(--clr-accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin: 0 auto 16px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Cookie Consent */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 200;
  background: var(--clr-surface);
  border-top: 1px solid var(--clr-border);
  padding: 20px;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
  display: none;
}

.cookie-banner.show {
  display: block;
  animation: slideUp 0.4s ease;
}

@keyframes slideUp {
  from {
    transform: translateY(100%);
  }

  to {
    transform: translateY(0);
  }
}

.cookie-banner__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.cookie-banner__text {
  font-size: var(--fs-sm);
  color: var(--clr-text-soft);
  flex: 1;
  min-width: 200px;
}

.cookie-banner__text a {
  color: var(--clr-accent);
  text-decoration: underline;
}

.cookie-banner__btn {
  background: var(--clr-accent);
  color: #fff;
  padding: 10px 24px;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: var(--fs-sm);
  transition: all var(--transition);
  white-space: nowrap;
}

.cookie-banner__btn:hover {
  background: var(--clr-accent-hover);
}

.cookie-banner__actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.cookie-banner__btn--outline {
  background: transparent;
  color: var(--clr-text);
  border: 1px solid var(--clr-border);
}

.cookie-banner__btn--outline:hover {
  background: var(--clr-bg-warm);
}

/* Breadcrumbs */
.breadcrumbs {
  padding: 16px 0;
  font-size: var(--fs-sm);
  color: var(--clr-text-muted);
}

.breadcrumbs a {
  color: var(--clr-text-soft);
}

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

.breadcrumbs .sep {
  margin: 0 8px;
  opacity: 0.5;
}

/* Search Modal */
.search-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding-top: 10vh;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.search-modal.active {
  display: flex;
  opacity: 1;
}

.search-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
}

.search-modal__content {
  position: relative;
  width: 90%;
  max-width: 600px;
  background: var(--clr-surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-hover);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transform: translateY(-20px);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.search-modal.active .search-modal__content {
  transform: translateY(0);
}

.search-modal__header {
  display: flex;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--clr-border);
  background: var(--clr-bg-warm);
}

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

.search-modal__header input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  padding: 0 16px;
  font-size: var(--fs-md);
  color: var(--clr-text);
  font-family: var(--ff-body);
}

.search-modal__esc {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--clr-text-muted);
  background: var(--clr-border);
  padding: 4px 8px;
  border-radius: 4px;
  letter-spacing: 1px;
}

.search-modal__results {
  max-height: 50vh;
  overflow-y: auto;
  padding: 8px 0;
}

.search-modal__empty {
  padding: 20px;
  text-align: center;
  color: var(--clr-text-muted);
  font-size: var(--fs-sm);
}

.search-modal__item {
  display: flex;
  flex-direction: column;
  padding: 12px 20px;
  text-decoration: none;
  border-bottom: 1px solid var(--clr-border);
  transition: background var(--transition);
}

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

.search-modal__item:hover {
  background: var(--clr-bg-warm);
}

.search-modal__item-title {
  font-weight: 600;
  color: var(--clr-text);
  margin-bottom: 4px;
}

.search-modal__item-meta {
  font-size: var(--fs-xs);
  color: var(--clr-text-muted);
}
@media (max-width: 1024px) {
  .footer__grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
}

@media (max-width: 768px) {
  .navbar__links {
    display: none;
  }

  .navbar__actions {
    display: none;
  }

  .navbar__hamburger {
    display: flex;
  }

  .navbar {
    padding: 12px 0;
  }

  .navbar.scrolled {
    padding: 10px 0;
  }

  .navbar__inner {
    height: auto;
    min-height: 48px;
  }

  .navbar__logo {
    font-size: var(--fs-lg);
  }

  .announcement-bar {
    font-size: 0.75rem;
    padding: 8px 12px;
    letter-spacing: 0.5px;
  }

  .section-title {
    font-size: var(--fs-xl);
  }

  .section-subtitle {
    font-size: var(--fs-base);
  }

  .footer {
    padding: 40px 0 0;
  }

  .footer__grid {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 28px;
  }

  .footer__brand p {
    max-width: 100%;
  }

  .footer__socials {
    justify-content: center;
  }

  .back-to-top {
    bottom: 20px;
    right: 20px;
    width: 42px;
    height: 42px;
  }

  .container {
    width: 92%;
  }

  .cookie-banner__inner {
    flex-direction: column;
    text-align: center;
  }

  .search-modal {
    padding-top: 4vh;
  }

  .search-modal__content {
    width: 95%;
    max-height: 85vh;
  }

  .search-modal__header {
    padding: 14px 16px;
  }

  .search-modal__header input {
    font-size: var(--fs-base);
    padding: 0 12px;
  }
}

@media (max-width: 480px) {
  .announcement-bar {
    font-size: 0.7rem;
    padding: 6px 10px;
  }

  .section-title {
    font-size: var(--fs-lg);
  }

  .cookie-banner__actions {
    flex-direction: column;
    width: 100%;
  }

  .cookie-banner__btn {
    width: 100%;
    text-align: center;
  }

  .footer__col h4 {
    font-size: var(--fs-sm);
    margin-bottom: 12px;
  }

  .back-to-top {
    bottom: 16px;
    right: 16px;
    width: 38px;
    height: 38px;
  }
}

/* ============================================
   Phase 3 — Visual / UX Upgrades
   ============================================ */

/* Smooth dark mode transition — targeted selectors only */
body,
.navbar,
.post-card,
.post-card__body,
.post-card__title,
.post-card__excerpt,
.post-card__meta,
.post-card__tag,
.post-card__tags span,
.footer,
.footer__col a,
.cookie-banner,
.newsletter__card,
.newsletter__form input,
.newsletter__form button,
.search-input,
.search-modal__content,
.search-modal__header,
.back-to-top,
.about-banner,
.category-card,
.toc,
.comment-card,
.author-profile,
.post-page__body,
.breadcrumbs,
.section-title,
.section-label,
.section-subtitle,
.contact-card,
.contact-info__item,
.unsub-card,
.btn-outline,
.theme-toggle,
.nav-search-btn,
.navbar__cta,
.mobile-menu {
  transition:
    background-color 0.3s ease,
    color 0.2s ease,
    border-color 0.3s ease,
    box-shadow 0.3s ease;
}

/* Page fade-in */
body {
  animation: pageFadeIn 0.4s ease-out;
}

@keyframes pageFadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

/* Staggered card reveal */
.reveal.visible {
  animation: cardReveal 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

@keyframes cardReveal {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.97);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.posts-grid .reveal:nth-child(1) {
  animation-delay: 0ms;
}

.posts-grid .reveal:nth-child(2) {
  animation-delay: 80ms;
}

.posts-grid .reveal:nth-child(3) {
  animation-delay: 160ms;
}

.posts-grid .reveal:nth-child(4) {
  animation-delay: 240ms;
}

.posts-grid .reveal:nth-child(5) {
  animation-delay: 320ms;
}

.posts-grid .reveal:nth-child(6) {
  animation-delay: 400ms;
}

/* Skeleton loading animation */
.skeleton {
  background: linear-gradient(90deg, var(--clr-bg-warm) 25%, var(--clr-bg-blush) 50%, var(--clr-bg-warm) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: var(--radius-sm);
}

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

.skeleton-card {
  background: var(--clr-surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--clr-border);
}

.skeleton-card__img {
  aspect-ratio: 16/10;
  background: linear-gradient(90deg, var(--clr-bg-warm) 25%, var(--clr-bg-blush) 50%, var(--clr-bg-warm) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
}

.skeleton-card__body {
  padding: 28px;
}

.skeleton-card__line {
  height: 14px;
  margin-bottom: 12px;
  border-radius: 7px;
}

.skeleton-card__line--title {
  height: 20px;
  width: 80%;
  margin-bottom: 16px;
}

.skeleton-card__line--short {
  width: 40%;
}

.skeleton-card__line--medium {
  width: 65%;
}

/* Button press effect */
button:active,
.btn-hero:active,
.hero__btn:active,
.navbar__cta:active,
.btn-outline:active {
  transform: scale(0.96) !important;
  transition: transform 0.1s ease !important;
}

/* Link underline animation */
.post-page__body a {
  text-decoration: none;
  background-image: linear-gradient(var(--clr-accent), var(--clr-accent));
  background-size: 0% 1.5px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: background-size 0.3s ease;
}

.post-page__body a:hover {
  background-size: 100% 1.5px;
}

/* Selection styling */
::selection {
  background: rgba(192, 139, 110, 0.25);
  color: var(--clr-text);
}

::-moz-selection {
  background: rgba(192, 139, 110, 0.25);
  color: var(--clr-text);
}

/* Drop cap */
.post-page__body > p:first-of-type::first-letter {
  font-family: var(--ff-heading);
  font-size: 3.5em;
  float: left;
  line-height: 0.8;
  margin: 4px 12px 0 0;
  color: var(--clr-accent);
  font-weight: 600;
}

@media (max-width: 768px) {
  .post-page__body > p:first-of-type::first-letter {
    font-size: 2.5em;
    margin: 2px 8px 0 0;
  }
}

/* Toast notification */
.toast {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 10000;
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  padding: 16px 24px;
  box-shadow: var(--shadow-hover);
  transform: translateX(120%);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  max-width: 360px;
  font-size: var(--fs-sm);
  display: flex;
  align-items: center;
  gap: 12px;
}

.toast.show {
  transform: translateX(0);
}

.toast.success {
  border-left: 4px solid var(--clr-success);
}

.toast.error {
  border-left: 4px solid var(--clr-danger);
}

.toast.info {
  border-left: 4px solid var(--clr-accent);
}

@media (max-width: 768px) {
  .toast {
    top: auto;
    bottom: 20px;
    left: 16px;
    right: 16px;
    max-width: none;
    transform: translateY(120%);
    border-radius: var(--radius-sm);
    padding: 14px 18px;
  }
  .toast.show {
    transform: translateY(0);
  }
}

/* Skip to content (accessibility) */
.skip-to-content {
  position: absolute;
  top: -100%;
  left: 16px;
  z-index: 9999;
  background: var(--clr-accent);
  color: #fff;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: var(--fs-sm);
  transition: top 0.2s ease;
}

.skip-to-content:focus {
  top: 16px;
}

/* Focus visible (accessibility) */
:focus-visible {
  outline: 2px solid var(--clr-accent);
  outline-offset: 2px;
  border-radius: 2px;
}

button:focus:not(:focus-visible),
a:focus:not(:focus-visible) {
  outline: none;
}

/* Smooth scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--clr-bg);
}

::-webkit-scrollbar-thumb {
  background: var(--clr-border);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--clr-text-muted);
}

/* Dark mode image dimming */
[data-theme='dark'] .post-card__img img,
[data-theme='dark'] .post-page__body img {
  filter: brightness(0.88);
  transition: filter 0.3s ease;
}

[data-theme='dark'] .post-card__img img:hover,
[data-theme='dark'] .post-page__body img:hover {
  filter: brightness(1);
}

/* Glass Card Dark Mode */
[data-theme='dark'] .glass-card {
  background: rgba(37, 31, 28, 0.6);
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

/* Reaction Button Active State */
.reaction-btn {
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.reaction-btn.active {
  background: var(--clr-accent) !important;
  color: #fff !important;
  border-color: var(--clr-accent) !important;
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(192, 139, 110, 0.3);
}

.reaction-btn:hover {
  transform: translateY(-3px) scale(1.05);
}

/* Tags Section Dark Mode Separator */
[data-theme='dark'] .tags-section {
  border-top: 1px solid var(--clr-border);
  border-bottom: 1px solid var(--clr-border);
}

/* Related Posts Title */
.related-posts__title {
  font-family: var(--ff-heading);
  font-size: var(--fs-xl);
  font-weight: 600;
  color: var(--clr-text);
  text-align: center;
}
