/* ═══════════════════════════════════════════════════
   THE MAKER'S TIMES — style.css
   Token system: dark canonical. Light overrides below.

   Breakpoints (mobile first):
     640px   two-column project grid, wider gutter; Experience text
             justified (left-aligned below, where gaps get wide)
     768px   About: portrait beside the story; sticky section bar
             replaces the phone bar and drawer (max-width 767.98px is
             its pair); Editorial shown as a two-column grid
     960px   desktop masthead, Experience + Skills side by side,
             full Editorial grid (max-width 959.98px is its pair)
     1200px  three-column project grid
   ═══════════════════════════════════════════════════ */

/* ─── TOKENS: DARK ─── */
:root {
  --font-bl:  'Manufacturing Consent', cursive;
  --font-hd:  'Playfair Display', Georgia, serif;
  --font-bd:  'Lora', Georgia, serif;
  --font-ui:  'Inter', -apple-system, sans-serif;

  --sz-2xs: 0.625rem;   --sz-xs: 0.6875rem;  --sz-sm: 0.8125rem;
  --sz-base: 0.9375rem; --sz-lg: 1.125rem;   --sz-xl: 1.375rem;
  --sz-2xl: 1.75rem;    --sz-3xl: 2.25rem;   --sz-4xl: 3rem;

  --sp-xs:4px; --sp-sm:8px; --sp-md:16px; --sp-lg:24px;
  --sp-xl:32px; --sp-2xl:48px; --sp-3xl:64px;

  color-scheme: dark;
  --sticky-h: 47px;   /* height of the sticky bar, for anchor offsets */

  --pad: 20px;
  --max: 1320px;
  --ease: cubic-bezier(0.25,0.46,0.45,0.94);
  --t: 0.25s var(--ease);

  /* ── THE FIVE ── */
  --ink:   #121A28;
  --vellum:#D9CEB2;
  --gold:  #C9A96E;
  --terra: #D07A6F;
  --stamp: var(--terra);
  --hl: rgba(208,122,111,.28);
  --foot:  #0A0F18;   /* deeper than the page, as in light */

  /* Sticky bars, once stuck (.is-stuck, set in main.js). A shadow barely
     shows on a near-black page, so in dark the bar is also lifted one
     step lighter than the page. */
  --bar-bg: #1F2B43;
  --bar-shadow: 0 6px 20px rgba(0,0,0,0.9);

  /* Vellum steps. v45, v55 and v60 are text greys, raised above their
     names to meet WCAG AA (4.5:1) on every surface. v35 and below are
     for borders and decoration only, never text. */
  --v100:rgba(217,206,178,1.00); --v85:rgba(217,206,178,0.93);
  --v70:rgba(217,206,178,0.84);  --v60:rgba(217,206,178,0.76);
  --v55:rgba(217,206,178,0.75);  --v45:rgba(217,206,178,0.74);
  --v35:rgba(217,206,178,0.35);  --v20:rgba(217,206,178,0.20);
  --v15:rgba(217,206,178,0.15);  --v08:rgba(217,206,178,0.08);
  --v06:rgba(217,206,178,0.06);  --v05:rgba(217,206,178,0.05);

  /* Gold steps */
  --g100:rgba(201,169,110,1.00); --g60:rgba(201,169,110,0.60);
  --g40:rgba(201,169,110,0.40);  --g20:rgba(201,169,110,0.20);
  --g15:rgba(201,169,110,0.15);  --g05:rgba(201,169,110,0.05);
}

/* ─── TOKENS: LIGHT ─── */
[data-theme="light"] {
  color-scheme: light;
  --ink:   #F5F1E8;
  --vellum:#0D1117;
  --gold:  #3C6997;
  --terra: #90323D;
  --stamp: #B3363F;
  --hl: rgba(179,54,63,.22);
  --foot:  #E0DDD8;

  --bar-bg: var(--ink);
  --bar-shadow: 0 3px 14px rgba(13,17,23,0.2);

  --v100:rgba(13,17,23,1.00); --v85:rgba(13,17,23,0.85);
  --v70:rgba(13,17,23,0.76);  --v60:rgba(13,17,23,0.68);
  --v55:rgba(13,17,23,0.66);  --v45:rgba(13,17,23,0.64);
  --v35:rgba(13,17,23,0.35);  --v20:rgba(13,17,23,0.20);
  --v15:rgba(13,17,23,0.15);  --v08:rgba(13,17,23,0.08);
  --v06:rgba(13,17,23,0.06);  --v05:rgba(13,17,23,0.05);

  --g100:rgba(60,105,151,1.00); --g60:rgba(60,105,151,0.60);
  --g40:rgba(60,105,151,0.40);  --g20:rgba(60,105,151,0.20);
  --g15:rgba(60,105,151,0.15);  --g05:rgba(60,105,151,0.05);
}

/* ═══ RESET ═══ */
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0;}
html{scroll-behavior:smooth;scroll-padding-top:var(--sticky-h);}
body{
  font-family:var(--font-bd);
  background:var(--ink);
  color:var(--v85);
  font-size:var(--sz-base);
  line-height:1.1;
  overflow-x:hidden;
  position:relative;
  transition:background 0.3s var(--ease),color 0.3s var(--ease);
}
img{max-width:100%;display:block;}
/* Text links underline on hover, fading in with the colour change.
   Buttons, icon links and the nav bar (which has its own rule) opt out below. */
a{
  color:var(--v70);
  text-decoration-line:underline;text-decoration-color:transparent;
  text-decoration-thickness:1px;text-underline-offset:3px;
  transition:color var(--t),text-decoration-color var(--t);
}
a:hover{color:var(--v100);text-decoration-color:currentColor;}
.skip-link,.nav-ticker a,.nav-cta,.hero-cta,.hero-social-link,.pa-link,.foot-icon-btn{text-decoration:none;}
button{font-family:inherit;}

/* ─── Skip link: off screen until focused ─── */
.skip-link{
  position:absolute;left:var(--sp-md);top:-100px;z-index:10003;
  padding:var(--sp-sm) var(--sp-md);
  background:var(--vellum);color:var(--ink);
  font-family:var(--font-ui);font-size:var(--sz-sm);font-weight:600;
}
.skip-link:focus{top:var(--sp-md);color:var(--ink);}

/* ─── Layout shell ─── */
.wrap{max-width:var(--max);margin:0 auto;padding-left:var(--pad);padding-right:var(--pad);}

/* ─── Scrollbar ───
   Standard properties for Chrome/Edge 121+ and Firefox; the ::-webkit
   rules cover Safari and older Chrome. Overlay scrollbars (macOS default,
   iOS, Android) are drawn by the OS and ignore both. */
html{scrollbar-color:var(--v45) var(--ink);scrollbar-width:thin;}
::-webkit-scrollbar{width:8px;}
::-webkit-scrollbar-track{background:var(--ink);}
::-webkit-scrollbar-thumb{background:var(--v45);border-radius:4px;}
::-webkit-scrollbar-thumb:hover{background:var(--v70);}

