/* ==========================================================================
   neiljett.com — rebuilt from the Webflow export as plain HTML/CSS.
   Sizing model kept from Webflow: 1rem = 1vw (capped at 16px from 1600px).
   Layout: 12 columns × 6rem inside 12rem side padding.
   ========================================================================== */

/* ---------- Fonts (self-hosted, latin + latin-ext) ---------- */
@font-face { font-family: Onest; font-style: normal; font-weight: 400; font-display: swap; src: url(../fonts/onest-latin-400-normal.woff2) format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: Onest; font-style: normal; font-weight: 400; font-display: swap; src: url(../fonts/onest-latin-ext-400-normal.woff2) format("woff2"); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: Onest; font-style: normal; font-weight: 500; font-display: swap; src: url(../fonts/onest-latin-500-normal.woff2) format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: Onest; font-style: normal; font-weight: 500; font-display: swap; src: url(../fonts/onest-latin-ext-500-normal.woff2) format("woff2"); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: Onest; font-style: normal; font-weight: 600; font-display: swap; src: url(../fonts/onest-latin-600-normal.woff2) format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: Onest; font-style: normal; font-weight: 600; font-display: swap; src: url(../fonts/onest-latin-ext-600-normal.woff2) format("woff2"); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: Poppins; font-style: normal; font-weight: 400; font-display: swap; src: url(../fonts/poppins-latin-400-normal.woff2) format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: Poppins; font-style: normal; font-weight: 400; font-display: swap; src: url(../fonts/poppins-latin-ext-400-normal.woff2) format("woff2"); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: Poppins; font-style: normal; font-weight: 500; font-display: swap; src: url(../fonts/poppins-latin-500-normal.woff2) format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: Poppins; font-style: normal; font-weight: 500; font-display: swap; src: url(../fonts/poppins-latin-ext-500-normal.woff2) format("woff2"); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url(../fonts/jetbrains-mono-latin-400-normal.woff2) format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url(../fonts/jetbrains-mono-latin-ext-400-normal.woff2) format("woff2"); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }

/* ---------- Tokens ---------- */
:root {
  --ink: #121212;
  --gray-900: #1a1a1a;
  --gray-700: #404040;
  --gray-500: #919499;
  --gray-200: #f3f3f3;
  --radius: 3px;
  --font-body: Onest, sans-serif;
  --font-display: Poppins, sans-serif;
  --font-mono: "JetBrains Mono", monospace;
}

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

