/* This file contains all styles for the personal site. */

:root {
  color-scheme: dark;
  --base: #293631;
  --bg: #293631;
  --surface: #34423c;
  --ink: #e9efec;
  --muted: #9aaba3;
  --accent: #d69696;
  --accent-dark: #e4b0b0;
  --line: rgba(233, 239, 236, 0.12);
  --header-h: 4rem;
  --max: 720px;
  --wide: 880px;
  --font-sans: "Figtree", sans-serif;
  --font-serif: "Newsreader", Georgia, serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
}

a:hover,
a:focus-visible {
  color: var(--accent-dark);
}

img {
  max-width: 100%;
}

button {
  font: inherit;
}

/* This styles the fixed atmospheric page background. */
.page-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 70% 45% at 100% 0%, rgba(214, 150, 150, 0.16), transparent 55%),
    radial-gradient(ellipse 55% 40% at 0% 40%, rgba(52, 66, 60, 0.9), transparent 50%),
    linear-gradient(180deg, #24302c 0%, #293631 42%, #2e3b36 100%);
  background-size: 120% 120%, 130% 130%, 100% 100%;
  background-position: 100% 0%, 0% 40%, 0 0;
  animation: bg-drift 28s ease-in-out infinite alternate;
}

@keyframes bg-drift {
  from {
    background-position: 100% 0%, 0% 40%, 0 0;
  }

  to {
    background-position: 85% 8%, 8% 55%, 0 0;
  }
}

/* This styles the sticky site header and navigation. */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  padding: 0 clamp(1.15rem, 4vw, 2.5rem);
  background: rgba(18, 26, 23, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease;
}

.site-header.is-scrolled {
  border-bottom-color: var(--line);
}

/* This fades the header logo and nav in with the hero. */
html.js .site-header .logo,
html.js .site-header .nav-toggle {
  opacity: 0;
  transform: translateY(-0.35rem);
}

html.js .site-header.is-ready .logo {
  animation: rise-in 0.7s var(--ease) 0.04s forwards;
}

html.js .site-header.is-ready .nav-toggle {
  animation: rise-in 0.7s var(--ease) 0.16s forwards;
}

@media (min-width: 721px) {
  html.js .site-header .site-nav {
    opacity: 0;
    transform: translateY(-0.35rem);
  }

  html.js .site-header.is-ready .site-nav {
    animation: rise-in 0.7s var(--ease) 0.16s forwards;
  }
}

.logo {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.15rem;
  text-decoration: none;
  color: var(--ink);
  letter-spacing: -0.02em;
  transition: color 0.25s var(--ease), letter-spacing 0.35s var(--ease);
}

.logo:hover,
.logo:focus-visible {
  color: var(--accent);
  letter-spacing: 0.04em;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.15rem;
  justify-content: flex-end;
}

.site-nav a {
  position: relative;
  text-decoration: none;
  color: var(--muted);
  font-size: 0.9375rem;
  font-weight: 500;
  transition: color 0.2s ease;
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.2rem;
  width: 100%;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}

.site-nav a:hover,
.site-nav a:focus-visible,
.site-nav a[aria-current="page"],
.site-nav a.is-active {
  color: var(--ink);
}

.site-nav a:hover::after,
.site-nav a:focus-visible::after,
.site-nav a[aria-current="page"]::after,
.site-nav a.is-active::after {
  transform: scaleX(1);
}

.nav-divider {
  display: inline-block;
  width: 1px;
  height: 1rem;
  background: var(--line);
  flex-shrink: 0;
}

.nav-toggle {
  display: none;
  width: 2.5rem;
  height: 2.5rem;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
}

.nav-toggle span {
  display: block;
  width: 1.25rem;
  height: 2px;
  background: var(--ink);
  transition: transform 0.25s var(--ease);
}

