@font-face {
  font-family: "Cormorant Garamond";
  src: url("/fonts/cormorant-garamond-latin.woff2?v=20260821-1") format("woff2");
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
}

:root {
  color-scheme: light;
  font-family: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --accent-text: #8b3f32;
  --accent-terminal: #c06a58;
  --ink: #17231d;
  --page-background: #f4f1e9;
  --soft-ink: rgb(23 35 29 / 66%);
  --fine-line: rgb(23 35 29 / 28%);
  --page-width: 76rem;
  background: var(--page-background);
  color: var(--ink);
}

* {
  box-sizing: border-box;
}

html {
  scroll-padding-top: 5rem;
  background: var(--page-background);
}

::selection {
  background: rgb(139 63 50 / 22%);
  color: var(--ink);
}

body {
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  display: grid;
  grid-template-rows: auto minmax(min-content, 1fr) auto;
  justify-items: center;
  gap: clamp(1.5rem, 4vw, 3rem);
  padding: clamp(1.25rem, 3vw, 2.5rem);
  background: var(--page-background);
  color: var(--ink);
}

a {
  color: inherit;
  text-underline-offset: 0.2em;
}

a:hover,
a:focus-visible {
  text-decoration-thickness: 0.15em;
}

a:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 0.25rem;
}

.utility-header,
.site-header,
.home-main,
.site-footer {
  width: min(var(--page-width), 100%);
}

.utility-header {
  border-top: 1px solid currentColor;
  padding-top: 0.75rem;
}

.language-switch,
.primary-navigation,
.site-footer,
.home-introduction p,
.timeline,
.placeholder-copy {
  font-family: system-ui, sans-serif;
}

.language-switch {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  font-size: 0.875rem;
  line-height: 1.4;
}

.language-switch [aria-current="page"],
.primary-navigation [aria-current="page"] {
  font-weight: 650;
  text-decoration: underline;
  text-decoration-thickness: 0.12em;
  text-underline-offset: 0.28em;
}

.home-main {
  align-self: center;
  display: grid;
  grid-template-columns: minmax(15rem, 0.7fr) minmax(34rem, 1.3fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 6rem);
}

.home-introduction {
  position: relative;
  z-index: 2;
}

.home-introduction h1,
.content-main h1 {
  margin: 0;
  font-size: clamp(4.25rem, 8.5vw, 6.6rem);
  font-weight: 400;
  letter-spacing: -0.04em;
  line-height: 0.88;
}

.home-introduction p {
  max-width: 30ch;
  margin: clamp(2rem, 5vw, 3.5rem) 0 0;
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  line-height: 1.55;
  overflow-wrap: break-word;
}

.home-about-link {
  display: inline-block;
  margin-top: clamp(1rem, 2vw, 1.5rem);
  padding-block: 0.65rem;
  text-decoration: none;
}

.translation-field {
  position: relative;
  min-height: min(32rem, 64vh);
  overflow: visible;
  isolation: isolate;
}

.metamorphosis {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: -1.25rem;
  width: calc(100% + 2.25rem);
  aspect-ratio: 760 / 430;
  overflow: visible;
  pointer-events: none;
  transform: translateY(-50%);
}

.hybrid-material {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border: 1px solid rgb(139 63 50 / 34%);
  border-radius: 0.25rem;
  background: #f1e4cf;
  box-shadow: 0 1rem 1.1rem rgb(23 35 29 / 20%);
}

.hybrid-material::before {
  position: absolute;
  inset: 0;
  background: #0d1511;
  clip-path: polygon(
    50% 0,
    100% 0,
    100% 100%,
    50% 100%,
    50% 96%,
    48.8% 96%,
    48.8% 91%,
    51.4% 91%,
    51.4% 86%,
    49.5% 86%,
    49.5% 81%,
    52% 81%,
    52% 76%,
    49% 76%,
    49% 71%,
    50.8% 71%,
    50.8% 66%,
    48.6% 66%,
    48.6% 61%,
    51.6% 61%,
    51.6% 56%,
    49.7% 56%,
    49.7% 51%,
    52.2% 51%,
    52.2% 46%,
    49.2% 46%,
    49.2% 41%,
    51% 41%,
    51% 36%,
    48.5% 36%,
    48.5% 31%,
    51.7% 31%,
    51.7% 26%,
    49.6% 26%,
    49.6% 21%,
    51.2% 21%,
    51.2% 16%,
    48.9% 16%,
    48.9% 11%,
    50.7% 11%,
    50.7% 6%,
    50% 6%
  );
  content: "";
}

