/* ============================================================
   simpleprog - style.css
   Fonts: Prosto One (headings), Share Tech (body/code)
   Theme: YouTube-inspired clean UI, light + dark
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Prosto+One&family=Share+Tech&family=JetBrains+Mono:wght@400;500&display=swap');

/* ---- CSS Variables ---- */
:root {
  /* Light theme (default) */
  --bg-primary:     #f9f9f9;
  --bg-secondary:   #f1f1f1;
  --bg-tertiary:    #e5e5e5;
  --bg-card:        #ffffff;
  --bg-sidebar:     #f9f9f9;
  --bg-code:        #f8f8f8;
  --bg-navbar:      #ffffff;
  --bg-subnav:      #ffffff;
  --bg-footer:      #f9f9f9;
  --bg-input:       #ffffff;

  --text-primary:   #0f0f0f;
  --text-secondary: #606060;
  --text-muted:     #909090;
  --text-link:      #2563eb;
  --text-on-accent: #ffffff;

  --brand-color:    #2563eb;
  --accent:         #2563eb;
  --accent-hover:   #1d4ed8;
  --border:         #e5e5e5;
  --border-strong:  #d9d9d9;
  --shadow:         0 1px 2px rgba(0,0,0,0.04);
  --shadow-card:    0 1px 3px rgba(0,0,0,0.03);

  --active-nav:     #2563eb;
  --active-nav-bg:  #f1f1f1;

  --font-head:      'Prosto One', sans-serif;
  --font-body:      'Share Tech', sans-serif;
  --font-code:      'JetBrains Mono', monospace;

  --radius:         12px;
  --radius-pill:    24px;
  --transition:     0.15s ease;

  /* Category Accents - Light Mode */
  --accent-programming:           #2563eb;
  --accent-programming-bg:        #2563eb;
  --accent-cybersecurity:          #e11d48;
  --accent-cybersecurity-bg:       #e11d48;
  --accent-ml:                     #9333ea;
  --accent-ml-bg:                  #9333ea;
  --accent-laws:                   #d97706;
  --accent-laws-bg:                #d97706;
  --accent-networking:             #0d9488;
  --accent-networking-bg:          #0d9488;
  --accent-ds:                     #059669;
  --accent-ds-bg:                  #059669;
  --accent-algorithms:             #7c3aed;
  --accent-algorithms-bg:          #7c3aed;
  --accent-databases:              #0284c7;
  --accent-databases-bg:           #0284c7;
  --accent-os:                     #475569;
  --accent-os-bg:                  #475569;
  --accent-web:                    #ea580c;
  --accent-web-bg:                 #ea580c;
  --accent-devops:                 #16a34a;
  --accent-devops-bg:              #16a34a;
  --accent-system-design:          #0369a1;
  --accent-system-design-bg:       #0369a1;
  --accent-cloud-computing:        #4f46e5;
  --accent-cloud-computing-bg:     #4f46e5;
  --accent-software-architecture:  #6d28d9;
  --accent-software-architecture-bg: #6d28d9;
  --accent-cryptography:           #db2777;
  --accent-cryptography-bg:        #db2777;
}

[data-theme="dark"] {
  --bg-primary:     #0f0f0f;
  --bg-secondary:   #1a1a1a;
  --bg-tertiary:    #272727;
  --bg-card:        #1a1a1a;
  --bg-sidebar:     #0f0f0f;
  --bg-code:        #1a1a1a;
  --bg-navbar:      #0f0f0f;
  --bg-subnav:      #0f0f0f;
  --bg-footer:      #0f0f0f;
  --bg-input:       #272727;

  --text-primary:   #f1f1f1;
  --text-secondary: #aaaaaa;
  --text-muted:     #717171;
  --text-link:      #3ea6ff;
  --text-on-accent: #0f0f0f;

  --brand-color:    #3ea6ff;
  --accent:         #3ea6ff;
  --accent-hover:   #65b8ff;
  --border:         #272727;
  --border-strong:  #3f3f3f;
  --shadow:         none;
  --shadow-card:    none;

  --active-nav:     #3ea6ff;
  --active-nav-bg:  rgba(62, 166, 255, 0.15);

  /* Category Accents - Dark Mode */
  --accent-programming:           #60a5fa;
  --accent-programming-bg:        #1d4ed8;
  --accent-cybersecurity:          #fb7185;
  --accent-cybersecurity-bg:       #be123c;
  --accent-ml:                     #c084fc;
  --accent-ml-bg:                  #7e22ce;
  --accent-laws:                   #fbbf24;
  --accent-laws-bg:                #b45309;
  --accent-networking:             #2dd4bf;
  --accent-networking-bg:          #0f766e;
  --accent-ds:                     #34d399;
  --accent-ds-bg:                  #047857;
  --accent-algorithms:             #a78bfa;
  --accent-algorithms-bg:          #5b21b6;
  --accent-databases:              #38bdf8;
  --accent-databases-bg:           #0369a1;
  --accent-os:                     #94a3b8;
  --accent-os-bg:                  #334155;
  --accent-web:                    #fb923c;
  --accent-web-bg:                 #c2410c;
  --accent-devops:                 #4ade80;
  --accent-devops-bg:              #15803d;
  --accent-system-design:          #7dd3fc;
  --accent-system-design-bg:       #075985;
  --accent-cloud-computing:        #a5b4fc;
  --accent-cloud-computing-bg:     #3730a3;
  --accent-software-architecture:  #c4b5fd;
  --accent-software-architecture-bg: #4c1d95;
  --accent-cryptography:           #f9a8d4;
  --accent-cryptography-bg:        #9d174d;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  transition: background-color 0.25s ease, color 0.25s ease;
}

