/* ==========================================================================
   Hardik Dhanak — Industrial Design Portfolio
   Design language: "workshop paper" — warm paper ground, ink typography,
   drawing-sheet metadata in mono, moss-green accent drawn from the
   original portfolio deck. Image-led, editorial, quiet.
   ========================================================================== */

/* ---------- Fonts (bundled, no external requests) ---------- */
@font-face {
  font-family: 'Archivo';
  src: url('../fonts/archivo-latin-wght-normal.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Plex Mono';
  src: url('../fonts/ibm-plex-mono-latin-400-normal.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Plex Mono';
  src: url('../fonts/ibm-plex-mono-latin-500-normal.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  --paper:      #FFFFFF;
  --paper-deep: #F6F6F4;
  --plate:      #FFFFFF;
  --ink:        #1A1914;
  --ink-2:      #5B594F;
  --ink-3:      #8C8A82;
  --rule:       #E6E5E1;
  --rule-2:     #D4D2CB;
  --moss:       #33612E;
  --moss-deep:  #264C22;

  --sans: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  --mono: 'Plex Mono', 'SFMono-Regular', Consolas, monospace;

  --gutter: clamp(20px, 4.6vw, 68px);
  --max: 1520px;

  --ease: cubic-bezier(.22, .61, .21, 1);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.7;
  font-weight: 410;
  font-variation-settings: 'wght' 410;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { display: block; width: 100%; height: auto; }

a { color: inherit; text-decoration: none; }

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

h1, h2, h3 { margin: 0; font-weight: 540; font-variation-settings: 'wght' 540; }

ul, ol, dl, dd, figure { margin: 0; padding: 0; }
li { list-style: none; }

::selection { background: #2f5a2b22; }

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

.skip {
  position: absolute;
  left: var(--gutter); top: 10px;
  padding: 10px 16px;
  background: var(--ink); color: var(--paper);
  font-family: var(--mono); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase;
  transform: translateY(-260%);
  transition: transform .3s var(--ease);
  z-index: 60;
}
.skip:focus-visible { transform: translateY(0); }

/* ---------- Type helpers ---------- */
.mono {
  font-family: var(--mono);
  font-weight: 500;
  font-size: .72rem;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.mono--faint { color: var(--ink-3); }

.wrap {
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* prose links */
.link {
  color: var(--moss);
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 100% 1px;
  background-position: 0 96%;
  background-repeat: no-repeat;
  transition: color .25s;
}
.link:hover { color: var(--moss-deep); }

/* ---------- Header ---------- */
.top {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .35s, background .35s;
}
.top.is-scrolled { border-bottom-color: var(--rule); }

.top__in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.brand {
  font-weight: 560;
  font-variation-settings: 'wght' 560;
  letter-spacing: -.01em;
  font-size: 1.02rem;
  display: inline-flex;
  align-items: baseline;
  gap: .55em;
}
.brand small {
  font-family: var(--mono);
  font-weight: 400;
  font-size: .66rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.nav { display: flex; gap: clamp(20px, 3vw, 44px); }
.nav a {
  font-family: var(--mono);
  font-size: .74rem;
  font-weight: 500;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--ink-2);
  padding: 6px 0;
  background-image: linear-gradient(var(--moss), var(--moss));
  background-size: 0 1px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: color .25s, background-size .3s var(--ease);
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); background-size: 100% 1px; }

.menu-btn {
  display: none;
  appearance: none;
  background: none;
  border: 0;
  padding: 10px 0 10px 14px;
  cursor: pointer;
  font-family: var(--mono);
  font-size: .74rem;
  font-weight: 500;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--ink);
}

/* ---------- Page load / reveal ---------- */
[data-r] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
  transition-delay: var(--d, 0s);
}
[data-r].in { opacity: 1; transform: none; }

/* ---------- Hero (home) ---------- */
.hero { padding: clamp(56px, 9vh, 120px) 0 clamp(40px, 6vh, 72px); }

.hero .mono { display: block; margin-bottom: clamp(20px, 3vh, 34px); }

.hero__name {
  font-size: clamp(3.3rem, 10.5vw, 8.6rem);
  line-height: .95;
  letter-spacing: -.035em;
  font-weight: 555;
  font-variation-settings: 'wght' 555;
  text-wrap: balance;
}

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 34px;
  margin-top: clamp(26px, 4vh, 44px);
  padding-top: 22px;
  border-top: 1px solid var(--rule);
}
.hero__meta span { display: inline-flex; align-items: center; gap: 10px; }
.hero__meta i {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--moss);
  flex: none;
}

.hero__lede {
  margin-top: clamp(24px, 4vh, 40px);
  max-width: 46ch;
  font-size: clamp(1.16rem, 1.9vw, 1.48rem);
  line-height: 1.55;
  font-weight: 430;
  font-variation-settings: 'wght' 430;
  color: var(--ink);
  text-wrap: pretty;
}
.hero__lede em { font-style: normal; color: var(--ink-2); }

/* ---------- Full-bleed image band ---------- */
.band { margin: clamp(28px, 5vh, 64px) 0 0; }
.band__img { overflow: hidden; }
.band__img img { aspect-ratio: 16 / 8.4; object-fit: cover; }
.band figcaption,
.figcap {
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-3);
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 0 0;
}
.band figcaption { padding-inline: var(--gutter); max-width: var(--max); margin-inline: auto; }

/* ---------- Section label rows ---------- */
.label-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 20px;
  padding: 16px 0;
  border-top: 1px solid var(--ink);
  margin-bottom: clamp(34px, 6vh, 64px);
}