.nav-toggle[aria-expanded="true"] span:first-child {
  transform: translateY(4px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:last-child {
  transform: translateY(-4px) rotate(-45deg);
}

/* This sets the shared content column width. */
.hero,
.section,
.writing-page {
  width: min(100% - 2.3rem, var(--wide));
  margin-inline: auto;
}

/* This styles the home page hero. */
.hero {
  padding: clamp(3rem, 10vh, 5.5rem) 0 clamp(2.5rem, 6vh, 4rem);
  max-width: var(--max);
  margin-left: clamp(1.15rem, 4vw, calc((100% - var(--wide)) / 2 + 1rem));
  margin-right: auto;
}

/* This stages the hero entrance animation. */
html.js .hero .brand,
html.js .hero h1,
html.js .hero .lede,
html.js .hero .hero-actions,
html.js .writing-hero .eyebrow,
html.js .writing-hero h1,
html.js .writing-hero .lede {
  opacity: 0;
  transform: translateY(1.1rem);
}

html.js .hero.is-ready .brand,
html.js .hero.is-ready h1,
html.js .hero.is-ready .lede,
html.js .hero.is-ready .hero-actions,
html.js .writing-hero.is-ready .eyebrow,
html.js .writing-hero.is-ready h1,
html.js .writing-hero.is-ready .lede {
  animation: rise-in 0.85s var(--ease) forwards;
}

html.js .hero.is-ready .brand,
html.js .writing-hero.is-ready .eyebrow {
  animation-delay: 0.05s;
}

html.js .hero.is-ready h1,
html.js .writing-hero.is-ready h1 {
  animation-delay: 0.18s;
}

html.js .hero.is-ready .lede,
html.js .writing-hero.is-ready .lede {
  animation-delay: 0.32s;
}

html.js .hero.is-ready .hero-actions {
  animation-delay: 0.46s;
}

@keyframes rise-in {
  to {
    opacity: 1;
    transform: none;
  }
}

.brand {
  margin: 0 0 1rem;
  font-family: var(--font-serif);
  font-size: clamp(2.6rem, 8vw, 4.4rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
  white-space: nowrap;
}

.hero h1,
.writing-hero h1 {
  margin: 0 0 1rem;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(1.35rem, 2.8vw, 1.9rem);
  line-height: 1.25;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.hero h1 {
  width: max-content;
  max-width: 100%;
}

.lede {
  margin: 0 0 1.75rem;
  color: var(--muted);
  max-width: var(--phrase-width, 100%);
}

.hero .lede {
  width: var(--phrase-width, 100%);
  max-width: 100%;
}

.lede.short {
  margin-bottom: 1.25rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* This styles primary and ghost buttons. */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.25rem;
  border-radius: 2px;
  border: 1px solid transparent;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9375rem;
  cursor: pointer;
  transition:
    background 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s var(--ease),
    box-shadow 0.2s var(--ease);
}

.btn-primary {
  background: var(--accent);
  color: var(--base);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: var(--accent-dark);
  color: var(--base);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(214, 150, 150, 0.22);
}

.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--ink);
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
  border-color: var(--ink);
  color: var(--ink);
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(1px);
  box-shadow: none;
}

.btn-primary:active {
  background: var(--accent);
  color: var(--base);
}

/* This styles the main home page sections. */
.section {
  position: relative;
  padding: clamp(2.75rem, 7vh, 4.5rem) 0;
  border-top: 1px solid var(--line);
  max-width: var(--max);
  margin-left: clamp(1.15rem, 4vw, calc((100% - var(--wide)) / 2 + 1rem));
  margin-right: auto;
}

/* This draws section dividers in as sections reveal. */
html.js .section.reveal,
html.js .writing-section.reveal,
html.js .piece-index.reveal,
html.js .site-footer.reveal {
  border-top-color: transparent;
}

html.js .section.reveal::before,
html.js .writing-section.reveal::before,
html.js .piece-index.reveal::before,
html.js .site-footer.reveal::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: var(--line);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.85s var(--ease);
}

html.js .section.reveal.is-visible::before,
html.js .writing-section.reveal.is-visible::before,
html.js .piece-index.reveal.is-visible::before,
html.js .site-footer.reveal.is-visible::before {
  transform: scaleX(1);
}

/* This handles scroll-triggered reveal for sections and entries. */
html.js .reveal {
  opacity: 0;
  transform: translateY(1.25rem);
  transition:
    opacity 0.7s var(--ease),
    transform 0.7s var(--ease);
}

html.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

html.js .reveal-delay-1 {
  transition-delay: 0.08s;
}

html.js .reveal-delay-2 {
  transition-delay: 0.16s;
}

html.js .reveal-delay-3 {
  transition-delay: 0.24s;
}

.eyebrow {
  position: relative;
  display: inline-block;
  margin: 0 0 0.5rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  white-space: nowrap;
}

/* This draws a short accent underline under section labels. */
.eyebrow::after,
.writing-section-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.2rem;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform-origin: left;
}

