/* ==========================================================================
   5-BREAKPOINT RESPONSIVE CSS WITH AD PLACEMENT SYSTEM
   ==========================================================================
   Breakpoints:
   - Base (< 480px): Mobile-first foundation
   - 480px: Large mobile devices
   - 768px: Tablets (most important)
   - 1024px: Desktop (most important)
   - 1280px: Large desktop
   - 1440px: Extra large screens
   ========================================================================== */

/* Basic Reset & Variables */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Saira:ital,wght@0,100..900;1,100..900&display=swap');

:root {
  /* Colors */
  --dark-bg: #020617;
  --dark-gray: #090f20;
  --dark-blue: #090f20;
  --light-text: #ccc;
  --secondary-bg: #2a2a2a;
  --accent-blue: #007bff;
  --accent-blue-hover: #0056b3;
  --transition-speed: 0.3s;
  --border-radius: 5px;
  --bg-secondary: #16161D;
  --border-color: #3b3f54;
  --project-heading-color: #007bff;
  --prerequisites-icon-color: #28a745;
  --prerequisites-list-icon-color: #f7df1e;
  --code-bg: #111827;
  --code-border: #2d3748;
  --code-text: #e5e7eb;
  --code-line-number-bg: #1a1a1a;
  --code-line-number-color: #888;
  --sidebar-bg: #1a1a1a;
  --sidebar-border: #333;
  --tag-python: #ffd43b;
  --tag-ml: #00BCD4;
  --tag-ai: #8A2BE2;
  --program: #f57c00;
  --color-pink: #e34f26;
  --tag-react: #61dafb;
  --tag-webdev: #17a2b8;
  --color-purple: #5e11e3;
  --accent-cyan: #00D9FF;
  --accent-magenta: #FF0080;
  --yellow: #f8c555;
  --pink: #cc99cd;
  --green: #7ec699;
  --orange: #f08d49;
  --blue: #67cdcc;
  --color-red: #dc2626;
  --legend-bg: #222;
  --legend-border: #444;
  --terminal-prompt: #00ccff;
  --terminal-border: #333;
  --terminal-output: #fff;
  --transition-speed: 0.3s;

  --color-pink: #f97316;
  --color-blue: #1673bd;
  --color-red: #dc2626;
  --color-green: #00ff00;
  --color-purple: #5e11e3;
  --color-pink: #B9375D;
  --color-navy: #1347b7;
  --accent-cyan: #00D9FF;
  --accent-magenta: #FF0080;
  --color-yellow: #FFAA00;

  /* Base Typography (Mobile-first: < 480px) */
  --font-p: 14px;
  --font-h1: 1.5rem;
  --font-h2: 1.2rem;
  --font-h3: 1.08rem;
  --font-h4: 1.04rem;
  --font-li: 14px;
  --font-a: 14px;
  --font-i: 13.5px;
  --font-table: 14px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Saira", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--dark-bg);
  color: var(--light-text);
  line-height: 1.8;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  margin: 0;
}

p {
  font-size: var(--font-p);
  /* font-weight: 500; */
  color: #cccccc;
}

li {
  font-size: var(--font-li);
  color: #cccccc;
}

a {
  font-size: var(--font-a);
}

i, pre, code.code {
  font-size: var(--font-i);
}

table {
  font-size: var(--font-table);
  font-weight: 400;
}

h1 {
  font-size: var(--font-h1);
  font-weight: 700;
  color: var(--color-pink);
  border-bottom: 1px solid var(--color-pink);
}

h2 {
  font-size: var(--font-h2);
  font-weight: 700;
  border-bottom: 1px solid var(--color-pink);
  padding-bottom: 20px;
}

h3 {
  font-size: var(--font-h3);
  font-weight: 600;
  color: var(--accent-blue);
}

h4 {
  font-size: var(--font-h4);
  color: #ff0000;        
  font-weight: 600;
}

hr {
  border: 0;
  height: 1px;
  background-color: var(--color-pink);
  margin: 20px 0 10px 0;
}

/* .isolated-code {
  color: #8ACFF8;
} */


strong {
  color: #f0f0f0;
  font-weight: 600;
}

.container {
  max-width: 100%;
  width: 100%;
  margin: 0 auto;
  padding: 0 10px;
}

/* ==========================================================================
   NAVBAR (Glassmorphic, Sticky, Accessible)
   ========================================================================== */

.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(1, 13, 24, 0.90);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.45);
  padding: 10px 0;
  transition: background-color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.navbar .container {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
}

.navbar .logo {
  display: flex;
  align-items: center;
  font-size: 1.15rem;
  font-weight: 700;
  color: #FFFFFF;
  width: 100%;
  justify-content: space-between;
}

.logo-link {
  text-decoration: none;
  color: inherit;
  display: inline-flex;
  align-items: center;
}

.logo-link:focus-visible {
  outline: 2px solid #19BAAF;
  outline-offset: 3px;
  border-radius: 4px;
}

.logo-text {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-text img {
  width: 26px;
  height: 26px;
  border-radius: 4px;
}

/* Typewriter cursor */
.typewriter {
  font-family: "Saira", sans-serif;
  white-space: pre;
  position: relative;
  font-weight: 600;
  color: #FFFFFF;
  letter-spacing: -0.01em;
}
.typewriter::after {
  content: "_";
  margin-left: 2px;
  color: #ff7828;
  animation: blink 1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .typewriter::after { animation: none; } }

/* Mobile Menu Toggle Button */
.menu-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(21, 30, 44, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  color: #F5F8FC;
  cursor: pointer;
  padding: 0;
  font-size: 1.1rem;
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}
.menu-toggle:hover {
  background: rgba(30, 42, 60, 0.95);
  border-color: rgba(25, 186, 175, 0.5);
  color: #19BAAF;
}
.menu-toggle:focus-visible {
  outline: 2px solid #19BAAF;
  outline-offset: 2px;
}

/* Slide-out Navigation Drawer on Mobile */
.nav-links {
  display: flex;
  flex-direction: column;
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background: rgba(9, 23, 38, 0.98);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.65);
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
}
.nav-links.active {
  max-height: 480px;
  opacity: 1;
}

.navbar nav ul {
  display: flex;
  flex-direction: column;
  list-style: none;
  margin: 0;
  padding: 12px 16px 16px;
  gap: 6px;
}

/* Nav Link Item Styling */
.navbar nav ul li a.nav-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #B7C1CB;
  padding: 10px 14px;
  width: 100%;
  min-height: 44px;
  border-radius: 6px;
  text-decoration: none;
  font-family: "Saira", sans-serif;
  font-weight: 600;
  font-size: 0.94rem;
  letter-spacing: 0.01em;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.navbar nav ul li a.nav-item:hover {
  color: #FFFFFF;
  background-color: rgba(255, 255, 255, 0.06);
}

.navbar nav ul li a.nav-item:focus-visible {
  outline: 2px solid #19BAAF;
  outline-offset: 2px;
}

