*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --page: #f5f1e8;
  --surface: #fffdf8;
  --ink: #1b1a18;
  --muted: #706b63;
  --line: #d9d1c4;
  --accent: #c87524;
  --selection: #f1c98f;
  --shadow: 0 24px 70px rgb(72 54 32 / 10%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--page);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

:root[data-theme="dark"] {
  --page: #12110f;
  --surface: #1b1916;
  --ink: #f5f1e8;
  --muted: #aaa39a;
  --line: #37322c;
  --accent: #f4b942;
  --selection: #8d611f;
  --shadow: 0 24px 80px rgb(0 0 0 / 26%);
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --page: #12110f;
    --surface: #1b1916;
    --ink: #f5f1e8;
    --muted: #aaa39a;
    --line: #37322c;
    --accent: #f4b942;
    --selection: #8d611f;
    --shadow: 0 24px 80px rgb(0 0 0 / 26%);
    color-scheme: dark;
  }
}

html {
  min-height: 100%;
  background: var(--page);
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 12% 10%, rgb(232 155 44 / 10%), transparent 24rem),
    var(--page);
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

::selection {
  color: #171717;
  background: var(--selection);
}

.skip-link {
  position: fixed;
  z-index: 10;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.7rem 1rem;
  border-radius: 999px;
  color: var(--surface);
  background: var(--ink);
  font-size: 0.875rem;
  font-weight: 700;
  transform: translateY(-180%);
  transition: transform 160ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: fixed;
  z-index: 5;
  top: 0;
  left: 0;
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  padding: max(1rem, env(safe-area-inset-top)) max(1.1rem, env(safe-area-inset-right)) 0 max(1.1rem, env(safe-area-inset-left));
}

.brand {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}

.brand-mark {
  width: 2.25rem;
  height: 2.25rem;
}

.brand-mountain {
  fill: none;
  stroke: var(--accent);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 4;
}

.brand-boulder,
.brand-person {
  fill: currentColor;
}

.brand-figure {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 4;
}

.brand span {
  font-size: 0.96rem;
  font-weight: 750;
  letter-spacing: -0.025em;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.text-link {
  display: inline-grid;
  min-height: 2.75rem;
  padding-inline: 0.55rem;
  place-items: center;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
}

.text-link:hover {
  color: var(--ink);
}

.text-link:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 65%, transparent);
  outline-offset: 2px;
}

.icon-button {
  display: grid;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink);
  background: color-mix(in srgb, var(--surface) 78%, transparent);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: border-color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.icon-button:hover {
  border-color: var(--muted);
  background: var(--surface);
}

.icon-button:active {
  transform: scale(0.94);
}

.icon-button:focus-visible,
.brand:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 65%, transparent);
  outline-offset: 3px;
}

.icon-button svg {
  width: 1.15rem;
  height: 1.15rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.icon-button .filled-icon {
  fill: currentColor;
  stroke: none;
}

.moon-icon {
  display: none;
}

:root[data-theme="dark"] .sun-icon {
  display: none;
}

:root[data-theme="dark"] .moon-icon {
  display: block;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .sun-icon {
    display: none;
  }

  :root:not([data-theme="light"]) .moon-icon {
    display: block;
  }
}

.quote-page {
  display: grid;
  min-height: 100svh;
  place-items: center;
  padding: 6.5rem max(1.25rem, env(safe-area-inset-right)) 3rem max(1.25rem, env(safe-area-inset-left));
}

.quote-card {
  position: relative;
  width: min(100%, 48rem);
  margin: 0;
  padding: clamp(2rem, 8vw, 5rem) clamp(1.35rem, 7vw, 4.5rem);
  border: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
  border-radius: 1.5rem;
  background: color-mix(in srgb, var(--surface) 90%, transparent);
  box-shadow: var(--shadow);
}

.quote-card::before {
  position: absolute;
  top: -1.6rem;
  left: clamp(1.35rem, 7vw, 4.5rem);
  color: var(--accent);
  content: "“";
  font-family: Georgia, "Times New Roman", serif;
  font-size: 5.4rem;
  line-height: 1;
}

.quote-kicker {
  margin: 0 0 1.8rem;
  color: var(--accent);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}

blockquote {
  margin: 0;
}

blockquote p {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.75rem, 7vw, 3.75rem);
  line-height: 1.16;
  letter-spacing: -0.035em;
  text-wrap: balance;
  white-space: pre-line;
}

figcaption {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.75rem 1rem;
  margin-top: 2rem;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

figcaption::before {
  flex: 0 0 auto;
  width: 1.5rem;
  height: 1px;
  margin-top: 0.5rem;
  background: var(--accent);
  content: "";
}

.quote-credit {
  display: grid;
  flex: 1 1 10rem;
  gap: 0.25rem;
}

.quote-credit strong {
  color: var(--ink);
  font-weight: 750;
}

.quote-credit span {
  font-size: 0.72rem;
  font-weight: 500;
  line-height: 1.4;
}

.source-link {
  min-height: 2.25rem;
  padding: 0.48rem 0;
  color: var(--muted);
  font-size: 0.72rem;
  text-underline-offset: 0.2rem;
}

.source-link:hover {
  color: var(--ink);
}

.source-link:focus-visible {
  border-radius: 0.2rem;
  outline: 3px solid color-mix(in srgb, var(--accent) 65%, transparent);
  outline-offset: 3px;
}

.shuffle-button {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  gap: 0.55rem;
  margin-top: 1.65rem;
  padding: 0.68rem 1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  background: transparent;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 750;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: border-color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.shuffle-button:hover:not(:disabled) {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 8%, transparent);
}

.shuffle-button:active:not(:disabled) {
  transform: scale(0.97);
}

.shuffle-button:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 65%, transparent);
  outline-offset: 3px;
}

.shuffle-button:disabled {
  cursor: wait;
  opacity: 0.45;
}

.shuffle-button svg {
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: var(--accent);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.content-page {
  min-height: 100svh;
  padding: 7rem max(1.25rem, env(safe-area-inset-right)) 3rem max(1.25rem, env(safe-area-inset-left));
}

.about-card {
  width: min(100%, 44rem);
  margin-inline: auto;
  padding: clamp(2rem, 7vw, 4.5rem) clamp(1.35rem, 7vw, 4.5rem);
  border: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
  border-radius: 1.5rem;
  background: color-mix(in srgb, var(--surface) 90%, transparent);
  box-shadow: var(--shadow);
}

.about-card h1 {
  max-width: 12ch;
  margin: 0 0 2rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.25rem, 9vw, 4rem);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.045em;
}

.about-card > p:not(.quote-kicker, .signature) {
  margin: 0 0 1.25rem;
  color: var(--muted);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.05rem, 4vw, 1.22rem);
  line-height: 1.72;
}

.about-card a {
  color: var(--ink);
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.2em;
}

.about-card a:focus-visible {
  border-radius: 0.2rem;
  outline: 3px solid color-mix(in srgb, var(--accent) 65%, transparent);
  outline-offset: 3px;
}

.signature {
  margin: 2.25rem 0 0;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

@media (min-width: 48rem) {
  .site-header {
    padding: 1.5rem 2rem 0;
  }

  .brand span {
    font-size: 1.05rem;
  }

  .quote-page {
    padding-inline: 3rem;
  }

  .quote-card {
    border-radius: 2rem;
  }

  .content-page {
    padding: 8.5rem 3rem 4rem;
  }

  .about-card {
    border-radius: 2rem;
  }
}

@media (max-width: 24rem) {
  .brand span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