html.js .eyebrow::after,
html.js .writing-section-title::after {
  transform: scaleX(0);
  transition: transform 0.55s var(--ease) 0.18s;
}

html.js .reveal.is-visible > .eyebrow::after,
html.js .reveal.is-visible .writing-section-title::after,
html.js .writing-hero.is-ready .eyebrow::after {
  transform: scaleX(1);
}

.section h2,
.writing-hero .eyebrow + h1 {
  margin: 0 0 1.25rem;
}

.section h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.35rem, 2.6vw, 2.1rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
  white-space: nowrap;
}

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

.org-line {
  margin: -0.5rem 0 1rem;
  color: var(--muted);
  font-weight: 500;
}

.about-summary {
  display: grid;
  gap: 1rem;
  width: var(--phrase-width, 100%);
  max-width: 100%;
}

.about-summary p {
  margin: 0;
  color: var(--muted);
}

.lead {
  margin: 0;
  font-size: 1.2rem;
  line-height: 1.45;
  font-weight: 500;
  color: var(--ink) !important;
}

.meta-list {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 1.15rem 0 0;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 0.65rem;
}

.meta-list li {
  display: grid;
  grid-template-columns: 6rem 1fr;
  gap: 0.75rem;
  font-weight: 500;
}

.meta-list span {
  color: var(--muted);
  font-size: 0.9rem;
}

/* This styles project and experience entries. */
.entry {
  display: grid;
  gap: 0.75rem;
  padding: 1.5rem 0;
  border-top: 1px solid var(--line);
}

.entry:last-child {
  padding-bottom: 0;
}

@media (hover: hover) and (pointer: fine) {
  .entry:hover .entry-body h3 {
    color: var(--accent);
  }
}

@media (min-width: 640px) {
  .entry {
    grid-template-columns: 9.5rem 1fr;
    gap: 1.5rem;
  }
}

.when {
  margin: 0;
  font-weight: 600;
  font-size: 0.9375rem;
}

.where {
  margin: 0.2rem 0 0;
  color: var(--muted);
  font-size: 0.875rem;
}

.entry-body h3 {
  margin: 0 0 0.2rem;
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 600;
  white-space: nowrap;
  transition: color 0.25s ease;
}

.org {
  margin: 0 0 0.75rem;
  color: var(--accent);
  font-weight: 600;
  font-size: 0.9375rem;
}

.entry-body ul {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--muted);
}

.entry-body li + li {
  margin-top: 0.4rem;
}

/* This styles the skills grid and outreach list. */
.skills-grid {
  display: grid;
  gap: 1.35rem;
  padding-top: 0.25rem;
}

@media (min-width: 600px) {
  .skills-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.skills-grid > div {
  padding: 0.85rem 0 0.85rem 0.9rem;
  border-left: 2px solid transparent;
  transition: border-color 0.3s ease, transform 0.3s var(--ease);
}

@media (hover: hover) and (pointer: fine) {
  .skills-grid > div:hover {
    border-left-color: var(--accent);
    transform: translateX(3px);
  }
}

.skills-grid h3 {
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
  font-weight: 700;
}

.skills-grid p {
  margin: 0;
  color: var(--muted);
}

.simple-list {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--muted);
}

.simple-list li + li {
  margin-top: 0.65rem;
}

.simple-list strong {
  color: var(--ink);
}

.writing-teaser .lede {
  max-width: none;
}

/* This styles the contact links. */
.contact-list {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.85rem;
}

.contact-list li {
  display: grid;
  gap: 0.15rem;
}

.contact-list span {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.contact-list a {
  position: relative;
  display: inline-block;
  text-decoration: none;
  font-weight: 600;
  color: var(--ink);
  word-break: break-word;
  transition: color 0.2s ease;
}

.contact-list a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.1rem;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}

