@font-face {
  font-family: "A028";
  src: url("/fonts/A028-Med.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  --color-black: #1a1a1a;
  --color-red: #CF142B;
  --color-red-dark: #a8101f;
  --color-bg: #fafaf8;
  --color-text: #2c2c2c;
  --color-text-muted: #6b6b6b;
  --color-border: #e0ddd8;

  --font-heading: "A028", "Palatino Linotype", Palatino, Georgia, serif;
  --font-body: "Source Serif 4", "Source Serif Pro", Georgia, serif;
}

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

body {
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-bg);
}

.container {
  max-width: 640px;
  margin: 0 auto;
  padding: 4rem 1rem;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  color: var(--color-black);
  line-height: 1.2;
  letter-spacing: 0.01em;
}

a {
  color: var(--color-red);
  text-decoration: none;
}

a:hover {
  color: var(--color-red-dark);
  text-decoration: underline;
}

/* Hero / site title */
.hero {
  margin-bottom: 2rem;
}

.site-title {
  font-size: 2.5rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* About section */
.about {
  margin-bottom: 3rem;
}

.about p {
  margin-bottom: 0.75rem;
}

.contact-links a {
  color: var(--color-red);
}

.separator {
  color: var(--color-text-muted);
  margin: 0 0.25em;
}

/* Tube diagram line */
.tube-line {
  --line-offset: 24px;
  --line-width: 3px;
  --dot-total: 14px; /* border-box: border is inside the 14px */
  position: relative;
}

.tube-line::before {
  content: "";
  position: absolute;
  left: calc(-1 * var(--line-offset));
  top: 0;
  bottom: 0;
  width: var(--line-width);
  background: var(--color-red);
}

.tube-line .posts h2 {
  position: relative;
}

.tube-line .posts h2::before {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 3px solid var(--color-black);
  background: var(--color-bg);
  left: calc(-1 * var(--line-offset) - var(--dot-total) / 2 + var(--line-width) / 2);
  top: 50%;
  transform: translateY(-50%);
}

/* Blog post listing */
.posts {
  margin-top: 2rem;
}

.posts h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.posts h2 a {
  color: inherit;
}

.posts h2 a:hover {
  color: var(--color-red);
}

/* Category page header */
.category-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 1rem;
}

.post-list {
  list-style: none;
}

.post-list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--color-border);
}


.post-list time {
  color: var(--color-text-muted);
  font-size: 0.875rem;
  white-space: nowrap;
  margin-left: 1rem;
}

/* Individual blog post */
.post-header {
  margin-bottom: 2rem;
}

.post-date {
  color: var(--color-text-muted);
  font-size: 0.875rem;
}

.post-content p {
  margin-bottom: 1rem;
}

.post-content h2,
.post-content h3 {
  margin-top: 2rem;
  margin-bottom: 0.5rem;
}

.post-nav {
  margin-top: 4rem;
  padding-top: 1rem;
  border-top: 1px solid var(--color-border);
}

/* Footer */
.site-footer {
  margin-top: 2rem;
  padding-top: 1rem;
  font-size: 0.875rem;
  color: var(--color-text-muted);
}
