
/* Andrei Clinciu Modern System Design Tokens - Support for Dark & Light Themes dynamically */
:root[data-theme="dark"], :root {
  --pico-primary: #10b981; /* Emerald Green */
  --pico-primary-background: #10b981;
  --pico-primary-hover: #059669;
  --pico-background-color: #060913; /* Deep Space Slate */
  --pico-card-background-color: #0f172a; /* Sleek Glass Card */
  --pico-card-sectioning-background-color: #1e293b;
  --pico-color: #f1f5f9;
  --pico-muted-color: #94a3b8;
  --pico-border-color: #1e293b;
  --pico-font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;

  --gold-accent: #f59e0b;
  --emerald-glow: rgba(16, 185, 129, 0.15);
  --gold-glow: rgba(245, 158, 11, 0.12);
  --card-hover-border: rgba(16, 185, 129, 0.3);
  --header-bg: rgba(6, 9, 19, 0.85);
  --code-block-bg: #0b111e;
}

:root[data-theme="light"] {
  --pico-primary: #059669; /* Slightly darker emerald for readability */
  --pico-primary-background: #059669;
  --pico-primary-hover: #047857;
  --pico-background-color: #f8fafc; /* Crisp, clean slate-gray light background */
  --pico-card-background-color: #ffffff; /* Brilliant white cards */
  --pico-card-sectioning-background-color: #f1f5f9;
  --pico-color: #0f172a; /* Dark text for contrast */
  --pico-muted-color: #64748b;
  --pico-border-color: #e2e8f0;

  --gold-accent: #d97706;
  --emerald-glow: rgba(5, 150, 105, 0.08);
  --gold-glow: rgba(217, 119, 6, 0.06);
  --card-hover-border: rgba(5, 150, 105, 0.4);
  --header-bg: rgba(248, 250, 252, 0.85);
  --code-block-bg: #f1f5f9;
}

body {
  font-family: var(--pico-font-family);
  background-color: var(--pico-background-color);
  color: var(--pico-color);
  line-height: 1.8;
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

code, pre, .tech-mono {
  font-family: 'Fira Code', monospace;
  font-size: 0.9em;
}

pre {
  overflow-x: auto;
  max-width: 100%;
  background: var(--code-block-bg);
  border: 1px solid var(--pico-border-color);
  padding: 1.25rem;
  border-radius: 8px;
}

/* Glassmorphic Responsive Sticky Navigation */
nav {
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background-color: var(--header-bg);
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid var(--pico-border-color);
  padding: 0.75rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

/* Responsive Menu Hamburger Hack */
.menu-toggle-checkbox {
  display: none !important;
}

.menu-toggle-label {
  display: none;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--pico-color);
  z-index: 1001;
  align-items: center;
  justify-content: center;
}

.nav-menu {
  display: flex;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 1.5rem;
}

.nav-menu li {
  padding: 0;
  margin: 0;
}

.nav-menu li a {
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  transition: color 0.2s ease;
}

/* Responsive Breakpoints for Nav Menu */
@media (max-width: 1024px) {
  .menu-toggle-label {
    display: inline-flex;
  }

  .nav-menu {
    display: none !important;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--pico-card-background-color);
    border-bottom: 1px solid var(--pico-border-color);
    flex-direction: column;
    padding: 1.5rem !important;
    gap: 1rem;
    z-index: 999;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15);
  }

  .nav-menu li {
    width: 100%;
  }

  .nav-menu li a, .nav-menu li [role="button"] {
    display: block;
    width: 100%;
    text-align: left;
    padding: 0.75rem 0 !important;
  }

  .menu-toggle-checkbox:checked ~ .nav-menu {
    display: flex !important;
  }
}

/* Themes Switcher Style */
.theme-toggle-btn {
  background: transparent;
  border: none;
  color: var(--pico-color);
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
}

.theme-toggle-btn:hover {
  transform: scale(1.1);
}

/* Hero Pill & Pulse animations */
.tech-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.2);
  color: var(--pico-primary);
  padding: 0.35rem 1rem;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

@keyframes pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.pulse-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  background-color: var(--pico-primary);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

/* Layout Grid and Structures */
.hero {
  padding: 6rem 0 3rem 0;
  text-align: center;
  position: relative;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100vw;
  height: 100%;
  background-image: radial-gradient(rgba(16, 185, 129, 0.05) 1px, transparent 1px);
  background-size: 24px 24px;
  z-index: -1;
  pointer-events: none;
}

