:root {
  color-scheme: dark;
  --black: #080705;
  --ink: #f4efe5;
  --muted: #a79f91;
  --amber: #c99b58;
  --line: rgba(244, 239, 229, 0.2);
  font-family: Arial, Helvetica, sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 20rem;
  background: var(--black);
}

body {
  min-width: 20rem;
  min-height: 100svh;
  margin: 0;
  background: var(--black);
  color: var(--ink);
}

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

a {
  color: inherit;
}

.page-shell {
  position: relative;
  display: grid;
  min-height: 100svh;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto 1fr auto;
  isolation: isolate;
  overflow: hidden;
  background: var(--black);
}

.portrait,
.atmosphere {
  position: absolute;
  z-index: -2;
  inset: 0;
  margin: 0;
}

.portrait-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  object-fit: cover;
  object-position: var(--portrait-position, 48% 35%);
  filter: saturate(0.78) contrast(1.06);
  transform: scale(1.015);
  transition: opacity 700ms ease, transform 1.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.portrait-image--active {
  opacity: 1;
  transform: scale(1);
}

.atmosphere {
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(8, 7, 5, 0.98) 0%, rgba(8, 7, 5, 0.92) 31%, rgba(8, 7, 5, 0.46) 60%, rgba(8, 7, 5, 0.14) 100%),
    linear-gradient(0deg, rgba(8, 7, 5, 0.88) 0%, transparent 42%),
    radial-gradient(circle at 73% 40%, transparent 0 18%, rgba(8, 7, 5, 0.28) 72%);
}

.site-header,
.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: clamp(1.25rem, 2.8vw, 2.75rem) clamp(1.25rem, 4vw, 4.5rem);
}

.site-header {
  border-bottom: 1px solid var(--line);
}

.monogram {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-decoration: none;
}

.file-mark {
  display: flex;
  gap: 0.7rem;
  color: var(--muted);
  font-size: 0.62rem;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}

.quote-stage {
  display: flex;
  align-items: center;
  padding: clamp(3rem, 7vh, 7rem) clamp(1.25rem, 4vw, 4.5rem);
}

.quote-card {
  display: grid;
  width: min(57rem, 65vw);
  height: clamp(27rem, 58vh, 36rem);
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin: 0 0 clamp(1.5rem, 3vw, 3rem);
  color: var(--amber);
  font-size: 0.63rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.eyebrow::before {
  width: 2.5rem;
  height: 1px;
  background: currentColor;
  content: "";
}

blockquote {
  display: flex;
  min-height: 0;
  margin: 0;
  align-items: center;
  overflow: hidden;
}

#quote-text {
  max-width: 15ch;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.8rem, 6vw, 7.4rem);
  font-weight: 400;
  letter-spacing: -0.06em;
  line-height: 0.92;
  text-wrap: balance;
  text-shadow: 0 0.12em 0.8em rgba(0, 0, 0, 0.28);
}

#quote-text[data-quote-size="medium"] {
  font-size: clamp(2.6rem, 5.2vw, 6.1rem);
}

#quote-text[data-quote-size="long"] {
  font-size: clamp(2.25rem, 4.4vw, 5.2rem);
  line-height: 0.96;
}

#quote-text::before {
  color: var(--amber);
  content: "“";
}

#quote-text::after {
  color: var(--amber);
  content: "”";
}

.quote-meta {
  display: grid;
  align-items: end;
  grid-template-columns: 1fr auto;
  gap: 2rem;
  width: min(42rem, 100%);
  height: 3.5rem;
  margin-top: 0;
  padding-top: 1.15rem;
  overflow: hidden;
  border-top: 1px solid var(--line);
}

.quote-meta > div {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.6rem 1.4rem;
}

.speaker {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

#quote-source {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  color: var(--muted);
  font-size: 0.65rem;
  line-height: 1.4;
  text-decoration-color: transparent;
  text-underline-offset: 0.3rem;
  transition: color 160ms ease, text-decoration-color 160ms ease;
}

#quote-source:hover {
  color: var(--ink);
  text-decoration-color: currentColor;
}

.source-label {
  color: var(--amber);
}

.quote-count {
  color: var(--muted);
  font-size: 0.65rem;
  letter-spacing: 0.13em;
}

.site-footer {
  align-items: end;
  border-top: 1px solid var(--line);
}

