/* ============================================================
   MARK ON DIGITAL — Complete Website Stylesheet
   Rubik headings · Lato body (15px min) · Dark/Light toggle
   ============================================================ */

/* ---- Reset ---- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

/* ---- Variables ---- */
:root {
  /* Dark palette */
  --d-bg: #0a0a14;
  --d-surface: #0f0f1e;
  --d-elevated: #161630;
  --d-glass: rgba(255,255,255,0.04);
  --d-glass-strong: rgba(255,255,255,0.07);
  --d-glass-border: rgba(255,255,255,0.08);
  --d-glass-border-h: rgba(255,255,255,0.14);
  --d-text1: #eaeaf4;
  --d-text2: #a0a0c0;
  --d-text3: #6a6a8a;
  --d-border: rgba(255,255,255,0.06);

  /* Light palette */
  --l-bg: #f4f5f8;
  --l-surface: #ffffff;
  --l-elevated: #edeef2;
  --l-glass: rgba(255,255,255,0.7);
  --l-glass-border: rgba(0,0,0,0.06);
  --l-text1: #1a1a2e;
  --l-text2: #4a4a6a;
  --l-text3: #8a8aa0;
  --l-border: rgba(0,0,0,0.06);

  /* Accents */
  --accent: #00d4aa;
  --accent-alt: #7c3aed;
  --accent-dark: #009e7e;
  --grad: linear-gradient(135deg, #00d4aa 0%, #7c3aed 100%);

  /* Radii */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 20px;
  --r-xl: 28px;

  /* Shadows */
  --sh-sm: 0 1px 3px rgba(0,0,0,0.06);
  --sh-md: 0 4px 16px rgba(0,0,0,0.08);
  --sh-lg: 0 8px 32px rgba(0,0,0,0.12);
  --sh-glow: 0 4px 24px rgba(0,212,170,0.15);

  /* Layout */
  --nav-h: 72px;
  --wrap: 1400px;
  --content: 780px;

  /* Active theme — defaults to dark */
  --bg: var(--d-bg);
  --surface: var(--d-surface);
  --elevated: var(--d-elevated);
  --glass: var(--d-glass);
  --glass-s: var(--d-glass-strong);
  --glass-b: var(--d-glass-border);
  --glass-bh: var(--d-glass-border-h);
  --t1: var(--d-text1);
  --t2: var(--d-text2);
  --t3: var(--d-text3);
  --brd: var(--d-border);
  --nav-scrolled-bg: rgba(10,10,20,0.85);
  --nav-scrolled-border: var(--d-glass-border);
  --sh-card: 0 4px 16px rgba(0,0,0,0.3);
  --sh-card-hover: 0 8px 32px rgba(0,0,0,0.4);
  --card-bg: var(--d-glass);
  --card-border: var(--d-glass-border);
  --card-tag-bg: rgba(10,10,20,0.7);
  --card-tag-border: rgba(255,255,255,0.1);
  --card-tag-color: var(--accent);
  --mobile-bg: rgba(15,15,30,0.97);
  --mobile-shadow: -8px 0 40px rgba(0,0,0,0.5);
  --dropdown-bg: rgba(15,15,30,0.95);
}

/* Light theme */
[data-theme="light"] {
  --bg: var(--l-bg);
  --surface: var(--l-surface);
  --elevated: var(--l-elevated);
  --glass: var(--l-glass);
  --glass-s: rgba(255,255,255,0.85);
  --glass-b: var(--l-glass-border);
  --glass-bh: rgba(0,0,0,0.1);
  --t1: var(--l-text1);
  --t2: var(--l-text2);
  --t3: var(--l-text3);
  --brd: var(--l-border);
  --nav-scrolled-bg: rgba(244,245,248,0.92);
  --nav-scrolled-border: var(--l-border);
  --sh-card: var(--sh-sm);
  --sh-card-hover: var(--sh-lg);
  --card-bg: var(--l-surface);
  --card-border: var(--l-border);
  --card-tag-bg: rgba(255,255,255,0.9);
  --card-tag-border: transparent;
  --card-tag-color: var(--accent-alt);
  --mobile-bg: rgba(255,255,255,0.97);
  --mobile-shadow: -8px 0 40px rgba(0,0,0,0.12);
  --dropdown-bg: rgba(255,255,255,0.97);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Lato', sans-serif;
  font-size: 15px;
  line-height: 1.7;
  background: var(--bg);
  color: var(--t1);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background 0.4s ease, color 0.4s ease;
}


/* ============================================================
   ACCESSIBILITY
   ============================================================ */
.skip-link {
  position: absolute; top: -100px; left: 16px;
  background: var(--accent); color: #fff;
  padding: 12px 24px; border-radius: var(--r-sm);
  font-family: 'Rubik', sans-serif; font-size: 15px; font-weight: 600;
  z-index: 9999; text-decoration: none;
}
.skip-link:focus { top: 16px; }

a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}
input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline-offset: 0;
}


/* ============================================================
   AMBIENT BACKGROUND (dark mode hero decoration)
   ============================================================ */
