/* ============================================================
   Design Projects — styles
   Palette: drafting paper, ink, cutting-mat green, marker yellow
   ============================================================ */

:root {
  --paper: #ECEEE9;
  --paper-2: #E1E4DD;
  --ink: #15171C;
  --ink-soft: #4A4F57;
  --pencil: #8A8F93;
  --mat: #1E5A45;
  --mat-deep: #174836;
  --mat-line: rgba(196, 232, 210, 0.16);
  --mat-line-strong: rgba(196, 232, 210, 0.3);
  --mat-print: #C9E4D3;
  --marker: #F2D640;

  --f-display: "Anybody", "Arial Narrow", sans-serif;
  --f-body: "Instrument Sans", system-ui, sans-serif;
  --f-mono: "DM Mono", ui-monospace, monospace;
  --f-hand: "Reenie Beanie", cursive;

  --gutter: clamp(16px, 4vw, 56px);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 17px;
  line-height: 1.55;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; cursor: pointer; }

:focus-visible {
  outline: 3px solid var(--marker);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  background: var(--marker);
  color: var(--ink);
  padding: 8px 14px;
  font-family: var(--f-mono);
  font-size: 14px;
}
.skip:focus { top: 12px; }

/* ---------- Header ---------- */
.site-header {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 50;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px var(--gutter);
  pointer-events: none;
}
.site-header > * { pointer-events: auto; }

.logo {
  display: flex;
  align-items: center;
  padding: 5px 12px;
  background: #fff;
  border: 1.5px solid var(--ink);
}
.logo img { height: 44px; width: auto; }
.dept {
  display: inline-block;
  font-family: var(--f-mono);
  font-size: 16px;
  line-height: 1.3;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 16px 22px;
  background: var(--paper);
  color: var(--ink);
  border: 1.5px solid var(--ink);
  text-decoration: none;
}
.dept { transition: background 0.2s, color 0.2s; }
.dept:hover { background: var(--ink); color: var(--paper); }

/* Menu bar: stays at the top while scrolling (bottom on phones) */
.menu {
  position: fixed;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 60;
  display: flex;
  background: var(--paper);
  border: 1.5px solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
}
.menu a {
  font-family: var(--f-mono);
  font-size: 13px;
  line-height: 1.3;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  padding: 16px 16px;
  color: var(--ink);
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}
.menu a + a { border-left: 1.5px solid var(--ink); }
.menu a:hover { background: var(--ink); color: var(--paper); }

/* Menu letters: same "sketch, then print" as the DESIGN letters. Each letter
   fades in as faint pencil, then a solid copy prints up behind a yellow
   nozzle line — letter by letter on load, and again on hover. */
.menu .ml {
  position: relative;
  display: inline-block;
  color: var(--pencil);
  opacity: 0;
  animation: sketch-in 0.35s var(--ease-out) calc(0.3s + var(--i) * 0.04s) forwards;
}
.menu .ml::after {
  content: attr(data-l);
  content: attr(data-l) / "";
  position: absolute;
  inset: 0;
  color: var(--ink);
  clip-path: inset(100% 0 0 0);
  animation: print 0.4s steps(6) calc(0.6s + var(--i) * 0.05s) forwards;
}
.menu .ml::before {
  content: "";
  position: absolute;
  left: -1px;
  right: -1px;
  bottom: 0;
  height: 2px;
  background: var(--marker);
  opacity: 0;
  z-index: 1;
  animation:
    nozzle 0.4s steps(6) calc(0.6s + var(--i) * 0.05s) forwards,
    nozzle-off 0.1s linear calc(1s + var(--i) * 0.05s) forwards;
}
.menu a:hover .ml { color: rgba(236, 238, 233, 0.3); }
.menu a:hover .ml::after { color: var(--paper); }
.menu--ready .ml { animation: none; opacity: 1; }
.menu--ready .ml::after { animation: none; clip-path: inset(0 0 0 0); }
.menu--ready .ml::before { animation: none; }
.menu--ready a:hover .ml::after { animation: print 0.3s steps(5) calc(var(--j) * 0.035s) backwards; }
.menu--ready a:hover .ml::before { animation: nozzle 0.3s steps(5) calc(var(--j) * 0.035s); }
@media (min-width: 761px) and (max-width: 1000px) {
  .menu a { font-size: 11px; padding: 16px 10px; }
}

/* Design Team: each team member's name rolls up into the block,
   then it lands on "Design Team" with a yellow flash. */
.dept--team { animation: team-land 0.6s ease-out 3.6s; }
.dept__window { display: block; height: 1.3em; overflow: hidden; }
.dept__reel {
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: team-roll 3.4s var(--ease-out) 0.5s both;
}
.dept__reel > span { height: 1.3em; white-space: nowrap; }
@keyframes team-roll {
  0%       { transform: translateY(16.667%); }   /* empty: the first name waits below */
  8%, 16%  { transform: translateY(0); }         /* Dev */
  24%, 32% { transform: translateY(-16.667%); }  /* Ishitha */
  40%, 48% { transform: translateY(-33.333%); }  /* Chaitra */
  56%, 64% { transform: translateY(-50%); }      /* Sushma */
  72%, 80% { transform: translateY(-66.667%); }  /* Suhail */
  92%, 100% { transform: translateY(-83.333%); } /* Design Team */
}
@keyframes team-land { from { background: var(--marker); } }

/* ---------- Hero: cutting mat ---------- */
.mat {
  position: relative;
  min-height: 100svh;
  background-color: var(--mat);
  background-image:
    linear-gradient(var(--mat-line-strong) 1px, transparent 1px),
    linear-gradient(90deg, var(--mat-line-strong) 1px, transparent 1px),
    linear-gradient(var(--mat-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--mat-line) 1px, transparent 1px);
  background-size: 120px 120px, 120px 120px, 24px 24px, 24px 24px;
  background-position: 28px 28px;
  color: var(--paper);
  overflow: hidden;
  display: grid;
  place-items: center;
  padding: 120px var(--gutter) 80px;
}

/* Ruler edges, like the printed scale on a real mat */
.mat__ruler {
  position: absolute;
  color: var(--mat-print);
  font-family: var(--f-mono);
  font-size: 10px;
  pointer-events: none;
}
.mat__ruler--top {
  top: 0; left: 28px; right: 0;
  height: 28px;
  background-image:
    linear-gradient(90deg, var(--mat-print) 1px, transparent 1px),
    linear-gradient(90deg, var(--mat-print) 1px, transparent 1px);
  background-size: 120px 14px, 24px 7px;
  background-repeat: repeat-x;
  background-position: 0 bottom, 0 bottom;
  opacity: 0.55;
}
.mat__ruler--left {
  top: 28px; left: 0; bottom: 0;
  width: 28px;
  background-image:
    linear-gradient(var(--mat-print) 1px, transparent 1px),
    linear-gradient(var(--mat-print) 1px, transparent 1px);
  background-size: 14px 120px, 7px 24px;
  background-repeat: repeat-y;
  background-position: right 0, right 0;
  opacity: 0.55;
}
.mat__ruler span { position: absolute; }

