/* =========================================
   1. CORE VARIABLES & RESET
   ========================================= */
:root {
  --bg: #050505;
  --surface: #0a0a0a;
  --primary: #18479f;
  --text-main: #ffffff;
  --text-muted: #999;
  --border-dim: #222;
  --font-head: "Syne", sans-serif;
  --font-body: "Manrope", sans-serif;
  --ease-flow: cubic-bezier(0.25, 1, 0.5, 1);
  --nav-height: 80px;
}

[data-theme="light"] {
  --bg: #ffffff;
  --surface: #f4f4f4;
  --text-main: #050505;
  --text-muted: #555;
  --border-dim: #e0e0e0;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

/* =========================================
   CUSTOM TEXT SELECTION
   ========================================= */
::selection {
  background-color: #e7b860; 
  color: var(--bg);         
}

::-moz-selection {
  background-color: #e7b860;
  color: var(--bg);
}

img::selection,
.logo::selection,
.f-logo-lg::selection {
  background-color: #e7b860 !important;
}

img::-moz-selection,
.logo::-moz-selection,
.f-logo-lg::-moz-selection {
  background-color: #e7b860 !important;
}

[data-theme="light"] .f-logo-lg::selection {
  background-color: #0d3c94 !important; 
}

[data-theme="light"] .f-logo-lg::-moz-selection {
  background-color: #0d3c94 !important;
}

/* 1. Firefox Standard */
html {
  scrollbar-width: thin;
  /* Uses your existing border color for the thumb, background for the track */
  scrollbar-color: var(--border-dim) var(--bg);
}

/* 2. Webkit (Chrome, Edge, Safari) */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  /* CHANGED: Uses --border-dim because --surface-light doesn't exist in this file */
  background-color: var(--border-dim);
  border-radius: 10px;
  border: 3px solid var(--bg);
  /* Creates the floating effect */
  transition: background-color 0.3s ease;
}

/* Hover Effect */
::-webkit-scrollbar-thumb:hover {
  /* Uses your existing muted text color for visibility */
  background-color: var(--text-muted);
}

/* Active/Click Effect */
::-webkit-scrollbar-thumb:active {
  background-color: var(--primary);
}

html {
  overflow-x: hidden;
}

body {
  background-color: var(--bg);
  color: var(--text-main);
  font-family: var(--font-body);
  width: 100%;
  overflow-x: hidden;
  line-height: 1.6;
  transition: background 0.3s, color 0.3s;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

a {
  text-decoration: none;
  color: inherit;
  transition: 0.3s;
}

img {
  width: 100%;
  display: block;
  object-fit: cover;
  /* border-radius: 12px; */
}

/* SHARP ELEMENTS */
button,
.btn,
input,
textarea,
.share-btn,
.btn-sharp,
.f-contact-btn {
  border-radius: 0 !important;
  cursor: pointer;
}

/* =========================================
   2. NAVBAR
   ========================================= */
nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--nav-height);
  padding: 0 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(5, 5, 5, 0);
  backdrop-filter: blur(12px);
  z-index: 1000;
  border-bottom: 1px solid rgba(255, 255, 255, 0.02);
}

[data-theme="light"] nav {
  background: rgba(255, 255, 255, 0.6);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.logo {
  width: 95px;
}

[data-theme="light"] .logo {
  filter: brightness(0);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 30px;
}

.desktop-nav-items {
  display: flex;
  gap: 30px;
}

.nav-icon-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-link {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-main);
  text-transform: uppercase;
  letter-spacing: 1px;
  position: relative;
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--primary);
  transition: 0.3s;
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.nav-icon-btn {
  background: none;
  border: none;
  color: var(--text-main);
  font-size: 1.3rem;
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  transition: transform 0.3s ease, color 0.3s ease;
}

.nav-icon-btn:hover {
  color: var(--primary);
}

#themeToggle i {
  transition: transform 0.3s ease;
}

#themeToggle.animating i {
  animation: themeSwitch 0.4s ease;
}

@keyframes themeSwitch {
  0% {
    transform: scale(1);
    opacity: 1;
  }

  50% {
    transform: scale(0);
    opacity: 0;
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.hamburger-btn {
  display: none;
  background: none;
  border: none;
  font-size: 1.6rem;
  color: var(--text-main);
  padding: 0;
  z-index: 2001;
  cursor: pointer;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* MOBILE MENU */
.mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: rgba(5, 5, 5, 0.6);
  backdrop-filter: blur(20px);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 40px;
  transform: translateY(-100%);
  transition: transform 0.6s var(--ease-flow);
}

[data-theme="light"] .mobile-menu {
  background: rgba(255, 255, 255, 0.6);
}

.mobile-menu.active {
  transform: translateY(0);
}

.menu-close-btn {
  position: absolute;
  top: 30px;
  right: 5%;
  background: transparent;
  border: none;
  font-size: 2rem;
  color: var(--text-main);
}

.mobile-link {
  font-family: var(--font-head);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-main);
}

/* =========================================
   3. HOME GRID
   ========================================= */
.container {
  padding: 140px 5% 80px;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

.page-header {
  margin-bottom: 60px;
  text-align: center;
}

.page-title {
  font-family: var(--font-head);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  line-height: 1;
  margin-bottom: 15px;
}

.page-subtitle {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto;
}

/* =========================================
   NAVBAR INLINE SEARCH
   ========================================= */
.nav-search-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: auto;
  flex-shrink: 0;
}

.search-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s;
  z-index: 999;
  will-change: opacity;
}

.search-backdrop.active {
  opacity: 1;
  visibility: visible;
}

.nav-search-bar {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  opacity: 0;
  overflow: hidden;
  transition: width 0.4s ease, opacity 0.3s ease;
  pointer-events: none;
  display: flex;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border-dim);
  white-space: nowrap;
  height: 40px;
  z-index: 1001;
  border-radius: 24px;
}