.section { padding: clamp(72px, 12vh, 150px) 0 0; }
.section--flush { padding-top: clamp(56px, 9vh, 110px); }

/* ---------- Index table ---------- */
.index { border-top: 1px solid var(--ink); }
.index__row {
  display: grid;
  grid-template-columns: 3.4rem 1.35fr 1fr .9fr 2.2rem;
  align-items: baseline;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--rule);
  transition: background .3s;
}
.index__row:hover { background: var(--paper-deep); }
.index__row .no { font-family: var(--mono); font-size: .72rem; color: var(--ink-3); }
.index__row .name {
  font-size: clamp(1.08rem, 2vw, 1.45rem);
  font-weight: 520;
  font-variation-settings: 'wght' 520;
  letter-spacing: -.012em;
}
.index__row .client, .index__row .status {
  font-family: var(--mono); font-size: .7rem; font-weight: 500;
  letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2);
}
.index__row .status { display: inline-flex; align-items: center; gap: 9px; }
.index__row .status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--moss); flex: none; }
.index__row .status--proto::before { background: transparent; border: 1.5px solid var(--ink-2); }
.index__row .status--study::before { background: transparent; border: 1.5px dashed var(--ink-3); }
.index__row .go { text-align: right; color: var(--ink-3); transition: transform .4s var(--ease), color .3s; }
.index__row:hover .go { transform: translateX(4px); color: var(--moss); }

/* ---------- About ---------- */
.about {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: clamp(18px, 3vw, 44px);
}
.about__lede {
  grid-column: 1 / 8;
  font-size: clamp(1.35rem, 2.6vw, 2.05rem);
  line-height: 1.42;
  letter-spacing: -.015em;
  font-weight: 470;
  font-variation-settings: 'wght' 470;
  text-wrap: pretty;
}
.about__side { grid-column: 9 / 13; display: grid; gap: 26px; align-content: start; }
.about__side dt { font-family: var(--mono); font-size: .68rem; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 6px; }
.about__side dd { font-size: .98rem; color: var(--ink-2); line-height: 1.55; }

/* ---------- Contact ---------- */
.contact {
  margin-top: clamp(80px, 14vh, 170px);
  border-top: 1px solid var(--ink);
  background: var(--paper);
}
.contact__in { padding-block: clamp(64px, 11vh, 140px); }
.contact h2 {
  font-size: clamp(2.5rem, 7vw, 5.6rem);
  line-height: 1.02;
  letter-spacing: -.03em;
  max-width: 14ch;
  text-wrap: balance;
}
.contact__links {
  margin-top: clamp(34px, 6vh, 56px);
  display: flex;
  flex-wrap: wrap;
  gap: 14px 56px;
}
.contact__links a {
  font-size: clamp(1.15rem, 2.4vw, 1.7rem);
  font-weight: 480;
  font-variation-settings: 'wght' 480;
  letter-spacing: -.012em;
  display: inline-flex;
  align-items: baseline;
  gap: 14px;
  background-image: linear-gradient(var(--moss), var(--moss));
  background-size: 0 1.5px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: background-size .4s var(--ease), color .3s;
  padding-bottom: 3px;
}
.contact__links a:hover { background-size: 100% 1.5px; color: var(--moss-deep); }
.contact__links .mono { letter-spacing: .13em; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--rule); }
.footer__in {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 40px;
  justify-content: space-between;
  align-items: baseline;
  padding-block: 26px 34px;
  font-family: var(--mono);
  font-size: .7rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.footer__nav { display: flex; gap: 26px; }
.footer__nav a:hover { color: var(--ink); }

/* ==========================================================================
   Project pages
   ========================================================================== */

.p-hero { padding: clamp(48px, 8vh, 96px) 0 0; }
.crumb {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin-bottom: clamp(26px, 4vh, 44px);
  transition: color .25s;
}
.crumb:hover { color: var(--moss); }
.crumb .arr { transition: transform .35s var(--ease); }
.crumb:hover .arr { transform: translateX(-3px); }

.p-hero h1 {
  font-size: clamp(2.9rem, 8.4vw, 7rem);
  line-height: .96;
  letter-spacing: -.033em;
  font-weight: 555;
  font-variation-settings: 'wght' 555;
  text-wrap: balance;
}
.p-hero__desc {
  margin-top: 18px;
  font-size: clamp(1.15rem, 2vw, 1.5rem);
  color: var(--ink-2);
  font-weight: 430;
  font-variation-settings: 'wght' 430;
  max-width: 46ch;
}

.titleblock {
  margin-top: clamp(28px, 5vh, 48px);
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--rule);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.titleblock > div { padding: 16px 20px 16px 0; border-right: 1px solid var(--rule); }
.titleblock > div + div { padding-left: 20px; }
.titleblock > div:last-child { border-right: 0; }
.titleblock dt {
  font-family: var(--mono); font-size: .64rem; font-weight: 500;
  letter-spacing: .15em; text-transform: uppercase; color: var(--ink-3);
  margin-bottom: 7px;
}
.titleblock dd { font-size: .96rem; font-weight: 480; font-variation-settings: 'wght' 480; letter-spacing: -.005em; }
.titleblock .status { display: inline-flex; align-items: center; gap: 9px; }
.titleblock .status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--moss); }
.titleblock .status--proto::before { background: transparent; border: 1.5px solid var(--ink-2); }