.ambient-bg {
  position: fixed; inset: 0; z-index: -1; overflow: hidden;
  pointer-events: none;
  transition: opacity 0.5s ease;
}
[data-theme="light"] .ambient-bg { opacity: 0.35; }

.ambient-bg .orb {
  position: absolute; border-radius: 50%;
  filter: blur(140px);
  animation: orbFloat 25s ease-in-out infinite;
}
.ambient-bg .orb:nth-child(1) { width: 700px; height: 700px; background: rgba(0,212,170,0.12); top: -300px; right: -150px; }
.ambient-bg .orb:nth-child(2) { width: 600px; height: 600px; background: rgba(124,58,237,0.10); bottom: -200px; left: -150px; animation-delay: -8s; }
.ambient-bg .orb:nth-child(3) { width: 500px; height: 500px; background: rgba(0,212,170,0.06); top: 40%; left: 40%; animation-delay: -16s; }

@keyframes orbFloat {
  0%, 100% { transform: translate(0,0) scale(1); }
  33% { transform: translate(40px,-50px) scale(1.08); }
  66% { transform: translate(-30px,40px) scale(0.94); }
}


/* ============================================================
   WRAPPER
   ============================================================ */
.wrapper { max-width: var(--wrap); margin: 0 auto; padding: 0 32px; width: 100%; }

@media (max-width: 768px) { .wrapper { padding: 0 20px; } }


/* ============================================================
   NAVIGATION
   Transparent at top → solid/glass on scroll
   ============================================================ */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--nav-h); z-index: 1000;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}
.nav.scrolled {
  background: var(--nav-scrolled-bg);
  backdrop-filter: blur(24px) saturate(1.8);
  -webkit-backdrop-filter: blur(24px) saturate(1.8);
  border-bottom-color: var(--nav-scrolled-border);
  box-shadow: var(--sh-sm);
}

.nav-inner {
  max-width: var(--wrap); margin: 0 auto;
  padding: 0 32px; height: 100%;
  display: flex; align-items: center; justify-content: space-between;
}

/* Logo */
.nav-logo {
  display: flex; align-items: center; gap: 12px;
  text-decoration: none; color: var(--t1);
  flex-shrink: 0;
}
.nav-logo .logo-mark {
  width: 40px; height: 40px; background: var(--grad); border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 800; font-size: 18px; font-family: 'Rubik', sans-serif;
}
.nav-logo .logo-text {
  font-family: 'Rubik', sans-serif; font-weight: 700; font-size: 18px;
  letter-spacing: -0.3px; color: var(--t1);
}
.nav-logo .on { font-weight: 300; font-style: italic; color: var(--t3); }
.nav-logo .digital {
  background: var(--grad); -webkit-background-clip: text;
  -webkit-text-fill-color: transparent; background-clip: text; font-weight: 800;
}

/* Desktop links */
.nav-links { display: flex; align-items: center; gap: 2px; list-style: none; }
.nav-links a {
  text-decoration: none; color: var(--t2);
  font-family: 'Lato', sans-serif; font-size: 15px; font-weight: 400;
  padding: 8px 14px; border-radius: var(--r-sm); transition: all 0.2s ease;
}
.nav-links a:hover { color: var(--t1); background: rgba(0,212,170,0.08); }

/* Desktop dropdowns */
.nav-links .dropdown { position: relative; }
.nav-links .dropdown-menu {
  position: absolute; top: calc(100% + 8px); left: 50%;
  transform: translateX(-50%) translateY(8px);
  background: var(--dropdown-bg);
  backdrop-filter: blur(24px) saturate(1.8);
  border: 1px solid var(--glass-b); border-radius: var(--r-md);
  padding: 8px; min-width: 230px;
  opacity: 0; visibility: hidden; list-style: none;
  transition: all 0.25s cubic-bezier(0.4,0,0.2,1);
  box-shadow: var(--sh-card-hover);
}
.nav-links .dropdown:hover .dropdown-menu {
  opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0);
}
.dropdown-menu a { display: block; padding: 10px 16px; font-size: 15px; border-radius: var(--r-sm); }

/* Search button */
.nav-search {
  width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid var(--glass-b); background: transparent;
  color: var(--t3); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s ease;
}
.nav-search:hover { background: rgba(0,212,170,0.1); border-color: var(--accent); color: var(--accent); }

/* Nav right cluster */
.nav-right { display: flex; align-items: center; gap: 12px; }


/* ============================================================
   HAMBURGER BUTTON
   ============================================================ */
.nav-hamburger {
  display: none; width: 44px; height: 44px;
  border: none; background: none; cursor: pointer;
  flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  position: relative; z-index: 1100; border-radius: var(--r-sm);
}
.nav-hamburger span {
  display: block; width: 24px; height: 2px; border-radius: 2px;
  background: var(--t1);
  transition: all 0.35s cubic-bezier(0.4,0,0.2,1); transform-origin: center;
}
.nav-hamburger.active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-hamburger.active span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-hamburger.active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }


/* ============================================================
   MOBILE FLYOUT MENU — MD3 card panel from right
   ============================================================ */
.mobile-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.4);
  z-index: 1050; opacity: 0; visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}