.contact-list a:hover,
.contact-list a:focus-visible {
  color: var(--accent);
}

.contact-list a:hover::after,
.contact-list a:focus-visible::after {
  transform: scaleX(1);
}

/* This styles the site footer. */
.site-footer {
  position: relative;
  width: min(100% - 2.3rem, var(--max));
  margin: 0 auto;
  padding: 1.5rem 0 2.5rem;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  text-decoration: none;
  font-weight: 600;
  color: var(--muted);
  transition: color 0.2s ease;
}

.site-footer a:hover,
.site-footer a:focus-visible {
  color: var(--accent);
}

/* This styles the writing page layout and piece toggles. */
.writing-page {
  padding: clamp(2.5rem, 8vh, 4rem) 0 3rem;
  max-width: var(--max);
  margin-inline: auto;
}

.writing-hero {
  margin-bottom: 2.5rem;
}

.writing-hero h1 {
  max-width: none;
}

.writing-section {
  position: relative;
  padding: 2.25rem 0 1rem;
  border-top: 1px solid var(--line);
}

.writing-section-title {
  position: relative;
  display: inline-block;
  margin: 0 0 0.4rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  font-family: var(--font-sans);
  line-height: 1.2;
  white-space: nowrap;
}

.writing-section-desc {
  margin: 0 0 1.15rem;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.5;
  white-space: nowrap;
}

.section-empty {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  font-style: italic;
}

.piece-index {
  position: relative;
  margin-bottom: 0;
  padding: 1.15rem 0;
  border-top: 1px solid var(--line);
}

.index-label {
  margin: 0 0 0.65rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.piece-index ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}

.piece-index a {
  position: relative;
  display: inline-block;
  text-decoration: none;
  font-weight: 600;
  color: var(--ink);
  transition: color 0.2s ease;
}

.piece-index a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.1rem;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}

.piece-index a:hover,
.piece-index a:focus-visible {
  color: var(--accent);
}

.piece-index a:hover::after,
.piece-index a:focus-visible::after {
  transform: scaleX(1);
}

.piece {
  padding: 0.15rem 0 0.35rem;
}

.piece + .piece {
  margin-top: 0.35rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--line);
}

.piece h3 {
  margin: 0;
}

.piece-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  margin: 0;
  padding: 0.55rem 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
  color: var(--ink);
  transition: transform 0.25s var(--ease);
}

.piece-toggle:hover,
.piece-toggle:focus-visible {
  transform: translateX(4px);
}

.piece-toggle-label {
  font-family: var(--font-serif);
  font-size: clamp(1.25rem, 2.6vw, 1.7rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.25;
  white-space: nowrap;
}

.piece-toggle-icon {
  flex-shrink: 0;
  width: 0.65rem;
  height: 0.65rem;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  transition: transform 0.25s var(--ease);
}

.piece-toggle[aria-expanded="true"] .piece-toggle-icon {
  transform: translateY(3px) rotate(225deg);
}

.piece-toggle:hover .piece-toggle-label,
.piece-toggle:focus-visible .piece-toggle-label {
  color: var(--accent);
}

.piece-toggle:hover .piece-toggle-icon,
.piece-toggle:focus-visible .piece-toggle-icon {
  border-color: var(--accent);
}

.piece-panel {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition:
    max-height 0.45s var(--ease),
    opacity 0.35s ease,
    margin 0.35s ease;
}

.piece-panel.is-open {
  max-height: none;
  opacity: 1;
  overflow: visible;
}

.piece-panel[hidden] {
  display: none;
}

.piece-panel.is-open[hidden] {
  display: block;
}

.piece-published {
  margin: 0 0 0.75rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.piece-body {
  padding: 0.35rem 0 1.15rem;
  font-family: var(--font-serif);
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--ink);
}

.piece-body p {
  margin: 0 0 1rem;
}

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

.piece-body.poem p {
  margin-bottom: 1.15rem;
}

.works-cited {
  margin-top: 2rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--line);
}

.works-cited-heading {
  margin: 0;
}

