/* 100ish — one stylesheet. No framework, no animations, no tracking.
   Colours come from the logo artwork: the page sits on the same off-white
   paper the wordmark was painted on, ink is the charcoal of the "100", and
   links are the teal of the "ish" (darkened until it passes AA on paper). */

:root {
  --paper:     #f1f1eb;   /* the logo's paper, sampled from the artwork */
  --paper-2:   #e9e9e1;   /* code blocks, quiet fills */
  --text:      #1f1f1b;   /* charcoal — 14.6:1 on paper */
  --muted:     #5c5c52;   /* 6.0:1 on paper */
  --link:      #16697d;   /* teal, darkened to 5.5:1 on paper */
  --link-vis:  #16697d;
  --rule:      #d3d3c5;   /* hairline */
  --measure:   38rem;
}

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 18px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 1.75rem 1.25rem 4rem;
}

a { color: var(--link); text-decoration: none; }
a:hover, a:focus { text-decoration: underline; }
a:visited { color: var(--link-vis); }

/* --- header ------------------------------------------------------------- */

header.site {
  border-bottom: 1px dashed var(--rule);
  margin-bottom: 2.25rem;
  padding-bottom: 1rem;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.5rem 1rem;
}
header.site nav { flex-basis: 100%; }

/* The wordmark is drawn the full width of the column: the tagline inside the
   artwork is too small to read at header-icon sizes, and it IS the brand line.
   The nav keeps its own row below it (flex-basis on the brand). */
header.site .brand {
  display: block;
  flex: 1 1 100%;
  line-height: 0;              /* no descender gap under the image */
  color: var(--text);
}
header.site .brand img { display: block; width: 100%; height: auto; }
header.site .brand:hover, header.site .brand:focus { text-decoration: none; }

header.site nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.9rem;
}
header.site nav a.button { font-weight: 600; }

p.tagline {
  color: var(--muted);
  font-size: 0.95rem;
  /* its own air: without this the line reads as a subtitle of the first post */
  margin: 0.4rem 0 2.1rem;
}

/* --- post list ---------------------------------------------------------- */

ol.posts { list-style: none; margin: 0; padding: 0; }

ol.posts > li {
  padding: 0 0 1.75rem;
  margin: 0 0 1.75rem;
  border-bottom: 1px dashed var(--rule);
}
ol.posts > li:last-child { border-bottom: 0; }

/* The front page carries whole posts, so they need more air between them and
   a title that reads as a title, not as a list row. */
ol.posts.latest > li {
  padding-bottom: 3rem;
  margin-bottom: 3rem;
}
ol.posts.latest h2.post-title {
  font-size: 1.55rem;
  margin-bottom: 0.35rem;
}
ol.posts.latest .post-body p:last-child { margin-bottom: 0.6rem; }

ol.posts h2 {
  font-size: 1.3rem;
  line-height: 1.3;
  margin: 0 0 0.3rem;
  letter-spacing: -0.01em;
}
ol.posts h2 a { color: var(--text); }
ol.posts h2 a:hover { color: var(--link); }

.post-meta {
  color: var(--muted);
  font-size: 0.87rem;
  margin: 0 0 0.5rem;
}

p.excerpt { margin: 0 0 0.6rem; }
p.more { margin: 0; font-size: 0.95rem; }

/* --- article ------------------------------------------------------------ */

article h1 {
  font-size: 1.85rem;
  line-height: 1.22;
  letter-spacing: -0.02em;
  margin: 0 0 0.4rem;
}

article h2 { font-size: 1.3rem; margin: 2rem 0 0.5rem; }
article h3 { font-size: 1.1rem; margin: 1.6rem 0 0.4rem; }

article p, article li { margin: 0 0 1.1rem; }
article ul, article ol { padding-left: 1.35rem; }
article ul li, article ol li { margin-bottom: 0.4rem; }

article blockquote {
  margin: 1.5rem 0;
  padding-left: 1rem;
  border-left: 3px solid var(--rule);
  color: var(--muted);
}

article code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
  background: var(--paper-2);
  padding: 0.1em 0.3em;
  border-radius: 3px;
}

article pre {
  background: var(--paper-2);
  padding: 0.9rem 1rem;
  overflow-x: auto;
  border-radius: 4px;
}
article pre code { background: none; padding: 0; }

article img { max-width: 100%; height: auto; }

article hr { border: 0; border-top: 1px dashed var(--rule); margin: 2rem 0; }

/* --- share row ---------------------------------------------------------- */

.share {
  margin: 2.5rem 0 0;
  padding-top: 1rem;
  border-top: 1px dashed var(--rule);
  font-size: 0.9rem;
  color: var(--muted);
}
.share .share-label { margin-right: 0.35rem; }
.share a, .share button {
  font: inherit;
  color: var(--link);
  background: none;
  border: 0;
  padding: 0;
  margin: 0 0.55rem 0 0;
  cursor: pointer;
}
.share a:hover, .share button:hover { text-decoration: underline; }

/* --- pager -------------------------------------------------------------- */

.pager {
  margin: 2rem 0 0;
  padding-top: 1rem;
  border-top: 1px dashed var(--rule);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.95rem;
}
.pager .next { text-align: right; margin-left: auto; }

/* --- support + footer --------------------------------------------------- */

.support {
  margin: 2.5rem 0 0;
  font-size: 0.9rem;
  color: var(--muted);
}

footer.site {
  margin-top: 3.5rem;
  padding-top: 1.25rem;
  border-top: 1px dashed var(--rule);
  font-size: 0.87rem;
  color: var(--muted);
}
footer.site p { margin: 0 0 0.5rem; }
footer.site a { color: var(--link); }
footer.site .ish-mark { letter-spacing: 0.08em; }

.feed {
  font-size: 0.95rem;
}

/* --- archive ------------------------------------------------------------ */

h2.archive-year {
  font-size: 1.05rem;
  color: var(--muted);
  letter-spacing: 0.02em;
  margin: 2.25rem 0 0.7rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px dashed var(--rule);
}

ol.archive { list-style: none; margin: 0; padding: 0; }
ol.archive > li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.6rem;
  margin: 0 0 0.55rem;
}
ol.archive .archive-date {
  color: var(--muted);
  font-size: 0.85rem;
  white-space: nowrap;
  min-width: 8.5rem;
}

/* --- phone -------------------------------------------------------------- */

@media (max-width: 480px) {
  body { font-size: 17px; }
  .wrap { padding: 1.25rem 1rem 3rem; }
  article h1 { font-size: 1.6rem; }
  ol.posts h2 { font-size: 1.2rem; }
  .pager { display: block; }
  .pager .next { text-align: left; margin-left: 0; margin-top: 0.4rem; }
  ol.archive > li { display: block; }
  ol.archive .archive-date { display: block; min-width: 0; }
}
