:root {
  color-scheme: dark;
  --ink: #f4f4f2;
  --muted: #b9b9b9;
  --background: #181818;
  --surface: #242424;
  --soft: #202020;
  --rule: #3b3b3b;
  --mark-paper: #ededeb;
  --display: Manrope, 'Golos Text', system-ui, sans-serif;
  --sans: 'Golos Text', system-ui, sans-serif;
  --shell: min(1240px, calc(100% - 112px));
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--background);
  color: var(--ink);
  font: 1rem/1.61 var(--sans);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p, ul, figure { margin: 0; }
a { color: inherit; text-underline-offset: .24em; }
a:focus-visible, summary:focus-visible { outline: 2px solid currentColor; outline-offset: 5px; }
img { display: block; max-width: 100%; }
section[id], footer[id] { scroll-margin-top: 24px; }
.wrap { width: var(--shell); margin-inline: auto; }

.skip-link {
  position: fixed;
  z-index: 3;
  top: 12px;
  left: 12px;
  transform: translateY(calc(-100% - 15px));
  padding: 10px 15px;
  background: var(--ink);
  color: var(--background);
}

.skip-link:focus { transform: none; }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  column-gap: 22px;
  min-height: 64px;
  border-bottom: 1px solid var(--rule);
}

.brand {
  font: 650 clamp(1.04rem, 1.65vw, 1.35rem)/1.22 var(--display);
  letter-spacing: -.025em;
}

.topbar ul, .footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0 28px;
  padding: 0;
  list-style: none;
}

.topbar a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; }
.topbar a:hover { text-decoration: underline; }
.topbar li a { font-size: .9rem; }

.section { padding-block: clamp(55px, 7vw, 94px); }
.section-head { margin-bottom: clamp(24px, 3.4vw, 42px); }

.section h2, .footer h2 {
  font: 650 clamp(2.1rem, 4.15vw, 3.8rem)/1.08 var(--display);
  letter-spacing: -.058em;
  text-wrap: balance;
}

.current { padding-top: clamp(22px, 2.45vw, 35px); }
.current > h2 {
  margin-bottom: clamp(15px, 2vw, 25px);
  font-size: clamp(1.45rem, 2.45vw, 2rem);
  letter-spacing: -.04em;
}

.current-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 11px; }

.placement {
  display: grid;
  grid-template-rows: auto 1fr;
  align-content: start;
  gap: 15px;
  min-width: 0;
  padding: clamp(18px, 2.05vw, 29px);
  border: 1px solid var(--rule);
  border-radius: 3px;
  background: var(--surface);
}

.placement-featured { grid-column: span 2; }