/* Roller: ruler-style scrollbar on the left. Numbers and ticks on both sides of a paper channel;
   the green fill grows as you scroll, the needle handle spins and can be dragged. */
.roller {
  --tick: var(--ink-soft);
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 40;
  width: 48px;
  background:
    linear-gradient(var(--tick) 1.5px, transparent 1.5px) 12px 0 / 12px 24px repeat-y,
    linear-gradient(var(--tick) 1px, transparent 1px) 18px 12px / 6px 24px repeat-y,
    linear-gradient(var(--tick) 1px, transparent 1px) 38px 6px / 6px 24px repeat-y,
    linear-gradient(var(--tick) 1.5px, transparent 1.5px) 38px 18px / 10px 24px repeat-y,
    var(--paper-2);
  border-right: 1.5px solid var(--ink);
  cursor: grab;
  touch-action: none;
  user-select: none;
}
.roller.is-rolling { cursor: grabbing; }
.roller__nums span {
  position: absolute;
  left: 3px;
  transform: translateY(3px);
  font-family: var(--f-mono);
  font-size: 10px;
  line-height: 1;
  color: var(--ink-soft);
}
.roller__channel {
  position: absolute;
  top: 0; bottom: 0; left: 24px;
  width: 14px;
  background: var(--paper);
  border-left: 1px solid rgba(21, 23, 28, 0.2);
  border-right: 1px solid rgba(21, 23, 28, 0.2);
  overflow: hidden;
}
.roller__fill {
  display: block;
  height: var(--y, 8px);
  border-radius: 7px 7px 0 0;
  background: var(--mat);
}
/* the handle: a scale needle on an orange hub, centred on the channel */
.roller__knob {
  position: absolute;
  top: var(--y, 12px);
  left: 31px;
  width: 40px;
  height: 40px;
  overflow: visible;
  transform: translate(-50%, -50%);
  transition: scale 0.2s var(--ease-out);
  /* a pale edge keeps the black needle visible over the green fill */
  filter: drop-shadow(0 0 0.7px var(--paper)) drop-shadow(0 0 0.7px var(--paper)) drop-shadow(0 1px 1.5px rgba(21, 23, 28, 0.35));
}
.roller__needle {
  fill: var(--ink);
  transform-origin: 50px 50px;
  transition: transform 0.7s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.roller__hub { fill: #E0962F; stroke: var(--ink); stroke-width: 2; }
.roller__pivot { fill: var(--ink); }
.roller:hover .roller__knob,
.roller.is-rolling .roller__knob { scale: 1.12; }
/* it takes the browser scrollbar's place; phones keep their own (they hide it anyway) */
@media (min-width: 761px) {
  html.has-roller { scrollbar-width: none; }
  html.has-roller::-webkit-scrollbar { display: none; }
  html.has-roller body { padding-left: 48px; }
  html.has-roller .site-header { left: 48px; }
  html.has-roller .menu { left: calc(50% + 24px); }
  /* the roller replaces the hero mat's own left ruler */
  html.has-roller .mat__ruler--left { display: none; }
  html.has-roller .mat__ruler--top { left: 0; }
}
@media (max-width: 760px) { .roller { display: none; } }

.mat__ruler--top span { top: 2px; transform: translateX(4px); }
.mat__ruler--left span { left: 3px; transform: translateY(3px); }

.hero {
  position: relative;
  width: 100%;
  max-width: 1400px;
  text-align: center;
}

/* "bricolage (n.) — ..." above DESIGN. Each word is a loose scrap that flies in,
   lands with a small bounce and keeps a slight tilt, like pieces stuck on by hand. */
.hero__def {
  margin: 0 auto clamp(24px, 4vw, 56px);
  max-width: 34ch;
  font-family: var(--f-hand);
  font-size: clamp(26px, 3vw, 44px);
  line-height: 1.15;
  color: var(--marker);
}
.hero__def b { font-weight: 400; text-decoration: underline; text-underline-offset: 4px; }
.scrap {
  display: inline-block;
  opacity: 0;
  transform: translate(var(--x), var(--y)) rotate(var(--r)) scale(1.25);
  animation: scrap-in 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) calc(3.1s + var(--n) * 0.06s) forwards;
}
@keyframes scrap-in {
  60% { opacity: 1; }
  to  { opacity: 1; transform: rotate(calc(var(--r) * 0.15)); }
}

.hero__stack { position: relative; }

.hero__lets {
  position: absolute;
  left: 2%;
  top: -0.2em;
  margin: 0;
  font-family: var(--f-hand);
  font-size: clamp(48px, 8vw, 120px);
  line-height: 1;
  color: var(--marker);
  transform: rotate(-8deg);
  opacity: 0;
  animation: write 0.7s var(--ease-out) 2.3s forwards;
  z-index: 2;
}

@keyframes write {
  from { opacity: 0; transform: rotate(-8deg) translateY(10px); clip-path: inset(0 100% 0 0); }
  to   { opacity: 1; transform: rotate(-8deg) translateY(0);   clip-path: inset(0 0 0 0); }
}

.hero__word {
  position: relative;
  display: inline-block;
  margin: 0;
  font-family: var(--f-display);
  font-weight: 800;
  font-size: clamp(72px, 19vw, 300px);
  line-height: 0.82;
  letter-spacing: -0.02em;
  white-space: nowrap;
  user-select: none;
}

/* Each letter: an outline "sketch" with a solid "print" layer on top */
.l {
  position: relative;
  display: inline-block;
  color: transparent;
  -webkit-text-stroke: 2px var(--mat-print);
  font-variation-settings: "wdth" 100, "wght" 800;
  transition: font-variation-settings 0.5s var(--ease-out);
  opacity: 0;
  animation: sketch-in 0.5s var(--ease-out) calc(0.15s + var(--i) * 0.08s) forwards;
}
.l::after {
  content: attr(data-l);
  position: absolute;
  inset: 0;
  color: var(--paper);
  -webkit-text-stroke: 0;
  clip-path: inset(100% 0 0 0);
  animation: print 1.1s steps(22) calc(0.8s + var(--i) * 0.14s) forwards;
}
/* The "nozzle" line travelling up as each letter prints */
.l::before {
  content: "";
  position: absolute;
  left: -2%;
  right: -2%;
  bottom: 0;
  height: 3px;
  background: var(--marker);
  opacity: 0;
  z-index: 1;
  animation:
    nozzle 1.1s steps(22) calc(0.8s + var(--i) * 0.14s) forwards,
    nozzle-off 0.2s linear calc(1.9s + var(--i) * 0.14s) forwards;
}

@keyframes sketch-in {
  from { opacity: 0; transform: translateY(0.06em) rotate(-1deg); }
  to   { opacity: 1; transform: none; }
}
@keyframes print {
  from { clip-path: inset(100% 0 0 0); }
  to   { clip-path: inset(0 0 0 0); }
}
@keyframes nozzle {
  from { bottom: 0; opacity: 1; }
  to   { bottom: 100%; opacity: 1; }
}
@keyframes nozzle-off { to { opacity: 0; } }

/* Dimension line under the word, like a technical drawing */
.dim {
  position: relative;
  margin: clamp(18px, 3vw, 36px) auto 0;
  width: 86%;
  height: 22px;
  display: flex;
  justify-content: center;
  align-items: center;
}
.dim__line {
  position: absolute;
  left: 0; right: 0; top: 50%;
  height: 1.5px;
  background: var(--mat-print);
  transform: scaleX(0);
  animation: grow 0.9s var(--ease-out) 2s forwards;
}
.dim__line::before,
.dim__line::after {
  content: "";
  position: absolute;
  top: -8px;
  width: 1.5px;
  height: 17px;
  background: var(--mat-print);
}
.dim__line::before { left: 0; }
.dim__line::after { right: 0; }
.dim__label {
  position: relative;
  background: var(--mat);
  padding: 0 14px;
  font-family: var(--f-mono);
  font-size: clamp(11px, 1.2vw, 14px);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--mat-print);
  opacity: 0;
  animation: fade 0.6s ease 2.5s forwards;
}
@keyframes grow { to { transform: scaleX(1); } }
@keyframes fade { to { opacity: 1; } }