.hybrid-material::after {
  position: absolute;
  top: 4%;
  right: 5%;
  width: 35%;
  border-bottom: 1px solid rgb(244 241 233 / 24%);
  padding-bottom: 0.45rem;
  color: rgb(244 241 233 / 52%);
  content: attr(data-terminal-label);
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 0.62rem;
  letter-spacing: 0.04em;
  text-align: right;
}

.surface-copy {
  position: absolute;
  z-index: 2;
  display: grid;
  gap: 0.38rem;
  color: var(--ink);
  font-size: clamp(0.68rem, 0.85vw, 0.78rem);
  line-height: 1.35;
}

.surface-copy span,
.surface-copy code {
  display: block;
}

.surface-copy code {
  position: relative;
  padding-inline-start: 2.25rem;
  color: rgb(244 241 233 / 84%);
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-variant-ligatures: none;
  white-space: nowrap;
}

.surface-copy code::before {
  position: absolute;
  left: 0;
  width: 1.5rem;
  color: rgb(244 241 233 / 38%);
  content: attr(data-line);
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.surface-copy code b {
  color: var(--accent-text);
  font-weight: 700;
}

.surface-copy--code code b,
.surface-copy--return-code code b {
  color: var(--accent-terminal);
}

.surface-copy--language {
  top: 44%;
  left: 9%;
  width: 24%;
  font-family: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  font-size: clamp(0.76rem, 1vw, 0.9rem);
}

.surface-copy--language span:last-child::after {
  display: inline-block;
  width: 1px;
  height: 0.95em;
  margin-inline-start: 0.18em;
  background: var(--accent-text);
  content: "";
  opacity: 0.82;
  vertical-align: -0.08em;
}

.surface-copy--code {
  top: 43%;
  right: 5%;
  width: 31%;
  overflow: hidden;
}

.surface-copy--return-code {
  top: 64%;
  right: 5%;
  width: 31%;
  overflow: hidden;
  opacity: 0.82;
}

.terminal-cursor {
  display: inline-block;
  width: 0.48em;
  height: 1em;
  margin-inline-start: 0.35em;
  background: #c9d9bd;
  vertical-align: -0.14em;
}

.glyph-cloud {
  position: absolute;
  z-index: 3;
  top: 3%;
  left: 39%;
  width: 22%;
  height: 94%;
  overflow: hidden;
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: clamp(0.62rem, 0.8vw, 0.76rem);
  font-variant-ligatures: none;
  --fragment-x: 1.65rem;
  --fragment-y: 0.28rem;
}

.glyph-cloud::before,
.glyph-cloud::after {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0.34rem;
  height: 0.34rem;
  background: currentColor;
  content: "";
}

.glyph-cloud::before {
  color: #0d1511;
  box-shadow:
    -0.35rem -11.4rem 0 -0.08rem currentColor,
    -1.2rem -10.1rem 0 0 currentColor,
    -2.35rem -8.8rem 0 -0.04rem currentColor,
    -0.7rem -7.4rem 0 0.08rem currentColor,
    -3.4rem -6.2rem 0 -0.09rem currentColor,
    -1.7rem -5.1rem 0 -0.02rem currentColor,
    -0.45rem -3.8rem 0 0.04rem currentColor,
    -2.7rem -2.5rem 0 -0.06rem currentColor,
    -1rem -1.2rem 0 0.1rem currentColor,
    -3.7rem 0.1rem 0 -0.1rem currentColor,
    -0.55rem 1.5rem 0 0.03rem currentColor,
    -2.15rem 2.8rem 0 0 currentColor,
    -1.1rem 4.2rem 0 0.07rem currentColor,
    -3.2rem 5.4rem 0 -0.08rem currentColor,
    -0.4rem 6.7rem 0 -0.02rem currentColor,
    -1.8rem 8rem 0 0.05rem currentColor,
    -2.9rem 9.3rem 0 -0.09rem currentColor,
    -0.8rem 10.7rem 0 0 currentColor,
    -1.45rem 11.6rem 0 -0.08rem currentColor;
}

.glyph-cloud::after {
  color: #f1e4cf;
  box-shadow:
    0.55rem -11.1rem 0 0.04rem currentColor,
    2rem -10rem 0 -0.08rem currentColor,
    1rem -8.7rem 0 0 currentColor,
    3.35rem -7.5rem 0 -0.1rem currentColor,
    0.45rem -6.1rem 0 0.07rem currentColor,
    1.65rem -4.9rem 0 -0.03rem currentColor,
    2.75rem -3.6rem 0 0 currentColor,
    0.7rem -2.3rem 0 0.08rem currentColor,
    3.55rem -1rem 0 -0.09rem currentColor,
    1.3rem 0.3rem 0 0.02rem currentColor,
    0.45rem 1.7rem 0 0.06rem currentColor,
    2.45rem 3rem 0 -0.06rem currentColor,
    1rem 4.3rem 0 0 currentColor,
    3.25rem 5.7rem 0 -0.1rem currentColor,
    0.55rem 6.9rem 0 0.08rem currentColor,
    1.9rem 8.2rem 0 -0.03rem currentColor,
    3rem 9.5rem 0 -0.08rem currentColor,
    0.85rem 10.8rem 0 0.02rem currentColor,
    1.5rem 11.7rem 0 -0.08rem currentColor;
}

.glyph-cloud span {
  position: absolute;
  opacity: 0.72;
  will-change: opacity, transform;
}

.glyph-cloud span:nth-child(3n) {
  width: 0.42rem;
  height: 0.42rem;
  overflow: hidden;
  background: currentColor;
  color: transparent;
}

.glyph-cloud span:nth-child(4),
.glyph-cloud span:nth-child(6),
.glyph-cloud span:nth-child(8),
.glyph-cloud span:nth-child(10),
.glyph-cloud span:nth-child(12),
.glyph-cloud span:nth-child(15),
.glyph-cloud span:nth-child(18),
.glyph-cloud span:nth-child(20),
.glyph-cloud span:nth-child(22),
.glyph-cloud span:nth-child(24),
.glyph-cloud span:nth-child(27),
.glyph-cloud span:nth-child(28),
.glyph-cloud span:nth-child(29) {
  color: #f4f1e9;
}

.glyph-cloud span:nth-child(5n + 1) {
  color: var(--accent-text);
}

.glyph-cloud span:nth-child(1) { top: 9%; left: 14%; }
.glyph-cloud span:nth-child(2) { top: 20%; left: 47%; }
.glyph-cloud span:nth-child(3) { top: 34%; left: 22%; }
.glyph-cloud span:nth-child(4) { top: 32%; left: 57%; }
.glyph-cloud span:nth-child(5) { top: 60%; left: 32%; }
.glyph-cloud span:nth-child(6) { top: 72%; left: 69%; }
.glyph-cloud span:nth-child(7) { top: 83%; left: 17%; }
.glyph-cloud span:nth-child(8) { top: 4%; left: 67%; }
.glyph-cloud span:nth-child(9) { top: 51%; left: 4%; }
.glyph-cloud span:nth-child(10) { top: 27%; left: 76%; }
.glyph-cloud span:nth-child(11) { top: 68%; left: 47%; }
.glyph-cloud span:nth-child(12) { top: 89%; left: 58%; }
.glyph-cloud span:nth-child(13) { top: 15%; left: 30%; }
.glyph-cloud span:nth-child(14) { top: 38%; left: 43%; }
.glyph-cloud span:nth-child(15) { top: 56%; left: 86%; }
.glyph-cloud span:nth-child(16) { top: 78%; left: 36%; }
.glyph-cloud span:nth-child(17) { top: 25%; left: 5%; }
.glyph-cloud span:nth-child(18) { top: 47%; left: 84%; }
.glyph-cloud span:nth-child(19) { top: 64%; left: 10%; }
.glyph-cloud span:nth-child(20) { top: 86%; left: 78%; }
.glyph-cloud span:nth-child(21) { top: 7%; left: 39%; }
.glyph-cloud span:nth-child(22) { top: 31%; left: 56%; }
.glyph-cloud span:nth-child(23) { top: 43%; left: 13%; }
.glyph-cloud span:nth-child(24) { top: 70%; left: 51%; }
.glyph-cloud span:nth-child(25) { top: 74%; left: 4%; }
.glyph-cloud span:nth-child(26) { top: 91%; left: 35%; }
.glyph-cloud span:nth-child(27) { top: 17%; left: 83%; }
.glyph-cloud span:nth-child(28) { top: 69%; left: 85%; }
.glyph-cloud span:nth-child(29) { top: 96%; left: 68%; }
.glyph-cloud span:nth-child(30) { top: 2%; left: 54%; }

.field-navigation {
  position: absolute;
  z-index: 4;
  top: 50%;
  left: -1.25rem;
  width: calc(100% + 2.25rem);
  aspect-ratio: 760 / 430;
  transform: translateY(-50%);
}

.field-link {
  position: absolute;
  z-index: 5;
  width: min(15rem, 34%);
  padding-block: 0.65rem;
  text-decoration: none;
}

.field-link-title {
  display: block;
}

.field-link-title {
  color: var(--accent-text);
  font-size: clamp(1.75rem, 3vw, 2.65rem);
  line-height: 1;
  white-space: nowrap;
  transition: color 180ms ease-out, transform 180ms ease-out;
}

.home-about-link .field-link-title {
  font-size: clamp(1.35rem, 2.2vw, 1.85rem);
}

.field-link-title::after {
  display: inline-block;
  width: 0.34em;
  height: 0.34em;
  margin-inline-start: 0.38em;
  border-block-start: 1px solid currentColor;
  border-inline-end: 1px solid currentColor;
  content: "";
  transform: translateY(-0.08em) rotate(45deg);
  transition: transform 180ms ease-out;
}

.field-link:hover .field-link-title,
.field-link:focus-visible .field-link-title,
.home-about-link:hover .field-link-title,
.home-about-link:focus-visible .field-link-title {
  color: var(--ink);
  transform: translateX(0.3rem);
}

.field-link:hover .field-link-title::after,
.field-link:focus-visible .field-link-title::after,
.home-about-link:hover .field-link-title::after,
.home-about-link:focus-visible .field-link-title::after {
  transform: translate(0.16em, -0.08em) rotate(45deg);
}

.field-link--projects:hover .field-link-title,
.field-link--projects:focus-visible .field-link-title {
  color: var(--page-background);
}

.field-link--projects {
  top: 24%;
  right: 6%;
  text-align: right;
}

.field-link--projects .field-link-title {
  color: var(--accent-terminal);
}

.field-link--essays {
  top: 24%;
  left: 10%;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  align-self: start;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: clamp(1.5rem, 4vw, 4rem);
  border-block: 1px solid transparent;
  border-top-color: currentColor;
  padding-block: 0.75rem 0.25rem;
  background: var(--page-background);
}

.site-header--compact {
  gap: clamp(1rem, 2vw, 2rem);
  border-block-color: var(--fine-line);
  padding-block: 0.45rem;
}

.wordmark {
  font-size: 1.15rem;
  font-weight: 700;
  text-decoration: none;
}

.primary-navigation {
  display: flex;
  gap: clamp(1rem, 3vw, 2.5rem);
  font-size: 0.875rem;
  line-height: 1.4;
}

.content-main {
  width: min(42rem, 100%);
  align-self: center;
  padding-block: clamp(2rem, 7vw, 5rem);
}

.projects-main {
  width: min(58rem, 100%);
}

.project-list {
  margin-top: clamp(3rem, 7vw, 5rem);
  border-block: 1px solid var(--fine-line);
}

.project-entry {
  display: grid;
  grid-template-columns: 3.5rem minmax(0, 1fr) auto;
  align-items: start;
  gap: clamp(1rem, 3vw, 2rem);
  padding-block: clamp(1.75rem, 4vw, 2.5rem);
}

.project-entry + .project-entry {
  border-top: 1px solid var(--fine-line);
}

.project-number,
.project-copy p,
.project-link {
  font-family: system-ui, sans-serif;
}

.project-number {
  margin: 0;
  padding-top: 0.3rem;
  color: var(--accent-text);
  font-size: 0.78rem;
  line-height: 1.4;
}

.project-copy h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1;
}