.placement-meta {
  min-height: 63px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.place-mark { width: 62px; height: 62px; object-fit: contain; }
.place-mark-square { border-radius: 2px; }
.placement-teaching .place-mark { width: 48px; height: 48px; padding: 5px; background: var(--mark-paper); border-radius: 3px; }
.place-mark-wordmark { width: 113px; height: 58px; padding: 7px; background: var(--background); border: 1px solid var(--rule); border-radius: 2px; }
.project-symbol { width: 49px; height: 49px; color: var(--muted); }

.placement h3, .entry h3 {
  font: 700 clamp(1.15rem, 1.95vw, 1.65rem)/1.19 var(--display);
  letter-spacing: -.036em;
  text-wrap: pretty;
}

.placement h3 { font-size: clamp(1.15rem, 1.65vw, 1.5rem); overflow-wrap: anywhere; }
.placement-featured h3 { font-size: clamp(1.2rem, 1.95vw, 1.65rem); }
.entry-role { margin-top: 6px; font-weight: 550; }
.placement-link { display: inline-block; margin-top: 12px; }

.entry-role + p, .placement h3 + p:not(.entry-role) {
  max-width: 64ch;
  margin-top: 5px;
  color: var(--muted);
}

.entry-date {
  padding-top: 3px;
  color: var(--muted);
  font-size: .875rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.external { text-decoration-color: #8d8d8d; text-decoration-thickness: 1px; }
.external:hover { text-decoration-color: currentColor; }

.profile-photo {
  padding-block: clamp(17px, 2.4vw, 33px) clamp(23px, 2.6vw, 36px);
  border-bottom: 1px solid var(--rule);
}

.profile-caption { margin-top: clamp(11px, 1.35vw, 19px); }
.profile-specialties {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  color: var(--muted);
  font-size: clamp(1rem, 1.45vw, 1.15rem);
  line-height: 1.45;
}
.profile-specialties > span {
  margin-inline-start: 13px;
  padding-inline-start: 13px;
  border-inline-start: 1px solid #6f6f6f;
}

.profile-photo-frame {
  overflow: hidden;
  aspect-ratio: 5 / 2;
  background: var(--surface);
}
.profile-portrait {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 54% 37%;
  transform-origin: 54% 41%;
}

.experience { background: var(--surface); }
.experience > .wrap {
  display: grid;
  grid-template-columns: minmax(0, .67fr) minmax(0, 1.6fr);
  column-gap: clamp(24px, 5vw, 64px);
  align-items: start;
}

.experience .section-head { grid-row: span 2; position: sticky; top: 24px; margin-bottom: 0; }
.experience h2 { max-width: 14ch; font-size: clamp(1.45rem, 2.32vw, 1.9rem); }
.ledger { border-top: 1px solid var(--rule); }

.entry {
  display: grid;
  grid-template-columns: minmax(119px, .31fr) minmax(0, 1fr);
  gap: 7px 16px;
  padding-block: 21px;
  border-bottom: 1px solid var(--rule);
}

.entry-meta { display: grid; gap: 8px; align-content: start; }
.entry-meta img, .entry-meta .project-symbol { width: 42px; height: 42px; object-fit: contain; }
.entry-meta img { padding: 4px; background: var(--mark-paper); border-radius: 3px; }
.entry-meta .entry-wordmark { width: 72px; height: auto; padding: 0; object-fit: cover; }
.entry-wordmark-avp { aspect-ratio: 12 / 5; object-position: center top; }
.entry-wordmark-tochka { aspect-ratio: 9 / 4; }
.entry-location {
  display: inline-block;
  color: var(--muted);
  font: 500 .9rem/1.35 var(--sans);
  letter-spacing: normal;
}

.more { margin-top: 12px; }
.more summary { width: fit-content; padding: 10px 0; font-weight: 550; cursor: pointer; }
.more ul { display: grid; gap: 8px; margin-top: 7px; padding-left: 25px; max-width: 68ch; }

.current-grid:has(.work-more[open]) { align-items: start; }
.work-more { margin-top: 6px; }
.work-more > summary { text-decoration: underline; text-underline-offset: .24em; }
.work-copy { max-width: 70ch; padding-top: 12px; border-top: 1px solid var(--rule); color: var(--muted); }
.work-copy p + p { margin-top: 10px; }

.credentials { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 34px clamp(26px, 5.5vw, 72px); }
.credentials h2 { margin-bottom: 23px; font-size: clamp(1.9rem, 3.45vw, 3rem); }
.brief-list, .publication-list { padding: 0; list-style: none; border-top: 1px solid var(--rule); }
.brief-list li, .publication-list li { border-bottom: 1px solid var(--rule); padding-block: 14px; }
.brief-list li { display: grid; grid-template-columns: 85px minmax(0, 1fr); gap: 4px 8px; }
.brief-list p, .publication-list p { margin-top: 3px; color: var(--muted); font-size: .93rem; }
.publication-list a { overflow-wrap: anywhere; }
.publication-more > summary { text-decoration: underline; text-underline-offset: .24em; }
.publication-more > .publication-list { gap: 0; max-width: none; margin-top: 0; padding: 0; }
.publication-more:not([open]) .publication-more-open,
.publication-more[open] .publication-more-closed { display: none; }
.media-block { grid-column: 1 / -1; }
.media-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: clamp(24px, 5.5vw, 72px); }

.footer { background: var(--soft); }
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 17px 35px;
  padding-block: clamp(35px, 5.5vw, 70px);
}
.footer ul { gap: 6px 28px; font-weight: 550; }

.consultations {
  max-width: 930px;
  padding-block: clamp(34px, 5vw, 69px);
}
.consultations-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, .35fr);
  align-items: start;
  gap: clamp(21px, 5vw, 65px);
}
.consultations-intro h1 {
  margin-bottom: 14px;
  font: 650 clamp(1.6rem, 3.65vw, 3.25rem)/1.13 var(--display);
  letter-spacing: -.042em;
  overflow-wrap: anywhere;
}
.consultations-intro img { width: 100%; height: auto; }
.consultations-intro p,
.consultation-copy,
.consultation-list { max-width: 71ch; }
.consultation-section {
  margin-top: clamp(24px, 4vw, 48px);
  padding-top: clamp(21px, 3vw, 34px);
  border-top: 1px solid var(--rule);
}
.consultation-section h2 {
  margin-bottom: 12px;
  font: 650 clamp(1.33rem, 2.45vw, 1.9rem)/1.22 var(--display);
  letter-spacing: -.032em;
}
.consultation-section h3 { margin: 20px 0 7px; font-size: 1.08rem; }
.consultation-copy p + p { margin-top: 12px; }
.consultation-list { display: grid; gap: 13px; margin: 14px 0 0; }
.consultation-list dt, .consultation-list strong { font-weight: 650; }
.consultation-list dd, .consultation-list p { margin: 3px 0 0; color: var(--muted); }
.consultation-requests { padding: 0; list-style: none; }
.consultations-links { display: flex; flex-wrap: wrap; gap: 10px 24px; margin-top: 22px; }

