@font-face {
  font-family: "Caveat";
  src: url("fonts/caveat-variable.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Kalam";
  src: url("fonts/kalam-300.woff2") format("woff2");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Kalam";
  src: url("fonts/kalam-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Kalam";
  src: url("fonts/kalam-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #39362f;
  --ink-soft: #6c655a;
  --graphite: #4a463d;
  --red: #ae463b;
  --desk: #e7e1d5;
  --paper: #fffdf6;
  --card: #fffdf7;
  --highlight: #f7ebad;
  --hand: "Kalam", "Segoe Print", "Bradley Hand", cursive;
  --display: "Caveat", "Segoe Print", cursive;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: clip;
}

body {
  --desk-unit: clamp(82px, 14.6vw, 200px);
  --page-max: 1120px;
  --prop-overlap: 100px;
  position: relative;
  margin: 0;
  padding: clamp(26px, 3.2vw, 44px) clamp(14px, 3.2vw, 44px) clamp(26px, 4.5vw, 56px);
  overflow-x: clip;
  color: var(--ink);
  background-color: #85552f;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='620' height='620'%3E%3Cfilter id='w'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.11 0.008' numOctaves='3' seed='12'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='620' height='620' filter='url(%23w)' opacity='0.16'/%3E%3C/svg%3E"),
    repeating-linear-gradient(90deg, rgba(255, 240, 214, 0.05) 0 1px, rgba(0, 0, 0, 0) 1px 9px),
    repeating-linear-gradient(90deg, rgba(0, 0, 0, 0) 0 258px, rgba(46, 25, 11, 0.32) 258px 262px),
    radial-gradient(1200px 560px at 50% 0%, rgba(255, 226, 183, 0.22), rgba(255, 226, 183, 0) 68%),
    linear-gradient(176deg, #9b6a42 0%, #8c5b36 48%, #76492b 100%);
  background-repeat: repeat, repeat, repeat, no-repeat, no-repeat;
  background-size: 620px 620px, auto, auto, 100% 100%, 100% 100%;
  font-family: var(--hand);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.75;
  letter-spacing: 0.004em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Two objects resting on the desk above the sheet, one per page */
body::before,
body::after {
  --desk-item-size: calc(var(--desk-unit) * var(--item, 1));
  content: "";
  position: absolute;
  z-index: 40;
  width: var(--desk-item-size);
  height: var(--desk-item-size);
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  filter: drop-shadow(0 6px 7px rgba(36, 20, 8, 0.45));
  pointer-events: none;
}

body::before {
  left: calc(max(clamp(14px, 3.2vw, 44px), (100vw - var(--page-max)) / 2) + var(--prop-overlap) - var(--desk-item-size));
  top: clamp(130px, 18vh, 240px);
  transform: rotate(-5deg);
}

body::after {
  right: calc(max(clamp(14px, 3.2vw, 44px), (100vw - var(--page-max)) / 2) + var(--prop-overlap) - var(--desk-item-size));
  top: clamp(320px, 44vh, 540px);
  transform: rotate(4deg);
}

.desk-home::before { --item: 0.8; background-image: url("assets/desk/coffee-mug.svg"); }
.desk-home::after { --item: 1.24; background-image: url("assets/desk/arduino-board.svg"); }
.desk-about::before { --item: 1; background-image: url("assets/desk/smartphone.svg"); }
.desk-about::after { --item: 1.14; background-image: url("assets/desk/multimeter.svg"); }
.desk-learn::before { --item: 0.68; background-image: url("assets/desk/soda-can.svg"); }
.desk-learn::after { --item: 1.44; background-image: url("assets/desk/soldering-iron.svg"); }
.desk-others::before { --item: 0.82; background-image: url("assets/desk/takeaway-cup.svg"); }
.desk-others::after { --item: 1.14; background-image: url("assets/desk/breadboard.svg"); }
.desk-professional::before { --item: 1.3; background-image: url("assets/desk/headphones.svg"); }
.desk-professional::after { --item: 1.38; background-image: url("assets/desk/wire-strippers.svg"); }
.desk-beyond::before { --item: 0.76; background-image: url("assets/desk/water-bottle.svg"); }
.desk-beyond::after { --item: 1.46; background-image: url("assets/desk/toolbox.svg"); }
.desk-developed::before { --item: 1; background-image: url("assets/desk/snack-bar.svg"); }
.desk-developed::after { --item: 1.06; background-image: url("assets/desk/esp32-board.svg"); }
.desk-going::before { --item: 0.96; background-image: url("assets/desk/keys.svg"); }
.desk-going::after { --item: 1.48; background-image: url("assets/desk/laptop.svg"); }

img {
  max-width: 100%;
  height: auto;
}

p {
  margin: 0 0 1em;
}

a {
  color: inherit;
}

strong {
  font-weight: 700;
}

::selection {
  background: #f2e39d;
  color: #2e2a24;
}

:focus-visible {
  outline: 2px dashed var(--red);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  left: 16px;
  top: 16px;
  z-index: 100;
  padding: 8px 14px;
  background: var(--paper);
  border: 1.5px solid var(--ink);
  text-decoration: none;
  font-weight: 700;
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
}

/* ---------------------------------------------------------------
   The sheet of paper on the desk
   --------------------------------------------------------------- */

.page {
  position: relative;
  max-width: var(--page-max);
  min-height: 100vh;
  margin: 0 auto;
  overflow: hidden;
  background-color: var(--paper);
  background-image:
    linear-gradient(rgba(255, 249, 236, 0.3), rgba(255, 249, 236, 0.3)),
    url("assets/paper-tile.webp");
  background-repeat: no-repeat, repeat-y;
  background-size: 100% 100%, 100% auto;
  background-position: top left, top left;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.75) inset,
    0 0 0 1px rgba(67, 44, 24, 0.2),
    0 38px 70px -28px rgba(33, 18, 7, 0.68);
}

.page::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: clamp(54px, 5.8vw, 76px);
  width: 1.5px;
  background: linear-gradient(
    180deg,
    rgba(174, 70, 59, 0.22),
    rgba(174, 70, 59, 0.42) 8%,
    rgba(174, 70, 59, 0.42) 92%,
    rgba(174, 70, 59, 0.22)
  );
  pointer-events: none;
  z-index: 0;
}

.page::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 30;
  pointer-events: none;
  opacity: 0.5;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='260' height='260' filter='url(%23g)' opacity='0.05'/%3E%3C/svg%3E");
}

.page-inner {
  position: relative;
  z-index: 1;
  padding: 0 clamp(88px, 11vw, 160px) 34px clamp(104px, 13vw, 180px);
}

/* ---------------------------------------------------------------
   Header
   --------------------------------------------------------------- */

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 30px;
  padding: 24px 0 15px;
  border-bottom: 1.5px dashed rgba(57, 54, 47, 0.26);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.3rem, 1.7vw, 1.62rem);
  line-height: 1;
  text-decoration: none;
  letter-spacing: 0.005em;
}