/* Subtle category accents on hover */
.navbar nav ul li a.nav-item.home:hover        { color: #facc15; background-color: rgba(250, 204, 21, 0.1); }
.navbar nav ul li a.nav-item.projects:hover    { color: #c084fc; background-color: rgba(192, 132, 252, 0.1); }
.navbar nav ul li a.nav-item.programming:hover { color: #ff7828; background-color: rgba(255, 120, 40, 0.1); }
.navbar nav ul li a.nav-item.hacking:hover     { color: #34d399; background-color: rgba(52, 211, 153, 0.1); }
.navbar nav ul li a.nav-item.networking:hover  { color: #38bdf8; background-color: rgba(56, 189, 248, 0.1); }
.navbar nav ul li a.nav-item.ai:hover          { color: #F472B6; background-color: rgba(236, 72, 153, 0.12); }

/* AI Focus Badge in Navigation */
.nav-badge-ai {
  display: inline-flex;
  align-items: center;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(236, 72, 153, 0.22);
  color: #F472B6;
  border: 1px solid rgba(236, 72, 153, 0.45);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Primary Conversion CTA Link (Resources / Hub) */
.nav-cta-item {
  margin-top: 6px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.navbar nav ul li a.nav-cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 44px;
  padding: 10px 18px;
  font-family: "Saira", sans-serif;
  font-size: 0.92rem;
  font-weight: 700;
  color: #ff7828;
  background: rgba(229, 68, 21, 0.12);
  border: 1px solid rgba(229, 68, 21, 0.4);
  border-radius: 6px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.navbar nav ul li a.nav-cta-btn:hover {
  background: #E54415;
  color: #FFFFFF;
  border-color: #E54415;
  box-shadow: 0 4px 16px rgba(229, 68, 21, 0.35);
}

.navbar nav ul li a.nav-cta-btn:focus-visible {
  outline: 2px solid #E54415;
  outline-offset: 2px;
}

/* ==========================================================================
   MAIN CONTENT LAYOUT (Mobile-first: Single column)
   ========================================================================== */

.main-content-wrapper {
  display: flex;
  flex-direction: column;
  width: 100%;
  margin: 0 auto;
  padding: 30px 0;
}

.left-column,
.right-column {
  padding: 0 10px;
}

.right-column img {
  width: 100%;
  height: 100%;
}

/* ==========================================================================
   CONTENT SECTIONS
   ========================================================================== */

.tutorial-details-section,
.prerequisites-section,
.table-of-contents-section,
.implementation-section,
.about-website,
.related-topics,
.related-tags,
.conclusion-section,
.experience-section {
  background-color: var(--dark-gray);
  padding: 20px;
  border-radius: 5px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  margin-bottom: 20px;
  border: 1px solid var(--color-pink);
}

.tutorial-details-section h1 {
  margin-bottom: 15px;
  text-align: center;
  position: relative;
  padding-bottom: 10px;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 1), 2px 2px 4px rgba(0, 0, 0, 0.8), 3px 3px 6px rgba(0, 0, 0, 0.6);
}

.tutorial-details-section h1::after,
.prerequisites-section h2::after,
.table-of-contents-section h2::after,
.implementation-section h2::after,
.conclusion-section h2::after {
  content: "";
  position: absolute;
  width: 100%;
  height: 0.2px;
  background-color: var(--color-pink);
  left: 0;
  bottom: 0;
  border-radius: 2px;
}

.image-placeholder {
    width: 100%;
    padding-bottom: 56.25%;
    position: relative;
    margin: 15px 0;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
}

.image-placeholder img {
    position: absolute;
    top: 50%;
    left: 50%;
    height: 100%;
    object-fit: cover;
    border-radius: 5px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    transform: translate(-50%, -50%);
    padding: 10px 0;
    transition: transform 0.3s ease;
}

.card-image img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 5px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    margin: 10px 0;
    border: 1px solid var(--border-color);
}

.tutorial-details-section .image-placeholder:hover {
    border: 1px solid var(--tag-ai);
}

.tutorial-details-section .image-placeholder img:hover {
    transform: translate(-50%, -50%) scale(1.05);
}

.tutorial-details-section .list ul li {
    margin-right: 20px;
}

.tutorial-details-section ul,
.implementation-section .list ol{
    margin-left: 1.5rem !important;
}

.prerequisites-section h2,
.table-of-contents-section h2,
.implementation-section h2,
.conclusion-section h2 {
  color: #28a745;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  position: relative;
  gap: 0.5rem;
  padding-bottom: 10px;
  text-align: left;
}

.link {
  color: var(--accent-cyan);
  text-decoration: dotted underline;
}

.link:hover {
  text-decoration: underline;
}

.pro-tip {
  background: #090f20;
  margin: 10px 0;
  padding: 10px 15px;
  border: 1px solid var(--color-pink);
  border-left-width: 5px;
  border-radius: 5px 0 0 5px;
}

.tip {
  border-left: 5px solid var(--color-pink);
  padding-left: 20px;
}

.other-work-section {
  border: 1px solid var(--color-pink);
  padding: 10px 20px;
  border-radius: 5px;
  background: var(--dark-gray);
  margin-bottom: 20px;
  margin-top: 20px;
}

.other-work-section h2 {
  border: 2px solid var(--color-pink);
  background: #e2802b57;
  padding: 5px;
  color: var(--light-text);
  margin-bottom: 1rem;
  text-align: center;
  border-radius: 5px;
  text-transform: uppercase;
}

.prerequisites-section h2 i,
.table-of-contents-section h2 i,
.implementation-section h2 i {
  color: var(--prerequisites-icon-color);
  margin-right: 0;
}

.table-of-contents-section h2 i {
  color: var(--accent-blue);
}

.prerequisites-section ul {
  padding: 0;
  margin: 0;
}

.prerequisites-section ul li {
  color: #e5e7eb;
  margin-bottom: 0.4rem;
  position: relative;
  bottom: 1px;
  display: flex;
  align-items: center;
}

.prerequisites-section ul li i {
  flex-shrink: 0;
}

.prerequisites-section ul li .fa-code {
  color: rgb(179, 0, 211);
}

.prerequisites-section ul li .fa-python {
  color: var(--accent-blue);
}

.prerequisites-section ul li .fa-image {
  color: #D50B8B;
}

.table-of-contents-section ol {
  list-style: decimal;
  padding-left: 20px;
}

.table-of-contents-section ol li {
  color: #ccc;
  margin-bottom: 8px;
}

.table-of-contents-section ol li a {
  text-decoration: none;
  color: var(--light-text);
  transition: color 0.3s ease;
}

.table-of-contents-section ol li a:hover {
  color: var(--color-pink);
  text-decoration: underline;
  text-underline-offset: 5px;
}

/* ==========================================================================
   IMPLEMENTATION SECTION
   ========================================================================== */

.implementation-code-section {
  display: flex;
  flex-direction: column;
}

.implementation-section .list a,
.implementation-section .link {
  color: #3396D3;
  text-decoration: dotted underline;
  text-underline-offset: 5px;
  transition: color 0.3s ease;
}

.implementation-section .list a:hover,
.implementation-section .link:hover {
  color: var(--accent-blue);
  text-decoration: underline;
}

.implementation-section h4 {
  /* font-weight: 600; */
  /* color: #DC143C; */
  margin-top: 5px;
}

.implementation-section .sub {
  margin-bottom: 5px;
  /* margin-top: 10px; */
}

.implementation-section strong.subtitle {
  text-decoration: underline;
  text-underline-offset: 5px;
}

.implementation-section .list ul li::marker {
  color: var(--color-pink);
}

.implementation-section .list ul
  {
    padding-left: 20px;
    margin-bottom: 10px;
  }

.tutorial-details-section .list ul {
  list-style-type: disc;
}

.tutorial-details-section .list ul li::before {
  content: "";
}

.implementation-section ul li,
ol li {
  margin-bottom: 3px;
  color: #ccc;
  position: relative;
}

.implementation-section .bottom ul li {
  margin-bottom: 0;
}

.nested-list ol li::before {
  content: "";
}

.list .nested-list ul li::before {
  content: "\2022";
}

/* .list ul li::before {
  font-family: "Font Awesome 6 Free";
  content: "#";
  margin-right: 10px;
  color: var(--tag-ai);
  font-weight: 600;
} */

.nested-list ol li::marker {
  color: #00ccff;
}

.nested-list ul li::marker {
  color: #00ccff;
  list-style-type: disc;
}

/* .nested-list {
  padding-left: 15px;
} */

/* ==========================================================================
   CODE BLOCKS & TERMINAL
   ========================================================================== */

.code-terminal-container {
  background-color: var(--code-bg);
  border-radius: 5px;
  box-shadow: 0 10px 15px rgba(0, 0, 0, 0.5);
  padding: 1rem;
  width: 100%;
  border: 1px solid var(--accent-blue-hover);
}

.code-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.code-title,
.explanation .section h3 {
  color: var(--accent-blue);
}

.language-label {
  font-weight: 600;
  color: #9ca3af;
  font-size: 0.8rem;
}

.copy-button {
  background-color: var(--color-pink);
  color: white;
  padding: 0.3rem 0.6rem;
  border-radius: 5px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  border: none;
  cursor: pointer;
  transition: background-color 0.3s ease-in-out, transform 0.3s ease-in-out;
  font-size: 0.8rem;
}

.copy-button:hover {
  background-color: var(--program);
  transform: translateY(-1px);
}

.copy-button:active {
  transform: translateY(0);
}

span.yellow { color: yellow; }
span.pink { color: var(--pink); }
span.green { color: green; }
span.red { color: red; }
span.blue { color: lightskyblue; }

i.fab.fa-python {
  color: #3776AB;
}

i.fab.fa-python:hover {
  color: #FFD43B;
}

pre {
  border-radius: 5px;
  color: var(--code-text);
  font-family: "Fira Code", "Ubuntu Mono", "DejaVu Sans Mono", "Consolas", "Courier New", monospace;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  transform: translateZ(0);
  backface-visibility: hidden;
  margin-bottom: 10px;
  overflow: auto;
  margin-top: 5px;
  cursor: pointer;
  padding-left: 10px;
  font-weight: 400;
}

pre.bg-color {
  border-radius: 5px;
  background-color: var(--dark-bg);
  color: var(--terminal-prompt);
  border: 1px solid var(--terminal-border);
  margin: 10px 0;
  overflow-x: auto;
}

code span {
  color: #23e5bb;
  font-weight: 350;
}

.text-diagram.explanation {
  padding-top: 5px;
  background-color: var(--dark-bg); 
  color: #e5e7eb;
  border-radius: 5px;
  overflow-x: auto;
  font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', 'monospace';
  line-height: 1.5;
  border: 1px solid var(--code-border);
  font-size: 0.87rem;
  font-weight: 500;
  margin: 10px 0 10px 0;

}

.code-snippet-switcher {
    margin: 1.2rem 0;
    width: 100%;
}

.code-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: -12px; /* Pulls tabs closer to the code block */
}

.code-tab-btn {
    padding: 8px 16px;
    background-color: #0f172a; 
    color: #94a3b8;
    border: 1px solid #334155;
    border-bottom: none;
    border-radius: 6px 6px 0 0;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.2s ease-in-out;
}

.code-tab-btn:hover {
    color: #f8fafc;
    background-color: #1e293b;
}

.code-tab-btn.active {
    background-color: #1e293b; /* Matches the background of the code block */
    color: #3b82f6; /* Accent color for active state */
    border-color: #334155;
}

.code-block.no-line-number  {
  background-color: #131c2e; 
  color: #e5e7eb;
  border-radius: 5px;
  overflow-x: auto;
  font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', 'monospace';
  line-height: 1.5;
  border: 1px solid var(--code-border);
  font-size: 0.87rem;
  font-weight: 500;
  margin: 10px 0 10px 0;
}

.code-block.no-line-number .language-bash {
    margin-left: 20px;
}

.code-block{
  background-color: #131c2e;    /* 131c2e */
  color: #e5e7eb;
  border-radius: 5px;
  overflow-x: auto;
  font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', 'monospace';
  line-height: 1.5;
  border: 1px solid var(--code-border);
  font-size: 0.87rem;
  font-weight: 500;
  margin: 10px 0 10px 0;
}

pre[class*=language-] {
  padding: 0;
}

.code-block.block {
  background: var(--dark-bg);
}

.code-block.display {
  background-color: var(--dark-bg);
}

.code-block pre.line-numbers,
.explanation pre.line-numbers {
  counter-reset: line-counter;
  white-space: pre;
  position: relative;
  margin: 0;
  padding-top: -2px;
}

:not(pre)>code.inline[class*="language-"] {
  background: transparent;
}

li pre.code {
  background-color: transparent;
  border: none;
}

.explanation pre.code {
  background-color: transparent;
  padding: 5px 0;
  margin-top: 0;
}

.code-block p {
  padding: 5px 0 5px 20px;
  color: #f0f0f0;
  border-bottom: 1px solid var(--code-border);
  width: 100%;
  background: var(--dark-gray);
}

.code-block pre.line-numbers code .line,
.explanation pre.line-numbers code .line {
  position: relative;
  display: block;
  line-height: 1.5;
}

.code-block pre.line-numbers code .line::before,
.explanation pre.line-numbers code .line::before {
  content: counter(line-counter);
  counter-increment: line-counter;
  position: absolute;
  left: -40px;
  top: 0;
  width: 35px;
  text-align: right;
  color: var(--code-line-number-bg);
  padding-right: 8px;
  border-right: 1px solid var(--code-border);
  background-color: #1a1a1a;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  box-sizing: border-box;
}

.code {
  background-color: #131c2e;
  padding: 3px 5px;
  border-radius: 5px;
  word-break: break-all;
  color: #D73A49;
}

.code-main {
  background-color: #131c2e;
  padding: 3px 5px;
  border-radius: 5px;
  color: var(--tag-python);
  word-break: break-all;
}

.copy-feedback {
  margin-top: 8px;
  color: var(--light-text);
  display: none;
}

.copy-feedback.show {
  display: block;
}

div.output {
  border: 1px solid var(--code-border);
  margin: 5px 0 10px 0;
  border-radius: 5px;
  overflow-x: auto;
}

.output .output-text {
  border-top: 1px solid var(--code-border);
  background-color: #131c2e;
  padding: 7px 15px;
  border-bottom-left-radius: 5px;
  border-bottom-right-radius: 5px;
  font-family: Inter var, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji;
}

div.output .output-heading {
  border-top-left-radius: 5px;
  border-top-right-radius: 5px;
  margin-left: 15px;
}

.explanation {
  margin-bottom: 10px;
}

.quote {
    border-left: 5px solid #E11A45;
    padding-left: 15px;
    margin: 10px 0;
}

/* ==========================================================================
   FILE TREE
   ========================================================================== */

.file-tree {
  padding: 20px;
  border-radius: 5px;
  border: 1px solid #0056b3;
  font-family: 'Fira Code', 'JetBrains Mono', monospace;
  overflow-x: auto;
  position: relative;
}

.file-tree p {
  padding: 0;
  margin: 0;
}

.indent-1 { margin-left: 20px; }
.indent-2 { margin-left: 40px; }
.indent-3 { margin-left: 60px; }

.folder-name { color: #8aff8a; }
.file-name { color: #61dafb; }
.tree-connector { color: #5c6370; }

.download-all-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 8px;
  background: linear-gradient(60deg, #4CAF50, #007bff);
  color: white;
  border: none;
  border-radius: 5px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 8px 25px rgba(76, 175, 80, 0.3);
  position: relative;
  overflow: hidden;
  margin-top: 10px;
  margin-bottom: 20px;
  font-size: 0.6rem;
}

.file-tree button {
  position: absolute;
  right: 10px;
  top: 5px;
}

.download-all-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 35px rgba(76, 175, 80, 0.4);
}

.download-all-btn:active {
  transform: translateY(-1px);
}

.explanation .section img {
  width: 100%;
  height: 100%;
  background-image: transparent;
}

.explanation pre {
  /* background-color: #070a16; */
  /* padding: 5px 0; */
  margin-top: 5px;
  margin-bottom: 5px;
  padding: 5px 0 5px 15px;
  /* border: 1px solid var(--code-border); */
}

.explanation ul {
  padding: 0 1.5rem;
}

.explanation h4 {
  margin-bottom: 5px;
  padding: 3px;
}

.explanation.html p span { color: var(--color-pink); }
.explanation.css p span { color: var(--accent-blue); }
.explanation.js p span { color: var(--tag-python); }

/* ==========================================================================
   TABLES
   ========================================================================== */

table {
  width: 100%;
  border-collapse: collapse;
  margin: 10px 0 10px 0;
  /* background-color: #1f2a3e; */
}

th, td {
  border: 2px solid var(--code-line-number-bg);
  padding: 10px;
  text-align: left;
}

th {
  background-color: var(--dark-bg);
  /* color: #e0e0e0; */
  font-weight: 500;
}

.table-container {
    overflow: auto;
}

/* ==========================================================================
   CONCLUSION SECTION
   ========================================================================== */

.conclusion-section p a {
  color: var(--accent-blue);
  transition: color 0.3s ease;
}

.conclusion-section p a:hover {
  color: var(--color-pink);
}

.source-code {
  background: linear-gradient(to right, #ff416c, #42279d);
  color: white;
}

.download {
  background: linear-gradient(to right, #b7b70d, #11a411);
}

.source-code:hover {
  background: linear-gradient(to right, #963a4f, #4a368b);
  transform: translateY(-2px);
}

.download:hover {
  background: linear-gradient(to right, #b7b70ddd, #11a411d1);
  transform: translateY(-2px);
}

/* ==========================================================================
   NEXT MODULE SECTION
   ========================================================================== */

.next {
  border: 1px solid var(--color-pink);
  padding-top: 10px;
  border-left: 5px solid var(--color-pink);
  border-radius: 5px;
  background-color: rgba(0, 102, 255, 0.05);
  position: relative;
  margin-bottom: 20px;
  padding-left: 15px;
}

.next .header h3 {
  color: var(--color-pink);
  margin: 0;
}

.next .header {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
}

.next .header p {
  background-color: var(--color-pink);
  padding-left: 10px;
  padding-right: 40px;
  border-top-left-radius: 5px;
  border-bottom-left-radius: 5px;
  margin-left: 20px;
}

.next .content {
  padding-bottom: 40px;
}

.next .content .next-button {
  position: absolute;
  right: 30px;
  bottom: 10px;
  color: #DC143C;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  transition: color 0.3s ease;
}

.next .content .next-button::after {
  content: '➜';
  margin-left: 6px;
  display: inline-block;
  transition: transform 0.3s ease, margin-left 0.3s ease;
}

.next .content .next-button:hover {
  color: #ff0033;
}

.next .content .next-button:hover::after {
  transform: translateX(2px);
  margin-left: 8px;
}

.github-link {
  text-align: center;
  border: 1px solid var(--color-pink);
  padding: 5px;
  background: #f9741663;
}

.github-link a {
  color: #fff;
  font-weight: 600;
}

.github-link a:hover {
  color: var(--color-pink);
}

/* ==========================================================================
   AD PLACEMENT SYSTEM
   ========================================================================== */

/* Ad Block Base Styles */
.ad-block {
  border: 2px dashed var(--legend-border);
  background-color: var(--dark-gray);
  border-radius: 5px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transition: border-color 0.3s ease;
  position: relative;
  overflow: hidden;
  margin-bottom: 20px;
}

.ad-block::before {
  content: "Advertisement";
  position: absolute;
  top: 5px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.ad-block:hover {
  border-color: var(--accent-blue);
}

/* Ad Size Classes - Base (Mobile) */
.ad-block.large {
  width: 100%;
  min-height: 300px;
}

.ad-block.medium {
  width: 100%;
  min-height: 200px;
}

.ad-block.small {
  width: 100%;
  min-height: 90px;
}

.ad-block.banner {
  width: 100%;
  min-height: 60px;
}

.ad-block.square {
  width: 100%;
  max-width: 300px;
  aspect-ratio: 1/1;
  margin: 0 auto;
}

.ad-block.leaderboard {
  width: 100%;
  min-height: 90px;
  max-width: 728px;
  margin: 0 auto;
}

.ad-block.wide-skyscraper {
  display: none; /* Hidden on mobile */
}

/* Ad Position Classes */
.ad-top {
  margin-top: 20px;
  margin-bottom: 30px;
}

.ad-bottom {
  margin-top: 30px;
  margin-bottom: 20px;
}

.ad-sidebar-top {
  margin-bottom: 25px;
}

.ad-sidebar-middle {
  margin: 25px 0;
}

.ad-sidebar-bottom {
  margin-top: 25px;
}

.ad-in-content {
  margin: 30px 0;
}

.ad-sticky {
  position: static; /* Not sticky on mobile */
}

/* In-content Ad Banner */
.ad-banner-in-content {
  border: 2px dashed var(--legend-border);
  width: 100%;
  min-height: 150px;
  background-color: var(--dark-gray);
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 25px 0;
  border-radius: 5px;
  position: relative;
}

.ad-banner-in-content::before {
  content: "Advertisement";
  position: absolute;
  top: 5px;
  font-size: 10px;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Ad Images */
.ad-block img {
  max-width: 100%;
  height: auto;
  border-radius: 5px;
  display: block;
  margin: 0 auto;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

/* Print-friendly: Hide ads when printing */
@media print {
  .ad-block,
  .ad-banner-in-content {
    display: none !important;
  }
}

/* ==========================================================================
   RIGHT COLUMN (SIDEBAR) STYLING
   ========================================================================== */

.about-website h3,
.ad-block h3,
.related-tags h3 {
  color: var(--color-pink);
  margin-bottom: 15px;
  position: relative;
  padding-bottom: 10px;
  text-align: center;
}

.about-website h3::after,
.ad-block h3::after,
.related-tags h3::after {
  content: "";
  position: absolute;
  width: 100%;
  height: 1px;
  background-color: var(--terminal-output);
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  border-radius: 2px;
}

.about-website p {
  color: #ccc;
  text-align: left;
  padding: 10px 0;
}

.about-website .homepage {
  color: #007bff;
  font-weight: 500;
  text-decoration: underline;
}

.about-website .homepage:hover {
  color: var(--accent-blue);
  text-underline-offset: 5px;
}

.typewriter-scan {
  position: relative;
  display: inline-block;
  background: linear-gradient(90deg, var(--accent-blue) 50%, #f0f0f0 50%);
  background-size: 200% 100%;
  background-position: 100% 0;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  transition: background-position 0.8s ease;
}

.typewriter-scan:hover {
  background-position: 0 0;
}

/* ==========================================================================
   RELATED TOPICS
   ========================================================================== */

.related-topics ul {
  list-style: none;
  padding: 0;
  margin-top: 20px;
}

.related-topics ul li {
  border-bottom: 1px solid var(--legend-border);
  padding: 10px 0;
}

.related-topics ul li:last-child {
  border-bottom: none;
}

.related-topics .content li {
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: center;
  text-align: left;
  gap: 10px;
}

.related-topics li a {
  color: var(--light-text);
  text-decoration: none;
  transition: color 0.3s ease;
  display: block;
  padding: 5px 0;
  text-align: left;
}

.related-topics li:last-child {
  margin-bottom: 0;
}

.related-topics li i {
  background: rgba(155, 32, 57, 0.509);
  border-radius: 6px;
  padding: 10px;
  transition: all 0.5s ease;
}

.related-topics li:hover {
  padding-left: 8px;
}

.related-topics li:hover i {
  background: var(--color-pink);
  color: whitesmoke;
  box-shadow: 0 0 15px rgba(201, 38, 90, 0.5);
}

/* Button Styling */
.button-container {
  margin-top: 35px;
  display: flex;
  justify-content: center;
}

.btn-cyber {
  position: relative;
  background: transparent;
  border: none;
  padding: 12px 30px;
  color: white;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  cursor: pointer;
}

.btn-bg {
  position: absolute;
  inset: 0;
  background: var(--color-pink);
  transform: translate(-6px, -6px);
  border-radius: 4px;
  z-index: 1;
  transition: transform 0.2s ease;
}

.btn-border {
  position: absolute;
  inset: 0;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  z-index: 2;
}

.btn-text {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 8px;
}

.related-topics .button-container .btn-cyber a {
  color: whitesmoke;
  text-decoration: none;
}

.btn-cyber:hover .btn-bg {
  transform: translate(0, 0);
}

.blink {
  animation: blinker 1s linear infinite;
}

@keyframes blinker {
  50% { opacity: 0; }
}

/* ==========================================================================
   RELATED TAGS
   ========================================================================== */

.related-tags .tag-container {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 20px;
}

.related-tags .tag {
  color: var(--light-text);
  padding: 8px 15px;
  font-weight: 400;
  transition: background-color var(--transition-speed) ease, transform 0.1s ease;
  cursor: pointer;
  border: none;
}

.related-tags ol {
  padding-left: 20px;
}

.related-tags a {
  text-decoration: none;
}

.related-tags a:hover .tag {
  color: var(--color-purple);
}

/* ==========================================================================
   RAINBOW TEXT & ACTION BUTTONS
   ========================================================================== */

.conclusion-section {
  text-align: left;
  margin-top: 15px;
}

.conclusion-section .last {
  margin-top: 10px;
}

.rainbow-text {
  font-weight: bold;
  background: linear-gradient(45deg,
    #ff0000, #ff8000, #ffff00, #80ff00,
    #00ff00, #00ff80, #00ffff, #0080ff,
    #0000ff, #8000ff, #ff00ff, #ff0080);
  background-size: 400% 400%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: rainbowShift 3s ease-in-out infinite;
  text-shadow: 10px 10px 0 30px rgba(255, 255, 255, 0.3);
}

@keyframes rainbowShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.action-buttons {
  display: flex;
  gap: 15px;
  margin: 20px 0;
  justify-content: center;
  flex-wrap: wrap;
  flex-direction: row;
}

.action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 5px;
  border-radius: 5px;
  font-weight: 400;
  font-size: var(--p);
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 50%;
  max-width: 200px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
  position: relative;
  overflow: hidden;
}

.download-btn {
  background: linear-gradient(60deg, #4CAF50, #007bff);
  color: white;
}

.download-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 35px rgba(76, 175, 80, 0.4);
}

.download-btn:active {
  transform: translateY(-1px);
}

.github-btn {
  background: linear-gradient(to right, #ff416c, #42279d);
  color: white;
}

.github-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(255, 65, 108, 0.4);
}

/* ==========================================================================
   KEY POINTS SECTION
   ========================================================================== */

.key {
  background-color: var(--dark-bg);
  padding: 20px;
  border-radius: 5px;
  margin-top: 20px;
  border: 1px solid var(--code-border);
}

.key h3 {
  color: var(--color-pink);
  position: relative;
  padding-bottom: 8px;
}

.key ul {
  list-style: none;
  padding: 0;
}

.key ul li {
  color: #e5e7eb;
  position: relative;
  padding-left: 10px;
}

.key ul li::marker {
  content: '\2022';
  color: var(--prerequisites-icon-color);
  font-weight: bold;
  display: inline-block;
  width: 1em;
  font-size: 1.3rem;
}

/* ==========================================================================
   MOVING BORDER & PROJECT CARDS
   ========================================================================== */

@property --glow-deg {
  syntax: "<angle>";
  inherits: true;
  initial-value: -90deg;
}

@property --clr-1 { syntax: "<color>"; inherits: true; initial-value: #4285f4; }
@property --clr-2 { syntax: "<color>"; inherits: true; initial-value: #ea4335; }
@property --clr-3 { syntax: "<color>"; inherits: true; initial-value: #fbbc05; }
@property --clr-4 { syntax: "<color>"; inherits: true; initial-value: #34a853; }

.about-website.moving-border {
  --gradient-glow: var(--clr-1), var(--clr-2), var(--clr-3), var(--clr-4), var(--clr-1);
  position: relative;
  padding: 20px;
  background: #1f1f1f;
  border: 3px solid transparent;
  border-radius: 15px;
  background:
    linear-gradient(#1f1f1f 0 0) padding-box,
    conic-gradient(from var(--glow-deg), var(--gradient-glow)) border-box;
  font-size: 16px;
  font-weight: 500;
  color: #e8eaed;
  cursor: pointer;
  isolation: isolate;
  transition: all 0.3s ease;
  animation: breathe-glow 3s ease-in-out infinite;
}

.project-card {
  --gradient-glow: var(--clr-1), var(--clr-2), var(--clr-3), var(--clr-4), var(--clr-1);
  position: relative;
  padding: 20px;
  background: #1f1f1f;
  border: 3px solid transparent;
  border-radius: 5px;
  background:
    linear-gradient(#181818 0 0) padding-box,
    conic-gradient(from var(--glow-deg), var(--gradient-glow)) border-box;
  font-size: 16px;
  font-weight: 500;
  color: #e8eaed;
  cursor: pointer;
  isolation: isolate;
  transition: all 0.3s ease;
  animation: rotate-border 2s linear infinite;
}

@keyframes rotate-border {
  0% { --glow-deg: 0deg; }
  100% { --glow-deg: 360deg; }
}

@keyframes breathe-glow {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 0 rgba(255, 255, 255, 0);
  }
  50% {
    transform: scale(1.03);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
  }
}

.moving-border {
  position: relative;
  cursor: pointer;
  padding: 20px;
  background: #1f1f1f;
  border-radius: 28px;
  border: 3px solid var(--prerequisites-icon-color);
  transition: all 0.3s ease;
}

.moving-border.suggest {
  border: 3px solid var(--accent-blue-hover);
}

.moving-border.error {
  border: 3px solid red;
}

.about-website.moving-border:hover {
  transform: translateY(-2px);
  --glow-intensity: 0.3;
}

.moving-border {
  margin-bottom: 30px;
}

.moving-border:hover {
  transform: scale(1.1);
}

/* ==========================================================================
   OTHER PROJECTS SECTION
   ========================================================================== */

.other-work-section {
  text-align: center;
}

.project-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 25px;
  margin: 20px 0;
}

.project-card p {
  font-weight: 400;
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
}

.project-card img {
  width: 100%;
  height: 150px;
  object-fit: contain;
  display: block;
  border: 2px solid var(--accent-blue);
  border-radius: 5px;
  transition: transform 0.3s ease;
  margin-bottom: 20px;
}

.project-card img:hover {
  transform: scale(1.05);
}

.project-card-content {
  text-align: left;
}

.project-card h4 {
  color: whitesmoke;
  margin-bottom: 10px;
}

.project-card h4:hover {
  color: var(--tag-ai);
}

.project-card h3 {
  color: #ea7029;
  margin-bottom: 10px;
}

.project-card p {
  color: #bbb;
  line-height: 1.5;
  margin-bottom: 15px;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 15px;
}

.project-tag {
  background-color: var(--accent-blue);
  color: #111827;
  padding: 1px 10px;
  border-radius: 5px;
  font-size: 0.85rem;
  font-weight: 500;
}

.view-project-button {
  display: inline-block;
  background-color: var(--color-pink);
  color: whitesmoke;
  padding: 2px 10px;
  border-radius: 5px;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  transition: margin-right 0.3s ease;
  cursor: pointer;
  margin-top: auto;
}

.view-project-button span {
  font-size: 1.1rem;
  display: inline-block;
  transition: transform 0.3s ease;
}

.view-project-button:hover span {
  transform: translateX(5px);
}

/* ==========================================================================
   WALLPAPER & COLOR PALETTE SECTIONS
   ========================================================================== */

.wallpaper,
.color-palette {
  border: 1px solid var(--color-pink);
  padding: 10px;
  margin-bottom: 30px;
  border-radius: 5px;
}

.wallpaper h3,
.color-palette h3,
.related-topics h3 {
  color: var(--terminal-output);
  text-align: center;
  background: var(--color-pink);
}

.wallpaper p,
.color-palette p,
.related-topics p {
  color: #ccc;
  text-align: center;
  margin-bottom: 15px;
  margin-top: 10px;
}

.related-topics p {
  text-decoration-color: var(--color-pink);
  text-decoration: underline;
  text-underline-offset: 5px;
}

.image-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
  max-width: 800px;
  margin: 0 auto;
  margin-bottom: 20px;
}

.image-card img {
  width: 100%;
  border-radius: 10px;
  object-fit: cover;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease;
}

.image-card img:hover {
  transform: scale(1.02);
  border: 1px solid var(--color-pink);
}

.button {
  text-align: center;
  margin-bottom: 10px;
  margin-top: 30px;
}

.button .wallpaper-button,
.button .color-button,
.button .related-button {
  border: 2px dashed var(--color-pink);
  color: #fff;
  padding: 10px 20px;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  text-decoration: none;
  font-size: 0.8rem;
}

.button .wallpaper-button:hover,
.button .color-button:hover,
.button .related-button:hover {
  background-color: var(--color-pink);
}

/* Palette Grid */
.palette-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.palette-card {
  background: var(--bg-secondary);
  border: 1px solid var(--sidebar-bg);
  border-radius: 20px;
  overflow: hidden;
  transition: transform 0.3s ease;
  cursor: pointer;
  position: relative;
}

.palette-card::before {
  content: "";
  position: absolute;
  inset: -2px;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-magenta));
  border-radius: 20px;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -1;
}

.palette-card:hover::before {
  opacity: 0.5;
}

.palette-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

/* Color Wave */
.color-wave {
  height: 180px;
  display: flex;
  position: relative;
  overflow: hidden;
}

.wave-bar {
  flex: 1;
  position: relative;
  transition: var(--transition);
  cursor: pointer;
  transform: scale(1.05);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
  z-index: 10;
}

/* Wave Patterns - 4 Colors */
.color-wave.colors-4 .wave-bar:nth-child(1),
.color-wave.colors-4 .wave-bar:nth-child(4) {
  transform: translateY(-10px);
}

.color-wave.colors-4 .wave-bar:nth-child(2),
.color-wave.colors-4 .wave-bar:nth-child(3) {
  transform: translateY(-35px);
}

.palette-card:hover .color-wave.colors-4 .wave-bar:nth-child(1),
.palette-card:hover .color-wave.colors-4 .wave-bar:nth-child(4) {
  transform: translateY(-20px);
}

.palette-card:hover .color-wave.colors-4 .wave-bar:nth-child(2),
.palette-card:hover .color-wave.colors-4 .wave-bar:nth-child(3) {
  transform: translateY(-45px);
}

/* Wave Patterns - 5 Colors */
.color-wave.colors-5 .wave-bar:nth-child(1),
.color-wave.colors-5 .wave-bar:nth-child(5) {
  transform: translateY(0);
}

.color-wave.colors-5 .wave-bar:nth-child(2),
.color-wave.colors-5 .wave-bar:nth-child(4) {
  transform: translateY(-20px);
}

.color-wave.colors-5 .wave-bar:nth-child(3) {
  transform: translateY(-40px);
}

.palette-card:hover .color-wave.colors-5 .wave-bar:nth-child(1),
.palette-card:hover .color-wave.colors-5 .wave-bar:nth-child(5) {
  transform: translateY(-10px);
}

.palette-card:hover .color-wave.colors-5 .wave-bar:nth-child(2),
.palette-card:hover .color-wave.colors-5 .wave-bar:nth-child(4) {
  transform: translateY(-30px);
}

.palette-card:hover .color-wave.colors-5 .wave-bar:nth-child(3) {
  transform: translateY(-50px);
}

/* Color Code Tooltip */
.wave-bar::after {
  content: attr(data-color);
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: 'Source Code Pro', monospace;
  font-size: 10px;
  font-weight: 600;
  color: white;
  background: rgba(0, 0, 0, 0.9);
  padding: 5px 9px;
  border-radius: 6px;
  opacity: 0;
  transition: opacity 0.3s;
  backdrop-filter: blur(10px);
  white-space: nowrap;
  pointer-events: none;
  z-index: 10;
}

.wave-bar:hover::after {
  opacity: 1;
}

/* Card Info */
.card-info {
  padding: 24px;
  color: var(--terminal-output);
}

.card-title {
  font-size: var(--font-p);
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: 0.5px;
}

.card-tags {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.tag {
  padding: 4px 12px;
  background: rgba(0, 217, 255, 0.1);
  border: 1px solid rgba(0, 217, 255, 0.3);
  border-radius: 6px;
  font-size: 10px;
  color: var(--accent-cyan);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.card-actions {
  display: flex;
  gap: 8px;
}

.card-btn {
  flex: 1;
  padding: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: var(--font-i);
  font-weight: 600;
  font-family: 'Poppins', sans-serif;
  cursor: pointer;
  transition: var(--transition);
}

.card-btn:hover {
  background: var(--surface-hover);
  color: var(--text-primary);
  border-color: var(--accent-cyan);
}

/* ==========================================================================
   SCROLL UP BUTTON
   ========================================================================== */

#scrollUpBtn {
  position: fixed;
  bottom: 65px;
  right: 20px;
  background: none;
  border: none;
  padding: 0;
  width: 40px;
  height: 40px;
  z-index: 999;
  display: none;
  cursor: pointer;
}

.progress-circle {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
  shape-rendering: geometricPrecision;
  backface-visibility: hidden;
  -webkit-font-smoothing: antialiased;
}

.progress-circle .bg {
  fill: #000000;
  stroke: #eee;
  stroke-width: 1;
}

.progress-circle .progress {
  fill: none;
  stroke: var(--color-pink);
  stroke-width: 1;
  stroke-dasharray: 100, 100;
  stroke-linecap: round;
  transition: stroke-dasharray 0.25s ease-out;
}

svg {
  image-rendering: optimizeQuality;
  text-rendering: geometricPrecision;
}

.arrow-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 1.1rem;
  font-family: Arial, Helvetica, sans-serif;
  color: #e5e7eb;
  pointer-events: none;
  cursor: pointer;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */

.footer {
  position: relative;
  width: 100%;
  background: var(--dark-bg);
  min-height: 100px;
  padding: 20px 50px;
  display: flex;
  justify-content: center;
  flex-direction: column;
  align-items: center;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-blue) 50%, transparent 50%);
  background-size: 20px 2px;
  animation: slidingBorder 1s linear infinite;
}

@keyframes slidingBorder {
  0% { background-position: 0 0; }
  100% { background-position: 20px 0; }
}

.menu {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 10px 0;
  flex-wrap: wrap;
  flex-direction: column;
  gap: 10px;
}

.menu-item {
  list-style: none;
}

.menu-link {
  color: #fff;
  margin: 0 10px;
  display: inline-block;
  transition: 0.5s;
  text-decoration: none;
  opacity: 0.75;
}

.menu-link:hover {
  opacity: 1;
  text-decoration: underline;
  text-underline-offset: 5px;
}

.footer p {
    color: #ffffff;
    margin: 15px 0 10px 0;
    font-size: var(--font-p);
    font-weight: 500;
    text-align: center;
}

.footer .contacts {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.footer .contact {
    text-decoration: none;
    color: var(--border-dark);
    display: inline; /* important for transform reliability */
    transition: transform 0.3s ease;
}

.footer .contact:hover {
    transform: translateY(-2px);
    color: var(--text-secondary);
}

.footer .contact.github:hover {
    color: #313647;
}

.footer .contact.instagram:hover {
    color: #E83C91;
}

.footer .contact.linkedin:hover {
    color: #008BFF;
}

.footer .contact.facebook:hover {
    color: #1877F2;
}

.footer .contact.gmail:hover {
    color: #f44336d8;
}

.footer i {
    margin-top: 20px;
    font-size: var(--font-h1);
}
/* ==========================================================================
   BREAKPOINT 1: 480px (Large Mobile)
   ========================================================================== */

@media (min-width: 480px) {
  :root {
    --font-p: 14.5px;
    --font-h1: 1.55rem;
    --font-h2: 1.24rem;
    --font-h3: 1.12rem;
    --font-h4: 1.04rem;
    --font-li: 14.5px;
    --font-a: 14.5px;
    --font-i: 14px;
    --font-table: 14.5px;
  }

  .container {
    max-width: 95%;
    padding: 0 15px;
  }

  .main-content-wrapper {
    padding: 35px 0;
  }

  .navbar .logo {
    font-size: 1.1rem;
  }

  /* Ad adjustments for large mobile */
  .ad-block.large {
    min-height: 350px;
  }

  .ad-block.medium {
    min-height: 250px;
  }

  .ad-block.small {
    min-height: 100px;
  }

  .ad-banner-in-content {
    min-height: 180px;
  }

  #scrollUpBtn {
    width: 42px;
    height: 42px;
    bottom: 67px;
    right: 22px;
  }

  .arrow-overlay {
    font-size: 1.2rem;
  }
}

/* ==========================================================================
   BREAKPOINT 2: 768px (TABLET - Most Important)
   ========================================================================== */

@media (min-width: 768px) {
  :root {
    --font-p: 15px;
    --font-h1: 1.6rem;
    --font-h2: 1.28rem;
    --font-h3: 1.15rem;
    --font-h4: 1.05rem;
    --font-li: 15px;
    --font-a: 15px;
    --font-i: 14px;
    --font-table: 15px;
  }

  .container {
    max-width: 95%;
  }

  .logo img {
    width: 27px;
    height: 27px;
  }

  .main-content-wrapper {
    display: flex;
    flex-direction: column;
    gap: 30px;
    padding: 40px 20px;
  }

  .left-column {
    padding: 0;
  }

  .right-column {
    padding: 0;
  }

  .copy-button {
    padding: 0.5rem 0.85rem;
    font-size: 0.95rem;
  }

  .language-label {
    font-size: 0.9rem;
  }

  /* Tablet Ad Sizes */
  .ad-block.large {
    min-height: 400px;
  }

  .ad-block.medium {
    min-height: 300px;
  }

  .ad-block.small {
    min-height: 120px;
  }

  .ad-block.leaderboard {
    min-height: 90px;
    max-width: 728px;
  }

  .ad-banner-in-content {
    min-height: 200px;
  }

  .action-button {
    padding: 15px 30px;
    font-size: 1.1rem;
  }

  .project-tag {
    font-size: 0.8rem;
  }

  .view-project-button {
    font-size: 0.9rem;
  }

  .button .wallpaper-button,
  .button .color-button,
  .button .related-button {
    font-size: 0.85rem;
  }

  .project-card {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    max-width: 800px;
    gap: 20px;
  }

  .project-card img {
    min-height: 260px;
    margin-bottom: 0;
  }

  #scrollUpBtn {
    width: 45px;
    height: 45px;
    bottom: 65px;
    right: 24px;
  }

  .arrow-overlay {
    font-size: 1.4rem;
  }
}

/* ==========================================================================
   BREAKPOINT 3: 1024px (DESKTOP - Most Important)
   ========================================================================== */

@media (min-width: 1024px) {
  :root {
    --font-p: 17px;
    --font-h1: 1.8rem;
    --font-h2: 1.45rem;
    --font-h3: 1.28rem;
    --font-h4: 1.15rem;
    --font-li: 17px;
    --font-a: 16px;
    --font-i: 15px;
    --font-table: 16px;
  }

  .container {
    max-width: 95%;
  }

  .menu-toggle { display: none; }

  .navbar {
    padding: 12px 0;
    position: sticky;
    top: 0;
    overflow: visible;
  }

  .navbar .container {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .navbar .logo {
    font-size: 1.25rem;
    width: auto;
    justify-content: flex-start;
  }

  .navbar .logo img {
    width: 28px;
    height: 28px;
  }

  .navbar .nav-links {
    position: static;
    max-height: none;
    opacity: 1;
    flex-direction: row;
    width: auto;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-bottom: none;
    box-shadow: none;
    overflow: visible;
  }

  .navbar nav ul {
    flex-direction: row;
    align-items: center;
    padding: 0;
    gap: 4px;
  }

  .navbar nav ul li a.nav-item {
    width: auto;
    min-height: auto;
    padding: 8px 13px;
    font-size: 0.88rem;
    white-space: nowrap;
  }

  .nav-cta-item {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
    margin-left: 10px;
  }

  .navbar nav ul li a.nav-cta-btn {
    width: auto;
    min-height: auto;
    padding: 8px 16px;
    font-size: 0.88rem;
  }
  /* TWO-COLUMN LAYOUT ACTIVATES HERE (70/30) */
  .main-content-wrapper {
    display: grid;
    grid-template-columns: 70% 30%;
    gap: 2px;
    padding: 40px 20px;
  }

  .left-column {
    padding-right: 20px;
  }

  .right-column {
    padding: 0;
  }

  .copy-button {
    padding: 0.5rem 1rem;
    font-size: 1rem;
  }

  .code-block,
  .explanation pre {
    font-size: 1rem;
  }

  .action-button {
    max-width: 200px;
  }

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

  .button .wallpaper-button,
  .button .color-button,
  .button .related-button {
    font-size: 0.95rem;
  }

  .project-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    width: 100%;
    border-radius: 5px;
    max-width: 400px;
    transition: transform 0.3s ease;
    gap: 20px;
  }

  .project-card img {
    min-height: 0;
    max-height: 260px;
    margin-bottom: 0;
  }

  /* Desktop Ad Sizes */
  .ad-block.large {
    min-height: 500px;
  }

  .ad-block.medium {
    min-height: 350px;
  }

  .ad-block.small {
    min-height: 150px;
  }

  .ad-block.wide-skyscraper {
    display: block;
    width: 160px;
    min-height: 600px;
    margin: 0 auto;
  }

  .ad-block.leaderboard {
    min-height: 90px;
    max-width: 728px;
  }

  /* Sticky Ad in Sidebar */
  .ad-sticky {
    position: sticky;
    top: 80px;
  }

  #scrollUpBtn {
    width: 50px;
    height: 50px;
    bottom: 65px;
    right: 28px;
  }

  .footer .contacts {
    flex-direction: row;
    gap: 20px;
  }

  .arrow-overlay {
    font-size: 1.5rem;
  }

  .menu {
    flex-direction: row;
  }
}

/* ==========================================================================
   BREAKPOINT 4: 1280px (Large Desktop)
   ========================================================================== */

@media (min-width: 1280px) {
  :root {
    --font-p: 17.5px;
    --font-h1: 1.82rem;
    --font-h2: 1.52rem;
    --font-h3: 1.32rem;
    --font-h4: 1.15rem;
    --font-li: 18px;
    --font-a: 16.5px;
    --font-i: 15.5px;
    --font-table: 16.5px;
  }

  .container {
    max-width: 95%;
  }

  /* Optimized Two-Column Layout (68/32) */
  .main-content-wrapper {
    grid-template-columns: 68% 32%;
  }

  .tutorial-details-section h1 {
    font-size: 1.7rem;
  }

  .button .wallpaper-button,
  .button .color-button,
  .button .related-button {
    font-size: 1rem;
  }

  /* 3-Column Project Grid */
  .project-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin: 20px 0;
  }

  .project-card {
    max-height: 600px;
  }

  .logo img {
    width: 32px;
    height: 32px;
  }

  /* Large Desktop Ad Sizes */
  .ad-block.large {
    min-height: 550px;
  }

  .ad-block.medium {
    min-height: 400px;
  }

  .ad-block.leaderboard {
    max-width: 970px;
    min-height: 90px;
  }

  #scrollUpBtn {
    width: 53px;
    height: 53px;
    bottom: 75px;
    right: 32px;
  }
}

/* ==========================================================================
   BREAKPOINT 5: 1440px (Extra Large)
   ========================================================================== */

@media (min-width: 1440px) {
  :root {
    --font-p: 18px;
    --font-h1: 1.875rem;
    --font-h2: 1.55rem;
    --font-h3: 1.39rem;
    --font-h4: 1.2rem;
    --font-li: 18.5px;
    --font-a: 17px;
    --font-i: 16px;
    --font-table: 17px;
  }

  .container {
    max-width: 95%;
  }

  /* Optimized Two-Column Layout (65/35) */
  .main-content-wrapper {
    grid-template-columns: 65% 35%;
  }

  /* Extra Large Ad Sizes */
  .ad-block.large {
    min-height: 600px;
  }

  .ad-block.medium {
    min-height: 450px;
  }

  .ad-block.leaderboard {
    max-width: 970px;
    min-height: 90px;
  }

  .ad-block.wide-skyscraper {
    min-height: 600px;
  }
}

.deals-section {
  background-color: var(--dark-gray);
  border: 1px solid var(--color-pink);
  border-radius: 5px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.deals-header {
  margin-bottom: 16px;
}

.deals-header h2 {
  font-size: var(--font-h2);
  font-weight: 900;
  letter-spacing: 2px;
  color: #f0f0f0;
  margin-bottom: 6px;
  text-transform: uppercase;
}

/* .deals-underline {
  height: 2px;
  background: var(--color-purple);
  border-radius: 2px;
} */

/* ---- Grid ---- */
.deals-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}

/* ---- Affiliate Card ---- */
.deal-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: var(--light-text);
  position: relative;
  background-color: var(--dark-bg);
  border: 1px solid var(--border-color);
  border-radius: 5px;
  overflow: hidden;
  transition: transform var(--transition-speed), box-shadow var(--transition-speed), border-color var(--transition-speed);
  padding-bottom: 10px;
}

.deal-card:hover {
  transform: translateY(-3px);
  border-color: var(--color-pink);
  box-shadow: 0 0 12px rgba(227, 108, 17, 0.35);
}

/* ---- Discount Badge ---- */
.deal-badge {
  display: block;
  width: 100%;
  background: #ecad27;
  color: var(--dark-blue);
  font-size: 10px;
  font-weight: 700;
  text-align: center;
  padding: 4px 5px;
  font-family: Saira, sans-serif;
  letter-spacing: 0.3px;
}

/* ---- Product Image ---- */
.deal-img-wrap {
  width: 100%;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  background-color: var(--bg-secondary);
}

.deal-img-wrap img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: transform var(--transition-speed);
}

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

/* ---- Category Label ---- */
.deal-label {
  font-size: 11px;
  font-weight: 600;
  text-align: center;
  padding: 7px 5px 0;
  line-height: 1.4;
  color: #e5e7eb;
}

/* ---- Nav Arrows ---- */
.deals-nav {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 4px;
}

.deal-arrow-btn {
  background: var(--accent-blue);
  color: #fff;
  border: none;
  border-radius: var(--border-radius);
  width: 34px;
  height: 34px;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition-speed);
}

.deal-arrow-btn:hover {
  background: var(--accent-blue-hover);
}

/* ---- Breakpoints (match your system) ---- */

/* 480px */
@media (min-width: 480px) {
  .deals-grid { gap: 12px; }
  .deal-img-wrap { height: 105px; }
  .deal-label { font-size: 11.5px; }
}

/* 768px Tablet */
@media (min-width: 768px) {
  .deals-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
  }
  .deal-img-wrap { height: 120px; }
  .deal-badge { font-size: 11px; }
  .deal-label { font-size: 12px; }
  .deal-arrow-btn { width: 36px; height: 36px; }
}

/* 1024px Desktop */
@media (min-width: 1024px) {
  .deals-section { padding: 25px; }
  .deals-grid { gap: 16px; }
  .deal-img-wrap { height: 130px; }
  .deal-badge { font-size: 11.5px; }
  .deal-label { font-size: 13px; }
}

/* 1280px+ - 2 rows, more padding */
@media (min-width: 1280px) {
  .deal-img-wrap { height: 135px; }
  .deal-label { font-size: 13.5px; }
}

/* Deals page indicator */
.deals-page-indicator {
  text-align: center;
  font-size: 11px;
  color: var(--border-color);
  margin-top: 8px;
  font-family: Saira, sans-serif;
  letter-spacing: 1px;
}

/* ── Deal Skeleton Loader ── */
.deal-skeleton {
  background: linear-gradient(90deg, var(--dark-gray) 25%, #1a1f35 50%, var(--dark-gray) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: 5px;
  height: 160px;
  border: 1px solid var(--border-color);
}

@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}


/* ============================================================
   BANNER — Featured Open-Source Projects
   Scoped tokens — inherits :root vars where possible
   ============================================================ */

.banner {
  /* scoped design tokens */
  --b-bg:     #0e1117;
  --b-s1:     #151922;
  --b-s2:     #1a2030;
  --b-bd:     rgba(255,255,255,.07);
  --b-bd2:    rgba(255,255,255,.13);
  --b-te:     #e8ecf0;
  --b-tm:     #8a9ab0;
  --b-tf:     #4a5568;
  --b-green:  #22d3a0;
  --b-gd:     rgba(34,211,160,.09);
  --b-gb:     rgba(34,211,160,.28);
  --b-purple: #a78bfa;
  --b-pd:     rgba(167,139,250,.09);
  --b-pb:     rgba(167,139,250,.28);
  --b-blue:   #60a5fa;
  --b-bld:    rgba(96,165,250,.09);
  --b-blb:    rgba(96,165,250,.28);
  --b-cyan:   #22d3ee;
  --b-cd:     rgba(34,211,238,.09);
  --b-cb:     rgba(34,211,238,.28);
  --b-amber:  #fbbf24;
  --b-ad:     rgba(251,191,36,.09);
  --b-ab:     rgba(251,191,36,.28);
  --b-red:    #f87171;
  --b-rd:     rgba(248,113,113,.09);
  --b-rb:     rgba(248,113,113,.28);
  --b-mono:   'JetBrains Mono','Fira Code',monospace;
  --b-r-sm:   6px;
  --b-r-md:   10px;
  --b-r-lg:   14px;
  --b-r-xl:   18px;
  --b-r-full: 9999px;
  --b-ease:   180ms cubic-bezier(.16,1,.3,1);

  /* layout */
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--b-bd2);
  border-radius: var(--b-r-xl);
  overflow: hidden;
  background: var(--b-s1);
  box-shadow:
    0 24px 60px rgba(0,0,0,.5),
    0 0 0 1px rgba(255,255,255,.04) inset;
  font-family: 'Saira', sans-serif;
  margin-bottom: 30px;
}

/* ---------- HEADER ---------- */
.banner-header {
  padding: 1.3rem 1.3rem .95rem;
  background: var(--b-s2);
  border-bottom: 1px solid var(--b-bd);
  position: relative;
  overflow: hidden;
}

/* animated gradient top line */
.banner-header::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: linear-gradient(
    90deg,
    var(--b-green),
    var(--b-cyan),
    var(--b-purple),
    var(--b-blue),
    var(--b-amber),
    var(--b-green)
  );
  background-size: 300% 100%;
  animation: banner-line 5s linear infinite;
}

@keyframes banner-line {
  0%   { background-position: 0% 0; }
  100% { background-position: 300% 0; }
}

/* live badge */
.banner-count-badge {
  position: absolute;
  top: .85rem;
  right: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--b-mono);
  font-size: .58rem;
  color: var(--b-tf);
  background: var(--b-bg);
  border: 1px solid var(--b-bd);
  padding: 3px 9px;
  border-radius: var(--b-r-full);
  letter-spacing: .08em;
  text-transform: uppercase;
}

/* chip */
.banner-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--b-mono);
  font-size: var(--font-i);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--b-green);
  background: var(--b-gd);
  border: 1px solid var(--b-gb);
  padding: 3px 10px;
  border-radius: var(--b-r-full);
  margin-bottom: .5rem;
}

.banner-chip svg {
  width: 10px;
  height: 10px;
  stroke: var(--b-green);
  flex-shrink: 0;
}

/* title */
.banner-title {
  font-weight: 700;
  color: var(--b-te);
  line-height: 1.3;
  margin-bottom: .25rem;
  /* override global h3 color */
  color: var(--b-te) !important;
  border: none !important;
  padding: 0 !important;
}

.banner-title em {
  font-style: normal;
  background: linear-gradient(135deg, var(--b-green), var(--b-cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* sub */
.banner-sub {
  color: var(--b-tm);
  line-height: 1.5;
  margin: 0;
}

/* stats row */
.banner-stats {
  display: flex;
  gap: .45rem;
  margin-top: .75rem;
}

.stat-pill {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 6px 4px;
  border-radius: var(--b-r-md);
  border: 1px solid var(--b-bd);
  background: rgba(255,255,255,.02);
  transition: background var(--b-ease), border-color var(--b-ease);
  cursor: default;
}

.stat-pill:hover {
  background: rgba(255,255,255,.055);
  border-color: var(--b-bd2);
}

.stat-pill-num {
  font-family: var(--font-i);
  font-size: .85rem;
  font-weight: 700;
  color: var(--b-te);
  line-height: 1;
}

.stat-pill-lbl {
  font-size: var(--font-i);
  color: var(--b-tf);
  margin-top: 3px;
  text-transform: uppercase;
  letter-spacing: .07em;
}

/* ---------- TICKER ---------- */
.banner-ticker {
  padding: .5rem 1.1rem;
  border-bottom: 1px solid var(--b-bd);
  overflow: hidden;
  position: relative;
}

.banner-ticker::before,
.banner-ticker::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  width: 28px;
  z-index: 2;
  pointer-events: none;
}

.banner-ticker::before {
  left: 0;
  background: linear-gradient(90deg, var(--b-s1), transparent);
}

.banner-ticker::after {
  right: 0;
  background: linear-gradient(270deg, var(--b-s1), transparent);
}

.ticker-track {
  display: flex;
  gap: 6px;
  width: max-content;
  animation: ticker-scroll 20s linear infinite;
  font-size: var(--font-i);
  border-radius: 5px;
  padding: 0 5px
}

.ticker-track:hover {
  animation-play-state: paused;
}

.ticker__pill {
  border-radius: 5px;
  padding: 0 5px
}

@keyframes ticker-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.ticker-pill {
  font-family: var(--b-mono);
  font-size: .58rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: var(--b-r-full);
  white-space: nowrap;
  border: 1px solid;
  cursor: default;
  transition: transform var(--b-ease), opacity var(--b-ease);
  user-select: none;
}

.ticker-pill:hover {
  transform: scale(1.1);
  opacity: .85;
}

/* ---------- CARD LIST ---------- */
.banner-list {
  display: flex;
  flex-direction: column;
  padding: .6rem .7rem;
  gap: .45rem;
  max-height: 400px;
  overflow: hidden;
  position: relative;
}

/* bottom fade-out */
.banner-list::after {
  content: "";
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 60px;
  background: linear-gradient(to bottom, transparent, var(--b-s1));
  pointer-events: none;
  z-index: 2;
}

@keyframes new-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: .5; }
}

/* ---------- CTA ---------- */
.banner-cta {
  margin: .7rem .7rem .7rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: .6rem 1rem;
  border-radius: var(--b-r-lg);
  background: var(--b-gd);
  border: 1px solid var(--b-gb);
  color: var(--b-green);
  font-weight: 700;
  text-decoration: none;
  transition:
    background  var(--b-ease),
    box-shadow  var(--b-ease),
    transform   var(--b-ease);
  position: relative;
  overflow: hidden;
  font-family: 'Saira', sans-serif;
}

.banner-cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(34,211,160,.13), transparent);
  opacity: 0;
  transition: opacity var(--b-ease);
}

