/* =========================================================
   Amir Bismi — Pastry portfolio
   Bold condensed display type, moving ribbons, card-led work.
   Palette: chocolate / butter / cream. Tokens first.
   ========================================================= */

:root {
  /* Colour — chocolate, butter, cream */
  --cream: #fbf3e4;              /* main light surface */
  --cream-2: #f3e7d2;            /* alternate light surface */
  --card: #fffaf0;
  --choc: #2b1a12;               /* dark chocolate: text and dark surfaces (≈15:1 on cream) */
  --choc-2: #4a2e20;
  --choc-deep: #1e120c;
  --ink-muted: #5e4a3d;          /* secondary text on cream (≈7.5:1) */
  --caramel: #c27a3a;            /* rules and marks only */
  --caramel-ink: #8a4f1f;        /* caramel text on cream (≈5.9:1) */
  --butter: #f3d27a;             /* highlights; on chocolate ≈11:1, chocolate text on it ≈11:1 */
  --butter-hover: #f7de9a;
  --on-choc: #fbf3e4;
  --on-choc-muted: rgba(251, 243, 228, .74);
  --rule: rgba(43, 26, 18, .14);
  --rule-on-choc: rgba(251, 243, 228, .18);

  /* Type */
  --font-display: "Archivo", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Inter", "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
  --fs-label: .75rem;
  --fs-small: .875rem;
  --fs-body: clamp(1rem, .97rem + .15vw, 1.0625rem);
  --fs-lede: clamp(1.2rem, 1.05rem + .6vw, 1.45rem);
  --fs-section: clamp(3.25rem, 1.6rem + 7.5vw, 8.5rem);

  /* Space */
  --s1: 8px; --s2: 16px; --s3: 24px; --s4: 32px; --s5: 48px; --s6: 64px; --s7: 96px; --s8: 128px;
  --gutter: clamp(16px, 4vw, 48px);
  --gap: clamp(12px, 1.6vw, 20px);
  --section-y: clamp(var(--s7), 11vw, 160px);
  --radius: 18px;
  --header-h: 72px;

  /* Motion */
  --ease: cubic-bezier(.2, .7, .2, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font-body); font-size: var(--fs-body); line-height: 1.6;
  color: var(--choc); background: var(--cream); -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
body.menu-open { overflow: hidden; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: .22em; text-decoration-thickness: 1px; }
h1, h2, h3 { margin: 0; }
p { margin: 0; text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; }
button { font: inherit; color: inherit; }

:focus-visible { outline: 2px solid var(--caramel-ink); outline-offset: 3px; }
.hero :focus-visible, .experience :focus-visible, .contact :focus-visible, .menu :focus-visible,
.site-footer :focus-visible { outline-color: var(--butter); }

.container { width: 100%; max-width: 1360px; margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section-y); }

.display {
  font-family: var(--font-display); font-stretch: 62%; font-variation-settings: "wdth" 62;
  font-weight: 800; text-transform: uppercase; line-height: .9; letter-spacing: -0.005em;
}
.section-title { font-size: var(--fs-section); }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
svg[class] { fill: none; stroke: currentColor; stroke-width: 1.25; stroke-linecap: round; stroke-linejoin: round; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: var(--s2); top: -60px; z-index: 200; background: var(--butter); color: var(--choc);
  padding: var(--s1) var(--s2); text-decoration: none; transition: top .2s;
}
.skip-link:focus { top: var(--s2); }

/* ---------- Header: a single centred menu button ---------- */
.site-header {
  position: fixed; top: 16px; left: 50%; transform: translateX(-50%); z-index: 50;
}
.menu-fab {
  display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%;
  background: var(--butter); color: var(--choc); border: 0; cursor: pointer;
  box-shadow: 0 0 0 1px rgba(43, 26, 18, .12), 0 8px 24px -10px rgba(30, 18, 12, .5);
  transition: transform .25s var(--ease), background-color .2s;
}
.menu-fab:hover { background: var(--butter-hover); transform: scale(1.06); }
.menu-fab:focus-visible { outline: 2px solid var(--on-choc); outline-offset: 4px; box-shadow: 0 0 0 6px var(--choc); }
.menu-fab__icon { position: relative; width: 20px; height: 14px; display: block; }
.menu-fab__icon span {
  position: absolute; left: 0; width: 100%; height: 2px; border-radius: 2px; background: currentColor;
  transition: transform .3s var(--ease), top .3s var(--ease);
}
.menu-fab__icon span:first-child { top: 2px; }
.menu-fab__icon span:last-child { top: 10px; }
.menu-fab__icon.is-x span:first-child { top: 6px; transform: rotate(45deg); }
.menu-fab__icon.is-x span:last-child { top: 6px; transform: rotate(-45deg); }

