/* ============================================================
 * main.css — Complete Design System for Akash Patil Portfolio
 * Architecture:
 *   1. CSS Custom Properties (light + dark)
 *   2. Reset + Base
 *   3. Typography
 *   4. Layout Utilities
 *   5. Components (nav, footer, buttons, badges, tags)
 *   6. Theme Toggle (day/night animation)
 *   7. Page-specific (hero, post-card, project-card, post-body)
 *   8. Animations
 *   9. Responsive
 * ============================================================ */

/* ── 1. Custom Properties ────────────────────────────────── */
:root {
  /* Core palette — from the existing design system */
  --color-mint: hsl(164, 61%, 65%);
  --color-mint-up: hsl(148, 35%, 74%);
  --color-mint-down: hsl(163, 36%, 51%);
  --color-lilac: hsl(264, 51%, 71%);
  --color-sea: hsl(189, 58%, 65%);
  --color-highlight: hsl(264, 51%, 71%);
  --color-lilac-up: hsl(240, 33%, 77%);
  --color-sherbet: hsl(55, 97%, 85%);
  --color-sherbet-fade: hsl(55, 100%, 94%);
  --color-rose: hsl(344, 56%, 69%);
  --color-marshmellow: hsl(329, 44%, 71%);
  --color-peach: hsl(4, 65%, 85%);
  --color-biscuit: hsl(26, 18%, 61%);
  --color-oat: hsl(17, 12%, 77%);

  /* Surface colors */
  --color-bg: hsl(0, 0%, 97%);
  --color-surface: #ffffff;
  --color-border: hsl(210, 4%, 90%);
  --color-text: hsl(0, 0%, 25%);
  --color-text-muted: hsl(0, 0%, 45%);
  --color-light-down: hsl(210, 4%, 98%);
  --color-light-down-2: hsl(210, 4%, 96%);
  --color-light-down-3: hsl(210, 4%, 93%);

  /* Accent */
  --color-accent: hsl(264, 51%, 71%);
  --color-accent-soft: hsl(264, 40%, 95%);

  /* Status */
  --color-success: #2ECC71;
  --color-danger: #E74C3C;
  --color-warning: #F39C12;

  /* Typography */
  --font-display: 'Sora', sans-serif;
  --font-body: 'DM Sans', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Layout */
  --max-width: 1100px;
  --content-width: 720px;
  --radius: 12px;
  --radius-sm: 8px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.12);

  /* Zigzag filter */
  --zigzag-filter: brightness(0);
}

/* Dark mode */
[data-theme="dark"] {
  --color-mint: hsl(164, 40%, 40%); /* Darker mint */
  --color-highlight: hsl(240, 33%, 77%);
  --color-lilac: hsl(263, 29%, 32%);
  --color-peach: hsl(316, 30%, 36%);
  --color-sherbet: hsl(257, 8%, 18%);
  --color-sherbet-fade: hsl(260, 24%, 18%);
  --color-marshmellow: hsl(314, 22%, 42%);

  --color-bg: hsl(274, 4%, 12%);
  --color-surface: hsl(274, 4%, 16%);
  --color-border: hsl(274, 4%, 22%);
  --color-text: hsl(0, 0%, 93%);
  --color-text-muted: hsl(0, 0%, 65%);
  --color-light-down: hsl(274, 4%, 16%);
  --color-light-down-2: hsl(274, 4%, 18%);
  --color-light-down-3: hsl(274, 4%, 20%);

  --color-accent: hsl(240, 33%, 77%);
  --color-accent-soft: hsl(264, 20%, 20%);

  --zigzag-filter: brightness(0) invert(1);
}

/* ── 2. Reset + Base ─────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  color: var(--color-text);
  background-color: var(--color-bg);
  transition: background-color 0.6s ease, color 0.4s ease;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

main {
  flex: 1;
}

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

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

a:hover {
  opacity: 0.85;
}

::selection {
  background: var(--color-accent);
  color: #fff;
}

/* ── 3. Typography ───────────────────────────────────────── */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-text);
}

h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); margin-bottom: 0.5em; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.2rem); margin-bottom: 0.5em; }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.5rem); margin-bottom: 0.4em; }
h4 { font-size: 1.1rem; margin-bottom: 0.3em; }

p {
  margin-bottom: 1em;
  color: var(--color-text);
}

.text-muted {
  color: var(--color-text-muted);
}

.text-accent {
  color: var(--color-accent);
}

.text-highlight {
  color: var(--color-highlight);
}

code, pre {
  font-family: var(--font-mono);
}

pre {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 1.2em;
  overflow-x: auto;
  font-size: 0.9em;
  line-height: 1.6;
  margin-bottom: 1.5em;
}

code {
  background: var(--color-accent-soft);
  padding: 0.15em 0.4em;
  border-radius: 4px;
  font-size: 0.9em;
}

pre code {
  background: none;
  padding: 0;
}

blockquote {
  border-left: 4px solid var(--color-accent);
  padding: 0.8em 1.2em;
  margin: 1.5em 0;
  background: var(--color-accent-soft);
  font-style: italic;
}

/* ── 4. Layout Utilities ─────────────────────────────────── */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
}

.content-width {
  max-width: var(--content-width);
  margin: 0 auto;
}

.section {
  padding: 80px 0 40px 0;
}

.section-sm {
  padding: 20px 0;
}

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-sm { gap: 8px; }
.gap-md { gap: 16px; }
.gap-lg { gap: 32px; }
.text-center { text-align: center; }

/* Grid */
.grid {
  display: grid;
  gap: 24px;
}

.grid-2 { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }

/* ── 5. Components ───────────────────────────────────────── */