html {
  font-size: 1vw;
  height: 100%;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
@media screen and (min-width: 1600px) { html { font-size: 16px; } }

body {
  margin: 0;
  min-height: 100%;
  padding: 0 12rem;
  background-color: #fcfcfc;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: clamp(17px, 1.25vw, 18px);
  line-height: 170%;
  letter-spacing: -.1px;
}

h1, h2, h3, p, blockquote { margin: 0; }
h1, h2 { font-family: var(--font-display); }

a { color: var(--gray-900); text-decoration: none; }
img { max-width: 100%; height: auto; vertical-align: middle; display: inline-block; border: 0; user-select: none; }

::selection { background-color: #ffd98e; color: #121212; }
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #f1f1f1; border-radius: 10px; }
::-webkit-scrollbar-thumb { background-color: #888; border-radius: 10px; border: 2px solid #f1f1f1; }
::-webkit-scrollbar-thumb:hover { background-color: #555; }

:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* ---------- Typography ---------- */
.title-l {            /* hero name line */
  margin-top: -.25vw;
  font-size: clamp(21px, 2vw, 26px);
  font-weight: 400;
  line-height: 150%;
  letter-spacing: -.2px;
}
.title-xl {           /* all section/page titles */
  margin-top: -.25rem;
  font-family: var(--font-display);
  font-size: clamp(21px, 2.8vw, 38px);
  font-weight: 500;
  line-height: 120%;
  letter-spacing: -.6px;
}
.text-strong,
.text-medium {
  color: #181818;
  font-family: var(--font-body);
  font-size: clamp(17px, 1.25vw, 18px);
  line-height: 170%;
}
.text-strong { font-weight: 600; }
.text-medium { font-weight: 500; }
.text-s { font-size: 14px; line-height: 160%; letter-spacing: 0; }

.highlight,
.highlight-warm {
  display: inline;
  margin: 0 -2px;
  padding: 0 3px;
  border-radius: 3px;
  background-color: #f3f3f3;
  text-shadow: -.5px -.5px #fff9;
}
.highlight-warm { background-color: #f5eeeb; text-shadow: -.5px -.5px #ffffff80; }

/* ---------- Components ---------- */
.tag {
  display: inline-block;
  align-self: flex-start;
  padding: 3px 8px;
  border: 1px solid #e6e6e6;
  border-radius: 4px;
  background-color: #fff;
  font-family: var(--font-mono);
  font-size: clamp(16px, 1.1rem, 17px);
  font-weight: 400;
  line-height: 140%;
}
.tag--dark { border-style: none; background-color: #121212; color: #fff; }

.tag-list { display: flex; flex-flow: column; gap: .75rem; }

.btn-ghost {
  position: relative;
  display: flex;
  align-self: flex-start;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  margin: -6px -16px;
  padding: 6px 16px;
  border-radius: var(--radius);
  color: var(--gray-900);
  font-weight: 500;
  transition: all 50ms cubic-bezier(.645, .045, .355, 1);
}
.btn-ghost:hover { background-color: #f7f7f7; }
.btn-ghost.is-copied { pointer-events: none; color: #b1b1b1; }

/* ---------- 12-column grid section ---------- */
.grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(12, 6rem);
  grid-template-rows: auto;
  grid-auto-columns: 1fr;
  justify-content: center;
  justify-items: stretch;
  width: 100%;
  min-height: 16px;
}
.grid--mt { margin-top: 6rem; }

/* ---------- Contacts / footer ---------- */
.contacts {
  position: relative;
  display: flex;
  flex-flow: column;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 1vw;
  padding-bottom: 8rem;
}
.contacts--footer {
  grid-area: 1 / 1 / 2 / 13;
  align-self: end;
  margin-top: 12rem;
  padding-top: 3rem;
  padding-bottom: 6rem;
  border-top: 1px solid #121212;
}

/* ==========================================================================
   Home
   ========================================================================== */
.hero__portrait {
  grid-area: 1 / 1 / 2 / 5;
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  height: 42rem;
  margin-top: 1rem;
  border-radius: var(--radius);
  background: #ebebeb url(../../images/NXJ88.webp) 22% 23% / 30.3rem no-repeat;
}
.hero__text {
  grid-area: 1 / 6 / 2 / 13;
  align-self: end;
  display: flex;
  flex-flow: column;
  row-gap: 3rem;
  margin-bottom: -.5vw;
}
.typewriter { position: relative; white-space: pre; }
.typewriter::after {
  content: "|";
  display: none;
  margin-left: 2px;
  animation: blink 1s step-start infinite;
  color: inherit;
  font-weight: inherit;
}
.typewriter.is-typing::after { display: inline-block; }
@keyframes blink { 50% { opacity: 0; } }

.info { /* Domains / Working hours columns */
  display: flex;
  flex-flow: column;
  gap: 5rem;
  margin-top: 8rem;
  padding: 8rem 0 8rem 6rem;
  border-left: 1px solid var(--gray-700);
}
.info--domains { grid-area: 1 / 5 / 2 / 9; align-self: start; }
.info--hours { grid-area: 1 / 9 / 2 / 13; align-self: stretch; }
.info__group { display: flex; flex-flow: column; gap: 2rem; }
.contacts--hero { grid-area: 1 / 1 / 2 / 4; align-self: end; }

.hero-animation {
  grid-area: 1 / 1 / 2 / 13;
  margin-top: 12rem;
  margin-bottom: -1rem;
}

/* Work table */
.work {
  width: auto;
  margin-left: -6rem;
  margin-right: -6rem;
  padding-top: 5rem;
  padding-bottom: 2rem;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  background-color: #fff;
}
.work__line { grid-area: 1 / 4 / 2 / 5; border-right: 1px solid var(--gray-700); }
.work__years { grid-area: 1 / 10 / 2 / 13; place-self: end start; padding-left: 1.5rem; }
.work__title {
  grid-area: 1 / 1 / 2 / 4;
  display: flex;
  flex-flow: column;
  gap: 1rem;
  margin-right: -3rem;
  padding-top: 12rem;
}
.projects {
  grid-area: 2 / 1 / 3 / 13;
  display: flex;
  flex-flow: column;
  margin-bottom: 5vw;
  padding-top: 6rem;
}
.projects__row {
  position: relative;
  display: grid;
  grid-template-columns: 29rem .75fr .5fr;
  grid-auto-columns: 1fr;
  gap: 1rem;
  padding: 1.3rem 0;
  border-top: 1px solid #ebebeb;
  font-family: var(--font-mono);
  font-size: clamp(16px, 1.1rem, 17px);
  line-height: 160%;
  letter-spacing: -.5px;
}
.projects__row--head {
  padding-top: .5rem;
  border-top-style: none;
  color: var(--gray-500);
  font-family: var(--font-body);
}
.projects__product { min-height: 1rem; padding-right: 4rem; }
.projects__role { display: flex; flex-flow: column; }

/* Case study cards */
.case-card__text {
  grid-area: 1 / 5 / 2 / 12;
  display: flex;
  flex-flow: column;
  gap: 3rem;
  padding: 12rem 0 0 6rem;
  border-left: 1px solid var(--gray-900);
}
.case-card__title { margin-right: -6rem; }

.hero-media {  /* dark image panel shared by cards and case pages */
  grid-area: 2 / 1 / 3 / 13;
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  min-height: 7rem;
  margin-top: 6rem;
  padding: 6rem .75rem .75rem 12rem;
  overflow: hidden;
  border-radius: var(--radius);
  background-color: #262626;
}
.hero-media--legal { background-image: url(../../images/AWB1.webp); background-size: cover; }
.hero-media--talent { background: #262626 url(../../images/GDSF4.webp) 0 0 / cover no-repeat; }
.case-shot,
.page-shot {
  align-self: stretch;
  width: 100%;
  height: 39rem;
  background: url(../../images/HT1.webp) 0 0 / cover no-repeat;
}
.page-shot { height: 38rem; }

/* Field notes list */
.notes__title {
  grid-area: 1 / 1 / 2 / 5;
  display: flex;
  flex-flow: column;
  gap: 1rem;
  padding: 12rem 3rem 0 0;
}
.notes__list {
  grid-area: 1 / 5 / 2 / 13;
  display: flex;
  flex-flow: column;
  gap: 1rem;
  padding: 12rem 0 12rem 6rem;
  border-left: 1px solid var(--gray-900);
}
.note-link {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 1.5rem;
  padding: 2px 1.5rem 2px 2px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  transition: all 50ms cubic-bezier(.77, 0, .175, 1);
}
.note-link:hover { background-color: #fafafa; }
.note-link__thumb {
  aspect-ratio: 1;
  width: 6rem;
  border-radius: var(--radius);
  background-color: var(--gray-200);
  background-repeat: no-repeat;
}
.note-link__thumb--context { background-image: url(../../images/FN1.webp); background-position: 51% 13%; background-size: 370%; }
.note-link__thumb--handoff { background-image: url(../../images/NH1.webp); background-position: 63% 46%; background-size: 310%; }
.note-link__thumb--shipped { background-image: url(../../images/FN296.webp); background-position: 30% 64%; background-size: 116%; }

/* ==========================================================================
   Case study pages
   ========================================================================== */
.spacer-top { grid-column: 1 / -1; height: 6rem; }
.back-link { grid-area: 1 / 1 / 2 / 2; align-self: start; display: flex; flex-flow: column; padding-top: 9rem; }
.case-hero__text {
  grid-area: 1 / 3 / 2 / 10;
  display: flex;
  flex-flow: column;
  padding: 9rem 0 0 6rem;
  border-left: 1px solid var(--gray-700);
}
.case-hero__title { margin-right: -12rem; padding-top: 3rem; }
.case-hero__lead { padding-top: 3rem; }

/* "Agentic" article layout */
.article { display: flex; flex-flow: column; gap: 9rem; margin-top: 9rem; }
.article__content {
  grid-area: 1 / 3 / 2 / 10;
  display: flex;
  flex-flow: column;
  gap: 1.5rem;
  padding-left: 6rem;
  border-left: 1px solid #f3f3f3;
}
.article__content > .screenshot:first-child { margin-top: 0; }
.article__content > .screenshot:last-child { margin-bottom: 0; }
.article__heading { padding-bottom: 1rem; }

.screenshot {
  position: relative;
  margin: 3rem -18rem;
  padding: 3rem 18rem;
  border-radius: var(--radius);
  background-color: #f5eeeb;
  background-image: linear-gradient(125deg, #f5eeeb 5%, #e7dfe0 55%, #f5eeeb);
}
.screenshot__img { box-shadow: 0 0 4px #00000008, 0 0 16px #0000000a; }

.cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-auto-columns: 1fr;
  gap: .75rem;
  margin: 3rem -18rem 3rem -24px;
}
.cards--flush { margin-top: 0; }
.card {
  display: flex;
  flex-flow: column;
  gap: 8px;
  padding: 16px 24px;
  border: 1px solid #f2f2f2;
  border-radius: 3px;
  background-color: #fff;
}
.card--quote { font-family: var(--font-mono); font-size: 16px; line-height: 160%; }

/* "Talent pool" case layout: tag | title, then body */
.cs-tag {
  grid-area: 1 / 1 / 2 / 3;
  justify-self: end;
  display: flex;
  flex-flow: column;
  align-items: flex-end;
  justify-content: flex-start;
  gap: 4px;
  margin-left: -7vw;
  padding-top: 9.25rem;
}
.cs-title { grid-area: 1 / 4 / 2 / 13; position: relative; display: flex; flex-flow: column; padding-top: 9rem; }
.cs-body {
  grid-area: 2 / 3 / 3 / 10;
  display: flex;
  flex-flow: column;
  gap: 1.5rem;
  margin-top: 3rem;
  padding-left: 6rem;
  border-left: 1px solid #f3f3f3;
}
.cs-img {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  min-height: 7rem;
  margin: 3rem -18rem 3rem 0;
  background-color: #fcfcfc;
}
.cs-img.cs-img--tight { margin-top: -2rem; }
.cs-img.cs-img--wide { margin-left: -18rem; margin-right: -18rem; }

/* ==========================================================================
   Field note pages
   ========================================================================== */
.note-image {
  position: fixed;
  inset: 0 auto 0 0;
  width: 26rem;
  height: 100vh;
  background-color: var(--gray-200);
  background-repeat: no-repeat;
  background-size: cover;
}
.note-image.note-image--context { background-image: url(../../images/FN1.webp); background-position: 50%; }
.note-image.note-image--handoff { background-image: url(../../images/NH1.webp); }
.note-image.note-image--shipped { background-image: url(../../images/FN296.webp); background-position: 100%; }
.note {
  grid-area: 1 / 4 / 2 / 10;
  display: flex;
  flex-flow: column;
  gap: 1.5rem;
  padding: 6rem 0 12rem;
}
.note__title { padding: 4.5rem 0 1.5rem; }

/* ==========================================================================
   404
   ========================================================================== */
.not-found {
  grid-area: 1 / 4 / 2 / 10;
  display: flex;
  flex-flow: column;
  align-items: center;
  justify-content: center;
  gap: 3rem;
  padding: 12rem 0;
  text-align: center;
}
.not-found .btn-ghost { align-self: center; }

/* ==========================================================================
   Tablet ≤ 991px — the grid collapses into a single column
   ========================================================================== */
@media screen and (max-width: 991px) {
  .grid { display: flex; flex-flow: column; justify-content: flex-start; }
  .grid--mt { margin-top: 12rem; }

  .title-l { font-size: clamp(22px, 3.25vw, 28px); line-height: 150%; }
  .title-xl { font-size: clamp(21px, 4.4vw, 42px); line-height: 130%; }
  .text-s.hide-tablet { display: none; }

  .tag-list { flex-flow: wrap; gap: 8px; margin-right: 17rem; }

  .contacts {
    row-gap: 2vw;
    width: 100%;
    margin-top: 6rem;
    margin-right: 0;
    padding-top: 5rem;
    border-top: 1px solid var(--gray-900);
  }
  .contacts--footer { margin-top: 12rem; padding-top: 5rem; padding-bottom: 12rem; }

  /* Home */
  .hero__text { gap: 5vw; margin-bottom: 0; padding-top: 12rem; }
  .hero__portrait {
    aspect-ratio: 1;
    height: auto;
    margin: 6rem -11rem 0;
    background-position: 50% 32%;
    background-size: 100%;
  }
  .info { padding: 0; border-left-style: none; }
  .hero-animation { margin-bottom: -2rem; }

  .work { margin-left: -9rem; margin-right: -9rem; padding: 0 9rem 2rem; }
  .work__years { width: 100%; padding-top: 12rem; padding-left: 0; }
  .work__title { padding-top: 3rem; }
  .projects__row {
    grid-template-columns: 1.25fr .75fr;
    padding-top: 2rem;
    padding-bottom: 2rem;
  }
  .projects__row:not(.projects__row--head) .projects__product { grid-area: 1 / 1 / 2 / 2; }
  .projects__row:not(.projects__row--head) .projects__role { grid-area: 2 / 1 / 3 / 2; }
  .projects__row:not(.projects__row--head) .projects__result { grid-area: 1 / 2 / 3 / 3; }

  .case-card__text { gap: 5rem; }
  .hero-media {
    margin: 7vw -11rem 0;
    padding-top: 11rem;
    padding-left: 11rem;
  }
  .case-shot, .page-shot { height: 58rem; }

  .notes__title { padding-top: 3rem; }
  .notes__list { padding: 6rem 0; border-left-style: none; }
  .note-link { gap: 4rem; }
  .note-link__thumb { width: 12rem; }

  /* Case pages */
  .spacer-top { display: none; }
  .back-link { width: 100%; padding-top: 6rem; padding-bottom: 10rem; }
  .case-hero__text { padding: 0; border-left-style: none; }
  .case-hero__title { margin-right: -1rem; padding-top: 4rem; }
  .case-hero__lead { padding-top: 4rem; }

  .article { gap: 6rem; }
  .article__content { gap: 2vw; margin-top: 6vw; padding-left: 0; border-left-style: none; }
  .screenshot { margin: 4rem -11rem; padding: 8rem 11rem; }
  .cards { gap: 8px; margin-right: -24px; }

  .cs-tag { align-items: flex-start; justify-content: flex-start; margin-left: 0; }
  .cs-title { padding-top: 4vw; padding-right: 6vw; }
  .cs-body { gap: 2vw; margin-top: 6vw; padding-left: 0; border-left-style: none; }
  .cs-img { margin-top: 5vw; margin-right: 0; }
  .cs-img.cs-img--wide { margin-left: 0; margin-right: 0; }

  /* Field notes */
  .note-image {
    position: relative;
    aspect-ratio: 1;
    width: auto;
    height: auto;
    margin: 0 -11rem;
    background-position: 50% 10%;
  }
  .note-image.note-image--handoff { background-position: 50% 62%; }
  .note-image.note-image--shipped { background-position: 100% 80%; }
  .note { gap: 2vw; margin-top: 6vw; padding-bottom: 18rem; }
  .note__title { margin-right: -1rem; padding-top: 4rem; }
}

/* ==========================================================================
   Mobile landscape ≤ 767px
   ========================================================================== */
@media screen and (max-width: 767px) {
  body { padding-left: 32px; padding-right: 32px; }
  .grid--mt { margin-top: 120px; }

  .title-l { font-size: clamp(21px, 3.25vw, 28px); }
  .tag { font-size: 15px; }
  .title-xl { font-size: clamp(21px, 5.5vw, 44px); }
  .tag-list { margin-right: 0; }

  .contacts { row-gap: 12px; margin-top: 48px; padding-top: 44px; }
  .contacts--footer { margin-top: 96px; padding-top: 32px; padding-bottom: 56px; }

  .hero__text { gap: 7vw; margin-top: 15vw; }
  .hero__portrait {
    aspect-ratio: 3 / 4;
    margin: 10rem -32px 0;
    border-radius: 0;
    background-position: 50% 30%;
    background-size: auto 140%;
  }
  .info { gap: 48px; margin-top: 64px; }
  .info__group { gap: 16px; }

  .work {
    margin-left: -32px;
    margin-right: -32px;
    padding-left: 32px;
    padding-right: 32px;
    border-style: solid none;
    border-radius: 0;
  }
  .work__years { padding-top: 72px; }
  .projects__row { display: flex; flex-flow: column; gap: 16px; padding: 32px 0; }
  .projects__row--head { display: none; }

  .case-card__text { gap: 32px; padding: 0; border-left-style: none; }
  .case-card__title { margin-right: 0; }
  .hero-media {
    margin: 40px -32px 0;
    padding: 32px 0 32px 32px;
    border-radius: 0;
  }
  .hero-media__img { display: block; }
  .case-shot { height: 70rem; }

  .note-link { gap: 24px; padding-right: 24px; }
  .note-link__thumb { width: 64px; }
  .notes__list { gap: 8px; padding-top: 32px; padding-bottom: 0; }

  .back-link { padding-top: 32px; padding-bottom: 32px; }
  .case-hero__title { margin-right: 0; padding-top: 32px; }
  .case-hero__lead { padding-top: 32px; }

  .article { gap: 64px; }
  .article__content { gap: 24px; margin-top: 0; }
  .article__heading { padding-bottom: 0; }
  .screenshot { margin: 16px -32px; padding: 32px; }
  .cards { display: flex; flex-flow: column; margin-left: -16px; margin-right: -16px; }
  .card { padding-left: 16px; padding-right: 16px; }

  .cs-tag { padding-top: 120px; padding-left: 0; }
  .cs-title { padding: 24px 0 0; }
  .cs-body { gap: 24px; margin-top: 32px; padding-right: 0; }

  .note-image { margin-left: -32px; margin-right: -32px; }
  .note { gap: 24px; margin-top: 0; padding: 72px 0; }
  .note__title { margin-right: 0; padding: 16px 0; }

  .not-found { gap: 48px; padding: 120px 0; }
}

/* ==========================================================================
   Mobile portrait ≤ 479px
   ========================================================================== */
@media screen and (max-width: 479px) {
  .title-l { font-size: clamp(20px, 3.25vw, 28px); }
  .title-xl { font-size: clamp(21px, 6.8vw, 42px); line-height: 150%; }
  .tag-list { gap: 6px; }
  .work__years { padding-top: 56px; }
  .hero__text { gap: 8vw; }
  .hero__portrait { margin-top: 13rem; }
  .case-shot { height: 102rem; }
  .cs-tag { padding-top: 96px; }
  .note { gap: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .typewriter::after { animation: none; }
}

/* Wireframe hero animation (canvas, 1px lines) */
.wireframe { display: block; width: 100%; height: auto; aspect-ratio: 1152 / 300; overflow: hidden; }