.footer-notes {
  display: grid;
  width: min(28rem, 48vw);
  height: 2.35rem;
  align-content: end;
  justify-items: end;
  gap: 0.15rem;
  overflow: hidden;
  text-align: right;
}

.footer-notes p {
  margin: 0;
  color: var(--muted);
  font-size: 0.58rem;
  line-height: 1.5;
}

#image-credit {
  color: var(--muted);
  font-size: 0.56rem;
  line-height: 1.35;
  text-decoration-color: transparent;
  text-underline-offset: 0.2rem;
  transition: color 160ms ease, text-decoration-color 160ms ease;
  white-space: nowrap;
}

#image-credit:hover {
  color: var(--amber);
  text-decoration-color: currentColor;
}

.another-quote {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.button-mark {
  display: grid;
  width: 2.3rem;
  height: 2.3rem;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--amber);
  font-size: 0.9rem;
  transition: border-color 180ms ease, transform 180ms ease;
  place-items: center;
}

.another-quote:hover .button-mark {
  border-color: var(--amber);
  transform: rotate(45deg);
}

.another-quote:disabled {
  color: var(--muted);
  cursor: not-allowed;
}

.another-quote:focus-visible,
.monogram:focus-visible,
#quote-source:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 0.45rem;
}

#image-credit:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 0.3rem;
}

.quote-card--entering #quote-text,
.quote-card--entering .quote-meta {
  animation: quote-enter 520ms cubic-bezier(0.22, 1, 0.36, 1);
}

.noscript-message {
  position: fixed;
  z-index: 5;
  right: 1rem;
  bottom: 1rem;
  max-width: 22rem;
  margin: 0;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  background: rgba(8, 7, 5, 0.94);
  color: var(--muted);
  font-size: 0.7rem;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.not-found {
  display: grid;
  min-height: 100svh;
  padding: 2rem;
  background:
    linear-gradient(rgba(8, 7, 5, 0.74), rgba(8, 7, 5, 0.96)),
    url("/assets/harvey-suits-s09e04.webp") 48% 35% / cover;
  text-align: center;
  place-items: center;
}

.not-found p {
  margin: 0;
  color: var(--amber);
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.not-found h1 {
  margin: 1rem 0 2rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3.5rem, 15vw, 9rem);
  font-weight: 400;
  letter-spacing: -0.07em;
  line-height: 0.9;
}

.not-found a {
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-underline-offset: 0.35rem;
  text-transform: uppercase;
}

@keyframes quote-enter {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@media (max-width: 760px) {
  .page-shell {
    min-height: 100dvh;
  }

  .portrait-image {
    object-position: var(--portrait-mobile-position, 47% 21%);
  }

  .atmosphere {
    background:
      linear-gradient(0deg, rgba(8, 7, 5, 0.98) 0%, rgba(8, 7, 5, 0.9) 49%, rgba(8, 7, 5, 0.26) 100%),
      linear-gradient(90deg, rgba(8, 7, 5, 0.75), transparent 80%);
  }

  .site-header,
  .site-footer {
    padding: 1.15rem 1.25rem;
  }

  .site-footer {
    gap: 0.75rem;
  }

  .quote-stage {
    align-items: end;
    padding: 12rem 1.25rem 2.5rem;
  }

  .quote-card {
    width: 100%;
    height: 26rem;
  }

  #quote-text {
    max-width: 17ch;
    font-size: clamp(2.45rem, 11.5vw, 4.5rem);
    line-height: 0.95;
  }

  #quote-text[data-quote-size="medium"] {
    font-size: clamp(2.15rem, 9.8vw, 3.8rem);
  }

  #quote-text[data-quote-size="long"] {
    font-size: clamp(1.9rem, 8.4vw, 3.25rem);
  }

  .site-footer {
    align-items: center;
  }

  .footer-notes {
    width: 11rem;
    height: 2.35rem;
  }

  .file-mark span:first-child,
  .file-mark span:nth-child(2),
  .source-label {
    display: none;
  }
}

@media (max-height: 690px) and (min-width: 761px) {
  .quote-stage {
    padding-block: 2rem;
  }

  #quote-text {
    font-size: clamp(2.75rem, 5.5vw, 5rem);
  }

  .quote-card {
    height: 24rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .quote-card--entering #quote-text,
  .quote-card--entering .quote-meta {
    animation: none;
  }

  #quote-source,
  .button-mark,
  .portrait-image {
    transition: none;
  }
}