.brand-mark {
  width: 29px;
  height: 29px;
  flex: none;
  color: var(--ink);
  transform: rotate(-3deg);
}

.site-nav {
  display: flex;
  gap: clamp(16px, 2.4vw, 30px);
  margin-left: auto;
  font-size: 0.94rem;
  line-height: 1.4;
}

.site-nav a {
  position: relative;
  padding: 4px 1px;
  text-decoration: none;
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: 0;
  border-bottom: 1.8px solid var(--red);
  transition: right 0.22s ease;
}

.site-nav a:hover::after,
.site-nav a:focus-visible::after {
  right: 0;
}

.page-no {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin-left: 10px;
  color: var(--ink-soft);
  font-family: var(--display);
  font-size: 1.02rem;
  font-weight: 700;
  line-height: 1;
  border: 1.5px solid rgba(57, 54, 47, 0.55);
  border-radius: 50% 46% 52% 48% / 47% 53% 47% 53%;
  transform: rotate(5deg);
}

/* ---------------------------------------------------------------
   Type and section rhythm
   --------------------------------------------------------------- */

.kicker {
  margin: 0 0 12px;
  color: var(--red);
  font-family: var(--hand);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  line-height: 1.4;
  text-transform: uppercase;
}

.section-head {
  margin-bottom: clamp(20px, 2.6vw, 30px);
}

.section-head h2 {
  margin: 0 0 10px;
  font-family: var(--display);
  font-size: clamp(2.3rem, 4.4vw, 3.55rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 0.95;
}

.section-sub {
  max-width: 60ch;
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.98rem;
  line-height: 1.7;
}

.section {
  position: relative;
  scroll-margin-top: 26px;
}

main > section + section {
  margin-top: clamp(30px, 4vw, 52px);
  padding-top: clamp(34px, 4.6vw, 56px);
}

main > section + section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 8px;
  background: url("assets/squiggle.svg") repeat-x left center / 140px 8px;
  opacity: 0.8;
}

/* ---------------------------------------------------------------
   Cover
   --------------------------------------------------------------- */

.cover {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(230px, 0.65fr);
  gap: clamp(26px, 4.4vw, 58px);
  align-items: start;
  padding: clamp(34px, 5.4vw, 66px) 0 clamp(24px, 3.6vw, 40px);
}

.cover-copy {
  min-width: 0;
}

.cover h1 {
  margin: 0 0 20px;
  font-family: var(--display);
  font-size: clamp(3.2rem, 6.2vw, 5.3rem);
  font-weight: 700;
  letter-spacing: -0.012em;
  line-height: 0.93;
}

.cover h1 em {
  position: relative;
  display: inline-block;
  font-style: normal;
}

.cover h1 em::after {
  content: "";
  position: absolute;
  left: -1%;
  right: -1%;
  bottom: -0.03em;
  height: 0.15em;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 360 24' preserveAspectRatio='none'%3E%3Cpath d='M4 16C64 8 120 19 180 12S300 4 356 14' fill='none' stroke='%23ae463b' stroke-width='3.4' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat center / 100% 100%;
}

.lede {
  max-width: 46ch;
  margin: 0 0 26px;
  color: #4b463d;
  font-size: clamp(1rem, 1.15vw, 1.1rem);
  line-height: 1.78;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  margin-bottom: 22px;
}

.button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 18px 10px;
  background: rgba(255, 255, 255, 0.5);
  border: 1.6px solid var(--ink);
  border-radius: 12px 6px 14px 7px / 7px 13px 6px 12px;
  box-shadow: 2px 3px 0 rgba(57, 54, 47, 0.13);
  color: var(--ink);
  font-family: var(--hand);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.4;
  text-decoration: none;
  transform: rotate(-0.8deg);
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.button:hover {
  background: #f5efdc;
  transform: rotate(0deg) translateY(-1px);
}

.text-link {
  padding-bottom: 2px;
  border-bottom: 1.6px dashed rgba(57, 54, 47, 0.5);
  font-size: 0.95rem;
  text-decoration: none;
  transition: color 0.2s ease, border-color 0.2s ease;
}

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

.margin-note {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 330px;
  margin: 0;
  color: var(--ink-soft);
  font-family: var(--display);
  font-size: 1.2rem;
  line-height: 1.25;
  transform: rotate(-1.2deg);
}

.margin-note svg {
  width: 38px;
  flex: none;
  color: var(--red);
  opacity: 0.8;
  transform: rotate(8deg);
}

.hero-aside {
  position: relative;
  justify-self: end;
  width: 100%;
  max-width: 300px;
  padding-top: 18px;
}

.coffee-ring {
  position: absolute;
  z-index: 0;
  border: 7px solid rgba(133, 97, 48, 0.09);
  border-radius: 50% 46% 52% 48% / 47% 53% 45% 55%;
  pointer-events: none;
}