.nav-search-bar.active {
  width: 350px;
  opacity: 1;
  pointer-events: auto;
}

.nav-icon-btn {
  flex-shrink: 0;
  position: relative;
  z-index: 1001;
}

.nav-search-icon {
  position: absolute;
  left: 15px;
  font-size: 1.1rem;
  color: var(--text-muted);
  pointer-events: none;
}

.nav-search-input {
  width: 100%;
  padding: 10px 70px 10px 45px;
  background: transparent;
  border: none;
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 0.9rem;
  outline: none;
}

.nav-search-input::placeholder {
  color: var(--text-muted);
}

.nav-clear-btn {
  position: absolute;
  right: 40px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1rem;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color 0.3s;
  border-radius: 4px !important;
}

.nav-clear-btn:hover {
  color: var(--text-main);
}

.search-dropdown {
  position: fixed;
  top: calc(var(--nav-height) + 10px);
  right: 5%;
  width: 420px;
  max-width: calc(100vw - 10%);
  max-height: 70vh;
  background: var(--surface);
  border: 1px solid var(--border-dim);
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
  overflow: hidden;
  z-index: 1000;
}

.search-dropdown.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.search-loading {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  gap: 16px;
}

.search-loading.active {
  display: flex;
}

.spinner {
  width: 28px;
  height: 28px;
  border: 2.5px solid var(--border-dim);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.search-loading span {
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 500;
}

.search-dropdown-results {
  max-height: 70vh;
  overflow-y: auto;
  padding: 12px;
}

.search-dropdown-results::-webkit-scrollbar {
  width: 6px;
}

.search-dropdown-results::-webkit-scrollbar-track {
  background: transparent;
}

.search-dropdown-results::-webkit-scrollbar-thumb {
  background: var(--border-dim);
  border-radius: 3px;
}

.search-dropdown-results::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

.search-result-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border-radius: 10px;
  transition: all 0.2s ease;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  margin-bottom: 6px;
}

.search-result-item:hover {
  background: var(--bg);
}

.search-result-item:last-child {
  margin-bottom: 0;
}

.search-result-thumb {
  width: 64px;
  height: 64px;
  flex-shrink: 0;
  border-radius: 8px;
  overflow: hidden;
  background: var(--border-dim);
}

.search-result-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.search-result-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.search-result-title {
  font-family: var(--font-head);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-main);
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-result-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.search-no-results {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.search-no-results i {
  font-size: 3rem;
  margin-bottom: 16px;
  opacity: 0.3;
}

.search-no-results p {
  font-size: 0.9rem;
  line-height: 1.5;
}

.search-results-banner {
  position: fixed;
  top: var(--nav-height);
  left: 0;
  width: 100%;
  padding: 12px 5%;
  background: var(--surface);
  border-bottom: 1px solid var(--border-dim);
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-muted);
  z-index: 999;
  display: none;
}

.no-results {
  text-align: center;
  padding: 80px 20px;
  color: var(--text-muted);
}

.no-results i {
  font-size: 4rem;
  margin-bottom: 20px;
  opacity: 0.3;
}

.no-results p {
  font-size: 1.1rem;
  color: var(--text-muted);
}

/* Empty State */
.empty-state {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 100px 20px;
}

.empty-state-icon {
  width: 100px;
  height: 80px;
  margin-bottom: 40px;
}

/* Film strip animation */
.film-strip {
  position: relative;
  width: 100%;
  height: 100%;
  border: 3px solid #666;
  border-radius: 4px;
  overflow: hidden;
}

[data-theme="light"] .film-strip {
  border-color: #bbb;
}

.film-strip::before,
.film-strip::after {
  content: "";
  position: absolute;
  top: 0;
  width: 12px;
  height: 100%;
  background: repeating-linear-gradient(to bottom,
      #666 0px,
      #666 8px,
      transparent 8px,
      transparent 16px);
}

[data-theme="light"] .film-strip::before,
[data-theme="light"] .film-strip::after {
  background: repeating-linear-gradient(to bottom,
      #bbb 0px,
      #bbb 8px,
      transparent 8px,
      transparent 16px);
}

.film-strip::before {
  left: 0;
}

.film-strip::after {
  right: 0;
}

.film-frames {
  position: absolute;
  left: 16px;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  gap: 4px;
  animation: scroll-frames 2s linear infinite;
}

.film-frames span {
  flex-shrink: 0;
  width: 20px;
  height: 50px;
  background: #666;
  opacity: 0.6;
}

[data-theme="light"] .film-frames span {
  background: #bbb;
}

@keyframes scroll-frames {
  0% {
    transform: translateY(-50%) translateX(0);
  }

  100% {
    transform: translateY(-50%) translateX(-48px);
  }
}

.empty-state h3 {
  font-family: var(--font-head);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 12px;
}

.empty-state p {
  font-size: 1rem;
  color: var(--text-muted);
}

@media (max-width: 768px) {
  .desktop-nav-items {
    display: none;
  }

  .hamburger-btn {
    display: flex;
  }

  .nav-right {
    gap: 12px;
  }

  .nav-icon-group {
    gap: 12px;
  }

  .nav-icon-btn {
    width: 32px;
    height: 32px;
    font-size: 1.2rem;
    padding: 0;
  }

  .hamburger-btn {
    width: 32px;
    height: 32px;
    font-size: 1.5rem;
    padding: 0;
  }

  .nav-search-bar.active {
    width: 220px;
  }

  .nav-search-input {
    font-size: 0.85rem;
  }

  .search-dropdown {
    width: 360px;
    right: 3%;
    max-width: 94vw;
  }
}