.p-hero__img { margin-top: clamp(34px, 6vh, 64px); }

/* Section headers with sheet numbering */
.sec { padding-top: clamp(72px, 12vh, 140px); }
.sec__head {
  display: grid;
  grid-template-columns: 5.2rem 1fr;
  gap: 14px;
  align-items: baseline;
  border-top: 1px solid var(--ink);
  padding-top: 18px;
  margin-bottom: clamp(30px, 5vh, 54px);
}
.sec__no { font-family: var(--mono); font-size: .74rem; font-weight: 500; letter-spacing: .14em; color: var(--ink-3); }
.sec__head h2 {
  font-size: clamp(1.7rem, 3.6vw, 2.7rem);
  letter-spacing: -.022em;
  line-height: 1.06;
}
.sec__head .sub { grid-column: 2; margin-top: 10px; color: var(--ink-2); max-width: 62ch; font-size: 1.03rem; }

.prose { max-width: 66ch; }
.prose--wide { max-width: 74ch; }

/* Statements / editorial lines */
.statement {
  font-size: clamp(1.5rem, 3.4vw, 2.6rem);
  line-height: 1.28;
  letter-spacing: -.02em;
  font-weight: 480;
  font-variation-settings: 'wght' 480;
  max-width: 30ch;
  text-wrap: pretty;
}
.statement strong { font-weight: 580; font-variation-settings: 'wght' 580; }
.statement .accent { color: var(--moss); }

.milestones { display: grid; gap: 18px; max-width: 56ch; }
.milestones li { display: grid; grid-template-columns: 14px 1fr; gap: 16px; align-items: baseline; }
.milestones li::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--moss); position: relative; top: -2px; }
.milestones .m-label { font-family: var(--mono); font-size: .66rem; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); display: block; margin-bottom: 3px; }

/* Figures */
.fig { margin: 0 0 clamp(20px, 3.4vw, 40px); }
.fig--flush { margin-bottom: 0; }
.fig .figcap { border-top: 1px solid var(--rule); margin-top: 12px; }
.fig--bare .figcap { border-top: 0; }

.media-2, .media-3 {
  display: grid;
  gap: clamp(14px, 2.4vw, 32px);
  align-items: start;
}
.media-2 { grid-template-columns: repeat(2, 1fr); }
.media-3 { grid-template-columns: repeat(3, 1fr); }
.media-2--wide { grid-template-columns: 1.5fr 1fr; }
.media-2--tall { grid-template-columns: 1fr 1.5fr; }

.gallery {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: clamp(14px, 2.4vw, 32px);
}
.gallery .fig { margin: 0; }
.g-4 { grid-column: span 4; }
.g-5 { grid-column: span 5; }
.g-6 { grid-column: span 6; }
.g-7 { grid-column: span 7; }
.g-8 { grid-column: span 8; }
.g-12 { grid-column: span 12; }

/* Text + media rows */
.tm {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: clamp(18px, 3vw, 44px);
  align-items: center;
}
.tm__text { grid-column: 1 / 5; }
.tm__media { grid-column: 5 / 13; }
.tm--rev .tm__text { grid-column: 9 / 13; order: 2; }
.tm--rev .tm__media { grid-column: 1 / 9; order: 1; }
.tm__text .mono { display: block; margin-bottom: 16px; }

