/* =========================================================
   Personal Blog — Futuristic Design Override
   Palette: #1F6F5F · #2FA084 · #6FCF97 · #EEEEEE
   Inspired by Substack · Light theme · No SVG patterns
========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&display=swap');

/* ── Color Palette ──────────────────────────────────── */
:root {
  --primary:        #1F6F5F;
  --primary-dark:   #154D43;
  --primary-mid:    #2FA084;
  --primary-light:  #3BB896;
  --accent:         #6FCF97;
  --accent-dark:    #4DB87A;
  --accent-light:   #A8E8C0;
  --accent-pale:    #E8F8EF;
  --surface:        #F9FAFB;
  --surface-2:      #EEEEEE;
  --white:          #FFFFFF;
  --text:           #0F1A16;
  --text-muted:     #6B7280;
  --border:         #E5E7EB;
  --border-light:   #F3F4F6;
  --shadow-sm:      0 1px 4px rgba(31,111,95,.07);
  --shadow-md:      0 4px 24px rgba(31,111,95,.12);
  --shadow-lg:      0 12px 48px rgba(31,111,95,.16);
  --glow-sm:        0 0 16px rgba(111,207,151,.25);
  --glow-md:        0 0 32px rgba(111,207,151,.38);
  --font-heading:   'Space Grotesk', -apple-system, sans-serif;
  --font-body:      'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ── Base Typography ────────────────────────────────── */
body {
  font-family: var(--font-body);
  background: var(--white);
  color: var(--text);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  letter-spacing: -0.025em;
}

a { color: var(--primary-mid); }
a:hover { color: var(--primary); }

/* ── Kill all SVG pattern pseudo-elements ───────────── */
.hero-slide::after,
.categories-strip::before,
.auth-visual::before,
.footer-pattern {
  display: none !important;
}

/* ── Reading Progress Bar ───────────────────────────── */
#reading-progress-bar {
  background: linear-gradient(90deg, var(--primary-mid), var(--accent));
  height: 2px;
}

/* ── Page Loader ────────────────────────────────────── */
.loader { background: var(--primary-dark); }
.loader-dots span { background: var(--accent); }

/* ── Header — Glassmorphic ──────────────────────────── */
.site-header {
  background: rgba(255,255,255,.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(31,111,95,.07);
  box-shadow: none;
}

.site-header.scrolled {
  background: rgba(255,255,255,.96);
  box-shadow: 0 2px 24px rgba(31,111,95,.08);
}

.nav-list li a {
  font-family: var(--font-heading);
  font-size: .875rem;
  font-weight: 500;
  color: var(--text-muted);
  border-radius: 8px;
}
.nav-list li a:hover,
.nav-list li a.active {
  color: var(--primary);
  background: var(--accent-pale);
}

.header-icon-btn:hover {
  background: var(--accent-pale);
  color: var(--primary);
}

.btn-header-cta {
  background: var(--primary);
  border-color: var(--primary);
  border-radius: 100px;
  font-family: var(--font-heading);
  font-size: .8rem;
  font-weight: 600;
  padding: 7px 20px;
  box-shadow: var(--glow-sm);
}
.btn-header-cta:hover {
  background: var(--primary-mid);
  border-color: var(--primary-mid);
  color: #fff;
  box-shadow: var(--glow-md);
}

/* ── Personal Blog Hero ──────────────────────────────── */
.blog-hero {
  padding: 88px 0 72px;
  position: relative;
  overflow: hidden;
  background: var(--white);
}

/* Futuristic radial glow background — no SVG */
.blog-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 65% 55% at 10% 0%,   rgba(111,207,151,.13) 0%, transparent 60%),
    radial-gradient(ellipse 55% 65% at 92% 100%, rgba(47,160,132,.09)  0%, transparent 60%),
    radial-gradient(ellipse 40% 40% at 50% 50%,  rgba(31,111,95,.04)   0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* Subtle CSS grid mesh — futuristic, no SVG */
.blog-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(31,111,95,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(31,111,95,.035) 1px, transparent 1px);
  background-size: 52px 52px;
  pointer-events: none;
  z-index: 0;
}

