:root{
  --ink:#1A1A1A;
  --paper:#FFFDF9;
  --blue:#8FB4E3;
  --pink:#F49BC1;
  --orange:#F3A25C;
  --green:#A9DBA2;
  --purple:#B49BDB;
  --dot:#DCD8CE;

  --display:"Fredoka",system-ui,sans-serif;
  --body:"Work Sans",system-ui,sans-serif;
  --mono:"DM Mono",ui-monospace,monospace;

  --wrap:1000px;
}

*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{
  margin:0;background:var(--paper);color:var(--ink);
  font-family:var(--body);font-size:17px;line-height:1.65;
  -webkit-font-smoothing:antialiased;
}
a{color:inherit}
:focus-visible{outline:3px solid var(--ink);outline-offset:4px}
.wrap{max-width:var(--wrap);margin:0 auto;padding-inline:clamp(1.35rem,5vw,2rem)}
.center{text-align:center}

/* ---------- hand-drawn frames ----------
   Real SVG paths generated at each element's pixel size: 1 unit = 1px,
   stroke spills outside via overflow, so nothing scales or blurs. */
[data-frame]{position:relative;background:transparent}
[data-frame] > *{position:relative;z-index:1}
.frame{position:absolute;inset:0;z-index:0;width:100%;height:100%;overflow:visible;pointer-events:none}
.frame path{fill:var(--fill,#fff);stroke:var(--ink);stroke-linejoin:round;stroke-linecap:round}
.panel{padding:clamp(1.3rem,3vw,1.8rem)}
.fill-blue{--fill:var(--blue)}
.fill-pink{--fill:var(--pink)}
.fill-orange{--fill:var(--orange)}
.fill-green{--fill:var(--green)}
.fill-purple{--fill:var(--purple)}

/* ---------- type ---------- */
.h1{font-family:var(--display);font-weight:600;font-size:clamp(2rem,5.4vw,3.1rem);line-height:1.1;margin:0}
.h-section{font-family:var(--display);font-weight:600;font-size:clamp(1.9rem,4.6vw,2.7rem);line-height:1.15;margin:0 0 .6rem}
.h2{font-family:var(--display);font-weight:600;font-size:clamp(1.3rem,2.9vw,1.75rem);line-height:1.2;margin:0 0 1.1rem}
.h3{font-family:var(--display);font-weight:500;font-size:1.2rem;line-height:1.3;margin:0}
.h4{font-family:var(--display);font-weight:500;font-size:1.1rem;line-height:1.25;margin:0 0 .55rem}
.lede{font-size:1.05rem;margin:0 0 1.6rem}
.copy p{margin:0 0 1rem}
.copy p:last-child{margin-bottom:0}

/* ---------- nav ---------- */
.nav{position:sticky;top:0;z-index:40;background:var(--paper)}
.nav__in{display:flex;align-items:center;justify-content:space-between;gap:1rem;min-height:58px}
.nav__name{font-family:var(--display);font-weight:600;font-size:1.05rem;text-decoration:none}
.nav__links{display:flex;gap:1.1rem}
.nav__links a{font-family:var(--display);font-weight:400;font-size:1rem;text-decoration:none;text-underline-offset:4px}
.nav__links a:hover,.nav__links a[aria-current="page"]{text-decoration:underline}
.nav__edge{
  height:6px;background-repeat:repeat-x;background-position:center;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='6'%3E%3Cpath d='M0 3.2 Q 18 1.2 35 3 T 70 3.4 T 105 2.8 T 140 3.2' stroke='%231A1A1A' stroke-width='3' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
}

.section{padding-block:clamp(2.6rem,6vw,4.2rem)}

/* ---------- landing ---------- */
.intro{font-size:1.05rem}
.intro p{margin:0 0 1rem}
.intro p:last-child{margin:0}

/* institutions, as a quiet credibility line */
.creds{
  display:flex;flex-wrap:wrap;justify-content:center;align-items:center;
  gap:.6rem 1.4rem;list-style:none;margin:clamp(2rem,4vw,2.8rem) 0 0;padding:0;
}
@media(max-width:520px){
  .creds{gap:.5rem;flex-direction:column}
  .creds li + li::before{display:none}
}
.creds li{font-family:var(--mono);font-size:.82rem;letter-spacing:.02em}
.creds a{opacity:.85;text-decoration:none;border-bottom:1.5px solid transparent;padding-bottom:2px}
.creds a:hover{opacity:1;border-bottom-color:var(--ink)}
.creds li + li::before{
  content:"";display:inline-block;width:5px;height:5px;border-radius:50%;
  background:var(--ink);opacity:.4;vertical-align:middle;margin-right:1.4rem;
}

/* what I can do, each linking through to the evidence */
.cards{
  display:grid;gap:1.2rem;grid-template-columns:1fr;align-items:stretch;
  margin:clamp(2.2rem,5vw,3.2rem) 0 0;padding:0;list-style:none;
}
@media(min-width:820px){.cards{grid-template-columns:1fr 1fr}}
.cards > li{display:flex}
.card{
  display:flex;flex-direction:column;justify-content:center;
  width:100%;text-decoration:none;
  padding:clamp(1.3rem,3vw,1.7rem);
}
.cards > li:nth-child(1) .card{--fill:var(--green);rotate:-.35deg}
.cards > li:nth-child(2) .card{--fill:var(--blue);rotate:.3deg}
.cards > li:nth-child(3) .card{--fill:var(--orange);rotate:.25deg}
.cards > li:nth-child(4) .card{--fill:var(--purple);rotate:-.2deg}
.card:hover{rotate:0deg;transition:rotate .18s ease}
.card__title{
  font-family:var(--display);font-weight:500;font-size:1.1rem;line-height:1.25;
  margin:0 0 .55rem;
}
.card p{margin:0;font-size:.94rem;line-height:1.55}
.card__more{
  font-family:var(--mono);font-size:.72rem;letter-spacing:.08em;
  text-transform:uppercase;margin:.9rem 0 0;opacity:0;transition:opacity .18s ease;
}
.card:hover .card__more,.card:focus-visible .card__more{opacity:.75}

/* the desktop: files you can open */
.desk{
  display:flex;flex-wrap:wrap;justify-content:center;
  gap:clamp(1.6rem,5vw,3.4rem);
  margin:clamp(2.4rem,5vw,3.4rem) 0 0;padding:0;list-style:none;
}
.file{width:132px;text-decoration:none;display:block;text-align:center}
.file__art{display:block;width:96px;height:118px;margin:0 auto .7rem;position:relative}
.file:nth-child(1) .file__art{rotate:-1.5deg}
.file:nth-child(2) .file__art{rotate:1.2deg}
.file:nth-child(3) .file__art{rotate:-.8deg}
.file__inner{
  position:absolute;inset:0;display:flex;align-items:center;justify-content:center;
  z-index:1;
}
.file__inner svg{width:52px;height:auto;overflow:visible}
.file__inner svg path,.file__inner svg line{
  stroke:var(--ink);stroke-width:2.6;fill:none;stroke-linecap:round;stroke-linejoin:round;
}
.file__name{
  font-family:var(--mono);font-size:.78rem;line-height:1.35;
  display:inline-block;padding:.18rem .45rem;
  overflow-wrap:anywhere;
}
.file:hover .file__name{background:var(--ink);color:var(--paper);border-radius:3px}
.file:hover .file__art{rotate:0deg;transition:rotate .18s ease}

/* ---------- case study ---------- */
.strip{display:grid;gap:1.4rem;grid-template-columns:1fr;margin:0 0 clamp(2rem,4vw,2.6rem)}
@media(min-width:780px){.strip{grid-template-columns:repeat(3,1fr)}}
.beat{display:flex;flex-direction:column;gap:.9rem;opacity:0;transform:translateY(10px)}
.beat:nth-child(1){rotate:-.5deg}
.beat:nth-child(2){rotate:.35deg}
.beat:nth-child(3){rotate:-.25deg}
.is-ready .beat{opacity:1;transform:none;transition:opacity .4s ease,transform .4s ease}
.is-ready .beat:nth-child(2){transition-delay:.4s}
.is-ready .beat:nth-child(3){transition-delay:.8s}
.beat__stage{flex:1;display:flex;align-items:center;justify-content:center;min-height:148px}
.beat__cap{font-family:var(--display);font-weight:400;font-size:1rem;line-height:1.35;margin:0}
.field{display:grid;grid-template-columns:repeat(38,1fr);gap:2px;width:100%}
.field i{display:block;aspect-ratio:1;border-radius:50%;background:var(--dot)}
.field i.hit{background:var(--ink)}
.bar{width:100%;display:flex;height:92px}
.bar__big{display:flex;width:65%;background:var(--pink);border:3px solid var(--ink);border-right:0}
.bar__three{width:54%;background:var(--ink)}
.bar__rest{width:35%;background:#fff;border:3px solid var(--ink)}

.explore{display:flex;flex-wrap:wrap;gap:.8rem;justify-content:center;margin:0 0 2.4rem;padding:0;list-style:none}
.explore a{display:inline-block;text-decoration:none;font-family:var(--display);font-weight:500;font-size:1rem;padding:.7rem 1.7rem}
.explore a:hover{--fill:var(--green)}
.overview{display:grid;gap:1.2rem;grid-template-columns:1fr;margin:0 0 2.6rem;align-items:stretch}
@media(min-width:760px){.overview{grid-template-columns:repeat(3,1fr)}}
.overview > div{display:flex;flex-direction:column;justify-content:center}
.overview p{margin:0;font-size:.93rem;line-height:1.55}
.block{margin:0 0 2.8rem}
.findings{display:grid;gap:1.4rem;grid-template-columns:1fr;align-items:stretch}
@media(min-width:900px){.findings{grid-template-columns:1fr 1fr}}
.findings > div{display:flex;flex-direction:column;justify-content:center}

.chart__row{margin:0 0 1.1rem}
.chart__row:last-child{margin-bottom:0}
.chart__label{font-size:.92rem;font-weight:500;line-height:1.3;margin:0 0 .4rem}
.chart__label small{display:block;font-weight:400;font-size:.78rem;opacity:.8}
.chart__track{display:flex;align-items:center;gap:.6rem}
.chart__bar{
  height:26px;flex:none;--fill:var(--paper);
  clip-path:inset(-8px 100% -8px -8px);
  transition:clip-path .9s cubic-bezier(.22,.61,.36,1);
}
.is-drawn .chart__bar{clip-path:inset(-8px -8px -8px -8px)}
.is-drawn .chart__row:nth-child(2) .chart__bar{transition-delay:.18s}
.is-drawn .chart__row:nth-child(3) .chart__bar{transition-delay:.36s}
.chart__val{font-family:var(--mono);font-size:.85rem;white-space:nowrap}
.chart__foot{font-family:var(--display);font-weight:400;font-size:1rem;margin:1.1rem 0 0}

/* the process: a table filtering itself down */
.etl{max-width:760px;margin:0 auto}
.etl__caption{
  min-height:5.2em;margin:0 0 1.2rem;display:flex;flex-direction:column;
  align-items:center;justify-content:center;gap:.15rem;
}
.etl__n{
  font-family:var(--display);font-weight:600;font-size:clamp(1.9rem,4.4vw,2.6rem);
  line-height:1.05;font-variant-numeric:tabular-nums;
}
.etl__t{font-family:var(--display);font-weight:400;font-size:1.05rem;line-height:1.35;max-width:34ch}
.etl__wrap{overflow-x:auto}
.etl__table{
  width:100%;border-collapse:collapse;font-family:var(--mono);
  font-size:.78rem;text-align:left;min-width:520px;
}
.etl__table th,.etl__table td{
  padding:.5rem .7rem;white-space:nowrap;
  opacity:.3;transition:opacity .45s ease;
}
.etl__table th{font-weight:500;border-bottom:2px solid var(--ink)}
.etl__table tbody tr{transition:opacity .55s ease}
.etl__table .hot{opacity:1}
.etl__table tr.gone{opacity:.1}
.etl__table .col-supplier{opacity:0;transition:opacity .5s ease}
.etl__table.joined .col-supplier{opacity:1}
.blk{display:inline-block;width:52px;height:8px;border-radius:4px;background:var(--dot);vertical-align:middle}
.blk--wide{width:74px}
.etl__note{font-size:.85rem;opacity:.75;margin:1rem 0 0}
.etl__replay{
  display:inline-block;font-family:var(--display);font-weight:500;font-size:.92rem;
  padding:.55rem 1.4rem;margin-top:1.4rem;background:none;border:0;cursor:pointer;color:inherit;
}
.etl__replay:hover{--fill:var(--green)}

.limits{list-style:none;margin:0 auto;padding:0;max-width:58ch;text-align:left}
.limits li{position:relative;padding-left:1.8rem;margin:0 0 .8rem;font-size:1rem;line-height:1.55}
.limits li:last-child{margin-bottom:0}
.limits li::before{
  content:"";position:absolute;left:0;top:.72em;width:14px;height:6px;
  background-repeat:no-repeat;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='6'%3E%3Cpath d='M0.5 3.6 Q 4 1.2 7 3.4 T 13.5 3' stroke='%231A1A1A' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
}

/* ---------- resume ---------- */
.roles{display:grid;gap:1.3rem;text-align:left}

/* Roles collapse by default: the tagline is always visible, the detail is one click away. */
.role > summary{
  cursor:pointer;list-style:none;position:relative;
  padding-right:2.2rem;
}
.role > summary::-webkit-details-marker{display:none}
.role > summary:focus{outline:none}
.role > summary:focus-visible{outline:3px solid var(--ink);outline-offset:6px;border-radius:4px}
/* the chevron, drawn rather than typed */
.role > summary::after{
  content:"";position:absolute;right:0;top:.35rem;
  width:18px;height:11px;background-repeat:no-repeat;
  transition:transform .2s ease;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='11'%3E%3Cpath d='M1.5 1.8 Q 9 10 16.5 2' stroke='%231A1A1A' stroke-width='2.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
}
.role[open] > summary::after{transform:rotate(180deg)}
.role[open] > summary{margin-bottom:1.4rem}
.role > summary .role__lead{margin-bottom:0}

.role__head{
  display:flex;flex-wrap:wrap;gap:.2rem 1rem;align-items:baseline;
  justify-content:space-between;margin:0 0 .7rem;
}
.role__when{font-family:var(--mono);font-size:.76rem;line-height:1.5;margin:0;opacity:.8}
.role__lead{margin:0 0 .9rem;font-size:1rem;line-height:1.55}
/* Each numbered item is one piece of work: what I did, why it mattered, what came of it. */
.car{list-style:none;margin:0;padding:0;counter-reset:car}
.car > li{
  counter-increment:car;position:relative;
  padding-left:2.3rem;margin:0 0 1.5rem;
}
.car > li:last-child{margin-bottom:0}
.car > li::before{
  content:counter(car);position:absolute;left:0;top:-.05em;
  font-family:var(--display);font-weight:600;font-size:1.15rem;
  width:1.7rem;text-align:left;
}
.car__do{margin:0 0 .55rem;font-size:1rem;line-height:1.5;font-weight:500}
.car__pts{list-style:none;margin:0;padding:0}
.car__pts li{position:relative;padding-left:1.4rem;margin:0 0 .5rem;font-size:.94rem;line-height:1.55}
.car__pts li:last-child{margin-bottom:0}
.car__pts li::before{
  content:"";position:absolute;left:0;top:.7em;width:12px;height:6px;
  background-repeat:no-repeat;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='6'%3E%3Cpath d='M0.5 3.6 Q 3.5 1.2 6 3.4 T 11.5 3' stroke='%231A1A1A' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
}
.roles .panel{--fill:#fff}

.divider{
  font-family:var(--display);font-weight:500;font-size:1.05rem;
  margin:2.6rem 0 1.2rem;text-align:center;
}

/* ---------- tools ---------- */
.tools{display:flex;flex-wrap:wrap;gap:.7rem;justify-content:center;list-style:none;margin:0;padding:0}
.tools li{font-family:var(--mono);font-size:.8rem;padding:.5rem 1.5rem}

/* ---------- contact ---------- */
.social{display:flex;gap:1rem;justify-content:center;list-style:none;margin:1.8rem 0 0;padding:0}
.social a{display:flex;align-items:center;justify-content:center;width:64px;height:64px;text-decoration:none}
.social a:hover{--fill:var(--green)}
.social svg.icon{width:27px;height:27px;fill:var(--ink);display:block}
.foot{font-family:var(--mono);font-size:.78rem;padding:1.4rem 0 3rem;margin:0;opacity:.7}

.tagline{
  font-family:var(--display);font-weight:400;
  font-size:clamp(1.15rem,2.6vw,1.45rem);line-height:1.35;
  max-width:36ch;margin:1rem auto 0;
}

/* ---------- centring helper ----------
   Declared last on purpose: it must win over the margins set by .lede and friends. */
.measure{max-width:60ch;margin-left:auto;margin-right:auto}
.measure--wide{max-width:72ch;margin-left:auto;margin-right:auto}

@media(prefers-reduced-motion:reduce){
  .chart__bar{clip-path:inset(-8px -8px -8px -8px);transition:none}
  .beat{opacity:1;transform:none}
  .is-ready .beat{transition:none}
  .etl__table th,.etl__table td,.etl__table tbody tr,.etl__table .col-supplier{transition:none}
}