/* ---------- Menu overlay ---------- */
.menu {
  position: fixed; inset: 0; z-index: 100; background: var(--choc); color: var(--on-choc);
  overflow-y: auto; clip-path: inset(0 0 100% 0); transition: clip-path .6s var(--ease-out);
}
.menu.is-open { clip-path: inset(0 0 0 0); }
.menu__inner { min-height: 100%; display: flex; flex-direction: column; }
.menu__top { padding-top: 16px; display: flex; justify-content: center; flex: none; }
.menu__links { list-style: none; margin-block: auto; padding-block: var(--s5); }
.menu__links li { overflow: hidden; border-bottom: 1px solid var(--rule-on-choc); }
.menu__links a {
  display: flex; align-items: baseline; gap: var(--s3); padding-block: 6px; text-decoration: none;
  font: 800 clamp(2.75rem, 1rem + 8vw, 7rem)/1 var(--font-display); font-variation-settings: "wdth" 62; text-transform: uppercase;
  transform: translateY(105%); transition: transform .6s var(--ease-out), color .2s;
}
.menu.is-open .menu__links a { transform: none; }
.menu.is-open .menu__links li:nth-child(2) a { transition-delay: .04s; }
.menu.is-open .menu__links li:nth-child(3) a { transition-delay: .08s; }
.menu.is-open .menu__links li:nth-child(4) a { transition-delay: .12s; }
.menu.is-open .menu__links li:nth-child(5) a { transition-delay: .16s; }
.menu.is-open .menu__links li:nth-child(6) a { transition-delay: .2s; }
.menu.is-open .menu__links li:nth-child(7) a { transition-delay: .24s; }
.menu__links a:hover { color: var(--butter); }
.menu__meta { font: 600 var(--fs-label) var(--font-body); letter-spacing: .08em; color: var(--on-choc-muted); align-self: center; }
.menu__num { font: 600 var(--fs-label) var(--font-body); letter-spacing: .08em; color: var(--butter); min-width: 2em; }
.menu__foot { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s4); padding-block: var(--s3) var(--s4); font-size: var(--fs-small); color: var(--on-choc-muted); }
.menu__foot a { text-decoration: none; }
.menu__foot a:hover { color: var(--butter); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 28px;
  border-radius: 999px; font-weight: 600; font-size: var(--fs-small); text-decoration: none; border: 1px solid transparent;
  transition: background-color .2s, color .2s, border-color .2s, transform .2s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn--butter { background: var(--butter); color: var(--choc); }
.btn--butter:hover { background: var(--butter-hover); }
.btn--outline-light { border-color: var(--on-choc); color: var(--on-choc); }
.btn--outline-light:hover { background: var(--on-choc); color: var(--choc); }

/* ---------- Hero ---------- */
.hero { background: var(--choc); color: var(--on-choc); padding-top: calc(var(--header-h) + var(--s4)); overflow: hidden; }
.hero__grid {
  display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, .85fr); gap: var(--s5) clamp(var(--s5), 6vw, var(--s8));
  align-items: center; min-height: min(calc(100svh - var(--header-h) - 140px), 760px);
}
.hero__kicker {
  display: flex; align-items: center; gap: 14px; margin-bottom: var(--s3);
  font-size: var(--fs-label); font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--butter);
}
.hero__kicker-rule { width: 40px; height: 1.5px; background: currentColor; }
.hero__title { font-size: clamp(4.5rem, min(11.5vw, 24vh), 13rem); line-height: .84; letter-spacing: -0.005em; }
.hero__title .line { display: block; overflow: hidden; padding-bottom: .02em; }
.hero__title .line > span { display: inline-block; }
.hero__title .line:last-child { color: var(--butter); padding-left: .55em; }
.hero__role { margin-top: var(--s4); max-width: 30em; font-size: var(--fs-lede); line-height: 1.45; color: var(--on-choc-muted); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: var(--s4); }
.hero__actions .btn { gap: 8px; }
.hero__actions .btn span { transition: transform .25s var(--ease); }
.hero__actions .btn:hover span { transform: translateX(4px); }
.hero__facts {
  margin: var(--s5) 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s3);
  max-width: 560px;
}
.hero__facts div { border-top: 1px solid var(--rule-on-choc); padding-top: 14px; }
.hero__facts dt { font-size: var(--fs-label); font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--on-choc-muted); }
.hero__facts dd { margin: 6px 0 0; font-size: var(--fs-small); color: var(--on-choc); line-height: 1.35; }
.hero__facts strong {
  display: block; margin-bottom: 2px; font: 800 2.25rem/1 var(--font-display); font-variation-settings: "wdth" 62; color: var(--butter);
}

