/* The reading room, binding, and paper. Content components live in style.css. */
:root {
  color-scheme: light;
  --ink: #1d2a39;
  --ink-soft: #4b5d6f;
  --paper: #f8fbff;
  --paper-alt: #eef5fb;
  --paper-deep: #e1edf7;
  --accent: #00a8ff;
  --accent-dark: #006fa8;
  --sage: #cbe8f7;
  --line: rgba(0, 168, 255, 0.18);
  --white: #ffffff;
  --canvas: #071b2b;
  --canvas-glow: rgba(0, 168, 255, 0.18);
  --canvas-glow-alt: rgba(0, 180, 216, 0.12);
  --page-wash: rgba(248, 251, 255, 0.92);
  --surface: rgba(255, 255, 255, 0.38);
  --surface-strong: rgba(255, 255, 255, 0.56);
  --corner-fill: rgba(203, 232, 247, 0.35);
  --field-placeholder: #70869a;
  --toggle-bg: rgba(248, 251, 255, 0.94);
  --toggle-border: rgba(0, 168, 255, 0.2);
  --cover-ink: #f8fbff;
  --cover-soft: rgba(255, 255, 255, 0.78);
  --cover-highlight: #b9eaff;
  --cover-button-bg: #f8fbff;
  --cover-button-ink: #1d2a39;
  --cover-button-hover: #1d2a39;
  --featured-surface: rgba(203, 232, 247, 0.42);
  --shadow: 0 1.5rem 4rem rgba(3, 23, 38, 0.3);
  --page-shadow: 0 0 2.5rem rgba(8, 30, 45, 0.12);
  --heading: "Space Grotesk", "Segoe UI", sans-serif;
  --body: "DM Sans", "Segoe UI", sans-serif;
  --chrome: #f8fbff;
  --chrome-soft: #a7bfd2;
  --chrome-line: rgba(84, 200, 255, 0.24);
  --cover: #0077b6;
  --foil: var(--cover-ink);
  --serif: "Cormorant Garamond", Georgia, serif;
}
html[data-theme="dark"] {
  color-scheme: dark;
  --ink: #e8f4ff;
  --ink-soft: #a7bfd2;
  --paper: #0e2538;
  --paper-alt: #122e45;
  --paper-deep: #1a405a;
  --accent: #54c8ff;
  --accent-dark: #2caee8;
  --sage: #1a405a;
  --line: rgba(84, 200, 255, 0.24);
  --canvas: #04111d;
  --canvas-glow: rgba(0, 168, 255, 0.13);
  --canvas-glow-alt: rgba(0, 180, 216, 0.08);
  --page-wash: rgba(14, 37, 56, 0.92);
  --surface: rgba(255, 255, 255, 0.07);
  --surface-strong: rgba(255, 255, 255, 0.1);
  --corner-fill: rgba(132, 207, 246, 0.12);
  --field-placeholder: #83a7bf;
  --toggle-bg: rgba(14, 37, 56, 0.94);
  --toggle-border: rgba(84, 200, 255, 0.28);
  --cover-ink: #f3fbff;
  --cover-soft: rgba(243, 251, 255, 0.76);
  --cover-highlight: #9fe3ff;
  --cover-button-bg: #f3fbff;
  --cover-button-ink: #08243a;
  --cover-button-hover: #061a2b;
  --featured-surface: rgba(84, 200, 255, 0.12);
  --shadow: 0 1.5rem 4rem rgba(0, 0, 0, 0.48);
  --page-shadow: 0 0 2.5rem rgba(0, 0, 0, 0.3);
}
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
body {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 12%, var(--canvas-glow), transparent 25rem),
    radial-gradient(
      circle at 90% 84%,
      var(--canvas-glow-alt),
      transparent 24rem
    ),
    var(--canvas);
  font-family: var(--body);
  transition:
    background-color 0.3s,
    color 0.3s;
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
a,
summary {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  border: 0;
}
button:disabled {
  opacity: 0.3;
  cursor: default;
}
:focus-visible {
  outline: 2px solid var(--accent-dark);
  outline-offset: 5px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 1000;
  padding: 12px;
  background: var(--paper);
  transform: translateY(-160%);
}
.skip-link:focus {
  transform: none;
}
.reader-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: min(1440px, 100%);
  padding: 8px 28px;
  margin: 0 auto;
  color: var(--chrome);
}
.reader-brand {
  display: flex;
  align-items: center;
  gap: 13px;
}
.brand-mark {
  font-family: var(--serif);
  font-size: 30px;
  letter-spacing: -3px;
}
.brand-mark > span {
  color: var(--accent);
}
.brand-copy {
  font-size: 12px;
  font-weight: 600;
}
.brand-copy small {
  display: block;
  margin-top: 4px;
  color: var(--chrome-soft);
  font-size: 8px;
  font-weight: 500;
  letter-spacing: 1.8px;
  text-transform: uppercase;
}
.reader-tools {
  display: flex;
  align-items: center;
  gap: 9px;
}
.reader-tool,
.chapter-menu summary {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 12px;
  color: var(--chrome);
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
  font-size: 11px;
  cursor: pointer;
}
.reader-tool:hover,
.chapter-menu summary:hover {
  border-color: var(--chrome-line);
  background: #ffffff0c;
}
.reader-tool i {
  font-size: 17px;
}
.chapter-menu {
  position: relative;
  z-index: 100;
}
.chapter-menu summary {
  list-style: none;
}
.chapter-menu summary::-webkit-details-marker {
  display: none;
}
.chapter-menu summary > span:first-child {
  font-size: 21px;
  line-height: 1;
}
.chapter-list {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 255px;
  max-height: min(540px, 75svh);
  overflow-y: auto;
  padding: 20px 12px 12px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: 0 15px 50px #00151c26;
}
.chapter-list > p {
  padding: 0 10px 12px;
}
.chapter-list button {
  width: 100%;
  display: flex;
  gap: 16px;
  padding: 10px;
  text-align: left;
  font-size: 12px;
  color: var(--ink);
  background: transparent;
  border-radius: 3px;
}
.chapter-list button span {
  color: var(--ink-soft);
  font-size: 10px;
}
.chapter-list button:hover,
.chapter-list button[aria-current="page"] {
  background: var(--paper-deep);
}
.reading-room {
  width: 100%;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 24px;
}
.shelf-caption {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 2px 0 22px;
  color: var(--chrome-soft);
  font-family: var(--serif);
  font-size: 17px;
  font-style: italic;
  text-align: center;
}
.shelf-caption > span {
  width: 26px;
  height: 1px;
  background: var(--chrome-line);
}
.book-stage {
  position: relative;
  width: min(1720px, 100%);
  height: max(250px, calc(100dvh - 154px));
  isolation: isolate;
}
.book-position {
  width: 100%;
  height: 100%;
  margin: 0 auto;
}
.book-mounted .book-position {
  transition: transform 1.1s cubic-bezier(0.25, 0.6, 0.25, 1);
}
.book {
  width: 100%;
  height: 100%;
  min-width: 0 !important;
  min-height: 0 !important;
}
.book-ready .book-position[data-position="front"] {
  transform: translateX(calc(var(--page-width) / -2));
}
.book-ready .book-position[data-position="back"] {
  transform: translateX(calc(var(--page-width) / 2));
}
.book-ready.is-portrait .book-position {
  transform: none;
}
.stf__parent {
  overflow: visible;
}
.stf__wrapper {
  width: 100%;
  height: 100%;
  padding: 0 !important;
}
.stf__block {
  perspective: 2000px;
}
.leaf {
  color: var(--ink);
  background: var(--paper);
  overflow: hidden;
}
.book-ready .leaf {
  container-type: inline-size;
}
.paper-page {
  border: 1px solid var(--line);
}
.paper-page::after {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
  z-index: 3;
  background: repeating-linear-gradient(
    0deg,
    #006fa803 0,
    #006fa803 1px,
    transparent 1px,
    transparent 4px
  );
}
.paper-page.--left {
  background:
    linear-gradient(to left, #082b4524, transparent 9%, #ffffff14 50%),
    var(--paper);
  box-shadow:
    -2px 1px 0 var(--paper-deep),
    -4px 3px 0 var(--paper-alt),
    -6px 5px 0 var(--sage),
    -8px 7px 0 var(--cover),
    -12px 14px 25px #03172640;
  border-radius: 3px 0 0 3px;
}
.paper-page.--right {
  background:
    linear-gradient(to right, #082b4524, transparent 9%, #ffffff14 50%),
    var(--paper);
  box-shadow:
    2px 1px 0 var(--paper-deep),
    4px 3px 0 var(--paper-alt),
    6px 5px 0 var(--sage),
    8px 7px 0 var(--cover),
    12px 14px 25px #03172640;
  border-radius: 0 3px 3px 0;
}
.page-running-head,
.page-folio {
  position: absolute;
  right: 7%;
  left: 7%;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--ink-soft);
  font-family: var(--heading);
  font-size: 8px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
}
.page-running-head {
  top: 22px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.page-folio {
  bottom: 18px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}
.page-folio span:last-child {
  color: var(--ink);
}
.page-content {
  position: absolute;
  inset: 57px 0 43px;
  padding: 0 7%;
  overflow: visible;
  touch-action: pan-y;
}
.page-content:focus-visible {
  outline-offset: -3px;
}
.book-cover {
  color: var(--foil);
  background:
    repeating-linear-gradient(
      0deg,
      #ffffff05 0,
      #ffffff05 1px,
      transparent 1px,
      transparent 3px
    ),
    repeating-linear-gradient(
      90deg,
      #0000000a 0,
      #0000000a 1px,
      transparent 1px,
      transparent 3px
    ),
    radial-gradient(
      circle at 82% 18%,
      rgba(0, 180, 216, 0.38),
      transparent 22rem
    ),
    linear-gradient(145deg, #00b4d8 0%, #0077b6 48%, #005b8f 100%);
  border: 1px solid #006fa8;
  border-radius: 3px 7px 7px 3px;
  box-shadow:
    inset 6px 0 9px #03172680,
    inset -2px 0 3px #ffffff1f,
    3px 2px 0 var(--paper),
    5px 4px 0 var(--paper-deep),
    7px 6px 0 var(--paper-alt),
    10px 8px 0 #005b8f,
    15px 22px 38px #03172660;
}
.back-cover {
  border-radius: 7px 3px 3px 7px;
}
.cover-border {
  position: absolute;
  inset: 23px 23px 23px 35px;
  border: 1px solid #ffffff65;
  pointer-events: none;
}
.cover-border::after {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1px solid #ffffff20;
}
.cover-spine {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 21px;
  display: flex;
  justify-content: center;
  align-items: center;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-size: 6px;
  letter-spacing: 2px;
  color: #ffffff8f;
  background: linear-gradient(90deg, #ffffff08, #00000022, #ffffff0b);
  border-left: 1px solid #0000004d;
}
.cover-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10% 11% 8% 13%;
  text-align: center;
}
.cover-edition,
.cover-bottom {
  display: flex;
  justify-content: space-between;
  width: 100%;
  gap: 10px;
  text-transform: uppercase;
  letter-spacing: 1.6px;
  font-size: 7px;
  line-height: 1.5;
  color: var(--cover-soft);
}
.cover-title {
  margin-top: auto;
}
.cover-kicker {
  font-family: var(--serif);
  font-size: 17px;
  font-style: italic;
  color: var(--cover-soft);
}
.cover-title h1 {
  margin: 14px 0 19px;
  font-family: var(--serif);
  font-size: clamp(65px, 18cqw, 91px);
  font-weight: 400;
  letter-spacing: -4px;
  line-height: 0.85;
  color: var(--cover-ink);
  text-shadow:
    0 1px 0 #ffffff30,
    0 -1px 1px #061925;
}
.cover-title h1 em {
  font-weight: 400;
  color: var(--cover-highlight);
}
.cover-role {
  font-size: 8px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
}
.cover-emblem {
  position: relative;
  display: grid;
  place-items: center;
  width: 83px;
  height: 83px;
  margin: 7% 0 5%;
  border: 1px solid #ffffff60;
  border-radius: 50%;
}
.cover-emblem::before {
  position: absolute;
  inset: 6px;
  content: "";
  border: 1px solid #ffffff28;
  border-radius: 50%;
}
.emblem-orbit {
  position: absolute;
  width: 114px;
  height: 36px;
  border: 1px solid #ffffff60;
  border-radius: 50%;
  transform: rotate(-36deg);
}
.emblem-initials {
  padding-right: 4px;
  font-family: var(--serif);
  font-size: 34px;
  letter-spacing: -4px;
}
.emblem-star {
  position: absolute;
  top: -9px;
  right: 2px;
  font-size: 17px;
  background: transparent;
}
.cover-motto {
  font-family: var(--serif);
  font-size: 19px;
  font-style: italic;
  color: var(--cover-ink);
}
.cover-open {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  min-height: 42px;
  margin: 6% 0 auto;
  padding: 9px 15px;
  color: var(--cover-button-ink);
  background: var(--cover-button-bg);
  border: 1px solid #ffffff52;
  border-radius: 2px;
  font-size: 10px;
  letter-spacing: 0.5px;
  transition:
    background 0.2s,
    border-color 0.2s;
}
.cover-open:hover {
  color: var(--cover-ink);
  background: var(--cover-button-hover);
  border-color: var(--cover-button-hover);
}
.cover-open:focus-visible {
  outline-color: var(--foil);
}
.cover-open > span {
  font-size: 18px;
  pointer-events: none;
}
.cover-bottom {
  padding-top: 14px;
  margin-top: 15px;
  border-top: 1px solid #ffffff35;
  font-size: 6px;
  letter-spacing: 1px;
}
.back-cover-content {
  position: absolute;
  inset: 0;
  padding: 14% 12% 8%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.back-monogram {
  margin: auto 0 25px;
  font-family: var(--serif);
  font-size: 55px;
  letter-spacing: -7px;
}
.back-cover h2 {
  font-family: var(--serif);
  font-size: 54px;
  line-height: 0.95;
  font-weight: 400;
}
.back-cover h2 em {
  color: var(--cover-ink);
  font-style: italic;
}
.back-cover-content > p:not(.cover-kicker) {
  margin: 25px 0 10px;
  font-size: 12px;
  line-height: 1.7;
  color: var(--cover-soft);
}
.book-navigation {
  display: grid;
  grid-template-columns: 140px minmax(180px, 300px) 140px;
  align-items: center;
  gap: 20px;
  margin-top: 10px;
  color: var(--chrome);
}
.nav-button {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  padding: 8px 15px;
  min-height: 42px;
  color: var(--chrome);
  background: transparent;
  border: 1px solid var(--chrome-line);
  border-radius: 3px;
  font-size: 11px;
  transition: background 0.2s;
}
.nav-button:hover:not(:disabled) {
  background: #ffffff24;
}
.nav-button > span:not(.nav-label) {
  font-size: 21px;
  line-height: 1;
}
.reading-progress {
  text-align: center;
}
.current-chapter {
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1.1;
}
.page-count {
  margin-top: 6px;
  color: var(--chrome-soft);
  font-size: 8px;
  letter-spacing: 1.3px;
  text-transform: uppercase;
}
.progress-track {
  width: 80px;
  height: 2px;
  margin: 10px auto 0;
  background: var(--chrome-line);
}
.progress-track > span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--chrome);
  transition: width 0.6s;
}
.reader-hint {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 7px;
  color: var(--chrome-soft);
  font-size: 10px;
  text-align: center;
}
.reading-mode-toggle {
  color: var(--chrome);
  background: transparent;
  font-size: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.reader-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  width: min(1440px, 100%);
  margin: 0 auto;
  padding: 8px 28px;
  color: var(--chrome-soft);
  font-size: 9px;
  letter-spacing: 0.3px;
}
.reader-footer button {
  background: transparent;
  color: var(--chrome);
  font-size: 10px;
}
.footer-star {
  margin: 0 8px;
  color: var(--accent);
}

/* Typography and content sized for paper instead of a full-width webpage. */
.profile-page {
  display: flex;
  min-height: 0;
  height: auto;
  padding: 0;
  justify-content: flex-start;
}
.profile-topline {
  position: static;
  display: block;
  text-align: center;
}
.profile-topline > .eyebrow {
  display: none;
}
.availability {
  font-size: 9px;
}
.portrait-wrap {
  flex: 0 0 auto;
  width: 110px;
  height: 110px;
  margin: 16px 0;
}
.portrait-ring {
  inset: -7px;
  border-color: var(--accent);
}
.portrait-ring::after {
  background: var(--accent);
  width: 5px;
  height: 5px;
}
.portrait-wrap img {
  border-width: 4px;
}
.portrait-label {
  right: -31px;
  bottom: 7px;
  font-size: 7px;
}
.profile-copy > .eyebrow {
  font-size: 8px;
  letter-spacing: 1.2px;
}
.profile-copy .profile-name {
  margin-top: 8px;
  font-family: var(--serif);
  font-size: 43px;
  letter-spacing: -1.5px;
  font-weight: 500;
  line-height: 1;
}
.profile-copy .profile-name span {
  color: var(--ink);
}
.profile-copy h2:not(.profile-name) {
  margin-top: 12px;
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 400;
  letter-spacing: -0.5px;
  line-height: 1;
}
.profile-copy h2 br {
  display: none;
}
.profile-copy h2 em {
  font-style: italic;
}
.profile-intro {
  font-size: 13px;
  line-height: 1.7;
  margin-top: 16px;
}
.profile-meta {
  margin-top: 16px;
  font-size: 9px;
  gap: 6px 12px;
}
.social-media {
  margin: 14px 0;
}
.social-media a {
  width: 30px;
  height: 30px;
  font-size: 17px;
}
.btn {
  font-size: 10px;
  min-height: 38px;
  padding: 10px 13px;
  border-radius: 2px;
}
.btn-box {
  gap: 8px;
  padding-bottom: 4px;
}
.page-heading {
  margin-bottom: 21px;
}
.page-heading .eyebrow {
  font-size: 8px;
  letter-spacing: 1.8px;
}
.page-heading h2,
.compact-heading h2 {
  font-family: var(--serif);
  font-size: 43px;
  font-weight: 500;
  letter-spacing: -1.6px;
  line-height: 0.95;
  margin-top: 9px;
}
.page-heading h2 em {
  font-style: italic;
}
.summary-box {
  padding: 0 0 19px;
  background: none;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
}
.summary-box p {
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.85;
}
.summary-box p + p {
  margin-top: 12px;
}
.proof-grid {
  gap: 7px;
  margin: 20px 0;
}
.proof-card {
  background: none;
  padding: 0 8px;
  border-left: 1px solid var(--line);
  border-radius: 0;
}
.proof-card:first-child {
  padding-left: 0;
  border: 0;
}
.proof-card strong {
  font-family: var(--serif);
  font-size: 27px;
  font-weight: 500;
  letter-spacing: -1px;
}
.proof-card span {
  font-size: 8px;
}
.check-list div {
  font-size: 13px;
  line-height: 1.65;
  padding-bottom: 12px;
}
.page-note {
  font-size: 8px;
  margin-top: 20px;
}
.project-card {
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  padding: 0 0 15px;
  margin-bottom: 17px;
  background: none;
}
.project-card:hover {
  transform: none;
  box-shadow: none;
  border-color: var(--line);
}
.project-topline {
  gap: 8px;
  margin-bottom: 7px;
}
.project-tag,
.project-link,
.project-index {
  font-size: 8px;
}
.project-card h3 {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.6px;
}
.project-card h3 span {
  font-size: 11px;
}
.project-card p {
  font-size: 13px;
  line-height: 1.7;
}
.tag-row {
  margin-top: 9px;
  gap: 5px;
}
.tag-row span {
  font-size: 8px;
  padding: 3px 6px;
  background: transparent;
  border-radius: 2px;
}
.timeline {
  gap: 19px;
}
.timeline-item {
  grid-template-columns: 1fr;
  gap: 5px;
  padding-left: 17px;
}
.timeline-year,
.education-year {
  font-size: 9px;
}
.timeline-item h3,
.education-item h3 {
  font-size: 14px;
  letter-spacing: -0.2px;
}
.timeline-item h3 span {
  font-size: 12px;
}
.timeline-item p,
.education-item p,
.education-item small {
  font-size: 12px;
  line-height: 1.65;
}
.timeline::before {
  background: var(--line);
}
.timeline-item::before {
  width: 6px;
  height: 6px;
  top: 3px;
  left: 2px;
}
.education-item {
  grid-template-columns: 1fr;
  gap: 8px;
  padding-bottom: 23px;
}
.quote-card {
  padding: 19px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: none;
  border-radius: 0;
  margin-top: 23px;
}
.quote-card p {
  font-family: var(--serif);
  font-size: 24px;
  font-style: italic;
  color: var(--ink);
  letter-spacing: -0.5px;
}
.metric {
  font-family: var(--serif);
  font-size: 32px;
  font-weight: 500;
  letter-spacing: -1px;
  margin-top: 9px;
}
.metric small {
  font-size: 9px;
}
.tech-groups {
  gap: 23px;
}
.tech-group h3 {
  font-size: 11px;
  margin-bottom: 9px;
}
.tech-group .content {
  gap: 6px;
}
.tech-group .content span {
  font-size: 9px;
  border-radius: 3px;
  padding: 7px;
  background: transparent;
}
.skills-footer {
  font-size: 8px;
  line-height: 1.6;
  margin-top: 23px;
}
.achievement-list {
  gap: 19px;
}
.achievement-list > div {
  grid-template-columns: 22px 1fr;
  gap: 12px;
  padding-bottom: 18px;
}
.achievement-number {
  font-family: var(--serif);
  font-size: 23px;
  font-weight: 400;
}
.achievement-list p {
  font-size: 14px;
  line-height: 1.75;
}
.contact-intro p {
  font-size: 14px;
  line-height: 1.75;
}
.contact-intro span {
  font-size: 9px;
  margin-top: 10px;
}
.contact-list {
  gap: 12px;
  margin: 18px 0;
  padding: 18px 0;
}
.contact-list a {
  font-size: 10px;
  overflow-wrap: anywhere;
}
.contact-form {
  gap: 8px;
}
.field {
  padding: 11px;
  font-size: 11px;
  border-radius: 2px;
  background: transparent;
}
textarea.field {
  min-height: 80px;
}
.closing-note {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  justify-content: center;
  min-height: 0;
  padding: 14px 0;
}
.closing-note > .eyebrow {
  font-size: 8px;
}
.closing-star {
  margin: 26px 0;
  color: var(--accent);
  font-size: 27px;
}
.closing-note h2 {
  font-family: var(--serif);
  font-size: 48px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: -1.3px;
}
.closing-note h2 em {
  font-style: italic;
}
.closing-note > p:not(.eyebrow):not(.colophon-signature) {
  margin: 22px 0;
  font-size: 12px;
  line-height: 1.7;
  color: var(--ink-soft);
}
.closing-cv {
  margin-top: 17px;
  font-size: 10px;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.colophon-signature {
  margin: 33px 0 8px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 29px;
}

/* The document remains readable when JavaScript is unavailable or reading view is selected. */
body:not(.book-ready) .book-stage,
.reading-mode .book-stage {
  height: auto;
}
body:not(.book-ready) .book-position,
.reading-mode .book-position {
  transform: none !important;
}
body:not(.book-ready) .book,
.reading-mode .book {
  height: auto !important;
  max-width: 700px !important;
  margin: auto;
}
body:not(.book-ready) .leaf,
.reading-mode .leaf {
  position: relative !important;
  display: block !important;
  width: 100% !important;
  height: auto !important;
  min-height: 580px;
  margin: 0 0 24px;
  transform: none !important;
  clip-path: none !important;
}
body:not(.book-ready) .paper-page,
.reading-mode .paper-page {
  padding: 70px 0 60px;
  box-shadow: 0 6px 18px #03172630;
}
body:not(.book-ready) .page-content,
.reading-mode .page-content {
  position: relative;
  inset: auto;
  overflow: visible;
}
.reading-mode .stf__wrapper,
.reading-mode .stf__block {
  position: relative !important;
  height: auto !important;
  padding: 0 !important;
  overflow: visible !important;
}
.reading-mode [class*="stf__"][class*="shadow"] {
  display: none !important;
}
body:not(.book-ready) .book-navigation,
.reading-mode .book-navigation {
  display: none;
}
body:not(.book-ready) .reader-hint {
  display: none;
}
.reading-mode .gesture-hint,
.reading-mode .hint-divider {
  display: none;
}
.reading-mode .reader-hint {
  --chrome: var(--ink);
  position: sticky;
  bottom: 12px;
  z-index: 20;
  padding: 12px 18px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--paper);
  box-shadow: 0 3px 18px #0002;
}

@container (max-width: 355px) {
  .cover-kicker {
    font-size: 14px;
  }
  .cover-title h1 {
    font-size: 66px;
  }
  .cover-role {
    font-size: 7px;
    letter-spacing: 1.7px;
  }
  .cover-emblem {
    width: 60px;
    height: 60px;
    margin: 6% 0;
  }
  .emblem-orbit {
    width: 87px;
    height: 28px;
  }
  .emblem-initials {
    font-size: 28px;
  }
  .cover-motto {
    font-size: 17px;
  }
  .cover-edition {
    font-size: 6px;
    letter-spacing: 1px;
  }
  .cover-bottom {
    font-size: 5px;
    letter-spacing: 0.7px;
  }
  .page-heading h2 {
    font-size: 36px;
  }
  .portrait-wrap {
    width: 98px;
    height: 98px;
  }
  .profile-copy .profile-name {
    font-size: 35px;
  }
  .profile-copy h2:not(.profile-name) {
    font-size: 22px;
  }
  .btn-box {
    flex-direction: column;
  }
  .contact-form {
    grid-template-columns: 1fr;
  }
  .closing-note h2 {
    font-size: 39px;
  }
}
@media (max-width: 820px) {
  .reader-header {
    padding: 8px 20px;
  }
  .reading-room {
    padding: 0 22px;
  }
  .book-stage {
    height: max(250px, calc(100dvh - 154px));
  }
  .reader-footer {
    padding: 8px 20px;
  }
  .reader-footer > span:first-child {
    display: none;
  }
  .book-navigation {
    grid-template-columns: 95px minmax(150px, 220px) 95px;
    gap: 12px;
  }
  .nav-button {
    font-size: 10px;
    padding: 7px 10px;
    gap: 7px;
  }
}
@media (max-width: 540px) {
  .reader-header {
    padding: 8px 14px;
  }
  .brand-copy {
    font-size: 11px;
  }
  .brand-copy small {
    font-size: 6px;
    letter-spacing: 1px;
  }
  .reader-tools {
    gap: 1px;
  }
  .reader-tool,
  .chapter-menu summary {
    min-width: 38px;
    padding: 8px;
  }
  .tool-label {
    display: none;
  }
  .chapter-list {
    position: fixed;
    right: 18px;
    top: 64px;
  }
  .reading-room {
    padding: 0 14px;
  }
  .shelf-caption {
    font-size: 13px;
    gap: 8px;
    margin: 8px 0 20px;
  }
  .shelf-caption > span {
    width: 13px;
  }
  .book-stage {
    height: max(250px, calc(100dvh - 158px));
  }
  .book-navigation {
    width: 100%;
    grid-template-columns: 44px 1fr 44px;
    gap: 10px;
    margin-top: 10px;
  }
  .nav-label {
    display: none;
  }
  .nav-button {
    width: 44px;
    height: 44px;
  }
  .current-chapter {
    font-size: 21px;
  }
  .reader-hint {
    margin-top: 7px;
    font-size: 9px;
    gap: 7px;
  }
  .reader-footer {
    padding: 8px 14px;
    font-size: 8px;
  }
  .page-running-head {
    top: 17px;
    font-size: 7px;
    letter-spacing: 1px;
  }
  .page-content {
    top: 50px;
    bottom: 39px;
    padding: 0 7%;
  }
  .page-folio {
    bottom: 16px;
    font-size: 7px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}

/* The book owns the viewport. Long chapters continue on another sheet. */
body.book-ready:not(.reading-mode) {
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
}
.book-ready .shelf-caption {
  display: none;
}
.book-ready:not(.reading-mode) .reading-room {
  min-height: 0;
  min-width: 0;
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) auto auto;
  justify-content: stretch;
  justify-items: center;
  align-content: stretch;
}
.book-ready:not(.reading-mode) .book-stage {
  height: 100%;
  min-height: 0;
  overflow: clip;
  overflow-clip-margin: 14px;
}
.reader-header,
.reader-footer {
  flex-shrink: 0;
}
.reading-progress {
  min-width: 0;
}
.current-chapter {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.page-count {
  white-space: nowrap;
}
.page-content .profile-page,
.page-content .closing-note {
  min-height: 0;
}
.continuation-heading {
  margin: 0 0 16px;
  color: var(--accent-dark);
  font-family: var(--heading);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.flow-fragment {
  display: block !important;
}
.page-content p {
  overflow-wrap: anywhere;
}
.page-content textarea.field {
  resize: none;
}
.tech-groups {
  gap: 17px;
}
.skills-footer {
  margin-top: 15px;
  padding-top: 12px;
}
.quote-card {
  margin-top: 16px;
  padding: 12px 0;
}
.quote-card p {
  font-size: 22px;
}
.closing-star {
  margin: 16px 0;
}
.closing-note h2 {
  font-size: 42px;
}
.closing-note > p:not(.eyebrow):not(.colophon-signature) {
  margin: 15px 0;
}
.colophon-signature {
  margin: 22px 0 6px;
}
.cover-content {
  padding: 30px 11% 24px 13%;
}
.cover-title h1 {
  font-size: clamp(56px, 15cqw, 80px);
}
.cover-emblem {
  flex-shrink: 0;
  width: 66px;
  height: 66px;
  margin: 18px 0 14px;
}
.emblem-orbit {
  width: 96px;
  height: 30px;
}
.cover-open {
  margin-top: 18px;
}
.endpaper-mark {
  display: grid;
  gap: 18px;
  place-content: center;
  height: 100%;
  text-align: center;
  font-family: var(--serif);
  font-size: 64px;
  color: var(--accent);
}
.endpaper-mark span {
  font-family: var(--body);
  font-size: 12px;
  color: var(--ink-soft);
}
.pagination-probe {
  position: fixed;
  top: 0;
  left: -10000px;
  width: var(--sheet-width);
  visibility: hidden;
  pointer-events: none;
}
.pagination-probe .leaf {
  display: block !important;
  position: relative !important;
  width: var(--sheet-width) !important;
  height: var(--sheet-height) !important;
  container-type: inline-size;
}
.reading-mode .book-stage {
  height: auto;
}
.reading-mode .book-position {
  width: 100% !important;
}
.reading-mode .book {
  min-height: 0 !important;
}
.reading-mode .page-content {
  position: relative;
  inset: auto;
}
.reading-mode .paper-page {
  min-height: 0;
}
.reading-mode .continuation-heading {
  margin-top: 10px;
}
@media (min-width: 900px) and (max-height: 800px) {
  .portrait-wrap {
    width: 88px;
    height: 88px;
    margin: 12px 0;
  }
  .profile-copy .profile-name {
    font-size: 38px;
  }
  .profile-copy h2:not(.profile-name) {
    margin-top: 8px;
  }
  .profile-intro {
    margin-top: 12px;
    line-height: 1.6;
  }
  .profile-meta {
    margin-top: 12px;
  }
  .social-media {
    margin: 10px 0;
  }
}
@media (max-height: 600px) {
  .reader-header {
    padding-top: 4px;
    padding-bottom: 4px;
  }
  .reader-footer {
    display: none;
  }
  .book-stage {
    height: max(230px, calc(100dvh - 124px));
  }
  .page-running-head {
    top: 12px;
    padding-bottom: 7px;
  }
  .page-folio {
    bottom: 10px;
    padding-top: 6px;
  }
  .page-content {
    top: 38px;
    bottom: 31px;
  }
  .page-heading {
    margin-bottom: 12px;
  }
  .page-heading h2 {
    font-size: 32px;
    margin-top: 5px;
  }
  .portrait-wrap {
    width: 76px;
    height: 76px;
    margin: 10px 0;
  }
  .profile-copy .profile-name {
    font-size: 32px;
  }
  .profile-copy h2:not(.profile-name) {
    font-size: 22px;
  }
  .profile-intro {
    margin-top: 10px;
  }
  .field {
    padding: 7px;
    font-size: 12px;
  }
  textarea.field {
    min-height: 50px;
    height: 50px;
    resize: none;
  }
  .contact-form .btn {
    min-height: 30px;
    padding: 7px 10px;
  }
  .contact-form {
    gap: 6px;
  }
  .cover-title h1 {
    font-size: clamp(38px, 13cqh, 65px);
    margin: 8px 0;
  }
  .cover-emblem {
    width: 44px;
    height: 44px;
    margin: 3% 0;
  }
  .emblem-orbit {
    width: 67px;
    height: 22px;
  }
  .emblem-initials {
    font-size: 23px;
  }
  .cover-open {
    margin-top: 3%;
    min-height: 32px;
    padding: 5px 12px;
  }
  .cover-bottom {
    margin-top: 8px;
    padding-top: 8px;
  }
  .cover-content {
    padding-top: 7%;
    padding-bottom: 7%;
  }
}
@media (max-height: 450px) {
  .cover-content {
    padding: 20px 11% 16px 13%;
  }
  .cover-title h1 {
    font-size: 40px;
    line-height: 0.9;
    margin: 6px 0;
  }
  .cover-kicker {
    font-size: 12px;
  }
  .cover-emblem,
  .cover-motto,
  .back-monogram {
    display: none;
  }
  .back-cover-content {
    padding: 20px 12% 16px;
  }
  .back-cover h2 {
    font-size: 36px;
  }
  .back-cover-content > p:not(.cover-kicker) {
    font-size: 10px;
    margin: 12px 0;
  }
}

/* One full-width sheet and thumb-sized controls on phones and small tablets. */
@media (max-width: 899px) {
  body {
    padding: env(safe-area-inset-top) env(safe-area-inset-right)
      env(safe-area-inset-bottom) env(safe-area-inset-left);
  }
  .reader-header {
    gap: 8px;
    padding: 4px 12px 8px;
  }
  .reader-brand {
    min-width: 0;
    gap: 10px;
  }
  .reader-tools {
    flex-shrink: 0;
    gap: 0;
  }
  .reader-tool,
  .chapter-menu summary {
    min-width: 44px;
    min-height: 44px;
  }
  .chapter-list {
    max-width: calc(100vw - 32px);
    max-height: calc(100svh - 88px - env(safe-area-inset-top));
  }
  .chapter-list button {
    min-height: 44px;
    align-items: center;
    font-size: 13px;
  }
  .reading-room {
    padding: 0 12px;
  }
  .book-navigation {
    width: min(640px, 100%);
    grid-template-columns: 48px minmax(0, 1fr) 48px;
    gap: 12px;
    margin-top: 12px;
  }
  .nav-button {
    width: 48px;
    min-height: 44px;
    padding: 8px;
  }
  .nav-label,
  .reader-footer {
    display: none;
  }
  .current-chapter {
    font-size: 22px;
  }
  .page-count {
    margin-top: 4px;
    font-size: 9px;
    letter-spacing: 0.8px;
  }
  .progress-track {
    margin-top: 6px;
  }
  .reader-hint {
    align-items: center;
    gap: 6px;
    margin: 0;
    font-size: 11px;
  }
  .reading-mode-toggle {
    min-height: 44px;
    padding: 8px 4px;
  }
  .page-running-head,
  .page-folio {
    right: 6%;
    left: 6%;
    font-size: 9px;
    letter-spacing: 0.6px;
  }
  .page-content {
    padding: 0 6%;
  }
  .page-heading {
    margin-bottom: 16px;
  }
  .profile-intro,
  .project-card p,
  .check-list div {
    font-size: 14px;
    line-height: 1.65;
  }
  .summary-box p,
  .achievement-list p,
  .contact-intro p {
    line-height: 1.7;
  }
  .timeline-item p,
  .education-item p,
  .education-item small {
    font-size: 13px;
  }
  .profile-meta,
  .contact-list a,
  .tech-group .content span {
    font-size: 11px;
  }
  .project-topline {
    flex-wrap: wrap;
  }
  .project-link {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    font-size: 11px;
  }
  .proof-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .proof-card {
    padding: 0 4px;
  }
  .proof-card span {
    font-size: 10px;
  }
  .social-media a {
    width: 44px;
    height: 44px;
    font-size: 20px;
  }
  .btn,
  .cover-open,
  .contact-form .btn {
    min-height: 44px;
    font-size: 12px;
  }
  .contact-form {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }
  .field {
    min-width: 0;
    min-height: 44px;
    padding: 10px;
    /* Prevent automatic field zoom in mobile Safari. */
    font-size: 16px;
  }
  .cover-border {
    inset: 18px 16px 18px 26px;
  }
  .cover-content {
    padding: 34px 9% 30px 12%;
  }
  .cover-title h1 {
    font-size: clamp(54px, 18cqw, 80px);
    letter-spacing: -2px;
  }
  .cover-bottom {
    font-size: 7px;
  }
  .back-cover-content {
    padding: 34px 10% 30px;
  }
}
@media (max-width: 600px) {
  .tool-label {
    display: none;
  }
  .chapter-list {
    position: fixed;
    top: calc(60px + env(safe-area-inset-top));
    right: calc(16px + env(safe-area-inset-right));
  }
}
/* Sideways phones retain readable type while using a shallower sheet. */
@media (max-width: 899px) and (max-height: 500px) {
  .reader-header {
    padding-top: 0;
    padding-bottom: 0;
  }
  .brand-copy small,
  .gesture-hint,
  .hint-divider,
  .progress-track {
    display: none;
  }
  .book-ready:not(.reading-mode) .reading-room {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: minmax(0, 1fr) auto;
    column-gap: 12px;
  }
  .book-stage {
    grid-column: 1 / -1;
  }
  .book-navigation {
    margin-top: 8px;
    margin-bottom: 4px;
  }
  .reader-hint {
    margin-top: 4px;
  }
  .current-chapter {
    font-size: 19px;
  }
  .page-content {
    top: 32px;
    bottom: 26px;
  }
  .page-running-head {
    top: 8px;
    padding-bottom: 5px;
  }
  .page-folio {
    bottom: 7px;
    padding-top: 5px;
  }
  .continuation-heading {
    margin-bottom: 8px;
  }
  .contact-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }
  .field {
    padding: 7px 10px;
  }
  .page-content textarea.field {
    min-height: 44px;
    height: 44px;
  }
  .cover-content,
  .back-cover-content {
    padding: 24px 9% 24px 12%;
  }
  .cover-title h1 {
    font-size: 40px;
    margin: 6px 0;
  }
  .cover-role {
    font-size: 8px;
  }
  .cover-bottom {
    padding-top: 6px;
    margin-top: 6px;
  }
  .cover-open {
    margin-top: 8px;
    padding: 5px 12px;
  }
}
@media (max-width: 899px) and (max-height: 360px) {
  .continuation-heading {
    margin-bottom: 2px;
  }
  .cover-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto minmax(0, 1fr) auto;
    gap: 6px 16px;
    padding-top: 26px;
    padding-bottom: 26px;
  }
  .cover-edition,
  .cover-content .cover-bottom {
    grid-column: 1 / -1;
    margin: 0;
  }
  .cover-title,
  .cover-content .cover-open {
    margin: 0;
  }
  .cover-title h1 {
    font-size: 34px;
  }
  .cover-role {
    font-size: 7px;
    letter-spacing: 1px;
  }
  .back-cover-content {
    padding-top: 20px;
    padding-bottom: 20px;
  }
  .back-cover h2 {
    font-size: 28px;
  }
  .back-cover-content > p:not(.cover-kicker) {
    margin: 4px 0;
    line-height: 1.4;
  }
}