.ring-one {
  top: -18px;
  right: -34px;
  width: 150px;
  height: 142px;
  transform: rotate(-14deg);
}

.ring-two {
  top: 88px;
  right: -4px;
  width: 92px;
  height: 86px;
  border-width: 4px;
  opacity: 0.7;
  transform: rotate(9deg);
}

.sticky-note {
  position: relative;
  z-index: 1;
  padding: 32px 24px 22px;
  background: linear-gradient(180deg, #f8ecb5, #f2e2a4);
  border-radius: 2px 3px 2px 4px;
  box-shadow:
    4px 7px 16px -6px rgba(80, 65, 30, 0.45),
    0 1px 0 rgba(255, 255, 255, 0.45) inset;
  transform: rotate(-2deg);
}

.sticky-note::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 24px;
  background: linear-gradient(180deg, rgba(120, 95, 35, 0), rgba(120, 95, 35, 0.08));
  pointer-events: none;
}

.sticky-kicker {
  margin: 0 0 8px;
  font-family: var(--display);
  font-size: 1.65rem;
  font-weight: 700;
  line-height: 1;
}

.sticky-list {
  margin: 0 0 14px;
  padding: 0;
  font-size: 0.95rem;
  line-height: 1.7;
  list-style: none;
}

.sticky-list li {
  position: relative;
  padding-left: 16px;
}

.sticky-list li::before {
  content: "";
  position: absolute;
  top: 0.74em;
  left: 0;
  width: 7px;
  height: 1.5px;
  background: var(--red);
}

.sticky-foot {
  margin: 0;
  padding-top: 9px;
  border-top: 1px dashed rgba(110, 80, 50, 0.32);
  color: #8f3f36;
  font-family: var(--display);
  font-size: 1.18rem;
  font-weight: 600;
  line-height: 1.2;
}

.tape {
  position: absolute;
  z-index: 4;
  background: linear-gradient(180deg, rgba(232, 222, 194, 0.95), rgba(213, 200, 169, 0.9));
  box-shadow: 0 1px 3px rgba(80, 70, 50, 0.18);
  clip-path: polygon(2% 6%, 98% 0, 100% 88%, 96% 100%, 3% 95%, 0 10%);
  pointer-events: none;
}

.sticky-tape {
  top: -13px;
  left: 50%;
  width: 104px;
  height: 26px;
  transform: translateX(-50%) rotate(-3deg);
}

/* ---------------------------------------------------------------
   Annotated sketch
   --------------------------------------------------------------- */

.sketch-card {
  position: relative;
  margin: 0;
  padding: clamp(12px, 2.6vw, 30px);
  background: rgba(255, 254, 249, 0.94);
  border: 1.5px solid rgba(57, 54, 47, 0.52);
  border-radius: 4px 7px 5px 8px / 7px 4px 8px 5px;
  box-shadow:
    5px 7px 0 rgba(57, 54, 47, 0.06),
    0 24px 45px -34px rgba(50, 42, 28, 0.65);
  transform: rotate(-0.25deg);
}

.tape-left {
  top: -13px;
  left: 6%;
  width: 100px;
  height: 27px;
  transform: rotate(-4deg);
}

.tape-right {
  top: -12px;
  right: 7%;
  width: 88px;
  height: 25px;
  transform: rotate(3.5deg);
}

.sketch-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 7 / 5;
}

.sketch-image {
  position: absolute;
  top: 10%;
  left: 17.14%;
  z-index: 1;
  width: 65.72%;
}

.sketch-image img {
  display: block;
  width: 100%;
  height: auto;
  filter: contrast(1.03);
  mix-blend-mode: multiply;
}