/* The one line that says what this site is: bright and large, so it reads before anything else below DESIGN. */
.hero__what {
  margin: clamp(16px, 2.4vw, 32px) auto 0;
  font-size: clamp(22px, 2.2vw, 30px);
  font-weight: 600;
  line-height: 1.2;
  text-wrap: balance;
  color: var(--paper);
  opacity: 0;
  animation: fade 0.6s ease 2.7s forwards;
}
/* "design" picked out in the marker handwriting, like "Let's" above */
.hero__what-design {
  font-family: var(--f-hand);
  font-size: 1.7em;
  font-weight: 400;
  line-height: 0;
  color: var(--marker);
}
.hero__sub {
  margin: 14px auto 0;
  max-width: 46ch;
  font-size: clamp(16px, 1.6vw, 20px);
  color: var(--mat-print);
  opacity: 0;
  animation: fade 0.6s ease 2.9s forwards;
}
.hero__cta {
  opacity: 0;
  animation: fade 0.6s ease 3.1s forwards;
}

/* MYP / DP — written straight onto the mat with a paint marker.
   They sit inside the DESIGN heading: MYP above its end, DP just below it. */
.sticker {
  position: absolute;
  z-index: 5;
  padding: 0.04em 0.12em;
  line-height: 1;
  user-select: none;
  pointer-events: none;
  rotate: var(--r);
  opacity: 0;
  animation: fade 0.01s linear forwards;
}
.sticker--myp { top: -0.3em; right: -0.3em; --r: 6deg; animation-delay: 2.3s; }
.sticker--dp  { bottom: -0.2em; right: -0.24em; --r: -5deg; animation-delay: 2.7s; }
.sticker__text {
  display: block;
  font-family: var(--f-hand);
  font-weight: 400;
  font-size: 0.34em;
  letter-spacing: 0;
  color: var(--marker);
  clip-path: inset(0 100% 0 0);
  animation: scribble 0.6s steps(12) forwards;
  animation-delay: inherit;
}
.sticker__ring {
  position: absolute;
  inset: -12% -14%;
  width: 128%;
  height: 124%;
  overflow: visible;
  fill: none;
  stroke: var(--marker);
  stroke-width: 2.5;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: ring 0.7s var(--ease-out) forwards;
  animation-delay: inherit;
}
@keyframes scribble { to { clip-path: inset(0 0 0 0); } }
@keyframes ring { to { stroke-dashoffset: 0; } }

/* ---------- Shared section bits ---------- */
.section-label {
  margin: 0 0 clamp(24px, 3vw, 40px);
  font-family: var(--f-mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}
.reveal.in { opacity: 1; transform: none; }

/* ---------- Explore: three ways into The work, side by side just above it ---------- */
.explore {
  padding: clamp(48px, 6vw, 88px) var(--gutter);
}
.explore__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1.5px solid var(--ink);
}
.explore__list li { border-bottom: 1.5px solid var(--ink); }
.explore__list li + li { border-left: 1.5px solid var(--ink); }

.explore__row {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas: "q arrow" "meta arrow";
  align-items: start;
  gap: 8px 16px;
  width: 100%;
  height: 100%;
  padding: 18px clamp(10px, 1.4vw, 20px) 20px;
  background: none;
  border: 0;
  text-align: left;
  overflow: hidden;
  isolation: isolate;
}
.explore__row::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--mat);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.45s var(--ease-out);
  z-index: -1;
}
.explore__q {
  grid-area: q;
  font-family: var(--f-display);
  font-size: clamp(26px, 2.4vw, 38px);
  line-height: 0.95;
  font-variation-settings: "wdth" 80, "wght" 700;
  transition: font-variation-settings 0.5s var(--ease-out), color 0.3s;
}
.explore__meta {
  grid-area: meta;
  font-family: var(--f-mono);
  font-size: 13px;
  color: var(--ink-soft);
  transition: color 0.3s;
}
.explore__arrow {
  grid-area: arrow;
  font-family: var(--f-display);
  font-size: clamp(24px, 2.4vw, 34px);
  line-height: 0.95;
  transition: transform 0.45s var(--ease-out), color 0.3s;
}

@media (hover: hover) {
  .explore__row:hover::before { transform: scaleY(1); }
  .explore__row:hover .explore__q { color: var(--paper); font-variation-settings: "wdth" 90, "wght" 800; }
  .explore__row:hover .explore__meta { color: var(--mat-print); }
  .explore__row:hover .explore__arrow { color: var(--marker); transform: translateX(-6px); }
}