/* ─── Alive reveal ─── */
.alive-reveal{
  filter:grayscale(1) brightness(0.88) contrast(1.15) sepia(0.2);
  transition:filter 0.6s ease;
}
.alive-reveal:hover{filter:none;}
[data-theme="light"] .alive-reveal{
  filter:grayscale(1) brightness(0.92) contrast(1.1) sepia(0.08);
}

/* ─── Animations ─── */
@keyframes fadeUp{from{opacity:0;translate:0 14px;}to{opacity:1;translate:0 0;}}
/* Only hide content for the fade when JS can reveal it again */
@media (scripting: enabled){
  .animate-in{opacity:0;animation:fadeUp .55s var(--ease) forwards;animation-play-state:paused;}
  .animate-in.is-visible{animation-play-state:running;}
}
.delay-1{animation-delay:.1s;} .delay-2{animation-delay:.2s;}
.delay-3{animation-delay:.3s;} .delay-4{animation-delay:.4s;}
.delay-5{animation-delay:.5s;}

/* Reduced motion: show content immediately, no smooth scroll or movement */
@media (prefers-reduced-motion: reduce){
  html{scroll-behavior:auto;}
  .animate-in{opacity:1;animation:none;}
  *,*::before,*::after{transition-duration:0.01ms!important;}
  html .pa-card:hover,html .ed-tile:hover .ed-img img{transform:none;}
  .editorial-grid{transition:none;}
}

/* ═══ SHARED SECTION HEADERS ═══ */
.sec-head{
  display:flex;justify-content:space-between;align-items:baseline;
  border-top:2px solid var(--v100);
  padding-top:var(--sp-sm);margin-bottom:var(--sp-lg);
}
.sec-head-gold{border-top-color:var(--gold);}
.sec-label{
  font-family:var(--font-hd);font-size:var(--sz-2xl);
  font-weight:900;text-transform:uppercase;
  letter-spacing:0.02em;color:var(--v100);
}
/* Section labels and headlines set in one weight and colour, no accent word */
.sec-label .aw,.sec-label em{color:inherit;font-style:normal;}
.sec-meta{
  font-family:var(--font-ui);font-size:var(--sz-xs);
  text-transform:uppercase;letter-spacing:0.12em;color:var(--v45);
}
.kicker{
  font-family:var(--font-ui);font-size:var(--sz-2xs);
  font-weight:600;text-transform:uppercase;letter-spacing:0.14em;
  color:var(--terra);display:block;margin-bottom:2px;
}

/* ═══ MASTHEAD ═══ */
.mast-top{
  display:flex;justify-content:space-between;align-items:flex-start;
  padding:10px var(--pad);border-bottom:1px solid var(--v15);
  position:sticky;top:0;z-index:10000;background:var(--ink);
  transition:background-color var(--t),box-shadow var(--t);
}
.mast-actions{display:flex;gap:var(--sp-sm);align-items:center;}
.theme-btn{
  background:none;border:1px solid var(--v20);border-radius:50%;
  width:30px;height:30px;cursor:pointer;
  display:flex;align-items:center;justify-content:center;
  color:var(--v55);transition:all var(--t);
}
.theme-btn:hover{border-color:var(--gold);color:var(--gold);}
/* Both icons are in the markup; the theme picks one, so it is right before JS runs */
.icon-sun,[data-theme="dark"] .icon-moon{display:none;}
[data-theme="dark"] .icon-sun{display:block;}

.hamburger{
  display:none;background:none;border:none;cursor:pointer;
  flex-direction:column;justify-content:center;align-items:center;
  gap:5px;width:30px;height:30px;padding:0;
}
.hamburger span{display:block;width:18px;height:1px;background:var(--v55);transition:all var(--t);}

/* Mobile title (visible < 960) */
.mast-title{
  text-align:center;padding:var(--sp-lg) var(--pad) var(--sp-md);
  border-bottom:3px double var(--v20);
}
.mast-name{
  font-family:var(--font-bl);
  font-size:clamp(2.2rem,6vw,3.75rem);
  font-weight:400;line-height:1;
  color:var(--v100);margin-bottom:var(--sp-xs);letter-spacing:0.01em;
}
.mast-edition{
  font-family:var(--font-bd);font-size:var(--sz-xs);
  font-style:italic;color:var(--v45);letter-spacing:0.08em;
}

/* Desktop broadsheet (visible ≥ 960) */
.mast-desktop{
  display:none;
  grid-template-columns:1fr auto 1fr;
  align-items:center;gap:var(--sp-xl);
  padding:var(--sp-lg) max(var(--pad), calc((100% - var(--max)) / 2 + var(--pad))) var(--sp-md);
  border-bottom:3px double var(--v20);
}
/* The folio row below closes the masthead, so the double rule gives way to it.
   The rules use --v100, the text colour: --ink is the page background. */
.has-folio .mast-title,.has-folio .mast-desktop{border-bottom:0;}
.mast-desktop .mast-name{font-size:clamp(2.5rem,4.5vw,3.75rem);}
.mast-center{text-align:center;}
/* Left ear: a box that fits its text. justify-self puts each ear on its own
   edge so the logo, the middle track, sits on the true centre. */
.mast-quote-box{
  justify-self:start;
  border:1.5px solid var(--v100);
  padding:12px 20px;
  display:flex;align-items:center;justify-content:center;
}
.mast-quote-text{
  font-family:var(--font-bd);font-size:17px;
  font-style:normal;color:var(--v100);
  text-align:center;line-height:1.3;
}
.mast-edition-info{
  justify-self:end;
  text-align:right;display:flex;flex-direction:column;
  align-items:flex-end;gap:4px;
}
.mast-ed-label{
  font-family:var(--font-ui);font-size:17px;
  font-weight:700;text-transform:uppercase;letter-spacing:0.02em;
  color:var(--v100);display:block;
}
.mast-ed-blurb{
  font-family:var(--font-bd);font-size:13px;
  font-style:normal;color:var(--v70);line-height:1.4;
  text-align:right;margin-bottom:var(--sp-xs);
}

/* Folio row: edition line, today's date and price between two rules.
   Under 640px only the date shows. */
.mast-folio-row{
  display:grid;grid-template-columns:1fr auto 1fr;align-items:center;
  padding:9px max(var(--pad), calc((100% - var(--max)) / 2 + var(--pad)));
  border-top:1px solid var(--v100);border-bottom:1px solid var(--v100);
  font-family:var(--font-bd);font-style:italic;font-size:13px;line-height:1.3;
  color:var(--v70);
}
.mast-folio-l{justify-self:start;}
.mast-folio-c{justify-self:center;text-transform:uppercase;}
.mast-folio-r{justify-self:end;}
@media(max-width:639.98px){
  .mast-folio-row{grid-template-columns:1fr;}
  .mast-folio-l,.mast-folio-r{display:none;}
}

/* Masthead typewriter: html.press is set by a head script in index.html,
   once per visit. main.js splits the title and tagline into letters (.tw-on):
   each title letter strikes on like a typebar hitting paper, then the tagline
   types out behind a blinking caret. Until main.js runs the text is hidden;
   if it never runs, it fades in after 2s. */