.leaders {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.leaders path {
  fill: none;
  stroke: #5a554c;
  stroke-width: 1.5;
  stroke-dasharray: 4 5;
  stroke-linecap: round;
  opacity: 0.7;
  vector-effect: non-scaling-stroke;
}

.leaders circle {
  fill: var(--card);
  stroke: #5a554c;
  stroke-width: 1.5;
  opacity: 0.88;
  vector-effect: non-scaling-stroke;
}

.callout {
  position: absolute;
  z-index: 3;
  display: inline-block;
  padding: 2px 3px;
  color: #423e37;
  font-family: var(--display);
  font-size: clamp(1rem, 0.45vw + 0.88rem, 1.28rem);
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.08;
  text-decoration: none;
  text-shadow: 0 0 5px #fffef9;
  transition: transform 0.2s cubic-bezier(0.2, 0.7, 0.3, 1), color 0.2s ease;
}

.callout-left {
  max-width: calc(16% - 10px);
  text-align: right;
  transform: translate(-100%, -50%);
  transform-origin: right center;
}

.callout-top {
  max-width: 33%;
  text-align: center;
  transform: translate(-50%, -50%);
  transform-origin: center center;
}

.callout-right {
  max-width: calc(16.2% - 10px);
  text-align: left;
  transform: translateY(-50%);
  transform-origin: left center;
}

.callout:hover,
.callout:focus-visible {
  color: var(--red);
}

.callout-left:hover,
.callout-left:focus-visible {
  transform: translate(-100%, -50%) scale(1.07);
}

.callout-top:hover,
.callout-top:focus-visible {
  transform: translate(-50%, -50%) scale(1.06);
}

.callout-right:hover,
.callout-right:focus-visible {
  transform: translateY(-50%) scale(1.07);
}

.marker {
  position: absolute;
  top: var(--my);
  left: var(--mx);
  z-index: 4;
  display: none;
  align-items: center;
  justify-content: center;
  width: clamp(22px, 6vw, 28px);
  height: clamp(22px, 6vw, 28px);
  background: var(--card);
  border: 1.5px solid #3d3a34;
  border-radius: 50% 46% 52% 48% / 48% 52% 46% 54%;
  box-shadow: 0 2px 4px rgba(40, 35, 25, 0.18);
  color: #38342e;
  font-family: var(--hand);
  font-size: clamp(0.68rem, 2.5vw, 0.8rem);
  font-weight: 700;
  line-height: 1;
  transform: translate(-50%, -50%) rotate(-3deg);
}

.sketch-key {
  display: none;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px 22px;
  margin: 12px 0 0;
  padding: 14px 0 0;
  border-top: 1px dashed rgba(57, 54, 47, 0.26);
  font-size: 0.95rem;
  line-height: 1.5;
  list-style: none;
}

.sketch-key li {
  display: flex;
  gap: 9px;
  align-items: baseline;
}

.key-num {
  min-width: 14px;
  color: var(--red);
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 700;
}

.sketch-key a {
  display: inline-block;
  padding-bottom: 1px;
  border-bottom: 1px dashed rgba(57, 54, 47, 0.35);
  text-decoration: none;
  transform-origin: left center;
  transition: transform 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.sketch-key a:hover,
.sketch-key a:focus-visible {
  color: var(--red);
  border-color: var(--red);
  transform: scale(1.05);
}

.sketch-card figcaption {
  max-width: 66ch;
  margin: 18px auto 2px;
  color: #6d665a;
  font-family: var(--display);
  font-size: 1.16rem;
  line-height: 1.4;
  text-align: center;
}

.red-pen {
  color: var(--red);
}

/* ---------------------------------------------------------------
   Individual (blank) pages
   --------------------------------------------------------------- */

.subpage {
  padding-top: clamp(38px, 5.4vw, 72px);
}

.subpage-head {
  margin-bottom: clamp(22px, 3.2vw, 34px);
}

.subpage-head h1 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(2.9rem, 6vw, 4.9rem);
  font-weight: 700;
  letter-spacing: -0.012em;
  line-height: 0.95;
}

.subpage-intro {
  max-width: 62ch;
  margin: 16px 0 0;
  color: var(--ink-soft);
  font-size: 1rem;
  line-height: 1.75;
}

.notes-page .subpage-head {
  margin-bottom: clamp(28px, 4vw, 44px);
}

.notes-page {
  position: relative;
}

.coffee-stains {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.notes-page > .subpage-head,
.notes-page > .entries,
.notes-page > .page-nav {
  position: relative;
  z-index: 1;
}

.coffee-stain {
  position: absolute;
  display: block;
}

.stain-one {
  top: 46px;
  right: clamp(18px, 5vw, 72px);
  width: 158px;
  height: 148px;
  border: 8px solid rgba(133, 97, 48, 0.085);
  border-radius: 50% 46% 52% 48% / 47% 53% 45% 55%;
  transform: rotate(-13deg);
}

.stain-one::after {
  content: "";
  position: absolute;
  right: -20px;
  bottom: 8px;
  width: 9px;
  height: 7px;
  background: rgba(133, 97, 48, 0.08);
  border-radius: 50% 46% 52% 48%;
  box-shadow: 16px 7px 0 -2px rgba(133, 97, 48, 0.07), 4px 18px 0 -3px rgba(133, 97, 48, 0.06);
  transform: rotate(20deg);
}

.stain-two {
  top: 43%;
  right: clamp(0px, 2.4vw, 34px);
  width: 112px;
  height: 104px;
  border: 5px solid rgba(133, 97, 48, 0.06);
  border-radius: 48% 52% 46% 54% / 53% 45% 55% 47%;
  transform: rotate(11deg);
}

.stain-three {
  top: calc(43% + 128px);
  right: clamp(42px, 10vw, 148px);
  width: 92px;
  height: 78px;
  background:
    radial-gradient(ellipse at 48% 48%, rgba(133, 97, 48, 0.07) 0 32%, rgba(133, 97, 48, 0.035) 45%, transparent 53%),
    radial-gradient(circle at 14% 22%, rgba(133, 97, 48, 0.08) 0 4px, transparent 5px),
    radial-gradient(circle at 86% 28%, rgba(133, 97, 48, 0.065) 0 6px, transparent 7px),
    radial-gradient(circle at 68% 92%, rgba(133, 97, 48, 0.055) 0 4px, transparent 5px);
  border-radius: 52% 48% 46% 54% / 47% 55% 45% 53%;
  filter: blur(0.4px);
  transform: rotate(-7deg);
  opacity: 0.85;
}

.entries {
  max-width: 76ch;
}

.entry {
  padding-top: clamp(22px, 3vw, 32px);
  margin-top: clamp(22px, 3vw, 32px);
  border-top: 1.5px dashed rgba(57, 54, 47, 0.28);
}

.entry:first-child {
  padding-top: 0;
  margin-top: 0;
  border-top: 0;
}

.entry-head {
  display: flex;
  align-items: flex-start;
  gap: clamp(12px, 1.8vw, 18px);
  margin-bottom: 14px;
}

.entry-num {
  flex: none;
  margin-top: 0.32em;
  color: var(--red);
  font-family: var(--display);
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1;
}

.entry-head h2 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(2rem, 3.3vw, 2.55rem);
  font-weight: 700;
  letter-spacing: -0.008em;
  line-height: 1;
}

.entry-topic {
  margin: 5px 0 0;
  color: var(--ink-soft);
  font-family: var(--hand);
  font-size: 0.88rem;
  line-height: 1.5;
}

.entry-topic::before {
  content: "\2013 ";
  color: var(--red);
}

.entry p {
  max-width: 74ch;
  margin: 0 0 1.1em;
  color: #3f3b34;
  font-size: 1.01rem;
  line-height: 1.8;
}

.entry p:last-child {
  margin-bottom: 0;
}


.entry-closing {
  margin-top: clamp(28px, 4vw, 46px);
  padding: clamp(20px, 2.8vw, 28px);
  background: rgba(247, 235, 173, 0.32);
  border: 1.5px dashed rgba(57, 54, 47, 0.28);
  border-radius: 4px 8px 5px 7px / 6px 5px 9px 4px;
}

.entry-closing .entry-head {
  margin-bottom: 12px;
}

.notes-page .page-nav {
  max-width: 76ch;
}

/* ---------------------------------------------------------------
   Professional profile
   --------------------------------------------------------------- */

.profile-top {
  display: grid;
  grid-template-columns: minmax(0, 0.72fr) minmax(0, 1.28fr);
  gap: clamp(26px, 4vw, 48px);
  align-items: start;
}

.profile-portrait {
  width: 100%;
  margin: 0;
}

.profile-portrait img {
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center;
}

.profile-bio {
  min-width: 0;
}

.profile-heading,
.profile-block h2 {
  margin: 0 0 14px;
  font-family: var(--display);
  font-size: clamp(1.9rem, 3vw, 2.45rem);
  font-weight: 700;
  letter-spacing: -0.006em;
  line-height: 1;
}

.profile-bio p {
  max-width: 66ch;
  margin: 0 0 1.05em;
  color: #3f3b34;
  font-size: 1.01rem;
  line-height: 1.8;
}

.profile-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 22px;
  margin: 22px 0 0;
}