.mobile-overlay.open { opacity: 1; visibility: visible; }

.mobile-menu {
  position: fixed; top: 12px; right: 12px; bottom: 12px;
  width: min(360px, calc(100vw - 24px));
  z-index: 1060; border-radius: var(--r-xl);
  background: var(--mobile-bg);
  backdrop-filter: blur(32px) saturate(1.8);
  -webkit-backdrop-filter: blur(32px) saturate(1.8);
  border: 1px solid var(--glass-b);
  box-shadow: var(--mobile-shadow);
  padding: 24px 0; overflow-y: auto;
  display: flex; flex-direction: column;
  transform: translateX(calc(100% + 24px));
  transition: transform 0.4s cubic-bezier(0.4,0,0.2,1);
}
.mobile-menu.open { transform: translateX(0); }

.mobile-menu-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px 20px; border-bottom: 1px solid var(--brd); margin-bottom: 8px;
}
.mobile-menu-head .logo-mark {
  width: 36px; height: 36px; background: var(--grad); border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 800; font-size: 15px; font-family: 'Rubik', sans-serif;
}
.mobile-close {
  width: 36px; height: 36px; border: none; border-radius: 50%;
  background: var(--glass); color: var(--t2); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: color 0.2s;
}
.mobile-close:hover { color: var(--accent); }

/* Nav items */
.m-nav { list-style: none; padding: 8px 12px; flex: 1; }
.m-nav-item > a {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; border-radius: var(--r-md); text-decoration: none;
  font-family: 'Rubik', sans-serif; font-size: 16px; font-weight: 500;
  color: var(--t1); transition: background 0.2s;
}
.m-nav-item > a:hover { background: rgba(0,212,170,0.06); }
.m-nav-item > a .mi { font-size: 20px; color: var(--t3); transition: transform 0.3s ease, color 0.3s ease; }
.m-nav-item.expanded > a .mi { transform: rotate(180deg); color: var(--accent); }

/* Sub-menu */
.m-sub {
  list-style: none; max-height: 0; overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.4,0,0.2,1); padding-left: 16px;
}
.m-nav-item.expanded .m-sub { max-height: 400px; }
.m-sub a {
  display: block; padding: 10px 16px; border-radius: var(--r-sm);
  text-decoration: none; font-size: 15px; color: var(--t2); transition: all 0.2s;
}
.m-sub a:hover { color: var(--accent); background: rgba(0,212,170,0.05); }

/* Footer in mobile menu */
.mobile-menu-foot {
  padding: 16px 24px 0; border-top: 1px solid var(--brd); margin-top: auto;
}
.mobile-menu-foot .btn { width: 100%; justify-content: center; }

body.menu-open { overflow: hidden; }


/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 30px; border-radius: var(--r-xl);
  font-family: 'Lato', sans-serif; font-size: 15px; font-weight: 700;
  text-decoration: none; cursor: pointer; border: none;
  transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
}
.btn-primary {
  background: var(--grad); color: #fff; box-shadow: var(--sh-glow);
}
.btn-primary:hover { box-shadow: 0 6px 32px rgba(0,212,170,0.3); transform: translateY(-2px); }
.btn-outline {
  background: var(--glass); backdrop-filter: blur(12px);
  border: 1px solid var(--glass-b); color: var(--t1);
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }


/* ============================================================
   CHIPS / FILTER BAR
   ============================================================ */
.filter-bar {
  display: flex; flex-wrap: wrap; gap: 10px; justify-content: center;
  margin-bottom: 48px;
}
.chip {
  padding: 10px 22px; border-radius: 100px;
  font-family: 'Lato', sans-serif; font-size: 15px; font-weight: 400;
  cursor: pointer; border: 1px solid var(--glass-b);
  background: var(--glass); color: var(--t2);
  transition: all 0.25s ease; user-select: none;
}
.chip:hover { border-color: rgba(0,212,170,0.3); color: var(--accent); background: rgba(0,212,170,0.06); }
.chip.active {
  background: var(--grad); color: #fff; border-color: transparent;
  box-shadow: var(--sh-glow); font-weight: 700;
}


/* ============================================================
   BREADCRUMB
   ============================================================ */