.banner-cta:hover {
  background: rgba(34,211,160,.16);
  box-shadow: 0 0 0 3px rgba(34,211,160,.15);
  transform: translateY(-1px);
}

.banner-cta:hover::before { opacity: 1; }

.banner-cta svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
  transition: transform var(--b-ease);
}

.banner-cta:hover svg {
  transform: translate(2px, -2px);
}

/* ---------- LIVE DOT ---------- */
.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--b-green);
  display: inline-block;
  flex-shrink: 0;
  animation: live-pulse 2s ease-in-out infinite;
}

@keyframes live-pulse {
  0%   { box-shadow: 0 0 0 0   rgba(34,211,160,.5); }
  70%  { box-shadow: 0 0 0 6px rgba(34,211,160,.0); }
  100% { box-shadow: 0 0 0 0   rgba(34,211,160,.0); }
}

/* ============================================================
   SIDEBAR IDENTITY & SUPPORT CARDS
   About DevspireHub (primary) / DevSpire Nexus / Buy Me a Coffee
   ============================================================ */

.ds-about-card,
.ds-card {
  /* scoped design tokens — dark editorial palette */
  --ds-surface: #151e2c;
  --ds-surface-raised: #18283a;
  --ds-text: #ffffff;
  --ds-body: #b7c1cb;
  --ds-muted: #8e9aab;
  --ds-border: rgba(183, 193, 203, 0.14);
  --ds-accent: #19baaf;
  --ds-accent-soft: rgba(25, 186, 175, 0.1);
  --ds-accent-line: rgba(25, 186, 175, 0.32);
  --ds-accent-bright: #4dd8cc;
  --ds-accent-hover-bg: rgba(25, 186, 175, 0.18);
  --ds-radius: 16px;
  --ds-ease: 220ms cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
  font-family: "Saira", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* ---------- ABOUT (primary card) ---------- */

.ds-about-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  margin: 0 0 18px;
  padding: 20px;
  border: 1px solid rgba(229, 68, 21, 0.26);
  border-radius: var(--ds-radius);
  background:
    radial-gradient(115% 85% at 100% 0%, rgba(229, 68, 21, 0.18) 0%, rgba(229, 68, 21, 0) 55%),
    radial-gradient(90% 70% at 0% 0%, rgba(25, 186, 175, 0.12) 0%, rgba(25, 186, 175, 0) 60%),
    linear-gradient(165deg, #1b2c3f 0%, #151e2c 55%, #111a26 100%);
  box-shadow:
    0 18px 40px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition:
    transform var(--ds-ease),
    border-color var(--ds-ease),
    box-shadow var(--ds-ease);
}

/* thin brand accent line across the top edge */
.ds-about-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: linear-gradient(90deg, #e54415 0%, #f2a900 48%, #19baaf 100%);
  opacity: 0.9;
  pointer-events: none;
}

.ds-about-card:hover {
  transform: translateY(-2px);
  border-color: rgba(229, 68, 21, 0.42);
  box-shadow:
    0 22px 46px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.ds-about-card:focus-within {
  border-color: rgba(25, 186, 175, 0.5);
}

.ds-about-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 13px;
}

.ds-about-card__badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 3px 10px;
  border: 1px solid var(--ds-border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--ds-muted);
  font-size: 10px;
  font-weight: 600;
  line-height: 1.6;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.ds-about-card__badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ds-accent);
  box-shadow: 0 0 0 3px rgba(25, 186, 175, 0.16);
}