.blog-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 680px;
  margin: 0 auto;
  text-align: center;
  padding: 0 20px;
}

/* Avatar circle */
.blog-hero-avatar {
  width: 92px;
  height: 92px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-mid) 50%, var(--accent) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 2.1rem;
  font-weight: 700;
  color: #fff;
  margin: 0 auto 28px;
  border: 3px solid rgba(255,255,255,.9);
  box-shadow: var(--glow-md), 0 6px 28px rgba(31,111,95,.22);
  overflow: hidden;
  animation: glow-pulse 3.5s ease-in-out infinite;
}

.blog-hero-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Author name — gradient text */
.blog-hero-name {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4.5vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.08;
  margin-bottom: 14px;
  background: linear-gradient(135deg, var(--text) 0%, var(--primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Tag line with dot separators */
.blog-hero-tagline {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  font-family: var(--font-heading);
  font-size: .9rem;
  font-weight: 600;
  color: var(--primary-mid);
  letter-spacing: 0.01em;
  margin-bottom: 22px;
}

.blog-hero-tagline .dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
  display: inline-block;
  flex-shrink: 0;
}

/* Bio */
.blog-hero-bio {
  font-size: .975rem;
  color: var(--text-muted);
  line-height: 1.8;
  max-width: 560px;
  margin: 0 auto 36px;
}

/* CTA buttons */
.blog-hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

.btn-hero-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 32px;
  background: var(--primary);
  color: #fff;
  font-family: var(--font-heading);
  font-size: .9rem;
  font-weight: 600;
  border-radius: 100px;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: var(--glow-sm), 0 4px 16px rgba(31,111,95,.22);
  text-decoration: none;
}
.btn-hero-primary:hover {
  background: var(--primary-mid);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: var(--glow-md), 0 8px 28px rgba(31,111,95,.28);
}

.btn-hero-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 32px;
  background: transparent;
  color: var(--primary);
  font-family: var(--font-heading);
  font-size: .9rem;
  font-weight: 600;
  border-radius: 100px;
  border: 1.5px solid var(--border);
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
}
.btn-hero-secondary:hover {
  background: var(--accent-pale);
  border-color: var(--accent-light);
  color: var(--primary);
}

/* Stats bar */
.blog-hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding-top: 36px;
  border-top: 1px solid var(--border-light);
}

.hero-stat {
  padding: 0 28px;
  text-align: center;
}

.hero-stat + .hero-stat {
  border-left: 1px solid var(--border);
}

.hero-stat-number {
  display: block;
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 4px;
}

.hero-stat-label {
  font-size: .7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
}

/* ── Featured Post Card ─────────────────────────────── */
.featured-section {
  padding: 0 0 56px;
}

.featured-label {
  max-width: 860px;
  margin: 0 auto 20px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.featured-label-text {
  font-family: var(--font-heading);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--primary-mid);
  white-space: nowrap;
}

.featured-label-line {
  flex: 1;
  height: 1px;
  background: var(--border);
}

.featured-card-wrap {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 20px;
}

.featured-card-new {
  display: grid;
  grid-template-columns: 5fr 4fr;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--white);
  transition: all 0.35s ease;
}

.featured-card-new:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
  border-color: var(--accent-light);
}

.featured-img-wrap {
  overflow: hidden;
}

.featured-img-wrap img {
  width: 100%;
  height: 100%;
  min-height: 280px;
  object-fit: cover;
  display: block;
  transition: transform 0.6s ease;
}

.featured-card-new:hover .featured-img-wrap img { transform: scale(1.04); }

.featured-body {
  padding: 40px 36px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
}

.featured-badge {
  align-self: flex-start;
  display: inline-block;
  padding: 3px 12px;
  background: var(--accent-pale);
  color: var(--primary-mid);
  font-family: var(--font-heading);
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  border-radius: 100px;
  border: 1px solid var(--accent-light);
}