.profile-block {
  margin-top: clamp(30px, 4vw, 44px);
  padding-top: clamp(22px, 3vw, 30px);
  border-top: 1.5px dashed rgba(57, 54, 47, 0.28);
  scroll-margin-top: 26px;
}

.profile-block-head {
  margin-bottom: 16px;
}

.profile-block-head .kicker {
  margin-bottom: 9px;
}

.profile-block-head h2 {
  margin-bottom: 0;
}

.profile-block > p {
  max-width: 68ch;
  color: #3f3b34;
  font-size: 1.01rem;
  line-height: 1.8;
}

.skill-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 30px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.skill-list li {
  position: relative;
  padding: 9px 0 11px 18px;
  border-bottom: 1px dotted rgba(57, 54, 47, 0.22);
  color: #3f3b34;
  font-size: 0.98rem;
  line-height: 1.65;
}

.skill-list li::before {
  content: "";
  position: absolute;
  top: 1.3em;
  left: 0;
  width: 8px;
  height: 1.6px;
  background: var(--red);
}

.skill-group {
  display: block;
  margin-bottom: 2px;
  color: var(--ink);
  font-family: var(--display);
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.2;
}

.interest-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.interest-list li {
  padding: 5px 14px 7px;
  background: rgba(247, 235, 173, 0.32);
  border: 1px solid rgba(57, 54, 47, 0.28);
  border-radius: 10px 5px 11px 6px / 6px 10px 5px 9px;
  font-family: var(--display);
  font-size: 1.16rem;
  font-weight: 600;
  line-height: 1.2;
}

.cv-preview {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(16px, 2.6vw, 30px);
  max-width: 790px;
  margin: 20px 0 0;
}

.cv-preview .photo {
  width: 100%;
}

.cv-preview img {
  background: #fff;
}

.cv-download {
  margin: 22px 0 0;
}

.contact-list {
  max-width: 640px;
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
}

.contact-list li {
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr);
  gap: 6px 16px;
  align-items: baseline;
  padding: 11px 0;
  border-bottom: 1px dashed rgba(57, 54, 47, 0.24);
}

.contact-label {
  color: var(--red);
  font-family: var(--hand);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  line-height: 1.5;
  text-transform: uppercase;
}

.contact-list a {
  justify-self: start;
  padding-bottom: 1px;
  border-bottom: 1px solid rgba(57, 54, 47, 0.3);
  overflow-wrap: anywhere;
  text-decoration: none;
  transition: color 0.18s ease, border-color 0.18s ease;
}

.contact-list a:hover,
.contact-list a:focus-visible {
  color: var(--red);
  border-color: var(--red);
}

/* ---------------------------------------------------------------
   Photographs pinned into the notes
   --------------------------------------------------------------- */

.entry::after {
  content: "";
  display: table;
  clear: both;
}

.photo {
  position: relative;
  z-index: 1;
  margin: 0;
  padding: 9px;
  background: #fffefb;
  border: 1px solid rgba(57, 54, 47, 0.2);
  box-shadow: 0 16px 26px -18px rgba(57, 54, 47, 0.55), 0 3px 6px rgba(57, 54, 47, 0.08);
  transform: rotate(var(--tilt, 0deg));
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.photo img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid rgba(57, 54, 47, 0.14);
  background: #ded8cb;
}

.photo-button {
  position: relative;
  display: block;
  color: inherit;
  text-decoration: none;
  cursor: zoom-in;
  -webkit-tap-highlight-color: transparent;
}

.photo-button:focus-visible {
  outline: 3px dashed var(--red);
  outline-offset: 4px;
}

.photo-button::after {
  content: "Open";
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 2px 8px 3px;
  background: rgba(255, 253, 246, 0.95);
  border: 1px solid rgba(57, 54, 47, 0.35);
  border-radius: 8px 5px 9px 6px / 6px 10px 5px 8px;
  color: var(--ink-soft);
  font-family: var(--hand);
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.4;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(3px) rotate(-1deg);
  transition: opacity 0.18s ease, transform 0.18s ease;
  pointer-events: none;
}

.photo-button:hover::after,
.photo-button:focus-visible::after {
  opacity: 1;
  transform: translateY(0) rotate(-1deg);
}

.photo:hover,
.photo:focus-within {
  z-index: 4;
  transform: rotate(0deg) translateY(-3px);
  box-shadow: 0 22px 34px -18px rgba(57, 54, 47, 0.55), 0 4px 8px rgba(57, 54, 47, 0.1);
}

.photo--tilt-l { --tilt: -1.6deg; }
.photo--tilt-r { --tilt: 2.1deg; }
.photo--tilt-l-2 { --tilt: -2.5deg; }
.photo--tilt-r-2 { --tilt: 1.2deg; }

.photo--panel {
  width: 92%;
  margin: 34px 0 32px auto;
}

.photo--message {
  width: min(62%, 380px);
  margin: 30px 0 32px;
}

