:root {
  --paper: #171512;
  --paper-line: rgba(255, 248, 233, 0.09);
  --ink: #fff8e9;
  --graphite: #d8cfbf;
  --teal: #5fd9dc;
  --red: #f0786d;
  --yellow: #f1cd65;
  --green: #a9cf73;
  --blue: #8fabf2;
  --shadow: rgba(0, 0, 0, 0.34);
  --card: #24201a;
  --surface: rgba(36, 32, 26, 0.9);
  --surface-strong: rgba(43, 38, 31, 0.94);
  --dot: rgba(255, 248, 233, 0.055);
  --grid-line: rgba(255, 248, 233, 0.04);
  --margin-line: rgba(240, 120, 109, 0.24);
  --highlight: rgba(241, 205, 101, 0.72);
  --teal-wash: rgba(95, 217, 220, 0.15);
  --border-soft: rgba(255, 248, 233, 0.55);
  --red-soft: rgba(240, 120, 109, 0.45);
  --text-halo: #171512;
  --on-accent: #191612;
  --max-width: 1160px;
  --nav-height: 68px;
  color-scheme: dark;
}

html[data-theme="light"] {
  --paper: #fcfbf6;
  --paper-line: rgba(29, 25, 19, 0.08);
  --ink: #191612;
  --graphite: #57524b;
  --teal: #147b82;
  --red: #c84032;
  --yellow: #f0c44d;
  --green: #668c39;
  --blue: #536f9e;
  --shadow: rgba(25, 22, 18, 0.16);
  --card: #fffdf7;
  --surface: rgba(252, 251, 246, 0.9);
  --surface-strong: rgba(252, 251, 246, 0.94);
  --dot: rgba(25, 22, 18, 0.05);
  --grid-line: rgba(25, 22, 18, 0.03);
  --margin-line: rgba(200, 64, 50, 0.16);
  --highlight: rgba(240, 196, 77, 0.62);
  --teal-wash: rgba(20, 123, 130, 0.13);
  --border-soft: rgba(25, 22, 18, 0.64);
  --red-soft: rgba(200, 64, 50, 0.5);
  --text-halo: #fcfbf6;
  --on-accent: #191612;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

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

body {
  min-height: 100%;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 12px 12px, var(--dot) 1px, transparent 1.5px) 0 0 / 28px 28px,
    linear-gradient(90deg, transparent 0, transparent 95%, var(--margin-line) 95%, var(--margin-line) 96%, transparent 96%),
    var(--paper);
  font-family: "Trebuchet MS", "Gill Sans", "Segoe UI", Arial, sans-serif;
  letter-spacing: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

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

.paper-texture {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.62;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 100% 32px, 32px 100%;
  mask-image: linear-gradient(to bottom, transparent 0, black 10%, black 92%, transparent 100%);
}

.home-page {
  min-height: 100svh;
  overflow-x: hidden;
  overflow-y: auto;
}

.hero-shell {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-rows: var(--nav-height) minmax(min-content, 1fr) auto;
  width: min(100%, var(--max-width));
  min-height: 100svh;
  margin: 0 auto;
  padding: 0 24px 18px;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: var(--nav-height);
}

.brand-lockup,
.nav-link,
.theme-toggle,
.ink-button,
.social-link,
.destination-link {
  outline: none;
}

.nav-actions {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  font-size: 1rem;
}

.brand-mark,
.button-mark,
.link-mark,
.destination-mark {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  border: 2px solid currentColor;
  color: var(--ink);
  background: var(--surface-strong);
  box-shadow: 3px 3px 0 var(--shadow);
  transform: rotate(-2deg);
}

.button-mark i,
.link-mark i,
.destination-mark i {
  display: block;
  font-size: 0.98rem;
  line-height: 1;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  font-size: 0.72rem;
}

.nav-link {
  position: relative;
  padding: 10px 2px;
  font-weight: 800;
}

.theme-toggle {
  display: inline-grid;
  place-items: center;
  width: 58px;
  height: 34px;
  padding: 0;
  border: 2px solid var(--ink);
  border-radius: 999px;
  color: var(--ink);
  background: var(--surface-strong);
  box-shadow: 3px 3px 0 var(--shadow);
  cursor: pointer;
  transition: transform 150ms ease;
}

.theme-toggle-track {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 100%;
  padding: 0 8px;
}

.theme-toggle-track i {
  position: relative;
  z-index: 1;
  font-size: 0.78rem;
}

.theme-toggle-thumb {
  position: absolute;
  left: 3px;
  top: 3px;
  width: 24px;
  height: 24px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--yellow);
  transition: transform 180ms ease;
}

