/* One narrow column, left aligned, no cards and no shadows.
   Proportions follow benjaminfleischer.com: a 640px column, a Palatino-ish
   serif for prose, and Helvetica for the post list and other metadata. */

:root {
  --fg: #333;
  --muted: #777;
  --link: #227ce8;
  --rule: #ddd;
  --serif: "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  --sans: Helvetica, Arial, sans-serif;
}

/* The page is wide enough for the home page's second column; prose stays at
   the 640px measure so the reading width never changes. */
body {
  max-width: 940px;
  margin: 2.5rem 1.25rem;
  font-family: var(--serif);
  font-size: 14px;
  line-height: 1.5;
  color: var(--fg);
  background: #fff;
}

article, .home-main, form, header { max-width: 640px; }

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

.quiet { color: var(--muted); }
.error { color: #a00; }

/* Header and metadata rows are sans, like the reference. The nav copies the
   reference's sidebar links exactly: stacked, black, bold, 12px, blue only on
   hover. */
header { margin-bottom: 2rem; }
header nav { margin-top: 15px; font-family: var(--sans); }
header nav ul { margin: 0; padding: 0; list-style: none; }
header nav li { margin-bottom: 7px; }
header nav a {
  display: block;
  padding: 3px 0;
  font-size: 12px;
  font-weight: bold;
  color: #000;
  text-decoration: none;
}
header nav a:hover { color: var(--link); text-decoration: none; }

.meta { font-family: var(--sans); font-size: 13px; color: var(--muted); }
.meta a { margin-right: 0.75rem; }
.meta span { margin-right: 0.75rem; }

h1 { font-size: 1.3rem; font-weight: normal; margin: 0 0 0.75rem; }
h2 {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: bold;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 2rem 0 0.5rem;
}
h3 { font-size: 1rem; margin: 1.5rem 0 0.5rem; }

/* The index: a title, and a date floated to the right. */
.posts { list-style: none; padding: 0; margin: 1rem 0 0; }
.posts li {
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.4;
  padding: 5px 3px;
}
.posts li::after { content: ""; display: block; clear: both; }
.posts time {
  float: right;
  margin-left: 1.5rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.posts .tag { color: var(--muted); margin-left: 0.5rem; }
.posts form.inline { margin-left: 0.75rem; }

article :is(p, ul, ol, pre, blockquote) { margin: 0 0 1rem; }
blockquote { margin-left: 0; padding-left: 1rem; border-left: 2px solid var(--rule); color: #555; }
pre { overflow-x: auto; padding: 0.75rem; background: #f6f6f6; font-size: 12px; }
code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 0.9em; }
pre code { font-size: inherit; }
hr { border: 0; border-top: 1px solid var(--rule); margin: 2rem 0; }
img { max-width: 100%; }

/* Resume */
.resume .headline { margin: 0 0 0.35rem; }
.resume .summary { margin: 1rem 0 0; }
.resume section { margin-top: 0.5rem; }
.resume .entry { margin-bottom: 1.1rem; }
.resume .entry-head { margin: 0 0 0.3rem; }
.resume .entry-head::after { content: ""; display: block; clear: both; }
.resume .entry-head time {
  float: right;
  margin-left: 1.5rem;
  font-family: var(--sans);
  font-size: 13px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.resume .entry-head .quiet { font-family: var(--sans); font-size: 12px; margin-left: 0.5rem; }
.resume .entry ul, .resume .items { margin: 0; padding-left: 1.1rem; }
.resume .entry li, .resume .items li { margin-bottom: 0.15rem; }

/* Forms */
label { display: block; margin: 1rem 0 0.25rem; font-family: var(--sans); font-size: 13px; }
label.check { display: inline; }
input[type="text"], input[type="password"], input[type="date"], textarea {
  width: 100%;
  padding: 0.4rem;
  border: 1px solid #ccc;
  font: inherit;
  background: #fff;
  color: inherit;
}
textarea { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px; }
button {
  font-family: var(--sans);
  font-size: 13px;
  padding: 0.35rem 0.9rem;
  border: 1px solid #ccc;
  background: #f6f6f6;
}
form.inline { display: inline; }
button.linkish {
  border: 0;
  background: none;
  padding: 0;
  font-size: 13px;
  color: var(--link);
  cursor: pointer;
}
button.linkish:hover { text-decoration: underline; }
.preview:not(:empty) { margin-top: 2rem; border-top: 1px solid var(--rule); padding-top: 1rem; }

@media (max-width: 32rem) {
  /* margin-left is the gutter beside the float; once stacked it is an indent. */
  .posts time, .resume .entry-head time {
    float: none;
    display: block;
    margin-left: 0;
  }
}

/* Portrait in the header, like the reference site's sidebar photo. */
.avatar {
  display: block;
  width: 96px;
  height: 96px;
  border-radius: 5px;
}

/* Home page: posts in the main column, repositories stacked on the right. */
.home {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 250px;
  gap: 3rem;
  align-items: start;
}
.home-side h2 { margin-top: 0; }

.repolist { list-style: none; padding: 0; margin: 1rem 0 0; }
.repolist li {
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.4;
  margin-bottom: 0.9rem;
}
.repolist .tag {
  margin-left: 0.4rem;
  font-size: 11px;
  color: var(--muted);
}
.repolist .desc,
.repolist time {
  display: block;
  color: var(--muted);
  font-size: 12px;
}
.repolist .desc { margin-top: 0.1rem; }
.repolist time { font-variant-numeric: tabular-nums; }

/* Below the breakpoint the two columns stack; the aside follows the posts. */
@media (max-width: 46rem) {
  .home { grid-template-columns: 1fr; gap: 2rem; }
}

/* Markdown tables (GFM). Kept flat: rules, no fills, no borders around cells. */
article table {
  border-collapse: collapse;
  margin: 0 0 1rem;
  font-size: 13px;
}
article th, article td {
  padding: 0.3rem 0.9rem 0.3rem 0;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--rule);
}
article th { font-weight: bold; }
article del { color: var(--muted); }