.press .mast-name:not(.tw-on),.press .mast-edition:not(.tw-on){opacity:0;animation:twFallback 0.3s 2s forwards;}
@keyframes twFallback{to{opacity:1;}}
.tw-ch{display:inline-block;white-space:pre;animation:twStrike 0.14s cubic-bezier(0.2,0.9,0.3,1) both;animation-delay:var(--d);}
.mast-edition .tw-ch{animation:none;opacity:0;}
.mast-edition .tw-ch.is-in{opacity:1;}
@keyframes twStrike{
  from{opacity:0;transform:translateY(-0.18em) scale(1.14);filter:blur(0.8px);}
  60%{opacity:1;transform:translateY(0.03em) scale(0.98);filter:blur(0);}
  to{opacity:1;transform:none;}
}
.tw-caret{position:absolute;top:0.1em;left:0;width:1px;height:1em;margin-left:2px;background:currentColor;animation:twBlink 0.9s steps(1) infinite;}
.tw-caret.is-done{animation:twFade 0.4s forwards;}
@keyframes twBlink{50%{opacity:0;}}
@keyframes twFade{to{opacity:0;}}
.tw-vh{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;}

/* Both bars, plain at rest, raised once the masthead has scrolled away */
.mast-top.is-stuck,.nav-bar.is-stuck{background:var(--bar-bg);box-shadow:var(--bar-shadow);}

/* Home page, below 768px: the theme toggle and menu stay out of sight until the masthead
   (title and folio) has scrolled away, then slide in and stay. The bar takes no space
   at rest (negative margin = its height), so nothing moves when it arrives. It is only
   transparent and click-through, not removed, so keyboard focus still reveals it. */
@media(max-width:767.98px){
  .mast-top--reveal{
    height:var(--sticky-h);box-sizing:border-box;margin-bottom:calc(var(--sticky-h) * -1);
    opacity:0;transform:translateY(-100%);pointer-events:none;
    transition:background-color var(--t),box-shadow var(--t),opacity var(--t),transform var(--t);
  }
  .mast-top--reveal.is-stuck,.mast-top--reveal:focus-within{opacity:1;transform:none;pointer-events:auto;}
}

/* Section bar (768px and up): sticky, links centred, theme toggle at the right end */
.nav-bar{
  display:none;
  position:sticky;top:0;z-index:10000;background:var(--ink);
  transition:background-color var(--t),box-shadow var(--t);
  padding:9px max(var(--pad), calc((100% - var(--max)) / 2 + var(--pad)));
  border-bottom:1px solid var(--v15);
}
.nav-bar .theme-btn{
  position:absolute;top:50%;transform:translateY(-50%);
  right:max(var(--pad), calc((100% - var(--max)) / 2 + var(--pad)));
}
.nav-ticker{
  display:flex;
  justify-content:center;align-items:center;
  gap:var(--sp-xl);
}
.nav-ticker a{
  font-family:var(--font-ui);font-size:var(--sz-xs);font-weight:500;
  text-transform:uppercase;letter-spacing:0.12em;color:var(--v70);
  padding-bottom:2px;
  border-bottom:1px solid transparent;transition:color var(--t),border-color var(--t);
}
.nav-ticker a:not(.nav-cta):hover,
.nav-ticker a:not(.nav-cta).active{color:var(--v100);border-bottom-color:var(--gold);}
/* Big enough to read as a four-point star, faint enough to stay behind the links */
.nav-sep{color:var(--v35);font-size:var(--sz-xs);line-height:1;user-select:none;}

/* ═══ MOBILE DRAWER ═══ */
.drawer-overlay{
  position:fixed;inset:0;background:rgba(0,0,0,0.6);
  z-index:10001;opacity:0;visibility:hidden;transition:all 0.3s ease;
}
.drawer-overlay.open{opacity:1;visibility:visible;}
.drawer{
  position:fixed;top:0;right:0;width:280px;max-width:80vw;height:100%;
  background:rgba(18,26,40,0.98);z-index:10002;
  transform:translateX(100%);visibility:hidden;
  transition:transform 0.35s var(--ease),visibility 0s linear 0.35s;
  padding:var(--sp-xl) var(--sp-lg);display:flex;flex-direction:column;
  border-left:1px solid var(--v15);
}
.drawer.open{transform:translateX(0);visibility:visible;transition:transform 0.35s var(--ease);}
.drawer-close{
  align-self:flex-end;background:none;border:none;
  font-size:var(--sz-xl);color:var(--v55);cursor:pointer;
  padding:var(--sp-xs);margin-bottom:var(--sp-xl);transition:color var(--t);
}
.drawer-close:hover{color:var(--v100);}
.drawer a{
  font-family:var(--font-hd);font-size:var(--sz-lg);font-weight:700;
  color:var(--v85);padding:var(--sp-md) 0;
  border-bottom:1px solid var(--v15);display:block;transition:color var(--t),text-decoration-color var(--t);
}
.drawer a:hover{color:var(--gold);}
.drawer-foot{
  margin-top:auto;padding-top:var(--sp-lg);
  border-top:1px solid var(--v15);display:flex;gap:var(--sp-lg);
}
.drawer-foot a{
  font-family:var(--font-ui);font-size:var(--sz-sm);
  color:var(--v55);border:none;padding:0;
}
[data-theme="light"] .drawer{background:rgba(245,241,232,0.98);}

/* Resume button in the nav and drawer. Sits after both so it wins
   over .nav-ticker a and .drawer a without !important. */
.nav-ticker a.nav-cta,.drawer a.nav-cta{
  color:var(--gold);
  border:1px solid var(--g40);
  padding:4px 14px;border-radius:2px;
  font-weight:600;transition:all var(--t);
}
.nav-ticker a.nav-cta:hover,.drawer a.nav-cta:hover{background:var(--g15);color:var(--vellum);}