@media (max-width: 600px) {
  .nav-icon-group {
    gap: 12px;
  }

  .nav-icon-btn {
    width: 30px;
    height: 30px;
    font-size: 1.1rem;
    padding: 0;
  }

  .hamburger-btn {
    width: 30px;
    height: 30px;
    font-size: 1.4rem;
    padding: 0;
  }

  .nav-search-bar.active {
    width: 180px;
  }

  .nav-search-input {
    font-size: 0.8rem;
    padding: 8px 70px 8px 40px;
  }

  .search-dropdown {
    width: 90vw;
    right: 5vw;
    max-height: 60vh;
  }

  .search-result-item {
    gap: 10px;
    padding: 10px;
  }

  .search-result-thumb {
    width: 50px;
    height: 50px;
  }

  .search-result-title {
    font-size: 0.85rem;
  }

  .search-result-desc {
    font-size: 0.7rem;
  }
}

@media (max-width: 450px) {
  .nav-search-bar.active {
    width: 140px;
  }

  .nav-search-input {
    font-size: 0.75rem;
    padding: 8px 65px 8px 35px;
  }

  .nav-search-icon {
    left: 10px;
  }
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 30px;
}

/* CARD - Modern Design */
.card {
  background: var(--surface);
  border: 1px solid var(--border-dim);
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.4s ease,
    border-color 0.3s ease;
  height: 100%;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
  border-color: var(--primary);
}

[data-theme="light"] .card {
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
  background: #fff;
}

[data-theme="light"] .card:hover {
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

.card-img-wrap {
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
  position: relative;
}

.card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
  border-radius: 0;
}

.card:hover .card-img {
  transform: scale(1.08);
}

.card-body {
  padding: 28px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.card-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-meta {
  font-size: 0.7rem;
  color: var(--primary);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

.card-date {
  font-size: 0.7rem;
  color: var(--text-muted);
  opacity: 0.7;
}

.card-title {
  font-family: var(--font-head);
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-main);
  transition: color 0.3s ease;
}

.card:hover .card-title {
  color: var(--primary);
}

.card-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
  flex-grow: 1;
}

@media (max-width: 600px) {
  .container {
    padding-left: 20px;
    padding-right: 20px;
  }

  .grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .page-title {
    font-size: 2.5rem;
  }

  .card-body {
    padding: 22px;
  }

  .card-title {
    font-size: 1.15rem;
  }
}

/* =========================================
   4. POST TEMPLATE
   ========================================= */
.post-wrapper {
  margin-top: 120px;
  padding: 0 5% 40px;
  /* Reduced from 100px to 40px */
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
  position: relative;
}

.article-content {
  max-width: 800px;
}



/* Header */
.stacked-header {
  margin-bottom: 50px;
  max-width: 800px;
}

.ph-cat {
  display: inline-block;
  padding: 5px 12px;
  border: 1px solid var(--border-dim);
  color: var(--primary);
  font-size: 0.75rem;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 20px;
  letter-spacing: 1px;
}

.ph-title {
  font-family: var(--font-head);
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 800;
  line-height: 1.1;
  color: var(--text-main);
  margin-bottom: 15px;
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
}

.ph-meta-row {
  display: flex;
  gap: 15px;
  align-items: center;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text-muted);
}

.ph-dot {
  width: 4px;
  height: 4px;
  background: var(--border-dim);
  border-radius: 50%;
}

.hero-image {
  width: 100%;
  aspect-ratio: 21/9;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 80px;
  border: 1px solid var(--border-dim);
}

.article-content {
  max-width: 700px;
  margin: 0 auto;
  font-size: 1.125rem;
  line-height: 1.8;
  color: var(--text-main);
}

.article-content p {
  margin-bottom: 1.8rem;
  color: #ccc;
}

[data-theme="light"] .article-content p {
  color: #333;
}

.article-content h2 {
  font-family: var(--font-head);
  font-size: 1.75rem;
  font-weight: 700;
  margin: 3.5rem 0 1.5rem;
  color: var(--text-main);
}

.article-content ul {
  margin-bottom: 2rem;
  padding-left: 20px;
  color: var(--text-muted);
}

.article-content li {
  margin-bottom: 10px;
}

.article-content blockquote {
  background: var(--surface);
  border-left: 3px solid var(--primary);
  padding: 25px 30px;
  margin: 3rem 0;
  font-family: var(--font-head);
  font-size: 1.2rem;
  color: var(--text-main);
  line-height: 1.5;
  font-style: italic;
  border-radius: 12px;
}

@media (max-width: 768px) {
  .post-wrapper {
    padding-left: 20px;
    padding-right: 20px;
  }

  .hero-image {
    aspect-ratio: 16/9;
  }
}

/* =========================================
   5. SHARE BAR
   ========================================= */
.share-bar-container {
  max-width: 700px;
  margin: 30px auto 0;
  /* Reduced to 30px */
  padding-top: 30px;
  border-top: 1px solid var(--border-dim);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.share-label {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.share-icons {
  display: flex;
  gap: 10px;
}

.share-btn {
  background: var(--surface);
  border: 1px solid var(--border-dim);
  color: var(--text-muted);
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  transition: 0.3s;
}

.share-btn:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  transform: translateY(-2px);
}

/* =========================================
   SUGGESTIONS SECTION
   ========================================= */
.suggestions-section {
  max-width: 1400px;
  margin: 0 auto;
  padding: 60px 5% 80px;
}

.suggestions-title {
  font-family: var(--font-head);
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 30px;
  color: var(--text-main);
}

.suggestion-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.suggestion-grid .card {
  background: var(--surface);
}

/* =========================================
   7. 404 PAGE STYLES
   ========================================= */
.error-page-container {
  flex: 1;
  /* GROWS to fill all available space */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  /* Top padding ensures it clears the fixed navbar */
  padding: var(--nav-height) 5% 0;
  width: 100%;
}

.error-code {
  font-family: var(--font-head);
  font-size: clamp(6rem, 15vw, 12rem);
  font-weight: 800;
  line-height: 0.8;
  color: var(--surface);
  /* Dark grey text */
  /* Text Stroke for Outline Effect */
  -webkit-text-stroke: 2px var(--border-dim);
  margin-bottom: 20px;
  user-select: none;
}

.error-title {
  font-family: var(--font-head);
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-main);
  text-transform: uppercase;
  margin-bottom: 15px;
}