@media (max-width: 1160px) {
  .current-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .placement-featured { grid-column: auto; }
}

@media (max-width: 1000px) {
  :root { --shell: calc(100% - 64px); }
  .profile-photo-frame { aspect-ratio: 2 / 1; }
}

@media (max-width: 720px) {
  :root { --shell: calc(100% - 38px); }
  .topbar { justify-content: flex-start; min-height: 56px; }
  .topbar ul { gap: 0 13px; }
  .topbar li a { font-size: .875rem; }
  .section { padding-block: 46px; }
  .current { padding-top: 23px; }
  .current-grid, .experience > .wrap, .credentials, .media-list { grid-template-columns: minmax(0, 1fr); }
  .profile-photo-frame { aspect-ratio: 7 / 5; }
  .profile-portrait { transform: scale(1.08); }
  .consultations-intro { grid-template-columns: minmax(0, 1fr); }
  .consultations-intro img { max-width: 190px; }
  .placement { padding: 17px 19px 21px; }
  .experience .section-head { position: static; grid-row: auto; margin-bottom: 22px; }
  .experience h2 { max-width: none; }
  .entry { padding-block: 17px; }
}

@media (max-width: 460px) {
  .topbar ul { gap: 0 9px; }
  .profile-specialties { display: grid; gap: 3px; }
  .profile-specialties > span { margin-inline-start: 0; padding-inline-start: 0; border: 0; }
  .entry { grid-template-columns: minmax(0, 1fr); }
  .entry-meta { display: flex; align-items: center; gap: 11px; }
  .entry-meta img, .entry-meta .project-symbol { width: 30px; height: 30px; }
  .entry-meta .entry-wordmark { width: 62px; }
  .entry-date { padding-top: 0; }
}

@keyframes project-arrival {
  from { opacity: .58; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes portrait-arrival {
  from { clip-path: inset(0 100% 0 0); }
  to { clip-path: inset(0); }
}

@media (prefers-reduced-motion: no-preference) {
  .profile-photo-frame.is-arriving { animation: portrait-arrival 640ms cubic-bezier(.22, .61, .36, 1) backwards; }
  .placement.is-arriving { animation: project-arrival 480ms cubic-bezier(.2, .75, .3, 1) backwards; }
}

@media (min-width: 721px) and (prefers-reduced-motion: no-preference) {
  .placement.is-arriving:nth-child(even) { animation-delay: 55ms; }
  .placement.is-arriving:nth-child(3) { animation-delay: 110ms; }
}

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .profile-portrait { transition: scale 480ms cubic-bezier(.2, .75, .3, 1); }
  .profile-photo-frame:hover .profile-portrait { scale: 1.035; }

  .placement { position: relative; isolation: isolate; }

  .placement::before {
    position: absolute;
    z-index: -1;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(245px circle at var(--light-x, 20%) var(--light-y, 24%), rgb(255 255 255 / 11%), transparent 72%);
    opacity: 0;
    transition: opacity 230ms ease-out;
    pointer-events: none;
    content: '';
  }

  .placement:hover::before { opacity: 1; }

  .placement :is(.place-mark, .project-symbol) {
    transition: transform 230ms cubic-bezier(.2, .75, .3, 1);
  }

  .placement:hover :is(.place-mark, .project-symbol) { transform: translateY(-4px) rotate(-3deg); }
}

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