:root {
  --paper: #f7f6f2;
  --ink: #171715;
  --muted: #777771;
  --line: #d9d7d0;
  --serif: "Instrument Serif", Georgia, serif;
  --sans: "Manrope", "Helvetica Neue", sans-serif;
  --ease: cubic-bezier(0.76, 0, 0.24, 1);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--paper);
  color: var(--ink);
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  background: var(--paper);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

button,
a,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 1px solid var(--ink);
  outline-offset: 5px;
}

.page {
  position: relative;
  display: grid;
  grid-template-rows: 104px minmax(0, 1fr) 76px;
  min-height: 100vh;
  min-height: 100svh;
  padding-inline: clamp(1.25rem, 4vw, 4.5rem);
  overflow: hidden;
  isolation: isolate;
}

.page::before {
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image:
    linear-gradient(rgba(23, 23, 21, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 23, 21, 0.055) 1px, transparent 1px);
  background-position: center center;
  background-size: clamp(42px, 4.2vw, 64px) clamp(42px, 4.2vw, 64px);
  content: "";
}

.page::after {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(247, 246, 242, 0.58);
  content: "";
  pointer-events: none;
}

.site-header {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  border-bottom: 1px solid var(--line);
  background: rgba(247, 246, 242, 0.76);
  backdrop-filter: blur(5px);
}

