@font-face {
  font-family: 'Space Mono';
  src: url('/fonts/SpaceMono-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Space Mono';
  src: url('/fonts/SpaceMono-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* =========================
   base/tokens
   ========================= */
*,
*::before,
*::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

:root{
  /* colors */
  --primary: #2563EB;
  --secondary: #52525B;
  --surface: #FAFAFA;
  --on-surface: #18181B;
  --ring: rgba(113, 113, 122, 0.1);

  /* spacing */
  --space-xs: 2px;
  --space-sm: 8px;
  --space-md: 24px;
  --space-lg: 40px;

  /* shape */
  --radius-sm: 6px;

  /* layout */
  --content-width: 760px;
  --gutter: var(--space-md);

  /* font stack */
  --mono-stack: 'Space Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

html { background: var(--surface); color: var(--on-surface); }

/* text-4 */
body{
  font-family: var(--mono-stack);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* defaults for posterity */
img, svg, video, canvas { max-width: 100%; height: auto; display: block; }

/* ========================= nav ========================= */
.site-nav{
  padding-top: var(--space-sm);
  margin-top: var(--gutter);
}
.nav-inner{
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-sm);
}
/* text-2 */
.brand{
  font-size: 20px;
  font-weight: 700;
  line-height: 1.4;
  text-decoration: none;
  color: var(--on-surface);
}
.nav-links{
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm) var(--space-md);
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a{ color: var(--primary); }

/* =========================
   layout
   ========================= */
.nav-inner,
.site-header,
.posts{
  max-width: var(--content-width);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.site-header{
  padding-top: var(--space-lg);
  padding-bottom: var(--space-sm);
}

/* =========================
   typography
   ========================= */
/* text-1 */
h1{
  font-size: 30px;
  font-weight: 900;
  line-height: 1.2;
  margin: 0 0 var(--space-sm) 0;
}

/* text-3 */
h3{
  font-size: 18px;
  font-weight: 700;
  line-height: 1.56;
}

/* text-3 */
.tagline{
  margin: 0;
  color: var(--secondary);
  font-size: 18px;
  font-weight: 400;
  line-height: 1.56;
  font-style: italic;
}

/* text-4 */
.tagline-body{
  margin: 0;
  color: var(--secondary);
}

.site-header hr,
.post hr{
  margin-top: var(--space-md);
  border: 0;
  border-top: 1px solid var(--ring);
}

/* =========================
   posts
   ========================= */
.posts{
  padding-top: var(--space-sm);
  padding-bottom: calc(var(--space-lg) * 2);
}

.post + .post{ margin-top: var(--space-lg); }

/* text-2 */
.post h2{
  font-size: 20px;
  font-weight: 700;
  line-height: 1.4;
  margin: 0 0 var(--space-sm) 0;
  text-transform: none;
}

.post .excerpt{
  margin: 0;
  color: var(--secondary);
  max-width: 65ch;
}

/* =========================
   links & focus
   ========================= */
a{
  color: var(--on-surface);
  text-decoration: none;
}
a:hover,
a:focus{
  text-decoration: underline;
  text-underline-offset: var(--space-xs);
  outline: none;
}
a:focus-visible{
  outline: 2px dashed var(--secondary);
  outline-offset: var(--space-xs);
  border-radius: var(--radius-sm);
}

/* =========================
   large screens
   ========================= */
@media (min-width: 1024px){
  :root{ --gutter: var(--space-lg); }
}
