/* =========================================
   ELEVATE DESIGN SYSTEM — FINAL v25 (CLEANED)
   ========================================= */


/* =========================================
   1. BASE VARIABLES
   ========================================= */

:root {
	--bg: #ffffff;
	--text: #0f172a;
	--muted: #6b7280;
	--border: #e5e7eb;

	--primary: #4f46e5;
	--primary-soft: #eef2ff;
	--primary-strong: #4338ca;

	--surface: #ffffff;
	--surface-soft: #fafafa;

	--shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.04);
	--shadow-md: 0 10px 30px rgba(0, 0, 0, 0.08);
	--shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.12);

	--radius-sm: 8px;
	--radius-md: 12px;
	--radius-lg: 16px;

	--fs-base: 17px;
	--fs-xl: 28px;
	--fs-3xl: 56px;

	--measure: 680px;
	--spacing-section: 80px;

  /* =========================
   FLOW COLOR SYSTEM
========================= */

  --accent-rgb: 99, 102, 241; /* adjust based on your theme */
  --accent-strong: var(--accent);
  --flow-1: var(--accent);
 --flow-1: var(--accent);
  --flow-2: color-mix(in srgb, var(--accent), black 15%);
  --flow-3: color-mix(in srgb, var(--accent), black 30%);
  --flow-4: color-mix(in srgb, var(--accent), black 45%);
  --flow-5: color-mix(in srgb, var(--accent), black 60%);
  
}


/* =========================================
   2. THEMES
   ========================================= */

:root[data-theme="indigo"] {
	--primary: #4f46e5;
}

:root[data-theme="emerald"] {
	--primary: #059669;
}

:root[data-theme="slate"] {
	--primary: #334155;
}

:root[data-theme="amber"] {
	--primary: #d97706;
}

:root[data-theme="rose"] {
	--primary: #e11d48;
}

:root[data-theme="cyan"] {
	--primary: #0891b2;
}

:root[data-theme="mono"] {
	--primary: #000000;
}

:root[data-theme="violet"] {
	--primary: #7400b8;
}

:root[data-theme="oasis"] {
	--primary: #682d63;
}

:root[data-theme="berry"] {
	--primary: #963659;
}

:root[data-theme="delight"] {
	--primary: #ff5555;
}

:root[data-theme="summer_sunset"] {
	--primary: #b9375e;
}

:root[data-theme="adventure"] {
	--primary: #00303d;
}

:root[data-theme="feast"] {
	--primary: #283618;
}

:root[data-theme="ocean_breeze"] {
	--primary: #e63946;
}

:root[data-theme="pumpkin_spice"] {
	--primary: #FA7921;
}

:root[data-theme="evergreen"] {
	--primary: #002500;
}

/* DARK THEME */

:root[data-theme="midnight"] {
  /* BASE */
  --bg: #09090b;                /* deeper than before */
  --text: #e6edf3;
  --muted: #94a3b8;
  --border: rgba(255,255,255,0.06);

  /* SURFACES (layered darkness) */
  --surface: #020617;
  --surface-soft: #020617;

  /* ELEVATION SYSTEM (subtle, not heavy shadows) */
  --shadow-sm: 0 2px 10px rgba(0,0,0,0.4);
  --shadow-md: 0 10px 30px rgba(0,0,0,0.5);
  --shadow-lg: 0 20px 60px rgba(0,0,0,0.6);

  /* BRAND LIGHT */
  --primary: #6366f1;

  /* 🔥 CRITICAL: glow-based soft color */
  --primary-soft: rgba(99, 102, 241, 0.12);

  /* highlight tone */
  --primary-strong: #8b5cf6;
}


/* =========================================
   3. GLOBAL
   ========================================= */

body {
	font-family: Inter, system-ui, -apple-system, sans-serif;
	font-size: var(--fs-base);
	line-height: 1.7;
	margin: 0;
	background: var(--bg);
	color: var(--text);
}

body[data-theme="midnight"] {
  background:
    radial-gradient(circle at 20% 20%, rgba(99,102,241,0.12), transparent 40%),
    radial-gradient(circle at 80% 30%, rgba(139,92,246,0.10), transparent 45%),
    radial-gradient(circle at 50% 80%, rgba(59,130,246,0.08), transparent 50%),
    #020617;
}


/* =========================================
   4. LAYOUT SYSTEM
   ========================================= */

.container {
	max-width: 1280px;
	margin: auto;
	padding: 0 40px;
}

.container-narrow {
	max-width: 900px;
	margin: auto;
}

section {
	max-width: 900px;
	margin: var(--spacing-section) auto 0;
}

.section-wide {
	max-width: 1440px;
	margin: var(--spacing-section) auto 0;
	padding: 0 48px;
	/* FIXED */
}

.section-wide h2 {
	font-size: 32px;
	margin-bottom: 16px;
}


/* =========================================
   5. HEADER
   ========================================= */

.header {
	position: sticky;
	top: 0;
	z-index: 1000;

	backdrop-filter: blur(16px);
	background: rgba(255, 255, 255, 0.65);

	border-bottom: 1px solid rgba(0, 0, 0, 0.04);

	transition: all 0.35s ease;
}