/* Skip link */
.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  padding: 8px 16px;
  background: var(--color-accent);
  color: #fff;
  border-radius: var(--radius-sm);
  z-index: 999;
  font-weight: 600;
}
.skip-link:focus {
  top: 16px;
}

/* Navigation */
.site-nav {
  position: static; /* No sticky border overlay, locks scroll with design layout */
  z-index: 100;
  background: var(--color-bg);
  border-bottom: none !important; /* Forces global remove template edges */
  transition: background-color 0.6s ease;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  max-width: var(--max-width);
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--color-text);
  text-decoration: none;
}

.nav-logo svg {
  height: 36px;
  width: auto;
}

.nav-logo svg .fill-highlight {
  fill: var(--color-highlight);
  transition: fill 0.4s ease;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  color: var(--color-text);
  text-decoration: none;
  position: relative;
  padding-bottom: 4px;
  transition: color 0.2s ease;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 6px;
  background-color: currentColor; /* Matches text link color (including active state) */
  -webkit-mask-image: url('/assets/images/zigzag.svg');
  -webkit-mask-repeat: repeat-x;
  -webkit-mask-size: auto 6px;
  mask-image: url('/assets/images/zigzag.svg');
  mask-repeat: repeat-x;
  mask-size: auto 6px;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  transform: translateY(2px);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  opacity: 1;
  transform: translateY(0px);
}

.nav-links a.active {
  color: var(--color-accent);
}

/* Mobile nav toggle */
.nav-hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 101;
}

.nav-hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-text);
  margin: 5px 0;
  transition: all 0.3s ease;
  border-radius: 2px;
}

/* Mobile Bottom Nav */
.mobile-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: var(--color-bg);
  border-top: 3px solid var(--color-text);
  z-index: 100;
  padding: 8px 0 calc(8px + env(safe-area-inset-bottom));
  transition: background-color 0.6s ease;
}

.mobile-nav ul {
  display: flex;
  justify-content: space-around;
  list-style: none;
  padding: 0;
  margin: 0;
}

.mobile-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--color-text-muted);
  text-decoration: none;
  padding: 10px 16px;
  transition: all 0.2s ease;
}

.mobile-nav a.active {
  color: var(--color-accent);
}

