/* joshuatanner.ai */

:root {
  --paper: #fcfcfb;
  --ink: #0f2438;
  --ink-soft: #4e5d6c;
  --rule: #dce2e8;
  --accent: #1f3fcf;
  --measure: 42rem;
}

* { box-sizing: border-box; }

html { background: var(--paper); }

body {
  margin: 0;
  color: var(--ink);
  font-family: "Newsreader", Georgia, "Times New Roman", serif;
  font-size: 1.1875rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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; }

.page {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 2.5rem 1.5rem 5rem;
}

/* Header */

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1.5rem;
  margin-bottom: 4.5rem;
  font-size: 1rem;
}
.site-header .name {
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
  white-space: nowrap;
}
.site-header nav a {
  color: var(--ink-soft);
  text-decoration: none;
  margin-left: 1.25rem;
}
.site-header nav a:hover,
.site-header nav a[aria-current="page"] { color: var(--ink); text-decoration: underline; }

/* Home */

.hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2.5rem;
  margin-bottom: 2rem;
}

.portrait {
  width: 168px;
  height: 168px;
  border-radius: 6px;
  flex-shrink: 0;
  margin-top: 0.4rem;
}

.lede {
  font-size: 2.25rem;
  line-height: 1.2;
  font-weight: 500;
  letter-spacing: -0.012em;
  margin: 0;
  max-width: 20ch;
}
.about p { margin: 0 0 1.1em; }

section + section { margin-top: 3.5rem; }

h2 {
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--ink-soft);
  margin: 0 0 1rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--rule);
}

/* Lists of things: writing, work */

.entries { list-style: none; margin: 0; padding: 0; }
.entries li + li { margin-top: 1.75rem; }
.entries .title {
  font-size: 1.35rem;
  line-height: 1.3;
  font-weight: 500;
  margin: 0 0 0.25rem;
}
.entries .title a { color: var(--ink); text-decoration: none; }
.entries .title a:hover { text-decoration: underline; }
.entries .when { color: var(--ink-soft); font-size: 0.95rem; }
.entries p { margin: 0.35rem 0 0; }

/* Article */

.article h1 {
  font-size: 2.5rem;
  line-height: 1.15;
  font-weight: 500;
  letter-spacing: -0.012em;
  margin: 0 0 0.75rem;
}
.article .standfirst {
  font-size: 1.3rem;
  line-height: 1.45;
  font-style: italic;
  color: var(--ink-soft);
  margin: 0 0 1.25rem;
}
.article .meta {
  color: var(--ink-soft);
  font-size: 0.95rem;
  margin-bottom: 3rem;
}
.article h2 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--ink);
  border: 0;
  padding: 0;
  margin: 3.5rem 0 1rem;
  line-height: 1.25;
}
.article p { margin: 0 0 1.25em; }
.article em { font-style: italic; }

.article figure { margin: 2.75rem 0; }
.article figure img { width: 100%; height: auto; display: block; border-radius: 4px; }
.article figure.figure-portrait img { max-width: 400px; margin: 0 auto; }
.article figure svg { width: 100%; height: auto; display: block; }
.article figcaption { font-size: 0.9rem; line-height: 1.5; color: var(--ink-soft); margin-top: 0.7rem; }
.article figure.figure-portrait figcaption { max-width: 400px; margin-left: auto; margin-right: auto; }

.article blockquote.pull {
  margin: 2.75rem 0;
  padding: 0 0 0 1.75rem;
  border-left: 2px solid var(--rule);
  font-size: 1.3rem;
  line-height: 1.5;
  font-style: italic;
  color: var(--ink);
}
.article blockquote.pull p { margin: 0; }
.article blockquote.pull cite {
  display: block;
  margin-top: 0.6rem;
  font-size: 0.95rem;
  font-style: normal;
  color: var(--ink-soft);
}

sup.note-ref {
  font-size: 0.7em;
  line-height: 0;
  vertical-align: baseline;
  position: relative;
  top: -0.55em;
}
sup.note-ref a { text-decoration: none; padding: 0 0.1em; }

.notes { margin-top: 4rem; padding-top: 1.5rem; border-top: 1px solid var(--rule); }
.notes h2 { font-size: 1.05rem; color: var(--ink-soft); margin: 0 0 1rem; }
.notes ol { padding-left: 1.5rem; margin: 0; font-size: 0.95rem; line-height: 1.55; color: var(--ink-soft); }
.notes li { margin-bottom: 0.8em; }
.notes li:target { color: var(--ink); }
.notes .back { text-decoration: none; margin-left: 0.3em; }

/* Footer */

.site-footer {
  margin-top: 5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
  color: var(--ink-soft);
  font-size: 0.9rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.site-footer span { white-space: nowrap; }

@media (max-width: 600px) {
  body { font-size: 1.0625rem; }
  .page { padding: 1.5rem 1.1rem 4rem; }
  .site-header { margin-bottom: 3rem; flex-wrap: wrap; }
  .site-header nav a { margin-left: 0; margin-right: 1rem; }
  .lede { font-size: 1.75rem; }
  .hero { flex-direction: column; gap: 1.5rem; }
  .portrait { width: 128px; height: 128px; margin-top: 0; }
  .article h1 { font-size: 1.9rem; }
}

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