/* Underwater paper journal — shared by Projects, Venture and Research.
   Blank white waterproof pages in a dive binder, floating over the reef. */

:root {
  --vh: 1vh;
  --paper: #fdfdfb;
  --ink: #2e3236;
  --ink-soft: #6b7278;
  --blue: #2a6c9b;
  --binder: #15171a;
  --hand: "Gaegu", "Bradley Hand", "Segoe Print", cursive;
  --tab-1: #bfe2dc;
  --tab-2: #f3dba7;
  --tab-3: #f1c3b4;
  --tab-4: #cdd6f2;
}
@supports (height: 1svh) { :root { --vh: 1svh; } }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: clip; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  min-height: 100%;
  background: #0a3a52;
  color: var(--ink);
  font-family: var(--hand);
  font-size: clamp(19px, 1.45vw, 22px);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
a { color: inherit; }
img { max-width: 100%; }

/* ---------- The water behind the journal ---------- */
.sea { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.sea::before {
  content: "";
  position: absolute;
  inset: -50px;
  background: url(reef-2.webp) 50% 40% / cover;
  filter: blur(18px) brightness(.78) saturate(1.15);
}
.sea::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(16, 92, 124, .3), rgba(4, 34, 54, .6));
}
.sea__light {
  position: absolute;
  z-index: 1;
  inset: -720px;
  opacity: .28;
  mix-blend-mode: soft-light;
  background: url(museum/caustics.png) 0 0 / 640px 640px;
  animation: drift 60s linear infinite;
}
.sea i {
  position: absolute;
  z-index: 2;
  bottom: -20px;
  left: var(--x);
  width: var(--s);
  aspect-ratio: 1;
  border: 1.5px solid rgba(255, 255, 255, .7);
  border-radius: 50%;
  background: radial-gradient(circle at 32% 30%, rgba(255, 255, 255, .8) 0 14%, rgba(255, 255, 255, .08) 18%);
  animation: rise var(--d) ease-in var(--delay) infinite;
  opacity: 0;
}
@keyframes rise {
  8%   { opacity: .9; }
  50%  { translate: 10px calc(-55 * var(--vh)); }
  92%  { opacity: .6; }
  100% { opacity: 0; translate: -6px calc(-112 * var(--vh)); }
}
@keyframes drift { to { translate: 640px 640px; } }

/* ---------- Back to the reef ---------- */
.back {
  position: fixed;
  z-index: 10;
  top: max(14px, env(safe-area-inset-top));
  left: max(14px, env(safe-area-inset-left));
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 14px 6px 10px;
  background: var(--paper);
  color: var(--ink);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  rotate: -3deg;
  box-shadow: 0 6px 16px rgba(0, 25, 40, .35);
  transition: rotate .3s cubic-bezier(.34, 1.56, .64, 1), scale .3s cubic-bezier(.34, 1.56, .64, 1);
}
.back:hover { rotate: 0deg; scale: 1.05; }
.back:focus-visible { outline: 2px dashed var(--blue); outline-offset: 3px; }

/* ---------- Binder and pages ---------- */
.journal {
  position: relative;
  width: min(900px, calc(100% - 64px));
  margin: clamp(76px, 11vh, 120px) auto clamp(80px, 12vh, 140px);
}
/* the black nylon binder the pages are clipped into */
.journal::before {
  content: "";
  position: absolute;
  z-index: 0;
  top: -16px;
  bottom: -16px;
  left: -28px;
  width: 132px;
  border-radius: 12px 0 0 12px;
  background:
    repeating-linear-gradient(45deg, rgba(255, 255, 255, .025) 0 2px, rgba(0, 0, 0, 0) 2px 5px),
    repeating-linear-gradient(-45deg, rgba(255, 255, 255, .02) 0 2px, rgba(0, 0, 0, 0) 2px 5px),
    var(--binder);
  box-shadow: 0 30px 60px rgba(0, 15, 25, .5), inset -2px 0 0 rgba(255, 255, 255, .05);
}