.mobile-nav .nav-icon {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

/* Theme toggle button */
.theme-toggle {
  width: 40px;
  height: 64px;
  cursor: pointer;
  background: transparent;
  padding: 0;
  border: 3px solid var(--color-border);
  border-radius: 50px;
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
  transition: border-color 0.4s ease;
}

.toggle-track {
  width: 100%;
  height: 100%;
  padding: 0;
  background: linear-gradient(to bottom, #e8f8ff 0%, #a8dcf0 96%, #9dd9f3 100%);
  overflow: hidden;
  position: relative;
  transition: background 0.6s ease;
}

.toggle-thumb {
  position: absolute;
  top: 2px;
  left: 50%;
  transform: translateX(-50%);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: top 0.6s cubic-bezier(0.4, 0, 0.2, 1), transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 10;
}

.icon-transition {
  transition: opacity 0.4s ease, transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.sun-icon {
  position: absolute;
  width: 24px;
  height: 24px;
  opacity: 1;
  transform: rotate(0deg);
}

.moon-icon {
  position: absolute;
  width: 24px;
  height: 24px;
  opacity: 0;
  transform: rotate(180deg);
}

.sun-icon img, .moon-icon img {
  width: 100%;
  height: 100%;
}

/* Theme toggle — clouds */
.clouds {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  opacity: 1;
  transition: opacity 0.6s ease;
  pointer-events: none;
  z-index: 1;
}

.cloud {
  position: absolute;
  width: 14px;
  height: 14px;
  animation: float 8s ease-in-out infinite;
}
.cloud img { width: 100%; height: 100%; opacity: 1; }
.cloud1 { top: 40%; left: 10%; animation-delay: 0s; }
.cloud2 { width: 12px; height: 12px; top: 55%; right: 5%; animation-delay: 2s; }
.cloud3 { width: 12px; height: 12px; bottom: 5%; left: 12%; animation-delay: 3s; }

/* Theme toggle — stars */
.stars {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  opacity: 0;
  transition: opacity 0.6s ease 0.3s;
  pointer-events: none;
  z-index: 1;
}

.star {
  position: absolute;
  width: 6px;
  height: 6px;
  animation: twinkle 3s ease-in-out infinite;
}
.star img { width: 100%; height: 100%; }
.star1 { top: 15%; left: 20%; animation-delay: 0s; }
.star3 { top: 40%; left: 15%; animation-delay: 1s; }
.star4 { top: 55%; right: 20%; animation-delay: 1.5s; width: 4px; height: 4px; }
.star5 { top: 5%; right: 30%; animation-delay: 2s; width: 5px; height: 5px; }
.star6 { top: 30%; right: 15%; animation-delay: 2.5s; }

/* Dark mode active state */
.theme-toggle.active .toggle-thumb {
  top: 28px;
}
.theme-toggle.active .sun-icon { opacity: 0; transform: rotate(-360deg); }
.theme-toggle.active .moon-icon { opacity: 1; transform: rotate(360deg); }
.theme-toggle.active .toggle-track {
  background: linear-gradient(to bottom, #242d42 0%, #2f3a54 30%, #8995a7 100%);
}
.theme-toggle.active .clouds { opacity: 0; }
.theme-toggle.active .stars { opacity: 1; }

/* Prevent selection on toggle */
.theme-toggle, .theme-toggle * {
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
}
.theme-toggle img {
  pointer-events: none;
  -webkit-user-drag: none;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  border-radius: 8px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  cursor: pointer;
  border: 2px solid var(--color-text);
  box-shadow: 4px 4px 0px 0px var(--color-text);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.2s ease;
  color: var(--color-text);
}

.btn:active {
  transform: translate(4px, 4px);
  box-shadow: 0px 0px 0px 0px var(--color-text);
}

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

.btn-outline {
  background: var(--color-surface);
}
.btn-outline:hover {
  background: var(--color-accent-soft);
}

.btn-ghost {
  background: transparent;
  border: 2px solid transparent;
  box-shadow: none;
}
.btn-ghost:hover {
  background: var(--color-surface);
  border: 2px solid var(--color-text);
  box-shadow: 4px 4px 0px 0px var(--color-text);
}

/* Badges */
.badge {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  font-family: var(--font-display);
  border: 2px solid var(--color-text);
  background: var(--badge-color, var(--color-accent-soft));
  color: var(--color-text);
  box-shadow: 2px 2px 0px 0px var(--color-text);
}

/* Tag pills */
.tag {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  border: 2px solid var(--color-text);
  background: var(--color-surface);
  color: var(--color-text);
  box-shadow: 2px 2px 0px 0px var(--color-text);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.2s ease;
}
.tag:hover {
  background: var(--color-accent-soft);
  transform: translate(2px, 2px);
  box-shadow: 0px 0px 0px 0px var(--color-text);
}

/* Footer */
.site-footer {
  border-top: none;
  padding: 24px 0;
  margin-top: auto;
  background: transparent;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: nowrap; /* Force one row */
  gap: 12px;
}

.footer-copy {
  margin-bottom: 0px !important;
  font-size: 0.85rem;
  font-weight: 700;
  white-space: nowrap;
  color: var(--color-text);
}

.footer-links {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 16px;
}

.footer-links li a {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--color-text);
  display: flex;
  align-items: center;
  gap: 8px;
  transition: transform 0.2s ease;
}

.footer-links li a:hover {
  color: var(--color-accent);
  transform: translateY(-2px);
}

.footer-icon {
  width: 18px;
  height: 18px;
  display: none; /* Hide icons on desktop */
}

@media (max-width: 640px) {
  .site-footer {
    padding: 16px 0 30px; /* Increased bottom padding */
  }
  
  .footer-links {
    gap: 12px;
  }
  
  .footer-links .link-text {
    display: none; /* Hide text on mobile */
  }
  
  .footer-links li a {
    padding: 10px;
    background: var(--color-surface);
    border: 2px solid var(--color-text);
    box-shadow: 3px 3px 0px 0px var(--color-text);
    transition: all 0.1s ease;
  }

  .footer-links li a:active {
    transform: translate(2px, 2px);
    box-shadow: 1px 1px 0px 0px var(--color-text);
  }
  
  .footer-icon {
    display: block; /* Show icons on mobile */
    margin: 0 !important;
  }
}

/* ── 6. Hero Section ─────────────────────────────────────── */
.hero {
  display: flex;
  align-items: center;
  gap: 48px;
  padding: 80px 0 60px;
  min-height: 60vh;
}

.hero-image {
  flex-shrink: 0;
  width: 280px;
}

.hero-image img {
  width: 100%;
  height: auto;
}

.hero-content {
  flex: 1;
}

.hero-greeting {
  font-family: var(--font-body);
  font-size: 1.2rem;
  color: var(--color-text-muted);
  margin-bottom: 8px;
}

.hero-title {
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  line-height: 1.15;
  margin-bottom: 24px;
}

.hero-title .accent {
  color: var(--color-highlight);
}

.hero-desc {
  font-size: 1.1rem;
  color: var(--color-text-muted);
  max-width: 520px;
  margin-bottom: 32px;
  line-height: 1.8;
}

.hero-desc .accent {
  color: var(--color-highlight);
  font-weight: 600;
}
/* Cassie.codes style Neo-Brutalist Headers */
.page-header-wrapper {
  position: relative;
  margin: 60px auto 100px;
  max-width: 850px;
}

.page-header-bg-dots {
  position: absolute;
  top: -80px;
  left: -80px;
  width: 280px;
  height: 280px;
  background-image: radial-gradient(var(--color-text) 3px, transparent 3px);
  background-size: 22px 22px;
  z-index: 0;
  opacity: 0.85;
}

.page-header-bg-circle {
  position: absolute;
  bottom: -100px;
  right: -100px;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  border: none; /* No border on the filled circle */
  z-index: 0;
}

/* Hollow ring shifted bottom-left, drawing over the top of the color fill */
.page-header-bg-circle::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0; 
  border-radius: 50%;
  border: 4px solid var(--color-text);
  transform: translate(-24px, 24px); /* Shifted Bottom-Left */
  z-index: 1; /* Strokes over the lilac color where they intersect */
  pointer-events: none;
}

.listing-header-circle { background: var(--color-lilac); }
.post-header-circle     { background: var(--color-mint); right: auto; left: 60%; transform: translateX(-50%); }

.section-header {
  position: relative;
  z-index: 5;
  background: var(--color-surface);
  border: 3px solid var(--color-text);
  box-shadow: 18px 18px 0px 0px var(--color-text); /* Sharp deep gray neo-brutal shadow */
  padding: 64px 56px;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 6vw, 4.5rem);
  font-weight: 800;
  margin-bottom: 24px;
  line-height: 1.1;
}

.highlight-text {
  position: relative;
  display: inline-block;
  z-index: 1;
}
.highlight-text::after {
  content: '';
  position: absolute;
  left: -4px;
  bottom: 6px;
  width: calc(100% + 8px);
  height: 35%;
  background: var(--color-rose);
  z-index: -1;
}

.section-subtitle {
  color: var(--color-text);
  font-size: 1.15rem;
  line-height: 1.7;
}
/* ── 7. Blog Controls (Search & Category) ────────────────────────── */
.blog-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-top: 150px; /* Increased for desktop */
  margin-bottom: 40px;
  flex-wrap: wrap;
}