.error-desc {
  color: var(--text-muted);
  font-size: 1rem;
  max-width: 400px;
  margin-bottom: 40px;
}

/* =========================================
   6. FOOTER
   ========================================= */
.site-footer {
  border-top: 1px solid var(--border-dim);
  background: var(--surface);
  /* Desktop Spacing: 
       Right padding increased to 120px to effectively reserve 
       space for the fixed 'Back to Top' button so it never 
       overlaps the CTA.
    */
  padding: 45px 120px 45px 5%;
  margin-top: auto;
  position: relative;
}

.footer-content {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 40px;
}

/* Left: Identity */
.f-brand-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
  justify-content: center;
}

.f-logo-lg {
  width: 180px;
  height: auto;
  /* mix-blend-mode: difference; */
  border-radius: 0;
  margin: 0;
  padding: 0;
  display: block;
}

[data-theme="light"] .f-logo-lg {
  filter: brightness(0); 
}

.f-copy-text {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.5px;
  margin: 0;
  padding: 0;
  padding-left: 2px;
}

/* Right: Action Column */
.f-action-col {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 18px;
}

/* Contact Button */
.f-contact-btn {
  display: inline-block;
  background: var(--text-main);
  color: var(--bg);
  padding: 12px 32px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  border: 1px solid var(--text-main);
  transition: 0.3s all cubic-bezier(0.25, 1, 0.5, 1);
  border-radius: 0 !important;
}

.f-contact-btn:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  transform: translateY(-2px);
}

.f-socials {
  display: flex;
  gap: 20px;
}

.f-social-icon {
  font-size: 1.4rem;
  color: var(--text-muted);
  transition: 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.f-social-icon:hover {
  color: var(--primary);
  transform: translateY(-3px);
}

/* Mobile Footer Fixes */
@media (max-width: 768px) {
  .site-footer {
    padding: 40px 5% 30px;
  }

  .footer-content {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 25px;
  }

  /* Order: Action Top (1), Brand Bottom (2) */
  .f-action-col {
    order: 1;
    align-items: center;
    width: 100%;
    gap: 15px;
  }

  .f-brand-col {
    order: 2;
    align-items: center;
    gap: 6px;
  }

  .f-logo-lg {
    width: 140px;
  }

  .f-copy-text {
    font-size: 0.75rem;
    padding-left: 0;
  }

  .f-contact-btn {
    width: 100%;
    max-width: 260px;
    padding: 10px 28px;
    font-size: 0.8rem;
  }

  .f-socials {
    gap: 18px;
  }

  .f-social-icon {
    font-size: 1.25rem;
  }

  /* Suggestion horizontal scroller */
  .suggestions-section {
    padding-left: 5%;
    padding-right: 0;
    overflow: hidden;
    max-width: 100vw;
  }

  .suggestions-title {
    padding-left: 0;
  }

  .suggestion-grid {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 16px;
    padding: 0 0 16px 0;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
  }

  .suggestion-grid .card {
    flex: 0 0 280px;
    scroll-snap-align: start;
    min-width: 280px;
  }

  .suggestion-grid .card:last-child {
    margin-right: 20px;
  }

  /* Scrollbar styling */
  .suggestion-grid {
    scrollbar-width: thin;
    scrollbar-color: var(--border-dim) transparent;
  }

  .suggestion-grid::-webkit-scrollbar {
    height: 4px;
  }

  .suggestion-grid::-webkit-scrollbar-track {
    background: transparent;
    margin: 0 5%;
  }

  .suggestion-grid::-webkit-scrollbar-thumb {
    background: var(--border-dim);
    border-radius: 4px;
  }

  .suggestion-grid::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
  }
}

.page-header {
  position: relative;
  text-align: center;
  padding: 140px 20px;
  margin-bottom: 60px;
  cursor: default;
  overflow: hidden;
  background-color: var(--bg);
  border-bottom: 1px solid var(--border-dim);
}