.project-copy > p:last-child {
  max-width: 58ch;
  margin: 1rem 0 0;
  font-size: 1rem;
  line-height: 1.65;
  overflow-wrap: break-word;
}

.project-link {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  gap: 0.35rem;
  color: var(--accent-text);
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.4;
  white-space: nowrap;
}

.project-link span {
  transition: transform 180ms ease-out;
}

.project-link:hover span,
.project-link:focus-visible span {
  transform: translate(0.15rem, -0.15rem);
}

.project-essay-link {
  position: relative;
  grid-column: 2 / -1;
  display: grid;
  grid-template-columns: 7.5rem minmax(0, 1fr);
  align-items: baseline;
  gap: clamp(1rem, 3vw, 2rem);
  padding-top: 1.15rem;
  border-top: 1px solid var(--fine-line);
  text-decoration: none;
}

.project-essay-link::before {
  position: absolute;
  inset-block-start: -0.3rem;
  inset-inline-start: 0;
  width: 0.5rem;
  height: 0.5rem;
  border: 1px solid var(--accent-text);
  border-radius: 50%;
  background: var(--page-background);
  content: "";
}

.project-essay-label {
  color: var(--accent-text);
  font-family: system-ui, sans-serif;
  font-size: 0.78rem;
  font-weight: 650;
  line-height: 1.4;
}