/* Ownership steps (Ridlr) */
.steps {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  border-top: 1px solid var(--rule);
  border-left: 1px solid var(--rule);
  counter-reset: step;
}
.steps li {
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: clamp(18px, 2.4vw, 30px) clamp(16px, 2vw, 26px) clamp(22px, 3vw, 34px);
}
.steps li::before {
  counter-increment: step;
  content: "0" counter(step);
  display: block;
  font-family: var(--mono);
  font-size: .78rem;
  font-weight: 500;
  letter-spacing: .12em;
  color: var(--moss);
  margin-bottom: 14px;
}
.steps li p { font-size: .96rem; line-height: 1.55; color: var(--ink-2); }

/* Principles chips (Rupeek) */
.principles { display: flex; flex-wrap: wrap; gap: 10px; }
.principles li {
  font-size: .95rem;
  font-weight: 470;
  font-variation-settings: 'wght' 470;
  border: 1px solid var(--rule-2);
  padding: 11px 18px;
  border-radius: 100px;
  color: var(--ink-2);
  background: var(--paper-deep);
}

/* Process flow (Rupeek) */
.flow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 0;
  font-family: var(--mono);
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.flow li { display: inline-flex; align-items: center; }
.flow li + li::before {
  content: "\2192";
  margin: 0 14px;
  color: var(--rule-2);
  font-family: var(--sans);
}

/* Timeline (Navya) */
.timeline { border-top: 1px solid var(--ink); }
.timeline li {
  display: grid;
  grid-template-columns: 11rem 1fr;
  gap: 20px;
  padding: 20px 0;
  border-bottom: 1px solid var(--rule);
  align-items: baseline;
}
.timeline time {
  font-family: var(--mono);
  font-size: .74rem;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--moss);
  white-space: nowrap;
}
.timeline p { color: var(--ink); font-size: 1.02rem; max-width: 58ch; }

/* Spec list (processes etc.) */
.speclist { display: grid; gap: 0; border-top: 1px solid var(--rule); max-width: 62ch; }
.speclist li {
  padding: 12px 0;
  border-bottom: 1px solid var(--rule);
  display: grid;
  grid-template-columns: 2.6rem 1fr;
  gap: 14px;
  align-items: baseline;
  font-size: .98rem;
  color: var(--ink-2);
}
.speclist li::before {
  content: attr(data-i);
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .12em;
  color: var(--ink-3);
}

/* Deep band (paper-deep full-bleed section) */
.deep {
  background: var(--paper-deep);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: clamp(56px, 9vh, 110px) 0;
  margin-top: clamp(72px, 12vh, 140px);
}