.ds-about-card__mark {
  display: inline-flex;
  width: 32px;
  height: 32px;
  color: rgba(229, 68, 21, 0.9);
}

.ds-about-card__mark svg {
  width: 100%;
  height: 100%;
}

.ds-about-card__title {
  margin: 0 0 10px;
  padding: 0;
  border: 0;
  color: var(--ds-text);
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.ds-about-card__title span {
  background: linear-gradient(100deg, #e54415 0%, #f2a900 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.ds-about-card__desc {
  margin: 0 0 14px;
  color: var(--ds-body);
  font-size: 13.5px;
  line-height: 1.66;
}

.ds-about-card__topics {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 15px;
  padding: 0;
  list-style: none;
}

.ds-about-card__topics li {
  padding: 3px 9px;
  border: 1px solid rgba(183, 193, 203, 0.16);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  color: #cfd7e1;
  font-size: 11px;
  line-height: 1.5;
  letter-spacing: 0.02em;
}

.ds-about-card__link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 32px;
  border-radius: 6px;
  color: var(--ds-accent);
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none;
  transition: color var(--ds-ease);
}

.ds-about-card__link svg {
  width: 14px;
  height: 14px;
  transition: transform var(--ds-ease);
}

.ds-about-card__link:hover {
  color: var(--ds-accent-bright);
}

.ds-about-card__link:hover svg {
  transform: translateX(3px);
}

.ds-about-card__link:focus-visible {
  outline: 2px solid var(--ds-accent);
  outline-offset: 3px;
}

/* ---------- SECONDARY CARDS (Nexus, Buy Me a Coffee) ---------- */

.ds-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0 0 18px;
  padding: 16px;
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius);
  background: linear-gradient(160deg, var(--ds-surface-raised) 0%, var(--ds-surface) 62%);
  box-shadow:
    0 10px 26px rgba(0, 0, 0, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  color: var(--ds-body);
  font-size: 13px;
  text-decoration: none;
  transition:
    transform var(--ds-ease),
    border-color var(--ds-ease),
    box-shadow var(--ds-ease);
}
/* Navy Blue Palette Tokens (Section 3) */
:root {
  --ds-navy-primary: #142D5E;
  --ds-navy-deep: #0B1F45;
  --ds-navy-secondary: #24477A;
  --ds-navy-surface: #EAF0FA;
  --ds-navy-hover: #193B70;
  --ds-navy-focus: #426AA5;
  --ds-navy-border: #C5D7F0;
  --ds-navy-white: #FFFFFF;
  --ds-gray-surface: #F0F2F5;
  --ds-gray-border: #D1D5DB;
  --ds-dark-grey-surface: #141B28;
  --ds-dark-grey-highlight: #1A2334;
  --ds-dark-grey-border: rgba(255, 255, 255, 0.1);
}