.breadcrumb { font-size: 15px; color: var(--t3); margin-bottom: 16px; }
.breadcrumb a { color: var(--accent); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb .sep { margin: 0 6px; }


/* ============================================================
   BLOG CARD — works on both dark & light
   ============================================================ */
.card {
  background: var(--card-bg); border: 1px solid var(--card-border);
  border-radius: var(--r-lg); overflow: hidden;
  box-shadow: var(--sh-card);
  transition: all 0.4s cubic-bezier(0.4,0,0.2,1);
  cursor: pointer; text-decoration: none; color: inherit;
  display: flex; flex-direction: column;
}
.card:hover {
  transform: translateY(-4px); box-shadow: var(--sh-card-hover);
  border-color: var(--glass-bh);
}

.card-img {
  width: 100%; height: 210px; position: relative; overflow: hidden;
}
.card:hover .card-img .ph { transform: scale(1.05); }

.card-img .tags {
  position: absolute; top: 14px; left: 14px;
  display: flex; gap: 6px; flex-wrap: wrap; z-index: 2;
}
.tag {
  padding: 5px 14px; background: var(--card-tag-bg);
  backdrop-filter: blur(12px);
  border: 1px solid var(--card-tag-border);
  border-radius: 100px; font-family: 'Rubik', sans-serif;
  font-size: 11px; font-weight: 600; color: var(--card-tag-color);
  text-transform: uppercase; letter-spacing: 0.8px;
}

.card-content {
  padding: 22px 24px 26px; flex: 1;
  display: flex; flex-direction: column;
}
.card-content h3 {
  font-family: 'Rubik', sans-serif; font-size: 18px; font-weight: 600;
  line-height: 1.35; letter-spacing: -0.2px; margin-bottom: 10px;
  color: var(--t1); flex: 1;
}
.card-content .excerpt {
  font-size: 15px; color: var(--t2); line-height: 1.7; margin-bottom: 16px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* Card meta */
.card-meta {
  display: flex; align-items: center; gap: 10px; font-size: 15px; color: var(--t3);
}
.card-meta .avatar {
  width: 30px; height: 30px; border-radius: 50%; background: var(--grad);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-family: 'Rubik', sans-serif; font-size: 11px; font-weight: 700;
}
.card-meta .author { font-weight: 700; color: var(--t2); }
.card-meta .dot { opacity: 0.4; }

/* Featured card */
.card.featured { grid-column: 1 / -1; flex-direction: row; max-height: 340px; }
.card.featured .card-img { width: 45%; min-width: 45%; height: 100%; min-height: 340px; }
.card.featured .card-content { padding: 36px; justify-content: center; }
.card.featured .card-content h3 { font-size: 26px; font-weight: 700; flex: unset; margin-bottom: 14px; }
.card.featured .excerpt { -webkit-line-clamp: unset; margin-bottom: 22px; }

.featured-badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 14px;
  background: rgba(0,212,170,0.1); border: 1px solid rgba(0,212,170,0.2);
  border-radius: 100px; font-family: 'Rubik', sans-serif; font-size: 11px;
  font-weight: 700; color: var(--accent); text-transform: uppercase;
  letter-spacing: 1px; margin-bottom: 16px; width: fit-content;
}


/* ============================================================
   HERO (homepage)
   ============================================================ */
.hero {
  padding: calc(var(--nav-h) + 72px) 0 48px; text-align: center;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 20px 8px 12px; background: var(--glass-s);
  backdrop-filter: blur(16px); border: 1px solid var(--glass-b);
  border-radius: 100px; font-size: 15px; color: var(--t2); margin-bottom: 32px;
}
.hero-badge .pulse {
  width: 9px; height: 9px; background: var(--accent); border-radius: 50%;
  animation: pulse 2s infinite; box-shadow: 0 0 8px rgba(0,212,170,0.4);
}
@keyframes pulse {
  0%,100% { opacity:1; transform:scale(1); }
  50% { opacity:0.5; transform:scale(0.8); }
}
.hero h1 {
  font-family: 'Rubik', sans-serif; font-size: clamp(38px,5vw,68px);
  font-weight: 800; line-height: 1.08; letter-spacing: -2px;
  color: var(--t1); margin-bottom: 24px;
}
.hero h1 .thin { font-weight: 300; }
.hero h1 em {
  font-style: italic; font-weight: 500;
  background: var(--grad); -webkit-background-clip: text;
  -webkit-text-fill-color: transparent; background-clip: text;
}
.hero .sub {
  font-size: 18px; color: var(--t2); max-width: 580px;
  margin: 0 auto 40px; line-height: 1.8;
}
.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }


/* ============================================================
   ARTICLE GRID
   ============================================================ */
.grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 24px;
}


/* ============================================================
   SECTION SPACING
   ============================================================ */
.section { padding: 0 0 80px; }
.section-top { padding-top: 40px; }


/* ============================================================
   ARCHIVE HEADER
   ============================================================ */
.archive-head {
  padding: calc(var(--nav-h) + 48px) 0 40px;
}
.archive-head h1 {
  font-family: 'Rubik', sans-serif; font-size: clamp(32px,4vw,52px);
  font-weight: 800; letter-spacing: -1.5px; line-height: 1.1;
  color: var(--t1); margin-bottom: 12px;
}
.archive-head h1 .thin { font-weight: 300; }
.archive-head .desc { font-size: 17px; color: var(--t2); max-width: 600px; line-height: 1.8; }
.archive-head .count {
  margin-top: 16px; font-family: 'Rubik', sans-serif;
  font-size: 13px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 1px; color: var(--accent);
}


/* ============================================================
   BLOG POST
   ============================================================ */
.post-head { padding: calc(var(--nav-h) + 48px) 0 0; max-width: var(--content); margin: 0 auto; }