/* ═══ HERO ═══ */
.hero{
  padding:var(--sp-2xl) var(--pad) var(--sp-xl);
  border-bottom:2px solid var(--gold);
  display:flex;flex-direction:column;gap:var(--sp-2xl);
  align-items:center;text-align:center;
  max-width:var(--max);margin:0 auto;
}
.hero-left{display:flex;flex-direction:column;gap:var(--sp-md);}
.hero-greeting{
  font-size:1.5em; /* the old h2 default; children set their own sizes */
  font-family:var(--font-hd);
  font-weight:900;line-height:1.0;color:var(--v100);
}
.hero-hi{
  display:block;
  font-size:clamp(2rem,5vw,4.5rem);
  font-weight:900;
  letter-spacing:0.04em;
  color:var(--v100);
  margin-bottom:0;
}
.hero-greeting em{
  font-style:normal;display:block;
  font-size:clamp(2.8rem,6.8vw,6rem);
  line-height:1.0;
  color:var(--terra);
}
.hero-tagline{
  font-family:var(--font-ui);font-size:var(--sz-base);
  color:var(--v70);line-height:1.5;letter-spacing:-0.01em;
}
.hero-cta{
  display:inline-flex;align-self:center;position:relative;
  align-items:center;justify-content:center;gap:var(--sp-sm);
  padding:14px 28px;
  background:transparent;color:var(--terra);
  font-family:var(--font-hd);font-size:var(--sz-lg);
  font-weight:700;letter-spacing:0.03em;text-transform:uppercase;
  border:1.6px solid var(--terra);border-radius:0;cursor:pointer;
  transition:all var(--t);text-decoration:none;
}
.hero-cta::after{
  content:'';position:absolute;inset:4px;
  border:1px solid var(--terra);
  transition:border-color var(--t);
  pointer-events:none;
}
.hero-cta:hover{background:var(--terra);color:var(--ink);}
.hero-cta:hover::after{border-color:var(--ink);}
.hero-socials{
  display:flex;justify-content:center;gap:var(--sp-lg);
}
.hero-social-link{
  color:var(--v55);
  display:flex;align-items:center;
  transition:color var(--t);
}
.hero-social-link:hover{color:var(--gold);}
.hero-illo{
  width:80%;max-width:400px;
  overflow:hidden;border-radius:3px;
}
.hero-illo picture{display:block;}
.hero-illo img{
  width:100%;height:auto;display:block;
  filter:brightness(0.72) contrast(1.12);
}
[data-theme="light"] .hero-illo img{
  filter:brightness(0.95) contrast(1.05);
}

/* ═══ MAIN STORY ═══
   Headline across the full width between a double rule above and a single
   rule below. Under it, from 1024px, a 12-column grid: photo in 4 columns
   with a hairline on its right, byline and two-column body in the other 8.
   Below 1024px everything stacks: byline, photo, body. The body keeps two
   columns from 640px and is one left-aligned column on phones. */
.main-story {
  padding-top: var(--sp-3xl); padding-bottom: var(--sp-2xl);
  border-bottom: 2px solid var(--gold);
}

/* Headline, at the top of the text column: --v100 is the text colour in both themes, so the rules are always the dark ink of Day Edition */
/* Short centred rules, as the Times sets between a headline and its summary: one under the headline, one under the byline */
.ms-banner::after, .ms-byline::after {
  content: ''; display: block; width: 156px; max-width: 100%; height: 1px;
  margin: var(--sp-md) auto 0; background: var(--v100);
}
.ms-headline {
  font-family: Georgia, serif; font-weight: 900;
  font-size: clamp(2.1rem, 9vw, 2.6rem);
  line-height: 1.0; color: var(--v100);
  text-transform: uppercase;
}
.ms-headline > span { display: block; }
/* Phones: "Designs." and "Codes." each take a line, with the rest of the sentence above */
.ms-headline .hl-line { display: block; }

.ms-grid { display: grid; row-gap: var(--sp-lg); }
.ms-text { display: contents; }
.ms-byline  { order: 1; }
.ms-portrait-col { order: 2; }
.ms-body    { order: 3; }

.ms-portrait img { width: 100%; height: auto; }
/* Tablet: a full-width portrait would be taller than the screen, so it stays a centred 400px */
@media (min-width: 640px) and (max-width: 1023.98px) {
  .ms-portrait-col { width: 100%; max-width: 400px; margin-inline: auto; }
}

/* Byline: centred at the top of the text column, hairline under it */
.ms-byline {
  font-family: var(--font-ui); font-size: var(--sz-xs);
  line-height: 1.3;
  text-align: center;
  text-transform: uppercase; letter-spacing: 0.1em; color: var(--v45);
}
.ms-byline-name { color: var(--terra); font-weight: 700; letter-spacing: 0.12em; }
.ms-byline-note {
  display: block; margin-top: 2px;
  font-family: var(--font-bd); font-size: var(--sz-sm);
  font-style: italic; color: var(--v70); text-transform: none; letter-spacing: 0;
}

/* Body */
.ms-body-text {
  font-family: var(--font-bd); font-size: var(--sz-base);
  line-height: 1.55; color: var(--v70);
}
.ms-body-text p + p { margin-top: 0.75em; }
.ms-subhead {
  font-family: var(--font-hd); font-size: var(--sz-lg); font-weight: 700;
  line-height: 1.2; color: var(--v100);
  margin: 0.9em 0 0.5em;
  break-after: avoid;
}

/* ── Tablet: photo full width, body in two justified columns ── */
@media (min-width: 640px) {
  .ms-headline { font-size: clamp(2.2rem, 6vw, 3.6rem); }
  .ms-headline .hl-line { display: inline; }
  .ms-body-text {
    column-count: 2; column-gap: 28px; column-rule: 1px solid var(--v20);
    text-align: justify; hyphens: auto;
  }
  .ms-body-text p + p { margin-top: 0; }
  .ms-body-text p { text-indent: 1.2em; }
  .ms-body-text p:first-child,
  .ms-subhead + p { text-indent: 0; }
}

/* ── Desktop: 12 columns ── */
@media (min-width: 1024px) {
  .ms-headline { font-size: clamp(2rem, 3.4vw, 3.1rem); }
  .ms-grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: 0; row-gap: 0;
    align-items: start;
  }
  .ms-banner { margin-bottom: var(--sp-md); }
  .ms-text { display: block; grid-column: 5 / 13; grid-row: 1; padding-left: 28px; }
  .ms-byline, .ms-portrait-col, .ms-body { order: 0; }
  .ms-byline { margin-bottom: var(--sp-md); }
  .ms-portrait-col {
    grid-column: 1 / 5; grid-row: 1;
    padding-right: 28px; border-right: 1px solid var(--v20);
  }
}

/* Portrait alive-reveal responds to the portrait being in view */
.ms-portrait img { transition: filter 0.65s var(--ease); }
[data-theme="light"] .main-story.in-view .ms-portrait img.alive-reveal { filter: none; }
[data-theme="dark"] .ms-portrait img.alive-reveal {
  filter: grayscale(1) brightness(0.88) saturate(0) contrast(1.15) sepia(0.2);
  transition: filter 0.6s ease;
}
[data-theme="dark"] .main-story.in-view .ms-portrait img.alive-reveal {
  filter: grayscale(0) brightness(0.75) saturate(0.8) contrast(1) sepia(0);
}

/* ═══ EXPERIENCE WIRE + CLASSIFIEDS ROW ═══ */
.wire-classifieds-row{
  padding-top:var(--sp-2xl);padding-bottom:var(--sp-xl);
  border-bottom:2px solid var(--gold);
  display:block;
}
.exp-wire,.classifieds-col{padding:0;}