html[data-theme="light"] .theme-toggle-thumb {
  transform: translateX(24px);
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
  transform: translate(-1px, -1px) rotate(-1deg);
}

.nav-link::after,
.brand-lockup::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 8px;
  height: 8px;
  z-index: -1;
  background: var(--highlight);
  transform: rotate(-1deg) scaleX(0);
  transform-origin: left;
  transition: transform 160ms ease;
}

.brand-lockup {
  position: relative;
}

.brand-lockup::after {
  bottom: 2px;
}

.nav-link:hover::after,
.brand-lockup:hover::after,
.nav-link:focus-visible::after,
.brand-lockup:focus-visible::after {
  transform: rotate(-1deg) scaleX(1);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.84fr) minmax(360px, 1fr);
  align-items: center;
  gap: 44px;
  min-height: 0;
}

.profile-stage {
  position: relative;
  display: grid;
  place-items: center;
  align-self: center;
}

.profile-stage::before,
.profile-stage::after {
  content: "";
  position: absolute;
  border: 2px solid var(--border-soft);
  pointer-events: none;
}

.profile-stage::before {
  width: min(80%, 430px);
  aspect-ratio: 1;
  border-radius: 53% 47% 50% 50%;
  transform: rotate(-8deg);
  border-color: color-mix(in srgb, var(--teal) 54%, transparent);
}

.profile-stage::after {
  width: min(66%, 340px);
  aspect-ratio: 1;
  border-radius: 50%;
  transform: rotate(12deg) translate(16px, -6px);
  border-color: var(--red-soft);
}

.profile-frame {
  position: relative;
  z-index: 2;
  width: min(82%, 390px);
  aspect-ratio: 3 / 4;
  margin: 0;
  overflow: hidden;
  border: 3px solid var(--ink);
  border-radius: 8px;
  background: var(--card);
  box-shadow: 12px 14px 0 var(--shadow);
  transform: rotate(-2deg);
}

.profile-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-copy {
  position: relative;
  z-index: 3;
  display: grid;
  align-content: center;
  gap: 18px;
  min-width: 0;
}

.eyebrow {
  width: max-content;
  max-width: 100%;
  margin: 0;
  padding: 7px 12px 6px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: color-mix(in srgb, var(--yellow) 15%, transparent);
  color: var(--yellow);
  font-size: 0.86rem;
  font-weight: 900;
  text-transform: uppercase;
  text-shadow: 1px 1px 0 var(--text-halo);
}

.brand-title {
  display: inline-block;
  justify-self: start;
  max-width: 100%;
  margin: 0;
  font-size: 3.35rem;
  line-height: 0.9;
  font-weight: 900;
  letter-spacing: 0;
  text-wrap: balance;
  cursor: pointer;
  transform-origin: center;
  transition: color 180ms ease, filter 180ms ease, text-shadow 180ms ease;
  text-shadow:
    2px 0 0 var(--text-halo),
    -2px 0 0 var(--text-halo),
    0 2px 0 var(--text-halo),
    0 -2px 0 var(--text-halo);
}

.brand-title:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 8px;
}

.brand-title.title-style-doodle {
  color: var(--yellow);
  font-family: "Comic Sans MS", "Chalkboard SE", "Bradley Hand", cursive;
  font-weight: 900;
  filter: saturate(1.2);
  text-shadow:
    2px 2px 0 var(--red),
    -2px -1px 0 var(--teal),
    0 3px 0 var(--text-halo);
}

.brand-title.title-style-type {
  color: var(--teal);
  font-family: "Courier New", Courier, monospace;
  font-weight: 900;
  text-shadow:
    2px 0 0 var(--text-halo),
    -2px 0 0 var(--text-halo),
    0 2px 0 var(--text-halo),
    0 -2px 0 var(--text-halo);
}