/* --- LAYER 1: THE TEXTURE (Theme: Grey) --- Role: Background noise. Transition: Smooth ease-out for movement. */
.page-header::before {
  content: "";
  position: absolute;
  inset: -50px;
  /* Large bleed area to allow rotation without showing edges */
  pointer-events: none;
  z-index: 0;
  background-color: var(--text-muted);
  opacity: 0.3;
  /* The Mask: Dense dots/squares */
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 300 300' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='black'%3E%3Ccircle cx='20' cy='30' r='1.5'/%3E%3Ccircle cx='250' cy='50' r='1.5'/%3E%3Ccircle cx='150' cy='250' r='1.5'/%3E%3Ccircle cx='80' cy='180' r='1.5'/%3E%3Crect x='100' y='50' width='3' height='3'/%3E%3Crect x='220' y='220' width='3' height='3' transform='rotate(45 221 221)'/%3E%3Crect x='50' y='250' width='2' height='2'/%3E%3Crect x='200' y='100' width='4' height='4'/%3E%3Ccircle cx='250' cy='250' r='1'/%3E%3Ccircle cx='100' cy='100' r='1'/%3E%3Crect x='280' y='150' width='3' height='3'/%3E%3Ccircle cx='180' cy='20' r='1.5'/%3E%3Crect x='20' y='280' width='3' height='3'/%3E%3C/g%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 300 300' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='black'%3E%3Ccircle cx='20' cy='30' r='1.5'/%3E%3Ccircle cx='250' cy='50' r='1.5'/%3E%3Ccircle cx='150' cy='250' r='1.5'/%3E%3Ccircle cx='80' cy='180' r='1.5'/%3E%3Crect x='100' y='50' width='3' height='3'/%3E%3Crect x='220' y='220' width='3' height='3' transform='rotate(45 221 221)'/%3E%3Crect x='50' y='250' width='2' height='2'/%3E%3Crect x='200' y='100' width='4' height='4'/%3E%3Ccircle cx='250' cy='250' r='1'/%3E%3Ccircle cx='100' cy='100' r='1'/%3E%3Crect x='280' y='150' width='3' height='3'/%3E%3Ccircle cx='180' cy='20' r='1.5'/%3E%3Crect x='20' y='280' width='3' height='3'/%3E%3C/g%3E%3C/svg%3E");
  -webkit-mask-size: 300px 300px;
  mask-size: 300px 300px;
  /* Standard state: No rotation */
  transform: scale(1) rotate(0deg);
  transition: transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* --- LAYER 2: THE ACCENTS (Theme: Blue) --- Role: Foreground wireframes. */
.page-header::after {
  content: "";
  position: absolute;
  inset: -60px;
  /* Extra large bleed for bigger movement */
  pointer-events: none;
  z-index: 0;
  background-color: var(--primary);
  opacity: 0.6;
  /* The Mask: Random Wireframes */
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 500 500' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='black' stroke-width='1'%3E%3C!-- Cluster 1 --%3E%3Cpolygon points='50,50 80,100 20,100' transform='rotate(15 50 75)'/%3E%3Ccircle cx='250' cy='100' r='20'/%3E%3Crect x='150' y='200' width='30' height='30' transform='rotate(20 165 215)'/%3E%3Cpath d='M400 200 L440 180'/%3E%3C!-- Cluster 2 --%3E%3Ccircle cx='100' cy='400' r='15'/%3E%3Cpolygon points='400,300 430,350 370,350' transform='rotate(-45 400 325)'/%3E%3Crect x='350' y='400' width='25' height='25' transform='rotate(-10 362 412)'/%3E%3Cpath d='M200 350 L230 350 M215 335 L215 365'/%3E%3C!-- Cluster 3 --%3E%3Ccircle cx='450' cy='50' r='25'/%3E%3Crect x='300' y='50' width='20' height='20' transform='rotate(30 310 60)'/%3E%3Cpath d='M50 200 L90 200 M70 180 L70 220'/%3E%3Cpath d='M10 10 L40 40 M40 10 L10 40' transform='translate(100 250)'/%3E%3C/g%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 500 500' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='black' stroke-width='1'%3E%3C!-- Cluster 1 --%3E%3Cpolygon points='50,50 80,100 20,100' transform='rotate(15 50 75)'/%3E%3Ccircle cx='250' cy='100' r='20'/%3E%3Crect x='150' y='200' width='30' height='30' transform='rotate(20 165 215)'/%3E%3Cpath d='M400 200 L440 180'/%3E%3C!-- Cluster 2 --%3E%3Ccircle cx='100' cy='400' r='15'/%3E%3Cpolygon points='400,300 430,350 370,350' transform='rotate(-45 400 325)'/%3E%3Crect x='350' y='400' width='25' height='25' transform='rotate(-10 362 412)'/%3E%3Cpath d='M200 350 L230 350 M215 335 L215 365'/%3E%3C!-- Cluster 3 --%3E%3Ccircle cx='450' cy='50' r='25'/%3E%3Crect x='300' y='50' width='20' height='20' transform='rotate(30 310 60)'/%3E%3Cpath d='M50 200 L90 200 M70 180 L70 220'/%3E%3Cpath d='M10 10 L40 40 M40 10 L10 40' transform='translate(100 250)'/%3E%3C/g%3E%3C/svg%3E");
  -webkit-mask-size: 500px 500px;
  mask-size: 500px 500px;
  transform: scale(1) rotate(0deg);
  transition: transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* --- LIGHT MODE ADJUSTMENT --- */
[data-theme="light"] .page-header::before {
  opacity: 0.15;
}

[data-theme="light"] .page-header::after {
  opacity: 0.25;
}

/* --- HOVER EFFECTS (Desktop Only) --- */
@media (min-width: 768px) {

  /* 1. TEXT EFFECTS */
  .page-header:hover .page-title {
    color: transparent;
    -webkit-text-stroke: 1px rgba(255, 255, 255, 0.5);
    letter-spacing: 0.1em;
    transform: scale(1.02);
    text-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
  }

  [data-theme="light"] .page-header:hover .page-title {
    -webkit-text-stroke: 1px rgba(0, 0, 0, 0.6);
    text-shadow: none;
  }

  .page-header:hover .page-subtitle {
    color: var(--text-main);
    background-size: 100% 1px;
  }

  /* 2. CHAOS MOVEMENT (Move away + Rotate) - Layer 1: Expands + Rotates Clockwise - Layer 2: Expands more + Rotates Counter-Clockwise This kills the linear "Zoom" feel. */
  .page-header:hover::before {
    transform: scale(1.1) rotate(3deg);
  }

  .page-header:hover::after {
    transform: scale(1.15) rotate(-4deg);
  }
}

/* --- TYPOGRAPHY PRESERVED --- */
.page-title {
  font-family: var(--font-head);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 20px;
  position: relative;
  z-index: 2;
  color: var(--text-main);
  -webkit-text-stroke: 1px transparent;
  transition: all 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
  letter-spacing: -0.03em;
  transform-origin: center;
}

.page-subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
  display: inline-block;
  padding-bottom: 5px;
  background-image: linear-gradient(var(--primary), var(--primary));
  background-size: 0% 1px;
  background-repeat: no-repeat;
  background-position: center bottom;
  transition: background-size 0.4s cubic-bezier(0.2, 0.8, 0.2, 1),
    color 0.3s ease;
}

@media (max-width: 600px) {
  .container {
    padding-left: 20px;
    padding-right: 20px;
  }

  /* NEW: drastically reduce header height on mobile */
  .page-header {
    padding: 70px 20px;
    /* Was 140px */
    margin-bottom: 40px;
    /* Was 60px */
  }

  .grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .page-title {
    font-size: 2rem;
    /* Reduced from 2.5rem for better mobile fit */
  }

  .card-body {
    padding: 22px;
  }

  .card-title {
    font-size: 1.15rem;
  }
}

/* =========================================
   LOAD MORE BUTTON & SPINNER
   ========================================= */
.load-more-wrapper {
  text-align: center;
  margin-top: 60px;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

.btn-load-more {
  background: transparent;
  border: 1px solid var(--border-dim);
  color: var(--text-main);
  padding: 14px 40px;
  font-family: var(--font-head);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-size: 0.85rem;
  transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.btn-load-more:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.btn-load-more.hidden {
  display: none;
}

.load-more-spinner {
  display: none;
  width: 30px;
  height: 30px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

[data-theme="light"] .load-more-spinner {
  border-color: rgba(0, 0, 0, 0.1);
  border-top-color: var(--primary);
}

.load-more-spinner.active {
  display: block;
}

.error-button-group {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: nowrap;
  /* Forces them to stay on one line */
}

/* =========================================
   9. LIKE BUTTON (Original Minimal + Syne Font)
   ========================================= */
.like-section {
  max-width: 700px;
  margin: 40px auto 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  padding-bottom: 30px;
}

.like-button {
  background: var(--surface);
  /* Kept the clean surface background */
  border: 1px solid var(--border-dim);
  /* Thin, minimal border */
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 24px;
  /* Balanced padding */
  border-radius: 50px !important;
  transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
  min-width: 100px;
  justify-content: center;
}

/* Hover State */
.like-button:hover {
  transform: translateY(-2px);
  border-color: var(--text-muted);
}

/* Liked State */
.like-button.liked {
  border-color: #e91e63;
  background: rgba(233, 30, 99, 0.05);
}

.heart-bg {
  width: 20px;
  height: 20px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.heart-icon {
  width: 20px;
  height: 20px;
  background-color: var(--text-muted);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24'%3E%3Cpath fill='none' d='M0 0H24V24H0z'/%3E%3Cpath d='M12.001 4.529c2.349-2.109 5.979-2.039 8.242.228 2.262 2.268 2.34 5.88.236 8.236l-8.48 8.492-8.478-8.492c-2.104-2.356-2.025-5.974.236-8.236 2.265-2.264 5.888-2.34 8.244-.228z'/%3E%3C/svg%3E");
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24'%3E%3Cpath fill='none' d='M0 0H24V24H0z'/%3E%3Cpath d='M12.001 4.529c2.349-2.109 5.979-2.039 8.242.228 2.262 2.268 2.34 5.88.236 8.236l-8.48 8.492-8.478-8.492c-2.104-2.356-2.025-5.974.236-8.236 2.265-2.264 5.888-2.34 8.244-.228z'/%3E%3C/svg%3E");
  -webkit-mask-size: cover;
  mask-size: cover;
  transition: 0.3s;
}

/* Liked State Animation */
.like-button.liked .heart-icon {
  background-color: #e91e63;
  animation: heartPump 0.4s ease-out;
}

.like-button.liked .like-count {
  color: #e91e63;
}

.like-count {
  font-family: var(--font-head);
  /* UPDATED: Uses Syne font */
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text-main);
  line-height: 1;
  padding-top: 2px;
  /* Visual alignment fix for Syne font */
}

.like-label {
  font-family: var(--font-head);
  /* UPDATED: Uses Syne font */
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}

@keyframes heartPump {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.3);
  }

  100% {
    transform: scale(1);
  }
}

/* Mobile Friendly Tweaks */
@media (max-width: 600px) {
  .like-button {
    padding: 12px 30px;
    /* Slightly larger hit area for fingers */
  }

  .like-section {
    margin-top: 30px;
  }
}

/* =========================================
   8. COMMENT SECTION (Final Polish v3)
   ========================================= */
.comments-wrapper {
  max-width: 800px;
  width: 100%;
  margin: 10px auto 120px;
  /* Kept the balanced spacing */
  padding: 0 5%;
}

.harsx-comments {
  border-top: 1px solid var(--border-dim);
  padding-top: 60px;
}

/* --- HEADER: Clean Text (No Dot) --- */
.harsx-comments h3 {
  font-family: var(--font-head);
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 40px;
  color: var(--text-main);
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 15px;
}

/* --- 1. COMPACT INPUT --- */
.comment-input-box {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 30px;
}

.comment-input-box input,
.comment-input-box textarea {
  width: 100%;
  padding: 12px 0;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border-dim);
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 1rem;
  border-radius: 0;
  transition: all 0.3s ease;
}

.comment-input-box textarea {
  min-height: 50px;
  resize: vertical;
}

.comment-input-box input:focus,
.comment-input-box textarea:focus {
  outline: none;
  border-bottom-color: var(--primary);
}

.input-error {
  border-bottom-color: #ff4d4d !important;
  animation: shake 0.3s ease-in-out;
}

@keyframes shake {

  0%,
  100% {
    transform: translateX(0);
  }

  25% {
    transform: translateX(-5px);
  }

  75% {
    transform: translateX(5px);
  }
}

.comment-input-box button {
  align-self: flex-end;
  margin-top: 10px;
  background: var(--text-main);
  color: var(--bg);
  padding: 12px 30px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  border: none;
  cursor: pointer;
  transition: 0.2s;
}

.comment-input-box button:hover {
  background: var(--primary);
  color: #fff;
  transform: translateY(-2px);
}

/* --- 2. THE LIST --- */
#comments-container {
  display: flex;
  flex-direction: column;
  position: relative;
  transition: max-height 0.4s ease;
}

