:root {
  color-scheme: dark;
  --bg: #060605;
  --ink: #f8f6ee;
  --muted: rgba(248, 246, 238, 0.7);
  --quiet: rgba(248, 246, 238, 0.48);
  --ease: cubic-bezier(0.19, 1, 0.22, 1);
}

* {
  box-sizing: border-box;
  font-kerning: normal;
  font-feature-settings: "kern" 1, "liga" 1;
  text-rendering: optimizeLegibility;
}

html {
  min-width: 320px;
  scroll-behavior: auto;
}

body {
  min-width: 320px;
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: "New York", "Iowan Old Style", "Apple Garamond", Georgia, "Times New Roman", serif;
  font-stretch: normal;
  font-weight: 400;
  letter-spacing: 0;
  word-spacing: 0;
  text-transform: lowercase;
}

a,
button {
  color: inherit;
  font: inherit;
}

a {
  text-decoration: none;
}

.world,
.stage,
.header,
.footer {
  position: fixed;
}

.world {
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: #171a15;
  transition: opacity 520ms var(--ease);
}

.landscape {
  position: absolute;
  inset: -7vh -7vw;
  margin: 0;
  opacity: 0;
  transform: scale(1.16);
  filter: blur(18px) saturate(0.98) brightness(0.96);
  transition: opacity 360ms var(--ease), filter 360ms var(--ease);
  will-change: opacity, transform, filter;
}

.landscape::before,
.landscape::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.landscape::before {
  opacity: 0.5;
  background:
    radial-gradient(circle at 21% 24%, rgba(255, 255, 255, 0.035), transparent 18%),
    radial-gradient(circle at 76% 70%, rgba(0, 0, 0, 0.12), transparent 26%),
    repeating-linear-gradient(98deg, rgba(255, 255, 255, 0.018) 0 1px, transparent 1px 5px),
    repeating-linear-gradient(3deg, rgba(0, 0, 0, 0.018) 0 1px, transparent 1px 6px);
}

.landscape::after {
  opacity: 0.28;
  mix-blend-mode: overlay;
  background:
    radial-gradient(circle at 48% 42%, rgba(255, 255, 255, 0.1), transparent 36%),
    linear-gradient(120deg, rgba(255, 255, 255, 0.04), transparent 42%),
    linear-gradient(240deg, rgba(0, 0, 0, 0.18), transparent 52%);
}