.header-note {
  display: flex;
  gap: 0.75rem;
  margin: 0;
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.header-note span {
  color: var(--ink);
}

.brand {
  display: block;
  width: 49px;
  height: 66px;
}

.brand img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.header-actions {
  display: flex;
  align-items: center;
  justify-self: end;
  gap: clamp(1rem, 2vw, 1.8rem);
}

.header-about {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0;
  border: 0;
  color: var(--ink);
  background: transparent;
  font-size: 0.59rem;
  font-weight: 500;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  cursor: pointer;
}

.header-about span {
  position: relative;
}

.header-about span::after {
  position: absolute;
  right: 0;
  bottom: -0.35rem;
  left: 0;
  height: 1px;
  background: var(--ink);
  content: "";
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 320ms var(--ease);
}

.header-about i {
  position: relative;
  display: block;
  width: 28px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 50%;
  transition: color 180ms ease, background 180ms ease, border-color 180ms ease, transform 400ms var(--ease);
}

.header-about i::before,
.header-about i::after {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 8px;
  height: 1px;
  background: currentColor;
  content: "";
  transform: translate(-50%, -50%);
}

.header-about i::after {
  transform: translate(-50%, -50%) rotate(90deg);
}

.header-about:hover span::after,
.header-about:focus-visible span::after {
  transform: scaleX(1);
  transform-origin: left;
}

.header-about:hover i,
.header-about:focus-visible i {
  border-color: var(--ink);
  color: var(--paper);
  background: var(--ink);
  transform: rotate(90deg);
}

.audio-control {
  display: grid;
  grid-template-columns: auto auto auto auto;
  align-items: center;
  justify-self: end;
  gap: 0.8rem;
}

.audio-control.needs-gesture .play-button {
  border-color: var(--ink);
  animation: sound-pulse 1.7s ease-out infinite;
}

.audio-control.needs-gesture .audio-label {
  color: var(--ink);
}

.play-button,
.arrow-button {
  display: grid;
  padding: 0;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
  transition: border-color 180ms ease, background 180ms ease;
}

.play-button {
  width: 34px;
  height: 34px;
}

.play-button:hover,
.arrow-button:hover {
  border-color: var(--ink);
}

.play-icon {
  width: 0;
  height: 0;
  margin-left: 2px;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  border-left: 6px solid currentColor;
}

.play-button.is-playing .play-icon {
  width: 7px;
  height: 9px;
  margin-left: 0;
  border: 0;
  border-right: 2px solid currentColor;
  border-left: 2px solid currentColor;
}

.audio-info {
  display: grid;
  gap: 0.35rem;
  width: 102px;
}

.audio-label,
.audio-time {
  color: var(--muted);
  font-size: 0.56rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.audio-timeline {
  position: relative;
  height: 10px;
}

.waveform {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  gap: 2px;
}

.waveform i {
  flex: 1;
  height: calc(var(--bar-height) * 0.08px);
  min-height: 1px;
  background: var(--line);
  transition: background 150ms ease;
}

.waveform i.is-played {
  background: var(--ink);
}

.seek {
  position: absolute;
  inset: -6px 0;
  width: 100%;
  height: 22px;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
}

.audio-time {
  min-width: 2.7rem;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.volume-control {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding-left: 0.2rem;
}

.volume-control svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: var(--muted);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.2;
}

.volume-control svg path:first-child {
  fill: var(--muted);
  stroke: none;
}

.volume-control input {
  width: 64px;
  height: 1px;
  margin: 0;
  border-radius: 0;
  appearance: none;
  background: var(--line);
  cursor: pointer;
}

.volume-control input::-webkit-slider-thumb {
  width: 7px;
  height: 7px;
  border: 0;
  border-radius: 50%;
  appearance: none;
  background: var(--ink);
}

.volume-control input::-moz-range-thumb {
  width: 7px;
  height: 7px;
  border: 0;
  border-radius: 50%;
  background: var(--ink);
}

.principles {
  position: relative;
  z-index: 1;
  display: grid;
  min-height: 0;
  place-items: center;
}

.principle-stage {
  position: relative;
  width: min(100%, 1240px);
  padding-block: clamp(2.5rem, 7vh, 6rem);
  text-align: center;
}

.principle-stage::before,
.principle-stage::after {
  position: absolute;
  top: 50%;
  width: clamp(1.8rem, 5vw, 5rem);
  height: 1px;
  background: var(--ink);
  content: "";
  opacity: 0.36;
}

.principle-stage::before {
  left: 0;
}

.principle-stage::after {
  right: 0;
}

.eyebrow {
  margin: 0 0 clamp(2rem, 5vh, 4rem);
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}

.principle-count {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 1.4rem;
  color: var(--muted);
  font-size: 0.58rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.08em;
}

.principle-count strong {
  color: var(--ink);
  font-weight: 500;
}

.principle-count i {
  width: 2.25rem;
  height: 1px;
  background: var(--line);
}

.principle h1 {
  max-width: 1160px;
  margin: 0 auto;
  padding-inline: 1rem;
  font-family: var(--serif);
  font-size: clamp(4.3rem, 7.25vw, 8rem);
  font-weight: 400;
  letter-spacing: -0.045em;
  line-height: 0.9;
  text-wrap: balance;
}

.principle p {
  max-width: 660px;
  margin: clamp(1.5rem, 3vh, 2.35rem) auto 0;
  color: #4f4f4a;
  font-size: clamp(0.95rem, 1.2vw, 1.1rem);
  line-height: 1.75;
  text-wrap: balance;
}

.principle.is-leaving h1,
.principle.is-leaving p,
.principle.is-leaving .principle-count {
  opacity: 0;
  transform: translateY(8px);
}

.principle.is-entering h1,
.principle.is-entering p,
.principle.is-entering .principle-count {
  animation: principle-enter 480ms var(--ease) both;
}

.principle.is-entering p {
  animation-delay: 55ms;
}

.principle h1,
.principle p,
.principle-count {
  transition: opacity 160ms ease, transform 220ms var(--ease);
}

.principle-navigation {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.7rem;
  margin-top: clamp(2.5rem, 6vh, 4.5rem);
}

.principle-navigation::before,
.principle-navigation::after {
  width: clamp(2rem, 8vw, 8rem);
  height: 1px;
  background: var(--line);
  content: "";
}

.arrow-button {
  width: 36px;
  height: 36px;
}

.arrow-button svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.4;
}

.principle-dots {
  display: flex;
  align-items: center;
  gap: 0.95rem;
}

.dot {
  position: relative;
  width: 7px;
  height: 7px;
  padding: 0;
  border: 1px solid #a8a7a1;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.dot::after {
  position: absolute;
  inset: -8px;
  content: "";
}

.dot:hover {
  border-color: var(--ink);
  transform: scale(1.2);
}

.dot.is-active {
  border-color: var(--ink);
  background: var(--ink);
}

.site-footer {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.58rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: rgba(247, 246, 242, 0.76);
  backdrop-filter: blur(5px);
}

.site-footer p {
  margin: 0;
}

.about-trigger {
  justify-self: start;
  padding: 0;
  border: 0;
  color: var(--ink);
  background: transparent;
  font-size: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
  text-transform: uppercase;
  cursor: pointer;
}

.about-trigger span {
  margin-left: 0.55rem;
  color: var(--muted);
}

.about-trigger::after {
  display: inline-block;
  width: 1.25rem;
  height: 1px;
  margin: 0 0 0.18rem 0.65rem;
  background: var(--line);
  content: "";
  transition: width 300ms var(--ease), background 180ms ease;
}

.about-trigger:hover::after {
  width: 2.25rem;
  background: var(--ink);
}

.site-footer a {
  color: var(--ink);
  text-decoration-color: var(--line);
  text-underline-offset: 4px;
  transition: text-decoration-color 180ms ease;
}

.site-footer a:hover {
  text-decoration-color: var(--ink);
}

.building {
  justify-self: center;
}

.email {
  justify-self: end;
  text-transform: lowercase;
}

.about-panel {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  grid-template-rows: 104px minmax(0, 1fr);
  padding-inline: clamp(1.25rem, 4vw, 4.5rem);
  overflow: auto;
  visibility: hidden;
  color: var(--paper);
  background: var(--ink);
  opacity: 0;
  transform: translateY(100%);
  transition: transform 720ms var(--ease), opacity 300ms ease, visibility 0s linear 720ms;
  isolation: isolate;
}

.about-panel::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(247, 246, 242, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(247, 246, 242, 0.055) 1px, transparent 1px);
  background-position: center center;
  background-size: clamp(42px, 4.2vw, 64px) clamp(42px, 4.2vw, 64px);
  content: "";
}