.header-inner {
	max-width: 1200px;
	margin: auto;

	display: flex;
	justify-content: space-between;
	align-items: center;

	padding: 18px 32px;
}

.header.scrolled {
	background: rgba(255, 255, 255, 0.85);
	box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
}

/* DARK HEADER */

:root[data-theme="midnight"] .header {
  background: rgba(2,6,23,0.6);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
:root[data-theme="midnight"] .header.scrolled {
	background: rgba(15, 23, 42, 0.85);
}


/* =========================================
   6. BRAND
   ========================================= */

.brand {
	display: flex;
	flex-direction: column;
}

.logo {
	font-size: 30px;
	font-weight: 700;
	letter-spacing: -0.03em;

	background: linear-gradient(90deg,
			var(--primary),
			var(--primary-strong));

	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
}

.tagline {
	font-size: 14px;
	font-weight: bold;
	margin-top: 4px;

	letter-spacing: 0.08em;
	color: var(--primary-strong);
	opacity: 0.9;
}


/* =========================================
   7. NAVIGATION
   ========================================= */

.header-right {
	display: flex;
	align-items: center;
}

.nav {
	display: flex;
	align-items: center;
	gap: 28px;
	z-index: 1002;
	/* above overlay */
}

/* IMPORTANT: DO NOT APPLY FLEX TO nav-item */

.nav-item {
	position: relative;
}

.nav a {
	display: inline-flex;
	align-items: center;

	position: relative;

	font-size: 15px;
	font-weight: 500;

	text-decoration: none;
	color: var(--text);

	line-height: 1;
	padding: 6px 0;

	letter-spacing: -0.01em;

	transition: color 0.2s ease;
}

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

/* underline */

.nav a::after {
	content: "";
	position: absolute;

	left: 0;
	bottom: -2px;

	width: 100%;
	height: 2px;

	background: linear-gradient(90deg,
			var(--primary),
			var(--primary-strong));

	transform: scaleX(0);
	transform-origin: left;

	transition: transform 0.25s ease;
}

.nav a:hover::after,
.nav a.active::after {
	transform: scaleX(1);
}


/* =========================================
   8. DROPDOWN
   ========================================= */

.nav-item::after {
	content: "";
	position: absolute;
	top: 100%;
	width: 100%;
	height: 8px;
}

.dropdown {
	position: absolute;
	top: 100%;
	left: 0;

	margin-top: 6px;
	min-width: 200px;

	border-radius: var(--radius-md);
	border: 1px solid var(--border);

	background: var(--surface);
	box-shadow: var(--shadow-lg);

	padding: 6px;

	opacity: 0;
	transform: translateY(8px);
	pointer-events: none;

	transition: all 0.2s ease;
}

.nav-item:hover .dropdown {
	opacity: 1;
	transform: translateY(0);
	pointer-events: auto;
}

.dropdown a {
	display: block;
	padding: 8px 12px;
	border-radius: 8px;

	text-decoration: none;
	color: var(--text);
	font-size: 14px;
}

.dropdown a:hover {
	background: var(--primary-soft);
	color: var(--primary);
}


/* =========================================
   9. HERO
   ========================================= */

.hero {
  margin: 40px auto 40px;
  max-width: 900px;
  animation: heroFadeLift 0.8s ease-out both;
}

.hero-centered {
  padding: 3rem 1.25rem 2rem;
}

.hero-title {
	font-size: clamp(40px, 6vw, 64px);
	font-weight: 700;
  animation: heroFadeLift 0.7s ease-out both;
	line-height: 1.1;
	letter-spacing: -0.04em;

	background: linear-gradient(90deg,
			var(--primary),
			var(--primary-strong));

	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
}

.hero-sub {
	margin-top: 20px;
  animation: heroFadeLift 0.9s ease-out both;
	font-size: 18px;
	line-height: 1.6;

	color: var(--muted);

	max-width: 640px;
}

.hero-actions {
	margin-top: 28px;
	display: flex;
	gap: 16px;
  animation: heroFadeLift 1.1s ease-out both;
}


/* =========================================
   10. BUTTONS
   ========================================= */

.btn-primary {
	padding: 10px 18px;
	border-radius: 10px;

	background: linear-gradient(90deg,
			var(--primary),
			var(--primary-strong));

	color: white;
	text-decoration: none;

	font-size: 14px;
	font-weight: 500;

	box-shadow: var(--shadow-md);

	transition: all 0.25s ease;
}

.btn-primary:hover {
	transform: translateY(-2px);
	box-shadow: var(--shadow-lg);
}

.btn-secondary {
	padding: 10px 18px;
	border-radius: 10px;

	background: var(--surface);
	border: 1px solid var(--border);

	color: var(--text);
	text-decoration: none;

	font-size: 14px;

	transition: all 0.25s ease;
}

.btn-secondary:hover {
	border-color: var(--primary);
	color: var(--primary);
}

.btn-ghost {
	padding: 10px 16px;
	border-radius: 10px;

	border: 1px solid var(--border);

	text-decoration: none;
	font-size: 14px;

	color: var(--text);
}

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


/* =========================================
   11. TYPOGRAPHY
   ========================================= */

h2 {
	font-size: var(--fs-xl);
	margin-top: 32px;
}

p {
	max-width: var(--measure);
	margin-top: 12px;
}


/* =========================================
   12. CARDS & GRID
   ========================================= */

.card {
	background: var(--surface);
	border-radius: var(--radius-md);
	box-shadow: var(--shadow-md);
	padding: 24px;
	transition: all 0.25s ease;
}

/* =========================================
   MIDNIGHT — SURFACE UPGRADE
   ========================================= */

:root[data-theme="midnight"] .card {
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.06);
  backdrop-filter: blur(10px);
}