.post-cats { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.post-cats a {
  padding: 5px 16px; background: rgba(0,212,170,0.08);
  border: 1px solid rgba(0,212,170,0.15); border-radius: 100px;
  font-family: 'Rubik', sans-serif; font-size: 12px; font-weight: 600;
  color: var(--accent-dark); text-transform: uppercase; letter-spacing: 0.8px;
  text-decoration: none; transition: background 0.2s;
}
[data-theme="light"] .post-cats a { color: var(--accent-dark); }
.post-cats a:hover { background: rgba(0,212,170,0.15); }

.post-head h1 {
  font-family: 'Rubik', sans-serif; font-size: clamp(30px,4vw,46px);
  font-weight: 800; letter-spacing: -1.5px; line-height: 1.12;
  color: var(--t1); margin-bottom: 20px;
}

.post-meta-bar {
  display: flex; align-items: center; gap: 16px;
  padding-bottom: 32px; border-bottom: 1px solid var(--brd);
}
.post-meta-bar .av {
  width: 44px; height: 44px; border-radius: 50%; background: var(--grad);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-family: 'Rubik', sans-serif; font-size: 15px; font-weight: 700;
}
.post-meta-bar .info { display: flex; flex-direction: column; }
.post-meta-bar .name { font-weight: 700; font-size: 15px; color: var(--t1); }
.post-meta-bar .date { font-size: 15px; color: var(--t3); }

/* Featured image */
.post-img { max-width: var(--content); margin: 32px auto 0; padding: 0 32px; }
.post-img .img-wrap {
  width: 100%; height: 400px; border-radius: var(--r-lg);
  overflow: hidden; box-shadow: var(--sh-md);
}

/* Body */
.post-body { max-width: var(--content); margin: 0 auto; padding: 40px 32px 60px; }

.post-body h2 {
  font-family: 'Rubik', sans-serif; font-size: 28px; font-weight: 700;
  letter-spacing: -0.5px; margin: 48px 0 16px; color: var(--t1); line-height: 1.2;
}
.post-body h3 {
  font-family: 'Rubik', sans-serif; font-size: 22px; font-weight: 600;
  letter-spacing: -0.3px; margin: 36px 0 12px; color: var(--t1); line-height: 1.25;
}
.post-body p {
  font-size: 17px; line-height: 1.85; color: var(--t2); margin-bottom: 24px;
}
.post-body blockquote {
  margin: 32px 0; padding: 24px 28px;
  border-left: 4px solid var(--accent); background: rgba(0,212,170,0.04);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  font-size: 17px; font-style: italic; color: var(--t1); line-height: 1.8;
}
.post-body ul, .post-body ol {
  margin: 0 0 24px 24px; font-size: 17px; color: var(--t2); line-height: 1.85;
}
.post-body li { margin-bottom: 8px; }
.post-body a { color: var(--accent-dark); text-decoration: underline; text-underline-offset: 3px; }
.post-body a:hover { color: var(--accent); }
.post-body img { width: 100%; border-radius: var(--r-md); margin: 32px 0; }

/* Code blocks */
.post-body pre {
  background: var(--elevated); border: 1px solid var(--glass-b);
  border-radius: var(--r-md); padding: 24px; margin: 24px 0;
  overflow-x: auto; font-family: 'JetBrains Mono', monospace; font-size: 14px;
  line-height: 1.6; color: var(--t2);
}
.post-body code {
  font-family: 'JetBrains Mono', monospace; font-size: 14px;
  background: var(--glass-s); padding: 2px 8px; border-radius: 4px; color: var(--accent);
}
.post-body pre code { background: none; padding: 0; color: inherit; }

/* Author box */
.author-box {
  display: flex; gap: 24px; align-items: flex-start; padding: 32px;
  background: var(--surface); border: 1px solid var(--brd);
  border-radius: var(--r-lg); margin-top: 48px;
}
.author-box .av-xl {
  width: 64px; height: 64px; min-width: 64px; border-radius: 50%;
  background: var(--grad); display: flex; align-items: center; justify-content: center;
  color: #fff; font-family: 'Rubik', sans-serif; font-size: 22px; font-weight: 700;
}
.author-box h4 { font-family: 'Rubik', sans-serif; font-size: 18px; font-weight: 600; color: var(--t1); margin-bottom: 6px; }
.author-box p { font-size: 15px; color: var(--t2); line-height: 1.7; }

/* Share bar */
.share-bar {
  display: flex; align-items: center; gap: 12px; padding: 24px 0; margin-top: 32px;
  border-top: 1px solid var(--brd);
}
.share-bar .label {
  font-family: 'Rubik', sans-serif; font-size: 13px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 1px; color: var(--t3);
}
.share-bar a {
  width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--brd);
  display: flex; align-items: center; justify-content: center;
  color: var(--t3); text-decoration: none; transition: all 0.2s; font-size: 15px;
}
.share-bar a:hover { border-color: var(--accent); color: var(--accent); background: rgba(0,212,170,0.06); }


/* ============================================================
   NEWSLETTER
   ============================================================ */