/* Prev / next */
.pn {
  margin-top: clamp(80px, 13vh, 160px);
  border-top: 1px solid var(--ink);
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.pn a {
  padding: clamp(30px, 5vh, 52px) 0;
  display: grid;
  gap: 10px;
}
.pn a + a { text-align: right; border-left: 1px solid var(--rule); padding-left: clamp(18px, 3vw, 44px); }
.pn a:first-child { padding-right: clamp(18px, 3vw, 44px); }
.pn .mono { transition: color .25s; }
.pn a:hover .mono { color: var(--moss); }
.pn .pn__title {
  font-size: clamp(1.5rem, 3.4vw, 2.5rem);
  letter-spacing: -.022em;
  font-weight: 540;
  font-variation-settings: 'wght' 540;
  line-height: 1.05;
}
.pn .pn__title .arrow { display: inline-block; transition: transform .4s var(--ease); color: var(--ink-3); }
.pn a:hover .pn__title .arrow { transform: translateX(.2em); color: var(--moss); }
.pn a:first-child:hover .pn__title .arrow { transform: translateX(-.2em); }

/* ---------- Mobile menu ---------- */
.menu-panel {
  position: fixed;
  inset: 0;
  z-index: 49;
  background: var(--paper);
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 0 var(--gutter);
  opacity: 0;
  visibility: hidden;
  transition: opacity .4s var(--ease), visibility 0s .4s;
}
.menu-open .menu-panel { opacity: 1; visibility: visible; transition-delay: 0s; }
.menu-panel a {
  font-size: clamp(2.2rem, 9vw, 3.4rem);
  font-weight: 545;
  font-variation-settings: 'wght' 545;
  letter-spacing: -.028em;
  padding: 12px 0;
  border-bottom: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  transform: translateY(14px);
  opacity: 0;
  transition: transform .5s var(--ease), opacity .5s var(--ease);
  transition-delay: var(--d, 0s);
}
.menu-open .menu-panel a { transform: none; opacity: 1; }
.menu-panel a .mono { font-size: .68rem; }
.menu-open { overflow: hidden; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1060px) {
  .tm__text, .tm--rev .tm__text { grid-column: 1 / 13; order: 1; }
  .tm__media, .tm--rev .tm__media { grid-column: 1 / 13; order: 2; }
  .tm { align-items: start; }
  .about__lede { grid-column: 1 / 13; }
  .about__side { grid-column: 1 / 13; grid-template-columns: repeat(3, 1fr); }
  .g-4, .g-5, .g-6, .g-7, .g-8 { grid-column: span 6; }
}

@media (max-width: 720px) {
  body { font-size: 1rem; }
  .nav { display: none; }
  .menu-btn { display: inline-block; }
  .top__in { height: 62px; }
  .band__img img { aspect-ratio: 4 / 3.4; }
  .index__row { grid-template-columns: 2.4rem 1fr 2rem; }
  .index__row .client { display: none; }
  .index__row .no { grid-column: 1; grid-row: 1; }
  .index__row .name { grid-column: 2; grid-row: 1; }
  .index__row .status { grid-column: 2; grid-row: 2; }
  .index__row .go { grid-column: 3; grid-row: 1 / span 2; align-self: center; }
  .about__side { grid-template-columns: 1fr; gap: 20px; }
  .titleblock { grid-template-columns: repeat(2, 1fr); }
  .titleblock > div { border-right: 0; border-bottom: 1px solid var(--rule); padding-left: 0 !important; }
  .titleblock > div:nth-child(odd) { border-right: 1px solid var(--rule); padding-right: 16px; }
  .titleblock > div:nth-child(even) { padding-left: 16px !important; }
  .titleblock > div:nth-last-child(-n+2) { border-bottom: 0; }
  .steps { grid-template-columns: 1fr; border-left: 0; border-right: 0; }
  .steps li { border-right: 0; padding-inline: 0; }
  .media-2, .media-3, .media-2--wide, .media-2--tall { grid-template-columns: 1fr; }
  .g-4, .g-5, .g-6, .g-7, .g-8 { grid-column: span 12; }
  .timeline li { grid-template-columns: 1fr; gap: 6px; }
  .pn { grid-template-columns: 1fr; }
  .pn a + a { border-left: 0; border-top: 1px solid var(--rule); padding-left: 0; text-align: left; }
  .pn a:first-child { padding-right: 0; }
  .sec__head { grid-template-columns: 1fr; gap: 10px; }
  .sec__head .sub { grid-column: 1; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-r] { opacity: 1; transform: none; transition: none; }
  * { animation: none !important; }
}

/* ---------- Print ---------- */
@media print {
  .top, .menu-panel, .pn, .skip { display: none; }
  body { background: #fff; }
}

/* ---------- Late additions ---------- */
[id] { scroll-margin-top: 92px; }

.plate--fit img {
  width: auto;
  max-width: 100%;
  max-height: min(64vh, 600px);
  margin-inline: auto;
}

.cols-2 {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: clamp(28px, 5vw, 80px);
  align-items: center;
}
@media (max-width: 900px) {
  .cols-2 { grid-template-columns: 1fr; gap: 30px; align-items: start; }
}

/* Caption + footer contrast */
.figcap, .band figcaption { color: var(--ink-2); }
.figcap > span + span, .band figcaption > span + span { color: var(--ink-3); }
.footer__in { color: var(--ink-2); }
.footer__in > span { color: var(--ink-3); }

/* Fallbacks for browsers without color-mix() */
@supports not (background: color-mix(in srgb, red 50%, blue)) {
  .top { background: rgba(255, 255, 255, .92); }
  .index__row:hover { background: #F6F6F4; }
  
}

/* ==========================================================================
   v2 — compact intro, project tiles, /work page, logo band
   ========================================================================== */

/* ---------- Intro (home hero) ---------- */
.intro { padding: clamp(44px, 7.5vh, 100px) 0 clamp(30px, 5vh, 60px); }
.intro__grid {
  display: grid;
  grid-template-columns: 1.3fr .7fr;
  gap: clamp(30px, 5vw, 96px);
  align-items: center;
}
.intro__copy .mono { display: block; margin-bottom: clamp(18px, 3vh, 30px); }
.intro__name {
  font-size: clamp(2.9rem, 6.4vw, 5.6rem);
  line-height: .96;
  letter-spacing: -.032em;
  font-weight: 555;
  font-variation-settings: 'wght' 555;
  text-wrap: balance;
}
.intro__role {
  margin-top: 14px;
  font-size: clamp(1.05rem, 1.5vw, 1.3rem);
  color: var(--ink-2);
  font-weight: 455;
  font-variation-settings: 'wght' 455;
  letter-spacing: -.008em;
}
.intro .hero__meta { margin-top: clamp(20px, 3.4vh, 34px); padding-top: 18px; }
.intro__lede {
  margin-top: clamp(18px, 3vh, 28px);
  max-width: 46ch;
  font-size: clamp(1.02rem, 1.35vw, 1.17rem);
  line-height: 1.68;
}
.portrait { justify-self: end; width: 100%; max-width: 430px; }
.portrait img { border: 1px solid var(--rule); }
.portrait .figcap { border-top: 1px solid var(--rule); margin-top: 12px; }

/* ---------- Project tiles ---------- */
.tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(28px, 5vh, 52px) clamp(16px, 2.2vw, 30px);
}
.tile { display: block; }
.tile__media {
  aspect-ratio: 4 / 3.1;
  background: var(--plate);
  border: 1px solid var(--rule);
  overflow: hidden;
}
.tile__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .38s var(--ease);
}
.tile--contain .tile__media img { object-fit: contain; padding: clamp(14px, 1.8vw, 26px); }
.tile:hover .tile__media img,
.tile:focus-visible .tile__media img { transform: scale(1.03); }
.tile__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-top: 13px;
}
.tile__name {
  font-size: clamp(1.04rem, 1.45vw, 1.28rem);
  font-weight: 540;
  font-variation-settings: 'wght' 540;
  letter-spacing: -.014em;
  line-height: 1.15;
}
.tile__name .arrow {
  display: inline-block;
  margin-left: .16em;
  color: var(--ink-3);
  transition: transform .38s var(--ease), color .3s;
}
.tile:hover .tile__name .arrow { transform: translateX(.2em); color: var(--moss); }
.tile__year {
  font-family: var(--mono);
  font-size: .66rem;
  font-weight: 500;
  letter-spacing: .12em;
  color: var(--ink-3);
  white-space: nowrap;
}
.tile__meta {
  margin-top: 6px;
  font-family: var(--mono);
  font-size: .66rem;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-2);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.tile__meta::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--moss);
  flex: none;
}
.tile__meta.is-proto::before { background: transparent; border: 1.5px solid var(--ink-2); }
.tile__meta.is-study::before { background: transparent; border: 1.5px dashed var(--ink-3); }