.brand-title.title-style-type::after {
  content: "";
  display: inline-block;
  width: 0.08em;
  height: 0.68em;
  margin-left: 0.08em;
  background: currentColor;
  animation: title-caret 750ms steps(1, end) infinite;
  transform: translateY(0.08em);
}

.brand-title.title-style-default {
  font-family: "Trebuchet MS", "Gill Sans", "Segoe UI", Arial, sans-serif;
}

.brand-title.is-warping {
  animation: title-warp 680ms cubic-bezier(0.22, 1, 0.36, 1);
}

.brand-title.is-alt-copy {
  font-size: 3.35rem;
}

@keyframes title-warp {
  0% {
    opacity: 0.86;
    transform: scaleX(1) skewX(0deg) rotate(0deg);
    filter: blur(0);
  }
  28% {
    opacity: 0.7;
    transform: scaleX(1.12) scaleY(0.86) skewX(-9deg) rotate(-1deg);
    filter: blur(1px);
  }
  58% {
    opacity: 0.95;
    transform: scaleX(0.92) scaleY(1.12) skewX(7deg) rotate(1deg);
    filter: blur(0.25px);
  }
  100% {
    opacity: 1;
    transform: scaleX(1) skewX(0deg) rotate(0deg);
    filter: blur(0);
  }
}

@keyframes title-caret {
  0%,
  52% {
    opacity: 1;
  }
  53%,
  100% {
    opacity: 0;
  }
}

.hero-kicker {
  max-width: 680px;
  margin: 0;
  color: var(--graphite);
  font-size: 1.12rem;
  line-height: 1.55;
  font-weight: 700;
  text-shadow:
    1px 0 0 var(--text-halo),
    -1px 0 0 var(--text-halo),
    0 1px 0 var(--text-halo),
    0 -1px 0 var(--text-halo);
}

.primary-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: center;
  justify-self: center;
  width: 100%;
}

.ink-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 9px 16px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: var(--surface-strong);
  box-shadow: 4px 5px 0 var(--shadow);
  font-weight: 900;
  transition: transform 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.ink-button-primary {
  background: var(--ink);
  color: var(--paper);
}

.ink-button-primary .button-mark {
  color: var(--on-accent);
  background: var(--yellow);
}

.button-mark {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-size: 0.78rem;
}

.ink-button:hover,
.social-link:hover,
.destination-link:hover,
.ink-button:focus-visible,
.social-link:focus-visible,
.destination-link:focus-visible {
  transform: translate(-2px, -2px) rotate(-0.4deg);
  box-shadow: 7px 8px 0 var(--shadow);
}

.social-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  max-width: 650px;
}

.social-link {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  min-height: 50px;
  padding: 8px 10px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 3px 4px 0 var(--shadow);
  font-size: 0.92rem;
  font-weight: 900;
  transition: transform 150ms ease, box-shadow 150ms ease;
}

.social-link:nth-last-child(2):nth-child(4n + 1) {
  grid-column: 2;
}

.link-mark {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 0.7rem;
}

.link-label-full,
.link-label-short {
  overflow: hidden;
  min-width: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.link-label-short {
  display: none;
}

.accent-red .link-mark { background: color-mix(in srgb, var(--red) 22%, transparent); color: var(--red); }
.accent-ink .link-mark { background: color-mix(in srgb, var(--ink) 14%, transparent); color: var(--ink); }
.accent-yellow .link-mark { background: color-mix(in srgb, var(--yellow) 42%, transparent); color: var(--on-accent); }
.accent-green .link-mark { background: color-mix(in srgb, var(--green) 24%, transparent); color: var(--green); }
.accent-blue .link-mark { background: color-mix(in srgb, var(--blue) 22%, transparent); color: var(--blue); }
.accent-graphite .link-mark { background: color-mix(in srgb, var(--graphite) 20%, transparent); color: var(--graphite); }
.accent-teal .link-mark { background: color-mix(in srgb, var(--teal) 22%, transparent); color: var(--teal); }

.hero-footer {
  position: relative;
  z-index: 3;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  color: var(--graphite);
  font-size: 0.9rem;
  font-weight: 800;
  text-shadow: 1px 1px 0 var(--text-halo);
}

.hero-footer a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-decoration-color: var(--yellow);
  text-underline-offset: 4px;
}