.landscape[data-landscape="0"] {
  background:
    radial-gradient(circle at 22% 28%, rgba(93, 104, 69, 0.8), transparent 34%),
    radial-gradient(circle at 80% 72%, rgba(91, 73, 49, 0.72), transparent 38%),
    linear-gradient(155deg, #2d3428 0%, #1b211a 45%, #403727 100%);
}

.landscape[data-landscape="1"] {
  background:
    radial-gradient(circle at 28% 68%, rgba(81, 68, 45, 0.84), transparent 34%),
    radial-gradient(circle at 72% 30%, rgba(72, 89, 61, 0.7), transparent 40%),
    linear-gradient(150deg, #3b3325 0%, #1d2219 48%, #11130f 100%);
}

.landscape[data-landscape="2"] {
  background:
    radial-gradient(circle at 18% 20%, rgba(96, 95, 76, 0.7), transparent 35%),
    radial-gradient(circle at 76% 68%, rgba(94, 77, 57, 0.62), transparent 40%),
    linear-gradient(145deg, #34362f 0%, #20231f 45%, #151410 100%);
}

.landscape[data-landscape="3"] {
  background:
    radial-gradient(circle at 26% 28%, rgba(56, 79, 59, 0.74), transparent 36%),
    radial-gradient(circle at 78% 72%, rgba(85, 65, 45, 0.66), transparent 42%),
    linear-gradient(150deg, #1d2b22 0%, #151915 48%, #382f23 100%);
}

.landscape[data-landscape="4"] {
  background:
    radial-gradient(circle at 24% 72%, rgba(92, 81, 57, 0.7), transparent 38%),
    radial-gradient(circle at 74% 28%, rgba(61, 81, 67, 0.66), transparent 40%),
    linear-gradient(150deg, #272117 0%, #151713 48%, #263228 100%);
}

.landscape.is-active {
  opacity: 1;
  filter: blur(0) saturate(1.04) brightness(1.02);
}

.depth-wash {
  display: none;
}

.grain {
  display: none;
}

.header,
.footer {
  left: 0;
  right: 0;
  z-index: 15;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 22px;
  padding: 28px clamp(18px, 4vw, 54px);
}

.header {
  top: 0;
  transition: opacity 220ms var(--ease);
}

.footer {
  bottom: 0;
  grid-template-columns: 1fr;
  pointer-events: none;
  transition: opacity 220ms var(--ease);
}

.header nav {
  display: flex;
  gap: clamp(14px, 2.2vw, 30px);
  justify-content: center;
}

.header > a:last-child {
  justify-self: end;
}

.header a,
.footer a,
.actions a,
.stack-list a,
.project-grid a,
.thought-list p {
  color: var(--muted);
  transition: color 180ms var(--ease), opacity 180ms var(--ease), transform 180ms var(--ease);
  text-shadow: 0 1px 18px rgba(0, 0, 0, 0.34);
}

.header a,
.footer a {
  font-size: 0.95rem;
  font-weight: 400;
  display: inline-block;
  transform: none;
  transform-origin: center;
  word-spacing: 0;
}

.header a:hover,
.footer a:hover,
.actions a:hover,
.stack-list a:hover,
.project-grid a:hover,
.header a.is-active {
  color: var(--ink);
}

.footer ul {
  display: flex;
  gap: 18px;
  padding: 0;
  margin: 0;
  list-style: none;
  pointer-events: auto;
  justify-content: center;
}

.stage {
  inset: 0;
  z-index: 5;
  overflow: hidden;
  perspective: 1100px;
  transform-style: preserve-3d;
  pointer-events: none;
}

.scene {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: clamp(110px, 14vh, 160px) clamp(20px, 8vw, 120px);
  opacity: 0;
  pointer-events: none;
  filter: blur(14px);
  will-change: opacity, transform, filter;
}

body.is-direct-jump .scene {
  transition: opacity 260ms var(--ease), filter 260ms var(--ease), transform 260ms var(--ease);
}

body.is-direct-jump .landscape {
  transition: opacity 320ms var(--ease), filter 320ms var(--ease);
}

.scene.is-active {
  pointer-events: auto;
}

.scene-copy {
  max-width: 820px;
  width: min(100%, 820px);
  text-align: center;
}

h1,
h2 {
  max-width: 900px;
  margin: 0;
  color: var(--ink);
  font-size: 2rem;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0;
  transform: none;
  transform-origin: center;
  word-spacing: 0;
  text-shadow: 0 1px 24px rgba(0, 0, 0, 0.38);
}

h1 {
  max-width: none;
  font-size: 2.55rem;
  font-weight: 400;
  line-height: 1;
  text-transform: none;
  white-space: nowrap;
  transform: none;
  word-spacing: 0;
}

.home-logo {
  display: inline-block;
  color: #f8f6ee;
  font-size: 0;
  line-height: 0;
  text-transform: none;
  white-space: nowrap;
  text-shadow: none;
}

.home-logo-image {
  display: block;
  width: min(58vw, 245px);
  height: auto;
}

h2 {
  font-size: 1.95rem;
}

.section-heading {
  font-size: 0;
  line-height: 0;
  text-shadow: none;
}

.section-heading-image {
  display: block;
  width: auto;
  height: 1.95rem;
  max-width: min(86vw, 720px);
  margin: 0 auto;
}

.actions,
.stack-list,
.project-grid,
.music-lines,
.thought-list {
  margin-top: 32px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
}

.actions a::after,
.project-grid a::after {
  content: "";
}

.stack-list,
.project-grid,
.music-lines,
.thought-list {
  display: grid;
  gap: 8px;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

.stack-list a,
.project-grid a {
  display: grid;
  gap: 3px;
  justify-items: center;
  text-align: center;
}

.stack-list span,
.project-grid span,
.music-lines p,
.thought-list p,
.actions a {
  font-size: 0.95rem;
  font-weight: 400;
  display: inline-block;
  transform: none;
  transform-origin: center;
  word-spacing: 0;
  text-shadow: 0 1px 14px rgba(0, 0, 0, 0.3);
}

.stack-list small,
.project-grid small {
  color: var(--quiet);
  font-size: 0.76rem;
  font-weight: 400;
  display: inline-block;
  transform: none;
  transform-origin: center;
  word-spacing: 0;
  text-shadow: 0 1px 14px rgba(0, 0, 0, 0.3);
}

.project-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 28px;
  justify-items: center;
}

.music-lines p,
.thought-list p {
  margin: 0;
  color: var(--muted);
}

.scroll-track {
  position: relative;
  z-index: -1;
  height: 510svh;
  pointer-events: none;
}

.scroll-track span {
  position: absolute;
  top: calc(var(--scene) * 100svh);
  width: 1px;
  height: 1px;
}

@media (max-width: 860px) {
  .header,
  .footer {
    padding: 18px;
  }

  .header {
    grid-template-columns: 1fr auto;
  }

  .header nav {
    order: 3;
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .header > a:last-child {
    justify-self: end;
  }

  .footer {
    align-items: flex-end;
  }

  .footer ul {
    display: grid;
    gap: 8px;
  }

  .scene {
    padding: 128px 20px 116px;
  }

  h1 {
    font-size: 2.15rem;
  }

  .home-logo-image {
    width: min(64vw, 220px);
  }

  h2 {
    font-size: 1.8rem;
  }

  .section-heading-image {
    height: 1.8rem;
  }

  .stack-list a,
  .project-grid {
    grid-template-columns: 1fr;
  }

  .stack-list a {
    gap: 4px;
  }

}

@media (max-width: 520px) {
  .brand {
    max-width: 46vw;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .header nav {
    gap: 14px;
  }

  h1 {
    font-size: 1.72rem;
  }

  .home-logo-image {
    width: min(70vw, 190px);
  }

  .section-heading-image {
    height: 1.58rem;
  }

}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }
}