.viewall {
  margin-top: clamp(32px, 5.5vh, 60px);
  border-top: 1px solid var(--rule);
  padding-top: 18px;
  display: flex;
  justify-content: flex-end;
}
.viewall a {
  font-family: var(--mono);
  font-size: .74rem;
  font-weight: 500;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 4px;
  background-image: linear-gradient(var(--moss), var(--moss));
  background-size: 0 1px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: background-size .3s var(--ease), color .25s;
}
.viewall a:hover { background-size: 100% 1px; color: var(--moss-deep); }
.viewall .arrow { transition: transform .35s var(--ease); }
.viewall a:hover .arrow { transform: translateX(3px); }

/* ---------- Client logos ---------- */
.logos {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(44px, 7vh, 76px) clamp(20px, 3vw, 48px);
  align-items: center;
  justify-items: center;
  padding-block: clamp(6px, 1.5vh, 14px);
}
.logos img {
  max-height: 44px;
  max-width: 200px;
  width: auto;
  height: auto;
  filter: grayscale(100%);
  opacity: .8;
  transition: filter .32s ease, opacity .32s ease;
}
.logos li:hover img { filter: grayscale(0%); opacity: 1; }
.logos .logo--tall img { max-height: 58px; }

/* ---------- /work index page ---------- */
.p-hero--index h1 { font-size: clamp(2.3rem, 5vw, 3.9rem); }
.p-hero--index .p-hero__desc { margin-top: 14px; }

/* ---------- v2 responsive ---------- */
@media (max-width: 1060px) {
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .intro__grid { grid-template-columns: 1fr; gap: clamp(28px, 5vh, 44px); }
  .portrait { justify-self: start; max-width: 400px; }
}
@media (max-width: 720px) {
  .tiles { grid-template-columns: 1fr; }
  .portrait { max-width: 330px; }
  .logos { grid-template-columns: repeat(2, 1fr); gap: 40px 20px; }
  .logos img { max-height: 38px; max-width: 158px; }
  .logos .logo--tall img { max-height: 48px; }
}
@media (prefers-reduced-motion: reduce) {
  .tile__media img, .tile__name .arrow, .logos img, .viewall .arrow { transition: none; }
}

/* ==========================================================================
   Gallery mode — image-led home mosaic, project carousels, masonry
   galleries, lightbox and image-based project navigation.
   ========================================================================== */

/* ---------- Header extras ---------- */
.top__side { display: flex; align-items: center; gap: clamp(14px, 2.4vw, 26px); }