/* Portrait: tilted card on a butter outline frame, with a role badge */
.hero__photo { position: relative; margin: 0; justify-self: end; width: min(100%, 440px); }
.hero__photo::before {
  content: ""; position: absolute; inset: 0; border: 1.5px solid var(--butter); border-radius: 28px;
  transform: rotate(4deg) translate(14px, 10px); opacity: .55;
}
.hero__photo-media {
  position: relative; aspect-ratio: 4 / 5; border-radius: 28px; overflow: hidden; background: #b9b9bb;
  transform: rotate(-2deg) translateY(var(--parallax, 0px)); transition: transform .1s linear;
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, .7);
}
.hero__photo-media > img { width: 100%; height: 100%; object-fit: cover; object-position: center 25%; }
.hero__badge {
  position: absolute; left: -36px; bottom: 36px; z-index: 2; display: grid; gap: 2px;
  padding: 14px 18px 14px 16px; border-radius: 16px; background: var(--cream); color: var(--choc);
  box-shadow: 0 20px 40px -20px rgba(0, 0, 0, .55); max-width: 270px;
}
.hero__badge-label::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: var(--caramel); vertical-align: 1px; }
.hero__badge-label { font-size: var(--fs-label); font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--caramel-ink); }
.hero__badge-role { font: 800 1.35rem/1.05 var(--font-display); font-variation-settings: "wdth" 62; text-transform: uppercase; }
.hero__badge-place { font-size: var(--fs-small); color: var(--ink-muted); }

/* Ribbon band closing the hero */
.hero__band { position: relative; height: clamp(150px, 16vw, 220px); margin-top: var(--s5); }
.hero__band .ribbon--butter { top: 22%; }
.hero__band .ribbon--light { top: 48%; }

@media (max-width: 960px) {
  .hero__grid { grid-template-columns: 1fr; min-height: 0; }
  .hero__photo { justify-self: center; width: min(78%, 380px); margin-top: var(--s3); }
  .hero__badge { left: -18px; bottom: 20px; }
}
@media (max-width: 600px) {
  .hero__title .line:last-child { padding-left: 0; }
  .hero__facts { gap: var(--s2); }
  .hero__facts strong { font-size: 1.75rem; }
  .hero__actions .btn { flex: 1 1 140px; }
  .hero__badge { position: relative; left: auto; bottom: auto; margin: -36px 16px 0; max-width: none; padding: 12px 16px; }
  .hero__badge-role { font-size: 1.1rem; }
}

