:root {
  --bg: #f1e3d1;
  --text: #64513e;
  --muted: #a0907d;
  --less-muted: #8c7b68;
  --blockquote-fg: #786653;
  --accent: #bf7979;
  --accent2: #9e5581;
  --surface: #ddcebc;
  --center-box-width: 736px;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 24px;
  box-sizing: border-box;
  background: var(--bg);
  color: var(--text);
  font:
    16px/1.6 system-ui,
    sans-serif;
}

body:has(footer) {
  justify-content: flex-start;
}

#home-info,
#home-links,
#home-brief {
  width: min(100%, var(--center-box-width));
}

footer {
  width: min(100%, var(--center-box-width));
  margin-top: auto;
  margin-bottom: 10px;
  padding-top: 28px;
  color: var(--muted);
  font-size: 0.825rem;
  text-align: left;
}

#projects-page,
#posts-page {
  display: flex;
  flex-direction: column;
  width: min(100%, var(--center-box-width));
  color: var(--text);
  background: var(--bg);
}

#post-page {
  display: flex;
  flex-direction: column;
  width: min(100%, var(--center-box-width));
  color: var(--text);
  background: var(--bg);
  text-align: left;
}

#post-page a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-underline-offset: 4px;
}

#post-page a:visited {
  text-decoration-color: var(--accent2);
}

#post-page a:hover,
#post-page a:focus-visible {
  color: var(--accent);
  text-decoration-color: var(--accent);
}

#post-page #back-text,
#post-page #back-text:visited {
  color: var(--muted);
  text-decoration: none;
}

#post-page #back-text:hover,
#post-page #back-text:focus-visible {
  color: var(--less-muted);
}

.post-page-title {
  margin: 0 0 6px;
}

.post-page-date {
  margin: 0 0 28px;
  color: var(--muted);
}

#post-page blockquote {
  margin: 20px 0;
  padding: 0 0 0 16px;
  border-left: 1px solid var(--less-muted);
  color: var(--blockquote-fg);
  font-weight: 300;
}

#post-page blockquote > :first-child {
  margin-top: 0;
}

#post-page blockquote > :last-child {
  margin-bottom: 0;
}

#post-page img {
  display: block;
  max-width: 100%;
  height: auto;
}

#post-page pre {
  padding: 16px;
  overflow-x: auto;
  border: 1px solid var(--muted);
}

#back-text,
#more-text {
  display: inline-block;
  font-size: 0.9rem;
  margin-bottom: 28px;
  color: var(--muted);
  text-decoration: none;
}

#back-text:hover,
#back-text:focus-visible,
#more-text:hover,
#more-text:focus-visible {
  color: var(--less-muted);
}

#more-text {
  align-self: flex-end;
}

#projects-page h1 {
  margin: 0 0 10px;
}

#projects-page > p {
  margin: 0 0 40px;
  color: var(--muted);
}

#posts-page h1 {
  margin: 0 0 10px;
}

#posts-page > p {
  margin: 0 0 40px;
  color: var(--muted);
}

.post-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: baseline;
  gap: 12px;
  margin: 0 0 16px;
  position: relative;
  padding-bottom: 6px;
}

.post-list-entry {
  color: var(--accent);
  text-decoration: none;
}

.post-row:hover::after,
.post-row:focus-within::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  border-bottom: 1px solid var(--accent);
  pointer-events: none;
}

.post-date {
  color: var(--muted);
}

.post-row:hover .post-date,
.post-row:focus-within .post-date {
  color: var(--less-muted);
}

.project-item {
  margin: 0 0 42px;
}

.project-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: baseline;
}

.project-name {
  color: var(--accent);
  font-size: 1.05em;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-underline-offset: 6px;
}

.project-desc {
  color: var(--text);
}

.project-tags {
  margin: 8px 0 0;
  color: var(--muted);
}

.project-tags span {
  margin-right: 8px;
}

#home-info {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

#home-info img {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--accent);
}

#home-copy {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#home-title {
  display: flex;
  gap: 12px;
}

#username {
  color: var(--accent);
}

#bio {
  color: var(--muted);
}

#home-links {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 24px 0 32px;
}

#home-links #right {
  display: flex;
  align-items: center;
  gap: 12px;
}

#home-links #right a {
  color: inherit;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
}

#home-links svg {
  display: block;
  width: 22px;
  height: 22px;
}

.home-link {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-underline-offset: 8px;
  margin-right: 16px;
}

.home-link:hover,
.home-link:focus-visible {
  color: var(--accent);
}

.footer-link {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--muted);
  text-underline-offset: 4px;
}

.footer-link:hover,
.footer-link:focus-visible {
  color: var(--accent);
  text-decoration-color: var(--accent);
}

.home-link:last-child {
  margin-right: 0;
}

#home-brief p {
  margin: 0;
}