/* ---------- About ---------- */
.about {
  padding: clamp(72px, 10vw, 140px) var(--gutter) clamp(48px, 6vw, 80px);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  max-width: 1400px;
}
.about__lead {
  margin: 0;
  max-width: 42ch;
  text-wrap: pretty;
  font-family: var(--f-display);
  font-variation-settings: "wdth" 90, "wght" 500;
  font-size: clamp(28px, 4.2vw, 60px);
  line-height: 1.08;
  letter-spacing: -0.01em;
}
/* Key words: a yellow highlighter swiped across, one after another */
.about__lead mark {
  color: inherit;
  padding: 0 0.1em;
  margin: 0 -0.05em;
  border-radius: 0.5em 0.2em 0.6em 0.25em;
  background: linear-gradient(100deg, transparent 0.5%, rgba(242, 214, 64, 0.9) 2.5%, rgba(242, 214, 64, 0.75) 96%, transparent 99.5%)
    no-repeat 0 65% / 0% 70%;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  transition: background-size 0.5s var(--ease-out);
}
.about__lead.in mark { background-size: 100% 70%; }

/* student names everywhere: bold, with the same yellow highlighter swipe */
.student {
  font-size: 1.2em;
  font-weight: 700;
  padding: 0 0.15em;
  margin: 0 -0.05em;
  border-radius: 0.5em 0.2em 0.6em 0.25em;
  background: linear-gradient(100deg, transparent 0.5%, rgba(242, 214, 64, 0.9) 2.5%, rgba(242, 214, 64, 0.75) 96%, transparent 99.5%)
    no-repeat 0 75% / 100% 60%;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
/* on a yellow sticky note the swipe is a deeper amber so it still shows */
.gallery .card__student.student {
  background-image: linear-gradient(100deg, transparent 0.5%, rgba(224, 150, 47, 0.55) 2.5%, rgba(224, 150, 47, 0.45) 96%, transparent 99.5%);
}
.about__lead.in mark:nth-of-type(1) { transition-delay: 0.5s; }
.about__lead.in mark:nth-of-type(2) { transition-delay: 0.8s; }
.about__lead.in mark:nth-of-type(3) { transition-delay: 1.1s; }
.about__lead.in mark:nth-of-type(4) { transition-delay: 1.4s; }

/* "makes something real." — written by hand in green, with a scribbled underline */
.about__lead em {
  display: inline-block;
  padding: 0 0.08em 0.14em;
  font-family: var(--f-hand);
  font-style: normal;
  font-size: 1.45em;
  line-height: 0.75;
  color: var(--mat);
  rotate: -2deg;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 12' preserveAspectRatio='none'%3E%3Cpath d='M3 8 C40 3 80 11 120 6 S180 4 197 7' fill='none' stroke='%231E5A45' stroke-width='2.5' stroke-linecap='round'/%3E%3C/svg%3E")
    no-repeat center bottom / 100% 0.2em;
  clip-path: inset(0 100% 0 0);
}
.about__lead.in em { animation: scribble 0.9s steps(16) 1.9s forwards; }
.about__body {
  margin: clamp(20px, 3vw, 36px) 0 0;
  max-width: 46ch;
  font-size: clamp(17px, 1.4vw, 20px);
  color: var(--ink-soft);
}

.cycle {
  list-style: none;
  margin: clamp(40px, 6vw, 72px) 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1.5px solid var(--ink);
}
.cycle li {
  position: relative;
  padding: 18px 16px 0 0;
}
.cycle li::before {
  content: "";
  position: absolute;
  top: -6px; left: 0;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--paper);
  border: 1.5px solid var(--ink);
}
.cycle__k {
  display: block;
  font-family: var(--f-display);
  font-variation-settings: "wdth" 110, "wght" 800;
  font-size: 32px;
  line-height: 1;
  color: var(--mat);
}
.cycle__v {
  display: block;
  margin-top: 6px;
  font-family: var(--f-mono);
  font-size: 13px;
  color: var(--ink-soft);
}

/* ---------- Gallery ---------- */
.gallery {
  padding: clamp(72px, 9vw, 120px) var(--gutter) clamp(80px, 10vw, 140px);
  background: var(--paper-2);
  border-top: 1.5px solid var(--ink);
}
.gallery__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  flex-wrap: wrap;
}
.gallery__title {
  margin: 0;
  font-family: var(--f-display);
  font-variation-settings: "wdth" 70, "wght" 800;
  font-size: clamp(56px, 10vw, 150px);
  line-height: 0.85;
  letter-spacing: -0.02em;
}
.gallery__count {
  margin: 0;
  font-family: var(--f-mono);
  font-size: 14px;
  color: var(--ink-soft);
}

.filters {
  position: sticky;
  top: 0;
  z-index: 20;
  margin: clamp(28px, 4vw, 48px) calc(var(--gutter) * -1) 0;
  padding: 16px var(--gutter);
  background: var(--paper-2);
  border-bottom: 1.5px solid var(--ink);
}

.tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.tab {
  padding: 8px 16px;
  background: transparent;
  border: 1.5px solid var(--ink);
  font-family: var(--f-mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: background 0.2s, color 0.2s;
}
.tab[aria-selected="true"] { background: var(--ink); color: var(--paper); }
@media (hover: hover) { .tab:hover:not([aria-selected="true"]) { background: var(--paper); } }
/* Laptops and tablets: when this bar sticks, the tabs stay to the left of the menu floating at the top centre */
@media (min-width: 761px) and (max-width: 1439px) {
  .tabs { max-width: calc(50vw - var(--gutter) - 219px); }
  .tab { padding: 8px 11px; }
}

.chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 6px;
  margin-top: 14px;
  min-height: 40px;
}
.chips__group {
  font-family: var(--f-hand);
  font-size: 24px;
  line-height: 1;
  color: var(--mat);
  margin: 0 4px 0 10px;
}
.chips__group:first-of-type { margin-left: 4px; }

.chip {
  padding: 7px 14px;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
  transition: background 0.2s, color 0.2s, transform 0.2s var(--ease-out);
}
.chip[aria-pressed="true"] { background: var(--marker); }
.chip:disabled { opacity: 0.35; cursor: default; }
@media (hover: hover) { .chip:hover:not(:disabled):not([aria-pressed="true"]) { transform: translateY(-2px); } }
.chip sup { font-family: var(--f-mono); font-size: 10px; margin-left: 3px; color: var(--ink-soft); }
.chips[hidden] { display: none; }

/* Grade filter drawn as a ruler — it's a real sequence */
.chips--ruler {
  gap: 0;
  align-items: stretch;
  border-bottom: 1.5px solid var(--ink);
  overflow-x: auto;
  scrollbar-width: none;
}
.chips--ruler::-webkit-scrollbar { display: none; }
.chips--ruler .chip {
  position: relative;
  flex: 1 0 auto;
  min-width: 72px;
  padding: 8px 10px 14px;
  border: 0;
  border-radius: 0;
  background: transparent;
  font-family: var(--f-display);
  font-variation-settings: "wdth" 90, "wght" 650;
  font-size: 17px;
  text-align: left;
}
.chips--ruler .chip::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 1.5px; height: 10px;
  background: var(--ink);
}
.chips--ruler .chip[aria-pressed="true"] { background: var(--marker); }
@media (hover: hover) { .chips--ruler .chip:hover:not(:disabled):not([aria-pressed="true"]) { transform: none; background: var(--paper); } }

