:root {
      --blue: #3B82F6;
      --green: #10B981;
      --violet: #8B5CF6;
      --amber: #F59E0B;
      --red: #EF4444;
      --navy: #0F172A;
      --slate: #1E293B;
      --slate-hi: #334155;
      --gray: #E5E7EB;
      --white: #FFFFFF;
      --page: #E5E7EB;
      --page-soft: #F3F4F6;
      --surface: #FFFFFF;
      --surface-raised: rgba(255, 255, 255, .86);
      --surface-tint: #F3F4F6;
      --fg: #111827;
      --muted: #6B7280;
      --muted-strong: #374151;
      --line: rgba(17, 24, 39, .12);
      --line-strong: rgba(17, 24, 39, .22);
      --hero-bg: #E5E7EB;
      --hero-panel: rgba(255, 255, 255, .76);
      --hero-fg: #111827;
      --hero-muted: #4B5563;
      --nav-bg: rgba(255, 255, 255, .82);
      --nav-border: rgba(17, 24, 39, .12);
      --shadow: 0 24px 70px rgba(15, 23, 42, .16);
      --shadow-soft: 0 14px 34px rgba(15, 23, 42, .10);
      --font-display: Newsreader, "Iowan Old Style", Georgia, ui-serif, serif;
      --font-body: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
      --ease-standard: cubic-bezier(.2, .8, .2, 1);
      --ease-spring: cubic-bezier(.16, 1, .3, 1);
      --motion-fast: 180ms;
      --motion-med: 420ms;
      --motion-slow: 780ms;
      --grid-dot: rgba(17, 24, 39, 0.04);
      color-scheme: light;
    }

    html[data-theme="dark"] {
      --page: #0F172A;
      --page-soft: #111C31;
      --surface: #1E293B;
      --surface-raised: rgba(30, 41, 59, .78);
      --surface-tint: #334155;
      --fg: #FFFFFF;
      --muted: #CBD5E1;
      --muted-strong: #E2E8F0;
      --line: rgba(255, 255, 255, .12);
      --line-strong: rgba(255, 255, 255, .22);
      --hero-bg: #0F172A;
      --hero-panel: rgba(30, 41, 59, .68);
      --hero-fg: #FFFFFF;
      --hero-muted: #CBD5E1;
      --nav-bg: rgba(15, 23, 42, .86);
      --nav-border: rgba(255, 255, 255, .12);
      --shadow: 0 28px 80px rgba(2, 6, 23, .42);
      --shadow-soft: 0 14px 38px rgba(2, 6, 23, .34);
      --grid-dot: rgba(255, 255, 255, 0.05);
      color-scheme: dark;
    }

    * {
      box-sizing: border-box;
    }

    html {
      scroll-behavior: smooth;
    }

    body {
      margin: 0;
      overflow-x: hidden;
      background-color: var(--page);
      background-image: radial-gradient(var(--grid-dot) 1.2px, transparent 1.2px);
      background-size: 24px 24px;
      color: var(--fg);
      font-family: var(--font-body);
      line-height: 1.5;
      text-rendering: geometricPrecision;
      transition: background-color var(--motion-med) var(--ease-standard), color var(--motion-med) var(--ease-standard);
    }

    img, svg {
      max-width: 100%;
      display: block;
    }

    svg {
      stroke: currentColor;
      stroke-width: 2;
      fill: none;
      stroke-linecap: round;
      stroke-linejoin: round;
    }

    a {
      color: inherit;
      text-decoration: none;
    }

    button, input {
      font: inherit;
    }

    button {
      cursor: pointer;
    }

    .shell {
      width: min(1180px, calc(100% - 40px));
      margin: 0 auto;
    }

    /* Header Styling */
    .site-header {
      position: sticky;
      top: 0;
      z-index: 40;
      border-bottom: 1px solid var(--nav-border);
      background: var(--nav-bg);
      backdrop-filter: blur(18px);
      transition: background-color var(--motion-med) var(--ease-standard), border-color var(--motion-med) var(--ease-standard);
    }

    .nav-shell {
      min-height: 76px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 18px;
    }

    .brand {
      display: inline-flex;
      align-items: center;
      gap: 10px;
      color: var(--fg);
      font-weight: 800;
      font-size: 20px;
      text-decoration: none;
    }

    .brand-mark {
      width: 40px;
      height: 40px;
      object-fit: contain;
    }

    .nav-links {
      display: flex;
      align-items: center;
      gap: 3px;
      color: var(--muted);
      font-size: 14px;
      font-weight: 700;
    }

    .nav-links a {
      min-height: 40px;
      display: inline-flex;
      align-items: center;
      padding: 0 11px;
      border-radius: 8px;
      color: var(--muted);
      transition: background-color var(--motion-fast) var(--ease-standard), color var(--motion-fast) var(--ease-standard), transform var(--motion-fast) var(--ease-standard);
    }

    .nav-links a:hover,
    .nav-links a:focus-visible {
      background: var(--surface-tint);
      color: var(--fg);
      transform: translateY(-1px);
      outline: none;
    }

    .nav-links a.active {
      background: var(--surface-tint);
      border: 1.5px solid var(--blue);
      color: var(--fg);
    }

    .nav-actions {
      display: flex;
      align-items: center;
      gap: 16px;
    }

    /* Buttons */
    .btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      padding: 8px 18px;
      font-size: 13px;
      font-weight: 700;
      border-radius: 999px;
      border: 1px solid transparent;
      transition: transform var(--motion-fast) var(--ease-standard), box-shadow var(--motion-fast) var(--ease-standard);
    }

    .btn:hover {
      transform: translateY(-2px);
    }

    .btn-primary {
      background: var(--blue);
      color: #FFFFFF;
      box-shadow: 0 8px 16px rgba(59, 130, 246, .24);
    }

    .btn-primary:hover {
      box-shadow: 0 12px 24px rgba(59, 130, 246, .30);
    }

    /* Theme Switcher */
    .theme-switch {
      background: var(--surface);
      border: 1px solid var(--line);
      border-radius: 999px;
      height: 38px;
      padding: 0 6px;
      display: flex;
      align-items: center;
      color: var(--fg);
      box-shadow: 0 2px 4px rgba(0, 0, 0, .05);
      position: relative;
    }

    .theme-choice {
      display: flex;
      align-items: center;
      gap: 6px;
      font-size: 11px;
      font-weight: 800;
      text-transform: uppercase;
      padding: 6px 10px;
      border-radius: 999px;
      z-index: 1;
      opacity: 0.4;
      transition: opacity var(--motion-fast) var(--ease-standard);
    }

    .theme-choice svg {
      width: 13px;
      height: 13px;
    }

    .theme-switch[aria-pressed="false"] .theme-choice.light,
    .theme-switch[aria-pressed="true"] .theme-choice.dark {
      opacity: 1;
      background: var(--page-soft);
      box-shadow: inset 0 1px 2px rgba(0, 0, 0, .05);
    }

    .theme-switch[aria-pressed="false"] .theme-choice.dark,
    .theme-switch[aria-pressed="true"] .theme-choice.light {
      background: transparent;
      box-shadow: none;
    }

    /* Blog Header Design (Screen 2) */
    .blog-hub-header {
      text-align: center;
      padding: 80px 0 40px;
    }

    .blog-hub-header .section-kicker {
      font-size: 11px;
      font-weight: 800;
      color: var(--blue);
      text-transform: uppercase;
      letter-spacing: 0.1em;
      margin-bottom: 12px;
      display: inline-flex;
      align-items: center;
      gap: 6px;
    }

    .blog-hub-header h1 {
      font-family: var(--font-display);
      font-size: clamp(44px, 7vw, 68px);
      line-height: 0.95;
      margin: 0 0 16px;
      font-weight: 700;
      color: var(--fg);
    }

    .blog-hub-header h1 span {
      color: var(--blue);
    }

    .blog-hub-header .lead {
      font-size: clamp(16px, 2vw, 19px);
      color: var(--muted);
      max-width: 680px;
      margin: 0 auto 36px;
      line-height: 1.6;
    }

    /* Categories Navigation (Screen 2) */
    .categories-nav {
      display: flex;
      justify-content: center;
      align-items: center;
      flex-wrap: wrap;
      gap: 10px;
      margin-bottom: 40px;
    }

    .category-btn {
      background: transparent;
      border: 1px solid var(--line);
      color: var(--muted);
      font-size: 13px;
      font-weight: 700;
      padding: 8px 18px;
      border-radius: 999px;
      transition: all var(--motion-fast) var(--ease-standard);
    }

    .category-btn:hover {
      border-color: var(--fg);
      color: var(--fg);
    }

    .category-btn.active {
      background: var(--blue);
      border-color: var(--blue);
      color: #FFFFFF;
      box-shadow: 0 8px 16px rgba(59, 130, 246, 0.2);
    }

    /* Search Bar (Screen 2) */
    .search-wrapper {
      max-width: 600px;
      width: 100%;
      margin: 0 auto 60px;
      position: relative;
    }

    .search-input-container {
      position: relative;
      display: flex;
      align-items: center;
    }

    .search-icon {
      position: absolute;
      left: 20px;
      width: 20px;
      height: 20px;
      color: var(--muted);
      pointer-events: none;
      transition: color var(--motion-fast) var(--ease-standard);
    }

    .search-input {
      width: 100%;
      height: 54px;
      padding: 0 20px 0 54px;
      background: var(--surface);
      border: 1px solid var(--line);
      border-radius: 999px;
      color: var(--fg);
      font-size: 15px;
      box-shadow: var(--shadow-soft);
      transition: all var(--motion-med) var(--ease-standard);
    }

    .search-input::placeholder {
      color: var(--muted);
      opacity: 0.8;
    }

    .search-input:focus {
      outline: none;
      border-color: var(--blue);
      box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12), var(--shadow);
    }

    .search-input:focus + .search-icon {
      color: var(--blue);
    }

    /* Blog Grid & Cards */
    .blog-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
      gap: 30px;
      margin-bottom: 80px;
      transition: opacity var(--motion-fast) var(--ease-standard);
    }

    .blog-card {
      background: var(--surface);
      border-radius: 18px;
      border: 1px solid var(--line);
      overflow: hidden;
      display: flex;
      flex-direction: column;
      height: 100%;
      box-shadow: var(--shadow-soft);
      transition: transform var(--motion-med) var(--ease-standard), box-shadow var(--motion-med) var(--ease-standard), border-color var(--motion-med) var(--ease-standard), background-color var(--motion-med) var(--ease-standard);
    }

    .blog-card.hidden {
      display: none;
    }

    .blog-card:hover {
      transform: translateY(-6px);
      box-shadow: var(--shadow);
      border-color: var(--blue);
    }

    .card-image-wrap {
      position: relative;
      width: 100%;
      height: 220px;
      overflow: hidden;
      background: var(--page-soft);
    }

    .card-image-wrap img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      transition: transform var(--motion-slow) var(--ease-spring);
    }

    .blog-card:hover .card-image-wrap img {
      transform: scale(1.05);
    }

    .card-tags {
      position: absolute;
      top: 16px;
      left: 16px;
      display: flex;
      gap: 8px;
      z-index: 10;
    }

    .card-tag {
      background: rgba(15, 23, 42, 0.78);
      backdrop-filter: blur(8px);
      color: #FFFFFF;
      font-size: 11px;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.05em;
      padding: 4px 10px;
      border-radius: 6px;
      border: 1px solid rgba(255, 255, 255, 0.15);
    }

    .card-body {
      padding: 24px;
      display: flex;
      flex-direction: column;
      flex-grow: 1;
    }

    .card-meta {
      display: flex;
      align-items: center;
      gap: 16px;
      margin-bottom: 12px;
      font-size: 12px;
      color: var(--muted);
    }

    .meta-item {
      display: flex;
      align-items: center;
      gap: 6px;
    }

    .meta-icon {
      width: 14px;
      height: 14px;
      opacity: 0.7;
    }

    .blog-card h2.post-title {
      font-size: 20px;
      line-height: 1.35;
      font-weight: 700;
      margin: 0 0 10px;
      color: var(--fg);
    }

    .blog-card h2.post-title a {
      color: inherit;
      transition: color var(--motion-fast) var(--ease-standard);
    }

    .blog-card:hover h2.post-title a,
    .blog-card h2.post-title a:hover {
      color: var(--blue);
    }

    .excerpt {
      font-size: 14px;
      line-height: 1.6;
      color: var(--muted);
      margin: 0 0 20px;
      flex-grow: 1;
      display: -webkit-box;
      -webkit-line-clamp: 3;
      -webkit-box-orient: vertical;
      overflow: hidden;
    }

    .read-more-link {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      font-size: 14px;
      font-weight: 700;
      color: var(--blue);
      align-self: flex-start;
      transition: gap var(--motion-fast) var(--ease-standard);
    }

    .read-more-link:hover {
      gap: 10px;
    }

    .arrow-icon {
      width: 16px;
      height: 16px;
    }

    /* No Results Styling */
    .no-results {
      text-align: center;
      padding: 60px 20px;
      background: var(--surface);
      border-radius: 18px;
      border: 1px dashed var(--line);
      margin-bottom: 80px;
    }

    .no-results.hidden {
      display: none;
    }

    .no-results h2 {
      font-size: 22px;
      font-weight: 700;
      margin: 0 0 8px;
    }

    .no-results p {
      color: var(--muted);
      margin: 0;
    }

    /* Footer Styling */
    .site-footer {
      border-top: 1px solid var(--line);
      background: var(--surface-raised);
      padding: 64px 0 32px;
      font-size: 14px;
      transition: background-color var(--motion-med) var(--ease-standard), border-color var(--motion-med) var(--ease-standard);
    }

    .footer-shell {
      display: flex;
      flex-direction: column;
      gap: 48px;
    }

    .footer-main {
      display: grid;
      grid-template-columns: 2fr repeat(3, 1fr);
      gap: 40px;
    }

    @media (max-width: 768px) {
      .footer-main {
        grid-template-columns: 1fr;
        gap: 30px;
      }
    }

    .footer-brand {
      max-width: 320px;
    }

    .footer-brand-row {
      display: flex;
      align-items: center;
      gap: 10px;
      font-weight: 800;
      font-size: 20px;
      color: var(--fg);
      margin-bottom: 16px;
    }

    .footer-brand-row img {
      width: 36px;
      height: 36px;
    }

    .footer-brand p {
      color: var(--muted);
      line-height: 1.5;
      font-size: 13.5px;
      margin: 0 0 24px;
    }

    .footer-column h3 {
      font-size: 11px;
      font-weight: 800;
      text-transform: uppercase;
      letter-spacing: 0.1em;
      color: var(--fg);
      margin: 0 0 16px;
    }

    .footer-links {
      list-style: none;
      padding: 0;
      margin: 0;
      display: flex;
      flex-direction: column;
      gap: 10px;
    }

    .footer-links a {
      color: var(--muted);
      transition: color var(--motion-fast) var(--ease-standard);
    }

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

    .footer-bottom {
      border-top: 1px solid var(--line);
      padding-top: 24px;
      display: flex;
      justify-content: space-between;
      color: var(--muted);
      font-size: 12px;
    }

    .footer-bottom-links {
      display: flex;
      gap: 20px;
    }

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