a {
  color: var(--text-link);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  text-decoration: underline;
}

.btn:hover,
.btn-primary:hover,
.btn-ghost:hover,
.hero-browse-btn:hover {
  text-decoration: none !important;
}

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

ul, ol {
  list-style: none;
}

button {
  font-family: var(--font-body);
  cursor: pointer;
  border: none;
  background: none;
  transition: all var(--transition);
}

input, textarea, select {
  font-family: var(--font-body);
}

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-navbar);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  height: 56px;
  max-width: 1600px;
  margin: 0 auto;
}

/* Brand */
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  flex-shrink: 0;
}

.brand:hover {
  text-decoration: none;
}

.brand-name {
  font-family: var(--font-head);
  font-size: 1.3rem;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.brand-name span {
  color: var(--brand-color);
}

/* Search */
.navbar-search {
  flex: 1;
  max-width: 600px;
  margin: 0 24px;
  display: flex;
  align-items: center;
  height: 38px;
}

.search-input-wrap {
  flex: 1;
  display: flex;
  height: 100%;
  border: 1px solid var(--border-strong);
  border-radius: 40px 0 0 40px;
  overflow: hidden;
  background: var(--bg-input);
  padding-left: 12px;
}

.search-input {
  flex: 1;
  border: none;
  padding: 8px 12px;
  font-size: 0.95rem;
  background: transparent;
  color: var(--text-primary);
  outline: none;
}

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

.search-btn {
  background: var(--bg-secondary);
  border: 1px solid var(--border-strong);
  border-left: none;
  padding: 0 20px;
  height: 100%;
  color: var(--text-primary);
  border-radius: 0 40px 40px 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
}

.search-btn:hover {
  background: var(--bg-tertiary);
}

/* Nav actions */
.navbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.btn-signin {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border: 1px solid var(--accent);
  border-radius: var(--radius-pill);
  color: var(--accent);
  font-size: 0.875rem;
  font-family: var(--font-body);
  background: transparent;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}

.btn-signin:hover {
  background: var(--active-nav-bg);
  text-decoration: none;
}

/* Profile Dropdown using details/summary */
details.profile-dropdown {
  position: relative;
}

details.profile-dropdown > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  outline: none;
}

details.profile-dropdown > summary::-webkit-details-marker {
  display: none;
}

.avatar-circle {
  width: 34px;
  height: 34px;
  background: var(--accent);
  color: var(--text-on-accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: 0 0 8px rgba(37, 99, 235, 0.3);
  transition: box-shadow 0.2s;
}

[data-theme="dark"] .avatar-circle {
  box-shadow: 0 0 12px rgba(62, 166, 255, 0.4);
}

details.profile-dropdown[open] .avatar-circle {
  box-shadow: 0 0 15px var(--accent);
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--bg-card);
  min-width: 220px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  z-index: 100;
  overflow: hidden;
  animation: dropdownFadeIn 0.2s ease;
  display: flex;
  flex-direction: column;
}

.dropdown-menu form {
  width: 100%;
  margin: 0;
}

[data-theme="dark"] .dropdown-menu {
  border: 1px solid var(--border-strong);
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.dropdown-header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-body);
  font-weight: bold;
  color: var(--text-primary);
  word-break: break-all;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  color: var(--text-secondary);
  text-decoration: none;
  font-family: var(--font-body);
  font-size: 0.9rem;
  transition: all 0.2s;
  background: transparent;
  width: 100%;
  text-align: left;
  border: none;
  cursor: pointer;
}

.dropdown-item:hover {
  background: var(--bg-secondary);
  color: var(--accent);
  text-decoration: none !important;
}

.dropdown-item.text-danger:hover {
  color: #e11d48;
}

@keyframes dropdownFadeIn {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   SUB-NAVBAR (categories strip)
   ============================================================ */
.subnav {
  background: var(--bg-subnav);
  border-bottom: 1px solid var(--border);
  width: 100%;
}

.subnav-wrapper {
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 16px;
}

.subnav-inner {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
  gap: 12px;
  padding: 12px 0;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
  cursor: grab;
  user-select: none;
}

.subnav-inner.dragging {
  cursor: grabbing;
}

.subnav-inner.dragging .subnav-item {
  pointer-events: none;
}

.subnav-inner::-webkit-scrollbar {
  display: none;
}

.subnav-arrow {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  transition: opacity var(--transition), background var(--transition), border-color var(--transition);
  cursor: pointer;
}

.subnav-arrow:hover:not(:disabled) {
  background: var(--bg-secondary);
  border-color: var(--border-strong);
}

.subnav-arrow:disabled {
  opacity: 0.3;
  pointer-events: none;
  cursor: not-allowed;
}

.subnav-arrow.hidden {
  display: none;
}

.subnav-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: 0.875rem;
  color: var(--text-primary);
  background: var(--bg-secondary);
  white-space: nowrap;
  border: 1px solid transparent;
  border-radius: 8px;
  text-decoration: none;
  transition: background var(--transition), color var(--transition);
  cursor: pointer;
}

.subnav-item:hover {
  color: var(--text-primary);
  background: var(--bg-tertiary);
  text-decoration: none;
}

.subnav-item.active {
  color: var(--bg-primary);
  background: var(--text-primary);
  font-weight: 500;
}

.subnav-icon {
  font-size: 0.9rem;
  opacity: 0.8;
}