.card:hover {
	transform: translateY(-3px);
	box-shadow: var(--shadow-lg);
}

.card-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
	gap: 28px;
}

.meta {
	font-size: 13px;
	color: var(--muted);
}


/* =========================================
   13. PROGRESS
   ========================================= */

.progress-bar {
	height: 6px;
	background: var(--primary-soft);
	border-radius: 6px;
	overflow: hidden;
	margin-top: 16px;
}

.progress {
	height: 100%;
	background: linear-gradient(90deg,
			var(--primary),
			var(--primary-strong));
}


/* =========================================
   14. CREDIBILITY
   ========================================= */

.credibility {
	margin-top: 60px;
}

.cred-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 24px;
}

.cred-card {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius-md);
	padding: 24px;
	transition: all 0.25s ease;
}

/* =========================================
   MIDNIGHT — SURFACE UPGRADE
   ========================================= */

:root[data-theme="midnight"] .cred-card {
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.06);
  backdrop-filter: blur(10px);
}

.cred-card:hover {
	transform: translateY(-3px);
	box-shadow: var(--shadow-md);
}

.cred-number {
	font-size: 28px;
	font-weight: 700;

	background: linear-gradient(90deg,
			var(--primary),
			var(--primary-strong));

	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
}

.cred-title {
	margin-top: 8px;
	font-weight: 600;
}

.cred-desc {
	margin-top: 8px;
	font-size: 14px;
	color: var(--muted);
}


/* =========================================
   15. DASHBOARD
   ========================================= */

.dashboard {
	margin-top: 60px;
}

.dashboard-header h2 {
	font-size: 32px;
}

.dashboard-sub {
	margin-top: 6px;
	color: var(--muted);
	font-size: 14px;
}

.dashboard-grid {
	margin-top: 28px;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
	gap: 28px;
}

.dashboard-card {
	background: var(--surface);
	border-radius: var(--radius-lg);
	border: 1px solid var(--border);
	padding: 24px;
	transition: all 0.25s ease;
}

/* =========================================
   MIDNIGHT — SURFACE UPGRADE
   ========================================= */

:root[data-theme="midnight"] .dashboard-card{
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.06);
  backdrop-filter: blur(10px);
}

.dashboard-card:hover {
	transform: translateY(-4px);
	box-shadow: var(--shadow-lg);
}

