:root {
  --fg: #161616;
  --muted: #8a8a8a;
  --bg: #fdfcfb;
  --border: #dedad4;
  --max-width: 620px;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  padding: 6rem 2rem 8rem;
  background: var(--bg);
  color: var(--fg);
  font-family: "SF Mono", "Menlo", "Consolas", ui-monospace, monospace;
  font-size: 15px;
  line-height: 1.75;
}

main {
  max-width: var(--max-width);
  margin: 0 auto;
}

/* intro / masthead */

.intro {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 1.75rem;
  margin-bottom: 2rem;
}

.intro-text {
  flex: 0 0 auto;
}

.avatar {
  width: 172px;
  height: 172px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid var(--border);
  flex-shrink: 0;
  align-self: flex-end;
}

.masthead {
  margin-bottom: 1.25rem;
}

h1 {
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 0.35rem;
}

.location {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
}

/* contact table */

.contact {
  border-collapse: collapse;
  margin-bottom: 0;
  font-size: 0.9rem;
}

.contact td {
  padding: 0.15rem 0;
  vertical-align: top;
}

.contact td:first-child {
  color: var(--muted);
  padding-right: 1rem;
  white-space: nowrap;
}

/* section labels */

section {
  margin-bottom: 2rem;
}

section:last-of-type {
  margin-bottom: 0;
}

h2 {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: lowercase;
  color: var(--muted);
  margin: 0 0 1rem;
  letter-spacing: 0.02em;
}

.bio p {
  margin: 0 0 1rem;
}

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

.bio-list li {
  margin-bottom: 0.75rem;
  padding-left: 1.1rem;
  position: relative;
}

.bio-list li:last-child {
  margin-bottom: 0;
}

.bio-list li::before {
  content: "-";
  position: absolute;
  left: 0;
  color: var(--muted);
}

/* vertical timeline */

.timeline {
  position: relative;
  margin-bottom: 2rem;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 0.3rem;
  bottom: 0.3rem;
  width: 1px;
  background: var(--border);
}

.timeline-item {
  position: relative;
  padding: 0 0 0.85rem 1.4rem;
}

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

.timeline-node {
  position: absolute;
  left: 0;
  top: 0.3rem;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--muted);
}

.timeline-item.current .timeline-node {
  background: var(--fg);
  border-color: var(--fg);
}

.timeline-badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 400;
  text-transform: lowercase;
  letter-spacing: 0.04em;
  color: var(--fg);
  border: 1px solid var(--fg);
  border-radius: 999px;
  padding: 0.02rem 0.5rem;
  margin-left: 0.35rem;
  vertical-align: middle;
}

.timeline-card h3 {
  font-size: 0.9rem;
  font-weight: 600;
  margin: 0 0 0.15rem;
  line-height: 1.4;
}

.timeline-item.current .timeline-card h3 {
  font-weight: 700;
}

.timeline-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.5;
}

.timeline-item.current .timeline-card p {
  color: var(--fg);
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

a {
  color: var(--fg);
  text-decoration: underline;
  text-decoration-color: var(--border);
  text-underline-offset: 2px;
}

a:hover {
  text-decoration-color: var(--fg);
}

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

/* writing list */

.posts li {
  margin-bottom: 1.1rem;
}

.post-year {
  display: inline-block;
  color: var(--muted);
  font-size: 0.8rem;
  margin-right: 0.5rem;
}

.post-title {
  font-weight: 600;
}

.post-desc {
  display: block;
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 0.15rem;
}

.post-placeholder {
  color: var(--muted);
  font-style: italic;
  font-size: 0.9rem;
}

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

footer {
  margin-top: 4rem;
  color: var(--muted);
  font-size: 0.75rem;
}

/* blog post page */

.back-link {
  display: inline-block;
  margin-bottom: 2.5rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.post-header {
  margin-bottom: 2.5rem;
}

.post-header h1 {
  font-family: Charter, "Iowan Old Style", Georgia, "Times New Roman", serif;
  font-size: 1.6rem;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.3;
  margin-bottom: 0.5rem;
}

.post-date {
  color: var(--muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

article.post-body {
  font-family: Charter, "Iowan Old Style", Georgia, "Times New Roman", serif;
  font-size: 1.08rem;
  line-height: 1.8;
  letter-spacing: 0;
}

article.post-body h3 {
  font-family: Charter, "Iowan Old Style", Georgia, "Times New Roman", serif;
  font-size: 1.2rem;
  font-weight: 600;
  margin: 2.25rem 0 0.9rem;
}

article.post-body p {
  margin: 0 0 1.3rem;
}

article.post-body ul {
  margin: 0 0 1.3rem;
}

article.post-body ul li {
  margin-bottom: 0.6rem;
  padding-left: 1.2rem;
  position: relative;
}

article.post-body ul li::before {
  content: "-";
  position: absolute;
  left: 0;
  color: var(--muted);
}

article.post-body ol {
  margin: 0 0 1.3rem;
  padding-left: 1.4rem;
}

article.post-body ol li {
  margin-bottom: 0.6rem;
}

article.post-body strong {
  font-weight: 600;
}

article.post-body sup {
  font-size: 0.7rem;
  line-height: 0;
}

article.post-body sup a {
  background-image: none;
  padding-bottom: 0;
  color: var(--muted);
  text-decoration: none;
}

article.post-body sup a:hover {
  color: var(--fg);
}

.citations {
  margin: 3rem 0 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  list-style: none;
  counter-reset: citation;
}

.citations li {
  margin-bottom: 0.5rem;
  padding-left: 1.5rem;
  position: relative;
  font-size: 0.85rem;
  color: var(--muted);
}

.citations li::before {
  counter-increment: citation;
  content: "[" counter(citation) "]";
  position: absolute;
  left: 0;
  color: var(--muted);
}

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

.citations a:hover {
  color: var(--fg);
}

@media (max-width: 480px) {
  body {
    padding: 3.5rem 1.5rem 5rem;
  }
}
