/* Shared styles for every page on sahilramane.com. Pages add their own <style> or sheet on top. */
/* @nav-bundle:start (also emitted to nav.css by _tools/build_site.py; hotcold loads only this part) */
:root {
  --bg: #fbfbf9;
  --surface: #ffffff;
  --surface-2: #f1f1ed;
  --text: #16171a;
  --muted: #5f636b;
  --line: #e4e4de;
  --accent: #0a6cc2;
  --accent-ink: #ffffff;
  --shadow: 0 1px 2px rgba(16, 18, 24, .06), 0 8px 24px rgba(16, 18, 24, .08);
  --radius: 14px;
  --nav-h: 60px;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e0f11;
    --surface: #17181b;
    --surface-2: #202226;
    --text: #ececea;
    --muted: #9a9ea6;
    --line: #2a2c31;
    --accent: #5aa9ee;
    --accent-ink: #07131f;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .35);
  }
}


.site-nav, .site-nav * { box-sizing: border-box; }
.site-nav a, .site-nav a:hover { text-decoration: none; }

/* ---------- nav ---------- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--nav-h);
  padding: .5rem max(1.25rem, env(safe-area-inset-left)) .5rem max(1.25rem, env(safe-area-inset-right));
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-nav .brand { color: var(--text); font-weight: 700; letter-spacing: -.01em; white-space: nowrap; }
.site-nav .brand:hover { text-decoration: none; }
.site-nav nav { display: flex; flex-wrap: wrap; gap: .25rem; justify-content: flex-end; }
.site-nav nav a {
  color: var(--muted);
  font-weight: 500;
  font-size: .95rem;
  padding: .35rem .75rem;
  border-radius: 999px;
  transition: color .15s, background-color .15s;
}
.site-nav nav a:hover { color: var(--text); background: var(--surface-2); text-decoration: none; }
.site-nav nav a[aria-current="page"] { color: var(--text); background: var(--surface-2); }

@media (max-width: 560px) {
  :root { --nav-h: 96px; }
  .site-nav { flex-direction: column; align-items: flex-start; gap: .25rem; padding-top: .6rem; padding-bottom: .6rem; }
  .site-nav nav { justify-content: flex-start; margin-left: -.75rem; }
}

/* @nav-bundle:end */

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

html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--nav-h) + 12px); }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.65 var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  min-height: 100dvh;
}

img, video { max-width: 100%; height: auto; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

/* ---------- layout ---------- */
.page { width: min(100% - 2.5rem, 1100px); margin: 0 auto; padding: 2.5rem 0 4rem; }
.page.narrow { width: min(100% - 2.5rem, 760px); }

h1, h2, h3 { line-height: 1.2; letter-spacing: -.02em; margin: 0 0 .6em; }
h1 { font-size: clamp(2rem, 4vw + 1rem, 3rem); font-weight: 700; }
h2 { font-size: 1.35rem; font-weight: 650; color: var(--text); }
p { margin: 0 0 1.1em; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 46ch; }
.muted { color: var(--muted); }

.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .55rem 1.1rem; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); color: var(--text);
  font: 500 .95rem var(--font); cursor: pointer;
  transition: background-color .15s, border-color .15s, transform .08s;
}
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.08); background: var(--accent); }

.sr-only {
  position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