.dashboard-top {
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.dashboard-title {
	font-size: 18px;
	font-weight: 600;
}

.badge {
	font-size: 12px;
	padding: 4px 8px;
	border-radius: 999px;
	background: var(--primary-soft);
	color: var(--primary);
}

.badge.light {
	background: var(--surface-soft);
	color: var(--muted);
}

.dashboard-meta {
	margin-top: 8px;
	font-size: 14px;
	color: var(--muted);
}

.dashboard-actions {
	margin-top: 20px;
	display: flex;
	gap: 12px;
}


/* =========================================
   16. FOOTER
   ========================================= */

.footer-copy {
	text-align: center;
	font-size: 12px;
	color: var(--muted);
	margin: 40px 0;
}


/* =========================================
   17. RESPONSIVE
   ========================================= */

@media (min-width: 1600px) {
	.container {
		max-width: 1400px;
	}

	.container-wide {
		max-width: 1600px;
	}
}

/* =========================================
   CARD LINKS — FIXED + PREMIUM
   ========================================= */

.card-link {
	display: inline-flex;
	align-items: center;
	gap: 6px;

	margin-top: 16px;

	font-size: 14px;
	font-weight: 500;

	text-decoration: none;
	color: var(--primary);

	transition: all 0.2s ease;
}

/* arrow indicator (premium touch) */
.card-link::after {
	content: "↗";
	font-size: 13px;
	transition: transform 0.2s ease;
}

.card-link:hover {
	color: var(--primary-strong);
}

.card-link:hover::after {
	transform: translateX(3px);
}


/* SECONDARY LINK */

.card-link.secondary {
	color: var(--muted);
	font-weight: 400;
}

.card-link.secondary::after {
	opacity: 0.6;
}

.card-link.secondary:hover {
	color: var(--primary);
}

.card-link.secondary:hover::after {
	opacity: 1;
	transform: translateX(3px);
}

/* =========================================
   LINKEDIN — ELITE INTERACTION
   ========================================= */

.nav-linkedin-elite {
	position: relative;

	display: inline-flex;
	align-items: center;
	justify-content: center;

	height: 26px;
	padding: 0 8px;

	border-radius: 6px;

	overflow: hidden;

	transition: all 0.3s ease;
}

/* BASE — minimal "in" */

.nav-linkedin-elite::before {
	content: "in";

	font-size: 11px;
	font-weight: 700;

	color: var(--muted);

	border: 1px solid var(--border);
	border-radius: 4px;

	padding: 2px 5px;

	background: var(--surface);

	transition: all 0.3s ease;
}

/* GLOW LAYER */

.nav-linkedin-elite::after {
	content: "";

	position: absolute;
	inset: 0;

	background: linear-gradient(90deg,
			var(--primary),
			var(--primary-strong));

	opacity: 0;
	filter: blur(12px);

	transition: opacity 0.3s ease;
}


/* =========================
   HOVER — TRANSFORMATION
   ========================= */

/* BASE — LINKEDIN BRAND TUNED */

.nav-linkedin-elite::before {
	content: "in";

	font-size: 12px;
	/* slightly bigger */
	font-weight: 800;
	/* stronger */

	color: #0A66C2;
	/* 🔥 LinkedIn official blue */

	border: 1px solid rgba(10, 102, 194, 0.25);
	border-radius: 5px;

	padding: 2px 6px;

	background: rgba(10, 102, 194, 0.08);

	letter-spacing: -0.02em;

	transition: all 0.3s ease;
}

/* glow activates */

.nav-linkedin-elite:hover::before {
	content: "Connect ↗";

	color: white;

	background: linear-gradient(90deg,
			#0A66C2,
			var(--primary-strong));

	border-color: transparent;

	padding: 4px 12px;

	border-radius: 999px;

	transform: translateY(-1px);
}

/* =========================================
   RESPONSIVE SYSTEM — MOBILE
   ========================================= */

@media (max-width: 768px) {

	/* CONTAINER */
	.container {
		padding: 0 20px;
	}

	section {
		margin-top: 60px;
	}

	/* HEADER */
	.header-inner {
    padding: 22px 32px;
	}

	.logo {
		font-size: 22px;
	}

	.tagline {
		font-size: 12px;
	}

	/* NAV */
	.nav {
		gap: 16px;
		overflow-x: auto;
		/* temporary fix */
		white-space: nowrap;
	}

	.nav a {
		font-size: 14px;
	}

	/* HERO */
	.hero {
		margin: 24px auto 40px;
    margin-top: 20px;
	}

	.hero-title {
		font-size: 32px;
		line-height: 1.2;
	}

	.hero-sub {
		font-size: 16px;
	}

	.hero-actions {
		flex-direction: column;
		gap: 12px;
	}

	/* BUTTONS */
	.btn-primary,
	.btn-secondary {
		width: 100%;
		text-align: center;
	}

	/* CARDS */
	.card,
	.dashboard-card {
		padding: 18px;
	}

	/* GRID */
	.card-grid,
	.dashboard-grid {
		grid-template-columns: 1fr;
		gap: 20px;
	}

	/* CREDIBILITY */
	.cred-grid {
		grid-template-columns: 1fr 1fr;
	}

	/* TOUCH IMPROVEMENT */
	a,
	button {
		min-height: 40px;
	}

}

/* =========================================
   MOBILE NAVIGATION SYSTEM
   ========================================= */

/* HAMBURGER */

.menu-toggle {
	display: none;
	flex-direction: column;
	gap: 4px;
	cursor: pointer;
}

.menu-toggle span {
	width: 22px;
	height: 2px;
	background: var(--text);
	transition: all 0.3s ease;
}


/* MOBILE MODE */

@media (max-width: 768px) {

	/* show hamburger */
	.menu-toggle {
		display: flex;
	}

	/* hide desktop nav */
	.nav {
		position: fixed;
		top: 0;
		right: -100%;
		height: 100vh;
		width: 260px;

		background: var(--surface);
		box-shadow: var(--shadow-lg);

		flex-direction: column;
		align-items: flex-start;
		padding: 80px 20px;

		gap: 20px;

		transition: right 0.3s ease;

		z-index: 1002;
	}

	/* active state */
	.nav.open {
		right: 0;
	}

	/* overlay */
	.nav-overlay {
		position: fixed;
		inset: 0;
		background: rgba(0, 0, 0, 0.4);

		opacity: 0;
		pointer-events: none;

		transition: opacity 0.3s ease;
		pointer-events: none;
		z-index: 1001;
	}

	.nav-overlay.open {
		opacity: 1;
		pointer-events: none;
	}

	/* nav links spacing */
	.nav a {
		font-size: 16px;
	}

	/* dropdown fix (stacked) */
	.dropdown {
		position: static;
		transform: none;
		opacity: 1;
		pointer-events: auto;
		box-shadow: none;
		border: none;
		padding-left: 10px;
		z-index: 1003;
		/* above nav */
	}

}

/* =========================================
   HERO SPLIT — PREMIUM LAYOUT
   ========================================= */

.hero-split {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 60px;
  align-items: center;
}

/* LEFT */

.hero-left {
  max-width: 720px;
}

/* RIGHT */

.hero-right {
  display: flex;
  justify-content: flex-end;
}


/* =========================================
   FEATURED CARD
   ========================================= */

.featured-card {
  max-width: 380px;
  animation: heroFadeLift 1.2s ease-out both;
  padding: 24px;

  border-radius: var(--radius-lg);

  background: var(--surface);
  border: 1px solid var(--border);

  box-shadow: var(--shadow-md);

  transition: all 0.25s ease;
}

.featured-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

/* label */

.featured-label {
  font-size: 12px;
  font-weight: 600;

  color: var(--primary);

  margin-bottom: 8px;
}

/* title */

.featured-title {
  font-size: 18px;
  font-weight: 600;

  line-height: 1.4;
}

/* desc */

.featured-desc {
  margin-top: 10px;
  font-size: 14px;
  color: var(--muted);
}


/* =========================================
   MIDNIGHT UPGRADE
   ========================================= */

:root[data-theme="midnight"] .featured-card {
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.06);
  backdrop-filter: blur(10px);
}