.photo-float {
  float: right;
  width: min(42%, 260px);
  margin: 14px 0 22px 28px;
}

.photo-cluster {
  clear: both;
  margin: 30px 0 32px;
}

.photo-cluster--pair {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(0, 0.96fr);
  align-items: start;
  gap: 20px;
}

.photo-cluster--pair .photo {
  width: 100%;
}

.photo-cluster--stack {
  display: grid;
  gap: 32px;
}

.photo-cluster--stack .photo {
  width: 94%;
}

.photo-cluster--stack .photo:nth-child(even) {
  justify-self: end;
  width: 88%;
}

.photo--polaroid {
  padding-bottom: 4px;
}

.photo-caption {
  margin: 7px 5px 5px;
  color: #6c655a;
  font-family: var(--display);
  font-size: 1.12rem;
  font-weight: 500;
  line-height: 1.1;
  transform: rotate(-1deg);
}

/* washi tape on two corners */
.photo--tape::before,
.photo--tape::after {
  content: "";
  position: absolute;
  z-index: 3;
  width: 74px;
  height: 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0) 55%), rgba(224, 208, 171, 0.8);
  box-shadow: 0 1px 2px rgba(57, 54, 47, 0.12);
  clip-path: polygon(1% 8%, 99% 0, 100% 92%, 0 100%);
  pointer-events: none;
}

.photo--tape::before {
  top: -12px;
  left: -20px;
  transform: rotate(-36deg);
}

.photo--tape::after {
  right: -21px;
  bottom: -10px;
  transform: rotate(-32deg);
}

/* a red pushpin */
.photo--pin::before {
  content: "";
  position: absolute;
  top: -10px;
  left: 50%;
  z-index: 5;
  width: 19px;
  height: 19px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(circle at 33% 28%, #f4a094 0%, #d95749 38%, #a52b21 72%, #6f1a14 100%);
  box-shadow: 0 6px 8px -3px rgba(57, 54, 47, 0.55), inset -2px -2px 4px rgba(70, 16, 12, 0.35);
}

.photo--pin::after {
  content: "";
  position: absolute;
  top: 7px;
  left: 50%;
  z-index: 4;
  width: 3px;
  height: 9px;
  transform: translateX(-50%) rotate(18deg);
  background: linear-gradient(#d6d2c8, #8b867c 60%, #5f5b52);
  border-radius: 0 0 2px 2px;
  box-shadow: 0 1px 2px rgba(57, 54, 47, 0.3);
}

/* a black binder clip */
.photo--clip::before {
  content: "";
  position: absolute;
  top: -14px;
  left: 50%;
  z-index: 5;
  width: 42px;
  height: 25px;
  transform: translateX(-50%) rotate(-1.5deg);
  background: linear-gradient(100deg, #6d685e 0%, #44413a 45%, #262520 100%);
  border-radius: 4px 4px 7px 7px;
  clip-path: polygon(7% 0, 93% 0, 100% 100%, 0 100%);
  box-shadow: 0 4px 7px -2px rgba(57, 54, 47, 0.45);
}

.photo--clip::after {
  content: "";
  position: absolute;
  top: -25px;
  left: 50%;
  z-index: 4;
  width: 22px;
  height: 16px;
  transform: translateX(-50%);
  border: 2.5px solid #b9b5ab;
  border-bottom: 0;
  border-radius: 10px 10px 0 0;
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.5);
}

/* ---------------------------------------------------------------
   Photo viewer
   --------------------------------------------------------------- */

html.is-viewing-photo,
html.is-viewing-photo body {
  overflow: hidden;
}

.photo-viewer {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: clamp(12px, 3vw, 32px);
  background: transparent;
  border: 0;
  color: var(--ink);
}

.photo-viewer[open] {
  display: flex;
  align-items: center;
  justify-content: center;
}

.photo-viewer::backdrop {
  background: rgba(33, 31, 27, 0.82);
  backdrop-filter: blur(3px);
}

.photo-viewer__card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: min(100%, 1020px);
  max-height: 100%;
  padding: clamp(18px, 3vw, 28px) clamp(14px, 3.6vw, 38px) clamp(12px, 2vw, 16px);
  background: var(--paper);
  border: 1.5px solid rgba(57, 54, 47, 0.55);
  border-radius: 4px 7px 5px 8px / 7px 4px 8px 5px;
  box-shadow: 0 28px 80px -24px rgba(0, 0, 0, 0.8), 0 1px 0 rgba(255, 255, 255, 0.6) inset;
}

.photo-viewer__card::before {
  content: "";
  position: absolute;
  top: -11px;
  left: 50%;
  width: 96px;
  height: 23px;
  transform: translateX(-50%) rotate(-2.5deg);
  background: linear-gradient(180deg, rgba(232, 222, 194, 0.95), rgba(213, 200, 169, 0.9));
  box-shadow: 0 1px 3px rgba(80, 70, 50, 0.18);
  clip-path: polygon(2% 6%, 98% 0, 100% 88%, 96% 100%, 3% 95%, 0 10%);
  pointer-events: none;
}

.photo-viewer__figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 0;
  width: 100%;
  margin: 0;
}

.photo-viewer__stage {
  width: 100%;
  height: min(68vh, 720px);
  overflow: auto;
  overscroll-behavior: contain;
  background: rgba(57, 54, 47, 0.045);
  box-shadow: inset 0 0 0 1px rgba(57, 54, 47, 0.14);
  scrollbar-width: thin;
  scrollbar-color: rgba(57, 54, 47, 0.35) transparent;
}

.photo-viewer__stage:focus-visible {
  outline: 2px dashed var(--red);
  outline-offset: -3px;
}

.photo-viewer__canvas {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-width: 100%;
  height: 100%;
  min-height: 100%;
}

.photo-viewer__image {
  display: block;
  flex: none;
  max-width: none;
  max-height: none;
  visibility: hidden;
  border: 1px solid rgba(57, 54, 47, 0.18);
  background: #ded8cb;
  box-shadow: 0 12px 28px -22px rgba(40, 35, 25, 0.7);
}