.featured-body-title {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.025em;
  color: var(--text);
  margin: 0;
  transition: color 0.2s;
}
.featured-card-new:hover .featured-body-title { color: var(--primary); }

.featured-body-meta {
  font-size: .78rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.featured-body-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-heading);
  font-size: .85rem;
  font-weight: 600;
  color: var(--primary);
  margin-top: 4px;
  transition: all 0.25s;
}
.featured-body-link i { transition: transform 0.25s; font-size: 1rem; }
.featured-body-link:hover { color: var(--primary-mid); }
.featured-body-link:hover i { transform: translateX(4px); }

/* ── Categories Strip override ──────────────────────── */
.categories-strip {
  background: var(--surface);
  border-color: var(--border);
}

.section-head h2,
.section-head h3 {
  font-family: var(--font-heading);
  color: var(--text-muted);
  font-size: .72rem;
  letter-spacing: 2px;
}

.cat-card {
  border-radius: 12px;
  border-color: var(--border);
  background: var(--white);
  transition: all 0.3s ease;
}
.cat-card:hover {
  border-color: var(--primary-mid);
  box-shadow: var(--shadow-md), var(--glow-sm);
  transform: translateY(-3px);
}
.cat-card:hover .cat-name { color: var(--primary); }

/* ── Posts Feed — Substack Style ────────────────────── */
.posts-feed-section {
  padding: 0 0 96px;
  background: var(--white);
}

.feed-wrapper {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 20px;
}

.feed-section-label {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 8px;
}

.feed-label-text {
  font-family: var(--font-heading);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-muted);
  white-space: nowrap;
}

.feed-label-line {
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* Individual feed item */
.feed-item {
  display: grid;
  grid-template-columns: 1fr 128px;
  gap: 24px;
  align-items: center;
  padding: 28px 0;
  border-bottom: 1px solid var(--border-light);
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
}

.feed-item:first-child { padding-top: 20px; }

.feed-item:hover .feed-item-title { color: var(--primary); }
.feed-item:hover .feed-item-thumb { border-color: var(--accent-light); box-shadow: var(--glow-sm); }

/* Feed item meta row */
.feed-item-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.feed-item-category {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--primary-mid);
  background: var(--accent-pale);
  padding: 2px 10px;
  border-radius: 100px;
}

.feed-item-date {
  font-size: .75rem;
  color: var(--text-muted);
}

.feed-item-sep { color: var(--border); font-size: .7rem; }

/* Feed item title */
.feed-item-title {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
  transition: color 0.2s;
  display: block;
  text-decoration: none;
}

/* Feed item excerpt */
.feed-item-excerpt {
  font-size: .85rem;
  color: var(--text-muted);
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 10px;
}

/* Read time */
.feed-item-readtime {
  font-size: .72rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 5px;
}

.feed-item-readtime i { color: var(--accent-dark); font-size: .85rem; }

/* Thumbnail */
.feed-item-thumb {
  width: 128px;
  height: 88px;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
  border: 2px solid transparent;
  transition: all 0.3s ease;
  background: var(--surface-2);
}

.feed-item-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.feed-item:hover .feed-item-thumb img { transform: scale(1.07); }

/* Empty state */
.feed-empty {
  text-align: center;
  padding: 80px 0;
  color: var(--text-muted);
}
.feed-empty i {
  font-size: 3rem;
  display: block;
  margin-bottom: 16px;
  opacity: .35;
}

/* Pagination */
.feed-pagination { padding-top: 48px; }

/* ── Buttons override ────────────────────────────────── */
.btn-read-more {
  font-family: var(--font-heading);
  color: var(--primary);
  font-weight: 600;
}
.btn-read-more:hover { color: var(--primary-mid); }

.category-badge {
  background: var(--accent-pale);
  color: var(--primary-mid);
  border-color: var(--accent-light);
  font-family: var(--font-heading);
}
.category-badge:hover {
  background: var(--accent);
  color: var(--primary-dark);
  border-color: var(--accent);
}