.nl-card {
  background: var(--glass-s); backdrop-filter: blur(24px);
  border: 1px solid var(--glass-b); border-radius: var(--r-xl);
  padding: 56px 64px; display: flex; align-items: center; gap: 56px;
  position: relative; overflow: hidden;
}
.nl-card::before { content:''; position:absolute; top:-60%; right:-10%; width:500px; height:500px; background:radial-gradient(circle, rgba(0,212,170,0.08) 0%, transparent 70%); pointer-events:none; }
.nl-card::after { content:''; position:absolute; bottom:-40%; left:-5%; width:400px; height:400px; background:radial-gradient(circle, rgba(124,58,237,0.06) 0%, transparent 70%); pointer-events:none; }
.nl-content { flex: 1; position: relative; z-index: 1; }
.nl-label {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: 'Rubik', sans-serif; font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1.5px; color: var(--accent); margin-bottom: 16px;
}
.nl-content h2 {
  font-family: 'Rubik', sans-serif; font-size: clamp(26px,3vw,36px);
  font-weight: 800; letter-spacing: -1px; line-height: 1.15; margin-bottom: 12px; color: var(--t1);
}
.nl-content h2 .thin { font-weight: 300; }
.nl-content p { font-size: 16px; color: var(--t2); line-height: 1.8; max-width: 460px; }
.nl-form { flex: 0 0 auto; width: 380px; position: relative; z-index: 1; }
.nl-form .fg { display: flex; flex-direction: column; gap: 12px; }
.nl-form input {
  width: 100%; padding: 16px 20px; background: rgba(255,255,255,0.05);
  border: 1px solid var(--glass-b); border-radius: var(--r-md);
  color: var(--t1); font-family: 'Lato', sans-serif; font-size: 15px;
  outline: none; transition: all 0.25s;
}
[data-theme="light"] .nl-form input { background: var(--l-bg); }
.nl-form input::placeholder { color: var(--t3); }
.nl-form input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(0,212,170,0.08); }
.nl-form .btn-sub {
  width: 100%; padding: 16px 28px; background: var(--grad); color: #fff;
  border: none; border-radius: var(--r-md); font-family: 'Rubik', sans-serif;
  font-size: 15px; font-weight: 600; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  box-shadow: var(--sh-glow); transition: all 0.3s ease;
}
.nl-form .btn-sub:hover { transform: translateY(-2px); box-shadow: 0 6px 32px rgba(0,212,170,0.3); }
.nl-form .note { font-size: 13px; color: var(--t3); text-align: center; margin-top: 4px; }


/* ============================================================
   VALUE PROPS
   ============================================================ */
.val-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.val-card {
  background: var(--glass); backdrop-filter: blur(20px);
  border: 1px solid var(--glass-b); border-radius: var(--r-lg);
  padding: 36px; transition: all 0.3s ease;
}
.val-card:hover { transform: translateY(-3px); box-shadow: var(--sh-card); border-color: var(--glass-bh); }
.val-card .icon {
  width: 52px; height: 52px; background: var(--grad); border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
  color: #fff; margin-bottom: 22px;
}
.val-card h4 { font-family: 'Rubik', sans-serif; font-size: 19px; font-weight: 600; margin-bottom: 12px; color: var(--t1); }
.val-card p { font-size: 15px; color: var(--t2); line-height: 1.8; }


/* ============================================================
   CTA BLOCK
   ============================================================ */
.cta-block {
  background: var(--elevated); border: 1px solid var(--glass-b);
  border-radius: var(--r-xl); padding: 72px 64px; text-align: center;
  position: relative; overflow: hidden;
}
.cta-block::before { content:''; position:absolute; top:-50%; right:-15%; width:600px; height:600px; background:radial-gradient(circle, rgba(0,212,170,0.1) 0%, transparent 70%); pointer-events:none; }
.cta-block::after { content:''; position:absolute; bottom:-30%; left:-10%; width:500px; height:500px; background:radial-gradient(circle, rgba(124,58,237,0.08) 0%, transparent 70%); pointer-events:none; }
.cta-block h2 {
  font-family: 'Rubik', sans-serif; font-size: clamp(30px,3.5vw,44px);
  font-weight: 800; color: var(--t1); letter-spacing: -1.5px;
  margin-bottom: 18px; position: relative; z-index: 1; line-height: 1.1;
}
.cta-block h2 .thin { font-weight: 300; }
.cta-block h2 em {
  font-style: italic; font-weight: 500;
  background: var(--grad); -webkit-background-clip: text;
  -webkit-text-fill-color: transparent; background-clip: text;
}
.cta-block p { color: var(--t2); font-size: 17px; max-width: 560px; margin: 0 auto 36px; line-height: 1.8; position: relative; z-index: 1; }
.cta-block .btn { position: relative; z-index: 1; }


/* ============================================================
   CONTRIBUTOR SECTION
   ============================================================ */