/* Base Card Interactive & Focus States */
.ds-card:hover {
  transform: translateY(-2px);
  border-color: var(--ds-accent-line);
  box-shadow:
    0 14px 32px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.ds-card:active {
  transform: translateY(0);
}

.ds-card:focus-visible {
  outline: 2px solid var(--ds-accent);
  outline-offset: 3px;
}

.ds-card__head {
  display: flex;
  align-items: center;
  gap: 11px;
}

.ds-card__icon {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--ds-accent-line);
  border-radius: 11px;
  background: var(--ds-accent-soft);
  color: var(--ds-accent);
  transition: box-shadow var(--ds-ease);
}

.ds-card__icon svg {
  width: 20px;
  height: 20px;
}

.ds-card:hover .ds-card__icon {
  box-shadow: 0 0 0 3px var(--ds-accent-soft);
}

.ds-card__heading {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.ds-card__eyebrow {
  color: var(--ds-accent);
  font-size: 9.5px;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.ds-card__title {
  color: var(--ds-text);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.005em;
}

/* Official Nexus Brand Mark */
.ds-card__logo {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 4px;
  border: 1px solid rgba(183, 193, 203, 0.2);
  border-radius: 12px;
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.03));
  box-shadow:
    0 6px 14px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition:
    border-color var(--ds-ease),
    box-shadow var(--ds-ease);
}

