:root {
  --taupe: #9a938d;
  --ink: #13181b;
  --brown: #4e3227;
  --cream: #c9c1b9;
  --blush: #e0cece;
  --hover: #261a15;
  --blush: #e0cece;
  --hover: #261a15;
  --header: "Rock Salt", cursive;
  --body: "Maven Pro", sans-serif;
  --special: "Metal", serif;
  --measure: 44rem;
  --page: 72rem;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--cream);
  font-family: var(--body);
  font-size: 1.05rem;
  font-weight: 500;
  line-height: 1.65;
  background-color: var(--ink);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background-color: var(--ink);
  background-image: url("/assets/images/background.png");
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

.grain {
  position: fixed;
  inset: 0;
  z-index: 40;
  pointer-events: none;
  opacity: 0.09;
  mix-blend-mode: overlay;
  background: #8a8178;
  filter: url("#paper");
}

.svg-filters {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

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

a {
  color: var(--blush);
  text-underline-offset: 0.18em;
}

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

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 50;
  padding: 0.5rem 0.8rem;
  background: var(--cream);
  color: var(--ink);
  font-weight: 700;
}

.skip-link:focus {
  top: 1rem;
}

.site-header {
  position: relative;
  z-index: 20;
  padding: 1.25rem 1.5rem 0.5rem;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  max-width: var(--page);
  margin: 0 auto;
}

.brand {
  display: flex;
  align-items: flex-end;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--cream);
}

.brand-logo {
  display: block;
  width: min(220px, 42vw);
  height: auto;
  mix-blend-mode: screen;
}

.brand-mark {
  font-family: var(--special);
  font-size: 1.55rem;
  letter-spacing: 0.08em;
  color: var(--cream);
  line-height: 1;
  padding-bottom: 0.15rem;
}

.nav-toggle {
  display: none;
  width: 3rem;
  height: 3rem;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 1.7rem;
  height: 2px;
  margin: 0.35rem auto;
  background: var(--taupe);
  border-radius: 2px;
}

.nav-toggle span:nth-child(1) {
  width: 1.5rem;
}

.nav-toggle span:nth-child(3) {
  width: 1.35rem;
  margin-left: 0.85rem;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.75rem;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 8rem;
  height: 3.75rem;
  padding: 0 0.5rem;
  color: var(--taupe);
  font-family: var(--body);
  font-size: 0.875em;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-decoration: none;
  background: transparent;
  border-radius: 0.125rem;
  transition: color 0.25s ease, background-color 0.25s ease;
}

.nav-link:hover,
.nav-link.is-active {
  background-color: var(--hover);
  color: var(--cream);
}

.site-main {
  position: relative;
  z-index: 1;
}

.inner {
  max-width: var(--page);
  margin: 0 auto;
  padding: 1.5rem 1.5rem 4rem;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(240px, 0.85fr);
  gap: 2rem;
  align-items: end;
  min-height: 28rem;
  padding: 1.5rem 0 2rem;
}

.eyebrow {
  margin: 0 0 0.85rem;
  color: var(--taupe);
  font-family: var(--special);
  font-size: 1.35rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-title,
.post-title,
.lost h1 {
  margin: 0 0 1rem;
  color: var(--cream);
  font-family: var(--header);
  font-size: clamp(2.1rem, 5vw, 3.15rem);
  font-weight: 400;
  line-height: 1.45;
}

.home-intro {
  max-width: 36rem;
  color: var(--cream);
  font-size: 1.05rem;
}

.home-intro p {
  margin: 0 0 0.9rem;
}

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

.lead {
  max-width: 36rem;
  margin: 0;
  color: var(--cream);
  font-size: 1.05rem;
}

.hero-portrait {
  position: relative;
  justify-self: end;
  width: min(100%, 28rem);
}

.portrait-frame {
  position: relative;
}

.portrait-frame img {
  display: block;
  width: 100%;
  mix-blend-mode: screen;
}

.smoke,
.smoke::before,
.smoke::after {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(201, 193, 185, 0.35), transparent 70%);
  filter: blur(6px);
  pointer-events: none;
}

.smoke {
  right: 42%;
  top: 18%;
  width: 18px;
  height: 18px;
  animation: smoke-rise 3.4s ease-out infinite;
}

.smoke-b {
  right: 39%;
  animation-delay: 1.1s;
  animation-duration: 3.8s;
}

.smoke-c {
  right: 44%;
  animation-delay: 2s;
  animation-duration: 3.1s;
}

.squiggle {
  display: block;
  width: 100%;
  height: 2.2rem;
  margin: 0.5rem 0 2.4rem;
  overflow: visible;
}

.squiggle-path {
  fill: none;
  stroke: var(--brown);
  stroke-width: 2.4;
  stroke-linecap: round;
}

.post-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 2.25rem;
}

.post-card {
  position: relative;
  padding: 0.25rem 0 0.5rem;
}

.post-date {
  margin: 0 0 0.55rem;
  color: var(--taupe);
  font-family: var(--body);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.post-date a {
  color: var(--taupe);
  text-decoration: none;
}

.post-date a:hover {
  color: var(--cream);
}

.post-card-title {
  margin: 0 0 0.7rem;
  font-family: var(--header);
  font-size: clamp(1.35rem, 3vw, 2.05rem);
  font-weight: 400;
  line-height: 1.5;
}

.post-card-title a {
  color: var(--cream);
  text-decoration: none;
}

.post-card-title a:hover {
  color: var(--blush);
}

.excerpt {
  max-width: 40rem;
  margin: 0 0 1.1rem;
  color: var(--cream);
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 7.5rem;
  height: 1.875rem;
  padding: 0 0.95rem;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--body);
  font-size: 0.875em;
  font-weight: 700;
  text-decoration: none;
  border-radius: 0.125rem;
  transition: background-color 0.25s ease;
}