/* ─── Experience Wire ─── */
.wire-list{display:flex;flex-direction:column;}
.wire-item{
  display:grid;grid-template-columns:96px 1fr;
  gap:var(--sp-md);padding:var(--sp-lg) 0;
  border-top:1px solid var(--v15);align-items:start;
  position:relative;
}
.wire-logo{
  width:96px;
  background:var(--v08);border:1px solid var(--v20);border-radius:4px;
  display:flex;align-items:center;justify-content:center;
  font-family:var(--font-hd);font-weight:900;font-size:var(--sz-base);
  color:var(--v55);flex-shrink:0;overflow:hidden;
}
.wire-logo img{width:100%;height:100%;object-fit:cover;}
.wire-role-row{display:flex;align-items:center;gap:var(--sp-sm);flex-wrap:wrap;margin-bottom:2px;}
.wire-role{font-family:var(--font-hd);font-size:var(--sz-lg);font-weight:700;color:var(--v100);line-height:1.2;}
.wire-org{font-family:var(--font-ui);font-size:var(--sz-xs);text-transform:uppercase;letter-spacing:0.07em;color:var(--v55);margin-bottom:var(--sp-sm);}
/* Dates are stamped: red ink, outlined, set down once (with a slight twist) when the entry first scrolls in */
.stamp{
  display:inline-block;padding:2px 8px;margin-bottom:6px;
  color:var(--stamp);border:1px solid currentColor;border-radius:2px;
  transform-origin:left center;
}
@keyframes stampDown{
  from{opacity:0;transform:translateY(-4px) scale(1.1) rotate(-2.5deg);}
  70%{opacity:1;transform:translateY(0) scale(.99) rotate(.4deg);}
  to{opacity:1;transform:translateY(0) scale(1) rotate(0);}
}
/* Hidden until the date has scrolled a little way up the screen (see main.js), so it is seen landing, not at the screen edge */
@media (scripting: enabled){
  .stamp{opacity:0;}
  .stamp.is-stamped{opacity:1;animation:stampDown .34s var(--ease) backwards;}
}
/* Editor's highlighter: one passage per entry, marked left to right once, then it stays.
   Each wrapped line gets its own band (box-decoration-break), so multi-line passages stay tidy */
.hl{
  color:inherit;
  background:linear-gradient(transparent 8%,var(--hl) 8%,var(--hl) 94%,transparent 94%) no-repeat 0 0 / 100% 100%;
  -webkit-box-decoration-break:clone;box-decoration-break:clone;
  padding:0 .12em;margin:0 -.12em;
}
@media (scripting: enabled){
  .hl{background-size:0% 100%;transition:background-size .55s var(--ease) .4s;}
  .hl.is-marked{background-size:100% 100%;}
}
@media (prefers-reduced-motion: reduce){
  .stamp,.stamp.is-stamped{opacity:1;animation:none;}
  .hl{background-size:100% 100%;transition:none;}
}
.wire-desc{font-family:var(--font-bd);font-size:var(--sz-base);line-height:1.55;color:var(--v70);text-align:left;}

/* ─── Classifieds ─── */
.classifieds-col{margin-top:var(--sp-2xl);}
.classifieds-frame{
  border:2px dashed var(--gold);
  background:var(--g05);
  border-radius:3px;padding:var(--sp-lg);
  display:flex;flex-direction:column;gap:var(--sp-xl);
}
[data-theme="light"] .classifieds-frame{
  border-color:rgba(60,105,151,0.35);
  background:rgba(60,105,151,0.04);
}
.cat-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:4px;}
.cat-title{
  flex:1;display:flex;align-items:center;gap:var(--sp-sm);
  font-family:var(--font-bd);font-size:1rem;
  font-weight:700;text-transform:uppercase;letter-spacing:0.06em;color:var(--v100);
}
.cat-title::after{content:'';flex:1;height:1px;background:var(--v15);}
.tags-row{display:flex;flex-wrap:wrap;gap:var(--sp-md);}
.stag{
  display:inline-flex;align-items:center;gap:5px;
  font-family:var(--font-ui);font-size:var(--sz-sm);font-weight:500;
  padding:5px 11px;background:var(--v08);border:1px solid var(--v20);
  border-radius:4px;color:var(--v85);letter-spacing:0.02em;transition:all var(--t);
}

/* ─── Skills: one accent for every group (the rule colour: blue in Day, gold in Night), so the red in Experience is the only other colour.
   The headings do the grouping, and every tag has the same shade (shade differences would imply a level of skill) ─── */
.classified-category{--fam:60,105,151;}
/* Night Edition: the quiet neutral pill the AI group always had, since a gold tint made the box too light against the dark page */
[data-theme="dark"] .classified-category .stag{background:var(--v08);border:1px solid var(--v20);color:var(--v85);}
.classified-category .stag{
  background:rgba(var(--fam),.2);
  border:1px solid rgba(var(--fam),.65);
  color:var(--vellum);
}

/* ═══ EDITORIAL (grid from 768px; below that a card-by-card strip, see the phones block) ═══ */
.editorial-section{
  display:none;
  padding-top:var(--sp-2xl);padding-bottom:var(--sp-xl);
}
.editorial-section .sec-head,
.press-archive .sec-head{ border-top:none; }
.editorial-grid{
  display:grid;
  gap:12px;
  margin-bottom:var(--sp-lg);
}

