:root {
  --fg: #1a1a1a;
  --muted: #5b5b5b;
  --bg: #fdfdfb;
  --accent: #8a3324;
  --rule: #e6e3dc;
  --serif: Georgia, "Iowan Old Style", "Palatino Linotype", Palatino, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.6;
  color: var(--fg);
  background: var(--bg);
}

header {
  border-bottom: 1px solid var(--rule);
}

nav {
  max-width: 720px;
  margin: 0 auto;
  padding: 1.25rem 1.5rem;
  display: flex;
  gap: 1.5rem;
  font-family: var(--sans);
  font-size: 0.95rem;
}

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

nav a:hover,
nav a[aria-current="page"] {
  color: var(--accent);
}

main {
  max-width: 720px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
}

h1 {
  font-size: 2rem;
  margin: 0 0 0.5rem;
  font-weight: 600;
}

h2 {
  font-size: 1.25rem;
  margin: 2.25rem 0 0.5rem;
  font-weight: 600;
}

p { margin: 0 0 1rem; }

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

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

.profile {
  text-align: center;
}

.profile p { text-align: left; }

.portrait {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 1.25rem;
  display: block;
  background: var(--rule);
}

.tagline {
  color: var(--muted);
  font-style: italic;
  margin-bottom: 2rem;
  text-align: center;
}

ul { padding-left: 1.25rem; }
li { margin-bottom: 0.5rem; }

.cv-actions {
  font-family: var(--sans);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

.cv-embed {
  width: 100%;
  height: 90vh;
  min-height: 600px;
  border: 1px solid var(--rule);
  background: #fff;
}

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

.post-list li {
  display: flex;
  gap: 1rem;
  align-items: baseline;
  margin-bottom: 0.75rem;
}

.post-list time {
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.9rem;
  flex-shrink: 0;
  min-width: 7em;
}

.post-date {
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.9rem;
  margin-top: -0.5rem;
  margin-bottom: 1.5rem;
}

.post h1 { margin-bottom: 0.25rem; }

.project { margin-bottom: 2.5rem; }
.project h2 { margin-top: 0; }
.project .meta {
  color: var(--muted);
  font-size: 0.9rem;
  font-family: var(--sans);
  margin-bottom: 0.5rem;
}

footer {
  border-top: 1px solid var(--rule);
  margin-top: 4rem;
  padding: 1.5rem;
  text-align: center;
  font-family: var(--sans);
  font-size: 0.9rem;
  color: var(--muted);
}

footer a { color: var(--muted); }

.socials {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 0.5rem;
}

.socials a {
  display: inline-flex;
  color: var(--muted);
}

.socials svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
  display: block;
}

.socials a:hover { color: var(--accent); }

/* Long-form post content: figures, code, tables, quotes. */
.post img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 1.5rem auto;
  border: 1px solid var(--rule);
  border-radius: 4px;
}

.post pre {
  overflow-x: auto;
  background: #f6f4ef;
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 0.85rem 1rem;
  font-size: 0.85rem;
  line-height: 1.45;
  margin: 0 0 1rem;
}

.post code {
  font-family: ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, monospace;
  font-size: 0.88em;
}

.post :not(pre) > code {
  background: #f0eee8;
  padding: 0.1em 0.35em;
  border-radius: 3px;
}

.post pre code {
  background: none;
  padding: 0;
  font-size: 1em;
}

.post .table-wrap,
.post table {
  width: 100%;
}

.post table {
  border-collapse: collapse;
  margin: 0 0 1.5rem;
  font-size: 0.92rem;
  display: block;
  overflow-x: auto;
}

.post th,
.post td {
  border-bottom: 1px solid var(--rule);
  padding: 0.4rem 0.75rem;
  text-align: left;
}

.post thead th {
  font-family: var(--sans);
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 600;
}

.post blockquote {
  margin: 0 0 1rem;
  padding-left: 1rem;
  border-left: 3px solid var(--rule);
  color: var(--muted);
  font-style: italic;
}

@media (max-width: 480px) {
  body { font-size: 17px; }
  main { padding: 2rem 1.25rem; }
  .portrait { width: 140px; height: 140px; }
}
