/* justin.fm: blog and about pages. Same language as the homepage: off-white paper,
   Inter with mono labels, ink type, hairlines, the J mark. */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=JetBrains+Mono:wght@400;500&display=swap");

:root {
  --ink: #14161A;
  --text: #3B3F48;
  --muted: #5A6072;
  --faint: #8A8F99;
  --hair: #E4E8F4;
  --paper: #FAFAFA;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

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

html { height: 100%; }

body {
  font-family: "Inter", -apple-system, "Helvetica Neue", Arial, sans-serif;
  background: var(--paper);
  color: var(--text);
  font-size: 18px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 24px 56px;
}

::selection { background: var(--ink); color: #fff; }

a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid #C9CDD6;
  transition: border-color 0.2s, color 0.2s;
}
a:hover { border-bottom-color: var(--ink); }

.page {
  width: 100%;
  max-width: 680px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.wide-page { max-width: 820px; }

/* header: the J mark and a way back */
.site-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 88px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.site-nav a { border: none; color: var(--muted); }
.site-nav a:hover { color: var(--ink); }
.site-nav .brand { display: flex; align-items: center; gap: 11px; color: var(--muted); }
.site-nav .brand svg { width: 20px; height: 20px; display: block; }
.site-nav .brand svg path { fill: var(--ink); }

h1 {
  color: var(--ink);
  font-weight: 600;
  font-size: 56px;
  line-height: 1;
  letter-spacing: -0.045em;
  margin-bottom: 16px;
}
h2 {
  color: var(--ink);
  font-weight: 600;
  font-size: 24px;
  letter-spacing: -0.025em;
  margin: 56px 0 16px;
}

.post-meta {
  color: var(--faint);
  font-size: 12px;
  font-family: var(--mono);
  text-transform: uppercase;
  margin-bottom: 48px;
  letter-spacing: 0.04em;
}

.post-body p { margin-bottom: 24px; }
.post-body ul { margin: 0 0 24px 20px; }
.post-body li { margin-bottom: 6px; }
.post-body em { color: var(--ink); font-style: italic; }

.lede,
.bio-lead { color: var(--ink); }

.lede {
  font-size: 22px;
  line-height: 1.45;
  margin-bottom: 36px;
}

.bio-lead {
  font-size: 20px;
  line-height: 1.55;
  letter-spacing: -0.01em;
  margin-bottom: 18px;
}

.profile {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 28px;
  align-items: start;
  margin-bottom: 48px;
}

.profile h1 { margin-bottom: 18px; }

.profile-photo {
  display: block;
  width: 96px;
  height: 96px;
  border-radius: 8px;
  object-fit: cover;
  filter: grayscale(1) contrast(1.05);
}

.link-list { list-style: none; }
.link-list li { margin-bottom: 12px; }

.elsewhere {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--hair);
}

/* post index */
.post-list { list-style: none; border-top: 1px solid var(--hair); }
.post-list li { border-bottom: 1px solid var(--hair); }
.post-list a { border: none; display: block; padding: 28px 0 30px; position: relative; }
.post-list .post-date { color: var(--faint); font-size: 12px; font-family: var(--mono); letter-spacing: 0.04em; text-transform: uppercase; margin-bottom: 10px; }
.post-list .post-title { color: var(--ink); font-size: 26px; font-weight: 600; letter-spacing: -0.025em; line-height: 1.15; margin-bottom: 8px; }
.post-list .post-desc { color: var(--muted); font-size: 16px; line-height: 1.55; max-width: 52ch; }
.post-list a::after {
  content: "↗"; position: absolute; right: 0; top: 30px;
  font-size: 15px; color: var(--faint); transition: transform 0.3s cubic-bezier(.2,.8,.2,1), color 0.2s;
}
.post-list a:hover::after { transform: translate(3px, -3px); color: var(--ink); }

/* footer: the homepage's links row */
.site-foot {
  margin-top: 96px;
  padding-top: 18px;
  border-top: 1px solid var(--hair);
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  align-items: baseline;
  font-size: 15px;
  font-weight: 500;
}
.site-foot a { border: none; color: var(--ink); }
.site-foot a:hover { color: var(--muted); }
.site-foot .mail { margin-left: auto; font-weight: 400; color: var(--muted); }

@media (max-width: 578px) {
  body { padding: 28px 20px 40px; font-size: 17px; }
  h1 { font-size: 40px; }
  .site-nav { margin-bottom: 56px; }
  .profile { grid-template-columns: 72px 1fr; gap: 18px; }
  .profile-photo { width: 72px; height: 72px; }
  .lede { font-size: 18px; }
  .site-foot .mail { margin-left: 0; width: 100%; }
}