.ds-card__logo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.ds-card:hover .ds-card__logo {
  border-color: var(--ds-accent-line);
  box-shadow:
    0 8px 18px rgba(0, 0, 0, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.ds-card__tagline {
  color: var(--ds-accent-bright);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: 0.05em;
}

.ds-card__desc {
  display: block;
  color: var(--ds-body);
  font-size: 12.8px;
  line-height: 1.6;
}

.ds-card__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ds-card__chip {
  padding: 3px 8px;
  border: 1px solid rgba(183, 193, 203, 0.16);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  color: #cfd7e1;
  font-size: 10.5px;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.ds-card__features {
  list-style: none;
  padding: 0;
  margin: 2px 0 6px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ds-card__features li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.8px;
  color: var(--ds-body);
  line-height: 1.45;
}

.ds-card__features li i {
  color: var(--ds-accent);
  font-size: 11px;
  flex-shrink: 0;
}

.ds-card__features--coffee li i {
  color: #f2a900;
}

.ds-card__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 12px;
  border: 1px solid var(--ds-accent-line);
  border-radius: 10px;
  background: var(--ds-accent-soft);
  color: var(--ds-accent);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.01em;
  transition:
    background var(--ds-ease),
    border-color var(--ds-ease),
    color var(--ds-ease);
}

.ds-card__cta svg {
  width: 13px;
  height: 13px;
  flex: 0 0 auto;
}

.ds-card:hover .ds-card__cta {
  background: var(--ds-accent-hover-bg);
  border-color: var(--ds-accent);
  color: var(--ds-accent-bright);
}

.ds-card__arrow {
  transition: transform var(--ds-ease);
}

.ds-card:hover .ds-card__arrow {
  transform: translateX(3px);
}

/* ============================================================
   SECTION 3 & 4: TARGET CARD (DevSpire Nexus)
   Navy Blue Styling & 1.5× Height Increase (UI-01, UI-02, UI-03)
   ============================================================ */

/* ============================================================
   SUBTLE CARD HIGHLIGHT & ENTRANCE ANIMATIONS
   Exclusively for: DevSpire Nexus, Buy Me a Coffee, Featured Article
   ============================================================ */

@keyframes dsCardEntrance {
  0% {
    opacity: 0;
    transform: translateY(14px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.ds-card--nexus.ds-card--revealed,
.ds-card--coffee.ds-card--revealed,
.ds-card--featured.ds-card--revealed {
  animation: dsCardEntrance 500ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.ds-card--nexus.ds-card--revealed {
  animation-delay: 0ms;
}

.ds-card--coffee.ds-card--revealed {
  animation-delay: 120ms;
}

.ds-card--featured.ds-card--revealed {
  animation-delay: 240ms;
}

/* ============================================================
   SECTION 3 & 4: TARGET CARD (DevSpire Nexus)
   Navy Blue Styling, 1.5× Height & Subtle Highlight
   ============================================================ */

.ds-card--nexus {
  --ds-text: #FFFFFF;
  --ds-body: #94A3B8;
  --ds-border: var(--ds-dark-grey-border);
  --ds-accent: #38BDF8;
  --ds-accent-soft: rgba(56, 189, 248, 0.1);
  --ds-accent-line: rgba(56, 189, 248, 0.25);
  --ds-accent-bright: #7DD3FC;
  --ds-accent-hover-bg: #0284C7;
  background-color: var(--ds-dark-grey-surface);
  border: 1px solid var(--ds-dark-grey-border);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.35);
  min-height: 324px;
  justify-content: space-between;
  padding: 22px;
  transition:
    transform 250ms cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 250ms ease,
    border-color 250ms ease,
    background-color 250ms ease;
  will-change: transform, box-shadow;
}

.ds-card--nexus .ds-card__eyebrow {
  color: #38BDF8;
  font-weight: 700;
}

.ds-card--nexus .ds-card__title {
  color: #FFFFFF;
  font-size: 16px;
  font-weight: 700;
  border: none;
  padding: 0;
  margin: 0;
}

.ds-card--nexus .ds-card__tagline {
  color: #94A3B8;
}

.ds-card--nexus .ds-card__desc {
  color: #94A3B8;
  font-size: 13px;
  line-height: 1.6;
}

.ds-card--nexus .ds-card__chip {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.14);
  color: #E2E8F0;
  font-weight: 600;
}

.ds-card--nexus .ds-card__cta {
  background: var(--ds-navy-primary);
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.15);
  min-height: 44px;
  font-weight: 700;
  transition:
    background-color var(--ds-ease),
    border-color var(--ds-ease),
    color var(--ds-ease);
}

.ds-card--nexus:hover,
.ds-card--nexus:focus-within {
  transform: translateY(-2px);
  background-color: var(--ds-dark-grey-highlight);
  border-color: rgba(56, 189, 248, 0.5);
  box-shadow:
    0 14px 32px rgba(0, 0, 0, 0.45),
    0 0 20px rgba(56, 189, 248, 0.14);
}

.ds-card--nexus:hover .ds-card__cta {
  background: var(--ds-navy-hover);
  border-color: #38BDF8;
  color: #FFFFFF;
}

.ds-card--nexus:focus-visible,
.ds-card--nexus .ds-card__cta:focus-visible {
  outline: 2px solid #38BDF8;
  outline-offset: 3px;
}

/* ============================================================
   SECTION 5: BUY ME A COFFEE CARD
   Preserved Branding, 1.5× Height & Subtle Gold Highlight
   ============================================================ */

.ds-card--coffee {
  --ds-text: #FFFFFF;
  --ds-body: #94A3B8;
  --ds-border: rgba(242, 169, 0, 0.28);
  --ds-accent: #f2a900;
  --ds-accent-soft: rgba(242, 169, 0, 0.12);
  --ds-accent-line: rgba(242, 169, 0, 0.36);
  --ds-accent-bright: #ffc533;
  --ds-accent-hover-bg: rgba(242, 169, 0, 0.22);
  background-color: var(--ds-dark-grey-surface);
  border: 1px solid var(--ds-dark-grey-border);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.35);
  min-height: 270px;
  justify-content: space-between;
  padding: 22px;
  transition:
    transform 250ms cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 250ms ease,
    border-color 250ms ease,
    background-color 250ms ease;
  will-change: transform, box-shadow;
}

.ds-card--coffee .ds-card__eyebrow {
  color: #f2a900;
  font-weight: 700;
}

.ds-card--coffee .ds-card__title {
  color: #FFFFFF;
  font-size: 16px;
  font-weight: 700;
  border: none;
  padding: 0;
  margin: 0;
}

.ds-card--coffee .ds-card__desc {
  color: #94A3B8;
  font-size: 13px;
  line-height: 1.6;
}

.ds-card--coffee .ds-card__icon {
  background: rgba(242, 169, 0, 0.12);
  border: 1px solid rgba(242, 169, 0, 0.36);
  color: #ffc533;
  transition: background-color var(--ds-ease), border-color var(--ds-ease);
}

.ds-card--coffee .ds-card__cta {
  background: #f2a900;
  color: #111111;
  border: 1px solid #d49400;
  font-weight: 700;
  min-height: 44px;
  transition: background-color var(--ds-ease), border-color var(--ds-ease);
}

.ds-card--coffee:hover,
.ds-card--coffee:focus-within {
  transform: translateY(-2px);
  background-color: var(--ds-dark-grey-highlight);
  border-color: rgba(242, 169, 0, 0.55);
  box-shadow:
    0 14px 32px rgba(0, 0, 0, 0.45),
    0 0 20px rgba(242, 169, 0, 0.16);
}

.ds-card--coffee:hover .ds-card__cta {
  background: #ffb81c;
  color: #000000;
  border-color: #f2a900;
}

.ds-card--coffee:focus-visible,
.ds-card--coffee .ds-card__cta:focus-visible {
  outline: 2px solid #f2a900;
  outline-offset: 3px;
}

/* ============================================================
   SECTION 6: ARTICLE CARD WITH IMAGE (Below Buy Me a Coffee)
   Subtle Highlight & Media Showcase
   ============================================================ */

.ds-card--featured {
  --ds-text: #FFFFFF;
  --ds-body: #94A3B8;
  --ds-border: var(--ds-dark-grey-border);
  --ds-accent: #38BDF8;
  background-color: var(--ds-dark-grey-surface);
  border: 1px solid var(--ds-dark-grey-border);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.35);
  gap: 12px;
  padding: 22px;
  transition:
    transform 250ms cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 250ms ease,
    border-color 250ms ease,
    background-color 250ms ease;
  will-change: transform, box-shadow;
}

.ds-card--featured .ds-card__media {
  width: 100%;
  overflow: hidden;
  border-radius: 8px;
  margin-bottom: 2px;
}

.ds-card--featured .ds-card__media img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  display: block;
  border-radius: 8px;
  transition: transform var(--ds-ease);
}