/* Modern Gradient Typography */
.gradient-text {
  background: linear-gradient(135deg, var(--pico-color) 40%, var(--pico-primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.gold-gradient-text {
  background: linear-gradient(135deg, var(--pico-color) 40%, var(--gold-accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Premium Elite Card Design System */
.elite-card {
  border: 1px solid var(--pico-border-color);
  background-color: var(--pico-card-background-color);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  min-width: 0;
}

.elite-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--pico-primary), transparent);
  transform: translateX(-100%);
  transition: transform 0.5s ease;
}

.elite-card:hover {
  transform: translateY(-5px);
  border-color: var(--card-hover-border);
  box-shadow: 0 12px 30px -10px var(--emerald-glow);
}

.elite-card:hover::before {
  transform: translateX(100%);
}

.gold-card {
  border: 1px solid rgba(245, 158, 11, 0.15);
}

.gold-card:hover {
  border-color: rgba(245, 158, 11, 0.4);
  box-shadow: 0 12px 30px -10px var(--gold-glow);
}

.gold-card::before {
  background: linear-gradient(90deg, transparent, var(--gold-accent), transparent);
}

/* Section Layout Helpers */
section {
  padding: 5rem 0;
  border-bottom: 1px solid var(--pico-border-color);
}

.services-grid, .app-grid, .pricing-grid, .insights-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  margin-top: 3rem;
}

@media (min-width: 768px) {
  .app-grid, .pricing-grid, .insights-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .services-grid, .app-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Image Elements & Fallbacks */
.card-image-wrap {
  position: relative;
  width: 100%;
  height: 200px;
  background-color: rgba(11, 15, 25, 0.5);
  overflow: hidden;
  border-bottom: 1px solid var(--pico-border-color);
}

.card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease, opacity 0.3s ease;
  opacity: 0.85;
}

.elite-card:hover .card-image {
  transform: scale(1.05);
  opacity: 1;
}

.no-image-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(9, 13, 22, 0.8) 0%, rgba(21, 29, 48, 0.8) 100%);
  color: var(--pico-muted-color);
  position: relative;
}

.no-image-fallback::after {
  content: '</>';
  font-family: 'Fira Code', monospace;
  font-size: 3.5rem;
  opacity: 0.05;
  font-weight: 800;
  position: absolute;
  bottom: 1rem;
  right: 1.5rem;
}