#comments-container.collapsed {
  /* REDUCED HEIGHT: Shows approx 2 comments */
  max-height: 300px;
  overflow: hidden;
  mask-image: linear-gradient(180deg, black 60%, transparent 100%);
  -webkit-mask-image: linear-gradient(180deg, black 60%, transparent 100%);
}

.btn-expand-comments {
  width: 100%;
  margin-top: -30px;
  position: relative;
  z-index: 10;
  padding: 15px;
  background: var(--surface);
  border: 1px solid var(--border-dim);
  color: var(--text-main);
  font-family: var(--font-head);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.8rem;
  cursor: pointer;
  transition: 0.3s;
}

.btn-expand-comments:hover {
  background: var(--bg);
  border-color: var(--primary);
  color: var(--primary);
}

/* --- 3. COMMENT NODES --- */
.comment-node {
  padding: 20px 0;
  border-bottom: 1px solid var(--border-dim);
  animation: fadeUp 0.3s ease;
}

.comment-node:last-child {
  border-bottom: none;
}

.comment-row {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 15px;
}

.avatar-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1rem;
  color: #1a1a1a;
  text-transform: uppercase;
  user-select: none;
}

.comment-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.comment-header {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.comment-author {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-main);
}

.comment-author.is-me {
  color: var(--primary);
}