/* Custom Select */
.custom-select-wrapper {
  position: relative;
  width: 240px;
  user-select: none;
}

.custom-select-trigger {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 16px;
  height: 44px; /* Explicit height for consistency */
  background: var(--color-surface);
  border: 2px solid var(--color-text);
  box-shadow: 3px 3px 0px 0px var(--color-text);
  cursor: pointer;
  font-weight: 700;
  transition: transform 0.1s;
  border-radius: 0; /* Sharp corners */
}

.custom-select-trigger:active {
  transform: translate(1px, 1px);
  box-shadow: 2px 2px 0px 0px var(--color-text);
}

.custom-select-trigger .arrow {
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--color-text);
  border-bottom: 2px solid var(--color-text);
  transform: rotate(45deg);
  margin-bottom: 4px;
  transition: transform 0.2s;
}

.custom-select-wrapper.open .custom-select-trigger .arrow {
  transform: rotate(-135deg) translate(-2px, -2px);
}

.custom-options {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--color-surface);
  border: 2px solid var(--color-text);
  box-shadow: 4px 4px 0px 0px var(--color-text);
  margin-top: 8px;
  z-index: 100;
  display: none;
}

.custom-select-wrapper.open .custom-options {
  display: block;
}

.custom-option {
  display: block;
  padding: 10px 16px;
  color: var(--color-text);
  text-decoration: none;
  font-weight: 600;
  transition: background 0.2s;
}

.custom-option:hover, .custom-option.selected {
  background: var(--color-accent-soft);
}

/* Search Wrapper */
.search-wrapper {
  display: flex;
  flex: 1;
  max-width: 400px;
  z-index: 10; /* Bring to front */
}

.search-input {
  flex: 1;
  padding: 0 16px;
  height: 44px; /* Explicit height for consistency */
  background: var(--color-light-down-2);
  color: var(--color-text); /* Ensure correct text color */
  border: 2px solid var(--color-text);
  border-right: none; /* Club with button */
  box-shadow: 3px 3px 0px 0px var(--color-text);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 500;
  outline: none;
  border-radius: 0 !important; /* Force sharp corners */
  transition: all 0.2s ease;
}

/* Style the 'X' (cancel button) in search input */
.search-input::-webkit-search-cancel-button {
  -webkit-appearance: none;
  height: 14px;
  width: 14px;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='18' y1='6' x2='6' y2='18'%3E%3C/line%3E%3Cline x1='6' y1='6' x2='18' y2='18'%3E%3C/line%3E%3C/svg%3E");
  background-size: contain;
  filter: var(--zigzag-filter); /* Reuse theme filter (inverted in dark mode) */
  opacity: 0.6;
}

.search-input::-webkit-search-cancel-button:hover {
  opacity: 1;
}

.search-input:focus {
  background: var(--color-accent-soft);
}

.search-btn {
  width: 48px;
  height: 44px; /* Explicit height for consistency */
  background: var(--color-accent-soft);
  border: 2px solid var(--color-text);
  box-shadow: 3px 3px 0px 0px var(--color-text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--color-text);
  transition: all 0.2s;
  border-radius: 0 !important; /* Force sharp corners */
}

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

/* ── 8. Redesigned Post Card ────────────────────────────────────────── */
.post-card {
  background: var(--color-surface);
  border: 2px solid var(--color-text);
  box-shadow: 4px 4px 0px 0px var(--color-text);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, box-shadow 0.2s;
  height: 100%;
}

.post-card:hover {
  transform: translate(-3px, -3px);
  box-shadow: 7px 7px 0px 0px var(--color-text);
}

.post-card-image-wrapper {
  position: relative;
  height: 200px; /* Decreased by ~15% from 240px */
  overflow: hidden;
  border-bottom: 2px solid var(--color-text);
}

.post-card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.post-card:hover .post-card-image {
  transform: scale(1.05);
}

.post-card-image-placeholder {
  width: 100%;
  height: 100%;
  background: var(--color-bg);
  background-image: radial-gradient(var(--color-text-muted) 1px, transparent 1px);
  background-size: 20px 20px;
}

.post-card-category-badge {
  position: absolute;
  top: -12px; /* Offset upward to sit on the border */
  left: 12px;
  padding: 15px 16px 8px; /* Increased top padding */
  font-weight: 800;
  font-size: 0.72rem;
  background: hsl(164, 61%, 65%); /* Solid Mint */
  border: 2px solid var(--color-text);
  box-shadow: 2px 2px 0px 0px var(--color-text);
  color: #111; /* Contrast text (dark for light theme) */
  z-index: 5;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1; /* Match text height */
}

[data-theme="dark"] .post-card-category-badge {
  background: hsl(164, 40%, 40%); /* Darker mint for dark theme */
  color: hsl(164, 61%, 95%); /* Very light mint text for dark theme */
}

.post-card-content {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.post-card-meta {
  display: flex;
  gap: 12px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--color-text-muted);
  margin-bottom: 8px; /* Decreased spacing */
}

.post-card-title {
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 8px; /* Decreased spacing */
  line-height: 1.3;
}

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

.post-card-excerpt {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--color-text-muted);
  margin-bottom: 12px; /* Decreased spacing */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 0; /* Removed bottom margin */
}

.post-tag {
  font-size: 0.7rem;
  font-weight: 800; /* Bolder text */
  color: var(--color-text);
  background: var(--color-accent-soft);
  padding: 3px 10px;
  border: 2px solid var(--color-text); /* Thicker border */
  box-shadow: 2px 2px 0px 0px var(--color-text); /* Neo-Brutalist shadow */
  border-radius: 0; /* Sharp corners */
}