/* Dynamic badging and pills */
.card-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 10;
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
  font-size: 0.725rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background-color: rgba(16, 185, 129, 0.15);
  color: var(--pico-primary);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-blog {
  background-color: rgba(16, 185, 129, 0.15);
  color: var(--pico-primary);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-project {
  background-color: rgba(245, 158, 11, 0.15);
  color: var(--gold-accent);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.card-content {
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  min-width: 0;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: auto;
  padding-top: 1rem;
}

.tag-pill {
  display: inline-flex;
  align-items: center;
  background: rgba(148, 163, 184, 0.08);
  border: 1px solid rgba(148, 163, 184, 0.12);
  color: var(--pico-color);
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  font-size: 0.75rem;
  text-decoration: none;
  transition: all 0.2s ease;
}

.tag-pill:hover {
  background: var(--pico-primary-background);
  color: #0d1117;
  border-color: var(--pico-primary);
}

/* Sovereign Stack Builder Interactive styles */
.interactive-builder-section {
  background: linear-gradient(180deg, rgba(12, 19, 34, 0.3) 0%, rgba(6, 9, 19, 0.3) 100%);
  border: 1px solid var(--pico-border-color);
  border-radius: 16px;
  padding: 2.5rem;
  margin: 4rem 0;
}

.selectable-card {
  cursor: pointer;
  border: 1px solid var(--pico-border-color);
  border-radius: 10px;
  padding: 1.25rem;
  background-color: rgba(15, 23, 42, 0.3);
  transition: all 0.2s ease;
  position: relative;
  user-select: none;
}

.selectable-card:hover {
  border-color: rgba(16, 185, 129, 0.4);
  transform: translateY(-2px);
}

.selectable-card.selected {
  border-color: var(--pico-primary);
  background-color: rgba(16, 185, 129, 0.08);
  box-shadow: 0 0 15px -5px var(--emerald-glow);
}

.selectable-card .checkbox-indicator {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--pico-border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  color: transparent;
  font-weight: 700;
}

.selectable-card.selected .checkbox-indicator {
  background-color: var(--pico-primary);
  border-color: var(--pico-primary);
  color: #ffffff;
}

.calculator-dashboard {
  background-color: rgba(9, 13, 22, 0.5);
  border: 1px solid var(--pico-border-color);
  border-radius: 12px;
  padding: 2rem;
  margin-top: 2.5rem;
}

/* Process Steps Timeline */
.timeline-container {
  border-left: 2px solid var(--pico-border-color);
  margin: 2rem 0;
  padding-left: 2rem;
  position: relative;
}

.timeline-step {
  position: relative;
  margin-bottom: 2.5rem;
}

.timeline-step::before {
  content: '';
  position: absolute;
  left: calc(-2rem - 6px);
  top: 6px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: var(--pico-primary);
  border: 4px solid var(--pico-background-color);
  box-shadow: 0 0 10px var(--pico-primary);
}

/* Rules Ribbon */
.rules-ribbon {
  background-color: rgba(15, 23, 42, 0.4);
  border: 1px solid var(--pico-border-color);
  border-left: 4px solid var(--gold-accent);
  padding: 2.5rem;
  border-radius: 8px;
  margin: 4rem 0;
}

/* Dynamic Article Columns */
.article-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: start;
  margin-top: 3rem;
}

@media (min-width: 992px) {
  .article-layout {
    grid-template-columns: 2.2fr 1fr;
  }
}

.specs-sidebar {
  background-color: rgba(15, 23, 42, 0.4);
  padding: 2.5rem;
  border-radius: 12px;
  border: 1px solid var(--pico-border-color);
  position: sticky;
  top: 120px;
}

/* Back-to-Top Indicator Button */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background-color: var(--pico-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  text-decoration: none;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

/* General Custom Spacers */
.spacing-y {
  margin-top: 3rem;
  margin-bottom: 3rem;
}


/* Timeline / Skills list adjustments */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.skill-item {
  padding: 1rem;
  border-left: 3px solid var(--pico-border-color);

  background:  	hsl(180, 40%, 87.1%) ;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.skill-item:hover {
  border-left-color: var(--pico-primary);
  background:  	hsl(180, 80%, 87.1%) ;
}
/* Custom footer */ 
.footer-list { display:flex; flex-direction:row; justify-content:center;margin:0 auto;text-align:center; }
/* ul.footer-list  li a { margin-right: 12px; list-style: none; } */
ul.footer-list  li  { margin-right: 12px; list-style: none; }

.center {
  text-align:center;
}
/* Showcase / Articles/ Products page */ 
/* Flexible Grid Configurations */
.showcase-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 3rem;
}

@media (min-width: 768px) {
  .showcase-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .showcase-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Featured Card logic */
.featured-item {
  grid-column: 1 / -1;
  min-width: 0;
}

@media (min-width: 1024px) {
  .featured-layout {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 2rem;
    align-items: center;
  }
}

/* Premium Card Styles */
.item-card {
  border: 1px solid var(--pico-border-color);
  background-color: var(--pico-card-background-color);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.3s ease, box-shadow 0.3s ease;
  min-width: 0; /* Prevents text overflow blowouts in grids */
}

.item-card:hover {
  transform: translateY(-5px);
  border-color: rgba(16, 185, 129, 0.3);
  box-shadow: 0 12px 30px -10px var(--emerald-glow);
}

.item-card.project-card:hover {
  border-color: rgba(245, 158, 11, 0.3);
  box-shadow: 0 12px 30px -10px var(--gold-glow);
}

/* Image Containers */
.card-image-wrap {
  position: relative;
  width: 100%;
  height: 200px;
  background-color: #0b0f19;
  overflow: hidden;
}

.featured-item .card-image-wrap {
  height: 320px;
}

@media (max-width: 1024px) {
  .featured-item .card-image-wrap {
    height: 220px;
  }
}

.card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.item-card:hover .card-image {
  transform: scale(1.05);
}

/* Pure Typographic Fallback if NO Image exists */
.no-image-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #090d16 0%, #151d30 100%);
  border-bottom: 1px solid var(--pico-border-color);
  color: var(--pico-muted-color);
  position: relative;
}

.no-image-fallback::after {
  content: '</>';
  font-family: 'Fira Code', monospace;
  font-size: 3.5rem;
  opacity: 0.1;
  font-weight: 800;
  position: absolute;
  bottom: 1rem;
  right: 1.5rem;
}

/* Dynamic badging */
.card-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 10;
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-blog {
  background-color: rgba(16, 185, 129, 0.15);
  color: var(--pico-primary);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-project {
  background-color: rgba(245, 158, 11, 0.15);
  color: var(--gold-accent);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.card-content {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  min-width: 0;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: auto;
  padding-top: 1rem;
}

/* Interactive tags */
.tag-pill {
  display: inline-flex;
  align-items: center;
  background: rgba(148, 163, 184, 0.08);
  border: 1px solid rgba(148, 163, 184, 0.12);
  color: var(--pico-color);
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  font-size: 0.75rem;
  text-decoration: none;
  transition: all 0.2s ease;
}

.tag-pill:hover {
  background: var(--pico-primary-background);
  color: #0d1117;
  border-color: var(--pico-primary);
}

/* Filters Bar */
.filter-bar {
  background-color: #0f172a;
  border: 1px solid var(--pico-border-color);
  border-radius: 8px;
  padding: 1rem 1.5rem;
  margin-bottom: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

/* Pagination Layout */
.pagination-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
  margin-top: 4rem;
}

.page-num {
  font-family: 'Fira Code', monospace;
  font-weight: 600;
}

/* Helper Classes */
.gradient-title {
  background: linear-gradient(135deg, #ffffff 40%, #10b981 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.gold-gradient-title {
  background: linear-gradient(135deg, #ffffff 40%, #f59e0b 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* INvididual article */ 
/* Responsive Cover Visual Styles */
.header-image-cover {
  width: 100%;
  height: 380px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 2rem;
  border: 1px solid var(--pico-border-color);
}

@media (max-width: 768px) {
  .header-image-cover {
    height: 240px;
  }
}

/* Fallback typographic banner styling when NO cover image is set */
.header-no-image-banner {
  background: linear-gradient(135deg, #0f172a 0%, #060913 100%);
  border: 1px solid var(--pico-border-color);
  border-radius: 12px;
  padding: 4rem 2rem;
  margin-bottom: 2.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.header-no-image-banner::before {
  content: 'SYSTEM COMPILING';
  position: absolute;
  bottom: 10px;
  right: 20px;
  font-family: 'Fira Code', monospace;
  font-size: 3rem;
  font-weight: 800;
  opacity: 0.03;
  letter-spacing: 0.1em;
}

/* Main Content Layout Grid */
.article-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: start;
}

/* Prevent column blowout from code or long strings */
.article-column {
  min-width: 0;
}

@media (min-width: 992px) {
  .article-layout {
    grid-template-columns: 2.2fr 1fr;
  }
}

/* Sidebar Styling */
.specs-sidebar {
  background-color: #0f172a;
  padding: 2rem;
  border-radius: 12px;
  border: 1px solid var(--pico-border-color);
  position: sticky;
  top: 120px;
}

/* Tags list formatting inside content */
.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.tag-pill {
  display: inline-flex;
  align-items: center;
  background: rgba(148, 163, 184, 0.08);
  border: 1px solid rgba(148, 163, 184, 0.12);
  color: var(--pico-color);
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  font-size: 0.75rem;
  text-decoration: none;
  transition: all 0.2s ease;
}

.tag-pill:hover {
  background: var(--pico-primary-background);
  color: #0d1117;
  border-color: var(--pico-primary);
}

/* Gradients */
.gradient-title {
  background: linear-gradient(135deg, hsl(260,90%,90%) 40%, #10b981 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
/*  [data-theme="dark"] .gradient-title { */
/*   background: linear-gradient(135deg, #fff 40%, #10b981 100%); */
/*   -webkit-background-clip: text; */
/*   -webkit-text-fill-color: transparent; */
/**/
/* } */

.gold-gradient-title {
  background: linear-gradient(135deg, #ffffff 40%, #f59e0b 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
/* .article-layout hr { */
/*   margin: 1rem 0; */
/* } */