/* ============================================================
   PAGE LAYOUT
   ============================================================ */
.page-container {
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ============================================================
   HOMEPAGE - HERO
   ============================================================ */
.hero {
  padding: 48px 0 32px;
  text-align: center;
}

.hero-title {
  font-family: var(--font-head);
  font-size: 2.4rem;
  color: var(--text-primary);
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.hero-sub {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto;
}

/* ============================================================
   SECTION HEADINGS
   ============================================================ */
.section {
  padding: 28px 0;
}

.section-title {
  font-family: var(--font-head);
  font-size: 1.2rem;
  color: var(--text-primary);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

/* ============================================================
   DOCUMENTATION & TUTORIAL INDEX HUB
   ============================================================ */
.hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
  margin-top: 16px;
}

.hub-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-card);
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
  display: flex;
  flex-direction: column;
}

.hub-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.08);
}

.hub-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.hub-card-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* White icons on solid colored backgrounds */
.hub-card-icon svg {
  color: #ffffff;
  stroke: #ffffff;
}

.hub-card-title-wrap {
  flex: 1;
  min-width: 0;
}

.hub-card-title {
  font-family: var(--font-head);
  font-size: 1.1rem;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.hub-card-badge {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
}

.hub-card-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 16px;
  flex-grow: 1;
}

.hub-card-links {
  border-top: 1px solid var(--border);
  padding-top: 16px;
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hub-card-link-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  color: var(--text-primary);
  text-decoration: none;
  transition: color var(--transition), transform var(--transition);
}

.hub-card-link-item svg {
  color: var(--text-muted);
  transition: transform var(--transition), color var(--transition);
}

.hub-card-link-item:hover {
  color: var(--accent);
  text-decoration: none;
}

.hub-card-link-item:hover svg {
  transform: translateX(3px);
  color: var(--accent);
}

.hub-card-footer {
  display: flex;
  justify-content: flex-start;
  align-items: center;
}

.hub-card-footer-link {
  font-size: 0.88rem;
  font-weight: bold;
  color: var(--accent);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.hub-card-footer-link:hover {
  color: var(--accent-hover);
  text-decoration: none;
}

.hub-card-footer-link svg {
  transition: transform var(--transition);
}

.hub-card-footer-link:hover svg {
  transform: translateX(4px);
}

/* Category Accent Colors (Premium soft tint background + matching icon stroke color) */
.bg-cat-programming           { background-color: var(--accent-programming-bg); color: var(--accent-programming); }
.bg-cat-cybersecurity          { background-color: var(--accent-cybersecurity-bg); color: var(--accent-cybersecurity); }
.bg-cat-ml                     { background-color: var(--accent-ml-bg); color: var(--accent-ml); }
.bg-cat-laws                   { background-color: var(--accent-laws-bg); color: var(--accent-laws); }
.bg-cat-networking             { background-color: var(--accent-networking-bg); color: var(--accent-networking); }
.bg-cat-ds                     { background-color: var(--accent-ds-bg); color: var(--accent-ds); }
.bg-cat-algorithms             { background-color: var(--accent-algorithms-bg); color: var(--accent-algorithms); }
.bg-cat-databases              { background-color: var(--accent-databases-bg); color: var(--accent-databases); }
.bg-cat-os                     { background-color: var(--accent-os-bg); color: var(--accent-os); }
.bg-cat-web                    { background-color: var(--accent-web-bg); color: var(--accent-web); }
.bg-cat-devops                 { background-color: var(--accent-devops-bg); color: var(--accent-devops); }
.bg-cat-system-design          { background-color: var(--accent-system-design-bg); color: var(--accent-system-design); }
.bg-cat-cloud-computing        { background-color: var(--accent-cloud-computing-bg); color: var(--accent-cloud-computing); }
.bg-cat-software-architecture  { background-color: var(--accent-software-architecture-bg); color: var(--accent-software-architecture); }
.bg-cat-cryptography           { background-color: var(--accent-cryptography-bg); color: var(--accent-cryptography); }

/* Category Typographic Glyphs */
.category-glyph {
  font-family: var(--font-code); /* JetBrains Mono */
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  color: inherit;
  user-select: none;
}

.category-glyph-sm {
  font-family: var(--font-code); /* JetBrains Mono */
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  color: inherit;
  user-select: none;
}

.github-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 9px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: 0.9rem;
  cursor: pointer;
  margin-top: 10px;
  transition: background var(--transition);
}

.github-btn:hover {
  background: var(--bg-secondary);
  text-decoration: none;
}

/* ============================================================
   CATEGORY PAGE - HEADER
   ============================================================ */
.category-header {
  padding: 32px 0 20px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}

.category-header-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}

.category-header-title {
  font-family: var(--font-head);
  font-size: 1.9rem;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.category-header-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  max-width: 680px;
}

/* ============================================================
   LEARN PAGE LAYOUT (sidebar + content)
   ============================================================ */
.learn-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 0;
  min-height: calc(100vh - 57px - 57px);
  align-items: start;
}

