/* Simple, typography-first styles. */

:root {
  --bg: #161614;
  --text: #e8e6e1;
  --muted: #b3b0a6;
  --faint: #3a3a35;
  --link: #e8e6e1;
  --accent: #e08a5f;
  --code-bg: #1f1f1c;
  --measure: 40rem;
  color-scheme: dark;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Charter, "Iowan Old Style", Georgia, "Times New Roman", serif;
  font-size: 1.125rem;
  line-height: 1.65;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Header */

.site-header {
  padding: 2.5rem 0 0;
}

.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 1.25rem;
}

.site-name {
  font-weight: 700;
  font-size: 1.0625rem;
  letter-spacing: -0.01em;
  text-decoration: none;
  color: var(--text);
  margin-right: auto;
}

.site-nav {
  display: flex;
  gap: 1.25rem;
  font-size: 0.9375rem;
}

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

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Content */

main { padding: 3rem 0 2rem; }

h1, h2, h3, h4 {
  line-height: 1.25;
  letter-spacing: -0.015em;
  margin: 2.25rem 0 0.75rem;
}

h1 { font-size: 1.875rem; margin-top: 0; }
h2 { font-size: 1.375rem; }
h3 { font-size: 1.125rem; }

p, ul, ol, blockquote, pre, table { margin: 0 0 1.25rem; }

a { color: var(--link); text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1px; }
a:hover { color: var(--accent); }

img, video { max-width: 100%; height: auto; }

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

blockquote {
  border-left: 2px solid var(--faint);
  margin-left: 0;
  padding-left: 1rem;
  color: var(--muted);
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.875em;
  background: var(--code-bg);
  padding: 0.1em 0.3em;
  border-radius: 3px;
}

pre {
  background: var(--code-bg);
  padding: 1rem;
  border-radius: 4px;
  overflow-x: auto;
}

pre code { background: none; padding: 0; font-size: 0.8125rem; }

table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; display: block; overflow-x: auto; }
th, td { border-bottom: 1px solid var(--faint); padding: 0.5rem 0.75rem 0.5rem 0; text-align: left; }

/* Homepage */

.lede { font-size: 1.1875rem; color: var(--text); }

.section { margin: 3.5rem 0; }
.section > h2 { margin-top: 0; }

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

.section-head a { font-size: 0.9375rem; color: var(--muted); text-decoration: none; }
.section-head a:hover { color: var(--accent); text-decoration: underline; }

/* Post lists */

.post-list { list-style: none; padding: 0; margin: 0; }

.post-list li {
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--faint);
}

.post-list li:last-child { border-bottom: 0; }

.post-list .post-title { font-weight: 600; text-decoration: none; }
.post-list .post-title:hover { text-decoration: underline; }

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

.post-list .post-desc {
  margin: 0.35rem 0 0;
  font-size: 0.9375rem;
  color: var(--muted);
  line-height: 1.55;
}

/* Projects */

.projects { display: grid; gap: 2.25rem; }

.project h3 { margin: 0 0 0.15rem; font-size: 1.0625rem; }
.project h3 a { text-decoration: none; }
.project h3 a:hover { text-decoration: underline; }

.project img {
  display: block;
  width: 100%;
  border: 1px solid var(--faint);
  border-radius: 4px;
  margin-bottom: 0.9rem;
}

.project .tagline { margin: 0 0 0.35rem; font-size: 0.9375rem; }
.project .desc { margin: 0 0 0.6rem; font-size: 0.9375rem; color: var(--muted); line-height: 1.55; }

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.9rem;
  font-size: 0.8125rem;
  color: var(--muted);
}

.meta-row a { color: var(--muted); }
.meta-row a:hover { color: var(--accent); }

/* Definition-style rows (skills, contact) */

.rows { display: grid; gap: 0.6rem; font-size: 0.9375rem; }

.rows > div {
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  gap: 0.75rem;
}

.rows .k { color: var(--muted); }

/* Experience / education */

.entry { margin-bottom: 1.5rem; }
.entry:last-child { margin-bottom: 0; }
.entry .role { font-weight: 600; font-size: 1rem; }
.entry .where { font-size: 0.9375rem; }
.entry .when { font-size: 0.8125rem; color: var(--muted); }
.entry .note { font-size: 0.9375rem; color: var(--muted); margin: 0.3rem 0 0; line-height: 1.55; }

/* Single post */

.post-header { margin-bottom: 2rem; }
.post-header h1 { margin-bottom: 0.4rem; }
.post-header .meta { font-size: 0.875rem; color: var(--muted); }

.tags { margin-top: 2.5rem; font-size: 0.875rem; color: var(--muted); }
.tags a { color: var(--muted); }

/* Footer */

.site-footer {
  border-top: 1px solid var(--faint);
  margin-top: 4rem;
  padding: 1.5rem 0 3rem;
  font-size: 0.875rem;
  color: var(--muted);
}

.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--accent); text-decoration: underline; }

@media (max-width: 34rem) {
  body { font-size: 1.0625rem; }
  main { padding-top: 2rem; }
  .rows > div { grid-template-columns: 1fr; gap: 0; }
}

/* Things I like */

.media-list { list-style: none; padding: 0; margin: 0; }

.media-item {
  display: grid;
  grid-template-columns: 5.75rem 1fr;
  gap: 1.1rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--faint);
}

.media-item:last-child { border-bottom: 0; }

.media-item .poster {
  width: 5.75rem;
  height: auto;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 3px;
  border: 1px solid var(--faint);
  background: var(--code-bg);
}

.media-body { min-width: 0; align-self: center; }

.media-title { font-weight: 600; font-size: 1rem; margin-bottom: 0.2rem; }

.media-note {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--muted);
  line-height: 1.55;
}

.media-outro {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--faint);
  font-size: 0.9375rem;
  color: var(--muted);
}

.media-outro p { margin-bottom: 0.75rem; }

/* Poster strip teaser on the homepage */

.poster-strip {
  display: flex;
  gap: 0.6rem;
  overflow-x: auto;
  padding-bottom: 0.4rem;
  margin-bottom: 0.9rem;
  scrollbar-width: thin;
}

.poster-strip img {
  flex: 0 0 auto;
  width: 5rem;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 3px;
  border: 1px solid var(--faint);
}

@media (max-width: 34rem) {
  .media-item { grid-template-columns: 4.5rem 1fr; gap: 0.9rem; }
  .media-item .poster { width: 4.5rem; }
}