.doodle-field {
  position: fixed;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
}

.wander-doodle {
  position: absolute;
  left: 0;
  top: 0;
  display: grid;
  place-items: center;
  width: var(--doodle-size, 54px);
  height: var(--doodle-size, 54px);
  color: var(--doodle-color, var(--ink));
  opacity: 0.44;
  will-change: transform;
}

.wander-doodle svg {
  width: 100%;
  height: 100%;
  overflow: visible;
  filter: drop-shadow(2px 2px 0 var(--shadow));
}

.wander-doodle path,
.wander-doodle circle,
.wander-doodle line,
.wander-doodle polyline,
.wander-doodle ellipse {
  vector-effect: non-scaling-stroke;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.story-page {
  min-height: 100svh;
  overflow-x: hidden;
}

.story-nav,
.story-main {
  position: relative;
  z-index: 2;
  width: min(100% - 48px, var(--max-width));
  margin: 0 auto;
}

.story-main {
  padding: 28px 0 76px;
}

.parallel-lines {
  position: fixed;
  inset: -20% -10%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.42;
  transform: translate3d(0, var(--scroll-drift, 0), 0) rotate(-7deg);
  background:
    repeating-linear-gradient(90deg, transparent 0 42px, color-mix(in srgb, var(--teal) 14%, transparent) 42px 44px, transparent 44px 82px),
    repeating-linear-gradient(0deg, transparent 0 48px, color-mix(in srgb, var(--red) 12%, transparent) 48px 50px, transparent 50px 92px);
}

.story-hero {
  display: grid;
  gap: 18px;
  max-width: 880px;
  padding: 28px 0 32px;
}

.story-hero h1 {
  max-width: 900px;
  margin: 0;
  font-size: 4.1rem;
  line-height: 1;
  letter-spacing: 0;
}

.story-hero p:last-child {
  max-width: 720px;
  margin: 0;
  color: var(--graphite);
  font-size: 1.16rem;
  line-height: 1.6;
  font-weight: 800;
}

.story-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 390px);
  gap: 28px;
  align-items: start;
}

.story-panel,
.about-photo-card {
  position: relative;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 8px 10px 0 var(--shadow);
}

.story-panel {
  padding: 28px;
}

.story-panel::before {
  content: "";
  position: absolute;
  left: 26px;
  right: 34px;
  top: 19px;
  height: 8px;
  z-index: -1;
  background: var(--highlight);
  transform: rotate(-1deg);
}

.story-panel h2 {
  margin: 0 0 16px;
  font-size: 1.7rem;
}

.story-panel p {
  margin: 0;
  color: var(--graphite);
  font-size: 1.02rem;
  font-weight: 750;
  line-height: 1.72;
}

.story-panel p + p {
  margin-top: 16px;
}

.story-sidebar {
  display: grid;
  gap: 16px;
}

.about-photo-card {
  width: 200px;
  max-width: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--card);
  transform: rotate(1deg);
}

.about-photo-card img {
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
  object-position: center center;
}

.about-photo-card figcaption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 40px;
  padding: 7px 12px;
  color: var(--teal);
  font-weight: 900;
  text-transform: uppercase;
  font-size: 0.82rem;
}

.about-photo-card figcaption::after {
  content: "\f030";
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  color: var(--ink);
  background: var(--yellow);
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
}

.story-links {
  display: grid;
  gap: 12px;
}

.destination-link {
  display: flex;
  align-items: center;
  gap: 13px;
  min-height: 70px;
  padding: 10px;
  border: 2px solid color-mix(in srgb, var(--ink) 82%, transparent);
  border-radius: 8px;
  background: var(--card);
  box-shadow: 3px 4px 0 var(--shadow);
  transition: transform 150ms ease, box-shadow 150ms ease;
}

.destination-mark {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: var(--teal);
  font-size: 0.76rem;
  font-weight: 900;
}

