@font-face {
  font-family: "DM Sans";
  src: url("/assets/dm-sans-latin.woff2") format("woff2");
  font-weight: 400 600;
  font-display: swap;
}

:root {
  --canvas: #101710;
  --ink: #e7ebdd;
  --muted-ink: #afb8a7;
  color-scheme: dark;
  background: var(--canvas);
  color: var(--ink);
  font-family: "DM Sans", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  isolation: isolate;
  background: radial-gradient(ellipse at 14% 78%, #1c291f, var(--canvas) 72%);
}

body::before, body::after {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

body::before {
  content: "";
  z-index: -1;
  background: radial-gradient(ellipse at 83% 22%, #1e2c21, var(--canvas) 72%);
  opacity: .45;
}

@media (prefers-reduced-motion: no-preference) {
  body::before { animation: green-light 16s ease-in-out -7s infinite alternate; }
}

@keyframes green-light {
  from { opacity: .08; }
  to { opacity: .92; }
}

.page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  width: min(36rem, calc(100% - 3rem));
  margin-inline: auto;
  padding-block: clamp(3rem, 15svh, 8.5rem) max(1.75rem, env(safe-area-inset-bottom));
  font-size: 1.0625rem;
  line-height: 1.58;
  letter-spacing: -.009em;
}

.peace-hand {
  display: block;
  width: 2.125rem;
  height: auto;
  margin: 0 0 1.25rem -.16rem;
}

.wordmark {
  display: block;
  flex: none;
  width: 4.8rem;
  height: auto;
  filter: brightness(0) invert(94%);
}

h1, p { margin: 0; }

h1 {
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -.024em;
  text-wrap: balance;
}

.place, footer { color: var(--muted-ink); }
.place { margin-top: .2rem; font-size: 1rem; }

main { margin-top: 1.65rem; padding-bottom: clamp(3rem, 8vh, 5rem); }
main p { text-wrap: pretty; }
main p + p { margin-top: .95em; }

.project {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: .2rem .65rem;
  margin-top: 1.75rem;
}
.project h2 {
  flex-basis: 100%;
  margin: 0;
  color: var(--muted-ink);
  font-size: .9375rem;
  font-weight: 600;
  line-height: 1.35;
}
.project a {
  color: inherit;
  text-decoration: none;
  /* The gap between the two strokes travels across the word. */
  background-image: linear-gradient(90deg, currentColor 48%, transparent 48% 52%, #858b82 52%);
  background-repeat: no-repeat;
  background-size: 220% 1px;
  background-position: 100% calc(100% - .24em);
}
@media (prefers-reduced-motion: no-preference) {
  .project a { transition: background-position-x 400ms cubic-bezier(.3, 0, .2, 1); }
}
@media (hover: hover) {
  .project a:hover { background-position-x: 0%; }
}
.project a:focus-visible {
  background-position-x: 0%;
  outline: 2px solid currentColor;
  outline-offset: 4px;
}
.project span { color: var(--muted-ink); }

footer {
  display: flex;
  align-items: center;
  gap: .9rem;
  margin-top: auto;
  font-size: .875rem;
  line-height: 1.6;
  letter-spacing: 0;
}

footer span { text-wrap: balance; }

::selection { background: #d1d8c6; color: #21251f; }

@media (max-width: 35rem), (pointer: coarse) {
  /* Both lights fade to the browser theme color before the viewport edges. */
  body { background: var(--canvas); }
  body::before, body::after { height: 100dvh; }
  body::before {
    background: radial-gradient(ellipse 100% 34% at 83% 44%, #1e2c21, var(--canvas));
  }
  body::after {
    content: "";
    z-index: -2;
    background: radial-gradient(ellipse 108% 34% at 14% 55%, #1c291f, var(--canvas));
  }
}

@media (max-width: 35rem) {
  .page {
    width: calc(100% - clamp(2.5rem, 10.7vw, 3rem));
    padding-top: clamp(2.25rem, 7svh, 3.5rem);
    font-size: 1rem;
  }
  main { padding-bottom: clamp(2.5rem, 6svh, 3rem); }
  .project span { font-size: .9375rem; }
  .wordmark { width: 4.5rem; }
  footer { flex-wrap: wrap; gap: .375rem .625rem; }
}

@media (max-width: 35rem), (pointer: coarse) and (orientation: landscape) and (max-height: 30rem) {
  .page > header { margin-top: auto; }
  .page > footer { margin-top: 0; }
}

@media (max-width: 35rem), (max-height: 30rem) and (orientation: landscape), (pointer: coarse) {
  .project { row-gap: 0; }
  .project a {
    padding-block: max(.6rem, calc((44px - 1lh) / 2));
    background-origin: content-box;
  }
}

@media (forced-colors: active) {
  body { background: Canvas; }
  body::before, body::after { display: none; }
  .project a { background-image: none; text-decoration: underline; text-underline-offset: .2em; }
  .wordmark { background: #f4f5f0; filter: none; forced-color-adjust: none; }
}