.about-panel.is-open {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
  transition: transform 720ms var(--ease), opacity 300ms ease, visibility 0s;
}

.about-header {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(247, 246, 242, 0.18);
  background: rgba(23, 23, 21, 0.88);
  backdrop-filter: blur(8px);
}

.about-header p,
.about-kicker {
  margin: 0;
  color: rgba(247, 246, 242, 0.54);
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.about-header p span {
  margin-left: 0.7rem;
  color: var(--paper);
}

.about-close {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0;
  border: 0;
  color: var(--paper);
  background: transparent;
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  cursor: pointer;
}

.about-close svg {
  width: 28px;
  height: 28px;
  padding: 6px;
  border: 1px solid rgba(247, 246, 242, 0.3);
  border-radius: 50%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.2;
  transition: color 180ms ease, background 180ms ease, transform 400ms var(--ease);
}

.about-close:hover svg {
  color: var(--ink);
  background: var(--paper);
  transform: rotate(90deg);
}

.about-layout {
  display: grid;
  grid-template-columns: minmax(230px, 0.78fr) minmax(0, 1.22fr);
  gap: clamp(4rem, 10vw, 11rem);
  width: min(100%, 1360px);
  margin: 0 auto;
  padding-block: clamp(4rem, 9vh, 8rem);
}

.about-intro {
  align-self: start;
  position: sticky;
  top: calc(104px + clamp(4rem, 9vh, 8rem));
}

.about-intro h2 {
  margin: 1.1rem 0 1.8rem;
  font-family: var(--serif);
  font-size: clamp(5.5rem, 9vw, 9.5rem);
  font-weight: 400;
  letter-spacing: -0.055em;
  line-height: 0.82;
}

.about-intro h2 em {
  display: block;
  color: rgba(247, 246, 242, 0.46);
  font-weight: inherit;
}

.about-thesis {
  max-width: 20rem;
  margin: 0;
  color: rgba(247, 246, 242, 0.58);
  font-family: var(--serif);
  font-size: clamp(1.25rem, 1.8vw, 1.65rem);
  line-height: 1.25;
}

.about-copy {
  max-width: 720px;
  padding-top: 0.25rem;
}

.about-copy p {
  margin: 0;
  color: rgba(247, 246, 242, 0.82);
  font-family: var(--serif);
  font-size: clamp(1.55rem, 2.15vw, 2.2rem);
  letter-spacing: -0.018em;
  line-height: 1.34;
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 560ms ease, transform 680ms var(--ease);
}

.about-copy p + p {
  margin-top: 1.6em;
}

.about-copy p:last-child {
  color: var(--paper);
  font-size: clamp(2.25rem, 3.4vw, 3.8rem);
  line-height: 1.08;
}

.about-panel.is-open .about-copy p {
  opacity: 1;
  transform: translateY(0);
}

.about-panel.is-open .about-copy p:nth-child(1) { transition-delay: 260ms; }
.about-panel.is-open .about-copy p:nth-child(2) { transition-delay: 330ms; }
.about-panel.is-open .about-copy p:nth-child(3) { transition-delay: 400ms; }
.about-panel.is-open .about-copy p:nth-child(4) { transition-delay: 470ms; }
.about-panel.is-open .about-copy p:nth-child(5) { transition-delay: 540ms; }

html.about-is-open {
  overflow: hidden;
}

.noscript {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  left: 1rem;
  margin: 0;
  padding: 1rem;
  color: var(--paper);
  background: var(--ink);
  font-size: 0.75rem;
  text-align: center;
}

@keyframes principle-enter {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes sound-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(23, 23, 21, 0.18);
  }
  75%,
  100% {
    box-shadow: 0 0 0 9px rgba(23, 23, 21, 0);
  }
}

