:root {
  --bg-page: #f8f7f4;
  --bg-card: #ffffff;
  --bg-header: #161822;
  --bg-footer: #12131c;
  --text-main: #1f2430;
  --text-muted: #5e6472;
  --text-light: #8c92a4;
  --accent-primary: #252b85;
  --accent-secondary: #d43f6d;
  --accent-soft: #eef0ff;
  --border-light: #e8e6e1;
  --shadow-sm: 0 2px 8px rgba(20, 22, 34, 0.05);
  --shadow-md: 0 8px 28px rgba(20, 22, 34, 0.08);
  --radius-md: 12px;
  --radius-lg: 16px;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-sans);
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.75;
  font-size: 16.5px;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent-primary);
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}

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

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

/* Header & Navigation */
.site-header {
  background: var(--bg-header);
  color: #ffffff;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.22);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.9rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand-wrap {
  display: flex;
  align-items: center;
  gap: 1rem;
  text-decoration: none;
  color: #ffffff;
}

.brand-logo {
  max-height: 48px;
  width: auto;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-family: var(--font-serif);
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #ffffff;
  margin: 0;
  line-height: 1.2;
}

.brand-tagline {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.68);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 2px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-link {
  color: rgba(255, 255, 255, 0.85);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  transition: all 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
}

.nav-link.cta-start {
  background: var(--accent-secondary);
  color: #ffffff;
  margin-left: 0.4rem;
}

.nav-link.cta-start:hover {
  background: #e24e7b;
  color: #ffffff;
}

.mobile-menu-btn {
  display: none;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #ffffff;
  border-radius: 8px;
  padding: 0.45rem 0.75rem;
  font-size: 1.1rem;
  cursor: pointer;
}

/* Layout Container */
.site-container {
  max-width: 1200px;
  margin: 2.5rem auto;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 2.5rem;
  align-items: start;
}

/* Primary Content Area */
.content-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-light);
  overflow: hidden;
  padding: 2.5rem;
}

.hero-banner {
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
}

.hero-banner img {
  width: 100%;
  height: auto;
  display: block;
}

.home-heading {
  font-family: var(--font-serif);
  font-size: 2.35rem;
  color: var(--accent-primary);
  margin: 0 0 1.25rem 0;
  line-height: 1.25;
}

.prose p {
  margin: 0 0 1.3rem 0;
  color: var(--text-main);
}

.prose em, .prose i {
  color: #2d3245;
  font-style: italic;
}

.prose ul {
  margin: 1rem 0 1.6rem 0;
  padding-left: 1.4rem;
}

.prose li {
  margin-bottom: 0.55rem;
  padding-left: 0.25rem;
}

.prose li::marker {
  color: var(--accent-secondary);
}

.start-reading-callout {
  margin-top: 2rem;
  padding: 1.5rem 1.75rem;
  background: linear-gradient(135deg, #f5f6ff 0%, #fff2f6 100%);
  border: 1px solid #dde1ff;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.start-reading-callout .callout-text h3 {
  margin: 0 0 0.25rem 0;
  font-family: var(--font-serif);
  font-size: 1.25rem;
  color: var(--accent-primary);
}

.start-reading-callout .callout-text p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--text-muted);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--accent-primary);
  color: #ffffff !important;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.7rem 1.35rem;
  border-radius: 999px;
  box-shadow: 0 4px 12px rgba(37, 43, 133, 0.25);
  transition: transform 0.15s ease, background 0.2s ease;
}

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

/* Home Latest / Chronological Section */
.section-divider {
  margin: 2.75rem 0 1.5rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid var(--border-light);
  padding-bottom: 0.75rem;
}

.section-divider h2 {
  font-family: var(--font-serif);
  font-size: 1.55rem;
  margin: 0;
  color: var(--text-main);
}

/* Blog Toolbar */
.blog-toolbar {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  margin-bottom: 1.75rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  box-shadow: var(--shadow-sm);
}

.search-input-wrap {
  flex: 1 1 240px;
  position: relative;
}

.search-input {
  width: 100%;
  padding: 0.6rem 1rem;
  border: 1px solid var(--border-light);
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.92rem;
  background: var(--bg-page);
  color: var(--text-main);
}

.search-input:focus {
  outline: none;
  border-color: var(--accent-primary);
  background: #ffffff;
}

.toolbar-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.btn-toggle {
  background: var(--bg-page);
  border: 1px solid var(--border-light);
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.5rem 0.95rem;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-toggle:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

.btn-toggle.active {
  background: var(--accent-primary);
  color: #ffffff;
  border-color: var(--accent-primary);
}

/* Post Cards Grid & List */
.posts-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.post-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.post-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.post-card-image-link {
  display: block;
  overflow: hidden;
  background: #eceae4;
  position: relative;
}

.post-card-image-link img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.4s ease;
}

.post-card:hover .post-card-image-link img {
  transform: scale(1.02);
}

.post-card-body {
  padding: 1.75rem 2rem 2rem;
}

.post-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.83rem;
  color: var(--text-muted);
  margin-bottom: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.post-badge {
  background: var(--accent-soft);
  color: var(--accent-primary);
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
}