.project-essay-title {
  max-width: 42ch;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.3;
  transition: color 180ms ease-out, transform 180ms ease-out;
}

.project-essay-link:hover .project-essay-title,
.project-essay-link:focus-visible .project-essay-title {
  color: var(--accent-text);
  transform: translateX(0.25rem);
}

.timeline {
  --timeline-indent: 2rem;
  position: relative;
  max-width: 62ch;
  margin: clamp(3rem, 7vw, 5rem) 0 0;
  padding: 0 0 0 var(--timeline-indent);
  list-style: none;
  font-size: 1.05rem;
  line-height: 1.6;
  overflow-wrap: break-word;
  hyphens: manual;
}

.timeline::before {
  position: absolute;
  inset-block: 0.55em;
  inset-inline-start: 0.3125rem;
  width: 1px;
  background: var(--fine-line);
  content: "";
}

.timeline > li {
  position: relative;
}

.timeline > li + li {
  margin-block-start: clamp(1.75rem, 4vw, 2.5rem);
}

.timeline > li::before {
  position: absolute;
  inset-block-start: 0.48em;
  inset-inline-start: calc(0px - var(--timeline-indent));
  width: 0.625rem;
  height: 0.625rem;
  border: 1px solid currentColor;
  border-radius: 50%;
  background: var(--page-background);
  content: "";
}