.ds-card--featured:hover .ds-card__media img {
  transform: scale(1.03);
}

.ds-card--featured .ds-card__eyebrow {
  color: #38BDF8;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.ds-card--featured .ds-card__title {
  color: #FFFFFF;
  font-size: 16.5px;
  font-weight: 700;
  line-height: 1.4;
  border: none;
  padding: 0;
  margin: 0;
}

.ds-card--featured .ds-card__desc {
  color: #94A3B8;
  font-size: 13px;
  line-height: 1.6;
}

.ds-card__publications {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
  margin-top: 4px;
}

.ds-card--featured .ds-card__cta {
  background: var(--ds-navy-primary);
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.15);
  min-height: 44px;
  font-size: 12.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  border-radius: 10px;
  transition: background-color var(--ds-ease), border-color var(--ds-ease), transform var(--ds-ease);
}

.ds-card--featured .ds-card__cta i {
  font-size: 16px;
  flex-shrink: 0;
}

.ds-card--featured:hover,
.ds-card--featured:focus-within {
  transform: translateY(-2px);
  background-color: var(--ds-dark-grey-highlight);
  border-color: rgba(56, 189, 248, 0.5);
  box-shadow:
    0 14px 32px rgba(0, 0, 0, 0.45),
    0 0 20px rgba(56, 189, 248, 0.14);
}