.post-card-actions {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 16px;
  border-top: 1px dashed var(--color-border);
}

@media (max-width: 580px) {
  .post-card-actions {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
}

.btn-read-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--color-surface);
  border: 2px solid var(--color-text);
  box-shadow: 3px 3px 0px 0px var(--color-text);
  font-weight: 800;
  text-decoration: none;
  color: var(--color-text);
  font-size: 0.9rem;
  transition: all 0.2s;
}

.btn-read-more:hover {
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0px 0px var(--color-text);
  background: var(--color-accent-soft);
}

/* Header Pagination - Fixed Horizontal Alignment */
.header-pagination {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 10;
}

.pagination-btn {
  position: absolute;
  top: 50%;
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  background: var(--color-surface);
  border: 3px solid var(--color-text);
  box-shadow: 4px 4px 0px 0px var(--color-text);
  color: var(--color-text);
  text-decoration: none;
  font-weight: 800;
  transition: all 0.2s ease;
  cursor: pointer;
  border-radius: 0;
  box-sizing: border-box; /* Ensure border doesn't affect height */
}

.pagination-btn.prev {
  left: -25px;
  transform: translateY(-50%);
}

.pagination-btn.next {
  right: -25px;
  transform: translateY(-50%);
}

/* Very Subtle Hover Animation (2px shift) */
.pagination-btn:hover:not(.disabled) {
  background: var(--color-accent-soft);
  box-shadow: 6px 6px 0px 0px var(--color-text);
}

.pagination-btn.prev:hover:not(.disabled) {
  transform: translate(-2px, calc(-50% - 2px));
}

.pagination-btn.next:hover:not(.disabled) {
  transform: translate(2px, calc(-50% - 2px));
}

.pagination-btn.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
  filter: grayscale(1);
}

@media (max-width: 1200px) {
  .pagination-btn.prev { left: -15px; }
  .pagination-btn.next { right: -15px; }
}

@media (max-width: 768px) {
  .section-header {
    padding: 64px 60px; /* Increased side padding for deeper overlap */
  }
  .pagination-btn.prev { left: -40px; }
  .pagination-btn.next { right: -40px; }
}

@media (max-width: 600px) {
  .blog-controls {
    flex-direction: column;
    align-items: stretch;
    margin-top: 24px; /* Tighter spacing on mobile */
  }
  .custom-select-wrapper, .search-wrapper {
    max-width: 100%;
    width: 100%;
  }
}

[data-theme="dark"] .pagination-btn {
  color: var(--color-text);
}


/* Footer Pagination */
.footer-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 24px;
  margin-top: 64px;
  margin-bottom: 80px;
  width: 100%;
}

.footer-pagination .pagination-btn {
  position: static;
  transform: none;
}

.footer-pagination .pagination-btn:hover:not(.disabled) {
  transform: translate(-3px, -3px);
  box-shadow: 7px 7px 0px 0px var(--color-text);
}

.footer-pagination .pagination-btn:active:not(.disabled) {
  transform: translate(1px, 1px);
  box-shadow: 3px 3px 0px 0px var(--color-text);
}

/* ── 9. Project Card ─────────────────────────────────────── */
.project-card {
  background: var(--color-surface);
  border-radius: 16px;
  border: 3px solid var(--color-text);
  box-shadow: 6px 6px 0px 0px var(--color-text);
  padding: 28px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  overflow: hidden;
}

.project-card:hover {
  transform: translate(2px, 2px);
  box-shadow: 4px 4px 0px 0px var(--color-text);
}

.project-card.featured {
  background: var(--color-accent-soft);
}

.project-card.featured::before {
  content: '★ Featured';
  position: absolute;
  top: 16px;
  right: 16px;
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--color-text);
  font-family: var(--font-display);
  border: 2px solid var(--color-text);
  padding: 4px 10px;
  border-radius: 20px;
  background: var(--color-surface);
  box-shadow: 2px 2px 0 0 var(--color-text);
}

.project-card__title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 12px;

}

.project-card__desc {
  color: var(--color-text-muted);
  font-size: 0.92rem;
  margin-bottom: 16px;
}

.project-card__tech {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}

.project-card__links {
  display: flex;
  gap: 12px;
}