/* ---------- Ribbons (marquee bands) ---------- */
.ribbon {
  position: absolute; left: -10%; width: 120%; overflow: hidden; white-space: nowrap;
  padding-block: .55em; font: 800 clamp(1.4rem, .9rem + 2vw, 2.6rem)/1 var(--font-display);
  font-variation-settings: "wdth" 62; text-transform: uppercase; letter-spacing: .01em;
}
.ribbon--butter { background: var(--butter); color: var(--choc-deep); top: 46%; transform: rotate(-6deg); z-index: 1; }
.ribbon--light { background: var(--cream); color: var(--choc); top: 62%; transform: rotate(4deg); z-index: 3; }
.ribbon__track { display: inline-flex; animation: marquee 38s linear infinite; }
.ribbon__track--reverse { animation-direction: reverse; }
.ribbon__track span { display: inline-flex; align-items: center; }
.ribbon__track span::after {
  content: ""; width: .32em; height: .32em; margin-inline: .7em; border-radius: 50%; background: currentColor; opacity: .7;
}
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }



/* ---------- Placeholders ---------- */
.placeholder {
  position: relative; width: 100%; height: 100%; display: grid; place-items: center; overflow: hidden;
  background: var(--ph-bg, var(--cream-2)); color: var(--ph-ink, var(--choc));
}
.placeholder__art { width: 34%; max-width: 140px; height: auto; aspect-ratio: 1; stroke-width: 1; transition: transform .7s var(--ease); }
.placeholder__tag {
  position: absolute; left: var(--s2); bottom: var(--s2); padding: 8px 12px; border-radius: 999px;
  font-size: var(--fs-label); font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  background: var(--cream); color: var(--choc);
}
.work-item .placeholder__tag { left: 8px; bottom: 8px; padding: 5px 9px; font-size: .75rem; }
.work-item .placeholder__art { width: 28%; }
.placeholder--cocoa  { --ph-bg: #e9d8c8; --ph-ink: var(--choc); }
.placeholder--butter{ --ph-bg: #f7e5b4; --ph-ink: #6b4512; }
.placeholder--cream  { --ph-bg: #efe3cf; --ph-ink: var(--choc-2); }

/* ---------- Work ---------- */
.work { background: var(--cream); }
.work__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: var(--s3); }
.filters { display: flex; flex-wrap: wrap; gap: var(--s1); max-width: 900px; justify-content: flex-end; }
.filters button {
  min-height: 42px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--choc); background: transparent;
  font-size: var(--fs-small); font-weight: 500; cursor: pointer; transition: background-color .2s, color .2s;
}
.filters button:hover { background: var(--cream-2); }
.filters button[aria-pressed="true"] { background: var(--choc); color: var(--cream); }

.work__notes { margin: var(--s4) 0 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gap); }
.work__notes div { border-top: 2px solid var(--caramel); padding-top: 12px; transition: opacity .3s; }
.work__notes dt { font-size: var(--fs-label); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--caramel-ink); }
.work__notes dd { margin: 6px 0 0; font-size: var(--fs-small); color: var(--ink-muted); }
.work__notes div.is-dim { opacity: .35; }
.work__status { min-height: 1px; }
.work__empty {
  margin-top: var(--s5); padding: var(--s5) var(--s3); text-align: center; border-radius: var(--radius);
  border: 1px dashed var(--rule); color: var(--ink-muted);
}

.work__grid { margin-top: var(--s5); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gap); }
.work-item { margin: 0; background: var(--card); border-radius: 14px; padding: 8px; box-shadow: 0 0 0 1px var(--rule); }
.work-item[hidden] { display: none; }
.work-item.is-entering { animation: card-in .45s var(--ease) both; }
@keyframes card-in { from { opacity: 0; transform: translateY(12px); } }
.work-item__media { aspect-ratio: 4 / 3; border-radius: 10px; overflow: hidden; }
.work-item__media > img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease); }
.work-item:hover .work-item__media > img, .work-item:hover .placeholder__art { transform: scale(1.06); }
.work-item figcaption { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 10px 4px 4px; }
.work-item__title { font: 800 1.05rem/1 var(--font-display); font-variation-settings: "wdth" 62; text-transform: uppercase; }
.work-item__cat { font-size: .75rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--caramel-ink); white-space: nowrap; }

@media (max-width: 1100px) { .work__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 960px) {
  .work__notes { grid-template-columns: 1fr 1fr; }
  .work__grid { grid-template-columns: 1fr 1fr; }
  .filters { justify-content: flex-start; }
}
@media (max-width: 560px) {
  .work__notes { grid-template-columns: 1fr; }
  .js .work__notes:not(.is-filtered), .js .work__notes div.is-dim { display: none; }
  .work__grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .work-item figcaption { flex-direction: column; gap: 4px; }
  .work-item .placeholder__tag { display: none; }
}