.ed-tile{
  border-radius:4px;overflow:hidden;
  position:relative;
  border:1px solid var(--v20);
  transition:box-shadow 0.3s ease;
}
.ed-tile--1{background:#001a33;} .ed-tile--2{background:#3d261a;}
.ed-tile--3{background:#2A3D38;} .ed-tile--4{background:#301934;}
.ed-tile--5{background:#d3cbb1;} .ed-tile--6{background:#333333;}
.ed-tile--5 .ed-top,.ed-tile--5 .ed-body{color:#1a1a1a;text-shadow:none;}
[data-theme="light"] .ed-tile--1{background:#ffffff;}
[data-theme="light"] .ed-tile--2{background:#A898B8;}
[data-theme="light"] .ed-tile--3{background:#C4B89A;}
[data-theme="light"] .ed-tile--4{background:#8AAFC4;}
[data-theme="light"] .ed-tile--5{background:#C9A090;}
[data-theme="light"] .ed-tile--6{background:#9AAF8E;}
[data-theme="light"] .ed-tile--5 .ed-top,[data-theme="light"] .ed-tile--5 .ed-body{color:inherit;}
.ed-tile:hover{box-shadow:0 6px 24px rgba(0,0,0,0.35);}
[data-theme="light"] .ed-tile:hover{box-shadow:0 6px 24px rgba(13,17,23,0.15);}

/* Image fills entire card */
.ed-img{
  position:absolute;inset:0;width:100%;height:100%;
  overflow:hidden;z-index:1;
}
.ed-img img{
  width:100%;height:100%;object-fit:cover;object-position:center;
  filter:grayscale(0.3) brightness(0.85) contrast(1.05);
  transition:transform 0.3s ease,filter 0.85s ease;
}
.editorial-section.in-view .ed-img img{filter:none;}
.ed-tile:hover .ed-img img{transform:scale(1.03);}

/* Text overlays. In dark mode a dark halo keeps text legible on busy photos; light mode has none. */
.ed-body,.ed-top{text-shadow:0 0 3px var(--ink),0 0 8px var(--ink);}
[data-theme="light"] .ed-body,[data-theme="light"] .ed-top{text-shadow:none;}
.ed-body{
  position:absolute;z-index:3;
  padding:var(--sp-sm) var(--sp-md);
}

/* Card 1: top right, right-aligned */
.ed-tile--1 .ed-body{top:0;right:0;text-align:right;}
/* Cards 2, 3, 4: bottom left */
.ed-tile--2 .ed-body,
.ed-tile--3 .ed-body,
.ed-tile--4 .ed-body{bottom:0;left:0;}
/* Card 5: top center + bottom center */
.ed-tile--5 .ed-top{position:absolute;top:0;left:0;right:0;z-index:3;padding:var(--sp-sm) var(--sp-md);text-align:center;}
.ed-tile--5 .ed-body{bottom:0;left:0;right:0;text-align:center;}
/* Card 6: top left */
.ed-tile--6 .ed-body{top:0;left:0;}

/* Flags: show dark version in dark, light in light */
.ed-img--flags img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;}
.flags-light{opacity:0;transition:opacity 0.3s;}
[data-theme="light"] .flags-dark{opacity:0;}
[data-theme="light"] .flags-light{opacity:1;}
.ed-headline{
  font-family:var(--font-hd);font-size:var(--sz-base);
  font-weight:900;text-transform:uppercase;letter-spacing:0.04em;
  margin-bottom:2px;
}
.ed-text{
  font-family:var(--font-bd);font-size:var(--sz-sm);
  color:var(--v70);line-height:1.4;
}
.ed-text--md{font-size:var(--sz-base);color:var(--v85);}
.ed-tile--1 .ed-headline{font-size:var(--sz-lg);line-height:1.2;}
.ed-subtext{
  font-family:var(--font-bd);font-size:var(--sz-2xs);
  font-style:italic;color:var(--v70);margin-top:2px;
}
.editorial-caption{
  font-family:var(--font-bd);font-size:var(--sz-sm);
  font-style:italic;color:var(--v45);
  display:flex;align-items:center;gap:var(--sp-md);
  white-space:nowrap;
}
/* Strip controls: phones only */
.ed-bar{display:none;}
.editorial-caption::before,.editorial-caption::after{
  content:'';flex:1;height:1px;background:var(--v15);
}

/* ═══ PRESS ARCHIVE ═══ */
.press-archive{
  padding-top:var(--sp-2xl);padding-bottom:var(--sp-2xl);
}
.archive-grid{
  display:grid;grid-template-columns:1fr;gap:var(--sp-lg);
}
.pa-card{
  background:var(--v08);border:1px solid var(--v35);
  border-radius:4px;overflow:hidden;
  transition:border-color .35s var(--ease),box-shadow .6s cubic-bezier(.22,1,.36,1),transform .6s cubic-bezier(.22,1,.36,1);
}
.pa-card:hover{
  border-color:var(--gold);
  transform:translateY(-6px);
  box-shadow:0 8px 24px rgba(0,0,0,0.4);
}
[data-theme="light"] .pa-card{background:#FAFAF8;}
[data-theme="light"] .pa-card:hover{box-shadow:0 8px 24px rgba(13,17,23,0.10);}
.pa-img{
  width:100%;aspect-ratio:16/9;position:relative;
  display:flex;align-items:center;justify-content:center;overflow:hidden;
}
.pa-img--c1{background:#3D2A2A url('../images/projs/card-classync.webp') center/cover no-repeat;}
.pa-img--c2{background:#2A3D38 url('../images/projs/wishlist.webp') center/cover no-repeat;}
.pa-img--c3{background:#3D3525 url('../images/projs/card-woh.webp') center/cover no-repeat;}
.pa-img--c4{background:#1C3C46 url('../images/projs/card-insightcuts.webp') center/cover no-repeat;}
.pa-img--c5{background:#2A2540 url('../images/projs/card-clueline.webp') center/cover no-repeat;}
.pa-img--c6{background:#1A2A2A url('../images/projs/github.webp') center/cover no-repeat;}
.pa-img--c7{background:#43261C url('../images/projs/card-lendi.webp') center/cover no-repeat;}
[data-theme="light"] .pa-img--c7{background:#E3C0AA url('../images/projs/card-lendi.webp') center/cover no-repeat;}
[data-theme="light"] .pa-img--c6{background:#A3BDB9 url('../images/projs/github.webp') center/cover no-repeat;}
[data-theme="light"] .pa-img--c1{background:#D8C3C1 url('../images/projs/card-classync.webp') center/cover no-repeat;}
[data-theme="light"] .pa-img--c2{background:#A3BDB9 url('../images/projs/wishlist.webp') center/cover no-repeat;}
[data-theme="light"] .pa-img--c3{background:#B5AFA0 url('../images/projs/card-woh.webp') center/cover no-repeat;}
[data-theme="light"] .pa-img--c4{background:#A7C7CF url('../images/projs/card-insightcuts.webp') center/cover no-repeat;}
[data-theme="light"] .pa-img--c5{background:#A898B8 url('../images/projs/card-clueline.webp') center/cover no-repeat;}
.pa-badges{
  position:absolute;top:8px;right:8px;
  display:flex;gap:4px;
}
.pa-badge{
  font-family:var(--font-ui);font-size:var(--sz-2xs);font-weight:700;
  text-transform:uppercase;letter-spacing:0.1em;
  padding:3px 8px;border-radius:2px;
}
.pa-badge--ux{background:var(--gold);color:var(--ink);}
.pa-badge--code{background:#D4A0A7;color:var(--ink);}
[data-theme="light"] .pa-badge--code{background:rgba(36,106,115,1);color:#F5F1E8;}
/* --pa-rule-gap sits above and below the footer rule, so both gaps stay equal */
.pa-body{padding:var(--sp-md);--pa-rule-gap:var(--sp-md);}
.pa-meta{display:flex;gap:var(--sp-sm);flex-wrap:wrap;margin-bottom:var(--sp-sm);}
.pa-tag{
  font-family:var(--font-ui);font-size:var(--sz-2xs);font-weight:500;
  text-transform:uppercase;letter-spacing:0.08em;
  color:var(--v45);background:var(--v08);padding:2px 8px;border-radius:2px;
}
.pa-title{
  font-family:var(--font-bd);font-size:var(--sz-xl);font-weight:700;
  line-height:1.2;color:var(--v100);margin-bottom:var(--sp-sm);
}
.pa-desc{
  font-family:var(--font-bd);font-size:var(--sz-base);line-height:1.5;
  color:var(--v60);margin-bottom:var(--pa-rule-gap);
}
/* Items align to the top so the link and the pills both start one gap below the rule */
.pa-footer{
  display:flex;justify-content:space-between;align-items:flex-start;
  padding-top:var(--pa-rule-gap);border-top:1px solid var(--v15);
  flex-wrap:wrap;gap:var(--sp-sm);
}
.pa-links{display:flex;gap:var(--sp-md);flex-wrap:wrap;}
/* Cards with no links: the empty row would push the pills down a line; the pills keep their place at the right */
.pa-links:empty{display:none;}
.pa-links:empty + .pa-techs{margin-left:auto;}
.pa-link{
  font-family:var(--font-ui);font-size:var(--sz-xs);font-weight:600;
  text-transform:uppercase;letter-spacing:0.08em;color:var(--terra);
  display:inline-flex;align-items:center;gap:4px;
  transition:gap var(--t),color var(--t);
}
.pa-link:hover{gap:8px;color:var(--gold);}
.pa-link svg{flex-shrink:0;}
/* Card-wide link: a .pa-stretch link's hit area covers its whole card, so a
   tap anywhere on the card opens the case study. Other links in the card
   sit above it and keep working on their own. */
.pa-card{position:relative;}
.pa-link.pa-stretch{position:static;}
.pa-link.pa-stretch::before{content:none;}
.pa-stretch::after{content:'';position:absolute;inset:0;z-index:1;}
.pa-card .pa-link:not(.pa-stretch){z-index:2;}
.pa-card:hover .pa-stretch{gap:8px;}
/* The ring goes round the card, since the whole card is the link. Browsers
   without :has() keep the ring on the link itself. */
@supports selector(:has(*)){
  .pa-stretch:focus-visible{outline:none;}
  .pa-card:has(.pa-stretch:focus-visible){outline:2px solid var(--gold);outline-offset:3px;}
}
.pa-techs{display:flex;gap:4px;flex-wrap:wrap;}
.pa-tech{
  font-family:var(--font-ui);font-size:var(--sz-2xs);font-weight:500;
  text-transform:uppercase;letter-spacing:0.05em;
  color:var(--v45);padding:2px 6px;
  border:1px solid var(--v15);border-radius:2px;
}

/* ─── Selected Builds tiers ───
   One lead story, two second stories, then short items. Short items show
   only the first sentence of their description (.pa-more stays in the HTML,
   hidden) and drop the tool pills. */
.pa-card--lead .pa-title{font-family:var(--font-hd);font-weight:900;font-size:var(--sz-3xl);line-height:1.1;}
.pa-card--short .pa-more,.pa-card--short .pa-techs{display:none;}

/* ═══ FOOTER ═══ */
.site-footer{
  background:var(--foot);
  border-top:2px solid var(--gold);
  padding:var(--sp-2xl) 0 0;
}
.foot-inner{
  display:grid;grid-template-columns:2fr 1fr 1fr;
  gap:var(--sp-2xl);row-gap:var(--sp-lg);align-items:start;
  padding-bottom:var(--sp-xl);
  border-bottom:1px solid var(--v15);
}
.foot-logotype{
  font-family:var(--font-bl);
  font-size:clamp(1.6rem,2.5vw,2.2rem);
  font-weight:400;color:var(--v100);line-height:1.1;
  margin-bottom:var(--sp-sm);
}
.foot-brand-desc{
  font-family:var(--font-bd);font-size:var(--sz-sm);
  color:var(--v55);line-height:1.6;margin-bottom:var(--sp-sm);
}
.foot-brand-quote{
  font-family:var(--font-bd);font-size:var(--sz-xs);
  font-style:italic;color:var(--v45);
}
.foot-col-title{
  font-family:var(--font-ui);font-size:var(--sz-2xs);
  font-weight:700;text-transform:uppercase;letter-spacing:0.12em;
  color:var(--v45);
  margin-bottom:var(--sp-md);padding-bottom:var(--sp-sm);
  border-bottom:1px solid var(--v15);
}
.foot-col a{
  display:flex;align-items:center;gap:6px;
  font-family:var(--font-bd);font-size:var(--sz-sm);
  color:var(--v70);padding:4px 0;transition:color var(--t),text-decoration-color var(--t);
}
.foot-col a:hover{color:var(--v100);}
.foot-ext-link svg{color:var(--v35);flex-shrink:0;transition:color var(--t);}
.foot-ext-link:hover svg{color:var(--v70);}
.foot-icon-row{display:flex;gap:var(--sp-sm);}
.foot-icon-btn{
  width:42px;height:42px;
  display:flex;align-items:center;justify-content:center;
  border:1px solid var(--v20);border-radius:4px;
  color:var(--v55);transition:all var(--t);
}
.foot-icon-btn:hover{border-color:var(--gold);color:var(--gold);}
.foot-icon-btn svg{width:18px;height:18px;fill:currentColor;}
.foot-email{text-decoration:underline;text-underline-offset:3px;margin-bottom:var(--sp-sm);}
.foot-inner > .foot-connect-note{grid-column:1 / -1;text-align:center;}
.foot-connect-note{
  font-family:var(--font-bd);font-size:var(--sz-xs);
  font-style:italic;color:var(--v45);line-height:1.55;
}
.foot-bottom{
  display:flex;justify-content:center;
  align-items:center;flex-wrap:wrap;gap:var(--sp-md);
  padding-top:var(--sp-lg);padding-bottom:var(--sp-lg);
}
.foot-copy{
  font-family:var(--font-ui);font-size:var(--sz-2xs);
  color:var(--v45);letter-spacing:0.04em;
}

/* ═══ FOCUS AND PRESS ═══
   One keyboard focus ring everywhere, in the accent colour (5.1:1 on light
   paper, 8.2:1 on dark), instead of each browser's own. Buttons and
   clickable cards nudge down 1px while pressed, so taps get feedback on
   phones, where there is no hover. `translate` leaves the transforms that
   centre the nav bar buttons alone. */
:focus-visible{outline:2px solid var(--gold);outline-offset:2px;}
.theme-btn:active,.hamburger:active,.drawer-close:active,.foot-icon-btn:active,
.hero-cta:active,.nav-cta:active,.back-btn:active{translate:0 1px;}
.pa-card:has(.pa-stretch):active{transform:translateY(-2px);}

/* ═══ TOUCH TARGETS ═══
   Invisible ::before hit areas bring small controls to about 44×44px
   without changing how they look or where anything sits. Each inset is
   sized to stop short of its neighbours. Insets start inside the
   border, so bordered elements get 1px more. */
.theme-btn,.hamburger,.drawer-close,.drawer a.nav-cta,.drawer-foot a,
.hero-social-link,.pa-link,.nav-ticker a,.foot-icon-btn{position:relative;}
.theme-btn::before,.hamburger::before,.drawer-close::before,.drawer a.nav-cta::before,
.drawer-foot a::before,.hero-social-link::before,.pa-link::before,
.nav-ticker a::before,.foot-icon-btn::before{content:'';position:absolute;}
.theme-btn::before{inset:-8px -5px -8px -8px;}     /* 8px gap to the menu button */
.hamburger::before{inset:-7px -7px -7px -4px;}
.nav-bar .theme-btn::before{inset:-8px;}
.drawer-close::before{inset:-3px -9px;}
.drawer a.nav-cta::before{inset:0 0 -15px;}
.drawer-foot a::before{inset:-15px -4px;}
.hero-social-link::before{inset:-13px -11px;}       /* 24px gap between icons */
.pa-link::before{inset:-16px 0;}
.nav-ticker a::before{inset:-15px 0;}
.nav-ticker a.nav-cta::before{inset:-12px 0;}
.foot-icon-btn::before{inset:-2px;}

/* ═══ RESPONSIVE ═══ */
@media(min-width:640px){
  :root{--pad:32px;}
  .archive-grid{grid-template-columns:1fr 1fr;}
  .pa-card--lead,.pa-card--short{grid-column:1/-1;}
  .hero-illo{max-width:480px;}
}

@media(min-width:768px){
  :root{--sticky-h:41px;}
  .mast-top{display:none;}
  .nav-bar{display:block;}
  .nav-ticker{gap:var(--sp-md);}   /* desktop spacing runs into the toggle below 960px */
  /* Editorial: two columns, three rows */
  .editorial-section{display:block;}
  .editorial-grid{grid-template-columns:1fr 1fr;grid-template-rows:repeat(3,240px);}
  .editorial-grid .ed-tile{grid-column:auto;grid-row:auto;}
}

@media(min-width:960px){
  :root{--pad:48px;}
  .mast-title{display:none;}
  .mast-desktop{display:grid;}
  .nav-ticker{gap:var(--sp-xl);}

  /* Hero: 2-col */
  .hero{
    flex-direction:row;justify-content:space-between;
    text-align:left;align-items:center;
    padding:var(--sp-3xl) var(--pad) var(--sp-2xl);
    gap:var(--sp-3xl);
  }
  .hero-left{flex:1;max-width:460px;}
  .hero-cta{align-self:flex-start;}
  .hero-socials{justify-content:flex-start;}
  .hero-illo{max-width:none;flex:0.75;}

  /* Wire + Classifieds side-by-side */
  .wire-classifieds-row{
    display:grid;grid-template-columns:2fr 1fr;gap:var(--sp-3xl);
    padding-top:var(--sp-2xl);padding-bottom:var(--sp-xl);
  }
  .classifieds-col{margin-top:0;}

  /* Editorial: full 20-column grid */
  .editorial-grid{grid-template-columns:repeat(20,1fr);grid-template-rows:300px 260px;}
  .editorial-grid .ed-tile--1{grid-column:1/9;grid-row:1;}
  .editorial-grid .ed-tile--2{grid-column:9/15;grid-row:1;}
  .editorial-grid .ed-tile--3{grid-column:15/21;grid-row:1;}
  .editorial-grid .ed-tile--4{grid-column:1/6;grid-row:2;}
  .editorial-grid .ed-tile--5{grid-column:6/16;grid-row:2;}
  .editorial-grid .ed-tile--6{grid-column:16/21;grid-row:2;}

  /* Selected Builds: lead across the top, image beside its text; second
     stories in halves; short items in thirds */
  #projects .archive-grid{grid-template-columns:repeat(6,1fr);}
  /* The lead's image keeps its full 16:9 frame, inset and centred beside the text */
  .pa-card--lead{display:grid;grid-template-columns:3fr 2fr;align-items:center;}
  .pa-card--lead .pa-img{margin:var(--sp-lg) 0 var(--sp-lg) var(--sp-lg);width:auto;border-radius:2px;}
  .pa-card--lead .pa-body{padding:var(--sp-xl);display:flex;flex-direction:column;justify-content:center;}
  .pa-card--lead .pa-title{font-size:clamp(2.25rem,3vw,2.75rem);}
  .pa-card--lead .pa-desc{font-size:var(--sz-lg);}
  .pa-card--second{grid-column:span 3;}
  .pa-card--second .pa-title{font-size:var(--sz-2xl);}
  .pa-card--short{grid-column:span 2;}
}

@media(min-width:1200px){
}

/* ── Phones: hamburger visible ── */
@media(max-width:767.98px){
  .hamburger{display:flex;}

  /* Editorial: one tile at a time, sliding on its own (main.js). The strip runs
     to the right edge so the next tile peeks in. */
  .editorial-section{display:block;}
  .ed-strip{
    overflow:hidden;touch-action:pan-y;
    margin-right:calc(-1 * var(--pad));
  }
  .editorial-grid{
    display:flex;gap:12px;margin-bottom:0;
    transition:transform 0.7s cubic-bezier(0.4,0,0.2,1);
  }
  .editorial-grid .ed-tile{flex:none;width:min(280px,76vw);height:240px;}
  /* The Shift is a wide drawing on a transparent background: show all of it, the tile colour fills around it */
  .editorial-grid .ed-tile--5 .ed-img img{object-fit:contain;}
  .ed-bar{display:flex;align-items:center;justify-content:space-between;gap:var(--sp-md);margin:var(--sp-sm) 0 var(--sp-lg);}
  .ed-count{font-family:var(--font-ui);font-size:var(--sz-xs);font-weight:600;letter-spacing:0.08em;color:var(--v55);font-variant-numeric:tabular-nums;}
  .ed-hint{flex:1;text-align:center;font-family:var(--font-bd);font-style:italic;font-size:var(--sz-sm);color:var(--v60);}
  .ed-ring-btn{
    position:relative;width:44px;height:44px;flex:none;
    display:grid;place-items:center;border:0;padding:0;background:none;
    color:var(--v100);cursor:pointer;border-radius:50%;
  }
  .ed-ring{position:absolute;inset:2px;transform:rotate(-90deg);}
  .ed-ring circle{fill:none;stroke-width:2.5;}
  .ed-ring-track{stroke:var(--v20);}
  .ed-ring-fill{stroke:var(--gold);stroke-linecap:round;stroke-dasharray:106.8;stroke-dashoffset:106.8;}
  .ed-ic{width:14px;height:14px;fill:currentColor;}
  .ed-ic-play,.ed-bar.is-paused .ed-ic-pause{display:none;}
  .ed-bar.is-paused .ed-ic-play{display:block;}
  .mast-top{justify-content:flex-end;padding:8px var(--pad);}
}

@media(max-width:959.98px){
  .foot-inner{grid-template-columns:1fr;gap:var(--sp-xl);}

  /* Short items become compact rows: thumbnail left, text right */
  .archive-grid .pa-card--short{
    display:grid;grid-template-columns:120px 1fr;column-gap:14px;align-items:start;
    background:none;border:0;border-top:1px solid var(--v15);border-radius:0;
    padding-top:var(--sp-md);overflow:visible;
  }
  .archive-grid .pa-card--short:hover{transform:none;box-shadow:none;border-top-color:var(--gold);}
  .pa-card--short .pa-img{aspect-ratio:16/9;border-radius:3px;}
  .pa-card--short .pa-badges{display:none;}
  .pa-card--short .pa-body{padding:0;}
  .pa-card--short .pa-meta{margin-bottom:4px;}
  .pa-card--short .pa-tag:not(:first-child){display:none;}
  .pa-card--short .pa-title{font-size:var(--sz-lg);margin-bottom:4px;}
  .pa-card--short .pa-desc{font-size:var(--sz-sm);line-height:1.45;margin-bottom:var(--sp-sm);}
  .pa-card--short .pa-footer{border-top:0;padding-top:0;}
}