.project-card__links a {
  font-size: 0.85rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ── 9. Post Page (Single) ───────────────────────── */
/* ── 9. Post Page (Single) ───────────────────────── */
.post-detail-container {
  max-width: 900px !important;
  margin: 0 auto !important;
}

.post-detail-container .section-title {
  font-size: clamp(1.8rem, 4.5vw, 2.8rem);
  margin-bottom: 20px;
}

.post-header-badge-container.top-left {
  position: absolute;
  top: -15px;
  left: 28px;
  z-index: 10;
}

.post-category-box {
  display: inline-block;
  padding: 4px 14px; /* Reduced vertical padding */
  font-weight: 800;
  font-size: 0.72rem; /* Reduced font size */
  border: 3px solid var(--color-text);
  box-shadow: 4px 4px 0px 0px var(--color-text);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #fff !important; /* High contrast white text for category colors */
}

.post-header-date-container.bottom-right {
  position: absolute;
  bottom: -25px;
  right: 28px;
  z-index: 10;
  background: var(--color-surface);
  border: 3px solid var(--color-text);
  padding: 2px 10px; /* Reduced vertical padding */
  box-shadow: 4px 4px 0px 0px var(--color-text);
}

.post-header-date {
  font-weight: 800;
  color: var(--color-text);
  font-size: 0.72rem; /* Reduced font size */
  text-transform: uppercase;
}

.post-content {
  margin-top: 64px;
  font-family: var(--font-body);
  font-size: 1.15rem;
  line-height: 1.65;
  color: var(--color-text);
}

.post-body-inner h1, .post-body-inner h2, .post-body-inner h3 {
  font-family: var(--font-display);
  font-weight: 800;
  margin-top: 2.5em;
  margin-bottom: 0.8em;
  line-height: 1.2;
}

.post-body-inner h1 { font-size: 2.2rem; }
.post-body-inner h2 { font-size: 1.8rem; }
.post-body-inner h3 { font-size: 1.4rem; }

.post-body-inner p {
  margin-bottom: 1.6em;
}

/* Lists and Margins */
.post-body-inner ul, .post-body-inner ol {
  margin: 1.5em 0 2em 2rem;
  padding-left: 0;
}

.post-body-inner li {
  margin-bottom: 0.8rem;
  padding-left: 0.5rem;
}

/* Links and Hover State */
.post-content a, .post-body-inner a {
  color: var(--color-accent);
  text-decoration: none;
  border-bottom: 2px solid var(--color-accent-soft);
  transition: all 0.2s ease;
  cursor: pointer !important;
}

.post-content a:hover, .post-body-inner a:hover {
  font-weight: bold !important;
  text-decoration: underline !important;
  background: var(--color-accent-soft) !important;
  color: var(--color-text-dark) !important;
}

/* Blockquote - Neo-Brutalist Box */
.post-body-inner blockquote {
  margin: 3em 0;
  padding: 2rem;
  background: var(--color-accent-soft);
  border: 2px solid var(--color-text);
  box-shadow: 8px 8px 0px 0px var(--color-text);
  position: relative;
  font-style: italic;
  color: var(--color-text-dark);
}

.post-body-inner blockquote p {
  margin-bottom: 0;
  font-size: 1.2rem;
}

/* Horizontal Rule */
.post-body-inner hr {
  border: none !important;
  height: 6px !important;
  background: var(--color-text) !important;
  margin: 4em 0 !important;
  position: relative;
  box-shadow: 4px 4px 0px 0px var(--color-accent-soft) !important;
}

.post-body-inner img {
  width: 100%;
  height: auto;
  border: 4px solid var(--color-text) !important;
  box-shadow: 4px 4px 0px 0px var(--color-text) !important;
  margin: 2.5em 0;
  border-radius: 0;
  display: block;
}

.iframe-wrapper {
  position: relative;
  width: 100%;
  height: 458px;
  margin: 2.5em 0;
  border: 4px solid var(--color-text) !important;
  box-shadow: 4px 4px 0px 0px var(--color-text) !important;
}

.iframe-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none !important;
}

/* Balanced Table */
.post-body-inner table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5em 0;
  background: var(--color-surface);
  border: 3px solid var(--color-text);
  box-shadow: 6px 6px 0px 0px var(--color-text);
  border: 2px solid var(--color-text);
  box-shadow: 4px 4px 0px 0px var(--color-text);
}

.post-body-inner th, .post-body-inner td {
  padding: 12px 16px;
  border: 1px solid var(--color-text);
  text-align: left;
}

.post-body-inner td img , .post-body-inner th img {
  display: block;
  margin: 0 auto;
  max-width: 100%;
  height: auto;
  border: 1px solid !important;
  box-shadow: none !important
}

.post-body-inner th {
  background: var(--color-accent-soft);
  font-weight: 800;
  text-transform: uppercase;
  font-size: 0.85rem;
}

/* Pre / Code Blocks */
.post-body-inner pre {
  position: relative;
  background: #383838 !important;
  border: 3px solid var(--color-text) !important;
  box-shadow: 4px 4px 0px 0px var(--color-text) !important;
  border-radius: 0px !important;
  padding: 2em 1.5em 1em !important;
  margin: 1.25em 0 2.5em !important;
  overflow-x: auto;
}

.post-body-inner code {
  font-size: 0.9rem !important;
}

.code-lang-label {
  position: absolute;
  top: 0;
  right: 0;
  background: var(--color-text);
  color: var(--color-surface);
  padding: 4px 10px;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
}

/* Post Footer Tags */
.post-tags-footer {
  margin-top: 80px;
  padding-top: 40px;
  border-top: 3px solid var(--color-text);
}

/* ── Carousel Widget ─────────────────────────────────────── */
.carousel-widget {
  border: 4px solid var(--color-text);
  box-shadow: 6px 6px 0px 0px var(--color-text);
  margin: 3em 0;
  background: var(--color-surface);
  border-radius: 0;
}

.carousel-widget-header {
  background: var(--color-accent-soft);
  border-bottom: 3px solid var(--color-text);
  padding: 10px 16px;
  display: flex;
  align-items: center;
}

.carousel-widget-title {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text);
}

.carousel-widget-slides {
  display: flex;
  flex-direction: column;
  gap: 1.5em;
  padding: 24px;
}

.carousel-widget-slide {
  border: 2px solid var(--color-text);
  padding: 12px;
  background: var(--color-bg);
}

.carousel-widget-slide img {
  border: none !important;
  box-shadow: none !important;
  margin: 0 auto;
}

.tags-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 24px;
}

.tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* Image Modal - True Neo-Brutalist */
.image-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background-color: rgba(0,0,0,0.92);
  backdrop-filter: blur(12px);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px;
  box-sizing: border-box;
  cursor: zoom-out;
}

.modal-content {
  display: block;
  max-width: 95%;
  max-height: 75vh;
  border: 5px solid var(--color-text);
  background-color: #000;
  box-shadow: 12px 12px 0px var(--color-text);
  object-fit: contain;
  transition: transform 0.3s ease;
}

.modal-content:hover {
  transform: scale(1.01);
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 44px;
  height: 44px;
  background: var(--color-rose);
  border: 3px solid #000;
  box-shadow: 4px 4px 0px #000;
  color: #000;
  display: flex !important;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
  z-index: 10000;
  transition: 0.2s;
}