.btn:hover {
  background: var(--taupe);
  color: var(--ink);
}

.post,
.page,
.lost {
  max-width: var(--measure);
}

.post-hero {
  padding-top: 1rem;
}

.post-hero .post-date {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: baseline;
}

.dot {
  color: var(--taupe);
}

.post-body {
  color: var(--cream);
  overflow-wrap: break-word;
}

.post-body h1,
.post-body h2,
.post-body h3 {
  color: var(--cream);
  font-family: var(--header);
  font-weight: 400;
  line-height: 1.45;
}

.post-body h1 {
  font-size: 1.55rem;
  margin: 2.2rem 0 0.8rem;
}

.post-body strong {
  font-weight: 900;
}

.post-body h2 {
  font-size: 1.35rem;
  margin: 2rem 0 0.7rem;
}

.post-body h3 {
  font-size: 1.15rem;
}

.post-body img {
  display: block;
  margin: 1.2rem 0;
}

.post-body p,
.post-body li {
  font-size: 1rem;
}

.post-body a {
  color: var(--blush);
}

.post-body a:hover {
  color: var(--cream);
}

.post-body blockquote {
  margin: 1.5rem 0;
  padding: 0.2rem 0 0.2rem 1.1rem;
  border-left: 3px solid var(--taupe);
  color: var(--blush);
}

.post-body ul,
.post-body ol {
  padding-left: 1.2rem;
}

.post-body li + li {
  margin-top: 0.35rem;
}

.post-body hr {
  border: 0;
  height: 1.5rem;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 20'><path fill='none' stroke='%234E3227' stroke-width='2' d='M2 10 C 40 2, 80 18, 120 8 S 200 4, 240 12 S 320 18, 398 9'/></svg>") center / 100% 100% no-repeat;
}

.post-body pre,
.post-body code {
  font-family: "Lucida Console", "Courier New", monospace;
}

.post-body code {
  color: var(--blush);
  font-size: 0.9em;
}

.post-body .highlighter-rouge {
  margin: 1.2rem 0;
  background: rgba(19, 24, 27, 0.78);
  border: 1px solid var(--brown);
  border-radius: 0.125rem;
}

.post-body pre {
  margin: 0;
  padding: 1rem 1.1rem;
  overflow-x: auto;
  background: transparent;
  border: 0;
  filter: none;
}

.post-body pre code {
  color: var(--cream);
}

.post-body table {
  width: 100%;
  margin: 1.2rem 0;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.post-body th,
.post-body td {
  padding: 0.4rem 0.6rem;
  text-align: left;
  border-bottom: 1px dashed var(--brown);
}

.highlight {
  background: transparent;
}

.highlight .c,
.highlight .c1 {
  color: var(--taupe);
}
.highlight .k,
.highlight .kd {
  color: var(--blush);
}
.highlight .s,
.highlight .s1,
.highlight .s2 {
  color: var(--cream);
}
.highlight .n,
.highlight .nx {
  color: var(--cream);
}
.highlight .p {
  color: var(--blush);
}
.highlight .o {
  color: var(--taupe);
}

.post-pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 3rem;
  padding-top: 0.5rem;
}

.pager-link {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 0.9rem 0.2rem;
  color: var(--cream);
  text-decoration: none;
}

.pager-link.next {
  text-align: right;
}

.pager-label {
  font-family: var(--special);
  font-size: 1.05rem;
  color: var(--taupe);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pager-title {
  font-family: var(--header);
  font-size: 1rem;
  line-height: 1.45;
}

.site-footer {
  max-width: var(--page);
  margin: 0 auto;
  padding: 1rem 1.5rem 3.5rem;
}

.social {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem 1.1rem;
  margin: 0 0 1.1rem;
  padding: 0;
  list-style: none;
}

.social a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  color: var(--cream);
  text-decoration: none;
  transition: transform 0.25s ease, color 0.25s ease;
}

.social a:hover {
  transform: scale(0.8875);
  color: var(--blush);
}

.social svg {
  width: 1.25em;
  height: 1.25em;
  fill: currentColor;
}

.social span {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.footer-note {
  margin: 0;
  text-align: center;
  color: var(--taupe);
  font-size: 0.85rem;
}

.lost {
  padding: 3rem 0 4rem;
}

.reveal {
  opacity: 0;
}

.reveal.is-in {
  opacity: 1;
}

.reveal.is-static {
  opacity: 1;
}

@keyframes smoke-rise {
  0% {
    opacity: 0;
    transform: translate(0, 0) scale(0.6);
  }
  20% {
    opacity: 0.55;
  }
  100% {
    opacity: 0;
    transform: translate(10px, -70px) scale(1.6);
  }
}

@media (max-width: 860px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .hero-portrait {
    order: -1;
    justify-self: center;
    width: min(70%, 20rem);
  }

  .nav-toggle {
    display: block;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: 5.2rem;
    right: 1rem;
    left: 1rem;
    flex-direction: column;
    padding: 0.75rem;
    background: rgba(19, 24, 27, 0.92);
    border: 1px solid var(--brown);
    border-radius: 0.125rem;
  }

  .site-nav.is-open {
    display: flex;
  }

  .nav-link {
    width: 100%;
    max-width: none;
  }

  .post-pager {
    grid-template-columns: 1fr;
  }

  .pager-link.next {
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .brand,
  .brand-mark,
  .portrait-frame img,
  .smoke,
  .nav-link,
  .btn,
  .social a {
    animation: none !important;
    filter: none;
    transition: none;
  }

  .reveal {
    opacity: 1;
  }
}