/* ---------- About ---------- */
.about { background: var(--cream-2); }
.statement {
  font-size: clamp(2.25rem, 1rem + 5vw, 6rem); line-height: .95; text-align: center; max-width: 16em; margin-inline: auto;
}
.statement .w { color: rgba(43, 26, 18, .2); transition: color .25s; }
.statement .w.is-on { color: var(--choc); }
.about__grid {
  margin-top: var(--s7); display: grid; grid-template-columns: 1.4fr 1fr; gap: var(--s5) clamp(var(--s5), 8vw, var(--s8));
  align-items: start;
}
.about__body p + p { margin-top: 1em; color: var(--ink-muted); max-width: 60ch; }
.lede { font-size: var(--fs-lede); line-height: 1.45; font-weight: 500; }
.facts { margin: 0; }
.facts div { padding: 14px 0; border-top: 1px solid var(--rule); display: grid; grid-template-columns: 9em 1fr; gap: 12px; }
.facts div:last-child { border-bottom: 1px solid var(--rule); }
.facts dt { font-size: var(--fs-label); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--caramel-ink); padding-top: 3px; }
.facts dd { margin: 0; font-weight: 500; }

.approach { list-style: none; margin-top: var(--s7); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gap); }
.approach li { background: var(--card); border-radius: var(--radius); padding: var(--s4) var(--s3); box-shadow: 0 0 0 1px var(--rule); }
.approach__icon { width: 52px; height: 52px; color: var(--caramel); }
.approach h3 { margin-top: var(--s3); font-size: 2rem; }
.approach p { margin-top: 12px; color: var(--ink-muted); font-size: var(--fs-small); }
@media (max-width: 960px) {
  .about__grid { grid-template-columns: 1fr; }
  .approach { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
  .approach { grid-template-columns: 1fr 1fr; gap: 10px; margin-top: var(--s6); }
  .approach li { padding: 14px 12px; border-radius: 14px; }
  .approach__icon { width: 30px; height: 30px; }
  .approach h3 { margin-top: 10px; font-size: 1.15rem; }
  .approach p { margin-top: 6px; font-size: .8125rem; line-height: 1.45; }
  .facts div { grid-template-columns: 1fr; gap: 2px; }
}

/* ---------- Experience ---------- */
.experience { background: var(--choc); color: var(--on-choc); }
/* Vertical timeline: newest first. Each <li class="role"> is self-contained. */
.roles { list-style: none; margin-top: var(--s6); position: relative; }
.roles::before {
  content: ""; position: absolute; top: 12px; bottom: 12px; left: calc(14rem + var(--s4) + 7px);
  width: 1px; background: var(--rule-on-choc);
}
.role {
  position: relative; display: grid; grid-template-columns: 14rem minmax(0, 1fr); column-gap: calc(var(--s4) * 2 + 16px);
  padding-bottom: var(--s6);
}
.role:last-child { padding-bottom: 0; }
.role::before {
  content: ""; position: absolute; top: 6px; left: calc(14rem + var(--s4)); width: 15px; height: 15px; border-radius: 50%;
  background: var(--choc); border: 2px solid var(--butter);
}
.role--current::before { background: var(--butter); box-shadow: 0 0 0 6px rgba(243, 210, 122, .18); }
.role__side { text-align: right; padding-top: 4px; }
.role__date { font-size: var(--fs-label); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--butter); }
.role__place { margin-top: 4px; color: var(--on-choc-muted); font-size: var(--fs-small); }
.role__main { max-width: 52rem; padding-bottom: var(--s5); border-bottom: 1px solid var(--rule-on-choc); }
.role:last-child .role__main { border-bottom: 0; padding-bottom: 0; }
.role__title { font-size: clamp(2rem, 1.3rem + 2.2vw, 3.5rem); }
.role__org { margin-top: 10px; font-weight: 600; font-size: 1.125rem; }
.role__points { list-style: none; margin-top: var(--s3); display: grid; gap: 10px; }
.role__points li { position: relative; padding-left: 20px; color: var(--on-choc-muted); max-width: 64ch; }
.role__points li::before { content: ""; position: absolute; left: 0; top: .8em; width: 8px; height: 1px; background: var(--butter); }
@media (max-width: 760px) {
  .roles::before { left: 7px; }
  .role { grid-template-columns: 1fr; padding-left: var(--s5); padding-bottom: var(--s5); }
  .role::before { left: 0; top: 4px; }
  .role__side { text-align: left; padding-top: 0; margin-bottom: var(--s2); display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; }
  .role__place { margin-top: 0; }
}