.mail {
  text-transform: none;
  letter-spacing: .06em;
  color: var(--ink-2);
  background-image: linear-gradient(var(--moss), var(--moss));
  background-size: 0 1px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  padding: 6px 0;
  transition: color .25s, background-size .3s var(--ease);
}
.mail:hover { color: var(--ink); background-size: 100% 1px; }

.back {
  width: 38px; height: 38px;
  border: 1px solid var(--rule-2);
  border-radius: 50%;
  display: grid; place-items: center;
  color: var(--ink-2);
  font-size: 1.05rem; line-height: 1;
  transition: border-color .25s, color .25s, transform .3s var(--ease);
}
.back:hover { border-color: var(--moss); color: var(--moss); transform: translateX(-2px); }

@media (max-width: 600px) {
  .mail { display: none; }
}

/* ---------- Home mosaic ---------- */
.mosaic-wrap { padding: clamp(10px, 2.5vh, 30px) 0 clamp(70px, 10vh, 120px); }
.mosaic-wrap--page { padding-top: clamp(26px, 5vh, 60px); }

.mosaic {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: clamp(14px, 2vw, 26px);
}

.mcell {
  position: relative;
  display: block;
  overflow: hidden;
  background: var(--paper-deep);
  border: 1px solid var(--rule);
}
.mcell img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 1s var(--ease);
}
.mcell:hover img,
.mcell:focus-visible img { transform: scale(1.035); }

.mcell--a { grid-column: span 8; aspect-ratio: 16 / 10; }
.mcell--b { grid-column: span 4; aspect-ratio: 4 / 5; }
.mcell--c { grid-column: span 4; aspect-ratio: 4 / 5; }
.mcell--d { grid-column: span 8; aspect-ratio: 16 / 10; }
.mcell--e { grid-column: span 7; aspect-ratio: 8 / 5; }
.mcell--f { grid-column: span 5; aspect-ratio: 8 / 7; }

.mcell--plate img { object-fit: contain; padding: 9%; }

@media (max-width: 860px) {
  .mosaic { grid-template-columns: 1fr 1fr; }
  .mcell--a, .mcell--d { grid-column: span 2; aspect-ratio: 16 / 10; }
  .mcell--b, .mcell--c { grid-column: span 1; aspect-ratio: 4 / 5; }
  .mcell--e { grid-column: span 2; aspect-ratio: 8 / 5; }
  .mcell--f { grid-column: span 2; aspect-ratio: 16 / 10; }
}
@media (max-width: 520px) {
  .mosaic { grid-template-columns: 1fr; }
  .mcell--a, .mcell--b, .mcell--c, .mcell--d, .mcell--e, .mcell--f { grid-column: span 1; }
  .mcell--b, .mcell--c { aspect-ratio: 1 / 1; }
}

/* ---------- Project carousel ---------- */
.page-project main { padding-top: clamp(14px, 3vh, 34px); }

.car__stage {
  position: relative;
  height: clamp(380px, 66vh, 780px);
  background: var(--paper-deep);
  border: 1px solid var(--rule);
  overflow: hidden;
  touch-action: pan-y;
}

.car__track {
  display: flex;
  height: 100%;
  transition: transform .65s var(--ease);
}

.car__slide {
  flex: 0 0 100%;
  min-width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(12px, 2.2vw, 30px);
}
.car__slide img {
  width: auto; height: auto;
  max-width: 100%; max-height: 100%;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}

.car__btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 46px; height: 46px;
  display: grid; place-items: center;
  appearance: none;
  border: 1px solid var(--rule-2);
  border-radius: 50%;
  background: color-mix(in srgb, var(--paper) 78%, transparent);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: var(--ink);
  cursor: pointer;
  transition: border-color .25s, color .25s, background .25s;
}
.car__btn svg { width: 20px; height: 20px; }
.car__btn:hover { border-color: var(--moss); color: var(--moss); background: var(--paper); }
.car__btn--prev { left: clamp(10px, 1.6vw, 22px); }
.car__btn--next { right: clamp(10px, 1.6vw, 22px); }

.car__progress {
  display: flex;
  gap: 7px;
  margin-top: 13px;
}
.car__seg {
  flex: 1;
  appearance: none;
  border: 0;
  background: none;
  padding: 8px 0;
  cursor: pointer;
}
.car__seg i {
  display: block;
  height: 2px;
  background: var(--rule-2);
  transition: background .3s;
}
.car__seg:hover i { background: var(--ink-3); }
.car__seg.is-on i { background: var(--moss); }

@media (max-width: 640px) {
  .car__stage { height: clamp(300px, 52vh, 460px); }
  .car__btn { width: 40px; height: 40px; }
}

