
    :root {
      --bg:        #0b1120;
      --bg2:       #111827;
      --bg3:       #1a2540;
      --border:    #1e2d45;
      --accent:    #00d4ff;
      --accent2:   #7c3aed;
      --accent3:   #f59e0b;
      --text:      #e2ecff;
      --muted:     #6b82a0;
      --font:      'Sora', sans-serif;
      --mono:      'JetBrains Mono', monospace;
    }

    * { margin: 0; padding: 0; box-sizing: border-box; }
    html { scroll-behavior: smooth; }

    body {
      background: var(--bg);
      color: var(--text);
      font-family: var(--font);
      line-height: 1.7;
      overflow-x: hidden;
    }

    body::before {
      content: '';
      position: fixed;
      inset: 0;
      background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
      pointer-events: none;
      z-index: 0;
    }

    /* ── PROGRESS BAR ── */
    .progress-bar {
      position: fixed;
      top: 0; left: 0;
      height: 3px;
      background: linear-gradient(90deg, var(--accent), var(--accent2));
      z-index: 200;
      transition: width 0.1s;
      width: 0%;
    }

    /* ── HEADER ── */
    header {
      position: sticky;
      top: 0;
      z-index: 100;
      background: rgba(11,17,32,0.92);
      backdrop-filter: blur(16px);
      -webkit-backdrop-filter: blur(16px);
      border-bottom: 1px solid var(--border);
    }

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

    .logo {
      display: flex;
      align-items: center;
      gap: 0.65rem;
      text-decoration: none;
      flex-shrink: 0;
    }

    .logo-icon {
      width: 36px;
      height: 36px;
      background: linear-gradient(135deg, var(--accent), var(--accent2));
      border-radius: 9px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 1.1rem;
      flex-shrink: 0;
    }

    .logo-text {
      font-size: 1.05rem;
      font-weight: 800;
      color: var(--text);
      letter-spacing: -0.03em;
      line-height: 1.1;
    }

    .logo-sub {
      font-size: 0.6rem;
      color: var(--accent);
      font-weight: 400;
      letter-spacing: 0.1em;
      text-transform: uppercase;
    }

    nav {
      display: flex;
      gap: 0.1rem;
      flex-wrap: wrap;
    }

    nav a {
      color: var(--muted);
      text-decoration: none;
      font-size: 0.82rem;
      font-weight: 500;
      padding: 0.4rem 0.7rem;
      border-radius: 8px;
      transition: all 0.2s;
      white-space: nowrap;
    }

    nav a:hover {
      color: var(--accent);
      background: rgba(0,212,255,0.08);
    }

    /* ── HERO ── */
    .hero {
      position: relative;
      max-width: 1200px;
      margin: 0 auto;
      padding: 3.5rem 1.25rem 2.5rem;
      text-align: center;
      z-index: 1;
    }

    .hero-eyebrow {
      display: inline-flex;
      align-items: center;
      gap: 0.5rem;
      background: rgba(0,212,255,0.1);
      border: 1px solid rgba(0,212,255,0.25);
      color: var(--accent);
      padding: 0.35rem 0.9rem;
      border-radius: 30px;
      font-size: 0.75rem;
      font-weight: 600;
      letter-spacing: 0.06em;
      text-transform: uppercase;
      margin-bottom: 1.3rem;
    }

    .hero h1 {
      font-size: clamp(2rem, 6vw, 4.2rem);
      font-weight: 800;
      letter-spacing: -0.04em;
      line-height: 1.08;
      margin-bottom: 1rem;
    }

    .hero h1 span {
      background: linear-gradient(120deg, var(--accent) 0%, #a78bfa 50%, var(--accent3) 100%);
      -webkit-background-clip: text;
      background-clip: text;
      color: transparent;
    }

    .hero-desc {
      font-size: 1rem;
      color: var(--muted);
      max-width: 520px;
      margin: 0 auto 1.8rem;
    }

    .hero-ctas {
      display: flex;
      gap: 0.8rem;
      justify-content: center;
      flex-wrap: wrap;
    }

    .btn-primary {
      background: var(--accent);
      color: #0b1120;
      padding: 0.7rem 1.6rem;
      border-radius: 40px;
      font-weight: 700;
      font-size: 0.9rem;
      text-decoration: none;
      transition: all 0.2s;
      border: none;
      cursor: pointer;
      font-family: var(--font);
      display: inline-block;
    }

    .btn-primary:hover {
      transform: translateY(-2px);
      box-shadow: 0 8px 24px rgba(0,212,255,0.35);
    }

    .btn-ghost {
      background: transparent;
      color: var(--text);
      padding: 0.7rem 1.6rem;
      border-radius: 40px;
      font-weight: 600;
      font-size: 0.9rem;
      text-decoration: none;
      border: 1px solid var(--border);
      transition: all 0.2s;
      display: inline-block;
    }

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

    /* ── NEWSLETTER ── */
    .newsletter-bar {
      background: linear-gradient(135deg, #0d1e38, #131f35);
      border: 1px solid rgba(0,212,255,0.2);
      border-radius: 1.4rem;
      padding: 1.8rem 1.5rem;
      text-align: center;
      margin: 0 1.25rem 2rem;
      max-width: 1200px;
      margin-left: auto;
      margin-right: auto;
      position: relative;
      z-index: 1;
    }

    /* account for side padding on small screens */
    @media (max-width: 860px) {
      .newsletter-bar { margin-left: 1rem; margin-right: 1rem; }
    }

    .newsletter-bar h3 {
      font-size: 1.2rem;
      font-weight: 700;
      letter-spacing: -0.02em;
      margin-bottom: 0.35rem;
    }

    .newsletter-bar p {
      color: var(--muted);
      font-size: 0.88rem;
      margin-bottom: 1rem;
    }

    .newsletter-form {
      display: flex;
      gap: 0.6rem;
      max-width: 400px;
      margin: 0 auto;
      flex-wrap: wrap;
      justify-content: center;
    }

    .newsletter-form input {
      flex: 1;
      min-width: 180px;
      background: var(--bg3);
      border: 1px solid var(--border);
      color: var(--text);
      padding: 0.65rem 1rem;
      border-radius: 10px;
      font-family: var(--font);
      font-size: 0.88rem;
    }

    .newsletter-form input:focus {
      outline: none;
      border-color: var(--accent);
    }

    /* ── PAGE LAYOUT ── */
    .page-layout {
      max-width: 1200px;
      margin: 0 auto;
      padding: 0 1.25rem 3rem;
      display: grid;
      grid-template-columns: 1fr 280px;
      gap: 2rem;
      position: relative;
      z-index: 1;
    }

    @media (max-width: 860px) {
      .page-layout {
        grid-template-columns: 1fr;
      }
      .sidebar {
        order: -1;
      }
    }

    /* ── SECTION LABEL ── */
    .section-label {
      font-size: 0.68rem;
      font-weight: 700;
      letter-spacing: 0.15em;
      text-transform: uppercase;
      color: var(--accent);
      margin-bottom: 1.1rem;
      display: flex;
      align-items: center;
      gap: 0.5rem;
    }

    .section-label::after {
      content: '';
      flex: 1;
      height: 1px;
      background: var(--border);
    }

    /* ── FEATURED CARD ── */
    .featured-card {
      background: var(--bg2);
      border: 1px solid var(--border);
      border-radius: 1.4rem;
      overflow: hidden;
      margin-bottom: 2rem;
      display: grid;
      grid-template-columns: 1fr 1.2fr;
      transition: all 0.3s ease;
      text-decoration: none;
      color: inherit;
    }

    .featured-card:hover {
      border-color: var(--accent);
      box-shadow: 0 0 40px rgba(0,212,255,0.1);
      transform: translateY(-3px);
    }

    @media (max-width: 560px) {
      .featured-card {
        grid-template-columns: 1fr;
      }
    }

    .featured-img {
      background: linear-gradient(135deg, #0a1628 0%, #1a2a4a 100%);
      min-height: 200px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 4.5rem;
      position: relative;
      overflow: hidden;
    }

    .featured-img img {
      width: 100%; height: 100%;
      object-fit: cover;
      position: absolute; inset: 0;
    }

    .featured-body {
      padding: 1.8rem;
      display: flex;
      flex-direction: column;
      justify-content: center;
    }

    .post-meta {
      display: flex;
      gap: 0.5rem;
      flex-wrap: wrap;
      align-items: center;
      margin-bottom: 0.7rem;
    }

    .tag {
      font-size: 0.68rem;
      font-weight: 700;
      letter-spacing: 0.05em;
      padding: 0.18rem 0.65rem;
      border-radius: 20px;
      text-transform: uppercase;
    }

    .tag-chem { background: rgba(0,212,255,0.15); color: var(--accent); }
    .tag-phys { background: rgba(124,58,237,0.15); color: #a78bfa; }
    .tag-bio  { background: rgba(16,185,129,0.15); color: #34d399; }
    .tag-math { background: rgba(245,158,11,0.15); color: var(--accent3); }
    .tag-new  { background: rgba(239,68,68,0.15); color: #f87171; }

    .post-date {
      font-size: 0.72rem;
      color: var(--muted);
      font-family: var(--mono);
    }

    .featured-body h2 {
      font-size: 1.4rem;
      font-weight: 700;
      letter-spacing: -0.03em;
      line-height: 1.25;
      margin-bottom: 0.5rem;
      color: var(--text);
    }

    .featured-body p {
      color: var(--muted);
      font-size: 0.88rem;
      line-height: 1.6;
      margin-bottom: 1.1rem;
    }

    .read-more {
      font-size: 0.8rem;
      font-weight: 700;
      color: var(--accent);
      letter-spacing: 0.05em;
      text-transform: uppercase;
      display: inline-flex;
      align-items: center;
      gap: 0.3rem;
    }

    .read-more::after { content: '→'; transition: transform 0.2s; }
    .featured-card:hover .read-more::after { transform: translateX(4px); }

    /* ── CATEGORY BAR ── */
    .category-bar {
      display: flex;
      gap: 0.45rem;
      flex-wrap: wrap;
      margin-bottom: 1.3rem;
    }

    .cat-btn {
      background: var(--bg2);
      border: 1px solid var(--border);
      color: var(--muted);
      padding: 0.38rem 0.9rem;
      border-radius: 30px;
      font-size: 0.78rem;
      font-weight: 600;
      cursor: pointer;
      transition: all 0.2s;
      font-family: var(--font);
      -webkit-tap-highlight-color: transparent;
    }

    .cat-btn.active,
    .cat-btn:hover {
      background: rgba(0,212,255,0.12);
      border-color: var(--accent);
      color: var(--accent);
    }

    /* ── POSTS GRID ── */
    .posts-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
      gap: 1.1rem;
    }

    @media (max-width: 400px) {
      .posts-grid { grid-template-columns: 1fr; }
    }

    .post-card {
      background: var(--bg2);
      border: 1px solid var(--border);
      border-radius: 1.1rem;
      overflow: hidden;
      text-decoration: none;
      color: inherit;
      transition: all 0.3s ease;
      display: flex;
      flex-direction: column;
    }

    .post-card:hover {
      border-color: var(--accent);
      box-shadow: 0 4px 28px rgba(0,212,255,0.08);
      transform: translateY(-3px);
    }

    .post-card-img {
      background: linear-gradient(135deg, #0d1b30 0%, #1a2a4a 100%);
      height: 130px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 2.8rem;
      position: relative;
      overflow: hidden;
    }

    .post-card-img img {
      width: 100%; height: 100%;
      object-fit: cover;
      position: absolute; inset: 0;
    }

    .post-card-body {
      padding: 1.1rem;
      flex: 1;
      display: flex;
      flex-direction: column;
    }

    .post-card-body h3 {
      font-size: 0.95rem;
      font-weight: 700;
      line-height: 1.3;
      letter-spacing: -0.02em;
      margin-bottom: 0.35rem;
      color: var(--text);
    }

    .post-card-body p {
      font-size: 0.8rem;
      color: var(--muted);
      line-height: 1.55;
      flex: 1;
    }

    .post-card-footer {
      padding: 0.7rem 1.1rem;
      border-top: 1px solid var(--border);
      display: flex;
      justify-content: space-between;
      align-items: center;
      font-size: 0.72rem;
      color: var(--muted);
      font-family: var(--mono);
    }

    /* ── SIDEBAR ── */
    .sidebar {
      position: sticky;
      top: 76px;
      align-self: start;
      display: flex;
      flex-direction: column;
      gap: 1.3rem;
    }

    @media (max-width: 860px) {
      .sidebar {
        position: static;
      }
    }

    .sidebar-widget {
      background: var(--bg2);
      border: 1px solid var(--border);
      border-radius: 1.1rem;
      padding: 1.2rem;
    }

    .widget-title {
      font-size: 0.68rem;
      font-weight: 700;
      letter-spacing: 0.12em;
      text-transform: uppercase;
      color: var(--accent);
      margin-bottom: 0.9rem;
      padding-bottom: 0.55rem;
      border-bottom: 1px solid var(--border);
    }

    /* ── SEARCH BAR ── */
    .search-bar {
      display: flex;
      gap: 0.45rem;
    }

    .search-bar input {
      flex: 1;
      background: var(--bg3);
      border: 1px solid var(--border);
      color: var(--text);
      padding: 0.6rem 0.85rem;
      border-radius: 9px;
      font-family: var(--font);
      font-size: 0.85rem;
      transition: border-color 0.2s;
      min-width: 0;
    }

    .search-bar input:focus {
      outline: none;
      border-color: var(--accent);
    }

    .search-bar button {
      background: var(--accent);
      color: #0b1120;
      border: none;
      padding: 0.6rem 1rem;
      border-radius: 9px;
      font-weight: 700;
      font-family: var(--font);
      font-size: 0.82rem;
      cursor: pointer;
      transition: all 0.2s;
      flex-shrink: 0;
    }

    /* ── AD STRIP — before footer ── */
    .ad-strip {
      position: relative;
      z-index: 1;
      max-width: 1200px;
      margin: 2rem auto 0;
      padding: 0 1.25rem;
    }

    .ad-strip-label {
      font-size: 0.62rem;
      letter-spacing: 0.14em;
      text-transform: uppercase;
      color: var(--muted);
      text-align: center;
      margin-bottom: 0.7rem;
    }

    .ad-strip-inner {
      display: flex;
      gap: 0.9rem;
      justify-content: center;
      flex-wrap: wrap;
    }

    .ad-card {
      background: var(--bg2);
      border: 1px solid var(--border);
      border-radius: 1rem;
      padding: 0.85rem 1.1rem;
      display: flex;
      align-items: center;
      gap: 0.75rem;
      text-decoration: none;
      color: inherit;
      transition: all 0.22s;
      flex: 1;
      min-width: 180px;
      max-width: 280px;
    }

    .ad-card:hover {
      border-color: var(--accent3);
      background: rgba(245,158,11,0.05);
      transform: translateY(-2px);
    }

    .ad-card-icon {
      width: 38px;
      height: 38px;
      border-radius: 9px;
      background: linear-gradient(135deg, var(--accent3), #ef4444);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 1.05rem;
      flex-shrink: 0;
    }

    .ad-card-text strong {
      display: block;
      font-size: 0.8rem;
      font-weight: 700;
      color: var(--text);
      line-height: 1.2;
    }

    .ad-card-text span {
      font-size: 0.7rem;
      color: var(--muted);
    }

    /* shrink to 2 per row on small phones */
    @media (max-width: 480px) {
      .ad-card {
        min-width: calc(50% - 0.45rem);
        max-width: none;
        flex: 1 1 calc(50% - 0.45rem);
      }
    }

    /* ── FOOTER ── */
    footer {
      background: var(--bg2);
      border-top: 1px solid var(--border);
      padding: 2rem 1.25rem;
      text-align: center;
      position: relative;
      z-index: 1;
      margin-top: 2rem;
    }

    .footer-links {
      display: flex;
      gap: 1.2rem;
      justify-content: center;
      flex-wrap: wrap;
      margin-bottom: 0.8rem;
    }

    .footer-links a {
      color: var(--muted);
      font-size: 0.8rem;
      text-decoration: none;
    }

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

    footer p {
      color: var(--muted);
      font-size: 0.8rem;
      margin-bottom: 0.25rem;
    }

    /* ── SCROLL ANIMATIONS ── */
    .fade-up {
      opacity: 0;
      transform: translateY(18px);
      transition: opacity 0.48s ease, transform 0.48s ease;
    }

    .fade-up.visible {
      opacity: 1;
      transform: translateY(0);
    }
  