/* ---------- Skills ---------- */
.skills { background: var(--cream); overflow: hidden; }
.pills { margin-top: var(--s5); display: grid; gap: 12px; }
.pills__row { display: inline-flex; width: max-content; gap: 12px; animation: marquee 46s linear infinite; }
.pills__row--reverse { animation-direction: reverse; }
.pills__row span {
  flex: none; padding: 14px 26px; border-radius: 999px; border: 1px solid var(--choc);
  font: 800 clamp(1.25rem, .9rem + 1.4vw, 2rem)/1 var(--font-display); font-variation-settings: "wdth" 62; text-transform: uppercase;
}
.pills__row span:nth-child(3n+1) { background: var(--choc); color: var(--cream); }
.pills__row span:nth-child(3n+2) { background: var(--butter); border-color: var(--butter); color: var(--choc-deep); }

.skill-groups { margin-top: var(--s6); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); }
.skill-groups article { border-top: 2px solid var(--choc); padding-top: var(--s2); }
.skill-groups h3 { font-size: 1.75rem; min-height: 2em; }
.skill-groups ul { list-style: none; margin-top: var(--s2); }
.skill-groups li { padding: 10px 0; border-bottom: 1px solid var(--rule); }
@media (max-width: 860px) { .skill-groups { grid-template-columns: 1fr; gap: var(--s5); } .skill-groups h3 { min-height: 0; } }

/* ---------- Training ---------- */
.training { background: var(--cream-2); }
.training__grid { margin-top: var(--s6); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); }
.t-card {
  background: var(--card); border-radius: var(--radius); padding: var(--s3); box-shadow: 0 0 0 1px var(--rule);
  display: flex; flex-direction: column; gap: var(--s4); min-height: 200px; transition: transform .3s var(--ease);
}
.t-card:hover { transform: translateY(-4px); }
.t-card__meta { display: flex; justify-content: space-between; gap: 12px; font-size: var(--fs-label); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--caramel-ink); }
.t-card h3 { margin-top: auto; font-size: clamp(1.6rem, 1.3rem + .8vw, 2.1rem); }
.t-card--feature { grid-row: span 2; background: var(--choc); color: var(--on-choc); box-shadow: none; }
.t-card--feature .t-card__meta { color: var(--butter); }
.t-card--feature h3 { font-size: clamp(2.4rem, 1.6rem + 2.4vw, 4rem); }
.t-card--feature > p:last-child { color: var(--on-choc-muted); margin-top: -12px; }
@media (max-width: 960px) { .training__grid { grid-template-columns: 1fr 1fr; } .t-card--feature { grid-column: 1 / -1; grid-row: auto; min-height: 280px; } }
@media (max-width: 560px) {
  .training__grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .t-card { min-height: 0; padding: 14px 12px; gap: var(--s2); border-radius: 14px; }
  .t-card h3 { font-size: 1.15rem; }
  .t-card--feature { min-height: 0; }
  .t-card--feature h3 { font-size: 1.75rem; }
}

/* Education: degree + certificate side by side */
.training__grid--edu { grid-template-columns: 1.4fr 1fr; }
.training__grid--edu .t-card--feature { grid-row: auto; }
@media (max-width: 960px) { .training__grid--edu { grid-template-columns: 1fr; } }

