/*
  Карта файла
  1. Токены и базовые стили
  2. Шапка и первый экран
  3. Практика
  4. Системный разрез
  5. Работы и опыт
  6. Рекомендация и подвал
  7. Анимации и адаптив
*/

:root {
  color-scheme: dark;
  --bg: #141613;
  --surface: #1b1e19;
  --surface-raised: #20241e;
  --ink: #f3f1e8;
  --muted: #bdc0b5;
  --quiet: #969b8f;
  --line: #3c4238;
  --line-strong: #596151;
  --acid: #d6ff4b;
  --acid-ink: #172006;
  --serif: "Literata", Georgia, serif;
  --sans: "Commissioner", "Helvetica Neue", sans-serif;
  --shell: min(1680px, calc(100vw - 64px));
  --page-progress: 0%;
}

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

html {
  background: var(--bg);
  scroll-behavior: smooth;
  scrollbar-color: var(--line-strong) var(--bg);
}

body {
  min-width: 320px;
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body::before {
  position: fixed;
  z-index: 50;
  inset: 0;
  content: "";
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.74' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.78'/%3E%3C/svg%3E");
}

::selection {
  background: var(--acid);
  color: var(--acid-ink);
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
  font: inherit;
}

img,
svg {
  display: block;
}

img {
  max-width: 100%;
}

h1,
h2,
h3,
p,
blockquote,
figure,
dl,
dd {
  margin: 0;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

[id] {
  scroll-margin-top: 96px;
}

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

.shell {
  width: var(--shell);
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  padding: 12px 16px;
  background: var(--acid);
  color: var(--acid-ink);
  font-weight: 600;
  transform: translateY(-150%);
  transition: transform 180ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.page-progress {
  position: fixed;
  z-index: 90;
  top: 0;
  right: 0;
  left: 0;
  height: 2px;
  pointer-events: none;
}

.page-progress span {
  display: block;
  width: var(--page-progress);
  height: 100%;
  background: var(--acid);
}

.section {
  padding-block: clamp(104px, 11vw, 180px);
}

.section-label,
.kicker {
  color: var(--quiet);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.13em;
  line-height: 1.3;
  text-transform: uppercase;
}

.section-label::before,
.kicker::before {
  display: inline-block;
  width: 20px;
  height: 2px;
  margin-right: 10px;
  background: var(--acid);
  content: "";
  vertical-align: 3px;
}

.section-intro {
  display: grid;
  grid-template-columns: repeat(14, minmax(0, 1fr));
  gap: 24px;
  margin-bottom: clamp(64px, 7vw, 112px);
}

.section-intro .section-label {
  grid-column: 1 / 4;
  padding-top: 13px;
}

.section-intro h2 {
  grid-column: 4 / 14;
  max-width: 1080px;
  font-family: var(--serif);
  font-size: clamp(42px, 5vw, 78px);
  font-weight: 500;
  letter-spacing: -0.055em;
  line-height: 1.02;
  text-wrap: balance;
}

/* Шапка и первый экран */

.masthead {
  position: sticky;
  z-index: 40;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 74px;
  padding-inline: max(32px, calc((100vw - 1680px) / 2));
  border-bottom: 1px solid transparent;
  background: rgba(20, 22, 19, 0.92);
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(16px);
  transition: border-color 240ms ease, background-color 240ms ease;
}

.masthead.is-scrolled {
  border-color: var(--line);
  background: rgba(20, 22, 19, 0.96);
  background: color-mix(in srgb, var(--bg) 96%, transparent);
}

.identity {
  display: flex;
  align-items: baseline;
  gap: 14px;
  min-height: 44px;
}

.identity-name {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.025em;
}

.identity-role {
  color: var(--quiet);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.masthead nav {
  display: flex;
  align-items: center;
  gap: clamp(18px, 2.4vw, 38px);
  font-size: 12px;
  font-weight: 500;
}

.masthead nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--muted);
  transition: color 180ms ease;
}

.masthead nav a:not(.nav-accent)::after {
  position: absolute;
  right: 0;
  bottom: 7px;
  left: 0;
  height: 1px;
  background: var(--acid);
  content: "";
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 220ms ease;
}

.masthead nav a:hover {
  color: var(--ink);
}

.masthead nav a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.masthead .nav-accent {
  min-height: 40px;
  padding-inline: 15px;
  border: 1px solid var(--line-strong);
  color: var(--ink);
}

.masthead .nav-accent:hover {
  border-color: var(--acid);
}

.hero {
  min-height: calc(100svh - 74px);
  border-bottom: 1px solid var(--line);
}

.hero-stage {
  display: grid;
  grid-template-columns: repeat(14, minmax(0, 1fr));
  grid-template-rows: 1fr auto;
  gap: 28px 24px;
  min-height: calc(100svh - 74px);
  padding-top: clamp(48px, 6vh, 82px);
}

.hero-copy {
  z-index: 2;
  grid-column: 1 / 11;
  align-self: center;
  padding-bottom: 38px;
}

.hero h1 {
  max-width: 1120px;
  margin-top: clamp(22px, 3vh, 38px);
  font-family: var(--serif);
  font-size: clamp(54px, 6vw, 102px);
  font-weight: 500;
  letter-spacing: -0.065em;
  line-height: 0.96;
  text-wrap: balance;
}

.hero h1 em {
  position: relative;
  z-index: 0;
  font-weight: 500;
  font-style: italic;
  white-space: nowrap;
}

.hero h1 em::after {
  position: absolute;
  z-index: -1;
  right: -0.02em;
  bottom: 0.08em;
  left: 0.02em;
  height: 0.12em;
  background: var(--acid);
  content: "";
  transform: scaleX(0);
  transform-origin: left;
}

.js .hero h1.is-visible em::after {
  animation: draw-marker 700ms 480ms cubic-bezier(.22, 1, .36, 1) forwards;
}

.hero-lead {
  max-width: 710px;
  margin-top: clamp(28px, 3.4vh, 42px);
  color: var(--muted);
  font-size: clamp(17px, 1.35vw, 20px);
  line-height: 1.6;
}

.hero-link {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  min-height: 48px;
  margin-top: clamp(24px, 3.4vh, 42px);
  border-bottom: 1px solid var(--line-strong);
  font-size: 13px;
  font-weight: 600;
  transition: border-color 180ms ease, color 180ms ease;
}

.hero-link svg {
  width: 22px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.6;
  transition: transform 180ms ease;
}

.hero-link:hover {
  border-color: var(--acid);
  color: var(--acid);
}

.hero-link:hover svg {
  transform: translateX(4px);
}

.portrait {
  position: relative;
  grid-column: 11 / 15;
  align-self: center;
  width: 100%;
  max-height: min(63svh, 700px);
  padding: 10px 10px 0;
  border: 1px solid var(--line-strong);
  background: var(--surface);
}

.portrait::before,
.portrait::after {
  position: absolute;
  z-index: 2;
  background: var(--acid);
  content: "";
}

.portrait::before {
  top: -1px;
  left: 22px;
  width: 52px;
  height: 2px;
}

.portrait::after {
  top: 22px;
  right: -1px;
  width: 2px;
  height: 52px;
}

.portrait picture {
  display: block;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background: #2b2b27;
}

.portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 54% 42%;
  filter: saturate(0.86) contrast(1.03);
  transition: transform 800ms cubic-bezier(.22, 1, .36, 1), filter 400ms ease;
}

.portrait:hover img {
  filter: saturate(0.98) contrast(1.02);
  transform: scale(1.015);
}

.portrait figcaption {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-block: 11px 10px;
  color: var(--quiet);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.referral-strip {
  grid-column: 1 / 15;
  align-self: end;
  display: grid;
  grid-template-columns: repeat(14, minmax(0, 1fr));
  gap: 24px;
  min-height: 110px;
  padding-block: 23px;
  border-top: 1px solid var(--line);
}

.referral-strip > p {
  grid-column: 1 / 4;
  align-self: center;
  color: var(--quiet);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.referral-strip ul {
  grid-column: 4 / 15;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  align-items: center;
}

.referral-strip li {
  position: relative;
  padding-left: 23px;
  font-family: var(--serif);
  font-size: clamp(16px, 1.35vw, 21px);
  line-height: 1.25;
}

.referral-strip li::before {
  position: absolute;
  top: 0.6em;
  left: 0;
  width: 8px;
  height: 8px;
  border: 1px solid var(--acid);
  content: "";
  transform: translateY(-50%) rotate(45deg);
}

/* Практика */

.practice-register {
  border-top: 1px solid var(--line-strong);
}

.practice-row {
  position: relative;
  display: grid;
  grid-template-columns: repeat(14, minmax(0, 1fr));
  gap: 24px;
  padding-block: clamp(38px, 4.5vw, 68px);
  border-bottom: 1px solid var(--line);
}

.practice-row::before {
  position: absolute;
  top: -1px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--acid);
  content: "";
  transition: width 480ms cubic-bezier(.22, 1, .36, 1);
}

.practice-row:hover::before {
  width: 100%;
}

.row-context {
  grid-column: 1 / 4;
  padding-top: 7px;
  color: var(--quiet);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.practice-row > div {
  grid-column: 4 / 12;
}

.practice-row h3 {
  max-width: 850px;
  font-family: var(--serif);
  font-size: clamp(28px, 3.2vw, 48px);
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 1.08;
  text-wrap: balance;
}

.practice-row > div p {
  max-width: 720px;
  margin-top: 20px;
  color: var(--muted);
  font-size: clamp(16px, 1.3vw, 19px);
  line-height: 1.65;
}

.row-mark {
  grid-column: 12 / 15;
  align-self: start;
  justify-self: end;
  color: var(--line-strong);
  font-family: var(--serif);
  font-size: clamp(32px, 4.2vw, 68px);
  font-style: italic;
  letter-spacing: -0.06em;
  line-height: 0.9;
  transition: color 260ms ease, transform 260ms ease;
}

.practice-row:hover .row-mark {
  color: var(--acid);
  transform: translateX(-6px);
}

/* Системный разрез */

.method {
  border-block: 1px solid var(--line);
  background: var(--surface);
}

.method-layout {
  display: grid;
  grid-template-columns: repeat(14, minmax(0, 1fr));
  gap: 24px;
}

.method-intro {
  position: sticky;
  top: 122px;
  grid-column: 1 / 6;
  align-self: start;
}

.method-intro h2 {
  max-width: 560px;
  margin-top: 30px;
  font-family: var(--serif);
  font-size: clamp(40px, 4.2vw, 68px);
  font-weight: 500;
  letter-spacing: -0.055em;
  line-height: 1.03;
}

.method-intro > p:last-of-type {
  max-width: 490px;
  margin-top: 32px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.65;
}

.layer-position {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: center;
  width: min(100%, 390px);
  margin-top: 52px;
  color: var(--quiet);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
}

.layer-position span:first-child {
  color: var(--acid);
}

.layer-position i {
  position: relative;
  height: 1px;
  overflow: hidden;
  background: var(--line-strong);
}

.layer-position i::after {
  position: absolute;
  inset: 0;
  background: var(--acid);
  content: "";
  transform: scaleX(var(--layer-progress, 0.166));
  transform-origin: left;
  transition: transform 360ms ease;
}

.system-cutaway {
  grid-column: 7 / 15;
  border-top: 1px solid var(--line-strong);
}

.system-layer {
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr 3fr;
  gap: 28px;
  min-height: 162px;
  padding: 34px 34px 34px 30px;
  border-bottom: 1px solid var(--line);
  transition: background-color 220ms ease;
}

.system-layer::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 2px;
  background: var(--acid);
  content: "";
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 300ms ease;
}

.system-layer.is-active {
  background: var(--surface-raised);
}

.system-layer.is-active::before {
  transform: scaleY(1);
}

.system-layer > div {
  transition: transform 220ms cubic-bezier(.22, 1, .36, 1);
}

@media (hover: hover) and (pointer: fine) {
  .system-cutaway:hover .system-layer.is-active:not(:hover) {
    background: transparent;
  }

  .system-cutaway:hover .system-layer.is-active:not(:hover)::before {
    transform: scaleY(0);
  }

  .system-layer:hover {
    background: var(--surface-raised);
  }

  .system-layer:hover::before {
    transform: scaleY(1);
  }

  .system-layer:hover > div {
    transform: translateX(6px);
  }
}

.system-layer > p {
  padding-top: 8px;
  color: var(--quiet);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.system-layer h3 {
  font-family: var(--serif);
  font-size: clamp(30px, 3vw, 48px);
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 1.05;
}

.system-layer span {
  display: block;
  max-width: 560px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.55;
}

/* Работы и опыт */

.section-intro-split h2 {
  grid-column: 4 / 11;
}

.section-intro-split > p:last-child {
  grid-column: 11 / 15;
  align-self: end;
  max-width: 360px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
}

.work-register {
  border-top: 1px solid var(--line-strong);
}

.work-row {
  position: relative;
  display: grid;
  grid-template-columns: repeat(14, minmax(0, 1fr));
  gap: 24px;
  align-items: baseline;
  padding-block: clamp(30px, 3.7vw, 54px);
  border-bottom: 1px solid var(--line);
  transition: padding-inline 260ms ease, background-color 260ms ease;
}

.work-row::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 1px;
  background: var(--acid);
  content: "";
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 420ms cubic-bezier(.22, 1, .36, 1);
}

.work-row:hover {
  padding-inline: 16px;
  background: color-mix(in srgb, var(--surface) 58%, transparent);
}

.work-row:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.work-row h3 {
  grid-column: 1 / 5;
  font-family: var(--serif);
  font-size: clamp(36px, 4.6vw, 72px);
  font-weight: 500;
  letter-spacing: -0.055em;
  line-height: 1;
}

.work-row > p {
  grid-column: 5 / 12;
  max-width: 690px;
  color: var(--muted);
  font-size: clamp(16px, 1.35vw, 20px);
  line-height: 1.55;
}

.work-row > span {
  grid-column: 12 / 15;
  justify-self: end;
  color: var(--quiet);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-align: right;
  text-transform: uppercase;
}

.experience {
  border-block: 1px solid var(--line);
  background: #111310;
}

.experience-layout {
  display: grid;
  grid-template-columns: repeat(14, minmax(0, 1fr));
  gap: 24px;
}

.experience-statement {
  grid-column: 1 / 7;
  align-self: start;
}

.experience-statement h2 {
  max-width: 650px;
  margin-top: 32px;
  font-family: var(--serif);
  font-size: clamp(48px, 6.5vw, 100px);
  font-weight: 500;
  letter-spacing: -0.065em;
  line-height: 0.96;
}

.experience-statement > p:last-child {
  max-width: 530px;
  margin-top: 32px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.6;
}

.credentials {
  grid-column: 8 / 15;
  border-top: 1px solid var(--line-strong);
}

.credentials > div {
  display: grid;
  grid-template-columns: minmax(128px, 1.05fr) 2fr;
  gap: 28px;
  align-items: baseline;
  padding-block: 26px;
  border-bottom: 1px solid var(--line);
}

.credentials dt {
  color: var(--acid);
  font-family: var(--serif);
  font-size: clamp(25px, 2.4vw, 38px);
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 1;
}

.credentials dd {
  max-width: 520px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.55;
}

/* Рекомендация и подвал */

.recommend {
  background:
    radial-gradient(circle at 91% 18%, rgba(214, 255, 75, 0.075), transparent 27%),
    var(--surface);
}

.recommend-layout {
  display: grid;
  grid-template-columns: repeat(14, minmax(0, 1fr));
  gap: 24px;
}

.recommend-layout > .section-label {
  grid-column: 1 / 4;
  padding-top: 14px;
}

.recommend-content {
  grid-column: 4 / 14;
}

.recommend h2 {
  font-family: var(--serif);
  font-size: clamp(43px, 5.6vw, 86px);
  font-weight: 500;
  letter-spacing: -0.06em;
  line-height: 1;
}

.recommend blockquote {
  position: relative;
  max-width: 1130px;
  margin-top: clamp(50px, 6vw, 86px);
  padding-top: 28px;
  border-top: 1px solid var(--line-strong);
  color: var(--muted);
  font-family: var(--serif);
  font-size: clamp(27px, 3.25vw, 50px);
  letter-spacing: -0.038em;
  line-height: 1.25;
}

.recommend blockquote::before {
  position: absolute;
  top: -2px;
  left: 0;
  width: 120px;
  height: 3px;
  background: var(--acid);
  content: "";
}

.recommend-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 42px;
}

.action-button {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 26px;
  min-height: 52px;
  padding: 13px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 0;
  background: transparent;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: border-color 180ms ease, background-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.action-button svg {
  width: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.6;
}

.action-button:hover {
  border-color: var(--acid);
  color: var(--acid);
  transform: translateY(-2px);
}

.action-button:active {
  transform: translateY(0);
}

.action-primary {
  min-width: 268px;
  border-color: var(--acid);
  background: var(--acid);
  color: var(--acid-ink);
}

.action-primary:hover {
  background: #e0ff72;
  color: var(--acid-ink);
}

.recommend-status {
  min-height: 24px;
  margin-top: 14px;
  color: var(--acid);
  font-size: 13px;
}

.contact-note {
  max-width: 720px;
  margin-top: 30px;
  padding-left: 18px;
  border-left: 2px solid var(--line-strong);
  color: var(--quiet);
  font-size: 14px;
  line-height: 1.6;
}

.site-footer {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 24px;
  align-items: center;
  min-height: 96px;
  color: var(--quiet);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.site-footer a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  transition: color 180ms ease;
}

.site-footer a:hover {
  color: var(--acid);
}

.site-footer a span {
  margin-left: 9px;
  font-size: 15px;
}

/* Анимации и адаптив */

.js [data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 700ms cubic-bezier(.22, 1, .36, 1),
    transform 700ms cubic-bezier(.22, 1, .36, 1);
}

.js [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

.js .hero-copy .kicker {
  transition-delay: 40ms;
}

.js .hero-copy h1 {
  transition-delay: 110ms;
}

.js .hero-copy .hero-lead {
  transition-delay: 200ms;
}

.js .hero-copy .hero-link {
  transition-delay: 280ms;
}

.js .portrait {
  transition-delay: 210ms;
}

.js .referral-strip {
  transition-delay: 340ms;
}

@keyframes draw-marker {
  to { transform: scaleX(1); }
}

@media (max-width: 1120px) {
  :root {
    --shell: calc(100vw - 48px);
  }

  .masthead {
    padding-inline: 24px;
  }

  .identity-role {
    display: none;
  }

  .section-intro,
  .hero-stage,
  .referral-strip,
  .practice-row,
  .method-layout,
  .section-intro-split,
  .work-row,
  .experience-layout,
  .recommend-layout {
    grid-template-columns: repeat(8, minmax(0, 1fr));
    gap: 20px;
  }

  .hero-copy {
    grid-column: 1 / 7;
  }

  .hero h1 {
    font-size: clamp(52px, 7.3vw, 82px);
  }

  .portrait {
    grid-column: 7 / 9;
  }

  .referral-strip {
    grid-column: 1 / 9;
  }

  .referral-strip > p {
    grid-column: 1 / 3;
  }

  .referral-strip ul {
    grid-column: 3 / 9;
  }

  .referral-strip li {
    font-size: 16px;
  }

  .section-intro .section-label,
  .section-intro-split .section-label {
    grid-column: 1 / 3;
  }

  .section-intro h2 {
    grid-column: 3 / 9;
  }

  .row-context {
    grid-column: 1 / 3;
  }

  .practice-row > div {
    grid-column: 3 / 8;
  }

  .row-mark {
    grid-column: 8 / 9;
    writing-mode: vertical-rl;
  }

  .method-intro {
    position: static;
    grid-column: 1 / 4;
  }

  .system-cutaway {
    grid-column: 4 / 9;
  }

  .system-layer {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .section-intro-split h2 {
    grid-column: 3 / 7;
  }

  .section-intro-split > p:last-child {
    grid-column: 7 / 9;
  }

  .work-row h3 {
    grid-column: 1 / 3;
  }

  .work-row > p {
    grid-column: 3 / 7;
  }

  .work-row > span {
    grid-column: 7 / 9;
  }

  .experience-statement {
    grid-column: 1 / 4;
  }

  .credentials {
    grid-column: 5 / 9;
  }

  .recommend-layout > .section-label {
    grid-column: 1 / 3;
  }

  .recommend-content {
    grid-column: 3 / 9;
  }
}

@media (max-width: 840px) {
  .masthead nav a:not(.nav-accent) {
    display: none;
  }

  .hero-copy {
    grid-column: 1 / 6;
  }

  .portrait {
    grid-column: 6 / 9;
  }

  .hero h1 em {
    white-space: normal;
  }

  .referral-strip ul {
    gap: 14px;
  }

  .section-intro-split h2 {
    grid-column: 3 / 9;
  }

  .section-intro-split > p:last-child {
    grid-column: 3 / 8;
    margin-top: 12px;
  }

  .credentials > div {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}

@media (max-width: 760px) {
  :root {
    --shell: calc(100vw - 40px);
  }

  .masthead {
    height: 66px;
    padding-inline: 20px;
  }

  .identity-name {
    font-size: 16px;
  }

  .masthead .nav-accent {
    min-height: 44px;
    padding-inline: 11px;
    font-size: 11px;
  }

  .section {
    padding-block: 92px;
  }

  [id] {
    scroll-margin-top: 78px;
  }

  .section-intro,
  .hero-stage,
  .referral-strip,
  .practice-row,
  .method-layout,
  .section-intro-split,
  .work-row,
  .experience-layout,
  .recommend-layout {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .hero-stage {
    display: flex;
    min-height: auto;
    padding-top: 58px;
    flex-direction: column;
  }

  .hero-copy {
    order: 1;
    padding-bottom: 0;
  }

  .hero h1 {
    margin-top: 26px;
    font-size: clamp(46px, 14vw, 68px);
    line-height: 0.98;
  }

  .hero-lead {
    margin-top: 28px;
    font-size: 17px;
  }

  .hero-link {
    margin-top: 28px;
  }

  .referral-strip {
    order: 2;
    display: block;
    width: 100%;
    margin-top: 54px;
    padding-block: 22px 26px;
  }

  .referral-strip ul {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 18px;
  }

  .referral-strip li {
    font-size: 18px;
  }

  .portrait {
    order: 3;
    width: 100%;
    max-height: none;
    margin-block: 36px 20px;
  }

  .portrait picture {
    aspect-ratio: 4 / 5;
  }

  .section-intro,
  .section-intro-split {
    display: block;
    margin-bottom: 52px;
  }

  .section-intro h2 {
    margin-top: 24px;
    font-size: clamp(38px, 11.6vw, 56px);
  }

  .section-intro-split > p:last-child {
    margin-top: 24px;
  }

  .practice-row {
    display: block;
    padding-block: 34px 42px;
  }

  .practice-row > div {
    margin-top: 24px;
  }

  .practice-row h3 {
    font-size: clamp(29px, 9vw, 42px);
  }

  .practice-row > div p {
    margin-top: 18px;
    font-size: 16px;
  }

  .row-mark {
    position: absolute;
    top: 34px;
    right: 0;
    font-size: 29px;
    writing-mode: initial;
  }

  .method-intro,
  .system-cutaway,
  .experience-statement,
  .credentials,
  .recommend-layout > .section-label,
  .recommend-content {
    grid-column: auto;
    min-width: 0;
  }

  .method-intro h2 {
    margin-top: 24px;
    font-size: clamp(39px, 11vw, 56px);
  }

  .layer-position {
    display: none;
  }

  .system-cutaway {
    margin-top: 58px;
  }

  .method-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .system-layer,
  .system-layer > div {
    min-width: 0;
  }

  .system-layer h3 {
    overflow-wrap: anywhere;
  }

  .system-layer {
    min-height: auto;
    padding: 28px 18px 30px 20px;
  }

  .system-layer h3 {
    font-size: 34px;
  }

  .work-row {
    display: block;
    padding-block: 32px;
  }

  .work-row h3 {
    font-size: 48px;
  }

  .work-row > p {
    margin-top: 20px;
    font-size: 17px;
  }

  .work-row > span {
    display: block;
    margin-top: 20px;
    text-align: left;
  }

  .experience-layout {
    display: block;
  }

  .experience-statement h2 {
    margin-top: 24px;
    font-size: clamp(48px, 15vw, 72px);
  }

  .credentials {
    margin-top: 60px;
  }

  .credentials > div {
    grid-template-columns: 1fr 1.5fr;
    gap: 20px;
  }

  .recommend-layout {
    display: block;
  }

  .recommend-content {
    margin-top: 24px;
  }

  .recommend blockquote {
    margin-top: 48px;
    font-size: clamp(26px, 8.5vw, 38px);
  }

  .recommend-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .action-button,
  .action-primary {
    width: 100%;
    min-width: 0;
  }

  .site-footer {
    grid-template-columns: 1fr auto;
    padding-block: 22px;
  }

  .site-footer p:nth-child(2) {
    display: none;
  }
}

@media (max-width: 420px) {
  .masthead .nav-accent {
    width: 44px;
    padding: 0;
    overflow: hidden;
    color: transparent;
    font-size: 0;
    justify-content: center;
  }

  .masthead .nav-accent::after {
    display: block;
    color: var(--acid);
    content: "↗";
    font-size: 17px;
    line-height: 1;
  }

  .hero h1 {
    font-size: clamp(42px, 13.3vw, 55px);
  }

  .portrait figcaption {
    display: block;
  }

  .portrait figcaption span:last-child {
    display: block;
    margin-top: 5px;
  }

  .row-mark {
    font-size: 24px;
  }

  .credentials > div {
    grid-template-columns: 1fr;
  }
}

@media (hover: none) {
  .portrait:hover img,
  .work-row:hover,
  .practice-row:hover .row-mark {
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .js [data-reveal] {
    opacity: 1;
    transform: none;
  }

  .hero h1 em::after {
    transform: scaleX(1);
  }
}