:root[data-theme="midnight"] .featured-card:hover {
  box-shadow:
    0 20px 60px rgba(0,0,0,0.6),
    0 0 0 1px rgba(99,102,241,0.15);
}


/* =========================================
   MOBILE
   ========================================= */

@media (max-width: 768px) {

  .hero-split {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .hero-right {
    justify-content: flex-start;
  }

  .featured-card {
    max-width: 100%;
  }

}

/* =========================================
   HERO MICRO ANIMATION
   ========================================= */

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

@media (prefers-reduced-motion: reduce) {
  .hero,
  .hero-title,
  .hero-sub,
  .hero-actions,
  .featured-card {
    animation: none;
  }
}

/* =========================================
   THEME LAB
   ========================================= */

.theme-lab {
  margin-top: 40px;
}

/* GRID */

.theme-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 20px;
  margin-top: 40px;
}

/* TILE */

.theme-tile {
  cursor: pointer;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  transition: all 0.2s ease;
  background: var(--surface);
}

.theme-tile:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

/* COLOR PATCH */

.theme-preview {
  height: 100px;
  background: linear-gradient(
    135deg,
    var(--primary),
    var(--primary-strong)
  );
}

/* LABEL */

.theme-tile span {
  display: block;
  padding: 10px;
  font-size: 13px;
  text-align: center;
}

/* =========================================
   LIVE PREVIEW
   ========================================= */

.theme-live-preview {
  margin-top: 60px;
  max-width: 420px;
}

/* MIDNIGHT SUPPORT */

:root[data-theme="midnight"] .theme-tile {
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.06);
  backdrop-filter: blur(10px);
}

/* =========================================
   THEME LAB — PRO DASHBOARD
   ========================================= */

.theme-lab-pro {
  margin-top: 40px;
}

/* HEADER */

.lab-header h1 {
  font-size: 28px;
  letter-spacing: -0.02em;
}

.lab-header p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 14px;
}

/* LAYOUT */

.lab-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 40px;
  margin-top: 40px;
}

/* SIDEBAR */

.theme-sidebar {
  position: sticky;
  top: 100px;
  height: fit-content;
}

/* GROUP */

.theme-group-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 10px;
}

/* LIST */

.theme-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* ITEM */

.theme-item {
  font-size: 14px;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  color: var(--text);
  transition: all 0.2s ease;
}

.theme-item:hover {
  background: var(--primary-soft);
  color: var(--primary);
}

/* ACTIVE */

.theme-item.active {
  background: linear-gradient(
    90deg,
    var(--primary),
    var(--primary-strong)
  );
  color: white;
}

/* CANVAS */

.theme-canvas {
  max-width: 720px;
}

/* MAIN CARD */

.lab-card {
  padding: 28px;
}

/* GRID */