.learn-sidebar {
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  padding: 16px 0;
  position: sticky;
  top: 113px;
  max-height: calc(100vh - 113px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.sidebar-section-title {
  font-family: var(--font-head);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  padding: 12px 16px 6px;
}

.sidebar-item {
  display: block;
  padding: 8px 12px;
  margin: 2px 12px;
  font-size: 0.88rem;
  color: var(--text-primary);
  cursor: pointer;
  border-radius: 8px;
  transition: all var(--transition);
  text-decoration: none;
}

.sidebar-item:hover {
  background: var(--bg-secondary);
  color: var(--text-primary);
  text-decoration: none;
}

.sidebar-item.active {
  color: var(--text-primary);
  background: var(--bg-tertiary);
  font-weight: 600;
}

.learn-content {
  padding: 28px 36px 48px;
  max-width: 860px;
}

/* ============================================================
   ARTICLE CONTENT
   ============================================================ */
.breadcrumbs {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

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

.breadcrumbs a:hover {
  color: var(--text-link);
}

.article-title {
  font-family: var(--font-head);
  font-size: 1.7rem;
  color: var(--text-primary);
  margin-bottom: 20px;
  line-height: 1.25;
}

.article-heading {
  font-family: var(--font-head);
  font-size: 1.1rem;
  color: var(--text-primary);
  margin: 20px 0 8px;
}

.article-text {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.75;
}

.article-section {
  margin-bottom: 24px;
}

.article-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 20px 0;
}

.article-pagination-top,
.article-pagination-bottom {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}

/* ============================================================
   CODE BLOCKS
   ============================================================ */
.code-block-wrapper {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-code);
}

.code-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 14px;
  background: var(--bg-tertiary);
  border-bottom: 1px solid var(--border);
}

.code-lang {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.code-block {
  margin: 0;
  padding: 16px;
  font-family: var(--font-code);
  font-size: 0.875rem;
  color: var(--text-primary);
  overflow-x: auto;
  line-height: 1.6;
  background: var(--bg-code);
}

.code-footer {
  padding: 8px 14px;
  border-top: 1px solid var(--border);
  background: var(--bg-tertiary);
}

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

/* ============================================================
   BUTTONS
   ============================================================ */
.btn-primary {
  background: var(--accent);
  color: var(--text-on-accent);
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  font-size: 0.875rem;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

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

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  font-size: 0.875rem;
  border: 1px solid var(--border-strong);
  cursor: pointer;
}

.btn-ghost:hover {
  background: var(--bg-tertiary);
}

.btn-sm {
  padding: 5px 12px;
  font-size: 0.8rem;
}

.btn-copy {
  background: transparent;
  border: 1px solid var(--border);
  padding: 3px 10px;
  border-radius: var(--radius);
  font-size: 0.75rem;
  color: var(--text-secondary);
  cursor: pointer;
}

.btn-copy:hover {
  background: var(--bg-primary);
}

.btn-try {
  font-size: 0.8rem;
  color: var(--accent);
}

/* ============================================================
   FORMS (Auth pages)
   ============================================================ */
.auth-page {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 60px 16px;
}

.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow-card);
}

.auth-title {
  font-family: var(--font-head);
  font-size: 1.4rem;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.auth-sub {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 5px;
}

.form-input {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--bg-input);
  color: var(--text-primary);
  font-size: 0.9rem;
  outline: none;
  transition: border-color var(--transition);
}

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

.form-btn {
  width: 100%;
  padding: 10px;
  background: var(--accent);
  color: var(--text-on-accent);
  border: none;
  border-radius: var(--radius);
  font-size: 0.95rem;
  cursor: pointer;
  margin-top: 4px;
}

.form-btn:hover {
  background: var(--accent-hover);
}

.form-divider {
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 14px 0;
  position: relative;
}

.form-divider::before,
.form-divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 40%;
  height: 1px;
  background: var(--border);
}

.form-divider::before { left: 0; }
.form-divider::after  { right: 0; }

.form-link {
  font-size: 0.85rem;
  text-align: center;
  margin-top: 16px;
  color: var(--text-secondary);
}

.google-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 9px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: 0.9rem;
  cursor: pointer;
}

.google-btn:hover {
  background: var(--bg-secondary);
}

/* ============================================================
   FOOTER
   ============================================================ */
footer {
  background: var(--bg-footer);
  border-top: 1px solid var(--border);
  padding: 32px 0 20px;
  margin-top: 48px;
}

.footer-inner {
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 16px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 28px;
}

