/* malobikapal.com: the shared look of the inner pages (every project page, its sheets, About). Each project's first
   screen has its own projects/<name>/opener.css, loaded after this file.
   Dark ground, her red, a serif for display that sits with her wordmark. Phone first. */
:root {
  --bg: #0c0b0a; --panel: #14110f; --ink: #efe6d6; --soft: #d8cfbf; --muted: #a39a8a; --line: #2a2622;
  --red: #cf2a2c; --khaki: #b59a5b; --paper: #0d1018; --ease: cubic-bezier(.16, 1, .3, 1);
  --display: 'Playfair Display', Georgia, serif; --text: 'Spectral', Georgia, serif; --label: 'Jost', system-ui, sans-serif;
  --gut: clamp(20px, 5vw, 48px);
  --vh: calc(100dvh / var(--zoom, 1));   /* the window's height. Write this, never 100vh: zoom (below) would double 100vh */
}
* { box-sizing: border-box; }
html { background: var(--bg); color: var(--ink); -webkit-font-smoothing: antialiased; scrollbar-width: thin; scrollbar-color: #3a342d var(--bg); scroll-behavior: smooth; }
body { margin: 0; font: 400 19px/1.6 var(--text); color: var(--soft); }
::selection { background: var(--red); color: #fff; }
h1, h2, h3, h4, p, ul, ol, figure { margin: 0; padding: 0; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: underline; text-decoration-color: var(--red); text-decoration-thickness: 1.5px; text-underline-offset: 5px; }
a:hover { color: #fff; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
[hidden] { display: none !important; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.wrap { width: min(1080px, 100% - 2 * var(--gut)); margin-inline: auto; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 20; padding: 10px 14px; background: var(--ink); color: #111; text-decoration: none; } .skip:focus { top: 12px; } .skip:hover { color: #111; }

/* the small menu */
.nav { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 68px; }
.nav-name { font: 800 24px/1 var(--display); letter-spacing: -.012em; color: var(--ink); text-decoration: none; padding: 10px 0; }
.nav-name b { color: var(--red); font-weight: inherit; }
.nav-links { display: flex; gap: 26px; list-style: none; }
.nav-links a { display: inline-block; padding: 14px 0; font: 500 12px/1 var(--label); letter-spacing: .2em; text-transform: uppercase; color: var(--muted); text-decoration: none; }
.nav-links a:hover, .nav-links a[aria-current] { color: var(--ink); }
.nav-links a[aria-current] { box-shadow: 0 2px 0 -0.5px var(--red); }

/* her writing */
.prose { display: grid; gap: 22px; max-width: 64ch; }
.prose h2 { margin-top: 26px; font: 700 clamp(30px, 6vw, 44px)/1.08 var(--display); letter-spacing: -.014em; color: var(--ink); }
.prose h3 { margin-top: 14px; font: 700 clamp(23px, 4.6vw, 30px)/1.15 var(--display); letter-spacing: -.01em; color: var(--ink); }
.prose h4 { margin-top: 6px; font: 500 13px/1.3 var(--label); letter-spacing: .18em; text-transform: uppercase; color: var(--ink); }
.prose .lead { font: 500 clamp(21px, 2.6vw, 29px)/1.34 var(--display); letter-spacing: -.008em; color: var(--ink); }
.prose ol { padding-left: 1.3em; display: grid; gap: 8px; }
.prose ol li::marker { color: var(--red); font-family: var(--label); font-size: .82em; }
.block { padding: clamp(34px, 7vw, 64px) 0; }
.block + .block { border-top: 1px solid var(--line); }
.cols { display: grid; gap: clamp(22px, 5vw, 56px); align-items: center; }
@media (min-width: 880px) { .cols { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .cols.is-wide-text { grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); } }
.shot img { width: 100%; background: var(--panel); }
.shot + .prose, .prose + .shot, .cols + .prose, .prose + .cols, .shot + .shot, .cols + .cols, .shot + .cols, .cols + .shot { margin-top: clamp(26px, 5vw, 44px); }

/* a page title */
.title { padding: clamp(28px, 7vw, 70px) 0 clamp(20px, 4vw, 36px); display: grid; gap: 14px; }
.title h1, .sheet .title h2 { font: 800 clamp(44px, 11vw, 92px)/.98 var(--display); letter-spacing: -.022em; color: var(--ink); }
.title .sub { font: italic 400 clamp(20px, 4.4vw, 26px)/1.3 var(--text); color: var(--soft); max-width: 34ch; }
.meta { font: 500 12px/1.7 var(--label); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); max-width: 52ch; }
.status { display: inline-flex; align-items: center; gap: 10px; font: 500 12px/1.4 var(--label); letter-spacing: .16em; text-transform: uppercase; color: var(--ink); }
.status::before { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--dot, var(--red)); flex: none; }
.crumb { display: inline-block; padding: 8px 0; font: 500 12px/1 var(--label); letter-spacing: .18em; text-transform: uppercase; color: var(--muted); text-decoration: none; }
.crumb:hover { color: var(--ink); }

/* ---- a project's first screen: the frame every project shares (its artifact is styled in its own opener.css) ---- */
.point { position: relative; background: var(--paper); overflow: hidden; }
.point-in { display: grid; justify-items: center; gap: 6px; padding: 18px 0 clamp(34px, 7vw, 56px); text-align: center; }
.point .sub { font: italic 400 clamp(21px, 5vw, 27px)/1.3 var(--text); color: var(--ink); }
.point .meta { margin-top: 8px; }
.keys { margin-top: 22px; list-style: none; display: grid; gap: 4px; justify-items: start; text-align: left; }
.keys a { display: flex; align-items: center; gap: 14px; min-height: 48px; padding: 4px 6px; font: 700 clamp(21px, 5vw, 26px)/1.1 var(--display); color: var(--ink); text-decoration: none; letter-spacing: -.008em; }
.keys a::before { content: ''; width: 18px; height: 18px; flex: none; background: var(--dot); }
.keys a span { font: 400 16px/1.2 var(--text); color: var(--muted); letter-spacing: 0; }
.keys a:hover span { color: var(--ink); }
.point-hint { margin-top: 16px; font: italic 400 16px/1.3 var(--text); color: var(--muted); }

.gallery { display: grid; gap: clamp(14px, 3vw, 24px); margin-top: clamp(26px, 5vw, 44px); }
@media (min-width: 700px) { .gallery { grid-template-columns: 1fr 1fr; align-items: start; } }

/* the three parts, as doors */
.parts { display: grid; gap: 22px; }
@media (min-width: 880px) { .parts { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); } }
.part { display: grid; gap: 12px; align-content: start; text-decoration: none; color: var(--soft); }
.part img { width: 100%; aspect-ratio: 4 / 1; object-fit: cover; }
.part h3 { font: 700 27px/1.1 var(--display); color: var(--ink); letter-spacing: -.01em; }
.part p { font-size: 17px; line-height: 1.5; }
.part .go { font: 500 12px/1 var(--label); letter-spacing: .18em; text-transform: uppercase; color: var(--ink); text-decoration: underline; text-decoration-color: var(--red); text-underline-offset: 6px; }
.part:hover h3 { color: #fff; }

/* ---- a sheet: one part of a project, opened over its page. It comes in from the left while the page falls back
   behind it; the cross at its top (or Escape, or Back) closes it and the page comes forward again. ---- */
html { scrollbar-gutter: stable; }
html.has-sheet { overflow: hidden; }
main { transform-origin: 50% var(--pivot, 50vh); }
main, .nav, .foot { transition: transform .6s var(--ease), opacity .5s, filter .5s; }
.has-sheet main { transform: scale(.93); opacity: .9; }
.has-sheet .nav, .has-sheet .foot { opacity: .6; }
dialog.sheet { position: fixed; inset: 0 auto 0 0; width: min(100%, 1120px); max-width: none; height: var(--vh); max-height: none; margin: 0; padding: 0; border: 0; border-right: 1px solid var(--line);
  background: #0c0b0aa6; -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px); color: var(--soft); overflow-y: auto;   /* see-through: the page it came from stays in sight under it */
  overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #3a342d var(--bg);
  box-shadow: 2px 0 2px -1px #000, 14px 0 16px -10px #000c, 40px 0 60px -30px #000; }
dialog.sheet[open] { animation: sheet-in .6s var(--ease); }
dialog.sheet.is-closing { animation: sheet-out .3s cubic-bezier(.5, 0, .9, .4) forwards; }
dialog.sheet::backdrop { background: #06050533; animation: sheet-dim .5s; }
@keyframes sheet-in { from { opacity: 0; transform: translateX(-22%); } }
@keyframes sheet-out { to { opacity: 0; transform: translateX(-16%); } }
@keyframes sheet-dim { from { opacity: 0; } }
.sheet-bar { position: sticky; top: 0; z-index: 3; display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; padding: 0 var(--gut); background: #0c0b0ad1; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.sheet-from { font: 500 12px/1.3 var(--label); letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.sheet-x { position: relative; flex: none; width: 44px; height: 44px; margin-right: -12px; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--ink); cursor: pointer; transition: background-color .25s; }
.sheet-x::before, .sheet-x::after { content: ''; position: absolute; left: 13px; right: 13px; top: 50%; height: 1.6px; margin-top: -.8px; background: currentColor; transform: rotate(45deg); }
.sheet-x::after { transform: rotate(-45deg); }
.sheet-x:hover { background: #ffffff14; }
.sheet-in { padding-bottom: 70px; }
.sheet .title { padding-top: clamp(24px, 5vw, 48px); }

/* ---- the booklet: her pages, on her own site, turned by swipe, button or arrow keys ---- */
.booklet { display: grid; gap: 16px; }
.bk-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.bk-head h2 { font: 700 clamp(28px, 6vw, 40px)/1.1 var(--display); color: var(--ink); letter-spacing: -.012em; }
.bk-count { font: 500 12px/1 var(--label); letter-spacing: .18em; text-transform: uppercase; color: var(--muted); font-variant-numeric: tabular-nums; }
.bk-strip { display: grid; grid-auto-flow: column; grid-auto-columns: 100%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; background: #1b1815;
  box-shadow: 0 0 0 1px #00000080, 0 2px 2px -1px #000, 0 12px 14px -8px #000, 0 30px 40px -22px #000; }
.bk-strip::-webkit-scrollbar { display: none; }
.bk-page { scroll-snap-align: start; display: block; }
.bk-page img { width: 100%; aspect-ratio: 4 / 3; object-fit: contain; background: #fff; }
@media (min-width: 880px) { .bk-strip { grid-auto-columns: 50%; } .bk-page + .bk-page { box-shadow: -1px 0 0 #0000001f; } }
.bk-turn { display: flex; gap: 12px; align-items: center; }
.btn { min-height: 46px; padding: 0 20px; border: 1px solid #4a433a; background: none; color: var(--ink); font: 500 12px/1 var(--label); letter-spacing: .18em; text-transform: uppercase; cursor: pointer; transition: background-color .25s, border-color .25s; }
.btn:hover:not(:disabled) { background: #ffffff10; border-color: var(--ink); }
.btn:disabled { opacity: .35; cursor: default; }
.bk-note { font: italic 400 15px/1.4 var(--text); color: var(--muted); margin-left: auto; }

/* ---- About ---- */
.about .prose p { font-size: 18px; max-width: 58ch; }
.about-open { display: grid; gap: clamp(22px, 5vw, 56px); align-items: center; padding-bottom: clamp(34px, 7vw, 64px); }
@media (min-width: 880px) { .about-open { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); } }
.about-face img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: 62% 30%; }
.about-say { display: grid; gap: 18px; }
.quote { font: 500 clamp(27px, 6.6vw, 42px)/1.16 var(--display); letter-spacing: -.014em; color: var(--ink); text-wrap: balance; }
.about-say > p:not(.quote) { font-size: 18px; max-width: 52ch; }
.now { margin: 6px 0 0; padding-top: 18px; border-top: 1px solid var(--line); display: grid; gap: 6px; }
.now dt { margin-bottom: 4px; font: 500 12px/1 var(--label); letter-spacing: .2em; text-transform: uppercase; color: var(--red); }
.now dd { margin: 0; font: 400 17px/1.4 var(--text); color: var(--ink); }

/* her path: the clock she made, turned by hand, and a card of what she was doing that year */
.years { display: grid; gap: 22px; justify-items: center; text-align: center; }
.years h2 { font: 700 clamp(30px, 6vw, 44px)/1.08 var(--display); color: var(--ink); letter-spacing: -.014em; }
.years-say { font: italic 400 17px/1.4 var(--text); color: var(--muted); max-width: 40ch; }
.dial { --d: clamp(196px, 56vw, 320px); position: relative; width: var(--d); height: var(--d); margin: 46px; touch-action: none; cursor: grab; }
.dial.is-held { cursor: grabbing; }
.dial img { width: 100%; height: 100%; object-fit: cover; clip-path: circle(48.6%); filter: drop-shadow(0 26px 22px #000); pointer-events: none; user-select: none; }
.yr { position: absolute; left: 50%; top: 50%; width: 46px; height: 40px; margin: -20px 0 0 -23px; padding: 0; border: 0; background: none; cursor: pointer; color: #7d7669;
  font: 500 11.5px/1 var(--label); letter-spacing: .1em; font-variant-numeric: tabular-nums; transition: color .3s;
  transform: rotate(calc(var(--a) * 1deg)) translateY(calc(var(--d) * -.5 - 24px)) rotate(calc(var(--a) * -1deg)); }
.yr:hover, .yr[aria-pressed="true"] { color: #fff; }
.yr[aria-pressed="true"] { font-size: 14px; }
.hand { position: absolute; left: 50%; top: 50%; width: 3px; height: calc(var(--d) * .47); margin-left: -1.5px; background: var(--red); border-radius: 2px; transform-origin: 50% 0; transform: rotate(calc(var(--turn, 330) * 1deg + 180deg));
  box-shadow: 0 2px 6px #000a; transition: transform .7s var(--ease); pointer-events: none; }
.dial.is-held .hand { transition: none; }
.hand::before { content: ''; position: absolute; left: -5.5px; top: -7px; width: 14px; height: 14px; border-radius: 50%; background: var(--red); box-shadow: 0 1px 4px #000c; }
.path-card { width: min(100%, 560px); min-height: 216px; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 22px; align-items: start; padding: 18px 20px 20px; text-align: left;
  background: #0d1018; border: 1px solid #2b3246; box-shadow: 0 0 0 1px #0006, 0 2px 2px -1px #0008, 0 14px 16px -10px #000c, 0 34px 44px -26px #000; }
.path-card .y { font: 800 clamp(46px, 12vw, 64px)/1 var(--display); letter-spacing: -.02em; color: var(--ink); font-variant-numeric: tabular-nums; }
.path-items { display: grid; gap: 16px; padding-top: 6px; }
.path-items h3 { margin: 5px 0 2px; font: 700 clamp(19px, 4.6vw, 22px)/1.2 var(--display); letter-spacing: -.008em; color: var(--ink); }
.when { font: 500 11.5px/1.4 var(--label); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.when::before { content: ''; display: inline-block; width: 9px; height: 9px; margin-right: 8px; border-radius: 50%; background: var(--k); }
.k-study { --k: #7f9be6; } .k-work { --k: #c9ab63; } .k-award { --k: var(--red); }
.where { font-size: 16px; line-height: 1.4; color: var(--muted); }
@media (max-width: 420px) { .path-card { grid-template-columns: minmax(0, 1fr); } }

/* writing to her */
.contact { display: grid; gap: 22px; }
.contact h2 { font: 700 clamp(30px, 6vw, 44px)/1.08 var(--display); color: var(--ink); letter-spacing: -.014em; }
.form { display: grid; gap: 18px; max-width: 560px; }
.field { display: grid; gap: 7px; }
.field label { font: 500 12px/1 var(--label); letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.field input, .field textarea { width: 100%; padding: 13px 14px; background: var(--panel); border: 1px solid #4a433a; border-radius: 0; color: var(--ink); font: 400 18px/1.4 var(--text); caret-color: var(--red); }
.field textarea { resize: vertical; min-height: 150px; }
.field input:focus-visible, .field textarea:focus-visible { outline: 2px solid var(--ink); outline-offset: 1px; border-color: var(--ink); }
.field [aria-invalid="true"] { border-color: var(--red); }
.err { min-height: 0; font: 400 15px/1.3 var(--text); color: #f29a94; } .err:empty { display: none; }
.hp { position: absolute; left: -9999px; }
.btn-send { justify-self: start; min-width: 150px; background: var(--red); border-color: var(--red); color: #fff; }
.btn-send:hover:not(:disabled) { background: #e03a3c; border-color: #e03a3c; }
.form-note { font: 400 17px/1.4 var(--text); color: var(--ink); } .form-note:empty { display: none; }
.contact-else { font-size: 17px; color: var(--muted); overflow-wrap: anywhere; }

.foot { margin-top: clamp(30px, 6vw, 60px); padding: 34px 0 60px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 14px 30px; justify-content: space-between; font: 500 12px/1.6 var(--label); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.foot a { text-decoration: none; padding: 8px 0; display: inline-block; } .foot a:hover { color: var(--ink); }
.onward { display: grid; gap: 14px; }
.onward a { font: 700 clamp(24px, 5.4vw, 32px)/1.2 var(--display); color: var(--ink); }

/* ---- wide screens. Above 1280 px the whole page grows with the window: a few lines in each page's head set zoom and
   --zoom on <html> to min(width / 1280, height / 620). So a 3440 px monitor sees the 1280 px page, larger. Phones and
   laptops up to 1280 px are not touched. ---- */
@media (min-width: 1000px) {
  .wrap { width: min(1200px, 100% - 2 * var(--gut)); }
  dialog.sheet { width: 70%; }   /* the page stays in sight beside it */
  /* a project's first screen in two columns: its artifact (a canvas, svg or .artifact) left, large; the rest right,
     in its own order, centred in the height of the window */
  .point-in { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); grid-template-rows: 1fr repeat(10, auto) 1fr; column-gap: 72px; row-gap: 0;
    justify-items: start; text-align: left; min-height: calc(var(--vh) - 68px); padding: 20px 0 36px; }
  .point-in::before { content: ''; grid-column: 2; grid-row: 1; }
  .point-in > * { grid-column: 2; }
  .point .point-in > :is(canvas, svg, .artifact) { grid-column: 1; grid-row: 1 / -1; justify-self: center; align-self: center; margin: 0;
    width: auto; height: auto; max-width: 100%; max-height: calc(var(--vh) * .7); }
}
@media (min-width: 1400px) { .gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .hand, .yr, .btn { transition: none; }
  .has-sheet main { transform: none; } dialog.sheet[open], dialog.sheet.is-closing { animation: sheet-dim .2s; } }   /* the sheet still fades, nothing slides */