/* ── Section Title ──────────────────────────────────── */
.section-title h3 {
  font-family: var(--font-heading);
  color: var(--primary);
  letter-spacing: -0.02em;
}
.section-title h3::after { background: var(--accent); }

/* ── Sidebar Widgets ────────────────────────────────── */
.widget {
  border-radius: 14px;
  border-color: var(--border-light);
}

.widget-title h5 {
  font-family: var(--font-heading);
  color: var(--primary);
  letter-spacing: 1px;
}
.widget-title h5::before { background: var(--accent); }

.tag-pill:hover {
  background: var(--primary);
  border-color: var(--primary);
}

.sidebar-cat-item:hover {
  background: var(--accent-pale);
  color: var(--primary);
}

.widget-search input:focus { border-color: var(--primary-mid); }

/* ── Back to Top ────────────────────────────────────── */
.back-top {
  background: var(--primary);
  border-radius: 10px;
  width: 40px;
  height: 40px;
  box-shadow: var(--glow-sm);
}
.back-top:hover {
  background: var(--primary-mid);
  box-shadow: var(--glow-md);
}

/* ── Search Overlay ─────────────────────────────────── */
.search-overlay {
  background: rgba(10,20,16,.97);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}
.btn-search-go {
  background: var(--primary-mid);
  color: #fff;
  border-radius: 10px;
}
.btn-search-go:hover { background: var(--primary); color: #fff; }

/* ── Auth pages ─────────────────────────────────────── */
.auth-visual {
  background: linear-gradient(160deg, var(--primary-dark) 0%, var(--primary) 55%, var(--primary-mid) 100%);
}

/* ── Post single page ───────────────────────────────── */
.post-content h2 { color: var(--primary); }
.post-meta-item i { color: var(--primary-mid); }
.post-content a { color: var(--primary-mid); }
.post-content a:hover { color: var(--primary); }
.post-content code { background: var(--accent-pale); color: var(--primary); }
.post-content blockquote {
  border-left-color: var(--accent);
  background: var(--accent-pale);
}
.post-content th { background: var(--primary); }

/* ── Footer ─────────────────────────────────────────── */
.footer-accent-bar {
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--accent), var(--primary-mid));
}

.site-footer { background: #0C1B16; }

.footer-col-title {
  font-family: var(--font-heading);
  color: var(--accent);
  letter-spacing: 2px;
}

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

.footer-social-btn:hover {
  background: var(--primary-mid);
  border-color: var(--primary-mid);
  color: #fff;
}

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

/* ── Animations ─────────────────────────────────────── */
@keyframes glow-pulse {
  0%, 100% { box-shadow: var(--glow-sm), 0 4px 20px rgba(31,111,95,.18); }
  50%       { box-shadow: var(--glow-md), 0 6px 28px rgba(31,111,95,.26); }
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.blog-hero-inner {
  animation: fade-up 0.7s ease both;
}

/* ── Responsive ─────────────────────────────────────── */
@media (max-width: 767px) {
  .blog-hero { padding: 60px 0 48px; }
  .blog-hero-name { font-size: 1.9rem; }
  .blog-hero-stats { gap: 0; }
  .hero-stat { padding: 0 16px; }
  .hero-stat-number { font-size: 1.25rem; }

  .featured-card-new {
    grid-template-columns: 1fr;
  }
  .featured-img-wrap img { min-height: 200px; }
  .featured-body { padding: 24px 20px; }

  .feed-item {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .feed-item-thumb {
    width: 100%;
    height: 180px;
    border-radius: 10px;
  }
  .feed-item-thumb img { min-height: 180px; }
}

@media (max-width: 576px) {
  .blog-hero-name { font-size: 1.65rem; }
  .hero-stat { padding: 0 10px; }
  .blog-hero-stats { flex-wrap: wrap; gap: 16px; border-top: none; padding-top: 24px; }
  .hero-stat + .hero-stat { border-left: none; }
}