.photo-viewer__image.is-ready {
  visibility: visible;
}

.photo-viewer__caption {
  max-width: 74ch;
  margin: 10px 0 0;
  color: var(--ink-soft);
  font-family: var(--display);
  font-size: clamp(1.05rem, 2vw, 1.32rem);
  line-height: 1.3;
  text-align: center;
}

.photo-viewer__toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 14px;
  width: 100%;
  margin-top: 9px;
  padding-top: 8px;
  border-top: 1px dashed rgba(57, 54, 47, 0.18);
}

.photo-viewer__zoom {
  display: flex;
  align-items: center;
  gap: 5px;
}

.photo-viewer__zoom button {
  display: grid;
  place-items: center;
  min-width: 32px;
  height: 30px;
  padding: 0 7px;
  background: rgba(255, 253, 246, 0.96);
  border: 1px solid rgba(57, 54, 47, 0.4);
  border-radius: 8px 5px 9px 6px / 6px 9px 5px 8px;
  color: var(--ink);
  font-family: var(--hand);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.18s ease, color 0.18s ease, opacity 0.18s ease;
}

.photo-viewer__zoom button:hover,
.photo-viewer__zoom button:focus-visible {
  background: #f5efdd;
  color: var(--red);
}

.photo-viewer__zoom button:disabled {
  color: var(--ink-soft);
  cursor: default;
  opacity: 0.35;
}

.photo-viewer__zoom-level {
  min-width: 3.2em;
  color: var(--ink-soft);
  font-family: var(--hand);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1;
  text-align: center;
}

.photo-viewer__zoom-reset {
  min-width: 40px;
  padding: 0 8px;
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.photo-viewer__count {
  margin: 0;
  color: var(--ink-soft);
  font-family: var(--hand);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  line-height: 1.4;
  text-transform: uppercase;
}

.photo-viewer__close,
.photo-viewer__nav {
  display: grid;
  place-items: center;
  padding: 0;
  background: rgba(255, 253, 246, 0.96);
  border: 1.5px solid rgba(57, 54, 47, 0.45);
  color: var(--ink);
  font-family: var(--hand);
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
}

.photo-viewer__close:hover,
.photo-viewer__close:focus-visible,
.photo-viewer__nav:hover,
.photo-viewer__nav:focus-visible {
  background: #f5efdd;
  color: var(--red);
}

.photo-viewer__close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 3;
  width: 42px;
  height: 42px;
  font-size: 1.5rem;
  border-radius: 50% 46% 52% 48% / 47% 53% 47% 53%;
}

.photo-viewer__nav {
  position: absolute;
  top: 50%;
  z-index: 2;
  width: 44px;
  height: 54px;
  font-size: 1.35rem;
  transform: translateY(-50%);
}

.photo-viewer__nav--prev {
  left: 10px;
  border-radius: 10px 5px 9px 4px / 5px 8px 4px 9px;
}

.photo-viewer__nav--next {
  right: 10px;
  border-radius: 5px 10px 4px 9px / 8px 5px 9px 4px;
}

.photo-viewer.is-single .photo-viewer__nav {
  display: none;
}

@media (max-width: 640px) {
  .photo-viewer {
    padding: 7px;
  }

  .photo-viewer__card {
    max-height: 100%;
    padding: 16px 9px 10px;
  }

  .photo-viewer__stage {
    height: min(54vh, 520px);
  }

  .photo-viewer__toolbar {
    gap: 6px 10px;
    margin-top: 7px;
    padding-top: 7px;
  }

  .photo-viewer__zoom {
    gap: 4px;
  }

  .photo-viewer__zoom button {
    min-width: 30px;
    height: 29px;
    font-size: 0.95rem;
  }

  .photo-viewer__zoom-level {
    min-width: 2.9em;
    font-size: 0.62rem;
  }

  .photo-viewer__zoom-reset {
    min-width: 36px;
    padding: 0 7px;
    font-size: 0.58rem;
  }

  .photo-viewer__close {
    top: 4px;
    right: 4px;
    width: 38px;
    height: 38px;
    font-size: 1.3rem;
  }

  .photo-viewer__nav {
    width: 38px;
    height: 46px;
    font-size: 1.15rem;
  }

  .photo-viewer__nav--prev {
    left: 3px;
  }

  .photo-viewer__nav--next {
    right: 3px;
  }

  .photo-viewer__caption {
    padding: 0 8px;
    font-size: 1.02rem;
  }
}

.blank-sheet {
  display: grid;
  place-items: center;
  min-height: clamp(300px, 46vh, 460px);
  padding: clamp(24px, 3.4vw, 38px);
  background: rgba(255, 255, 255, 0.16);
  border-top: 1.5px dashed rgba(57, 54, 47, 0.3);
  border-bottom: 1.5px dashed rgba(57, 54, 47, 0.3);
}

.blank-note {
  margin: 0;
  color: #746c5e;
  font-family: var(--display);
  font-size: 1.35rem;
  line-height: 1.3;
  text-align: center;
  transform: rotate(-1deg);
}

.blank-note span {
  display: block;
  margin-top: 8px;
  color: #99917f;
  font-family: var(--hand);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  line-height: 1.4;
  text-transform: uppercase;
}

.page-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 24px;
  margin-top: clamp(22px, 3vw, 34px);
  font-family: var(--display);
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  line-height: 1.3;
}

.page-nav a {
  display: inline-block;
  padding-bottom: 2px;
  border-bottom: 1px dashed rgba(57, 54, 47, 0.42);
  text-decoration: none;
  transform-origin: left center;
  transition: transform 0.18s ease, color 0.18s ease;
}

.page-nav a:hover {
  color: var(--red);
  transform: scale(1.05);
}

.page-nav a:last-child {
  transform-origin: right center;
}