.footer-brand-name {
  font-family: var(--font-head);
  font-size: 1.1rem;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.footer-brand-name span {
  color: var(--accent);
}

.footer-tagline {
  font-size: 0.83rem;
  color: var(--text-secondary);
  margin-bottom: 14px;
  max-width: 260px;
}

.footer-col-title {
  font-family: var(--font-head);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.footer-links a {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.footer-links a:hover {
  color: var(--text-primary);
  text-decoration: none;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 12px;
}

.footer-copy {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Theme Toggle */
.theme-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.toggle-switch {
  position: relative;
  width: 44px;
  height: 24px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-strong);
  border-radius: 24px;
  cursor: pointer;
  transition: background 0.25s ease;
}

.toggle-slider::before {
  content: '';
  position: absolute;
  left: 3px;
  top: 3px;
  width: 16px;
  height: 16px;
  background: var(--text-secondary);
  border-radius: 50%;
  transition: transform 0.25s ease, background 0.25s ease;
}

.toggle-switch input:checked + .toggle-slider {
  background: var(--accent);
  border-color: var(--accent);
}

.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(20px);
  background: var(--bg-primary);
}

/* ============================================================
   CHIP / BADGE
   ============================================================ */
.chip {
  display: inline-block;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.78rem;
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

/* ============================================================
   LOADING / HTMX
   ============================================================ */
#content-area .htmx-indicator {
  display: none;
}

.htmx-request .htmx-indicator {
  display: block;
}

.content-loader {
  padding: 32px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ============================================================
   UTILITIES
   ============================================================ */
.text-muted   { color: var(--text-muted); }
.text-accent  { color: var(--accent); }
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mb-8  { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-secondary);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .learn-layout {
    grid-template-columns: 1fr;
  }

  .learn-sidebar {
    position: static;
    max-height: none;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .learn-content {
    padding: 20px 16px 40px;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 600px) {
  .hero-title {
    font-size: 1.7rem;
  }

  .navbar-search {
    display: none;
  }

  .video-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ============================================================
   NEW HOMEPAGE REDESIGN STYLES
   ============================================================ */
.index-page {
  width: 100%;
}

/* 1. Hero Section */
.hero-section {
  text-align: center;
  padding: 80px 0;
  background: var(--bg-primary);
  width: 100%;
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
}

.hero-title {
  font-family: var(--font-head);
  font-size: 3rem;
  color: var(--text-primary);
  line-height: 1.15;
  margin-bottom: 20px;
  letter-spacing: -0.03em;
}

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

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 36px;
}



.btn-large {
  padding: 12px 28px;
  font-size: 0.95rem;
  font-weight: 500;
}

.hero-ctas {
  display: flex;
  justify-content: center;
  gap: 16px;
}

/* 2. Section Headers */
.section-header-centered {
  text-align: center;
  margin-bottom: 40px;
}

.section-header-left {
  text-align: left;
  margin-bottom: 32px;
}

.section-pretitle {
  display: inline-block;
  font-size: 0.8rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 6px;
  font-weight: 600;
}

.section-title-large {
  font-family: var(--font-head);
  font-size: 1.8rem;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.section-description {
  font-size: 0.95rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

.section-header-left .section-description {
  margin: 0;
}

/* 3. Interactive Roadmaps */
.roadmaps-section {
  padding: 80px 0;
  background: var(--bg-secondary);
  width: 100%;
}

.roadmap-tabs {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.roadmap-tab-btn {
  padding: 8px 20px;
  border-radius: var(--radius-pill);
  font-size: 0.875rem;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  transition: all var(--transition);
  cursor: pointer;
}

.roadmap-tab-btn:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.roadmap-tab-btn.active {
  background: var(--accent);
  color: var(--text-on-accent);
  border-color: var(--accent);
}

.roadmap-container {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px 24px;
  min-height: 240px;
}

.roadmap-track {
  display: none;
}

.roadmap-track.active {
  display: block;
}

.roadmap-flow {
  display: flex;
  justify-content: space-around;
  align-items: flex-start;
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  gap: 24px;
}

.roadmap-step {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
}

.step-circle {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
  transition: transform var(--transition), box-shadow var(--transition);
}

/* Force white icon strokes on all colored circles */
.step-circle svg {
  color: #ffffff;
  stroke: #ffffff;
}

.roadmap-step:hover .step-circle {
  transform: scale(1.1);
}

.step-info h3 {
  font-family: var(--font-head);
  font-size: 1rem;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.step-info p {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-bottom: 16px;
  line-height: 1.4;
  min-height: 38px;
}

.step-btn {
  display: inline-block;
  padding: 6px 16px;
  border-radius: var(--radius-pill);
  font-size: 0.78rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-weight: 500;
  transition: all var(--transition);
}

.step-btn:hover {
  background: var(--accent);
  color: var(--text-on-accent);
  border-color: var(--accent);
  text-decoration: none;
}

/* Connecting Line between steps */
.step-line-after {
  position: absolute;
  top: 28px;
  left: calc(50% + 28px);
  right: calc(-50% + 28px);
  height: 2px;
  border-top: 2px dashed var(--border-strong);
  z-index: 1;
}

/* 4. Interactive Preview Console */
.preview-section {
  padding: 80px 0;
  background: var(--bg-primary);
  width: 100%;
}

.console-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  overflow: hidden;
}

.console-sidebar {
  border-right: 1px solid var(--border);
  background: var(--bg-secondary);
  display: flex;
  flex-direction: column;
  padding: 12px 0;
}

.console-tab {
  text-align: left;
  padding: 12px 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-left: 3px solid transparent;
  transition: all var(--transition);
  cursor: pointer;
}

.console-tab:hover {
  background: var(--bg-tertiary);
}

.console-tab.active {
  background: var(--bg-card);
  border-left-color: var(--accent);
}

.console-tab-cat {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.console-tab-title {
  font-family: var(--font-head);
  font-size: 0.88rem;
  color: var(--text-primary);
}

.console-display {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
}

.console-header {
  height: 40px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  padding: 0 16px;
  position: relative;
}

.console-dots {
  display: flex;
  gap: 6px;
}

.console-dots .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.console-dots .dot.red { background-color: #ef4444; }
.console-dots .dot.yellow { background-color: #f59e0b; }
.console-dots .dot.green { background-color: #10b981; }

.console-tab-label {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.console-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.console-meta h3 {
  font-family: var(--font-head);
  font-size: 1.15rem;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.console-meta p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* 5. Platform Principles Section */
.principles-section {
  padding: 80px 0;
  background: var(--bg-secondary);
  width: 100%;
}

.principles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.principle-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  text-align: left;
  transition: border-color var(--transition);
}

.principle-card:hover {
  border-color: var(--accent);
}

.principle-icon {
  width: 44px;
  height: 44px;
  background: var(--active-nav-bg);
  color: var(--accent);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.principle-card h3 {
  font-family: var(--font-head);
  font-size: 1.05rem;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.principle-card p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Responsiveness for new homepage items */
@media (max-width: 992px) {
  .console-layout {
    grid-template-columns: 1fr;
  }
  .console-sidebar {
    border-right: none;
    border-bottom: 1px solid var(--border);
    flex-direction: row;
    overflow-x: auto;
    padding: 8px 12px;
    gap: 12px;
    scrollbar-width: thin;
  }
  .console-tab {
    padding: 8px 16px;
    border-left: none;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
  }
  .console-tab.active {
    border-bottom-color: var(--accent);
  }
  .principles-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 2.2rem;
  }
  .roadmap-flow {
    flex-direction: column;
    align-items: stretch;
    gap: 32px;
  }
  .step-line-after {
    display: none;
  }
  .roadmap-step {
    border-bottom: 1px dashed var(--border);
    padding-bottom: 24px;
  }
  .roadmap-step:last-child {
    border-bottom: none;
    padding-bottom: 0;
  }
  .step-info p {
    min-height: auto;
  }
}

/* ============================================================
   FLATICON uicons base sizing
   ============================================================ */
[class^="fi-"], [class*=" fi-"] {
  font-size: inherit;
  line-height: 1;
  vertical-align: middle;
}

.hero-float-card,
.hero-float-card:hover,
.cat-card,
.cat-card:hover {
  text-decoration: none;
}

.hero-v2 {
  padding: 80px 0 60px;
  background: var(--bg-primary);
  overflow: hidden;
}

.hero-v2-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  color: var(--brand-color);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  margin-bottom: 20px;
  letter-spacing: 0.02em;
}

.hero-badge [class^="fi-"] {
  font-size: 0.9rem;
}

.hero-v2-title {
  font-family: var(--font-head);
  font-size: 3rem;
  line-height: 1.15;
  color: var(--text-primary);
  margin-bottom: 20px;
}

.hero-v2-accent {
  color: var(--brand-color);
}

.hero-v2-sub {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 32px;
  max-width: 480px;
}

.hero-v2-ctas {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.hero-v2-ctas .btn-primary,
.hero-v2-ctas .btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.hero-v2-ctas [class^="fi-"] {
  font-size: 1rem;
}

.hero-v2-stats {
  display: flex;
  align-items: center;
  gap: 20px;
}

.hero-stat {
  display: flex;
  flex-direction: column;
}

.hero-stat strong {
  font-family: var(--font-head);
  font-size: 1.4rem;
  color: var(--text-primary);
  line-height: 1;
}

.hero-stat span {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.hero-stat-divider {
  width: 1px;
  height: 28px;
  background: var(--border-strong);
}

/* Hero float cards */
.hero-v2-right {
  position: relative;
}

.hero-cards-float {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.hero-float-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  box-shadow: var(--shadow-card);
}

.hero-float-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
  border-color: var(--border-strong);
}

.hfc-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #fff;
  font-size: 1.2rem;
}

.hfc-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.hfc-text strong {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
}

.hfc-text span {
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ============================================================
   CATEGORIES GRID
   ============================================================ */
.categories-section {
  padding: 80px 0;
  background: var(--bg-secondary);
}

.cat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 48px;
}

.cat-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}

.cat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.10);
  border-color: var(--border-strong);
}

.cat-card:hover .cat-card-arrow {
  opacity: 1;
  transform: translateX(0);
}

.cat-card-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #ffffff;
  font-size: 1.4rem;
}

.cat-card-body {
  flex: 1;
  min-width: 0;
}

.cat-card-body h3 {
  font-family: var(--font-head);
  font-size: 0.9rem;
  color: var(--text-primary);
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cat-card-body p {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cat-card-arrow {
  color: var(--text-muted);
  font-size: 1.2rem;
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 0.18s ease, transform 0.18s ease;
  flex-shrink: 0;
}

/* ============================================================
   WHY / FEATURES
   ============================================================ */
.why-section {
  padding: 80px 0;
  background: var(--bg-primary);
}

.why-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 48px;
}

.why-card {
  padding: 28px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.why-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.08);
}

.why-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: #fff;
  margin-bottom: 18px;
}

.why-icon--blue   { background: linear-gradient(135deg, #2563eb, #1d4ed8); }
.why-icon--purple { background: linear-gradient(135deg, #7c3aed, #5b21b6); }
.why-icon--green  { background: linear-gradient(135deg, #16a34a, #15803d); }
.why-icon--amber  { background: linear-gradient(135deg, #d97706, #b45309); }

.why-card h3 {
  font-family: var(--font-head);
  font-size: 1rem;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.why-card p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* ============================================================
   CTA BANNER
   ============================================================ */
.cta-banner-section {
  padding: 60px 0;
  background: var(--bg-secondary);
}

.cta-banner {
  background: linear-gradient(135deg, #1d4ed8 0%, #7c3aed 100%);
  border-radius: 20px;
  padding: 48px 48px;
  display: flex;
  align-items: center;
  gap: 32px;
  flex-wrap: wrap;
}

.cta-banner-icon {
  font-size: 3rem;
  color: rgba(255,255,255,0.8);
  flex-shrink: 0;
}

.cta-banner-text {
  flex: 1;
  min-width: 200px;
}

.cta-banner-text h2 {
  font-family: var(--font-head);
  font-size: 1.8rem;
  color: #ffffff;
  margin-bottom: 8px;
}

.cta-banner-text p {
  font-size: 0.95rem;
  color: rgba(255,255,255,0.75);
}

.cta-banner-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.cta-banner-actions .btn-primary {
  background: #ffffff;
  color: #1d4ed8;
  border-color: #ffffff;
}

.cta-banner-actions .btn-primary:hover {
  background: #f0f4ff;
  border-color: #f0f4ff;
}

.cta-banner-actions .btn-ghost {
  color: #ffffff;
  border-color: rgba(255,255,255,0.5);
}

.cta-banner-actions .btn-ghost:hover {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.7);
}

/* ============================================================
   RESPONSIVE - Homepage
   ============================================================ */
@media (max-width: 1024px) {
  .hero-v2-inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .hero-v2-title {
    font-size: 2.4rem;
  }
  .hero-cards-float {
    grid-template-columns: repeat(3, 1fr);
  }
  .why-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .cat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .hero-v2 {
    padding: 48px 0 40px;
  }
  .hero-v2-title {
    font-size: 1.9rem;
  }
  .hero-cards-float {
    grid-template-columns: 1fr 1fr;
  }
  .why-grid {
    grid-template-columns: 1fr;
  }
  .cat-grid {
    grid-template-columns: 1fr;
  }
  .cta-banner {
    padding: 32px 24px;
    flex-direction: column;
    text-align: center;
  }
  .cta-banner-actions {
    justify-content: center;
  }
}

/* ============================================================
   NEWSLETTER
   ============================================================ */
.newsletter-section {
  padding: 72px 0;
  background: var(--bg-primary);
}

.newsletter-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 48px 56px;
  display: flex;
  align-items: center;
  gap: 48px;
  flex-wrap: wrap;
  box-shadow: var(--shadow-card);
}

.newsletter-left {
  display: flex;
  align-items: center;
  gap: 24px;
  flex: 1;
  min-width: 260px;
}

.newsletter-icon {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  color: #fff;
  flex-shrink: 0;
}

.newsletter-title {
  font-family: var(--font-head);
  font-size: 1.4rem;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.newsletter-sub {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

.newsletter-form {
  flex: 1;
  min-width: 280px;
}

.newsletter-input-wrap {
  display: flex;
  gap: 10px;
  margin-bottom: 8px;
}

.newsletter-input {
  flex: 1;
  padding: 10px 16px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill);
  background: var(--bg-input);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.newsletter-input:focus {
  border-color: var(--brand-color);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.newsletter-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  flex-shrink: 0;
}

.newsletter-note {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.newsletter-success {
  font-size: 0.875rem;
  color: #16a34a;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
}

@media (max-width: 768px) {
  .newsletter-card {
    padding: 32px 24px;
    flex-direction: column;
    gap: 28px;
  }
  .newsletter-input-wrap {
    flex-direction: column;
  }
  .newsletter-btn {
    width: 100%;
    justify-content: center;
  }
}

/* ============================================================
   HERO CHEAT SHEET DECK
   ============================================================ */
.hero-card-deck {
  position: relative;
  width: 100%;
  max-width: 420px;
  height: 380px;
  margin: 0 auto;
}

.hero-deck-card {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  max-width: 360px;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  padding: 24px;
  box-shadow: var(--shadow-card);
  transform-origin: center center;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.hdc-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  font-family: var(--font-head);
  font-size: 1.1rem;
  color: var(--text-primary);
}

.hdc-header i {
  font-size: 1.6rem;
}

.hdc-body {
  font-family: var(--font-code);
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.hdc-body pre {
  margin: 0;
  padding: 16px;
  background: var(--bg-input);
  border-radius: 8px;
  border: 1px solid var(--border);
  color: var(--text-primary);
  overflow-x: auto;
  white-space: pre;
  -ms-overflow-style: none;  /* IE and Edge */
  scrollbar-width: none;  /* Firefox */
}

.hdc-body pre::-webkit-scrollbar {
  display: none;
}

/* Syntax Highlighting */
.syn-keyword { color: #c678dd; }
.syn-func { color: #61afef; }
.syn-num { color: #d19a66; }
.syn-comment { color: #5c6370; font-style: italic; }

[data-theme="light"] .syn-keyword { color: #a626a4; }
[data-theme="light"] .syn-func { color: #4078f2; }
[data-theme="light"] .syn-num { color: #986801; }
[data-theme="light"] .syn-comment { color: #a0a1a7; }

.hdc-line {
  height: 8px;
  background: var(--border-strong);
  border-radius: 4px;
  margin-bottom: 12px;
  width: 100%;
}
.hdc-line.short {
  width: 60%;
}

.hero-deck-card.card-3 {
  transform: translate(-50%, -50%) translate(-20px, -40px) rotate(-6deg) scale(0.9);
  z-index: 1;
}

.hero-deck-card.card-2 {
  transform: translate(-50%, -50%) translate(10px, -20px) rotate(3deg) scale(0.95);
  z-index: 2;
}

.hero-deck-card.card-1 {
  transform: translate(-50%, -50%) translate(0, 0) rotate(0deg) scale(1);
  z-index: 3;
}

/* Add a transparent hit area to prevent jitter */
.hero-card-deck::before {
  content: "";
  position: absolute;
  top: -60px; right: -60px; bottom: -60px; left: -60px;
  z-index: 10;
}

.hero-card-deck:hover .card-3 {
  transform: translate(-50%, -50%) translate(-60px, -70px) rotate(-12deg) scale(0.9);
}

.hero-card-deck:hover .card-2 {
  transform: translate(-50%, -50%) translate(40px, -35px) rotate(10deg) scale(0.95);
}

.hero-card-deck:hover .card-1 {
  transform: translate(-50%, -50%) translate(0, 15px) rotate(0deg) scale(1.02);
}

@media (max-width: 640px) {
  .hero-card-deck {
    transform: scale(0.85);
  }
}

/* ============================================================
   FOOTER NEWSLETTER
   ============================================================ */
.footer-newsletter-premium {
  position: relative;
  margin-bottom: 48px;
  border-radius: 24px;
  padding: 40px;
  background: #0f111a;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 20px 40px rgba(0,0,0,0.15);
  overflow: hidden;
  display: flex;
  justify-content: center;
}

/* Vibrant glowing background mesh effect (always visible) */
.fn-premium-bg {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(circle at top right, rgba(37,99,235,0.2), transparent 50%),
              radial-gradient(circle at bottom left, rgba(124,58,237,0.2), transparent 50%);
  pointer-events: none;
  z-index: 1;
}

.fn-premium-content {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  width: 100%;
}

.fn-premium-text {
  flex: 1;
}

.fn-premium-text h3 {
  font-family: var(--font-head);
  font-size: 1.5rem;
  color: #ffffff;
  margin-bottom: 8px;
}

.fn-premium-text p {
  color: #94a3b8;
  font-size: 0.95rem;
}

.fn-premium-form {
  display: flex;
  gap: 12px;
  flex: 1;
  max-width: 480px;
  position: relative;
}

.fn-premium-form input {
  flex: 1;
  padding: 14px 20px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(0, 0, 0, 0.4);
  color: #ffffff;
  font-family: var(--font-body);
  font-size: 1rem;
  transition: all 0.2s ease;
  outline: none;
}

.fn-premium-form input::placeholder {
  color: #64748b;
}

.fn-premium-form input:focus {
  border-color: var(--brand-color);
  box-shadow: 0 0 0 4px rgba(37,99,235,0.2);
  background: rgba(0, 0, 0, 0.6);
}

.fn-premium-form button {
  padding: 0 24px;
  border-radius: 12px;
  background: var(--brand-color);
  color: #ffffff;
  font-weight: 600;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  transition: transform 0.2s ease, opacity 0.2s ease, box-shadow 0.2s ease;
}

.fn-premium-form button:hover {
  opacity: 0.9;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(37,99,235,0.3);
}

.newsletter-success {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 8px;
  font-size: 0.85rem;
  color: #16a34a;
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
}

@media (max-width: 768px) {
  .fn-premium-content {
    flex-direction: column;
    text-align: center;
    gap: 24px;
  }
  .fn-premium-form {
    flex-direction: column;
    width: 100%;
  }
  .fn-premium-form button {
    padding: 14px;
  }
}

/* ============================================================
   SETTINGS PAGES (Cybersecurity Theme)
   ============================================================ */
.settings-page {
  display: flex;
  max-width: 1100px;
  margin: 40px auto;
  gap: 32px;
  padding: 0 16px;
  min-height: 60vh;
}

.settings-sidebar {
  width: 280px;
  flex-shrink: 0;
}

.settings-sidebar-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 32px;
}

.avatar-circle.large {
  width: 64px;
  height: 64px;
  font-size: 1.5rem;
  box-shadow: 0 0 15px rgba(37, 99, 235, 0.4);
}

.settings-sidebar-header .user-info h3 {
  margin: 0;
  font-family: var(--font-head);
  color: var(--text-primary);
  font-size: 1.1rem;
}

.settings-sidebar-header .user-info p {
  margin: 4px 0 0;
  color: var(--accent);
  font-size: 0.85rem;
  font-family: var(--font-code);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.settings-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.settings-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: var(--radius);
  transition: all 0.2s;
  font-weight: 500;
}

.settings-nav a i {
  font-size: 1.1rem;
}

.settings-nav a:hover {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.settings-nav a.active {
  background: rgba(37, 99, 235, 0.1);
  color: var(--accent);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.settings-content {
  flex: 1;
}

.settings-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow-card);
}

[data-theme="dark"] .settings-card {
  border: 1px solid var(--border-strong);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.settings-card.danger-zone {
  border-top: 3px solid #e11d48;
}

.settings-card .card-header {
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.settings-card .card-header h2 {
  font-family: var(--font-head);
  margin: 0 0 8px 0;
}

.settings-card .card-header p {
  color: var(--text-muted);
  margin: 0;
  font-size: 0.95rem;
}

.settings-form .form-group {
  margin-bottom: 24px;
}

.settings-form label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--text-primary);
}

.settings-form small {
  display: block;
  margin-top: 6px;
  color: var(--text-muted);
  font-size: 0.8rem;
}

.hacker-input {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-input);
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  color: var(--text-primary);
  font-family: var(--font-code);
  font-size: 0.95rem;
  transition: all 0.2s;
}

.hacker-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

[data-theme="dark"] .hacker-input {
  background: #121212;
  border-color: #333;
}

[data-theme="dark"] .hacker-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 10px rgba(62, 166, 255, 0.2);
}

.form-actions {
  margin-top: 32px;
  display: flex;
  justify-content: flex-end;
}

.btn-neon {
  padding: 12px 24px;
  background: var(--accent);
  color: var(--text-on-accent);
  border: none;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-neon:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.5);
}

.btn-neon.text-danger {
  background: transparent;
  border: 1px solid #e11d48;
  color: #e11d48;
  box-shadow: none;
}

.btn-neon.text-danger:hover {
  background: rgba(225, 29, 72, 0.1);
  box-shadow: 0 0 12px rgba(225, 29, 72, 0.3);
}

@media (max-width: 768px) {
  .settings-page {
    flex-direction: column;
  }
  .settings-sidebar {
    width: 100%;
  }
}