.comment-date {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.comment-text {
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--text-muted);
  margin-bottom: 8px;
  white-space: pre-wrap;
}

[data-theme="light"] .comment-text {
  color: #444;
}

.comment-footer {
  display: flex;
  gap: 15px;
  align-items: center;
}

.action-btn {
  background: none;
  border: none;
  padding: 0;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  cursor: pointer;
  opacity: 0.6;
  transition: 0.2s;
  display: flex;
  align-items: center;
  gap: 5px;
}

.action-btn:hover {
  opacity: 1;
  color: var(--text-main);
}

.btn-delete:hover {
  color: #ff4d4d;
}


/* --- 4. INLINE REPLY --- */
.inline-reply-form {
  margin-top: 15px;
  padding-left: 15px;
  border-left: 2px solid var(--primary);
  display: flex;
  flex-direction: column;
  gap: 10px;
  animation: fadeUp 0.3s ease;
}

.inline-reply-form input.reply-name,
.inline-reply-form textarea {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border-dim);
  color: var(--text-main);
  padding: 10px 0;
  font-family: var(--font-body);
  font-size: 0.9rem;
  border-radius: 0;
}

.inline-reply-form input.reply-name:focus,
.inline-reply-form textarea:focus {
  outline: none;
  border-bottom-color: var(--primary);
}

.inline-reply-actions {
  display: flex;
  gap: 10px;
  margin-top: 5px;
}

.btn-inline-post {
  background: var(--text-main);
  color: var(--bg);
  border: none;
  padding: 8px 20px;
  font-weight: 700;
  font-size: 0.7rem;
  text-transform: uppercase;
  cursor: pointer;
}

.btn-inline-post:hover {
  background: var(--primary);
  color: white;
}

.btn-inline-cancel {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border-dim);
  padding: 8px 15px;
  font-weight: 700;
  font-size: 0.7rem;
  text-transform: uppercase;
  cursor: pointer;
}

.btn-inline-cancel:hover {
  border-color: var(--text-main);
  color: var(--text-main);
}


/* --- 5. THREADS --- */
.comment-children {
  margin-top: 15px;
  margin-left: 20px;
  padding-left: 20px;
  border-left: 1px solid var(--border-dim);
  display: none;
}

.comment-children.expanded {
  display: block;
}

.comment-children .comment-row {
  grid-template-columns: 32px 1fr;
  gap: 12px;
  margin-bottom: 20px;
}

.comment-children .avatar-circle {
  width: 32px;
  height: 32px;
  font-size: 0.8rem;
}

.thread-toggle {
  background: transparent;
  border: none;
  color: var(--primary);
  font-size: 0.7rem;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
  margin-top: 5px;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 4px;
  opacity: 0.9;
}

/* --- 6. DELETE MODAL & SPINNER --- */
.harsx-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(5, 5, 5, 0.95);
  z-index: 10000;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: 0.2s;
}

.harsx-modal-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.harsx-modal-box {
  background: var(--surface);
  border: 1px solid var(--border-dim);
  padding: 35px 30px;
  max-width: 350px;
  width: 90%;
  text-align: center;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
}

.harsx-modal-title {
  font-family: var(--font-head);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 8px;
}

.harsx-modal-desc {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 25px;
}

.harsx-modal-actions {
  display: flex;
  justify-content: center;
  gap: 15px;
}