.contrib-card {
  display: flex; align-items: center; gap: 56px;
  background: var(--glass); backdrop-filter: blur(20px);
  border: 1px solid var(--glass-b); border-radius: var(--r-xl); padding: 52px;
}
.contrib-card .cc-body { flex: 1; }
.contrib-card h3 {
  font-family: 'Rubik', sans-serif; font-size: 30px; font-weight: 800;
  letter-spacing: -0.8px; margin-bottom: 14px; color: var(--t1);
}
.contrib-card h3 .thin { font-weight: 300; }
.contrib-card h3 em {
  font-style: italic; font-weight: 500;
  background: var(--grad); -webkit-background-clip: text;
  -webkit-text-fill-color: transparent; background-clip: text;
}
.contrib-card p { color: var(--t2); font-size: 16px; line-height: 1.8; margin-bottom: 28px; }
.contrib-visual {
  width: 300px; min-width: 300px; height: 230px;
  background: var(--grad); border-radius: var(--r-lg);
  display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
}
.contrib-visual .grid-pat {
  position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,0.08) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.08) 1px, transparent 1px);
  background-size: 24px 24px;
}
.contrib-visual .material-icons-outlined { font-size: 72px; color: rgba(255,255,255,0.85); position: relative; z-index: 1; }


/* ============================================================
   FORM (contributor page)
   ============================================================ */
.form-page {
  min-height: 100vh; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: calc(var(--nav-h) + 40px) 24px 60px;
}
.form-box {
  width: 100%; max-width: 640px; background: var(--surface);
  border: 1px solid var(--brd); border-radius: var(--r-xl);
  padding: 48px; box-shadow: var(--sh-md); position: relative; overflow: hidden;
}
.form-box::before { content:''; position:absolute; top:0; left:0; right:0; height:4px; background: var(--grad); }
.form-box .fh { text-align: center; margin-bottom: 36px; }
.form-box .fh .fi {
  width: 56px; height: 56px; background: var(--grad); border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center; color: #fff; margin: 0 auto 20px;
}
.form-box .fh h1 { font-family: 'Rubik', sans-serif; font-size: 28px; font-weight: 800; letter-spacing: -0.8px; color: var(--t1); margin-bottom: 8px; }
.form-box .fh p { font-size: 16px; color: var(--t2); line-height: 1.7; }

.fg { margin-bottom: 20px; }
.fg label { display: block; margin-bottom: 6px; font-family: 'Rubik', sans-serif; font-size: 14px; font-weight: 600; color: var(--t1); }
.fg label .req { color: #e74c3c; margin-left: 2px; }
.fg .hint { display: block; font-size: 13px; color: var(--t3); margin-bottom: 8px; }
.fg input, .fg textarea, .fg select {
  width: 100%; padding: 14px 18px; background: var(--bg);
  border: 1px solid var(--brd); border-radius: var(--r-md);
  color: var(--t1); font-family: 'Lato', sans-serif; font-size: 15px;
  outline: none; transition: all 0.25s;
}
.fg textarea { min-height: 120px; resize: vertical; }
.fg select { cursor: pointer; }
.fg input::placeholder, .fg textarea::placeholder { color: var(--t3); }
.fg input:focus, .fg textarea:focus, .fg select:focus {
  border-color: var(--accent); box-shadow: 0 0 0 3px rgba(0,212,170,0.1);
}
.field-error { border-color: #e74c3c !important; box-shadow: 0 0 0 3px rgba(231,76,60,0.1) !important; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-divider { height: 1px; background: var(--brd); margin: 28px 0; }
.form-section-title { font-family: 'Rubik', sans-serif; font-size: 16px; font-weight: 700; color: var(--t1); margin-bottom: 16px; }

.form-check { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 20px; }
.form-check input[type="checkbox"] { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--accent); cursor: pointer; }
.form-check label { font-size: 15px; color: var(--t2); cursor: pointer; line-height: 1.5; }
.form-check label a { color: var(--accent-dark); text-decoration: underline; }

.form-actions { margin-top: 28px; text-align: center; }
.form-actions .btn-sub-form {
  width: 100%; padding: 16px 32px; background: var(--grad); color: #fff; border: none;
  border-radius: var(--r-md); font-family: 'Rubik', sans-serif; font-size: 16px;
  font-weight: 600; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px;
  box-shadow: var(--sh-glow); transition: all 0.3s ease;
}
.form-actions .btn-sub-form:hover { transform: translateY(-2px); box-shadow: 0 6px 32px rgba(0,212,170,0.3); }
.form-actions .note { font-size: 13px; color: var(--t3); margin-top: 12px; }


/* ============================================================
   FOOTER — always dark
   ============================================================ */
.footer {
  background: var(--d-surface); border-top: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--r-xl) var(--r-xl) 0 0; padding: 64px 32px 32px;
  color: var(--d-text1);
}
.footer-inner { max-width: var(--wrap); margin: 0 auto; }
.footer-top { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 48px; margin-bottom: 48px; }
.footer-brand .footer-logo { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.footer-brand .footer-logo .logo-mark {
  width: 36px; height: 36px; background: var(--grad); border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 800; font-size: 16px; font-family: 'Rubik', sans-serif;
}
.footer-brand .footer-logo .logo-text { font-family: 'Rubik', sans-serif; font-weight: 600; font-size: 16px; color: var(--d-text1); }
.footer-brand p { color: var(--d-text3); font-size: 15px; line-height: 1.8; max-width: 340px; }
.footer-col h5 {
  font-family: 'Rubik', sans-serif; font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1.5px; color: var(--d-text3); margin-bottom: 22px;
}
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 12px; }
.footer-col ul a { color: var(--d-text2); text-decoration: none; font-size: 15px; transition: color 0.2s; }
.footer-col ul a:hover { color: var(--accent); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.06); padding-top: 24px;
  display: flex; justify-content: space-between; align-items: center;
}
.footer-bottom .copy { font-size: 15px; color: var(--d-text3); }
.socials { display: flex; gap: 12px; }
.socials a {
  width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.08);
  display: flex; align-items: center; justify-content: center;
  color: var(--d-text3); text-decoration: none; transition: all 0.2s; font-size: 15px;
}
.socials a:hover { border-color: var(--accent); color: var(--accent); background: rgba(0,212,170,0.08); }