.timeline p,
.placeholder-copy p {
  margin: 0;
}

.timeline strong,
.timeline a,
.placeholder-copy a {
  color: var(--accent-text);
  font-weight: 700;
}

.timeline-essay-link {
  margin-block-start: 1.15rem;
}

.timeline-essay-link .project-essay-title {
  color: var(--ink);
}

.ai-contributions {
  margin-block-start: 1.15rem;
  border-block: 1px solid var(--fine-line);
  color: var(--ink);
}

.ai-contributions summary {
  position: relative;
  padding: 0.9rem 2rem 0.9rem 0;
  cursor: pointer;
  list-style: none;
}

.ai-contributions summary::-webkit-details-marker {
  display: none;
}

.ai-contributions summary::after {
  position: absolute;
  inset-block-start: 50%;
  inset-inline-end: 0.25rem;
  width: 0.55rem;
  height: 0.55rem;
  border-inline-end: 1px solid currentColor;
  border-block-end: 1px solid currentColor;
  content: "";
  transform: translateY(-65%) rotate(45deg);
  transition: transform 180ms ease-out;
}

.ai-contributions[open] summary::after {
  transform: translateY(-35%) rotate(225deg);
}

.ai-contributions summary:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 0.25rem;
}

.ai-contributions__summary {
  display: grid;
  grid-template-columns: 1.5rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.65rem;
}