/* FIX: Spinner Logic */
.spinner-sm {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  display: inline-block;
  flex-shrink: 0;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.btn-modal-confirm {
  background: #d93025;
  color: #ffffff !important;
  padding: 10px 24px;
  border: none;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.8rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 80px;
  min-height: 40px;
}

.btn-modal-confirm:hover {
  background: red;
}

.btn-modal-cancel {
  background: transparent;
  border: 1px solid var(--border-dim);
  color: var(--text-main);
  padding: 10px 24px;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.8rem;
  cursor: pointer;
}

.btn-modal-cancel:hover {
  background: var(--bg);
}

/* --- ADMIN / AUTHOR STYLES --- */
.comment-author.is-admin {
  color: var(--primary);
  display: inline-flex;
  align-items: center;
}

.comment-author.is-admin::after {
  content: "AUTHOR";
  font-size: 0.6rem;
  background: var(--primary);
  color: white;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 8px;
  font-weight: 700;
  letter-spacing: 0.5px;
  vertical-align: middle;
}

img.admin-avatar {
  background: transparent !important;
  box-shadow: none !important;
  padding: 0;
  object-fit: cover;
  border: 2px solid #e7b860 !important;
  
}

/* MODALS */
/* --- 6. MODALS (DELETE & ALERTS) --- */
.harsx-modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(5, 5, 5, 0.95);
    z-index: 10000;
    display: flex; justify-content: center; align-items: center;
    opacity: 0; visibility: hidden; pointer-events: none; transition: 0.2s;
}
.harsx-modal-overlay.active { opacity: 1; visibility: visible; pointer-events: auto; }

.harsx-modal-box {
    background: var(--surface);
    border: 1px solid var(--border-dim);
    padding: 35px 30px;
    max-width: 350px;
    width: 90%;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0,0,0,0.6);
}

.harsx-modal-title {
    font-family: var(--font-head);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 8px;
}
.harsx-modal-desc {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 25px;
}
.harsx-modal-actions { display: flex; justify-content: center; gap: 15px; }

/* --- BUTTON VARIANTS --- */

/* Base Styles */
.btn-modal-base {
    padding: 10px 24px;
    border: none;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.8rem;
    cursor: pointer;
    min-width: 80px; 
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 1. RED (For Deleting) */
.btn-modal-delete {
    background: #d93025;
    color: #ffffff !important;
}
.btn-modal-delete:hover { background: red; }

/* 2. NEUTRAL (For Normal Alerts) */
.btn-modal-neutral {
    background: var(--text-main);
    color: var(--bg);
}
.btn-modal-neutral:hover {
    background: var(--primary);
    color: #ffffff;
}

/* 3. GREEN (For Success/Login) */
.btn-modal-success {
    background: #10b981; /* Nice Emerald Green */
    color: #ffffff;
}
.btn-modal-success:hover {
    background: #059669; /* Darker Green */
}

/* Cancel Button */
.btn-modal-cancel {
    background: transparent;
    border: 1px solid var(--border-dim);
    color: var(--text-main);
    padding: 10px 24px;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.8rem;
    cursor: pointer;
}
.btn-modal-cancel:hover { background: var(--bg); }



/* =========================================
Badge
   ========================================= */
.comment-author.is-admin::after {

    content: ""; 
    
    display: inline-block;
    width: 18px; 
    height: 18px;
    margin-left: 3px;
    vertical-align: -3px; 
    
    background: transparent;
    color: transparent; 
    padding: 0;
    box-shadow: none;
    border-radius: 0;


    background-color: var(--primary); 
    

    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'%3E%3Cpath d='M23,12l-2.44-2.78l0.34-3.68l-3.61-0.82l-1.89-3.18L12,3l-3.4-1.46L6.71,4.72L3.1,5.53l0.34,3.68L1,12l2.44,2.78l-0.34,3.68l3.61,0.82l1.89,3.18L12,21l3.4,1.46l1.89-3.18l3.61-0.82l-0.34-3.68L23,12z M10,17l-4-4l1.41-1.41L10,14.17l6.59-6.59L18,9L10,17z'/%3E%3C/svg%3E") no-repeat center;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'%3E%3Cpath d='M23,12l-2.44-2.78l0.34-3.68l-3.61-0.82l-1.89-3.18L12,3l-3.4-1.46L6.71,4.72L3.1,5.53l0.34,3.68L1,12l2.44,2.78l-0.34,3.68l3.61,0.82l1.89,3.18L12,21l3.4,1.46l1.89-3.18l3.61-0.82l-0.34-3.68L23,12z M10,17l-4-4l1.41-1.41L10,14.17l6.59-6.59L18,9L10,17z'/%3E%3C/svg%3E") no-repeat center;
    
    -webkit-mask-size: contain;
    mask-size: contain;
}

/* =========================================
   READING PROGRESS BACK TO TOP (FIXED)
   ========================================= */
.progress-wrap {
    position: fixed;
    right: 30px;
    bottom: 30px;
    height: 50px;
    width: 50px;
    cursor: pointer;
    display: flex;             /* Use Flexbox to center the icon */
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--surface);
    box-shadow: inset 0 0 0 2px var(--border-dim);
    z-index: 10000;            /* Very high Z-index */
    opacity: 0;                /* Start hidden */
    visibility: hidden;
    transform: translateY(15px);
    transition: all 0.2s ease-in-out;
}

/* When this class is added by JS, it becomes visible */
.progress-wrap.active-progress {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Style the Icon (The <i> tag) */
.progress-wrap i {
    font-size: 1.5rem;
    color: var(--text-main);
    z-index: 2;                /* Above the SVG */
    transition: color 0.3s;
    line-height: 1;            /* Reset line height */
}

.progress-wrap:hover i {
    color: var(--primary);
}

.progress-wrap:hover {
    transform: translateY(-5px);
    box-shadow: inset 0 0 0 2px var(--border-dim), 0 10px 25px rgba(0,0,0,0.2);
}

/* SVG Progress Ring */
.progress-wrap svg.progress-circle {
    position: absolute;        /* Sit behind the icon */
    top: 0;
    left: 0;
    z-index: 1;
}

.progress-wrap svg path {
    fill: none;
}

.progress-wrap svg.progress-circle path {
    stroke: var(--primary);    /* Your blue color */
    stroke-width: 4;
    transition: stroke-dashoffset 10ms linear;
}