/* J4: the scrapbook journal. Dot-grid pages, tape, stickers, highlighter headings. */

.theme-j4 {
  /* two faces only: one clean sans for headings and text, the marker hand for the little notes */
  --font-body: 'Figtree', system-ui, sans-serif;
  --font-head: var(--font-body);
  --head-w: 700;
  --font-hand: 'Gochi Hand', 'Bradley Hand', cursive;
  --pw: 600px;
  --ph: 800px;
  --inset: 8px;
  --bx: 2px;
  --by: 30px;
  --pad: 54px 52px 52px 56px;
  --fs-body: 17px;
  --fs-hero: 48px;
  --fs-hl: 40px;
  --fs-word: 50px;
}
.theme-j4 .stack {
  --fs-body: 16px;
  --fs-hero: 33px;
  --fs-hl: 32px;
  --fs-word: 38px;
}

.theme-j4 .bg { background: var(--blush); }

.theme-j4 .page {
  font-size: var(--fs-body);
  line-height: 1.66;
  background-image: radial-gradient(rgba(134, 112, 96, 0.2) 1.1px, transparent 1.5px);
  background-size: 22px 22px;
  background-position: 11px 11px;
}

.theme-j4 { --ring-a: #A58E80; --ring-b: #7A6255; --ring-c: #55423A; }
.theme-j4 .book { transform-origin: 75% 50%; }
.theme-j4 .page.left { border-radius: 8px 0 0 8px; }
.theme-j4 .page.right { border-radius: 0 8px 8px 0; }

/* card covers, front and back */
.theme-j4 .board-right {
  position: absolute;
  left: calc(50% + var(--g));
  top: 0;
  width: calc(50% - var(--g));
  height: 100%;
  background: var(--pop);
  border-radius: 4px 14px 14px 4px;
  box-shadow: 0 28px 60px rgba(110, 87, 75, 0.18);
}
.theme-j4 .coverface {
  background-color: var(--pop);
  background-image: radial-gradient(rgba(255, 254, 251, 0.6) 1.2px, transparent 1.6px);
  background-size: 22px 22px;
  background-position: 11px 11px;
}
.theme-j4 .coverface.front { border-radius: 4px 14px 14px 4px; }
.theme-j4 .coverface.back { border-radius: 14px 4px 4px 14px; }
.theme-j4 .coverface.outer { overflow: hidden; }
.theme-j4 .leaf.cover .face.back,
.theme-j4 .leaf.cover.end .face.front { box-shadow: 0 28px 60px rgba(110, 87, 75, 0.16); }
.theme-j4 .end-hint { position: absolute; right: 50px; bottom: 50px; margin: 0; font-size: 22px; line-height: 1; color: var(--cocoa); opacity: 0.8; }

/* tape flags down the right edge, one for each section: standing upright, their labels reading
   downwards, the row centred on the height of the cover */
.theme-j4 .flip .tabs {
  position: absolute;
  left: 100%;
  top: 50%;
  margin-left: -24px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  align-items: flex-start;
  transform: translateY(-50%);
}
.theme-j4 .tabs button {
  border: 0;
  padding: 8px 14px 7px;
  font: 400 18px/1 var(--font-hand);
  color: var(--cocoa);
  background: var(--butter);
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.5s var(--ease);
}
.theme-j4 .flip .tabs button {
  width: 56px;
  /* the first 24px lie under the page; the label sits in the part that shows */
  padding: 16px 11px 16px 23px;
  clip-path: polygon(0 0, 100% 0, calc(100% - 7px) 50%, 100% 100%, 0 100%);
}
.theme-j4 .flip .tabs button span { display: block; writing-mode: vertical-rl; line-height: 22px; }
.theme-j4 .tabs button:nth-child(2) { background: var(--paper); }
.theme-j4 .tabs button:nth-child(3) { background: var(--latte); }
.theme-j4 .tabs button:nth-child(4) { background: var(--pop); }
.theme-j4 .flip .tabs button:hover,
.theme-j4 .flip .tabs button[aria-current] { transform: translateX(9px); }
.theme-j4 .stack .tabs button { box-shadow: 0 2px 8px rgba(110, 87, 75, 0.1); }

/* highlighter headings */
.theme-j4 .hl { font: 400 var(--fs-hl)/1.34 var(--font-hand); margin: 0 0 20px; transform: rotate(-1.6deg); transform-origin: 0 100%; }
.theme-j4 .hl span { padding: 1px 14px 0; background: var(--butter); -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.theme-j4 .hl.rose span { background: var(--rose); }
.theme-j4 .hl.small { font-size: calc(var(--fs-hl) * 0.8); }

/* the cover: a pasted label, a photo sticker, a membership sticker */
.theme-j4 .cover-photo {
  position: absolute;
  left: 50%;
  top: 120px;
  width: 256px;
  height: 256px;
  margin-left: -128px;
  border-radius: 50%;
  border: 8px solid #fff;
  overflow: hidden;
  background: var(--sand);
  box-shadow: 0 8px 20px rgba(110, 87, 75, 0.18);
  transform: rotate(4deg);
}
.theme-j4 .cover-photo img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 12%; transform: scale(1.35); transform-origin: 50% 30%; }
.theme-j4 .sticker-text {
  position: absolute;
  left: 404px;
  top: 70px;
  width: 132px;
  height: 132px;
  margin: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 12px;
  font: 400 18px/1.05 var(--font-hand);
  color: var(--cocoa);
  background: var(--butter);
  transform: rotate(9deg);
  box-shadow: 0 6px 14px rgba(110, 87, 75, 0.12);
}
.theme-j4 .cover-label {
  position: absolute;
  left: 50%;
  top: 430px;
  width: 390px;
  margin-left: -195px;
  padding: 36px 20px 28px;
  text-align: center;
  background-color: var(--paper);
  background-image: radial-gradient(rgba(134, 112, 96, 0.2) 1.1px, transparent 1.5px);
  background-size: 22px 22px;
  transform: rotate(-2deg);
  box-shadow: 0 8px 18px rgba(110, 87, 75, 0.14);
}
.theme-j4 .cover-label .tape { background: color-mix(in srgb, var(--butter) 90%, transparent); transform: rotate(3deg); }
.theme-j4 .cover-label strong { display: block; font: var(--head-w) 36px/1.12 var(--font-head); letter-spacing: -0.01em; }
.theme-j4 .cover-label span { display: block; font: 400 26px/1.2 var(--font-hand); color: var(--ink); margin-top: 8px; }

/* the greeting beside the closed journal */
.theme-j4 .flip .hero {
  position: absolute;
  left: 66px;
  top: 0;
  bottom: 0;
  width: 520px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  will-change: transform;
}
.theme-j4 .hero h1 { margin: 0 0 28px; font: var(--head-w) 108px/0.98 var(--font-head); letter-spacing: -0.035em; }
.theme-j4 .hero .lede { margin: 0 0 32px; font-size: 20px; line-height: 1.6; max-width: 24em; }

/* first page inside */
.theme-j4 .p-photo { display: flex; align-items: center; justify-content: center; }
.theme-j4 .ph1 { --w: 390px; --ar: 1 / 1; --pos: 50% 4%; --z: 1.28; --zo: 50% 16%; transform: rotate(-3deg); }
.theme-j4 .ph1 figcaption { font-size: 32px; padding: 12px 0 6px; }
.theme-j4 .turn-hint { right: 54px; bottom: 54px; font-size: 22px; color: var(--mocha); }

/* about */
.theme-j4 .bits { display: flex; align-items: flex-start; gap: 34px; margin-top: 38px; }
.theme-j4 .scrap { padding: 14px 24px 12px; background: var(--butter); transform: rotate(-3deg); box-shadow: 0 6px 14px rgba(110, 87, 75, 0.1); line-height: 1.15; margin-top: 26px; }
.theme-j4 .scrap del { display: block; font-size: 17px; color: var(--mocha); text-decoration-color: var(--ink); text-decoration-thickness: 2px; }
.theme-j4 .scrap ins { display: block; font-family: var(--font-hand); font-size: 36px; color: var(--ink); text-decoration: none; }
.theme-j4 .ph2 { --w: 226px; --ar: 4 / 3; --pos: 50% 100%; --z: 1.5; --zo: 50% 86%; padding: 10px 10px 4px; transform: rotate(3deg); flex: none; }
.theme-j4 .ph2 .tape { width: 84px; margin-left: -42px; height: 26px; background: color-mix(in srgb, var(--butter) 85%, transparent); }
.theme-j4 .ph2 figcaption { font-size: 22px; padding: 8px 0 6px; }

/* approach */
.theme-j4 .stickies { display: flex; gap: 26px; margin-top: 24px; }
.theme-j4 .sticky { flex: 1; padding: 16px 16px 20px; font: 400 21px/1.12 var(--font-hand); color: var(--cocoa); background: var(--butter); transform: rotate(-2.5deg); box-shadow: 0 8px 16px rgba(110, 87, 75, 0.12); }
.theme-j4 .sticky + .sticky { background: var(--rose); transform: rotate(2deg); margin-top: 8px; }

/* the lamp */
.theme-j4 .p-lamp { display: flex; align-items: center; justify-content: center; }
.theme-j4 .pasted { position: relative; padding: 20px 30px 26px; background: var(--rose); transform: rotate(-1.5deg); box-shadow: 0 10px 24px rgba(110, 87, 75, 0.12); }
.theme-j4 .pasted > .tape { background: color-mix(in srgb, var(--butter) 88%, transparent); transform: rotate(3deg); }
.theme-j4 .p-lamp .lampwrap { --lamp-w: 340px; max-width: none; margin-right: 76px; }
.theme-j4 .lamp-hint { font-size: 28px; text-align: center; margin-top: 12px; color: var(--ink); }
.theme-j4 .p-magic { display: flex; flex-direction: column; justify-content: center; }
.theme-j4 .p-magic h2 { font-family: var(--font-head); font-size: var(--fs-hero); line-height: 1.1; letter-spacing: -0.025em; margin-bottom: 22px; }
.theme-j4 .words .its { display: block; font-family: var(--font-head); font-size: 28px; }
.theme-j4 .words .word {
  display: block;
  width: fit-content;
  margin-top: 16px;
  padding: 6px 24px 2px;
  font: 400 var(--fs-word)/1.2 var(--font-hand);
  color: var(--cocoa);
  background: var(--butter);
  box-shadow: 0 5px 12px rgba(110, 87, 75, 0.1);
  transform: rotate(-2deg);
}
.theme-j4 .words .word:nth-of-type(3) { margin-left: 46px; transform: rotate(1.5deg); }
.theme-j4 .words .word.keep { margin-left: 12px; background: var(--pop); transform: rotate(-1deg); }
.theme-j4 .words .ring { display: none; }
.theme-j4 .words .strike { left: 4%; width: 92%; }

/* headings carry their weight now that they share the text face */
.theme-j4 .page h1, .theme-j4 .page h2, .theme-j4 .page h3,
.theme-j4 .words .its, .theme-j4 .creds strong, .theme-j4 .sub { font-weight: var(--head-w); }

/* credentials and experience */
.theme-j4 .creds strong { font-family: var(--font-head); font-size: 20px; line-height: 1.3; }
.theme-j4 .creds span { color: var(--mocha); font-size: 16px; }
.theme-j4 .creds .note { font: 400 20px/1.05 var(--font-hand); color: var(--ink); margin-top: 5px; }
.theme-j4 .sub { font-family: var(--font-head); font-size: 20px; margin: 24px 0 8px; }
.theme-j4 .training li { position: relative; padding-left: 20px; }
.theme-j4 .training li::before { content: ""; position: absolute; left: 2px; top: 0.72em; width: 8px; height: 8px; border-radius: 50%; background: var(--pop); }
.theme-j4 .xp { margin-bottom: 24px; }
.theme-j4 .xp h3 { font-family: var(--font-head); font-size: 23px; line-height: 1.25; }
.theme-j4 .xp .svc { font-weight: 700; font-size: 15px; color: var(--mocha); margin: 0; }
.theme-j4 .xp .dates { font: 400 22px/1.1 var(--font-hand); color: var(--ink); margin: 4px 0 6px; }

/* interests and contact */
.theme-j4 .p-interests { display: flex; align-items: center; }
.theme-j4 .p-interests .pasted { background: var(--paper); padding: 40px 34px 34px; transform: rotate(1.2deg); font-size: 1.06em; }
.theme-j4 .p-interests .pasted > .tape { background: color-mix(in srgb, var(--pop) 72%, transparent); transform: rotate(-3deg); }
.theme-j4 .mail-strip {
  display: inline-block;
  width: fit-content;
  padding: 10px 26px 6px;
  font: 400 34px/1.2 var(--font-hand);
  color: var(--cocoa);
  background: var(--pop);
  text-decoration: none;
  transform: rotate(-2deg);
  box-shadow: 0 6px 14px rgba(110, 87, 75, 0.12);
}

/* the journal closed at the back: it sits on the left, the contact words stand low on the right */
.theme-j4 .flip .outro {
  position: absolute;
  left: 771px;
  top: 0;
  bottom: 0;
  width: 370px;
  padding-bottom: 90px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
}
.theme-j4 .outro h2 { margin: 0 0 26px; font: var(--head-w) 64px/0.98 var(--font-head); letter-spacing: -0.035em; white-space: nowrap; }
.theme-j4 .outro-meta { margin: 35px 0 0; font-size: 18px; line-height: 1.6; color: var(--mocha); }
/* seen from the back the flags are blank */
.theme-j4 .flip .is-shut .tabs button { color: transparent; }
/* on the back cover they sit a hair above its inside face, which puts them under its outside once it has turned */
.theme-j4 .flip .leaf .tabs { transform: translateY(-50%) translateZ(1px); pointer-events: auto; }

/* stacked */
.theme-j4 .stack .page { padding: 34px 24px 46px; }
.theme-j4 .stack .hero { width: 100%; max-width: 560px; padding: 22px 12px 0; display: flex; flex-direction: column; align-items: flex-start; }
.theme-j4 .stack .hero h1 { font-size: 62px; margin-bottom: 20px; }
.theme-j4 .stack .hero .lede { font-size: 18px; margin-bottom: 26px; }
.theme-j4 .stack .coverface.front { position: relative; width: 608px; height: 816px; zoom: 0.5; transform: rotate(-3deg); margin: 50px 0 40px; box-shadow: 0 28px 60px rgba(110, 87, 75, 0.18); }
.theme-j4 .stack .p-photo { padding-top: 50px; }
.theme-j4 .stack .bits { flex-wrap: wrap; gap: 20px; }
.theme-j4 .stack .stickies { gap: 14px; }
.theme-j4 .stack .sticky { font-size: 18px; padding: 12px 12px 16px; }
.theme-j4 .stack .p-lamp { padding: 44px 14px 50px; }
.theme-j4 .stack .pasted { padding: 16px 20px 22px; }
.theme-j4 .stack .p-lamp .lampwrap { --lamp-w: 190px; margin-right: 44px; }
.theme-j4 .stack .p-interests .pasted { padding: 34px 22px 26px; }
.theme-j4 .stack .mail-strip { font-size: 25px; padding: 9px 18px 5px; }
.theme-j4 .stack .outro { width: 100%; max-width: 560px; padding: 40px 12px 20px; scroll-margin-top: 12px; }
.theme-j4 .stack .outro h2 { font-size: 54px; margin-bottom: 24px; }
.theme-j4 .stack .outro-meta { margin-top: 28px; font-size: 16px; }