@media (max-width: 720px) {
  .page {
    grid-template-rows: 82px minmax(0, 1fr) 66px;
  }

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

  .header-note {
    display: none;
  }

  .brand {
    width: 42px;
    height: 56px;
  }

  .audio-info {
    display: none;
  }

  .audio-control {
    grid-template-columns: auto auto;
    gap: 0.65rem;
  }

  .header-actions {
    gap: 0.9rem;
  }

  .header-about {
    gap: 0.5rem;
  }

  .header-about i {
    width: 26px;
    height: 26px;
  }

  .audio-time {
    display: none;
  }

  .volume-control input {
    width: 46px;
  }

  .principle-stage {
    padding-block: 2.5rem;
  }

  .eyebrow {
    margin-bottom: 2.4rem;
  }

  .principle h1 {
    font-size: clamp(3.75rem, 15vw, 5.4rem);
    line-height: 0.91;
  }

  .principle p {
    max-width: 92%;
    margin-top: 1.5rem;
    font-size: 0.86rem;
    line-height: 1.65;
  }

  .principle-navigation {
    gap: 1.2rem;
    margin-top: 2.6rem;
  }

  .principle-navigation::before,
  .principle-navigation::after,
  .principle-stage::before,
  .principle-stage::after {
    display: none;
  }

  .principle-dots {
    gap: 0.75rem;
  }

  .site-footer {
    grid-template-columns: 1fr 1fr;
  }

  .building {
    display: none;
  }

  .about-trigger span,
  .about-trigger::after {
    display: none;
  }

  .about-panel {
    grid-template-rows: 82px minmax(0, 1fr);
  }

  .about-layout {
    grid-template-columns: 1fr;
    gap: 3.5rem;
    padding-block: 3.5rem 5rem;
  }

  .about-intro {
    position: static;
  }

  .about-intro h2 {
    font-size: clamp(4.6rem, 21vw, 7rem);
  }

  .about-thesis {
    max-width: 16rem;
  }

  .about-copy p {
    font-size: clamp(1.35rem, 6vw, 1.75rem);
    line-height: 1.38;
  }

  .about-copy p:last-child {
    font-size: clamp(2.2rem, 11vw, 3.4rem);
  }
}

@media (max-height: 700px) and (min-width: 721px) {
  .page {
    grid-template-rows: 84px minmax(0, 1fr) 66px;
  }

  .brand {
    width: 36px;
    height: 50px;
  }

  .principle-stage {
    padding-block: 1.8rem;
  }

  .eyebrow {
    margin-bottom: 1.8rem;
  }

  .principle h1 {
    font-size: clamp(3.5rem, 5.2vw, 5.5rem);
  }

  .principle-navigation {
    margin-top: 2.2rem;
  }
}

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