.page {
  position: relative;
  z-index: 1;
  padding: clamp(40px, 6vw, 68px) clamp(26px, 5.5vw, 68px) clamp(44px, 6vw, 72px) clamp(62px, 10vw, 116px);
  background: var(--paper);
  border-radius: 2px 6px 6px 2px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .8) inset, 0 18px 40px rgba(0, 22, 36, .35);
  scroll-margin-top: 28px;
}
.page + .page { margin-top: 26px; }

/* punched holes + binder rings */
.page::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: clamp(18px, 3vw, 30px);
  width: 22px;
  background:
    radial-gradient(circle 8px at 50% 50%, #23262a 92%, rgba(0, 0, 0, 0) 100%) 0 54px / 22px 22px no-repeat,
    radial-gradient(circle 8px at 50% 50%, #23262a 92%, rgba(0, 0, 0, 0) 100%) 0 50% / 22px 22px no-repeat,
    radial-gradient(circle 8px at 50% 50%, #23262a 92%, rgba(0, 0, 0, 0) 100%) 0 calc(100% - 54px) / 22px 22px no-repeat;
}
.rings { position: absolute; top: 0; bottom: 0; left: -30px; width: calc(clamp(18px, 3vw, 30px) + 41px); pointer-events: none; }
.rings::before, .rings::after, .rings i {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 9px;
  border-radius: 6px;
  background: linear-gradient(180deg, #f2f4f5, #9aa3a8 55%, #5d666b);
  box-shadow: 0 2px 3px rgba(0, 0, 0, .35);
}
.rings::before { top: 60px; }
.rings i { top: calc(50% - 4px); }
.rings::after { bottom: 60px; }

/* faint underwater light moving across the paper */
.sheen { position: absolute; inset: 0; overflow: hidden; border-radius: inherit; pointer-events: none; }
.sheen i {
  position: absolute;
  inset: -700px;
  background: #5aaed3;
  -webkit-mask: url(museum/caustics.png) 0 0 / 700px 700px;
  mask: url(museum/caustics.png) 0 0 / 700px 700px;
  opacity: .09;
  animation: drift-sheen 70s linear infinite;
}
@keyframes drift-sheen { to { translate: 700px 700px; } }

/* divider tabs sticking out of the right edge */
.tab {
  position: absolute;
  z-index: -1;
  right: -38px;
  top: var(--top);
  width: 40px;
  height: 84px;
  display: grid;
  place-items: center;
  border-radius: 0 9px 9px 0;
  background: var(--c);
  color: var(--ink);
  font-size: 19px;
  font-weight: 700;
  text-decoration: none;
  writing-mode: vertical-rl;
  box-shadow: 4px 6px 14px rgba(0, 22, 36, .28);
  transition: right .3s cubic-bezier(.34, 1.56, .64, 1);
}
.tab:hover, .tab:focus-visible { right: -46px; outline: none; }

/* ---------- Writing on the page ---------- */
.kicker { margin: 0; font-size: 19px; font-weight: 700; color: var(--blue); }
.page h1 {
  margin: 4px 0 0;
  font-size: clamp(64px, 10vw, 112px);
  font-weight: 700;
  line-height: .9;
  letter-spacing: -.01em;
}
.lede { margin: 16px 0 0; max-width: 32ch; font-size: clamp(22px, 2vw, 27px); color: var(--ink-soft); }

/* table of contents with dotted leaders */
.toc { margin: clamp(32px, 5vw, 52px) 0 0; padding: 0; list-style: none; }
.toc li + li { margin-top: 6px; }
.toc a {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 6px 0;
  text-decoration: none;
  font-size: clamp(22px, 2.1vw, 28px);
}
.toc__num { min-width: 1.6em; font-weight: 700; color: var(--blue); }
.toc__name { font-weight: 700; }
.toc__dots { flex: 1; min-width: 20px; border-bottom: 2px dotted rgba(46, 50, 54, .35); translate: 0 -6px; }
.toc__what { color: var(--ink-soft); font-size: .8em; }
.toc a:hover .toc__name { text-decoration: underline wavy var(--blue) 1.5px; text-underline-offset: 5px; }

/* entry header: circled number, title, link */
.entry__head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 22px; }
.num {
  position: relative;
  display: grid;
  place-items: center;
  width: 64px;
  height: 58px;
  flex: none;
  font-size: 28px;
  font-weight: 700;
  color: var(--blue);
}
.num svg { position: absolute; inset: -4px -6px; width: calc(100% + 12px); height: calc(100% + 8px); overflow: visible; }
.num path { fill: none; stroke: var(--blue); stroke-width: 2.4; stroke-linecap: round; stroke-dasharray: 330; stroke-dashoffset: 330; }
.is-seen .num path { animation: draw .8s ease-out .15s forwards; }
.entry__title {
  margin: 0;
  font-size: clamp(46px, 6.4vw, 72px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.01em;
}
.entry__link {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 22px;
  font-weight: 700;
  color: var(--blue);
  text-decoration: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 8' preserveAspectRatio='none'%3E%3Cpath d='M1 5C15 2 25 7 40 4S65 2 80 5S105 6 119 3' fill='none' stroke='%232a6c9b' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") 0 100% / 100% 7px no-repeat;
  padding-bottom: 6px;
  transition: translate .25s ease;
}
.entry__link:hover { translate: 0 -2px; }
.entry__link:focus-visible { outline: 2px dashed var(--blue); outline-offset: 4px; }
.entry__link svg { width: 14px; height: 14px; }
.status {
  margin-left: auto;
  padding: 2px 12px 4px;
  border: 2px solid var(--blue);
  border-radius: 999px 860px 999px 900px / 700px 999px 800px 999px;
  color: var(--blue);
  font-size: 19px;
  font-weight: 700;
  rotate: -3deg;
}

/* taped photo */
.snap { position: relative; margin: clamp(26px, 3.5vw, 38px) 0 0; rotate: var(--tilt, -1deg); }
.snap img, .snap a { display: block; }
.snap img {
  width: 100%;
  height: auto;
  border: 9px solid #fff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .06), 0 12px 26px rgba(0, 28, 44, .2);
}
.snap a { transition: translate .3s ease; }
.snap a:hover { translate: 0 -3px; }
.snap a:focus-visible { outline: 2px dashed var(--blue); outline-offset: 4px; }
.snap::before, .snap::after, .polaroid::before {
  content: "";
  position: absolute;
  z-index: 1;
  width: 104px;
  height: 28px;
  background: rgba(238, 228, 190, .78);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .12);
  clip-path: polygon(0 8%, 6% 0, 12% 10%, 20% 2%, 30% 9%, 42% 1%, 55% 8%, 68% 0, 80% 9%, 92% 2%, 100% 10%, 100% 92%, 94% 100%, 86% 90%, 74% 99%, 62% 91%, 50% 100%, 38% 92%, 26% 99%, 14% 90%, 6% 98%, 0 90%);
}
.snap::before { top: -12px; left: -22px; rotate: -32deg; }
.snap::after { top: -12px; right: -22px; rotate: 30deg; }
.snap figcaption {
  margin: 10px 4px 0 auto;
  width: fit-content;
  font-size: 19px;
  color: var(--ink-soft);
  rotate: 1deg;
}

/* body text with a margin column for notes */
.entry__body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 210px;
  gap: 12px 44px;
  margin-top: clamp(22px, 3vw, 34px);
}
.entry__body p { margin: 0 0 14px; }
.entry__body p:last-child { margin-bottom: 0; }
.margin { display: flex; flex-direction: column; gap: 22px; padding-top: 4px; }
.scribble {
  position: relative;
  margin: 0;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--blue);
  rotate: var(--r, 2deg);
}
.scribble kbd { font: inherit; padding: 0 6px; border: 1.5px solid currentColor; border-radius: 6px; }
.doodle { display: block; width: var(--w, 90px); color: var(--ink-soft); }
.doodle path, .doodle circle, .doodle ellipse { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* hand-ticked checklist */
.checks { margin: 4px 0 16px; padding: 0; list-style: none; }
.checks li { position: relative; padding-left: 38px; }
.checks li + li { margin-top: 6px; }
.checks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .3em;
  width: 22px;
  height: 22px;
  border: 2px solid var(--ink);
  border-radius: 3px 5px 2px 6px;
  rotate: -3deg;
}
.checks svg { position: absolute; left: 2px; top: -.05em; width: 30px; height: 30px; overflow: visible; }
.checks path { fill: none; stroke: var(--blue); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 44; stroke-dashoffset: 44; }
.is-seen .checks li:nth-child(1) path { animation: draw .35s ease-out .5s forwards; }
.is-seen .checks li:nth-child(2) path { animation: draw .35s ease-out .8s forwards; }
.is-seen .checks li:nth-child(3) path { animation: draw .35s ease-out 1.1s forwards; }
.is-seen .checks li:nth-child(4) path { animation: draw .35s ease-out 1.4s forwards; }
.is-seen .checks li:nth-child(5) path { animation: draw .35s ease-out 1.7s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }

.goal { margin-top: 4px; }
.goal b { font-weight: 700; color: var(--blue); }

/* small polaroid note */
.polaroid {
  position: relative;
  margin: 6px 0 0;
  padding: 9px 9px 0;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .05), 0 10px 22px rgba(0, 28, 44, .22);
  rotate: var(--tilt, 3deg);
}
.polaroid::before { top: -14px; left: 50%; translate: -50% 0; rotate: -4deg; width: 84px; }
.polaroid img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; object-position: 50% 35%; }
.polaroid figcaption { padding: 6px 2px 9px; text-align: center; font-size: 17px; font-weight: 700; line-height: 1.2; color: var(--ink); }

.signoff { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 20px; margin-top: clamp(30px, 4vw, 44px); color: var(--ink-soft); }
.signoff a { font-weight: 700; color: var(--blue); text-decoration: none; }
.signoff a:hover { text-decoration: underline wavy 1.5px; text-underline-offset: 5px; }

/* long research titles */
.entry__title--long { font-size: clamp(30px, 3.5vw, 44px); line-height: 1.08; flex: 1 1 320px; }
.entry__sub { margin: 10px 0 0; font-size: clamp(19px, 1.6vw, 23px); color: var(--ink-soft); }
.meta { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 12px 0 0; font-size: 18px; font-weight: 700; color: var(--blue); }
.meta span + span::before { content: "\00b7"; margin-right: 18px; color: var(--ink-soft); }