/* ============================================================
   FLOATING BUTTONS — Theme toggle + Back to top
   ============================================================ */
.fab-stack {
  position: fixed; bottom: 24px; right: 24px;
  display: flex; flex-direction: column; gap: 12px;
  z-index: 900;
}
.fab {
  width: 48px; height: 48px; border-radius: 50%;
  border: 1px solid var(--glass-b);
  background: var(--surface); color: var(--t2);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; box-shadow: 0 4px 16px rgba(0,0,0,0.15);
  transition: all 0.3s ease;
}
.fab:hover { color: var(--accent); border-color: var(--accent); transform: scale(1.08); }

/* Back to top — hidden until scrolled */
.fab-top { opacity: 0; pointer-events: none; transform: translateY(16px); }
.fab-top.visible { opacity: 1; pointer-events: auto; transform: translateY(0); }


/* ============================================================
   PLACEHOLDER IMAGES
   ============================================================ */
.ph {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.6s cubic-bezier(0.4,0,0.2,1);
}
.ph.c1 { background: linear-gradient(135deg, rgba(0,212,170,0.15), rgba(124,58,237,0.12)); color: rgba(0,212,170,0.4); }
.ph.c2 { background: linear-gradient(135deg, rgba(124,58,237,0.15), rgba(0,212,170,0.08)); color: rgba(124,58,237,0.3); }
.ph.c3 { background: linear-gradient(135deg, rgba(0,150,200,0.12), rgba(124,58,237,0.12)); color: rgba(0,150,200,0.3); }
.ph.c4 { background: linear-gradient(135deg, rgba(200,100,50,0.1), rgba(124,58,237,0.08)); color: rgba(200,100,50,0.3); }
.ph.c5 { background: linear-gradient(135deg, rgba(0,212,170,0.1), rgba(0,150,200,0.12)); color: rgba(0,212,170,0.3); }
.ph.c6 { background: linear-gradient(135deg, rgba(124,58,237,0.1), rgba(200,100,50,0.08)); color: rgba(124,58,237,0.3); }
/* Lighter versions for light theme */
[data-theme="light"] .ph.c1 { background: linear-gradient(135deg, #e0f7f0, #ede7f6); }
[data-theme="light"] .ph.c2 { background: linear-gradient(135deg, #ede7f6, #e0f7f0); }
[data-theme="light"] .ph.c3 { background: linear-gradient(135deg, #e3f2fd, #ede7f6); }
[data-theme="light"] .ph.c4 { background: linear-gradient(135deg, #fff3e0, #fce4ec); }
[data-theme="light"] .ph.c5 { background: linear-gradient(135deg, #e0f7fa, #e0f7f0); }
[data-theme="light"] .ph.c6 { background: linear-gradient(135deg, #f3e5f5, #e8eaf6); }


/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .card.featured { flex-direction: column; max-height: none; }
  .card.featured .card-img { width: 100%; min-height: 220px; }
  .contrib-card { flex-direction: column; }
  .contrib-visual { width: 100%; min-width: unset; }
  .nl-card { flex-direction: column; gap: 36px; padding: 44px; }
  .nl-form { width: 100%; }
  .val-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .grid { grid-template-columns: 1fr; }
  .val-grid { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; gap: 16px; text-align: center; }
  .cta-block { padding: 44px 28px; }
  .contrib-card { padding: 36px; gap: 32px; }
  .nl-card { padding: 36px 28px; }
  .post-head h1 { font-size: 28px; letter-spacing: -0.8px; }
  .post-body p { font-size: 16px; }
  .post-body h2 { font-size: 24px; }
  .form-box { padding: 32px 24px; }
  .form-row { grid-template-columns: 1fr; }
  .hero h1 { font-size: 34px; letter-spacing: -1px; }
  .author-box { flex-direction: column; text-align: center; align-items: center; }
  .mobile-menu { width: min(320px, calc(100vw - 24px)); }
  .fab-stack { bottom: 16px; right: 16px; }
}


/* ============================================================
   SCROLLBAR
   ============================================================ */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--glass-bh); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--t3); }


/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-up { animation: fadeUp 0.6s cubic-bezier(0.4,0,0.2,1) both; }
.fade-up-d1 { animation-delay: 0.1s; }
.fade-up-d2 { animation-delay: 0.2s; }
.fade-up-d3 { animation-delay: 0.3s; }
.fade-up-d4 { animation-delay: 0.4s; }
