/* Merilin Ekzarkova: portfolio site.
   Look: elephant grey, white type, raspberry pink used sparingly.
   Concept: the print is the formal version; the pink pen translates it into plain words. */

:root{--bg:#36393E;--ink:#F4F6F7;--soft:#CED2D6;--mute:#ABB0B6;--pink:#DE5089;--pinkt:#F29ABB;--hair:#4C5056;--mark:#DE5089}
*{box-sizing:border-box;margin:0;padding:0}
html{scroll-behavior:smooth}
body{background:var(--bg);color:var(--ink);font-family:Inter,-apple-system,"Segoe UI",Helvetica,Arial,sans-serif;overflow-x:hidden}
.serif{font-family:"Bitstream Charter",Charter,"Charis SIL","Iowan Old Style",Georgia,serif}
header{position:sticky;top:0;z-index:5;background:rgba(54,57,62,.94);backdrop-filter:blur(6px)}
.bar{max-width:1010px;margin:0 auto;padding:18px 40px;display:flex;justify-content:space-between;align-items:center;font-size:15px}
.nm{display:inline-flex;align-items:center;gap:10px;font-weight:600}
.mini{width:36px;height:31px;stroke:var(--mark);transition:stroke .6s ease;transform-origin:50% 40%}
.mini.wave{animation:wave .7s ease}
@keyframes wave{0%{transform:rotate(0)}30%{transform:rotate(-9deg)}65%{transform:rotate(7deg)}100%{transform:rotate(0)}}
.bar a{color:var(--soft);margin-left:24px;text-decoration:none}
main{max-width:1010px;margin:0 auto;padding:0 40px;position:relative}
.hero{padding:clamp(70px,14vh,150px) 0 clamp(30px,6vh,60px)}
h1{font-weight:400;font-size:clamp(36px,6vw,62px);line-height:1.25;letter-spacing:-.012em;max-width:840px}
.u{position:relative;white-space:nowrap}
.u svg{position:absolute;left:0;right:0;bottom:-.22em;width:100%;height:.3em;overflow:visible}
.u path{fill:none;stroke:var(--pink);stroke-width:3;stroke-linecap:round;stroke-linejoin:round}
.who{font-size:19px;line-height:1.6;color:var(--soft);margin-top:26px;max-width:620px}
.lab{font-size:14px;letter-spacing:.18em;text-transform:uppercase;padding-bottom:10px;border-bottom:2px solid var(--pink);margin-top:40px}
.item{padding:34px 0;border-bottom:1px solid var(--hair);position:relative}
.item h3,.item h2{font-weight:400;font-size:clamp(23px,3vw,30px);line-height:1.25;max-width:760px}
section{padding:24px 0 40px}
.line{font-size:18px;line-height:1.6;margin-top:22px;color:var(--soft);max-width:680px}
.line b{color:var(--ink);font-weight:600}
footer{margin:60px 0 0;border-top:2px solid var(--pink);padding:16px 0 70px;font-size:15px;color:var(--soft);display:flex;justify-content:space-between;flex-wrap:wrap;gap:8px}
.pen{font-family:"Caveat","Bradley Hand","Noteworthy","Segoe Print",Georgia,serif;color:var(--pink);font-size:24px;line-height:1.15;font-weight:500}
.del{position:relative;white-space:nowrap;color:var(--mute)}
.del svg{position:absolute;left:-3px;right:-3px;top:50%;width:calc(100% + 6px);height:10px;margin-top:-4px;overflow:visible}
.del path{fill:none;stroke:var(--pink);stroke-width:2.4;stroke-linecap:round}
.ins{opacity:0;transition:opacity .5s ease;margin:0 .15em 0 .2em;font-size:1.25em}
.ins.on{opacity:1}
.note{position:absolute;right:0;top:30px;width:290px;text-align:left;font-size:22px;transform:rotate(-3deg)}
.j{text-decoration:underline wavy var(--pink);text-decoration-thickness:1.5px;text-underline-offset:5px}
.plain{margin-top:22px;max-width:560px;font-size:26px;transform:rotate(-1.5deg)}
.plain.on{opacity:1}
.pen .w{display:inline-block;opacity:0;clip-path:inset(0 100% 0 0);transition:opacity .12s linear,clip-path .28s ease-out;white-space:pre}
.pen.writing .w{opacity:1;clip-path:inset(0 -8% 0 0)}
.ins{white-space:nowrap}
@media (max-width:900px){.note{position:static;grid-column:2;margin-top:12px;width:auto}.del{white-space:normal}}
.nm{white-space:nowrap}
@media (max-width:700px){.bar a{margin-left:14px}.bar a.opt{display:none}}
#thread{position:absolute;left:0;top:0;pointer-events:none;z-index:1}
#thread path{fill:none;stroke:var(--pink);stroke-width:2;stroke-linecap:round;opacity:.9}
@media (max-width:700px){.bar,main{padding-left:22px;padding-right:22px}main{padding-left:38px}}
@media (prefers-reduced-motion:reduce){.mini.wave{animation:none}.pen .w{opacity:1!important;clip-path:none!important;transition:none!important}}

/* Links */
a{color:inherit}
footer a,.tl{color:var(--soft);text-decoration:underline;text-decoration-color:var(--pink);text-underline-offset:4px}
footer a:hover,.tl:hover,.bar a:hover{color:var(--ink)}
a:focus-visible{outline:2px solid var(--pinkt);outline-offset:3px;border-radius:2px}


/* Story cards */
.stories{display:grid;grid-template-columns:repeat(3,1fr);gap:18px;margin-top:26px}
.story{display:flex;flex-direction:column;background:#3D4146;border:1px solid var(--hair);border-radius:10px;padding:22px 22px 20px;text-decoration:none;transition:border-color .2s ease,transform .2s ease}
.story:hover{border-color:var(--pink);transform:translateY(-2px)}
.story .meta{font-size:12px;letter-spacing:.1em;text-transform:uppercase;color:var(--mute)}
.story h3{font-weight:400;font-size:23px;line-height:1.25;margin-top:12px;color:var(--ink)}
.story p{font-size:15px;line-height:1.5;color:var(--soft);margin-top:10px;flex:1}
.story .go{font-size:14px;color:var(--pinkt);margin-top:18px}
@media (max-width:860px){.stories{grid-template-columns:1fr}}
@media (prefers-reduced-motion:reduce){.story{transition:none}.story:hover{transform:none}}

/* Work pieces: a title, then three numbered facts with the number first */
.points{list-style:none;counter-reset:pt;margin-top:18px;max-width:720px}
.points li{counter-increment:pt;position:relative;padding-left:38px;margin-top:10px;font-size:16.5px;line-height:1.5;color:var(--soft)}
.points li::before{content:counter(pt);position:absolute;left:0;top:0;color:var(--pinkt);font-family:"Bitstream Charter",Charter,"Charis SIL","Iowan Old Style",Georgia,serif;font-size:19px}
.points b{color:var(--ink);font-weight:600}
.more{display:inline-block;margin-top:18px;font-size:15px;color:var(--pinkt);text-decoration:none;border-bottom:1px solid transparent}
.more:hover{border-bottom-color:var(--pinkt)}
.also{font-size:16px;line-height:1.6;color:var(--soft);margin-top:30px;max-width:760px}
.also b{color:var(--ink);font-weight:600}

/* Work pieces as problem and solution */
.ps{display:grid;grid-template-columns:110px 1fr;gap:10px 18px;margin-top:18px;max-width:780px}
.ps dt{font-size:12px;letter-spacing:.14em;text-transform:uppercase;color:var(--pinkt);padding-top:4px}
.ps dd{font-size:16.5px;line-height:1.5;color:var(--soft)}
.ps b{color:var(--ink);font-weight:600}
@media (max-width:600px){.ps{grid-template-columns:1fr;gap:4px}.ps dd{margin-bottom:10px}}

/* Work pieces: text on the left, a redrawn sketch on the right */
.item{display:grid;grid-template-columns:minmax(0,1fr) 340px;gap:34px;align-items:start}
.item h3,.item h2{max-width:none}
.sketch svg{width:100%;height:auto;display:block}
.sketch figcaption{font-size:11.5px;color:var(--mute);margin-top:8px}
@media (max-width:900px){.item{grid-template-columns:1fr;gap:20px}.sketch{max-width:420px}}

/* Case study pages */
a.nm{text-decoration:none;color:inherit}
.pagehead{font-weight:400;font-size:clamp(34px,5vw,52px);margin:clamp(50px,9vh,90px) 0 10px}
.case{max-width:760px;padding:clamp(40px,8vh,80px) 0 30px}
.case h1{font-size:clamp(30px,4.6vw,46px);line-height:1.18}
.crumb{font-size:13px;letter-spacing:.14em;text-transform:uppercase;margin-bottom:18px}
.crumb a{color:var(--pinkt);text-decoration:none}
.facts{font-size:14px;color:var(--mute);margin-top:16px}
.case .sketch{max-width:460px;margin:34px 0 6px}
.case h2{font-size:12.5px;letter-spacing:.16em;text-transform:uppercase;color:var(--pinkt);font-weight:600;margin-top:44px;padding-bottom:8px;border-bottom:1px solid var(--hair)}
.case p{font-size:18px;line-height:1.65;color:var(--soft);margin-top:16px}
.case .points li{font-size:18px}
.rules{list-style:none;margin-top:14px}
.rules li{position:relative;padding-left:26px;margin-top:10px;font-size:18px;line-height:1.55;color:var(--soft)}
.rules li::before{content:"";position:absolute;left:0;top:.72em;width:12px;height:2px;background:var(--pink)}
.next{margin-top:40px}

/* The edited manuscript: print is the formal version, the pen rewrites it in plain words */
.del{position:static;white-space:normal;color:inherit;text-decoration:line-through;text-decoration-thickness:2px;text-decoration-color:transparent;transition:text-decoration-color .5s ease,color .5s ease}
.del.drawn{text-decoration-color:var(--pink);color:var(--mute)}
.ins{opacity:1;margin:0 .1em;font-size:1.3em;line-height:1;white-space:normal}
.circle{position:relative;white-space:nowrap}
.circle svg{position:absolute;left:-14px;top:-8px;width:calc(100% + 28px);height:calc(100% + 16px);overflow:visible;pointer-events:none}
.circle path{fill:none;stroke:var(--pink);stroke-width:2;stroke-linecap:round;stroke-dasharray:1;stroke-dashoffset:1;transition:stroke-dashoffset .7s ease-out;vector-effect:non-scaling-stroke}
.circle.drawn path{stroke-dashoffset:0}
.case{max-width:660px}
.case p,.case li,.case h2{position:relative}
.mnote{position:absolute;left:calc(100% + 30px);top:-4px;width:230px;font-size:24px;line-height:1.15;transform:rotate(-2.5deg)}
.mnote::before{content:"";display:inline-block;width:30px;height:17px;margin-right:6px;vertical-align:-1px;background:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2040%2022%22%3E%3Cpath%20d%3D%22M38%2C4%20C26%2C2%2012%2C6%205%2C15%20M5%2C15%20l1.5%2C-8%20M5%2C15%20l8%2C-0.5%22%20fill%3D%22none%22%20stroke%3D%22%23DE5089%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22/%3E%3C/svg%3E") no-repeat center/contain;opacity:0;transition:opacity .4s ease}
.mnote.writing::before{opacity:1}
@media (max-width:1040px){.case{max-width:760px}.mnote{position:static;display:block;width:auto;margin-top:8px;transform:rotate(-1.5deg)}.mnote::before{display:none}}
@media (prefers-reduced-motion:reduce){.del,.circle path,.mnote::before{transition:none}}
.case h2 .mnote{text-transform:none;letter-spacing:0;font-weight:500}

/* A redaction bar for details that are withheld */
.redact{display:inline-block;width:7.5em;height:1em;background:#17191c;border-radius:2px;vertical-align:-.15em}

/* More editor's marks: ticks and tallies */
.case p b{color:var(--ink);font-weight:600}
.ticks{list-style:none;margin-top:14px}
.ticks li{position:relative;padding-left:36px;margin-top:12px;font-size:18px;line-height:1.55;color:var(--soft)}
.tick{position:absolute;left:0;top:.18em;width:24px;height:22px}
.tick svg,.tally svg{width:100%;height:100%;overflow:visible}
.tick path,.tally path{fill:none;stroke:var(--pink);stroke-width:2.4;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:1;stroke-dashoffset:1;transition:stroke-dashoffset .6s ease-out}
.tick.drawn path,.tally.drawn path{stroke-dashoffset:0}
.tally{display:inline-block;width:46px;height:24px;vertical-align:-5px;margin-right:10px}
.mnote .pen{font-size:inherit}
.small{font-size:13px!important;color:var(--mute)!important;margin-top:18px!important}
@media (prefers-reduced-motion:reduce){.tick path,.tally path{transition:none}}

/* Work page: the longer list */
.morehead{margin-top:56px}
.morelist{list-style:none;margin-top:8px;max-width:820px}
.morelist li{position:relative;padding:14px 0 14px 26px;border-bottom:1px solid var(--hair);font-size:17px;line-height:1.5;color:var(--soft)}
.morelist li::before{content:"";position:absolute;left:0;top:1.55em;width:12px;height:2px;background:var(--pink)}
.morelist b{color:var(--ink);font-weight:600}

/* Draft pages */
.draftbar{background:#4a3f18;border:1px solid #D9A514;color:#F7E7B0!important;border-radius:8px;padding:10px 14px;font-size:14px!important;margin:0 0 26px!important}
.todo{background:#4a3f18;color:#F7E7B0;border-radius:4px;padding:1px 6px;font-size:.85em}

/* Keyboard and screen-reader basics */
.skip{position:absolute;left:-9999px;top:0;background:var(--ink);color:#1b1d20;padding:10px 16px;z-index:20;border-radius:0 0 8px 0;font-weight:600}
.skip:focus{left:0}
h2.lab{font-weight:400}

/* The wavy underlines and the redaction bar are also drawn as they scroll into view */
.j{text-decoration-color:transparent;transition:text-decoration-color .6s ease}
.j.drawn{text-decoration-color:var(--pink)}
.redact{transform:scaleX(0);transform-origin:left center;transition:transform .5s ease-out}
.redact.drawn{transform:scaleX(1)}
@media (prefers-reduced-motion:reduce){.j,.redact{transition:none}}
