/* =========================
   CSS RESET / NORMALIZE
   ========================= */

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

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

body {
  min-height: 100vh;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* =========================
   CSS VARIABLES
   ========================= */

:root {
  --color-bg: #0f172a;          /* dark slate */
  --color-surface: #111827;     /* cards / nav */
  --color-text: #e5e7eb;        /* main text */
  --color-muted: #9ca3af;       /* secondary text */
  --color-primary: #38bdf8;     /* accent */
  --color-primary-hover: #0ea5e9;
  --color-border: #1f2937;

  --max-width: 1200px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
}

/* =========================
   TYPOGRAPHY
   ========================= */

h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.25;
  color: #fff;
}

h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2.25rem); }
h3 { font-size: 1.25rem; }

p {
  margin-top: 0.75rem;
  color: var(--color-text);
}

small {
  font-size: 0.85rem;
  color: var(--color-muted);
}

/* =========================
   LINKS
   ========================= */

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

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

/* =========================
   LAYOUT HELPERS
   ========================= */

.container {
  max-width: var(--max-width);
  margin-inline: auto;
  padding: 1.25rem;
}

.section {
  padding: 4rem 0;
}

.grid {
  display: grid;
  gap: 2rem;
}

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

/* =========================
   BUTTONS
   ========================= */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius-sm);
  font-weight: 500;
  border: 1px solid transparent;
  cursor: pointer;
  background: var(--color-primary);
  color: #000;
  transition: background 0.2s ease, transform 0.1s ease;
}

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

.button:active {
  transform: translateY(1px);
}

.button.outline {
  background: transparent;
  border-color: var(--color-border);
  color: var(--color-text);
}

.button.outline:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

/* =========================
   CARDS
   ========================= */

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
}

/* =========================
   IMAGES
   ========================= */

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

/* =========================
   FORMS
   ========================= */

input,
textarea {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  background: #020617;
  color: var(--color-text);
}

input:focus,
textarea:focus {
  outline: none;
  border-color: var(--color-primary);
}

/* =========================
   UTILITIES
   ========================= */

.text-center {
  text-align: center;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 2rem; }

.hidden {
  display: none;
}

/* =========================
   ACCESSIBILITY
   ========================= */

:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* Base layout */
.navbar {
  background: #111;
  color: #fff;
  width: 100%;
  position: relative;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.25rem;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Brand */
.brand {
  font-size: 1.25rem;
  font-weight: 600;
  white-space: nowrap;
}

/* Links */
.nav-links {
  display: flex;
  list-style: none;
  gap: 1.5rem;
}

.nav-links a {
  color: #fff;
  text-decoration: none;
  font-size: 0.95rem;
}

.nav-links a:hover {
  opacity: 0.8;
}

/* Hamburger */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
}

.menu-toggle span {
  width: 24px;
  height: 2px;
  background: white;
  display: block;
}

/* Mobile */
@media (max-width: 768px) {
  .menu-toggle {
    display: flex;
  }

  .nav-links {
    position: absolute;
    top: 64px;
    left: 0;
    width: 100%;
    background: #111;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 1rem 0;
    display: none;
  }

  .nav-links.open {
    display: flex;
  }
}



    .footer { 
        display: flex;
        justify-content: center;
    .container {
        display: flex;
        flex-direction: row;
        gap: 40px;
    }
}

.post-nav {
    padding: 40px 0;
    .pager {
        list-style-type: none;
        display: flex;
        flex-direction: row;
        gap: 10px;
    }
}


.two-column {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem;
    display: flex;
    gap: 2rem;

    /* Main content */
    .content {
        flex: 3;
        min-width: 0;
    }

    /* Sidebar */
    .sidebar {
        flex: 1;
        padding: 0 1.25rem;
        border-radius: 8px;
    }

    /* Responsive: stack on mobile */
    @media (max-width: 768px) {

        flex-direction: column;
    

    .sidebar {
        order: 2;
    }

    .content {
        order: 1;
    }
    }


}







/* =========================
   CODE BLOCKS
   ========================= */

pre {
  background: #0f172a; /* deep slate */
  color: #e5e7eb;
  padding: 1.25rem 1.5rem;
  border-radius: 12px;
  overflow-x: auto;
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 2rem 0;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  position: relative;
}

/* Optional subtle accent bar */
pre::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(
    to bottom,
    #38bdf8,
    #6366f1
  );
  border-radius: 12px 0 0 12px;
}

/* Code text */
pre code {
  font-family: "JetBrains Mono", "Fira Code", "Source Code Pro",
    Consolas, monospace;
  font-size: 0.95rem;
  background: none;
  padding: 0;
  color: inherit;
}

/* Inline code */
code {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  padding: 0.15em 0.4em;
  border-radius: 6px;
  font-size: 0.9em;
}

/* Scrollbar (WebKit) */
pre::-webkit-scrollbar {
  height: 8px;
}

pre::-webkit-scrollbar-track {
  background: transparent;
}

pre::-webkit-scrollbar-thumb {
  background: #334155;
  border-radius: 999px;
}

pre::-webkit-scrollbar-thumb:hover {
  background: #475569;
}

/* Selection */
pre code::selection {
  background: rgba(99, 102, 241, 0.35);
}

/* Optional language label */
pre[data-lang]::after {
  content: attr(data-lang);
  position: absolute;
  top: 10px;
  right: 14px;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #94a3b8;
}