.ai-contributions__summary img {
  display: block;
  width: 1.35rem;
  height: 1.35rem;
}

.ai-contributions__title {
  font-family: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.25;
  transition: color 180ms ease-out;
}

.ai-contributions summary:hover .ai-contributions__title,
.ai-contributions summary:focus-visible .ai-contributions__title {
  color: var(--accent-text);
}

.ai-contributions__count {
  color: var(--soft-ink);
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1.3;
  white-space: nowrap;
}

.article-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 0;
  padding: 0 0 1rem;
  list-style: none;
}

.article-chips a {
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
  min-height: 2.35rem;
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--fine-line);
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 650;
  line-height: 1.3;
  text-decoration: none;
  transition: border-color 180ms ease-out, color 180ms ease-out;
}

.article-chips a:hover,
.article-chips a:focus-visible {
  border-color: var(--accent-text);
  color: var(--accent-text);
}

.article-chips time {
  color: var(--soft-ink);
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}

.ai-contributions[open] .article-chips {
  animation: contributions-in 180ms ease-out;
}

@keyframes contributions-in {
  from {
    opacity: 0;
    transform: translateY(-0.25rem);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.placeholder-main {
  min-height: min(34rem, 55vh);
  display: grid;
  align-content: center;
}

.placeholder-copy {
  max-width: 57ch;
  margin-top: clamp(2.5rem, 6vw, 4rem);
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  line-height: 1.6;
}

.placeholder-copy p + p {
  margin-top: 1rem;
}

.site-footer {
  font-size: 0.875rem;
  line-height: 1.4;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  column-gap: 1.5rem;
}

.social-link {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  gap: 0.5rem;
}

.social-link img {
  width: 1rem;
  height: 1rem;
  flex: none;
}

@media (prefers-reduced-motion: no-preference) {
  .site-header {
    transition:
      gap 220ms cubic-bezier(0.16, 1, 0.3, 1),
      padding 220ms cubic-bezier(0.16, 1, 0.3, 1),
      border-color 180ms ease-out;
  }

  .glyph-cloud span {
    animation:
      fragment-drift var(--fragment-speed, 4.2s) cubic-bezier(0.45, 0, 0.2, 1) infinite alternate,
      fragment-phase var(--fragment-phase, 1.7s) steps(6, end) infinite;
  }

  .glyph-cloud span:nth-child(even) {
    animation-direction: alternate-reverse, normal;
  }

  .glyph-cloud span:nth-child(3n + 1) {
    --fragment-speed: 3.5s;
    --fragment-phase: 1.3s;
    animation-delay: -1.6s, -0.45s;
  }

  .glyph-cloud span:nth-child(3n + 2) {
    --fragment-speed: 5.1s;
    --fragment-phase: 2.1s;
    animation-delay: -3.2s, -1.1s;
  }

  .glyph-cloud span:nth-child(4n) {
    animation-delay: -2.4s, -1.7s;
  }

  .terminal-cursor {
    animation: terminal-cursor 900ms steps(2, end) infinite;
  }

  .surface-copy--language span:last-child::after,
  .surface-copy--language::after {
    animation: terminal-cursor 900ms steps(2, end) infinite;
  }

  .translation-field.is-motion-paused .glyph-cloud span,
  .translation-field.is-motion-paused .terminal-cursor,
  .translation-field.is-motion-paused .surface-copy--language span:last-child::after,
  .translation-field.is-motion-paused .surface-copy--language::after {
    animation-play-state: paused;
  }
}

@keyframes fragment-drift {
  0% {
    transform: translate(calc(var(--fragment-x) * -1), var(--fragment-y)) rotate(-7deg) scale(0.76);
  }

  42%,
  58% {
    transform: translate(0, 0) rotate(0) scale(1);
  }

  100% {
    transform: translate(var(--fragment-x), calc(var(--fragment-y) * -1)) rotate(7deg) scale(0.8);
  }
}

@keyframes fragment-phase {
  0%,
  100% { opacity: 0; }
  16% { opacity: 0.76; }
  40% { opacity: 0.24; }
  62% { opacity: 0.9; }
  84% { opacity: 0.42; }
}

@keyframes terminal-cursor {
  0%,
  45% { opacity: 1; }
  46%,
  100% { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .glyph-cloud span {
    opacity: 0.64;
  }
}

@media (max-width: 58rem) {
  html {
    scroll-padding-top: 7rem;
  }

  .home-main {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .home-introduction p {
    max-width: 37ch;
  }

  .translation-field {
    min-height: 32rem;
  }

  .metamorphosis,
  .field-navigation {
    left: -2rem;
    width: calc(100% + 3rem);
  }

  .site-header {
    grid-template-columns: 1fr auto;
    row-gap: 1.25rem;
  }

  .site-header--compact {
    row-gap: 0.45rem;
  }

  .project-entry {
    grid-template-columns: 2rem minmax(0, 1fr);
  }

  .project-link {
    grid-column: 2;
    justify-self: start;
  }

  .project-essay-link {
    grid-column: 2;
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }

  .primary-navigation {
    grid-row: 2;
    grid-column: 1 / -1;
  }
}

@media (min-width: 40.001rem) and (max-width: 52rem) {
  .surface-copy--language {
    left: 3%;
    width: 30%;
    font-size: clamp(0.68rem, 1.6vw, 0.76rem);
    line-height: 1.3;
  }

  .surface-copy--code,
  .surface-copy--return-code {
    right: 2%;
    width: 34%;
    font-size: clamp(0.58rem, 1.5vw, 0.68rem);
  }

  .surface-copy code {
    padding-inline-start: 1.65rem;
  }

  .surface-copy code::before {
    width: 1rem;
  }
}

@media (max-width: 40rem) {
  body {
    gap: 1.5rem;
  }

  .home-main {
    align-self: start;
  }

  .home-introduction h1,
  .content-main h1 {
    font-size: clamp(4rem, 22vw, 5.5rem);
  }

  .translation-field {
    min-height: 0;
    aspect-ratio: 430 / 500;
    overflow: visible;
    margin-inline: 0;
  }

  .metamorphosis,
  .field-navigation {
    top: 50%;
    left: 0;
    width: 100%;
    aspect-ratio: 430 / 500;
    transform: translateY(-50%);
  }

  .hybrid-material::before {
    clip-path: polygon(
      0 50%,
      6% 50%,
      6% 48.8%,
      11% 48.8%,
      11% 51.4%,
      16% 51.4%,
      16% 49.5%,
      21% 49.5%,
      21% 52%,
      26% 52%,
      26% 49%,
      31% 49%,
      31% 50.8%,
      36% 50.8%,
      36% 48.6%,
      41% 48.6%,
      41% 51.6%,
      46% 51.6%,
      46% 49.7%,
      51% 49.7%,
      51% 52.2%,
      56% 52.2%,
      56% 49.2%,
      61% 49.2%,
      61% 51%,
      66% 51%,
      66% 48.5%,
      71% 48.5%,
      71% 51.7%,
      76% 51.7%,
      76% 49.6%,
      81% 49.6%,
      81% 51.2%,
      86% 51.2%,
      86% 48.9%,
      91% 48.9%,
      91% 50.7%,
      96% 50.7%,
      96% 50%,
      100% 50%,
      100% 100%,
      0 100%
    );
  }

  .hybrid-material::after {
    top: 59%;
    right: 6%;
    width: 44%;
    font-size: 0.56rem;
  }

  .surface-copy {
    display: block;
    width: auto;
    font-size: 0.64rem;
    line-height: 1.2;
    transform: none;
    -webkit-mask-image: none;
    mask-image: none;
  }

  .surface-copy > span,
  .surface-copy > code {
    display: none;
  }

  .surface-copy::before {
    content: attr(data-mobile);
    display: block;
    white-space: nowrap;
  }

  .surface-copy--language {
    top: 29%;
    left: 7%;
    font-size: 0.78rem;
  }

  .surface-copy--language::before {
    display: inline;
  }

  .surface-copy--language::after {
    display: inline-block;
    width: 1px;
    height: 0.95em;
    margin-inline-start: 0.18em;
    background: var(--accent-text);
    content: "";
    opacity: 0.82;
    vertical-align: -0.08em;
  }

  .surface-copy--code {
    top: 85%;
    right: 6%;
    color: rgb(244 241 233 / 84%);
    font-size: 0.58rem;
  }

  .surface-copy--return-code {
    top: 91%;
    right: 6%;
    bottom: auto;
    left: auto;
    color: rgb(244 241 233 / 72%);
    font-size: 0.56rem;
  }

  .glyph-cloud {
    top: 39%;
    left: 5%;
    width: 90%;
    height: 22%;
    font-size: 0.56rem;
    --fragment-x: 0.22rem;
    --fragment-y: 1.3rem;
  }

  .glyph-cloud::before,
  .glyph-cloud::after {
    transform: rotate(90deg) scale(0.72);
  }

  .glyph-cloud span:nth-child(3) { top: 25%; }
  .glyph-cloud span:nth-child(5) { left: 8%; }
  .glyph-cloud span:nth-child(11) { top: 78%; }
  .glyph-cloud span:nth-child(14) { left: 10%; }

  .glyph-cloud span {
    color: var(--ink);
  }

  .glyph-cloud span:nth-child(5),
  .glyph-cloud span:nth-child(6),
  .glyph-cloud span:nth-child(7),
  .glyph-cloud span:nth-child(9),
  .glyph-cloud span:nth-child(11),
  .glyph-cloud span:nth-child(12),
  .glyph-cloud span:nth-child(15),
  .glyph-cloud span:nth-child(16),
  .glyph-cloud span:nth-child(19),
  .glyph-cloud span:nth-child(20),
  .glyph-cloud span:nth-child(24),
  .glyph-cloud span:nth-child(25),
  .glyph-cloud span:nth-child(26),
  .glyph-cloud span:nth-child(28),
  .glyph-cloud span:nth-child(29) {
    color: #f4f1e9;
  }

  .glyph-cloud span:nth-child(9),
  .glyph-cloud span:nth-child(15) {
    color: var(--accent-terminal);
  }

  .glyph-cloud span:nth-child(18),
  .glyph-cloud span:nth-child(23) {
    color: var(--accent-text);
  }

  .field-link--essays {
    top: 13%;
    left: 7%;
    width: 72%;
    text-align: left;
  }

  .field-link--projects {
    top: 68%;
    right: 6%;
    width: 72%;
    text-align: right;
  }

  .field-link-title {
    font-size: clamp(1.7rem, 8vw, 2.1rem);
  }

  .primary-navigation {
    justify-content: space-between;
    gap: 0.75rem;
  }

  .timeline {
    --timeline-indent: 1.5rem;
    font-size: 1rem;
  }

  .ai-contributions__summary {
    grid-template-columns: 1.5rem minmax(0, 1fr);
  }

  .ai-contributions__count {
    grid-column: 2;
  }

  .article-chips li,
  .article-chips a {
    width: 100%;
  }

  .article-chips a {
    justify-content: space-between;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ai-contributions summary::after,
  .ai-contributions__title,
  .article-chips a {
    transition: none;
  }

  .ai-contributions[open] .article-chips {
    animation: none;
  }
}