.works-cited-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
  margin: 0;
  padding: 0.45rem 0.15rem 0.45rem 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
  color: var(--accent);
}

.works-cited-toggle-label {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: color 0.2s ease;
}

.works-cited-toggle-icon {
  flex-shrink: 0;
  box-sizing: content-box;
  width: 1rem;
  height: 1rem;
  display: grid;
  place-items: center;
  padding: 0.15rem;
}

.works-cited-toggle-icon::before {
  content: "";
  width: 0.45rem;
  height: 0.45rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.25s var(--ease);
}

.works-cited-toggle[aria-expanded="true"] .works-cited-toggle-icon::before {
  transform: translateY(2px) rotate(225deg);
}

.works-cited-toggle:hover .works-cited-toggle-label,
.works-cited-toggle:focus-visible .works-cited-toggle-label {
  color: var(--accent-dark);
}

.works-cited-toggle:hover,
.works-cited-toggle:focus-visible {
  color: var(--accent-dark);
}

.works-cited-panel {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition:
    max-height 0.45s var(--ease),
    opacity 0.35s ease;
}

.works-cited-panel.is-open {
  max-height: none;
  opacity: 1;
  overflow: visible;
}

.works-cited-panel[hidden] {
  display: none;
}

.works-cited-panel.is-open[hidden] {
  display: block;
}

.works-cited-list {
  list-style: none;
  margin: 0;
  padding: 0.35rem 0 0.25rem;
  display: grid;
  gap: 0.85rem;
}

.works-cited-item {
  margin: 0;
  padding-left: 1.5rem;
  text-indent: -1.5rem;
  font-family: var(--font-serif);
  font-size: 1rem;
  line-height: 1.55;
  color: var(--muted);
}

.works-cited-item a {
  color: var(--accent);
  word-break: break-word;
}

.works-cited-item a:hover,
.works-cited-item a:focus-visible {
  color: var(--accent-dark);
}

/* This adjusts layout and navigation for smaller screens. */
@media (max-width: 720px) {
  .nav-toggle {
    display: flex;
  }

  .site-nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    flex-direction: column;
    gap: 0;
    padding: 0.35rem 1.15rem 1rem;
    background: rgba(18, 26, 23, 0.98);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s var(--ease), opacity 0.2s ease;
  }

  .site-nav.is-open {
    transform: none;
    opacity: 1;
    pointer-events: auto;
  }

  .site-nav a {
    padding: 0.8rem 0;
    border-bottom: 1px solid var(--line);
    color: var(--ink);
  }

  .site-nav a::after {
    display: none;
  }

  .site-nav .nav-divider {
    display: block;
    width: 100%;
    height: 1px;
    margin: 0.35rem 0;
  }

  .site-nav a:last-child {
    border-bottom: 0;
  }

  .hero,
  .section,
  .writing-page,
  .site-footer {
    margin-left: auto;
    margin-right: auto;
  }

  .site-footer {
    flex-direction: column;
  }

  .brand,
  .hero h1,
  .writing-hero h1,
  .section h2,
  .piece-toggle-label {
    white-space: normal;
  }

  .writing-section-desc {
    font-size: clamp(0.82rem, 3.4vw, 1rem);
  }

  .section h2 {
    font-size: clamp(1.25rem, 5.5vw, 1.7rem);
  }

  .entry-body h3 {
    white-space: normal;
  }
}

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

  .page-bg {
    animation: none;
  }

  .hero .brand,
  .hero h1,
  .hero .lede,
  .hero .hero-actions,
  .writing-hero .eyebrow,
  .writing-hero h1,
  .writing-hero .lede,
  .reveal,
  .site-header .logo,
  .site-header .site-nav,
  .site-header .nav-toggle {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
    transition: none !important;
  }

  .eyebrow::after,
  .writing-section-title::after,
  .section.reveal::before,
  .writing-section.reveal::before,
  .piece-index.reveal::before,
  .site-footer.reveal::before {
    transform: none !important;
  }

  html.js .section.reveal,
  html.js .writing-section.reveal,
  html.js .piece-index.reveal,
  html.js .site-footer.reveal {
    border-top-color: var(--line);
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