.grid {
  list-style: none;
  margin: clamp(32px, 4vw, 56px) 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: clamp(20px, 2.5vw, 36px);
}

.card { position: relative; }
.card__btn {
  display: block;
  width: 100%;
  padding: 0;
  background: none;
  border: 0;
  text-align: left;
}
.card__media {
  display: block;
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border: 1.5px solid var(--ink);
  background: var(--paper);
}
.card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--ease-out);
}
.card__badges {
  position: absolute;
  top: 10px; left: 10px;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.card__badge {
  padding: 4px 9px;
  background: var(--paper);
  border: 1.5px solid var(--ink);
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.card__title {
  display: block;
  margin-top: 14px;
  font-family: var(--f-display);
  font-variation-settings: "wdth" 85, "wght" 700;
  font-size: 24px;
  line-height: 1.1;
}
.card__meta {
  display: block;
  margin-top: 6px;
  font-family: var(--f-mono);
  font-size: 12.5px;
  color: var(--ink-soft);
}
.card__note {
  position: absolute;
  right: 14px;
  bottom: 12px;
  z-index: 2;
  font-family: var(--f-hand);
  font-size: 28px;
  line-height: 1;
  color: var(--marker);
  opacity: 0;
  transform: translateY(6px) rotate(-4deg);
  transition: opacity 0.3s, transform 0.4s var(--ease-out);
}
@media (hover: hover) {
  .card__btn:hover .card__media img,
  .card__btn:hover .ph__word { transform: scale(1.05); }
  .card__btn:hover .card__note { opacity: 1; transform: translateY(0) rotate(-4deg); }
}
.card__btn:focus-visible .card__note { opacity: 1; transform: none; }

/* ---------- Whiteboard: each project pinned up with a sticky note ---------- */
.gallery .grid {
  padding: clamp(28px, 4vw, 56px) clamp(18px, 3vw, 44px) clamp(40px, 5vw, 64px);
  row-gap: clamp(44px, 5vw, 64px);
  background:
    linear-gradient(115deg, rgba(255, 255, 255, 0.85) 0%, transparent 35%, rgba(255, 255, 255, 0.5) 55%, transparent 80%),
    linear-gradient(rgba(21, 23, 28, 0.05) 1px, transparent 1px) 0 0 / 32px 32px,
    linear-gradient(90deg, rgba(21, 23, 28, 0.05) 1px, transparent 1px) 0 0 / 32px 32px,
    #F3F5F4;
  border: 10px solid #C3C8CC;
  border-radius: 6px;
  box-shadow: inset 0 0 0 1px #A9AFB4, inset 0 2px 14px rgba(0, 0, 0, 0.06), 0 2px 0 #9FA5AA;
}
.gallery .card { --tilt: -1.2deg; max-width: 600px; }
.gallery .card:nth-child(4n + 2) { --tilt: 1.4deg; }
.gallery .card:nth-child(4n + 3) { --tilt: -0.6deg; }
.gallery .card:nth-child(4n + 4) { --tilt: 2deg; }
.gallery .card__btn {
  rotate: var(--tilt);
  transition: rotate 0.4s var(--ease-out), translate 0.4s var(--ease-out);
}
/* the push-pin */
.gallery .card__btn::before {
  content: "";
  position: absolute;
  top: -9px;
  left: 50%;
  z-index: 4;
  width: 18px;
  height: 18px;
  margin-left: -9px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #F27A6E, #C8352A 55%, #8E2018);
  box-shadow: 2px 4px 4px rgba(0, 0, 0, 0.3);
}
/* the photo, printed with a white border */
.gallery .card__media {
  border: 8px solid #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15), 0 8px 18px rgba(0, 0, 0, 0.14);
}
/* the sticky note, stuck over the bottom of the photo */
.gallery .card__sticky {
  position: relative;
  z-index: 3;
  display: block;
  width: 82%;
  margin: -34px 0 0 auto;
  padding: 12px 14px 14px;
  background: linear-gradient(170deg, #FBE57A, #F2D640 70%, #E8C92E);
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.12), 0 6px 10px -4px rgba(0, 0, 0, 0.25);
  rotate: calc(var(--tilt) * -2);
}
.gallery .card__title {
  margin: 0;
  font-family: var(--f-hand);
  font-variation-settings: normal;
  font-size: 36px;
  line-height: 0.9;
  color: var(--ink);
  -webkit-text-stroke: 0.5px currentColor;
}
.gallery .card__meta {
  margin-top: 4px;
  font-family: var(--f-hand);
  font-size: 25px;
  line-height: 1;
  color: #4A3F12;
  -webkit-text-stroke: 0.3px currentColor;
}
/* the student's name in bold print, so it stands apart from the handwriting */
.gallery .card__student {
  font-family: var(--f-body);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--ink);
  -webkit-text-stroke: 0;
}
/* the grade is typed too: handwritten digits are easy to misread (1 / I, 2 / z) */
.gallery .card__grade {
  font-family: var(--f-mono);
  font-size: 14px;
  letter-spacing: 0.02em;
  -webkit-text-stroke: 0;
}
/* paper labels stuck on at an angle, hanging off the photo's edges */
.gallery .card__badges {
  top: -14px;
  left: -14px;
  z-index: 5;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}
.gallery .card__badge,
.gallery .best-tag {
  padding: 2px 10px 0;
  border: 0;
  background: #fff;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.12), 0 4px 8px -2px rgba(0, 0, 0, 0.25);
  font-family: var(--f-hand);
  font-size: 25px;
  line-height: 1.1;
  letter-spacing: 0;
  text-transform: none;
  -webkit-text-stroke: 0.4px currentColor;
  rotate: -8deg;
}
.gallery .card__badge { color: #1F4FB4; }
.gallery .card__badge--led { color: var(--mat); rotate: -3deg; }
.gallery .best-tag { top: 18px; right: -16px; z-index: 5; color: #C8352A; rotate: 8deg; }
@media (hover: hover) {
  .gallery .card__btn:hover { rotate: 0deg; translate: 0 -4px; }
}

/* Placeholder art until real photos are added */
.ph {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  background-image:
    linear-gradient(var(--ph-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--ph-line) 1px, transparent 1px);
  background-size: 20px 20px;
  container-type: inline-size;
}
.ph--physical { background-color: var(--mat); --ph-line: var(--mat-line); --ph-ink: var(--mat-print); color: var(--ph-ink); }
.ph--digital  { background-color: var(--ink); --ph-line: rgba(255,255,255,.07); --ph-ink: #B9BEC6; color: var(--ph-ink); }
.ph__word {
  display: block;
  font-family: var(--f-display);
  font-variation-settings: "wdth" 50, "wght" 800;
  font-size: min(17cqi, 110px);
  line-height: 0.9;
  text-transform: uppercase;
  color: var(--ph-ink);
  opacity: 0.3;
  text-align: center;
  transition: transform 0.7s var(--ease-out);
}
.ph__label {
  position: absolute;
  bottom: 10px; left: 12px;
  font-family: var(--f-mono);
  font-size: 11px;
  opacity: 0.7;
}

.empty {
  margin: 48px 0 0;
  font-family: var(--f-hand);
  font-size: 32px;
  color: var(--ink-soft);
}

/* ---------- Footer ---------- */
.site-footer {
  padding: clamp(72px, 10vw, 140px) var(--gutter) 40px;
  background: var(--ink);
  color: var(--paper);
}
.site-footer__big {
  margin: 0;
  font-family: var(--f-display);
  font-variation-settings: "wdth" 70, "wght" 800;
  font-size: clamp(44px, 8vw, 120px);
  line-height: 0.9;
}
.site-footer__small {
  margin: 18px 0 0;
  max-width: 40ch;
  color: #B9BEC6;
}
.site-footer__def {
  margin: clamp(40px, 6vw, 72px) 0 0;
  font-family: var(--f-hand);
  font-size: clamp(24px, 2.4vw, 32px);
  line-height: 1.2;
  color: var(--marker);
}
.site-footer__def b { font-weight: 400; text-decoration: underline; text-underline-offset: 4px; }
.site-footer__meta {
  margin: 16px 0 0;
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--pencil);
}
/* visitor counter: a little mechanical tally */
.site-footer__visits {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin: 28px 0 0;
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--pencil);
}
.site-footer__visits[hidden] { display: none; }
.site-footer__visits + .site-footer__visits { margin-top: 10px; }
.site-footer__digits { display: inline-flex; gap: 3px; }
.site-footer__digits span {
  display: grid;
  place-items: center;
  width: 1.4em;
  height: 1.9em;
  border-radius: 2px;
  background: linear-gradient(var(--paper) 50%, var(--paper-2) 50%);
  color: var(--ink);
  font-size: 20px;
  font-weight: 500;
  letter-spacing: 0;
}

/* ---------- Project sheet ---------- */
.sheet {
  width: min(1100px, 100% - 24px);
  max-height: calc(100% - 24px);
  margin: auto;
  padding: 0;
  border: 1.5px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
}
.sheet::backdrop { background: rgba(21, 23, 28, 0.6); backdrop-filter: blur(4px); }
.sheet[open] { animation: sheet-in 0.5s var(--ease-out); }
@keyframes sheet-in { from { opacity: 0; transform: translateY(40px); } }

.sheet__inner {
  max-height: calc(100svh - 24px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: clamp(20px, 3vw, 40px);
}
.sheet__close {
  position: sticky;
  top: 0;
  float: right;
  z-index: 3;
  padding: 8px 14px;
  background: var(--paper);
  border: 1.5px solid var(--ink);
  font-family: var(--f-mono);
  font-size: 13px;
  text-transform: uppercase;
}
.sheet__close:hover { background: var(--ink); color: var(--paper); }

.sheet__media {
  clear: both;
  position: relative;
  aspect-ratio: 16 / 9;
  border: 1.5px solid var(--ink);
  overflow: hidden;
  margin-top: 16px;
}
.sheet__media img { width: 100%; height: 100%; object-fit: contain; background: var(--paper-2); }
.sheet__thumbs { display: flex; gap: 8px; margin-top: 8px; overflow-x: auto; }
.sheet__thumbs button { flex: 0 0 auto; width: 88px; aspect-ratio: 4/3; padding: 0; border: 1.5px solid var(--ink); background: none; opacity: .6; }
.sheet__thumbs button[aria-current="true"] { opacity: 1; outline: 3px solid var(--marker); }
.sheet__thumbs img { width: 100%; height: 100%; object-fit: cover; }

.sheet__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 56px);
  margin-top: clamp(24px, 3vw, 40px);
}
.sheet__kicker {
  margin: 0;
  font-family: var(--f-mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--mat);
}
.sheet__title {
  margin: 8px 0 0;
  font-family: var(--f-display);
  font-variation-settings: "wdth" 80, "wght" 800;
  font-size: clamp(36px, 5vw, 68px);
  line-height: 0.95;
}
.sheet__by { margin: 14px 0 0; font-size: 18px; }
.sheet__problem {
  margin: 24px 0 0;
  font-size: clamp(19px, 1.8vw, 24px);
  line-height: 1.35;
}
.sheet__links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.btn {
  display: inline-block;
  padding: 10px 18px;
  background: var(--ink);
  color: var(--paper);
  border: 1.5px solid var(--ink);
  text-decoration: none;
  font-weight: 600;
  transition: background 0.2s, color 0.2s;
}
.btn:hover { background: var(--marker); color: var(--ink); }

.spec { margin: 0; border-top: 1.5px solid var(--ink); }
.spec div { display: grid; grid-template-columns: 120px 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid rgba(21,23,28,.2); }
.spec dt { font-family: var(--f-mono); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-soft); padding-top: 3px; }
.spec dd { margin: 0; }
.tools { display: flex; flex-wrap: wrap; gap: 6px; }
.tools span { padding: 2px 10px; border: 1px solid var(--ink); border-radius: 999px; font-size: 14px; }