.post-card-title {
  font-family: var(--font-serif);
  font-size: 1.65rem;
  margin: 0 0 0.85rem 0;
  line-height: 1.3;
}

.post-card-title a {
  color: var(--text-main);
}

.post-card-title a:hover {
  color: var(--accent-secondary);
}

.post-excerpt {
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  line-height: 1.7;
}

.post-full-content {
  display: none;
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-light);
}

.posts-list.full-view .post-excerpt,
.posts-list.full-view .read-more-wrap {
  display: none;
}

.posts-list.full-view .post-full-content {
  display: block;
}

.read-more-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--accent-primary);
}

.read-more-link:hover {
  color: var(--accent-secondary);
}

/* Single Post View */
.single-post-header {
  margin-bottom: 1.75rem;
}

.single-post-title {
  font-family: var(--font-serif);
  font-size: 2.4rem;
  line-height: 1.22;
  margin: 0.5rem 0 1rem 0;
  color: var(--text-main);
}

.single-post-featured-image {
  margin: 0 0 2rem 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
  background: #f0efe9;
}

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

/* Post Prev / Next Navigation */
.post-navigation {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 2px solid var(--border-light);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
}

.post-nav-card {
  display: flex;
  flex-direction: column;
  padding: 1.15rem 1.35rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  background: var(--bg-page);
  transition: all 0.2s ease;
}

.post-nav-card:hover {
  border-color: var(--accent-primary);
  background: #ffffff;
  box-shadow: var(--shadow-sm);
}

.post-nav-card.next {
  text-align: right;
}

.post-nav-label {
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  font-weight: 700;
  margin-bottom: 0.3rem;
}

.post-nav-title {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-main);
}

/* Sidebar Widgets */
.site-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.widget {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.widget-title {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  margin: 0 0 1rem 0;
  padding-bottom: 0.65rem;
  border-bottom: 2px solid var(--border-light);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Visit Counter Widget */
.visit-counter-widget {
  background: linear-gradient(145deg, #181b28 0%, #23273a 100%);
  color: #ffffff;
  border: none;
  width: 75%;
  margin: 0 auto;
  text-align: center;
  padding: 1.15rem 1rem;
}

.visit-counter-widget .widget-title {
  color: #ffffff;
  border-bottom-color: rgba(255, 255, 255, 0.12);
  font-size: 0.92rem;
  font-family: var(--font-sans);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  justify-content: center;
}

.counter-display-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}

#strcpv-website-counter p {
  display: inline-block;
  margin: 0;
  padding: 0.45rem 0.75rem;
  letter-spacing: 3px;
  background-color: #0b0c12;
  color: #5ef2b6;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  font-family: 'Consolas', 'Courier New', monospace;
  font-weight: 700;
  font-size: 1.15rem;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.6);
}

.counter-formatted-sub {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.65);
}

/* Sidebar Lists */
.widget-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.widget-list li {
  border-bottom: 1px solid var(--border-light);
}

.widget-list li:last-child {
  border-bottom: none;
}

.widget-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.55rem 0;
  color: var(--text-main);
  font-size: 0.93rem;
  font-weight: 500;
}

.widget-list a:hover {
  color: var(--accent-secondary);
  padding-left: 3px;
}

.widget-list .count-pill {
  background: var(--bg-page);
  color: var(--text-muted);
  font-size: 0.76rem;
  font-weight: 600;
  padding: 0.1rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--border-light);
}

.chronological-scroll {
  max-height: 360px;
  overflow-y: auto;
  padding-right: 0.35rem;
}

.chronological-scroll::-webkit-scrollbar {
  width: 6px;
}

.chronological-scroll::-webkit-scrollbar-thumb {
  background: #d5d2c8;
  border-radius: 999px;
}

/* Archive Header Banner */
.archive-header {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1.5rem 2rem;
  margin-bottom: 1.75rem;
  box-shadow: var(--shadow-sm);
}

.archive-header h1 {
  font-family: var(--font-serif);
  font-size: 1.85rem;
  margin: 0 0 0.35rem 0;
}

.archive-header p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Footer */
.site-footer {
  background: var(--bg-footer);
  color: rgba(255, 255, 255, 0.72);
  margin-top: 4rem;
  padding: 2.5rem 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.9rem;
}

.footer-inner a {
  color: rgba(255, 255, 255, 0.85);
}

.footer-inner a:hover {
  color: #ffffff;
}

.footer-links {
  display: flex;
  gap: 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}

/* Back to top */
.back-to-top {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent-primary);
  color: #ffffff !important;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  opacity: 0;
  pointer-events: none;
  transition: all 0.2s ease;
  z-index: 900;
  font-size: 1.1rem;
}

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

.back-to-top:hover {
  background: var(--accent-secondary);
  transform: translateY(-2px);
}

/* Responsive */
@media (max-width: 960px) {
  .site-container {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .content-card {
    padding: 1.5rem;
  }
  .single-post-title,
  .home-heading {
    font-size: 1.85rem;
  }
  .mobile-menu-btn {
    display: inline-block;
  }
  .main-nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    padding-top: 0.75rem;
  }
  .main-nav.open {
    display: flex;
  }
  .header-inner {
    flex-wrap: wrap;
  }
}
