/* ---------------------------------------------------------------
   onchukow.com — one stylesheet, no framework.
   Everything is here. Change the values in :root first.
   --------------------------------------------------------------- */

:root {
  --bg: #20201f;          /* RGB 0.125 0.125 0.121 */
  --ink: #ffffff;
  --muted: #9a9a93;
  --rule: #3a3a36;
  --accent: #c4a96a;

  /* Book Antiqua is a Microsoft font. Windows machines have it; Macs fall
     back to Palatino, Linux/Android to Georgia. See README before changing. */
  --serif: "Book Antiqua", Palatino, "Palatino Linotype", "Palatino LT STD",
           "URW Palladio L", Georgia, serif;

  --measure: 38rem;
  --page: 44rem;
}

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

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

body {
  margin: 0 auto;
  max-width: var(--page);
  padding: 2.5rem 1.5rem 6rem;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.7;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

/* --- links --------------------------------------------------- */

a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration-thickness: 2px;
}

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* --- masthead ------------------------------------------------ */

.masthead {
  margin-bottom: 3.5rem;
}

.masthead__name {
  font-size: 1rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  margin-bottom: 0.9rem;
}

.masthead__name a {
  color: var(--ink);
  text-decoration: none;
}

.masthead__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.1rem;
  font-size: 0.875rem;
  letter-spacing: 0.03em;
}

.masthead__nav a {
  color: var(--muted);
  text-decoration: none;
}

.masthead__nav a:hover {
  color: var(--ink);
}

/* --- typography ---------------------------------------------- */

h1,
h2,
h3 {
  line-height: 1.3;
  font-weight: 700;
  max-width: var(--measure);
}

h1 {
  font-size: 1.75rem;
  margin: 0 0 1.25rem;
}

h2 {
  font-size: 1.1875rem;
  margin: 3rem 0 1rem;
}

h3 {
  font-size: 1.0625rem;
  margin: 2rem 0 0.5rem;
}

p,
ul,
ol,
dl {
  max-width: var(--measure);
}

p {
  margin: 0 0 1.3rem;
}

ul,
ol {
  padding-left: 1.25rem;
}

li {
  margin-bottom: 0.45rem;
}

strong {
  font-weight: 700;
}

blockquote {
  margin: 1.5rem 0;
  padding-left: 1.25rem;
  border-left: 2px solid var(--rule);
  color: var(--muted);
  max-width: var(--measure);
}

hr {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 3rem 0;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 2rem 0;
}

figure {
  margin: 2rem 0;
}

figcaption {
  font-size: 0.875rem;
  color: var(--muted);
  margin-top: 0.6rem;
  max-width: var(--measure);
}

/* --- the lines under the name on the home page --------------- */

.lede {
  font-size: 1.375rem;
  line-height: 1.5;
  margin: 0 0 1rem;
  max-width: var(--measure);
}

.lede-sub {
  font-size: 1.125rem;
  color: var(--muted);
  margin: 0 0 3.5rem;
  max-width: var(--measure);
}

/* --- small caps label ---------------------------------------- */

.label {
  font-size: 0.8125rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

/* --- index of sections on the home page ---------------------- */

.index {
  list-style: none;
  padding-left: 0;
  margin: 0;
  max-width: var(--measure);
}

.index li {
  padding-bottom: 1.1rem;
  margin-bottom: 1.1rem;
  border-bottom: 1px solid var(--rule);
}

.index li:last-child {
  border-bottom: 0;
  margin-bottom: 0;
}

.index__title {
  font-size: 1.0625rem;
}

.index__note {
  display: block;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.5;
  margin-top: 0.15rem;
}

/* --- post listing -------------------------------------------- */

.posts {
  list-style: none;
  padding-left: 0;
  margin: 0;
  max-width: var(--measure);
}

.posts li {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 1rem;
  align-items: baseline;
  margin-bottom: 1rem;
}

.posts time {
  flex: 0 0 6rem;
  font-size: 0.875rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

/* --- single post --------------------------------------------- */

.post-date {
  display: block;
  font-size: 0.8125rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.8rem;
}

.back {
  margin-top: 3.5rem;
  font-size: 0.9375rem;
}

/* --- vertical timeline --------------------------------------- */

.timeline {
  list-style: none;
  padding-left: 0;
  margin: 2rem 0 0;
  border-left: 1px solid var(--rule);
  max-width: var(--measure);
}

.timeline > li {
  position: relative;
  padding: 0 0 2.75rem 1.75rem;
  margin-bottom: 0;
}

.timeline > li:last-child {
  padding-bottom: 0;
}

.timeline > li::before {
  content: "";
  position: absolute;
  left: -4.5px;
  top: 0.6rem;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.timeline__date {
  display: block;
  font-size: 0.8125rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
}

.timeline__role {
  font-size: 1.0625rem;
  font-weight: 700;
  margin: 0.25rem 0 0.1rem;
  line-height: 1.35;
}

.timeline__org {
  color: var(--muted);
  margin: 0 0 0.7rem;
}

.timeline p:last-child {
  margin-bottom: 0;
}

.timeline ul {
  margin: 0.6rem 0 0;
}

/* --- key/value rows ------------------------------------------ */

.facts {
  margin: 1.5rem 0 0;
  max-width: var(--measure);
}

.facts dt {
  font-size: 0.8125rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 1.4rem;
}

.facts dd {
  margin: 0.3rem 0 0;
}

/* --- contact block ------------------------------------------- */

.contact {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--rule);
  max-width: var(--measure);
}

.contact p:last-child {
  margin-bottom: 0;
}

/* --- footer -------------------------------------------------- */

.colophon {
  margin-top: 5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  font-size: 0.875rem;
  color: var(--muted);
  max-width: var(--measure);
}

.colophon p {
  margin: 0;
}

.colophon a {
  color: var(--muted);
}

/* --- small screens ------------------------------------------- */

@media (max-width: 34rem) {
  body {
    font-size: 1.0625rem;
    padding: 2rem 1.25rem 4rem;
  }

  h1 {
    font-size: 1.5rem;
  }

  .lede {
    font-size: 1.1875rem;
  }

  .lede-sub {
    font-size: 1.0625rem;
  }

  .posts time {
    flex-basis: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}