/* ---------- Workshops & masterclasses ---------- */
.workshops { background: var(--cream); }
.section-lede { margin-top: var(--s3); max-width: 36em; font-size: var(--fs-lede); color: var(--ink-muted); }
.ws-list { list-style: none; margin-top: var(--s6); display: grid; align-items: stretch; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); }
.ws-card {
  background: var(--card); border-radius: var(--radius); padding: var(--s4) var(--s3) var(--s3);
  box-shadow: 0 0 0 1px var(--rule); display: flex; flex-direction: column;
}
.ws-card__meta { display: flex; justify-content: space-between; font-size: var(--fs-label); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--caramel-ink); }
.ws-card h3 { margin-top: var(--s4); font-size: clamp(1.75rem, 1.3rem + 1.2vw, 2.5rem); }
.ws-card__chef { margin-top: 8px; font-weight: 600; }
.ws-card__text { margin-top: var(--s2); margin-bottom: var(--s3); color: var(--ink-muted); font-size: var(--fs-small); }
/* Fixed-size photo area so every workshop card matches */
.ws-card__photos { margin-top: auto; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 8px; height: 200px; }
@media (max-width: 600px) { .ws-card__photos { height: 150px; gap: 6px; } }
.ws-card__photos:empty { display: none; }
.ws-card__photos img { width: 100%; height: 100%; min-height: 0; object-fit: cover; object-position: center 30%; border-radius: 10px; }

@media (max-width: 960px) { .ws-list { grid-template-columns: 1fr; } }
@media (max-width: 600px) { .ws-card { padding: var(--s3) var(--s2) var(--s2); } .ws-card h3 { font-size: 1.5rem; margin-top: var(--s2); } }

