

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Fira+Code&display=swap');
/* ===== MAIN CSS ENTRY POINT =====
 * PostCSS processes this file. Source partials live in src/.
 * Build: npm run build:css  →  writes to styles/main.css
 */
/* ===== DESIGN TOKENS (Vercel-inspired) =====
 * All design values live here as CSS custom properties.
 * Dark = default (matches Vercel's dark-first aesthetic).
 * Toggle is handled by html[data-theme] set in the inline script.
 */
:root {
  /* Fallback: pure-black dark theme */
  --color-page-bg: #000;
  --color-section-bg: #111;
  --color-card-bg: #0a0a0a;
  --color-card-border: rgb(255 255 255 / 10%);
  --color-section-border: rgb(255 255 255 / 10%);
  --color-title-text: #ededed;
  --color-text: #888;
  --color-footer-text: #444;
  --color-accent: #0070f3;
  --color-red: #ff4d4d;
  --color-yellow: #f5a623;
  --color-green: #50e3c2;

  /* Typography */
  --font-sans: 'Inter', -apple-system, blinkmacsystemfont, 'Segoe UI', roboto, sans-serif;
  --font-mono: 'Fira Code', 'JetBrains Mono', 'Cascadia Code', monospace;

  /* Spacing & shape */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --shadow-card: 0 0 0 1px var(--color-card-border);
}
/* ==== DARK THEME ==== */
html[data-theme='dark'] {
  --color-page-bg: #000;
  --color-section-bg: #111;
  --color-card-bg: #0a0a0a;
  --color-card-border: rgb(255 255 255 / 10%);
  --color-section-border: rgb(255 255 255 / 10%);
  --color-title-text: #ededed;
  --color-text: #888;
  --color-footer-text: #444;
  --color-accent: #0070f3;
  --color-red: #ff4d4d;
  --color-yellow: #f5a623;
  --color-green: #50e3c2;
  --shadow-card: 0 0 0 1px var(--color-card-border);
}
/* ==== LIGHT THEME ==== */
html[data-theme='light'] {
  --color-page-bg: #fff;
  --color-section-bg: #fafafa;
  --color-card-bg: #fff;
  --color-card-border: rgb(0 0 0 / 8%);
  --color-section-border: rgb(0 0 0 / 6%);
  --color-title-text: #111;
  --color-text: #444;
  --color-footer-text: #888;
  --color-accent: #0070f3;
  --color-red: #e00;
  --color-yellow: #c77d00;
  --color-green: #007d5c;
  --shadow-card: 0 2px 8px rgb(0 0 0 / 6%);
}
/* ===== MINIMAL RESET =====
 * Removes browser default margins, enforces box-sizing,
 * and smooths rendering. No opinionated normalization.
 */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
/* Also remove default body margin here to avoid a duplicate body rule in the compiled output. */
body {
  margin: 0;
}
img,
svg {
  display: block;
  max-width: 100%;
}
button {
  cursor: pointer;
  font-family: inherit;
}
/* ===== TYPOGRAPHY =====
 * Inter for UI text; Fira Code for monospace / code.
 * Both available from Google Fonts.
 */
body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text);
}
h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--color-title-text);
  font-weight: 600;
  line-height: 1.25;
  margin-top: 0;
  margin-bottom: 0.75rem;
}
h1 {
  font-size: 2rem;
}
h2 {
  font-size: 1.5rem;
}
h3 {
  font-size: 1.125rem;
}
p {
  margin-top: 0;
  margin-bottom: 1rem;
}
a {
  color: var(--color-accent);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
code,
pre,
kbd {
  font-family: var(--font-mono);
}
/* ===== LAYOUT =====
 * Page wrapper, section containers, grid, and footer.
 */
body {
  background-color: var(--color-page-bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem 1rem;
  min-height: 100vh;
}
/* ---- Section ---- */
section {
  background: var(--color-section-bg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-section-border);
  padding: 1.5rem;
  margin-bottom: 2rem;
  width: 100%;
  max-width: 800px;
  box-shadow: var(--shadow-card);
}
/* ---- Section title row ---- */
.section-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--color-title-text);
}
/* ---- Responsive card grid ---- */
.grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}
/* ---- Footer ---- */
footer {
  margin-top: auto;
  padding-top: 3rem;
  color: var(--color-footer-text);
  font-size: 0.875rem;
  text-align: center;
}
/* ===== COMPONENTS =====
 * Reusable UI pieces: cards, nav, theme toggle.
 */
/* ---- Card ---- */
.card {
  background: var(--color-card-bg);
  border: 1px solid var(--color-card-border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}
.card:hover {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 1px var(--color-accent);
}
a.card {
  color: inherit;
  text-decoration: none;
  display: block;
}
a.card h3 {
    color: var(--color-title-text);
    margin-bottom: 0.5rem;
  }
a.card p {
    color: var(--color-text);
    margin-bottom: 0;
  }
a.card .date {
    color: var(--color-yellow);
    font-size: 0.85rem;
  }
/* ---- Site home link (top-left fixed) ---- */
.site-home-link {
  position: fixed;
  top: 1rem;
  left: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--color-title-text);
  font-size: 0.9rem;
  font-weight: 500;
  z-index: 1000;
}
.site-home-link:hover {
    color: var(--color-accent);
    text-decoration: none;
  }
.site-logo {
  width: 22px;
  height: 22px;
  border-radius: var(--radius-sm);
}
/* ---- Theme toggle (top-right fixed) ---- */
#theme-toggle-container {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 1000;
}
.theme-toggle {
  background: transparent;
  border: 1px solid var(--color-card-border);
  color: var(--color-title-text);
  font-size: 1rem;
  padding: 0.35rem 0.6rem;
  border-radius: var(--radius-md);
  transition:
    background 0.15s ease,
    border-color 0.15s ease;
}
.theme-toggle:hover {
    background: var(--color-section-bg);
    border-color: var(--color-accent);
  }