.modal-close:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0px #000;
}

@media (max-width: 768px) {
  .image-modal { padding: 15px; }
  .modal-close { top: 10px; right: 10px; width: 40px; height: 40px; font-size: 24px; }
  .modal-content { border-width: 3px; box-shadow: 8px 8px 0px #000; }
  .modal-caption { font-size: 0.8rem; margin-top: 16px; }
}

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

@media (max-width: 768px) {
  .post-header-badge {
    right: 12px;
    font-size: 0.8rem;
  }
  .post-body-inner h2 { font-size: 1.8rem; }
  .modal-content { max-width: 100%; }
}

.meta-item {
  display: flex;
  flex-direction: column;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-text);
}

.meta-label {
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 4px;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-decoration-color: var(--color-text);
}

@media (max-width: 800px) {
  .post-meta-sidebar {
    position: static;
    transform: none;
    margin-top: 32px;
    flex-direction: row;
    flex-wrap: wrap;
    padding: 16px;
  }
}

.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 40px;
  padding-top: 32px;
  border-top: 3px dashed var(--color-text);
}

/* ── 10. Filters (blog listing) ──────────────────────────── */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 48px;
  align-items: center;
}

.filter-btn {
  padding: 8px 20px;
  border-radius: 8px;
  border: 2px solid var(--color-text);
  box-shadow: 3px 3px 0 0 var(--color-text);
  background: var(--color-surface);
  color: var(--color-text);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.2s;
}

.filter-btn:hover {
  background: var(--color-accent-soft);
  transform: translate(1px, 1px);
  box-shadow: 2px 2px 0 0 var(--color-text);
}

.filter-btn.active {
  background: var(--color-accent);
  box-shadow: 1px 1px 0 0 var(--color-text);
  transform: translate(2px, 2px);
}





/* ── 11. Loading & Error States ──────────────────────────── */
.loading-skeleton {
  background: linear-gradient(90deg, var(--color-light-down-2) 25%, var(--color-light-down-3) 50%, var(--color-light-down-2) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

.no-posts {
  text-align: center;
  padding: 60px 0;
  color: var(--color-text-muted);
  font-size: 1.1rem;
}

/* ── 12. Animations ──────────────────────────────────────── */
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-3px); }
}

@keyframes twinkle {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.3; transform: scale(0.8); }
}

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

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

.fade-in-up {
  animation: fadeInUp 0.5s ease forwards;
  opacity: 0;
}

/* Stagger children */
.stagger > * { animation: fadeInUp 0.5s ease forwards; opacity: 0; }
.stagger > *:nth-child(1) { animation-delay: 0.05s; }
.stagger > *:nth-child(2) { animation-delay: 0.1s; }
.stagger > *:nth-child(3) { animation-delay: 0.15s; }
.stagger > *:nth-child(4) { animation-delay: 0.2s; }
.stagger > *:nth-child(5) { animation-delay: 0.25s; }
.stagger > *:nth-child(6) { animation-delay: 0.3s; }
.stagger > *:nth-child(7) { animation-delay: 0.35s; }
.stagger > *:nth-child(8) { animation-delay: 0.4s; }
.stagger > *:nth-child(9) { animation-delay: 0.45s; }

/* ── 13. Responsive ──────────────────────────────────────── */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-hamburger { display: block; }
  .mobile-nav { display: block; }

  .hero {
    flex-direction: column;
    text-align: center;
    padding: 40px 0;
    gap: 24px;
  }

  .hero-image { width: 200px; }
  .hero-desc { margin-left: auto; margin-right: auto; }

  .section { padding: 48px 0; }

  body { padding-bottom: 70px; }

  .footer-inner { flex-direction: column; text-align: center; }

  /* Mobile Neo-Brutalist Layout Scaling */
  .page-header-wrapper {
    margin: 40px 28px 80px; /* Shrinks the card to give 28px extra space on each side */
  }
  .section-title {
    font-size: 2.2rem !important; /* Smaller to fit the narrower card */
    margin-bottom: 16px;
  }
  .section-subtitle {
    font-size: 1rem !important; 
  }
  .page-header-bg-dots {
    width: 140px;
    height: 140px;
    top: -40px; /* Sticks out into the new margin space */
    left: -40px;
    background-size: 18px 18px;
  }
  .page-header-bg-circle {
    width: 160px;
    height: 160px;
    bottom: -50px;
    right: -40px; /* Sticks out into the new margin space */
  }
  .page-header-bg-circle::after {
    border-width: 3px;
    transform: translate(-14px, 14px);
  }
  .section-header {
    box-shadow: 12px 12px 0px 0px #4d4d4d;
    padding: 32px 20px;
  }
}

@media (min-width: 769px) {
  .mobile-nav { display: none !important; }
}

/* ── 14. 404 Page ────────────────────────────────────────── */
.error-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  text-align: center;
}
.error-page h4 {
  font-size: clamp(4rem, 10vw, 8rem);
  color: var(--color-accent);
  line-height: 1;
  margin-bottom: 10px;
}

.error-page p {
  color: var(--color-text-muted);
  font-size: 1.2rem;
  margin-bottom: 32px;
}

/* ── Prism Syntax Highlighting inside dark code pre block ── */
.post-body pre .token.keyword,
.post-body pre .token.selector,
.post-body pre .token.important,
.post-body pre .token.atrule {
  color: #ff79c6; /* Pink */
  font-weight: bold;
}

.post-body pre .token.string,
.post-body pre .token.attr-value {
  color: #f1fa8c; /* Yellow */
}

.post-body pre .token.comment,
.post-body pre .token.prolog,
.post-body pre .token.doctype,
.post-body pre .token.cdata {
  color: #6272a4; /* Comment Grey */
  font-style: italic;
}