/* ---------- Contact ---------- */
.contact { position: relative; background: var(--choc-deep); color: var(--on-choc); padding-top: calc(var(--section-y) + var(--s6)); padding-bottom: var(--section-y); overflow: hidden; }
.ribbon--contact { top: var(--s5); transform: rotate(-3deg); }
.contact__title { font-size: clamp(3.5rem, 1rem + 12vw, 13rem); line-height: .85; }
.contact__email {
  display: inline-block; margin-top: var(--s5); font-size: clamp(1.75rem, .8rem + 4vw, 4.5rem); color: var(--butter);
  text-transform: none; text-decoration: none; word-break: break-word;
  background: linear-gradient(currentColor, currentColor) left bottom / 0 3px no-repeat; padding-bottom: 6px;
  transition: background-size .45s var(--ease);
}
.contact__email:hover, .contact__email:focus-visible { background-size: 100% 3px; }
.contact__list { list-style: none; margin-top: var(--s6); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gap); }
.contact__list li { border-top: 1px solid var(--rule-on-choc); padding-top: 14px; display: grid; gap: 4px; }
.contact__list span, .contact__langs > span { font-size: var(--fs-label); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--on-choc-muted); }
.contact__list a { text-decoration-color: var(--rule-on-choc); }
.contact__list a:hover { color: var(--butter); text-decoration-color: currentColor; }
.contact__langs { margin-top: var(--s5); font-size: var(--fs-small); color: var(--on-choc-muted); }
.contact__langs > span { margin-right: 12px; }
@media (max-width: 860px) { .contact__list { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .contact__list { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */
.site-footer { background: var(--choc-deep); color: var(--on-choc-muted); font-size: var(--fs-small); border-top: 1px solid var(--rule-on-choc); }
.site-footer__inner { display: flex; justify-content: space-between; gap: var(--s2); flex-wrap: wrap; padding-block: var(--s3); }
.site-footer a { color: var(--on-choc); text-decoration: none; }
.site-footer a:hover { color: var(--butter); }

/* ---------- Floating pastry illustrations ---------- */
.has-doodles { position: relative; }
.has-doodles > .container, .has-doodles > .hero__band { position: relative; z-index: 1; }
.doodles { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.doodle {
  position: absolute; left: var(--x); top: var(--y); width: var(--s, 72px); height: var(--s, 72px);
  color: var(--caramel); opacity: .55; stroke-width: 1.4;
  transform: rotate(var(--r, 0deg));
  animation: doodle-float 7s ease-in-out var(--d, 0s) infinite alternate;
}
.on-dark .doodle { color: var(--butter); opacity: .4; }
@keyframes doodle-float {
  from { transform: translateY(-6px) rotate(var(--r, 0deg)); }
  to   { transform: translateY(8px) rotate(calc(var(--r, 0deg) + 6deg)); }
}
@media (max-width: 760px) {
  .doodle { width: calc(var(--s, 72px) * .6); height: calc(var(--s, 72px) * .6); opacity: .35; }
  .on-dark .doodle { opacity: .28; }
  .doodle--desk { display: none; }
}

/* ---------- Circle cursor (mouse/trackpad only; added by main.js) ---------- */
.has-cursor, .has-cursor * { cursor: none !important; }
.cursor {
  position: fixed; top: 0; left: 0; z-index: 1000; pointer-events: none;
  width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%;
  background: #fff; mix-blend-mode: difference;
  transition: width .25s var(--ease), height .25s var(--ease), margin .25s var(--ease), opacity .2s;
  will-change: transform;
}
.cursor.is-hover { width: 56px; height: 56px; margin: -28px 0 0 -28px; }
.cursor.is-down { width: 12px; height: 12px; margin: -6px 0 0 -6px; }
.cursor.is-hidden { opacity: 0; }

/* ---------- Load + scroll motion ---------- */
.js .hero__title .line > span { transform: translateY(105%); transition: transform 1s var(--ease-out); }
.js .hero__title .line:last-child > span { transition-delay: .1s; }
.js .is-loaded .hero__title .line > span { transform: none; }
.js .hero__copy > :not(h1), .js .hero__photo, .js .hero__band { opacity: 0; transition: opacity .8s var(--ease) .35s, transform .8s var(--ease) .35s; }
.js .hero__photo { transform: translateY(24px); }
.js .is-loaded .hero__copy > :not(h1), .js .is-loaded .hero__photo, .js .is-loaded .hero__band { opacity: 1; }
.js .is-loaded .hero__photo { transform: none; }

.js [data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.js [data-reveal].is-in { opacity: 1; transform: none; }
.js .work__grid > :nth-child(4n+2), .js .approach > :nth-child(2), .js .skill-groups > :nth-child(2) { transition-delay: .07s; }
.js .work__grid > :nth-child(4n+3), .js .approach > :nth-child(3), .js .skill-groups > :nth-child(3) { transition-delay: .14s; }
.js .approach > :nth-child(4) { transition-delay: .21s; }

/* ---------- Phone type scale (nothing below 12px) ---------- */
@media (max-width: 600px) {
  :root {
    --fs-small: .8125rem;   /* 13px */
    --fs-body: .9375rem;    /* 15px */
    --fs-lede: 1.0625rem;   /* 17px */
    --fs-section: 2.75rem;  /* 44px */
  }
  .hero__title { font-size: 4.5rem; }
  .statement { font-size: 1.75rem; line-height: 1; }
  .menu__links a { font-size: 2.5rem; }
  .ribbon { font-size: 1.125rem; }
  .pills__row span { font-size: 1rem; padding: 10px 18px; }
  .role__title { font-size: 1.75rem; }
  .role__org { font-size: 1rem; }
  .skill-groups h3 { font-size: 1.35rem; }
  .t-card h3 { font-size: 1.05rem; }
  .t-card--feature h3 { font-size: 1.5rem; }
  .contact__title { font-size: 2.75rem; }
  .contact__email { font-size: 1.35rem; margin-top: var(--s4); }
  .work-item__title { font-size: .95rem; }
  .btn { min-height: 46px; padding: 0 20px; }
  .facts dd, .about__body .lede { font-size: var(--fs-lede); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
  .js .hero__title .line > span, .js [data-reveal] { transform: none; opacity: 1; }
  .js .hero__copy > :not(h1), .js .hero__photo, .js .hero__band { opacity: 1; transform: none; }
  .hero__photo-media { transform: rotate(-2deg); }
  .statement .w { color: var(--choc); }
  .menu__links a { transform: none; }
  .work-item:hover .work-item__media > img, .work-item:hover .placeholder__art, .t-card:hover, .btn:hover { transform: none; }
}