/* ---------------------------------------------------------------
   Footer
   --------------------------------------------------------------- */

.site-footer {
  margin-top: clamp(46px, 5.6vw, 70px);
  padding-top: 16px;
  border-top: 1.5px dashed rgba(57, 54, 47, 0.3);
  color: var(--ink-soft);
  font-size: 0.86rem;
  line-height: 1.6;
  text-align: center;
}

.fin {
  margin: 0 0 6px;
  color: #5b554a;
  font-family: var(--display);
  font-size: 1.5rem;
  line-height: 1;
}

.footer-line {
  max-width: 52ch;
  margin: 0 auto 14px;
}

.footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  max-width: 560px;
  margin: 0 auto;
  padding-top: 11px;
  border-top: 1px solid rgba(57, 54, 47, 0.12);
  font-size: 0.84rem;
}

.footer-row a {
  border-bottom: 1px dashed rgba(57, 54, 47, 0.45);
  text-decoration: none;
}

.footer-row a:hover {
  color: var(--red);
  border-color: var(--red);
}

/* ---------------------------------------------------------------
   Responsive
   --------------------------------------------------------------- */

/* With less room, the margin labels give way to numbered markers + key */
@media (max-width: 1120px) {
  .sketch-stage {
    aspect-ratio: auto;
  }

  .sketch-image {
    position: relative;
    top: auto;
    left: auto;
    width: 100%;
  }

  .leaders,
  .callout {
    display: none;
  }

  .marker {
    display: flex;
  }

  .sketch-key {
    display: grid;
  }

  .sketch-card {
    transform: none;
  }
}

@media (max-width: 1100px) {
  .stain-one {
    right: 14px;
    width: 120px;
    height: 112px;
    border-width: 6px;
  }

  .stain-two {
    right: 6px;
    width: 82px;
    height: 76px;
    border-width: 4px;
  }

  .stain-three {
    right: 40px;
    width: 74px;
    height: 64px;
  }
}

@media (max-width: 760px) {
  .coffee-stains {
    display: none;
  }
}

@media (max-width: 900px) {
  .cover {
    grid-template-columns: minmax(0, 1fr);
    gap: 30px;
  }

  .cover h1 {
    font-size: clamp(3rem, 10vw, 4.7rem);
  }

  .hero-aside {
    justify-self: start;
    max-width: 330px;
    margin-left: 4px;
    padding-top: 0;
  }

  .sticky-note {
    transform: rotate(-1.4deg);
  }

  .coffee-ring {
    display: none;
  }
}

@media (max-width: 820px) {
  .page::before {
    display: none;
  }

  .page-inner {
    padding: 0 22px 28px;
  }

  .site-header {
    padding-top: 18px;
    gap: 12px 16px;
  }

  .site-nav {
    order: 3;
    justify-content: flex-start;
    width: 100%;
    margin-left: 0;
    gap: 24px;
    padding-top: 2px;
    font-size: 0.9rem;
  }

  .page-no {
    width: 44px;
    height: 44px;
    margin-left: auto;
    font-size: 0.95rem;
  }

  .brand {
    font-size: 1.3rem;
  }

  .cover {
    padding-top: 32px;
  }

  .cover h1 {
    font-size: clamp(2.9rem, 11.5vw, 4.3rem);
  }

  .section-head h2 {
    font-size: clamp(2.2rem, 9vw, 3rem);
  }

  .sketch-card {
    padding: 10px 10px 14px;
  }

  .tape-left,
  .tape-right {
    display: none;
  }

  .sketch-card figcaption {
    padding: 0 10px;
    font-size: 1.08rem;
  }

  .sketch-key {
    padding: 14px 10px 0;
  }

  .subpage {
    padding-top: 38px;
  }
}

@media (max-width: 720px) {
  .callout {
    font-size: 1.08rem;
  }
}

@media (max-width: 820px) {
  .profile-top {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }

  .profile-portrait {
    width: min(78%, 320px);
  }
}

@media (max-width: 1150px) {
  body {
    --desk-unit: clamp(56px, 7.4vw, 82px);
    padding-top: calc(var(--desk-unit) * 1.6 + 18px);
  }

  body::before,
  body::after {
    top: clamp(10px, 1.8vw, 18px);
  }

  body::before {
    left: clamp(12px, 2.4vw, 28px);
    right: auto;
  }

  body::after {
    right: clamp(12px, 2.4vw, 28px);
    left: auto;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 16.5px;
  }

  .skill-list {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }

  .contact-list li {
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
  }

  .profile-links {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .cv-preview {
    gap: 12px;
  }

  .hero-actions {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }

  .entries {
    max-width: none;
  }

  .entry-head {
    gap: 10px;
  }

  .entry-head h2 {
    font-size: 2rem;
  }

  .entry p {
    font-size: 1rem;
    line-height: 1.75;
  }

  .entry-closing {
    padding: 18px;
  }

  .photo-cluster--pair {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
    margin: 26px 0 30px;
  }

  .photo-cluster--pair .photo {
    width: 94%;
  }

  .photo-cluster--pair .photo:nth-child(even) {
    justify-self: end;
  }

  .photo--panel {
    width: 100%;
    margin: 30px 0;
  }

  .photo--message {
    width: 100%;
    margin: 26px 0 30px;
  }

  .photo-float {
    float: none;
    width: min(78%, 280px);
    margin: 24px auto 28px;
  }

  .photo-cluster--stack .photo,
  .photo-cluster--stack .photo:nth-child(even) {
    width: 100%;
  }

  .photo-caption {
    font-size: 1.02rem;
  }

  .sketch-key {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  .subpage-head h1 {
    font-size: clamp(2.35rem, 11vw, 3.2rem);
  }

  .blank-sheet {
    min-height: 46vh;
  }

  .page-nav {
    justify-content: flex-start;
    font-size: 1.05rem;
  }

  .footer-row {
    flex-direction: column;
    gap: 6px;
  }
}

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

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