.post-body pre .token.function,
.post-body pre .token.class-name {
  color: #50fa7b; /* Green */
}

.post-body pre .token.operator,
.post-body pre .token.entity,
.post-body pre .token.url {
  color: #ffb86c; /* Orange */
}

.post-body pre .token.variable,
.post-body pre .token.property,
.post-body pre .token.constant {
  color: #8be9fd; /* Cyan */
}

/* ── 9. Projects (Blog-Style with Tech Touch) ──────────────── */
.project-card--featured {
  background: var(--color-accent-soft) !important;
}

.project-card-placeholder {
  position: relative;
  width: 100%;
  height: 100%;
  background: var(--color-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow: hidden;
}

.project-card-placeholder::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(var(--color-text-muted) 1.5px, transparent 1.5px);
  background-size: 20px 20px;
  opacity: 0.15; /* Subtle dots */
  z-index: 1;
}

.project-placeholder-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  text-align: center;
  color: var(--color-text);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  position: relative;
  z-index: 2;
  opacity: 1; /* Full opacity name */
}

.project-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--color-surface);
  border: 1.5px solid var(--color-text);
  box-shadow: 2px 2px 0px 0px var(--color-text);
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 0.72rem;
  color: var(--color-text);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.project-action-btn:hover {
  transform: translate(-1.5px, -1.5px);
  box-shadow: 3.5px 3.5px 0px 0px var(--color-text);
  background: var(--color-accent-soft);
}

.project-action-btn .icon {
  width: 14px;
  height: 14px;
}

.project-card-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 12px;
  color: var(--color-text);
}

.project-card-description {
  font-family: var(--font-body);
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--color-text-muted);
  margin-bottom: 24px;
  flex: 1;
}

.project-tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.tech-tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 4px 8px;
  background: var(--color-accent-soft);
  border: 2px solid var(--color-text);
  color: var(--color-text);
  text-transform: uppercase;
  border-radius: 0;
}

.project-card-links {
  display: flex;
  gap: 16px;
  margin-top: auto;
}

.project-link {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 0.85rem;
  color: var(--color-text);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.project-link:hover {
  text-decoration: underline;
  text-decoration-thickness: 2px;
}

.project-link .icon {
  width: 18px;
  height: 18px;
}

/* ── 10. Project View Layouts ────────────────────────────── */

/* View Switcher */
.view-switcher {
  display: flex;
  background: var(--color-surface);
  border: 4px solid var(--color-text);
  box-shadow: 4px 4px 0 var(--color-text);
  padding: 4px;
}

.view-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  color: var(--color-text);
  opacity: 0.4;
}

.view-btn.active {
  opacity: 1;
  background: var(--color-mint);
  box-shadow: inset 2px 2px 0 rgba(0,0,0,0.1);
}

.view-btn:hover:not(.active) {
  opacity: 0.7;
}

.view-btn .icon {
  width: 20px;
  height: 20px;
}

/* Base Container styles */
.projects-container {
  margin-top: 120px; /* Further increased margin as requested */
  transition: all 0.3s ease;
}

/* 1. Grid View (Default) */
.projects-view-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* Enforce 2 per row on desktop */
  gap: 32px;
}

@media (max-width: 480px) {
  .projects-view-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

/* 2. List View */
.projects-view-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.projects-view-list .project-card-wrapper {
  max-width: 950px;
  margin: 0 auto;
  width: 100%;
}

.projects-view-list .post-card {
  flex-direction: row;
  align-items: stretch; /* Stretch to fill height */
  gap: 0;
  height: auto;
  padding: 0; /* Remove padding to make image flush */
}

.projects-view-list .post-card-image-wrapper {
  width: 280px;
  height: auto; /* Height will be determined by content or stretch */
  min-height: 200px;
  border-bottom: none;
  border-right: 2px solid var(--color-text);
  flex-shrink: 0;
}

.projects-view-list .post-card-content {
  padding: 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Responsive Adjustments */
@media (max-width: 900px) {
  .projects-view-list .post-card {
    flex-direction: column;
  }
  
  .projects-view-list .post-card-image-wrapper {
    width: 100%;
    height: 240px;
    border-right: none;
    border-bottom: 2px solid var(--color-text);
  }
}

@media (max-width: 768px) {
  .projects-container {
    margin-top: 60px; /* Less margin on mobile */
  }
  
  .section-header {
    gap: 40px;
  }
}

/* Design System Page */
.color-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 20px;
}

.color-card {
  border: 2px solid var(--color-text);
  box-shadow: 4px 4px 0 var(--color-text);
  padding: 12px;
  background: var(--color-surface);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.color-card:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--color-text);
}

.color-swatch {
  height: 100px;
  border: 2px solid var(--color-text);
  margin-bottom: 12px;
}

@media (max-width: 480px) {
  .color-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  
  .color-swatch {
    height: 80px;
  }
  
  .color-card {
    padding: 10px;
  }
}

/* Social Connect Grid (Global) */
.connect-section {
  padding: 80px 0;
  border-top: 2px solid var(--color-border);
  background: var(--color-bg);
}

.links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 32px;
}

.link-box {
  border: 2px solid var(--color-text);
  padding: 32px 24px 24px 24px;
  background: var(--color-surface);
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.link-box:hover {
  transform: translate(-3px, -3px);
  box-shadow: 6px 6px 0 var(--color-text);
}

.link-badge {
  position: absolute;
  top: -14px;
  left: 24px;
  border: 2px solid var(--color-text);
  padding: 4px 14px;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  box-shadow: 2px 2px 0 var(--color-text);
}

@media (max-width: 768px) {
  .connect-section {
    padding: 60px 0;
  }
  
  .links-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