/* ---------- Masonry gallery ---------- */
.gwrap { padding: clamp(34px, 6vh, 70px) 0 clamp(60px, 9vh, 110px); }

.ggrid {
  columns: 3;
  column-gap: clamp(14px, 2vw, 26px);
}
.gcell {
  appearance: none;
  border: 1px solid var(--rule);
  padding: 0;
  display: block;
  width: 100%;
  margin: 0 0 clamp(14px, 2vw, 26px);
  break-inside: avoid;
  background: var(--paper-deep);
  overflow: hidden;
  cursor: zoom-in;
}
.gcell img { transition: transform .9s var(--ease), opacity .3s; }
.gcell:hover img { transform: scale(1.02); }

@media (max-width: 980px) { .ggrid { columns: 2; } }
@media (max-width: 560px) { .ggrid { columns: 1; } }

/* ---------- Image-based project prev / next ---------- */
.pnav { border-top: 1px solid var(--rule); padding: clamp(16px, 3vh, 30px) 0 clamp(60px, 9vh, 100px); }
.pnav__in {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(14px, 2vw, 26px);
}
.pnav__card {
  position: relative;
  display: block;
  height: clamp(140px, 22vh, 220px);
  overflow: hidden;
  border: 1px solid var(--rule);
  background: var(--paper-deep);
}
.pnav__card img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: saturate(.85);
  transition: transform 1s var(--ease), filter .4s;
}
.pnav__card::after {
  content: "";
  position: absolute; inset: 0;
  background: rgba(26, 25, 20, .28);
  transition: background .4s;
}
.pnav__glyph {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
  width: 54px; height: 54px;
  display: grid; place-items: center;
  border: 1px solid rgba(255, 255, 255, .55);
  border-radius: 50%;
  color: #fff;
  font-size: 1.35rem;
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  transition: background .3s, transform .3s var(--ease);
}
.pnav__card:hover img { transform: scale(1.05); filter: saturate(1); }
.pnav__card:hover::after { background: rgba(26, 25, 20, .16); }
.pnav__card:hover .pnav__glyph { background: rgba(26, 25, 20, .35); }

@media (max-width: 560px) {
  .pnav__card { height: 120px; }
  .pnav__glyph { width: 44px; height: 44px; font-size: 1.1rem; }
}

/* ---------- Lightbox ---------- */
html.lb-open { overflow: hidden; }

.lb {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: clamp(14px, 4vw, 54px);
  background: rgba(22, 21, 17, .95);
}
.lb[hidden] { display: none; }

.lb__fig {
  max-width: min(1520px, 100%);
  max-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lb__img {
  width: auto; height: auto;
  max-width: 100%;
  max-height: calc(100vh - clamp(28px, 8vw, 108px));
  object-fit: contain;
  box-shadow: 0 30px 90px rgba(0, 0, 0, .5);
  user-select: none;
  -webkit-user-drag: none;
}

.lb__close,
.lb__btn {
  position: absolute;
  z-index: 2;
  width: 46px; height: 46px;
  display: grid; place-items: center;
  appearance: none;
  border: 1px solid rgba(255, 255, 255, .32);
  border-radius: 50%;
  background: rgba(255, 255, 255, .05);
  color: #fff;
  cursor: pointer;
  transition: background .25s, border-color .25s;
}
.lb__close svg, .lb__btn svg { width: 19px; height: 19px; }
.lb__close:hover, .lb__btn:hover { background: rgba(255, 255, 255, .16); border-color: rgba(255, 255, 255, .6); }

.lb__close { top: clamp(12px, 2.4vw, 26px); right: clamp(12px, 2.4vw, 26px); }
.lb__btn--prev { left: clamp(8px, 2vw, 24px); top: 50%; transform: translateY(-50%); }
.lb__btn--next { right: clamp(8px, 2vw, 24px); top: 50%; transform: translateY(-50%); }

@media (max-width: 640px) {
  .lb { padding: 12px; }
  .lb__btn--prev { left: 8px; top: auto; bottom: 14px; transform: none; }
  .lb__btn--next { right: 8px; top: auto; bottom: 14px; transform: none; }
}

/* ---------- Slim footer ---------- */
.footer__in--slim {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px clamp(18px, 4vw, 46px);
}
.footer__contacts { display: flex; flex-wrap: wrap; gap: 8px clamp(18px, 3vw, 36px); }
.footer__contacts a { color: var(--ink-2); transition: color .25s; }
.footer__contacts a:hover { color: var(--moss); }

/* ---------- Motion safety ---------- */
@media (prefers-reduced-motion: reduce) {
  .car__track { transition: none; }
  .mcell img, .gcell img, .pnav__card img, .back, .pnav__glyph { transition: none; }
}