.lab-grid {
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

/* MIDNIGHT */

:root[data-theme="midnight"] .theme-item:hover {
  background: rgba(255,255,255,0.06);
}

:root[data-theme="midnight"] .theme-item.active {
  background: linear-gradient(
    90deg,
    #6366f1,
    #8b5cf6
  );
}

/* =========================================
   MOBILE
   ========================================= */

@media (max-width: 768px) {

  .lab-layout {
    grid-template-columns: 1fr;
  }

  .theme-sidebar {
    position: static;
  }

  .theme-list {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .theme-item {
    font-size: 12px;
  }

}

/* =========================================
   FILTER BAR
   ========================================= */

.filter-bar {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.filter-bar select {
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
}

/* TAGS */

.post-tags {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
}

/* =========================================
   KNOWLEDGE OS
   ========================================= */

.knowledge {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 40px;
  margin-top: 40px;
}

/* SIDEBAR */

.knowledge-sidebar {
  position: sticky;
  top: 100px;
  height: fit-content;
}

.ks-title {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
}

.ks-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ks-item {
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s ease;
}

.ks-item:hover {
  background: var(--primary-soft);
  color: var(--primary);
}

.ks-item.active {
  background: linear-gradient(
    90deg,
    var(--primary),
    var(--primary-strong)
  );
  color: white;
}

/* CONTENT */

.knowledge-content {
  max-width: 900px;
}

.ks-header h1 {
  font-size: 28px;
}

/* GRID */

.ks-card {
  transition: all 0.2s ease;
}

/* MIDNIGHT */

:root[data-theme="midnight"] .ks-item:hover {
  background: rgba(255,255,255,0.06);
}

/* MOBILE */

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

  .knowledge-sidebar {
    position: static;
  }

  .ks-nav {
    flex-direction: row;
    flex-wrap: wrap;
  }
}

/* =========================================
   PAGE HEADER — PREMIUM ALIGNMENT
   ========================================= */

.page-header {
  margin-bottom: 40px;
}

.page-title {
  font-size: clamp(32px, 4vw, 44px);
  font-weight: 700;
  letter-spacing: -0.03em;

  background: linear-gradient(
    90deg,
    var(--primary),
    var(--primary-strong)
  );

  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.page-sub {
  margin-top: 10px;
  font-size: 16px;
  color: var(--muted);
}


/* =========================================
   CARD — PREMIUM CONTENT FEEL
   ========================================= */

.card {
  position: relative;
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;

  background: linear-gradient(
    90deg,
    var(--primary),
    var(--primary-strong)
  );

  opacity: 0;
  transition: opacity 0.3s ease;
}

.card:hover::before {
  opacity: 1;
}

.card h3 {
  margin-bottom: 6px;
  line-height: 1.3;
}

.meta {
  margin-bottom: 10px;
}

.card p {
  margin-top: 8px;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}


/* =========================================
   GRID RHYTHM IMPROVEMENT
   ========================================= */

.card-grid {
  gap: 32px;
}


/* =========================================
   KNOWLEDGE SIDEBAR — PRODUCT FEEL
   ========================================= */

.knowledge-sidebar {
  padding-right: 10px;
}

.ks-nav {
  border-left: 1px solid var(--border);
  padding-left: 12px;
}

.ks-item {
  font-weight: 500;
}

.ks-item.active {
  box-shadow: 0 4px 14px rgba(0,0,0,0.08);
}


/* =========================================
   CONTENT WIDTH TUNING
   ========================================= */

.knowledge-content {
  max-width: 820px;
}


/* =========================================
   POST CONTENT — PREMIUM READING
   ========================================= */

.post-content {
  font-size: 18px;
  line-height: 1.8;
}

.post-content h2 {
  margin-top: 40px;
  font-size: 26px;
}

.post-content p {
  margin-top: 14px;
}

.post-content ul {
  margin-top: 12px;
  padding-left: 20px;
}


/* =========================================
   MICRO POLISH
   ========================================= */

.card-link {
  margin-top: 14px;
}

/* =========================================
   KNOWLEDGE LAYOUT — PRODUCT LEVEL
   ========================================= */

.knowledge-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 60px;
  align-items: start;
}

/* SIDEBAR */

.knowledge-sidebar {
  position: sticky;
  top: 100px;
}

/* NAV */

.ks-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ks-item {
  padding: 8px 12px;
  border-radius: 8px;
  text-decoration: none;

  color: var(--muted);
  font-size: 14px;

  transition: all 0.2s ease;
}

.ks-item:hover {
  background: var(--primary-soft);
  color: var(--primary);
}

/* 🔥 ACTIVE STATE (VERY IMPORTANT) */
.ks-item.active {
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 600;
}

/* CONTENT */

.knowledge-content {
  max-width: 760px;
}

/* SECTION BLOCK */

.knowledge-content section {
  margin-top: 40px;
}

/* =========================================
   MOBILE
   ========================================= */

@media (max-width: 768px) {
  .knowledge-layout {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .knowledge-sidebar {
    position: relative;
    top: 0;
  }
}

/* SEARCH */

.ks-search {
  margin-bottom: 20px;
}

.ks-search input {
  width: 100%;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
}

/* SEARCH + FILTER POLISH */

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

/* tag hover */

.tag {
  cursor: pointer;
  transition: all 0.2s ease;
}

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

/* =========================================
   WORLD-CLASS SIDEBAR
   ========================================= */

.knowledge-sidebar {
  position: sticky;
  top: 100px;

  padding-right: 12px;
}

.ks-title {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 12px;
}

.ks-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ks-item {
  display: inline-block;
  width: fit-content;

  padding: 6px 10px;
  border-radius: 6px;

  font-size: 13px;
  color: var(--muted);

  cursor: pointer;
  transition: all 0.2s ease;
}

.ks-item:hover {
  background: var(--primary-soft);
  color: var(--primary);
}

/* 🔥 CLEAN ACTIVE (no heavy gradient) */
.ks-item.active {
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 600;
}

/* =========================================
   INTERACTION POLISH
   ========================================= */

/* CARD HOVER — ELEVATION SYSTEM */
.ks-card {
  transition: all 0.25s ease;
}

.ks-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

/* TAGS */

.tag {
  cursor: pointer;
  font-size: 12px;

  padding: 3px 8px;
  border-radius: 999px;

  background: var(--surface-soft);
  color: var(--muted);

  transition: all 0.2s ease;
}

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

/* SEARCH */

.ks-search input {
  transition: all 0.2s ease;
}

.ks-search input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}

/* =========================================
   POST — WORLD CLASS READING
   ========================================= */

.post-container {
  max-width: 760px;
  margin: 60px auto;
  padding: 0 20px;
}

/* HEADER */

.post-header {
  margin-bottom: 40px;
}

.post-title {
  font-size: clamp(36px, 5vw, 48px);
  line-height: 1.15;
  letter-spacing: -0.03em;

  background: linear-gradient(
    90deg,
    var(--primary),
    var(--primary-strong)
  );

  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.post-meta {
  margin-top: 12px;
  font-size: 14px;
  color: var(--muted);
}

/* CONTENT */

.post-content {
  font-size: 19px;
  line-height: 1.85;
  color: var(--text);
}

/* headings */

.post-content h2 {
  margin-top: 48px;
  font-size: 28px;
  letter-spacing: -0.02em;
}

.post-content h3 {
  margin-top: 32px;
  font-size: 22px;
}

/* paragraphs */

.post-content p {
  margin-top: 18px;
}

/* lists */

.post-content ul {
  margin-top: 16px;
  padding-left: 22px;
}

.post-content li {
  margin-bottom: 8px;
}

/* blockquote */

.post-content blockquote {
  margin: 24px 0;
  padding-left: 16px;
  border-left: 3px solid var(--primary);
  color: var(--muted);
}

/* links */

.post-content a {
  color: var(--primary);
  text-decoration: none;
}

.post-content a:hover {
  text-decoration: underline;
}

/* =========================================
   READING PROGRESS BAR
   ========================================= */

.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;

  background: linear-gradient(
    90deg,
    var(--primary),
    var(--primary-strong)
  );

  width: 0%;
  z-index: 9999;
}

.post-container {
  animation: fadeIn 0.6s ease-out;
}

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

/* =========================================
   POST LAYOUT (WITH TOC)
   ========================================= */

.post-layout {
  display: grid;
  grid-template-columns: minmax(0, 760px) 220px;
  gap: 60px;

  max-width: 1100px;
  margin: 60px auto;
  padding: 0 20px;
}

/* TOC */

.toc {
  position: sticky;
  top: 120px;
  height: fit-content;
}

.toc-title {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 12px;
}

.toc a {
  display: block;
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;

  margin-bottom: 8px;
  transition: all 0.2s ease;
}

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

/* active section */

.toc a.active {
  color: var(--primary);
  font-weight: 600;
}

/* MOBILE */

@media (max-width: 1024px) {
  .post-layout {
    grid-template-columns: 1fr;
  }

  .toc {
    display: none;
  }
}

html {
  scroll-behavior: smooth;
}

/* =========================================
   FIX: REMOVE UNDERLINE + CLEAN TITLES
   ========================================= */

/* remove underline everywhere */
a {
  text-decoration: none;
}

/* card titles (posts + knowledge) */
.card h3 a {
  color: var(--text);
  font-weight: 600;
}

/* hover effect */
.card h3 a:hover {
  color: var(--primary);
}

/* featured card title */
.featured-title {
  font-weight: 600;
}

/* =========================================
   CARD HOVER — PREMIUM POLISH
   ========================================= */

/* smooth transition */
.card {
  transition: all 0.25s ease;
}

/* lift + depth */
.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

/* title micro movement */
.card h3 a {
  transition: all 0.2s ease;
}

.card:hover h3 a {
  transform: translateX(2px);
}

/* =========================================
   FEATURED CARD — ELITE UPGRADE
   ========================================= */

.featured-card {
  position: relative;

  border-radius: var(--radius-lg);
  padding: 24px;

  background: var(--surface);
  border: 1px solid var(--border);

  transition: all 0.3s ease;

  /* subtle premium glow */
  box-shadow:
    0 10px 30px rgba(0,0,0,0.08),
    0 0 0 1px rgba(99,102,241,0.05);
}

/* hover = elevate + glow */
.featured-card:hover {
  transform: translateY(-6px);

  box-shadow:
    0 20px 60px rgba(0,0,0,0.12),
    0 0 0 1px rgba(99,102,241,0.15);
}

/* top accent line */
.featured-card::before {
  content: "";
  position: absolute;

  top: 0;
  left: 0;
  width: 100%;
  height: 3px;

  background: linear-gradient(
    90deg,
    var(--primary),
    var(--primary-strong)
  );

  border-top-left-radius: var(--radius-lg);
  border-top-right-radius: var(--radius-lg);
}

/* label refinement */
.featured-label {
  font-size: 12px;
  font-weight: 600;

  color: var(--primary);
  margin-bottom: 8px;
}

/* title stronger */
.featured-title {
  font-size: 20px;
  font-weight: 600;
  line-height: 1.4;
}

/* description softer */
.featured-desc {
  margin-top: 10px;
  font-size: 14px;
  color: var(--muted);
}

/* =========================================
   FINAL POLISH — SMOOTH EXPERIENCE
   ========================================= */

/* smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* better rendering */
body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* =========================================
   PAGE FADE IN
   ========================================= */

main {
  animation: pageFade 0.5s ease-out;
}

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

/* =========================================
   SPACING RHYTHM
   ========================================= */

section {
  margin-top: 72px;   /* cleaner than mixed spacing */
}

/* tighten hero */
.hero {
  margin-top: 40px;
}

/* consistency */
.page-header {
  margin-bottom: 32px;
}

/* =========================================
   BUTTON POLISH
   ========================================= */

.btn-primary,
.btn-secondary,
.btn-ghost {
  transition: all 0.2s ease;
}

.btn-primary:hover,
.btn-secondary:hover,
.btn-ghost:hover {
  transform: translateY(-1px);
}
/* =========================================
   AI SUMMARY BLOCK
   ========================================= */

.ai-summary {
  background: var(--primary-soft);
  padding: 16px;
  border-radius: 10px;
  margin-bottom: 24px;
  font-size: 14px;
  line-height: 1.6;
}

/* =========================================
   LINK POLISH
   ========================================= */

a {
  transition: color 0.2s ease;
}

@media (max-width: 768px) {

  .container {
    padding: 0 16px;
  }

  .hero-title {
    font-size: 30px;
  }

  .card {
    border-radius: 12px;
  }

}

/* SYSTEM PAGE */

.system-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2.5rem 1.25rem; /* reduced from 4rem */
}

/* =========================
   FLOW SYSTEM (HOMEPAGE)
========================= */

.system-flow {
  display: flex;
  align-items: center;
  justify-content: center; /* 🔥 center align */
  gap: 0.5rem;

  flex-wrap: wrap; /* allows wrapping if needed */
  text-align: center;

  margin: 0 auto;
}

/* FLOW CARD */

.flow-card {
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  font-size: 0.85rem;
  white-space: nowrap;

  color: white;
  border: none;

  background: var(--primary-strong); /* 🔥 single theme color */

  box-shadow: 0 4px 12px rgba(0,0,0,0.2);

  transition: all 0.2s ease;
  backdrop-filter: blur(6px);
}

/* FLOW ARROW */

.flow-arrow {
  color: var(--text-muted);
  opacity: 0.6;
}

.framework-card {
  padding: 1rem 1.1rem;
  border-radius: 10px;
  background: var(--card-bg);
  border-left: 2px solid var(--accent);
}

.framework-card h3 {
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
}

.framework-card p {
  font-size: 0.85rem;
  opacity: 0.8;
}
.hover-lift {
  transition: all 0.2s ease;
}

.hover-lift:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

.center {
  text-align: center;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.compact .card {
  padding: 0.8rem 1rem;
  font-size: 0.9rem;
}

.system-section + .system-section {
  border-top: 1px solid var(--border-subtle);
}

/* =========================
   SYSTEM PAGE ONLY
========================= */

.system-page .hero-split {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2rem;
  align-items: center;
  padding: 2.2rem 1.25rem;
}

.system-page .hero-left {
  max-width: 520px;
}

.system-page .hero-right {
  display: flex;
  justify-content: center;
}

.system-page .system-preview {
  width: 100%;
  max-width: 420px;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 1rem;
  background: rgba(255,255,255,0.02);
}

.system-page .framework-mini {
  margin-top: 1rem;
}

.system-page .framework-row {
  display: flex;
  gap: 0.4rem;
  margin-top: 0.4rem;
}

.system-page .framework-row span {
  font-size: 0.75rem;
  padding: 0.25rem 0.45rem;
  border-radius: 6px;
  background: var(--card-bg);
  border: 1px solid var(--border-subtle);
}

/* Mobile safe */

@media (max-width: 768px) {
  .system-page .hero-split {
    grid-template-columns: 1fr;
  }

  .system-page .hero-right {
    margin-top: 1.5rem;
  }
}

.system-page .problem-inline {
  font-size: 0.9rem;
  opacity: 0.7;
  margin-bottom: 1rem;
}

.system-page .how-it-works {
  display: grid;
  gap: 0.6rem;
  margin-top: 1rem;
}

.system-page .step {
  font-size: 0.9rem;
  opacity: 0.85;
}

.system-page .section-title {
  margin-bottom: 0.6rem;
}

.system-page .system-ending {
  font-size: 0.95rem;
  opacity: 0.7;
}

.flow-card:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
}

/* =========================
   FLOW STEP COLORS
========================= */

.step-1 { filter: brightness(1.05); }
.step-2 { filter: brightness(1); }
.step-3 { filter: brightness(0.95); }
.step-4 { filter: brightness(0.9); }
.step-5 { filter: brightness(0.85); }

@media (max-width: 768px) {
  .system-flow {
    justify-content: flex-start; /* better for scrolling */
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 0.5rem;
  }
}

.system-flow-wrapper {
  display: flex;
  justify-content: center;
}