:root {
  color-scheme: light;
  font-family: Georgia, "Times New Roman", serif;
  --accent-text: #8b3f32;
  --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 {
  background: var(--page-background);
}

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,
.map-link-detail,
.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(3.75rem, 8vw, 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;
}

.work-map {
  position: relative;
  min-height: min(36rem, 67vh);
  isolation: isolate;
}

.map-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  fill: var(--page-background);
  stroke: var(--accent-text);
  stroke-width: 1.25;
  vector-effect: non-scaling-stroke;
}

.map-lines path {
  fill: none;
  opacity: 0.72;
  transition: opacity 180ms ease-out;
}

.map-lines circle {
  stroke-width: 1.5;
}

.map-core {
  position: absolute;
  top: 50%;
  left: 48.9%;
  width: clamp(4.5rem, 8vw, 6.5rem);
  aspect-ratio: 1;
  border: 1px solid var(--ink);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.map-core::before,
.map-core::after,
.map-core span {
  position: absolute;
  border-radius: 50%;
  content: "";
}

.map-core::before {
  inset: 18%;
  border: 1px solid var(--fine-line);
}

.map-core::after {
  inset: 41%;
  background: var(--accent-text);
}

.map-core span {
  inset: -14%;
  border: 1px solid var(--fine-line);
}

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

.map-link-title,
.map-link-detail {
  display: block;
}

.map-link-title {
  font-size: clamp(1.75rem, 3vw, 2.65rem);
  line-height: 1;
  transition: color 180ms ease-out, transform 180ms ease-out;
}

.map-link-detail {
  margin-top: 0.55rem;
  color: var(--soft-ink);
  font-size: 0.78rem;
  line-height: 1.4;
}

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

.map-link--projects {
  top: 12%;
  left: 0;
}

.map-link--essays {
  top: 8%;
  right: 0;
  text-align: right;
}

.map-link--about {
  right: 1%;
  bottom: 4%;
  text-align: right;
}

.work-map:has(.map-link--projects:hover) .map-lines path:nth-of-type(1),
.work-map:has(.map-link--projects:focus-visible) .map-lines path:nth-of-type(1),
.work-map:has(.map-link--essays:hover) .map-lines path:nth-of-type(2),
.work-map:has(.map-link--essays:focus-visible) .map-lines path:nth-of-type(2),
.work-map:has(.map-link--about:hover) .map-lines path:nth-of-type(3),
.work-map:has(.map-link--about:focus-visible) .map-lines path:nth-of-type(3) {
  opacity: 1;
}

.site-header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: clamp(1.5rem, 4vw, 4rem);
  border-top: 1px solid currentColor;
  padding-top: 0.75rem;
}

.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);
}

.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;
}

.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) {
  .map-lines path {
    stroke-dasharray: 1;
    animation: trace-map 900ms cubic-bezier(0.22, 1, 0.36, 1) both;
  }

  .map-lines path:nth-of-type(2) {
    animation-delay: 120ms;
  }

  .map-lines path:nth-of-type(3) {
    animation-delay: 240ms;
  }

  .map-core span {
    animation: core-breathe 4s ease-in-out infinite;
  }
}

@keyframes trace-map {
  from {
    stroke-dashoffset: 1;
  }

  to {
    stroke-dashoffset: 0;
  }
}

@keyframes core-breathe {
  0%,
  100% {
    transform: scale(0.92);
  }

  50% {
    transform: scale(1.08);
  }
}

@media (max-width: 58rem) {
  .home-main {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

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

  .work-map {
    min-height: 32rem;
  }

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

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

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

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

  .home-introduction h1,
  .content-main h1 {
    font-size: clamp(3.5rem, 20vw, 5rem);
  }

  .work-map {
    min-height: 0;
    display: grid;
    grid-template-columns: 2.25rem minmax(0, 1fr);
    padding-block: 0.5rem;
  }

  .work-map::before {
    position: absolute;
    inset-block: 1.9rem;
    inset-inline-start: 0.3rem;
    width: 1px;
    background: var(--accent-text);
    content: "";
  }

  .map-lines,
  .map-core {
    display: none;
  }

  .map-link {
    position: relative;
    inset: auto;
    grid-column: 2;
    width: auto;
    padding-block: 1.25rem;
    text-align: left;
  }

  .map-link::before {
    position: absolute;
    top: 1.7rem;
    left: -2.25rem;
    width: 0.625rem;
    height: 0.625rem;
    border: 1px solid var(--accent-text);
    border-radius: 50%;
    background: var(--page-background);
    content: "";
  }

  .map-link-title {
    font-size: clamp(2rem, 11vw, 2.75rem);
  }

  .map-link-detail {
    max-width: 30ch;
    font-size: 0.8rem;
  }

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

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