/**
 * CodePaks Core Engine Stylesheet (Dark Tech Edition)
 *
 * Consolidated single-bundle stylesheet adhering to Tailwind CSS architecture.
 * Contains modern reset, design tokens, utility classes, and component primitives.
 *
 * @package CodePaks
 * @version 1.0.0
 */

/* ==========================================================================
   1. Design Tokens & Root Variables
   ========================================================================== */
:root {
  --color-bg-base: #020617;        /* Slate 950 */
  --color-surface-card: #0f172a;   /* Slate 900 */
  --color-surface-hover: #1e293b;  /* Slate 800 */
  --color-border: #334155;         /* Slate 700 */
  --color-border-subtle: #1e293b;  /* Slate 800 */
  --color-accent: #06b6d4;         /* Cyan 500 */
  --color-accent-hover: #22d3ee;   /* Cyan 400 */
  --color-text-main: #f8fafc;      /* Slate 50 */
  --color-text-muted: #94a3b8;     /* Slate 400 */
  --font-sans: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

/* ==========================================================================
   2. Modern CSS Reset
   ========================================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  border-width: 0;
  border-style: solid;
  border-color: var(--color-border-subtle);
}

html {
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  tab-size: 4;
  font-family: var(--font-sans);
  font-feature-settings: normal;
  font-variation-settings: normal;
  background-color: var(--color-bg-base);
  color: var(--color-text-main);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  line-height: inherit;
  min-height: 100vh;
  background-color: var(--color-bg-base);
  color: var(--color-text-main);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img,
svg,
video,
canvas,
audio,
iframe,
embed,
object {
  display: block;
  vertical-align: middle;
}

img,
video {
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: inherit;
}

button,
input,
optgroup,
select,
textarea {
  font-family: inherit;
  font-size: 100%;
  font-weight: inherit;
  line-height: inherit;
  color: inherit;
  margin: 0;
  padding: 0;
}

/* ==========================================================================
   3. Tailwind Utility Primitives
   ========================================================================== */

/* Layout & Display */
.block { display: block; }
.inline-block { display: inline-block; }
.inline { display: inline; }
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.grid { display: grid; }
.hidden { display: none; }

/* Flexbox & Grid Alignment */
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-start { justify-content: flex-start; }
.justify-end { justify-content: flex-end; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 0.25rem; }
.gap-1\.5 { gap: 0.375rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }

/* Grid Columns */
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }

@media (min-width: 768px) {
  .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1024px) {
  .lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .lg\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* Sizing Primitives */
.w-full { width: 100%; }
.h-full { height: 100%; }
.w-4 { width: 1rem; }
.h-4 { height: 1rem; }
.w-5 { width: 1.25rem; }
.h-5 { height: 1.25rem; }
.w-6 { width: 1.5rem; }
.h-6 { height: 1.5rem; }
.w-12 { width: 3rem; }
.h-12 { height: 3rem; }
.min-h-screen { min-height: 100vh; }
.aspect-video { aspect-ratio: 16 / 9; }
.object-cover { object-fit: cover; }

/* Max-Width Containers */
.max-w-xl { max-width: 36rem; }
.max-w-2xl { max-width: 42rem; }
.max-w-5xl { max-width: 64rem; }
.max-w-7xl { max-width: 80rem; }
.mx-auto { margin-left: auto; margin-right: auto; }

/* Spacing (Padding & Margins) */
.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-6 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.py-12 { padding-top: 3rem; padding-bottom: 3rem; }
.py-20 { padding-top: 5rem; padding-bottom: 5rem; }
.pt-4 { padding-top: 1rem; }
.pb-6 { padding-bottom: 1.5rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-5 { margin-bottom: 1.25rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-10 { margin-bottom: 2.5rem; }
.mb-12 { margin-bottom: 3rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-12 { margin-top: 3rem; }

@media (min-width: 640px) {
  .sm\:px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
  .sm\:gap-8 { gap: 2rem; }
  .sm\:text-left { text-align: left; }
  .sm\:text-4xl { font-size: 2.25rem; line-height: 2.5rem; }
  .sm\:text-base { font-size: 1rem; line-height: 1.5rem; }
}

@media (min-width: 1024px) {
  .lg\:px-8 { padding-left: 2rem; padding-right: 2rem; }
}

/* Typography */
.text-left { text-align: left; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.font-mono { font-family: var(--font-mono); }
.font-normal { font-weight: 400; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.font-extrabold { font-weight: 800; }
.tracking-tight { letter-spacing: -0.025em; }
.tracking-wider { letter-spacing: 0.05em; }
.uppercase { text-transform: uppercase; }
.leading-snug { line-height: 1.375; }
.leading-relaxed { line-height: 1.625; }

/* Font Sizes */
.text-xs { font-size: 0.75rem; line-height: 1rem; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-base { font-size: 1rem; line-height: 1.5rem; }
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.text-2xl { font-size: 1.5rem; line-height: 2rem; }
.text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
.text-4xl { font-size: 2.25rem; line-height: 2.5rem; }

/* Text & Accent Colors */
.text-white { color: #ffffff; }
.text-slate-100 { color: #f1f5f9; }
.text-slate-200 { color: #e2e8f0; }
.text-slate-300 { color: #cbd5e1; }
.text-slate-400 { color: #94a3b8; }
.text-slate-600 { color: #475569; }
.text-slate-950 { color: #020617; }
.text-cyan-300 { color: #67e8f9; }
.text-cyan-400 { color: #22d3ee; }
.text-cyan-500 { color: #06b6d4; }

/* Backgrounds & Glassmorphism */
.bg-slate-950 { background-color: #020617; }
.bg-slate-900 { background-color: #0f172a; }
.bg-slate-900\/40 { background-color: rgba(15, 23, 42, 0.4); }
.bg-slate-900\/60 { background-color: rgba(15, 23, 42, 0.6); }
.bg-slate-900\/80 { background-color: rgba(15, 23, 42, 0.8); }
.bg-slate-800 { background-color: #1e293b; }
.bg-cyan-500 { background-color: #06b6d4; }
.bg-cyan-500\/10 { background-color: rgba(6, 182, 212, 0.1); }
.bg-cyan-500\/20 { background-color: rgba(6, 182, 212, 0.2); }
.backdrop-blur-sm { backdrop-filter: blur(4px); }
.backdrop-blur-md { backdrop-filter: blur(12px); }

/* Borders & Rounded Corners */
.border { border-width: 1px; }
.border-t { border-top-width: 1px; }
.border-b { border-bottom-width: 1px; }
.border-slate-800 { border-color: #1e293b; }
.border-slate-800\/60 { border-color: rgba(30, 41, 59, 0.6); }
.border-slate-800\/80 { border-color: rgba(30, 41, 59, 0.8); }
.border-slate-700 { border-color: #334155; }
.border-cyan-500\/20 { border-color: rgba(6, 182, 212, 0.2); }
.border-cyan-500\/50 { border-color: rgba(6, 182, 212, 0.5); }
.rounded { border-radius: 0.25rem; }
.rounded-md { border-radius: 0.375rem; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-xl { border-radius: 0.75rem; }
.rounded-2xl { border-radius: 1rem; }
.rounded-full { border-radius: 9999px; }

/* Transitions & Transforms */
.transition-all { transition-property: all; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); }
.transition-colors { transition-property: color, background-color, border-color, fill, stroke; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); }
.transition-transform { transition-property: transform; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); }
.duration-200 { transition-duration: 200ms; }
.duration-300 { transition-duration: 300ms; }

/* Interactive Hover States */
.hover\:bg-cyan-400:hover { background-color: #22d3ee; }
.hover\:text-cyan-400:hover { color: #22d3ee; }
.hover\:text-cyan-300:hover { color: #67e8f9; }
.hover\:border-cyan-500\/50:hover { border-color: rgba(6, 182, 212, 0.5); }
.hover\:shadow-xl:hover { box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.5); }
.hover\:shadow-cyan-500\/5:hover { box-shadow: 0 20px 25px -5px rgba(6, 182, 212, 0.05), 0 8px 10px -6px rgba(6, 182, 212, 0.05); }

/* Focus States */
.focus\:outline-none:focus { outline: 2px solid transparent; outline-offset: 2px; }
.focus\:ring-2:focus { box-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color); }
.focus\:ring-cyan-500:focus { --tw-ring-color: #06b6d4; }

/* Group Hover Utilities */
.group:hover .group-hover\:scale-105 { transform: scale(1.05); }
.group:hover .group-hover\:text-cyan-400 { color: #22d3ee; }
.group:hover .group-hover\:text-cyan-300 { color: #67e8f9; }
.group:hover .group-hover\:translate-x-1 { transform: translateX(0.25rem); }

/* Text Clamping (Truncation) */
.line-clamp-3 {
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.overflow-hidden { overflow: hidden; }

/* ==========================================================================
   4. Component Specifications (Pagination & Controls)
   ========================================================================== */
.codepaks-pagination .nav-links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.codepaks-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  height: 2.5rem;
  padding: 0 0.75rem;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 0.5rem;
  background-color: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(30, 41, 59, 0.8);
  color: #94a3b8;
  transition: all 200ms cubic-bezier(0.4, 0, 0.2, 1);
}

.codepaks-pagination .page-numbers:hover {
  border-color: rgba(6, 182, 212, 0.5);
  color: #22d3ee;
}

.codepaks-pagination .page-numbers.current {
  background-color: #06b6d4;
  border-color: #06b6d4;
  color: #020617;
  box-shadow: 0 0 15px rgba(6, 182, 212, 0.35);
}

.codepaks-pagination .page-numbers.dots {
  background-color: transparent;
  border-color: transparent;
  color: #475569;
}

/* Accessibility Screen Reader Utility */
.screen-reader-text,
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border-width: 0 !important;
}

.screen-reader-text:focus,
.sr-only:focus {
  position: fixed !important;
  top: 1rem !important;
  left: 1rem !important;
  z-index: 999999 !important;
  width: auto !important;
  height: auto !important;
  padding: 0.75rem 1.25rem !important;
  margin: 0 !important;
  overflow: visible !important;
  clip: auto !important;
  white-space: normal !important;
  background-color: #0f172a !important;
  color: #22d3ee !important;
  border: 1px solid #06b6d4 !important;
  border-radius: 0.5rem !important;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.8) !important;
}

/* ==========================================================================
   5. List Resets, Responsive Grid & Micro Icons Patch
   ========================================================================== */
ul, ol {
  list-style: none;
}

.w-2 { width: 0.5rem; }
.h-2 { height: 0.5rem; }
.w-3\.5 { width: 0.875rem; }
.h-3\.5 { height: 0.875rem; }
.w-8 { width: 2rem; }
.h-8 { height: 2rem; }

.space-y-2\.5 > :not([hidden]) ~ :not([hidden]) {
  margin-top: 0.625rem;
}

.bg-emerald-400 {
  background-color: #34d399;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .4; }
}

.animate-pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@media (min-width: 1024px) {
  .lg\:grid-cols-5 {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
  .lg\:col-span-2 {
    grid-column: span 2 / span 2;
  }
  .lg\:gap-12 {
    gap: 3rem;
  }
  .lg\:py-16 {
    padding-top: 4rem;
    padding-bottom: 4rem;
  }
}

/* ==========================================================================
   6. Legal & Documentation Typography Engine (.entry-content)
   ========================================================================== */
.entry-content p {
  margin-bottom: 1.25rem;
  line-height: 1.75;
}

.entry-content h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #ffffff;
  margin-top: 2rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(30, 41, 59, 0.6);
}

.entry-content h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #f1f5f9;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

.entry-content ul {
  list-style-type: disc;
  padding-left: 1.5rem;
  margin-bottom: 1.25rem;
}

.entry-content li {
  margin-bottom: 0.5rem;
}

.entry-content a {
  color: #22d3ee;
  text-decoration: underline;
  text-underline-offset: 4px;
  transition: color 150ms ease;
}

.entry-content a:hover {
  color: #67e8f9;
}

/* ==========================================================================
   7. Positioning, Search & Giant Typography Primitives
   ========================================================================== */
.relative { position: relative; }
.absolute { position: absolute; }
.right-1\.5 { right: 0.375rem; }
.pl-4 { padding-left: 1rem; }
.pr-24 { padding-right: 6rem; }
.select-none { user-select: none; }
.bg-rose-500 { background-color: #f43f5e; }
.min-h-\[70vh\] { min-height: 70vh; }

.text-7xl { font-size: 4.5rem; line-height: 1; }
@media (min-width: 640px) {
  .sm\:text-9xl { font-size: 8rem; line-height: 1; }
}

.focus\:border-cyan-500:focus {
  border-color: #06b6d4;
  box-shadow: 0 0 15px rgba(6, 182, 212, 0.2);
}