.ds-card--featured .ds-card__cta:hover {
  background: var(--ds-navy-hover);
  border-color: #38BDF8;
  color: #FFFFFF;
}

.ds-card--featured:focus-visible,
.ds-card--featured .ds-card__cta:focus-visible {
  outline: 2px solid #38BDF8;
  outline-offset: 3px;
}

/* ============================================================
   SECTION 7: ARTICLE METADATA ROW
   Reading Duration (Far Left) | Platform Icons (Far Right) (UI-06, UI-07)
   Transparent Background, White Reading Time & Circle Icon Badges
   ============================================================ */

.ds-article-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 12px;
  padding: 10px 16px;
  margin: 8px 0 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  background: transparent;
}

.ds-reading-time {
  margin: 0;
  font-size: 13.5px;
  font-weight: 600;
  color: #FFFFFF;
  white-space: nowrap;
}

.ds-article-platforms {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.ds-article-label {
  color: #FFFFFF;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-right: 2px;
}

.ds-article-platform {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: none;
  background: #FFFFFF;
  color: #000000;
  text-decoration: none;
  border-radius: 50%;
  transition: background-color var(--ds-ease), transform var(--ds-ease), box-shadow var(--ds-ease);
}

.ds-article-platform i {
  font-size: 18px;
  color: #000000;
  transition: color var(--ds-ease);
}

.ds-article-platform:hover {
  background: #E2E8F0;
  color: #000000;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.2);
}

.ds-article-platform:hover i {
  color: #000000;
}

.ds-article-platform:focus-visible {
  outline: 2px solid #38BDF8;
  outline-offset: 3px;
}

/* ============================================================
   RESPONSIVE LAYOUTS & HEIGHT ENHANCEMENTS (UI-03, UI-04, UI-08)
   ============================================================ */

/* Mobile (< 768px): Touch-friendly padding and 44px touch targets */
@media (max-width: 767.98px) {
  .ds-about-card,
  .ds-card {
    padding: 18px;
  }

  .ds-about-card__title {
    font-size: 1.22rem;
  }

  .ds-about-card__link,
  .ds-card__cta {
    min-height: 44px;
  }
}

/* Tablet (768px - 1023.98px): Single column sidebar with capped width */
@media (min-width: 768px) and (max-width: 1023.98px) {
  .ds-sidebar-stack {
    max-width: 540px;
  }
}

/* Desktop (1024px+): Apply 1.5× height increases to Target Card and Buy Me a Coffee Card */
@media (min-width: 1024px) {
  .ds-card--nexus {
    min-height: 324px;
    padding: 22px;
    justify-content: space-between;
  }

  .ds-card--coffee {
    min-height: 270px;
    padding: 22px;
    justify-content: space-between;
  }
}

/* Large Desktop (1280px+ & 1440px+) */
@media (min-width: 1280px) {
  .ds-card--nexus {
    min-height: 330px;
    padding: 24px;
  }

  .ds-card--coffee {
    min-height: 276px;
    padding: 24px;
  }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  .ds-about-card,
  .ds-card,
  .ds-card--nexus,
  .ds-card--coffee,
  .ds-card--featured,
  .ds-card__icon,
  .ds-card__cta,
  .ds-card__arrow,
  .ds-about-card__link,
  .ds-about-card__link svg,
  .ds-article-platform,
  .ds-card--featured .ds-card__cta,
  .ds-card--nexus.ds-card--revealed,
  .ds-card--coffee.ds-card--revealed,
  .ds-card--featured.ds-card--revealed {
    animation: none !important;
    transition: none !important;
  }

  .ds-about-card:hover,
  .ds-card:hover,
  .ds-card--nexus:hover,
  .ds-card--coffee:hover,
  .ds-card--featured:hover,
  .ds-card--nexus:focus-within,
  .ds-card--coffee:focus-within,
  .ds-card--featured:focus-within,
  .ds-article-platform:hover {
    transform: none !important;
  }

  .ds-card:hover .ds-card__arrow,
  .ds-about-card__link:hover svg {
    transform: none !important;
  }
}