.educators { margin-top: 20px; border: 1.5px dashed var(--ink-soft); padding: 12px 16px; }
.educators summary { cursor: pointer; font-family: var(--f-mono); font-size: 13px; text-transform: uppercase; letter-spacing: .04em; }
.educators p { margin: 10px 0 0; }

/* ---------- Best projects ---------- */
.best-tag {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  padding: 4px 9px;
  background: var(--marker);
  color: var(--ink);
  border: 1.5px solid var(--ink);
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.strengths { display: flex; flex-wrap: wrap; gap: 6px; }
.strengths span {
  padding: 3px 9px;
  border: 1px solid var(--marker);
  color: var(--marker);
  font-family: var(--f-mono);
  font-size: 11.5px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

/* Best projects: on a dark wall */
.spotlight,
.best,
.led { --sheet: #FBFAF5; overflow-x: clip; }
.spotlight,
.best {
  padding: clamp(72px, 9vw, 120px) var(--gutter);
  background: var(--ink);
  color: var(--paper);
}
.spotlight__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px 40px;
  flex-wrap: wrap;
}
.spotlight__title {
  margin: 0;
  font-family: var(--f-display);
  font-variation-settings: "wdth" 70, "wght" 800;
  font-size: clamp(56px, 10vw, 150px);
  line-height: 0.85;
  letter-spacing: -0.02em;
}
.spotlight__intro {
  margin: 0;
  max-width: 40ch;
  color: #B9BEC6;
}

/* Best and student-led projects get a row each: a big print of the photo, the title,
   and the student's name signed in marker with the grade circled, like MYP and DP in the hero */
.spotlight__list {
  list-style: none;
  margin: clamp(40px, 5vw, 72px) 0 0;
  padding: 0;
  display: grid;
  gap: clamp(56px, 7vw, 104px);
}
.feat__btn {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  align-items: center;
  gap: clamp(24px, 5vw, 76px);
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  text-align: left;
}
/* the photo is a print with a paper border, lying slightly askew; it straightens when you point at it */
.feat__print {
  display: block;
  padding: 10px;
  background: var(--sheet);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25), 0 18px 36px rgba(0, 0, 0, 0.4);
  rotate: -1deg;
  transition: rotate 0.4s var(--ease-out);
}
.feat:nth-child(even) .feat__print { order: 2; rotate: 1deg; }
.feat__photo {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #24272E;
}
.feat__photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  transition: transform 0.7s var(--ease-out);
}
.feat__kind {
  font-family: var(--f-mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #B9BEC6;
}
.feat__title {
  display: block;
  margin-top: 10px;
  font-family: var(--f-display);
  font-variation-settings: "wdth" 75, "wght" 800;
  font-size: clamp(36px, 4.6vw, 68px);
  line-height: 0.94;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.feat__by {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 26px;
  margin-top: 18px;
  color: var(--marker);
  font-family: var(--f-hand);
  line-height: 0.9;
  -webkit-text-stroke: 0.4px currentColor;
}
.feat__name { font-size: clamp(42px, 4.2vw, 58px); rotate: -2deg; }
/* the grade is typed, not handwritten: handwritten digits are too easy to misread (1 / I, 2 / z) */
.feat__grade {
  position: relative;
  padding: 6px 8px;
  font-family: var(--f-mono);
  font-size: clamp(15px, 1.4vw, 18px);
  font-weight: 500;
  letter-spacing: 0.06em;
  line-height: 1;
  -webkit-text-stroke: 0;
  rotate: 3deg;
  white-space: nowrap;
}
.feat__grade svg {
  position: absolute;
  inset: -22%;
  width: 144%;
  height: 144%;
  overflow: visible;
  fill: none;
  stroke: var(--marker);
  stroke-width: 2.5;
  stroke-linecap: round;
}
.feat__grade svg path { vector-effect: non-scaling-stroke; }
.feat__desc {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  overflow: hidden;
  margin-top: 20px;
  max-width: 44ch;
  font-size: 18px;
  line-height: 1.45;
  color: #C9CDD3;
}
.feat__text .strengths { margin-top: 16px; }
.feat__open {
  display: inline-block;
  margin-top: 22px;
  padding-bottom: 3px;
  border-bottom: 1.5px solid var(--marker);
  font-family: var(--f-mono);
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.led .feat__kind,
.led .feat__desc { color: var(--mat-print); }
@media (hover: hover) {
  .feat .feat__btn:hover .feat__print { rotate: 0deg; }
  .feat__btn:hover .feat__photo img,
  .feat__btn:hover .ph__word { transform: scale(1.04); }
}
@media (max-width: 760px) {
  .feat__btn { grid-template-columns: minmax(0, 1fr); }
  .feat:nth-child(even) .feat__print { order: 0; }
}

.btn-more {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: clamp(28px, 4vw, 48px);
  padding: 14px 24px;
  background: var(--marker);
  color: var(--ink);
  text-decoration: none;
  font-family: var(--f-display);
  font-variation-settings: "wdth" 100, "wght" 700;
  font-size: 18px;
  transition: background 0.2s;
}
.btn-more span { transition: transform 0.4s var(--ease-out); }
.btn-more:hover { background: var(--paper); }
.btn-more:hover span { transform: translateX(6px); }

/* Best projects page */
.mat--short { min-height: 0; padding: 140px var(--gutter) 90px; }
.hero__word--sm { font-size: clamp(80px, 17vw, 250px); }
.crumb {
  display: inline-block;
  margin-bottom: clamp(24px, 3vw, 40px);
  font-family: var(--f-mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--mat-print);
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}
.crumb:hover { color: var(--marker); }

.criteria { padding: clamp(72px, 10vw, 140px) var(--gutter) clamp(72px, 9vw, 120px); }
.criteria__lead {
  margin: 0;
  max-width: 32ch;
  font-family: var(--f-display);
  font-variation-settings: "wdth" 90, "wght" 500;
  font-size: clamp(24px, 3vw, 42px);
  line-height: 1.12;
}
.criteria__list {
  list-style: none;
  margin: clamp(40px, 5vw, 64px) 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: clamp(20px, 3vw, 40px);
  border-top: 1.5px solid var(--ink);
}
.criteria__list li { padding: 20px 0 22px; border-bottom: 1px solid rgba(21, 23, 28, 0.2); }
.criteria__name {
  display: block;
  font-family: var(--f-display);
  font-variation-settings: "wdth" 90, "wght" 750;
  font-size: clamp(22px, 2vw, 28px);
  line-height: 1.1;
}
.criteria__desc { display: block; margin-top: 6px; color: var(--ink-soft); }

.best .gallery__title { color: var(--paper); }
.best .gallery__count { color: #B9BEC6; }
.best__chips { margin-top: clamp(24px, 3vw, 36px); }

/* Student-led */
.led {
  padding: clamp(72px, 9vw, 120px) var(--gutter);
  background-color: var(--mat);
  background-image:
    linear-gradient(var(--mat-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--mat-line) 1px, transparent 1px);
  background-size: 24px 24px;
  color: var(--paper);
}
.led .spotlight__intro { color: var(--mat-print); }
.led__note {
  margin: 10px 0 0;
  font-family: var(--f-hand);
  font-size: clamp(24px, 2.4vw, 32px);
  line-height: 1;
  color: var(--marker);
  transform: rotate(-2deg);
}
.card__badge--led { background: var(--paper); }

/* Inside the project pop-up */
.sheet__steps { margin-top: 28px; }
.sheet__steps ol { margin: 10px 0 0; padding-left: 1.4em; }
.sheet__steps li { margin-top: 6px; padding-left: 4px; }
.sheet__steps li::marker { font-family: var(--f-mono); font-weight: 500; color: var(--mat); }
.sheet__best {
  margin-top: 28px;
  padding: 16px 18px;
  border: 1.5px solid var(--ink);
  background: rgba(242, 214, 64, 0.28);
}
.sheet__best-label {
  margin: 0;
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.sheet__best-why { margin: 8px 0 12px; font-size: 17px; }
.sheet .strengths span { border-color: var(--ink); color: var(--ink); background: var(--paper); }

/* ---------- Likes, nominations, follows and comments (project pop-up, js/social.js) ---------- */
.social { margin-top: clamp(28px, 4vw, 48px); padding-top: 24px; border-top: 1.5px solid var(--ink); }
.social__bar { display: flex; flex-wrap: wrap; gap: 8px; }
.social__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  background: var(--paper);
  border: 1.5px solid var(--ink);
  font-weight: 600;
  transition: background 0.2s, transform 0.2s var(--ease-out);
}
.social__btn b { font-family: var(--f-mono); font-weight: 500; font-size: 13px; color: var(--ink-soft); }
.social__btn[aria-pressed="true"] { background: var(--marker); }
.social__btn[aria-pressed="true"] b { color: var(--ink); }
.social__btn[data-follow="requested"] { border-style: dashed; background: var(--paper-2); }
.social__btn:disabled { opacity: 0.6; cursor: progress; }
@media (hover: hover) { .social__btn:hover:not(:disabled) { transform: translateY(-2px); } }
.social__note, .social__who { margin: 12px 0 0; font-family: var(--f-mono); font-size: 13px; color: var(--ink-soft); }
.social__note:empty { display: none; }
.social__note--error { color: #B3261E; }
.social__who button { padding: 0; background: none; border: 0; font: inherit; color: var(--ink); text-decoration: underline; }
.social__signin {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
  margin-top: 16px;
  padding: 14px 16px;
  border: 1.5px dashed var(--ink-soft);
}
.social__signin p { margin: 0; flex: 1 1 240px; }
.social__gbtn { min-height: 40px; }
.social__title { margin-top: 28px; }
.social__comments { display: grid; gap: 10px; max-width: 70ch; margin: 12px 0 0; padding: 0; list-style: none; }
.social__comments li { padding: 12px 14px; background: var(--paper-2); border-left: 3px solid var(--mat); }
.social__comments li.is-pending { border-left: 3px dashed var(--pencil); color: var(--ink-soft); }
.social__comments p { margin: 4px 0 0; white-space: pre-line; overflow-wrap: anywhere; }
.social__meta { font-family: var(--f-mono); font-size: 12px; color: var(--ink-soft); }
.social__meta b { font-family: var(--f-body); font-size: 15px; color: var(--ink); }
.social__form { display: grid; gap: 8px; max-width: 70ch; margin-top: 16px; }
.social__form textarea {
  width: 100%;
  padding: 10px 12px;
  font: inherit;
  color: var(--ink);
  background: var(--paper);
  border: 1.5px solid var(--ink);
  border-radius: 0;
  resize: vertical;
}
.social__form .btn { justify-self: start; cursor: pointer; }
.social__form .btn:disabled { opacity: 0.6; cursor: progress; }
.social__form small { font-size: 13px; color: var(--ink-soft); }

/* ---------- Submission form ---------- */
.form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px clamp(20px, 3vw, 40px);
  max-width: 980px;
  margin-top: clamp(40px, 5vw, 64px);
  padding-top: 28px;
  border-top: 1.5px solid var(--ink);
}
.field { display: grid; gap: 6px; align-content: start; margin: 0; padding: 0; border: 0; min-width: 0; }
.field--wide { grid-column: 1 / -1; }
.field > span, .field legend, .field label > span {
  padding: 0;
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.field small { text-transform: none; letter-spacing: 0; font-family: var(--f-body); font-size: 13px; }
.field input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
.field select,
.field textarea {
  width: 100%;
  padding: 10px 12px;
  font: inherit;
  color: var(--ink);
  background: var(--paper);
  border: 1.5px solid var(--ink);
  border-radius: 0;
}
.field textarea { resize: vertical; }
.field input[type="file"] { font: inherit; font-size: 15px; }
.field--check { grid-template-columns: auto 1fr; align-items: start; align-content: center; gap: 10px; }
.field--check > span { text-transform: none; letter-spacing: 0; font-family: var(--f-body); font-size: 15px; color: var(--ink); }
.field--check input, .choice input { width: 18px; height: 18px; margin: 3px 0 0; accent-color: var(--mat); }
.choices { display: flex; gap: 20px; padding-top: 8px; }
.choice { display: inline-flex; gap: 8px; align-items: center; }
.thumbs { display: flex; flex-wrap: wrap; gap: 8px; }
.thumbs img { width: 88px; height: 88px; object-fit: cover; border: 1.5px solid var(--ink); }
.hp { position: absolute; left: -9999px; }
.form__send { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 20px; }
.form__send .btn-more { margin-top: 0; border: 0; cursor: pointer; }
.form__send .btn-more:hover { background: var(--ink); color: var(--paper); }
.form__send .btn-more:disabled { opacity: 0.5; cursor: progress; }
.form__status { margin: 0; max-width: 46ch; font-family: var(--f-mono); font-size: 13px; }
.form__status--error { color: #B3261E; }
.site-footer .btn-more:hover { background: var(--paper); }

/* ---------- Responsive ---------- */
@media (max-width: 760px) {
  .site-header { padding-top: 10px; }
  .dept { font-size: 12px; padding: 11px 12px; }
  .logo { padding: 3px 8px; }
  .logo img { height: 32px; }
  .menu { top: auto; bottom: 12px; left: 16px; right: 16px; transform: none; box-shadow: 3px 3px 0 var(--ink); }
  .menu a { flex: 1; text-align: center; font-size: 11px; padding: 13px 4px; }
  body { padding-bottom: 64px; }
  .mat { padding-top: 100px; }
  .hero__word { font-size: 23vw; }
  .sticker--myp, .sticker--dp { right: -0.1em; }
  .hero__lets { left: 0; top: -0.6em; }
  .hero__def { margin-bottom: 48px; }
  .explore__list { grid-template-columns: minmax(0, 1fr); }
  .explore__list li + li { border-left: 0; }
  .explore__row { grid-template-columns: 1fr; grid-template-areas: "q" "meta"; }
  .explore__arrow { display: none; }
  /* the sticky filter bar stays two thin rows: tabs and chips scroll sideways instead of wrapping */
  .filters { padding: 10px var(--gutter); }
  .tabs, .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .tabs::-webkit-scrollbar, .chips::-webkit-scrollbar { display: none; }
  .tab { flex: none; padding: 8px 9px; font-size: 11px; }
  .chips { margin-top: 10px; }
  .chip, .chips__group { flex: none; }
  .cycle { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 28px; border-top: 0; }
  .cycle li { border-top: 1.5px solid var(--ink); }
  .sheet__grid { grid-template-columns: minmax(0, 1fr); }
  .spec div { grid-template-columns: 96px 1fr; }
  .criteria__list { grid-template-columns: minmax(0, 1fr); }
  .mat--short { padding-top: 110px; }
  .form { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-delay: 0s !important;
    transition-duration: 0.001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}