/* a quick spread of snapshots */
.gallery {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  gap: 26px 22px;
  margin: clamp(30px, 4vw, 44px) 0 6px;
}
.gallery .polaroid { width: clamp(150px, 29%, 214px); margin: 0; }
.gallery .polaroid:nth-child(even) { margin-top: 18px; }
.gallery .polaroid img { object-position: var(--focus, 50% 50%); }
.polaroid a { display: block; cursor: zoom-in; }
.polaroid a:focus-visible { outline: 2px dashed var(--blue); outline-offset: 3px; }
.gallery .polaroid { transition: rotate .35s cubic-bezier(.34, 1.56, .64, 1), translate .35s cubic-bezier(.34, 1.56, .64, 1); }
.gallery .polaroid:hover { rotate: 0deg; translate: 0 -4px; }
.snap a[data-zoom] { cursor: zoom-in; }

/* ink stamps for awards */
.stamps {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin: 8px -6px 0;
  padding: 14px 6px;
  overflow: hidden;   /* the stamps start oversized before they thunk down */
}
.stamp {
  --ink: var(--blue);
  display: grid;
  place-content: center;
  width: 142px;
  height: 142px;
  padding: 16px;
  border: 3px solid var(--ink);
  border-radius: 50%;
  box-shadow: inset 0 0 0 4px var(--paper), inset 0 0 0 6px var(--ink);
  color: var(--ink);
  text-align: center;
  line-height: 1.05;
  rotate: var(--r, -6deg);
  opacity: .9;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 -2.2 2.25'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)'/%3E%3C/svg%3E");
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 -2.2 2.25'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)'/%3E%3C/svg%3E");
}
.stamp--rect { width: 172px; height: auto; min-height: 112px; border-radius: 12px; }
.stamp small { display: block; font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.stamp b { display: block; margin: 5px 0; font-size: 23px; font-weight: 700; }
.stamp--red { --ink: #c2493b; }
.stamp--green { --ink: #3b7a5a; }
.stamp--violet { --ink: #6658a6; }
.js .page:not(.is-seen) .stamp { scale: 1.5; opacity: 0; }
.is-seen .stamp { animation: thunk .4s cubic-bezier(.2, .9, .3, 1.2) both; animation-delay: calc(var(--i, 0) * 180ms + 600ms); }
@keyframes thunk { from { scale: 1.5; opacity: 0; } to { scale: 1; opacity: .9; } }

.thanks { margin-top: clamp(24px, 3vw, 34px); padding-top: 18px; border-top: 2px dashed rgba(46, 50, 54, .18); color: var(--ink-soft); }

/* tall snapshots and looping clips */
.polaroid--tall img, .polaroid video { display: block; width: 100%; height: auto; aspect-ratio: 3 / 4; object-fit: cover; background: #e9ece9; }
.gallery .polaroid--tall { width: clamp(130px, 21%, 166px); }
.gallery-label {
  margin: clamp(26px, 3.5vw, 36px) 0 -6px;
  font-size: 21px;
  font-weight: 700;
  color: var(--blue);
  rotate: -1.5deg;
}
.gallery-label + .gallery { margin-top: 14px; }

/* the feature: a clip beside a specimen card */
.feature {
  display: grid;
  grid-template-columns: minmax(170px, 250px) minmax(0, 1fr);
  gap: 30px 40px;
  align-items: start;
  margin-top: clamp(26px, 3.5vw, 38px);
}
.feature .polaroid { margin: 0; }
.feature__text .case { margin-bottom: 40px; }
.feature__text p { margin: 0 0 14px; }
.feature__text p:last-child { margin-bottom: 0; }
.gallery-label__aside { margin-left: 8px; font-size: 18px; color: var(--ink-soft); }
.case {
  position: relative;
  padding: 18px 22px 20px;
  background:
    linear-gradient(#e46a5d, #e46a5d) 0 44px / 100% 2px no-repeat,
    #fffef8;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .05), 0 10px 22px rgba(0, 28, 44, .16);
  rotate: .8deg;
}
.case::before {
  content: "";
  position: absolute;
  top: -14px;
  left: 32px;
  width: 92px;
  height: 26px;
  rotate: -5deg;
  background: rgba(238, 228, 190, .78);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .12);
}
.case__title { margin: 0 0 16px; font-size: 21px; font-weight: 700; letter-spacing: .02em; }
.case dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0; }
.case dt { font-weight: 700; color: var(--ink-soft); font-size: 17px; padding-top: 2px; }
.case dd { margin: 0; }
.case s { text-decoration-color: #c2493b; text-decoration-thickness: 2.5px; color: var(--ink-soft); }
.case i { font-weight: 700; color: var(--blue); }
.case .stamp {
  position: absolute;
  right: -14px;
  bottom: -26px;
  width: auto;
  height: auto;
  min-height: 0;
  padding: 8px 16px;
  border-radius: 8px;
}
.case .stamp b { margin: 0; font-size: 24px; letter-spacing: .08em; }
/* this one hangs off the card's edge, so it drops in rather than scaling down */
.js .page:not(.is-seen) .case .stamp { scale: 1; opacity: 0; translate: 0 -14px; }
.is-seen .case .stamp { animation: drop-stamp .35s cubic-bezier(.2, .9, .3, 1.3) .9s both; }
@keyframes drop-stamp { from { opacity: 0; translate: 0 -14px; } to { opacity: .9; translate: 0 0; } }

/* skills unlocked */
.skills { display: flex; flex-wrap: wrap; gap: 10px 12px; margin: 10px 0 0; padding: 0; list-style: none; }
.skills li {
  padding: 3px 14px 5px;
  border: 2px solid var(--blue);
  border-radius: 999px 880px 999px 920px / 760px 999px 820px 999px;
  color: var(--blue);
  font-size: 19px;
  font-weight: 700;
  rotate: var(--r, 0deg);
}
.skills li::before { content: "\2726"; margin-right: 6px; font-size: .8em; }

/* tap a photo to see it big */
.zoom {
  width: min(1100px, 94vw);
  max-width: none;
  max-height: none;
  padding: 0;
  border: 0;
  background: transparent;
  overflow: visible;
}
.zoom::backdrop { background: rgba(3, 26, 40, .86); }
.zoom[open] { animation: zoom-in .35s cubic-bezier(.2, .8, .2, 1); }
@keyframes zoom-in { from { opacity: 0; scale: .96; } }
.zoom figure { margin: 0; padding: 12px 12px 0; background: #fff; box-shadow: 0 30px 80px rgba(0, 0, 0, .5); }
.zoom img { display: block; width: 100%; max-height: calc(78 * var(--vh)); object-fit: contain; background: #f4f4f1; }
.zoom figcaption { padding: 10px 4px 14px; text-align: center; font-size: 21px; font-weight: 700; color: var(--ink); }
.zoom button {
  position: absolute;
  top: -46px;
  right: 0;
  padding: 2px 10px 4px;
  border: 0;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: 19px;
  font-weight: 700;
  cursor: pointer;
  rotate: 2deg;
}

/* the dive slate's pencil, resting on the cover */
.pencil {
  position: absolute;
  z-index: 3;
  top: -26px;
  right: clamp(-10px, 2vw, 40px);
  width: clamp(150px, 20vw, 220px);
  rotate: 24deg;
  filter: drop-shadow(0 8px 8px rgba(0, 22, 36, .3));
  pointer-events: none;
}

/* pages settle in as you reach them */
.page { transition: translate .7s cubic-bezier(.2, .8, .2, 1), opacity .7s ease; }
.js .page:not(.is-seen) { translate: 0 26px; opacity: 0; }

/* ---------- Small screens ---------- */
@media (max-width: 720px) {
  .journal { width: calc(100% - 28px); margin-left: auto; margin-right: 6px; }
  .journal::before { left: -14px; width: 70px; }
  .rings { left: -14px; }
  .tab { display: none; }
  .entry__body { grid-template-columns: 1fr; }
  .margin { flex-direction: row; flex-wrap: wrap; align-items: flex-start; gap: 18px 26px; }
  .polaroid { width: min(240px, 80%); }
  .entry__link, .status { margin-left: 0; }
  .pencil { top: -34px; right: -6px; width: 130px; }
  .page { padding-left: 50px; padding-right: 22px; }
  .page::before { left: 14px; }
  .rings { width: 55px; }
  .toc a { flex-wrap: wrap; gap: 0 12px; padding: 8px 0; }
  .toc__dots { display: none; }
  .toc__what { flex-basis: 100%; padding-left: calc(1.6em + 12px); font-size: .76em; }
  .gallery { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; scroll-snap-type: x mandatory; margin-left: -50px; margin-right: -22px; padding: 16px 22px 18px 50px; scrollbar-width: none; }
  .gallery::-webkit-scrollbar { display: none; }
  .gallery .polaroid { flex: none; width: 62%; scroll-snap-align: center; }
  .stamps { gap: 14px 12px; }
  .feature { grid-template-columns: 1fr; }
  .feature .polaroid { width: min(240px, 72%); margin: 0 auto; }
  .gallery .polaroid--tall { width: 46%; }
  .snap::before { left: -8px; }
  .snap::after { right: -8px; }
  .stamp, .stamp--rect { width: calc(50% - 6px); height: auto; min-height: 108px; padding: 12px 8px; border-radius: 12px; }
  .stamp small { font-size: 11px; letter-spacing: .06em; }
  .stamp b { font-size: 19px; }
}

@media (prefers-reduced-motion: reduce) {
  .sea__light, .sea i, .sheen i { animation: none; }
  .page { transition: none; }
  .js .page:not(.is-seen) { translate: none; opacity: 1; }
  .num path, .checks path { stroke-dashoffset: 0; animation: none !important; }
  .is-seen .stamp, .js .page:not(.is-seen) .stamp, .is-seen .case .stamp, .js .page:not(.is-seen) .case .stamp { animation: none; scale: 1; opacity: .9; translate: none; }
}

/* ---------- Minimal variant (Venture): HEYTEA-like sans on the paper, no doodles ---------- */
.journal--minimal { --sans: "Figtree", "Avenir Next", "Helvetica Neue", system-ui, sans-serif; }
.journal--minimal .page {
  font-family: var(--sans);
  font-weight: 300;
  font-size: clamp(16px, 1.15vw, 18px);
  line-height: 1.7;
  letter-spacing: .01em;
}
.journal--minimal .kicker { font-size: 12.5px; font-weight: 400; letter-spacing: .24em; color: var(--ink-soft); }
.journal--minimal .page h1 { font-weight: 300; font-size: clamp(54px, 8vw, 92px); letter-spacing: .03em; line-height: 1; }
.journal--minimal .lede { max-width: 38ch; font-size: clamp(17px, 1.4vw, 20px); color: var(--ink-soft); }
.journal--minimal .toc a { gap: 16px; font-size: clamp(16px, 1.4vw, 19px); }
.journal--minimal .toc__num { font-weight: 400; letter-spacing: .1em; color: var(--ink-soft); }
.journal--minimal .toc__name { font-weight: 400; }
.journal--minimal .toc__dots { border-bottom: 1px solid rgba(46, 50, 54, .14); translate: 0 -5px; }
.journal--minimal .toc__what { font-size: .82em; }
.journal--minimal .toc a:hover .toc__name { text-decoration: underline 1px; text-underline-offset: 5px; }
.journal--minimal .tab { font-family: var(--sans); font-size: 13px; font-weight: 500; letter-spacing: .1em; }
.journal--minimal .signoff { font-size: 14px; letter-spacing: .04em; }
.journal--minimal .signoff a { font-weight: 400; color: var(--ink); }
.journal--minimal .signoff a:hover { text-decoration: underline 1px; text-underline-offset: 4px; }

.mhead { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 18px; }
.mhead__num { font-size: 13px; font-weight: 400; letter-spacing: .18em; color: var(--ink-soft); }
.mhead h2 { margin: 0; font-size: clamp(36px, 4.8vw, 58px); font-weight: 300; line-height: 1.05; letter-spacing: .02em; }
.journal--minimal .meta { margin: 12px 0 0; font-size: 13px; font-weight: 400; letter-spacing: .12em; color: var(--ink-soft); }
.journal--minimal .meta span + span::before { margin-right: 14px; }

.lead { max-width: 40ch; margin: clamp(24px, 3vw, 34px) 0 0; font-size: clamp(18px, 1.55vw, 22px); line-height: 1.55; }

.plate { margin: clamp(26px, 3.5vw, 36px) 0 0; }
.plate img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 6px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .05), 0 12px 28px rgba(0, 28, 44, .14);
}
.plate--logo { width: min(320px, 70%); }
.plate figcaption { margin-top: 10px; font-size: 13px; letter-spacing: .08em; color: var(--ink-soft); }

.figures {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 22px 28px;
  margin: clamp(28px, 3.5vw, 40px) 0 0;
  padding: 22px 0;
  border-top: 1px solid rgba(46, 50, 54, .12);
  border-bottom: 1px solid rgba(46, 50, 54, .12);
}
.figures b { display: block; font-size: clamp(32px, 3.4vw, 46px); font-weight: 300; line-height: 1; letter-spacing: .01em; }
.figures span { display: block; margin-top: 8px; font-size: 13px; line-height: 1.45; letter-spacing: .04em; color: var(--ink-soft); }

.say { max-width: 52ch; margin: clamp(22px, 2.8vw, 30px) 0 0; }

.firms { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 0; padding: 0; list-style: none; }
.firms li { padding: 3px 14px 4px; border: 1px solid rgba(46, 50, 54, .22); border-radius: 999px; font-size: 14px; font-weight: 400; }
.firms-label { margin: clamp(26px, 3.2vw, 34px) 0 0; font-size: 13px; letter-spacing: .08em; color: var(--ink-soft); }

.mlink {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 26px;
  padding-bottom: 2px;
  border-bottom: 1px solid rgba(46, 50, 54, .35);
  color: var(--ink);
  font-size: 14px;
  font-weight: 400;
  letter-spacing: .06em;
  text-decoration: none;
}
.mlink:hover, .mlink:focus-visible { border-color: var(--ink); outline: none; }
.mlink svg { width: 12px; height: 12px; }

@media (max-width: 720px) {
  .plate--logo { width: 78%; }
  .figures { grid-template-columns: 1fr 1fr; }
}