.destination-link strong,
.destination-link small {
  display: block;
  min-width: 0;
}

.destination-link strong {
  font-size: 0.98rem;
}

.destination-link small {
  margin-top: 2px;
  color: var(--graphite);
  font-weight: 800;
}

@media (max-width: 980px) {
  .brand-title {
    font-size: 2.5rem;
  }

  .brand-title.is-alt-copy {
    font-size: 2.5rem;
  }

  .hero-grid {
    grid-template-columns: minmax(240px, 0.72fr) minmax(320px, 1fr);
    gap: 28px;
  }

  .story-hero h1 {
    font-size: 3.3rem;
  }
}

@media (max-width: 760px) {
  :root {
    --nav-height: 58px;
  }

  .hero-shell {
    padding: 0 16px 12px;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    align-content: center;
    gap: 14px;
  }

  .profile-frame {
    width: min(52vw, 190px);
    box-shadow: 7px 8px 0 var(--shadow);
  }

  .profile-stage::before {
    width: min(58vw, 238px);
  }

  .profile-stage::after {
    width: min(48vw, 196px);
  }

  .photo-note {
    right: calc(50% - 106px);
    bottom: 1%;
    padding: 5px 10px;
    font-size: 0.82rem;
  }

  .hero-copy {
    gap: 11px;
    justify-items: center;
    text-align: center;
  }

  .eyebrow {
    font-size: 0.72rem;
  }

  .brand-title {
    justify-self: center;
    font-size: 2.5rem;
  }

  .brand-title.is-alt-copy {
    font-size: 2.5rem;
  }

  .hero-kicker {
    max-width: 540px;
    font-size: 0.94rem;
    line-height: 1.4;
  }

  .primary-actions {
    justify-content: center;
    gap: 8px;
  }

  .ink-button {
    min-height: 42px;
    padding: 7px 11px;
    font-size: 0.86rem;
  }

  .button-mark {
    width: 26px;
    height: 26px;
  }

  .social-grid {
    width: 100%;
    max-width: 430px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 7px;
  }

  .social-link {
    flex-direction: column;
    justify-content: center;
    min-height: 50px;
    padding: 6px 5px;
    gap: 3px;
  }

  .wander-doodle {
    opacity: 0.32;
  }

  .link-mark {
    width: 24px;
    height: 24px;
    box-shadow: 2px 2px 0 var(--shadow);
  }

  .link-mark i {
    font-size: 0.78rem;
  }

  .link-label-full {
    display: none;
  }

  .link-label-short {
    display: inline;
    font-size: 0.78rem;
  }

  .hero-footer {
    justify-content: center;
    min-height: 30px;
    text-align: center;
    font-size: 0.74rem;
  }

  .story-nav,
  .story-main {
    width: min(100% - 32px, var(--max-width));
  }

  .story-main {
    padding-top: 6px;
  }

  .story-hero {
    padding: 32px 0 24px;
  }

  .story-hero h1 {
    font-size: 2.35rem;
  }

  .story-hero p:last-child {
    font-size: 1rem;
  }

  .story-layout {
    grid-template-columns: 1fr;
  }

  .story-panel {
    padding: 22px;
  }
}

@media (max-width: 420px) {
  .brand-title {
    font-size: 3rem;
  }

  .brand-title.is-alt-copy {
    font-size: 2rem;
  }

  .hero-kicker {
    font-size: 0.87rem;
  }

  .ink-button {
    font-size: 0.8rem;
  }

  .site-nav {
    gap: 10px;
  }

  .brand-lockup {
    font-size: 0.9rem;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
  }
}

@media (max-height: 680px) and (max-width: 760px) {
  .profile-frame {
    width: min(42vw, 156px);
  }

  .brand-title {
    font-size: 2.75rem;
  }

  .brand-title.is-alt-copy {
    font-size: 1.86rem;
  }

  .hero-kicker {
    display: none;
  }
}

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

  .wander-doodle,
  .brand-title.is-warping,
  .brand-title.title-style-type::after,
  .ink-button,
  .social-link,
  .destination-link,
  .nav-link::after,
  .brand-lockup::after {
    animation: none;
    transition: none;
  }
}
