/*
Theme Name: SMM Portfolio
Theme URI: https://github.com/nikoslifequest/smm-portfolio
Author: Maiia Buiankova
Description: Portfolio for Maiia Buiankova. Design lives in the theme. Profile, projects and example posts are edited in WordPress.
Version: 1.6.0
Requires at least: 6.4
Tested up to: 6.8
Requires PHP: 8.0
Text Domain: smm-portfolio
*/

@font-face {
  font-family: "Geist";
  src: url("assets/fonts/geist-variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Instrument Serif";
  src: url("assets/fonts/instrument-serif-regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Instrument Serif";
  src: url("assets/fonts/instrument-serif-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

:root {
  --bg: #f3f0ea;
  --bg-2: #e7e1d6;
  --ink: #1b1916;
  --muted: #6e685f;
  --line: #ddd6c8;
  --accent: #e23b12;
  --serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --sans: "Geist", "Segoe UI", sans-serif;
  --wrap: 74rem;
  --narrow: 42rem;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  overflow-x: clip;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.55;
  font-weight: 440;
}

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

a { color: inherit; }

::selection { background: #ffd9cc; }

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: #fff;
  padding: 0.5rem 0.8rem;
  z-index: 20;
}

.skip:focus { top: 1rem; }

.site { min-height: 100vh; display: flex; flex-direction: column; }

main { flex: 1; }

.wrap {
  width: min(100% - 2.5rem, var(--wrap));
  margin-inline: auto;
}

.wrap--narrow { width: min(100% - 2.5rem, var(--narrow)); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(16px);
}

.site-header__inner,
.site-footer__inner {
  width: min(100% - 2.5rem, var(--wrap));
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.site-header__inner { min-height: 4.5rem; }

.wordmark {
  font-family: var(--serif);
  font-size: 1.35rem;
  letter-spacing: -0.03em;
  text-decoration: none;
  line-height: 1;
}

.wordmark em,
.hero__title em { font-style: italic; }

.hero .eyebrow {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  max-width: 24rem;
  margin-bottom: 1.25rem;
  line-height: 1.6;
  letter-spacing: 0.12em;
  text-wrap: balance;
}

.hero .eyebrow::before {
  content: "";
  flex: none;
  width: 2.25rem;
  height: 1px;
  background: currentColor;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.site-nav ul {
  display: flex;
  gap: 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.lang-switch {
  display: flex;
  gap: 0.35rem;
  margin: 0;
  letter-spacing: 0.12em;
}

.site-nav .lang-switch a { font-size: 0.72rem; }

.lang-switch a[aria-current="true"] { color: var(--accent); }

.lang-switch span { color: var(--line); }

.site-nav a {
  text-decoration: none;
  font-size: 0.95rem;
}

.site-nav a:hover,
.site-nav .current-menu-item > a,
.site-nav .current_page_item > a { color: var(--accent); }

.hero {
  display: flex;
  align-items: center;
  box-sizing: border-box;
  min-height: calc(100svh - 4.5rem);
  padding: 1.5rem 0;
}

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 4rem);
}

.hero__figure {
  position: relative;
  justify-self: center;
  width: min(100%, 25rem);
  margin: 0;
}

.admin-bar .site-header { top: 32px; }

@media (max-width: 782px) {
  .admin-bar .site-header { top: 46px; }
}

.hero__ring {
  position: absolute;
  z-index: 1;
  top: -20%;
  left: -20%;
  width: 140%;
  height: 140%;
  overflow: visible;
  animation: hero-spin 36s linear infinite;
  pointer-events: none;
}

.hero__ring text {
  fill: var(--ink);
  font-family: var(--sans);
  font-weight: 560;
  text-transform: uppercase;
}

.hero__photo {
  display: block;
  overflow: hidden;
  border-radius: 50%;
}

.hero__photo img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  object-position: center 20%;
  animation: hero-drift 14s ease-in-out infinite alternate;
}

@keyframes hero-spin {
  to { transform: rotate(360deg); }
}

@keyframes hero-drift {
  from { transform: scale(1); }
  to { transform: scale(1.06); }
}

.eyebrow,
.meta {
  margin: 0 0 0.8rem;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 560;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero__title,
.page-title {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.045em;
  line-height: 0.9;
}

.hero__title {
  display: flex;
  flex-direction: column;
  font-size: clamp(4.4rem, 12vw, 8.6rem);
  max-width: 9ch;
}

.page-title { font-size: clamp(3.2rem, 7vw, 5.5rem); line-height: 0.95; }

.lede {
  max-width: 34rem;
  text-wrap: pretty;
  margin: 1.5rem 0 0;
  color: var(--muted);
  font-size: 1.2rem;
}

.disciplines {
  margin: 1.25rem 0 0;
  font-size: 0.95rem;
}

.hero__links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem 1.75rem;
  margin: 2rem 0 0;
}

.text-link {
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  padding-bottom: 0.08em;
}

.text-link:hover { color: var(--accent); border-color: var(--accent); }

.section { padding: clamp(2.5rem, 6vw, 4.5rem) 0; }

.section--tight { padding-top: 0; }

.section-head,
.subsection h2 {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

.section-head h2,
.subsection h2,
.prose h2,
.post-card h3,
.credential-row h2,
.skills h3,
.timeline h3 {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.03em;
}

.section-head h2,
.subsection h2 {
  margin: 0 0 1.5rem;
  font-size: clamp(2rem, 4vw, 3rem);
}

.credential-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

.credential-row h2 {
  margin: 0;
  font-size: clamp(1.6rem, 3vw, 2.15rem);
  line-height: 1.15;
}

.credential-row p:last-child { margin: 0.35rem 0 0; color: var(--muted); }

.steps {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
  list-style: none;
  margin: 0;
  padding: 1.25rem 0 0;
  border-top: 1px solid var(--line);
}

.steps li { display: flex; flex-direction: column; gap: 0.35rem; }

.steps span {
  color: var(--muted);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
}

.work-home { padding: 0.25rem 0 2.5rem; }

.section-head--quiet { margin-bottom: 0.25rem; }

.section-head--quiet .eyebrow { margin: 0; }

.home-projects { border-bottom: 1px solid var(--line); }

.home-more { margin: 1.75rem 0 0; }

.home-project {
  display: grid;
  grid-template-columns: minmax(13rem, 0.7fr) minmax(0, 1.5fr);
  gap: 1.5rem 2.5rem;
  align-items: start;
  padding: 1.35rem 0;
  border-top: 1px solid var(--line);
}

.home-project__copy {
  display: block;
  text-decoration: none;
}

.home-project__index {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--muted);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
}

.home-project__copy h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1;
}

.home-project__copy p {
  margin: 0.55rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.home-project__copy .home-project__result { color: var(--accent); }

.home-project__copy:hover h2 { color: var(--accent); }

.ig-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.ig {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.ig__bar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.68rem;
  font-weight: 560;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ig__avatar {
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 42%, var(--bg) 0 28%, transparent 30%),
    linear-gradient(160deg, #f3c7b4, var(--accent));
}

.ig__frame {
  position: relative;
  display: block;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: 1rem;
  background:
    linear-gradient(160deg, transparent 40%, rgba(28, 25, 23, 0.05)),
    repeating-linear-gradient(0deg, transparent, transparent 18px, rgba(28, 25, 23, 0.06) 19px),
    var(--bg-2);
}

.ig__frame img,
.ig__frame video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(0.92);
  transition: filter 0.45s ease;
}

.ig__frame:has(img, video)::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--bg);
  mix-blend-mode: color;
  pointer-events: none;
  transition: opacity 0.45s ease;
}

.ig:hover .ig__frame img,
.ig:hover .ig__frame video,
.ig:focus-visible .ig__frame img,
.ig:focus-visible .ig__frame video {
  filter: none;
}

.ig:hover .ig__frame::after,
.ig:focus-visible .ig__frame::after {
  opacity: 0;
}

.ig__placeholder {
  position: absolute;
  left: 0.8rem;
  bottom: 0.7rem;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.7rem;
  letter-spacing: -0.03em;
}

.ig__caption {
  font-size: 0.85rem;
  line-height: 1.3;
}

.ig:hover .ig__caption { color: var(--accent); }

.work-list { margin-top: 0.5rem; }

.work-row {
  display: grid;
  grid-template-columns: 3rem minmax(0, 1.1fr) minmax(0, 1.4fr) auto;
  gap: 1rem 1.5rem;
  align-items: baseline;
  padding: 1.35rem 0;
  border-top: 1px solid var(--line);
  text-decoration: none;
}

.work-list .work-row:last-child { border-bottom: 1px solid var(--line); }

.work-row__index,
.work-row__meta { color: var(--muted); }

.work-row__title {
  font-family: var(--serif);
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  letter-spacing: -0.03em;
  line-height: 1;
}

.work-row__result {
  color: var(--accent);
  font-size: 0.95rem;
  text-align: right;
}

.work-row:hover .work-row__title { color: var(--accent); }

.tool-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  margin: 0.85rem 0 0;
  padding: 0;
}

.tool-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0;
  padding: 0.28rem 0.85rem 0.28rem 0.28rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font-size: 0.95rem;
  line-height: 1.2;
}

.tool-chip__logo {
  display: grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  color: #fff;
}

.tool-chip__logo svg {
  width: 0.95rem;
  height: 0.95rem;
  fill: currentColor;
}

.tool-chip__letter {
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1;
}

.case { padding: clamp(1.5rem, 4vw, 3rem) 0 clamp(3rem, 6vw, 5rem); }

.case-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.7fr);
  gap: clamp(1.5rem, 4vw, 4rem);
  align-items: start;
}

.case-hero:not(:has(.case-hero__photo)) { grid-template-columns: minmax(0, 42rem); }

.case-kicker {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.1rem;
  margin: 0 0 1.1rem;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 560;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.case-kicker strong { color: var(--accent); font-weight: 560; }

.case-hero__photo {
  justify-self: end;
  width: min(100%, 22rem);
  margin: 0;
  overflow: hidden;
  border-radius: 1.6rem;
}

.profile-intro > .case-copy { margin-top: 0; max-width: none; }

.profile-intro .prose { margin-top: 2rem; }

.case-hero__photo img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  animation: hero-drift 18s ease-in-out infinite alternate;
}

.case-brief {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(14rem, 0.75fr);
  gap: 1.5rem 3rem;
  align-items: start;
  margin-top: clamp(2.5rem, 6vw, 4rem);
  padding-top: 1.6rem;
  border-top: 1px solid var(--line);
}

.case-brief:not(:has(.goal)) { grid-template-columns: minmax(0, 42rem); }

.goal {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.7rem, 3vw, 2.45rem);
  line-height: 1.2;
  letter-spacing: -0.03em;
}

.goal .meta { display: block; }

.case-copy { max-width: 42rem; margin-top: clamp(2.5rem, 6vw, 4rem); }

.case .case-copy { max-width: none; }

.case .prose > p { max-width: 42rem; }

.prose { margin-top: 3rem; }

.prose > *:first-child { margin-top: 0; }

.prose h2 { font-size: 2rem; margin: 2.2rem 0 0.8rem; }

/* Chapters: heading on the left, content on the right. Blocks stay flat, so a heading starts a new row. */
.case .prose {
  display: grid;
  grid-template-columns: minmax(0, 14rem) minmax(0, 1fr);
  column-gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: start;
  counter-reset: chapter;
}

.case .prose > * { grid-column: 2; margin: 0; }

.case .prose > * + * { margin-top: 1.25rem; }

.case .prose > h2 { grid-column: 1; }

.case .prose > .kpis { grid-column: 1 / -1; }

.case .section-head { margin-top: clamp(4rem, 9vw, 6.5rem); }

.case .prose > h2,
.case .prose > h2 + * {
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
  padding-top: 1.1rem;
  border-top: 1px solid var(--line);
}

.case .prose h2 { font-size: clamp(1.6rem, 2.4vw, 2.1rem); }

.case .prose h2::before {
  content: counter(chapter, decimal-leading-zero);
  counter-increment: chapter;
  display: block;
  margin-bottom: 0.45rem;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
}

.prose p,
.prose li { color: var(--ink); }

.prose ul { padding-left: 1.1rem; }

.case .prose ul {
  padding: 0;
  list-style: none;
  columns: 2;
  column-gap: 2.5rem;
}

.kpis {
  display: grid;
  grid-auto-columns: minmax(0, 1fr);
  grid-auto-flow: column;
  border-block: 1px solid var(--line);
}

.kpis p { margin: 0; padding: 1.6rem 1.25rem; }

.kpis p:first-child { padding-left: 0; }

.kpis p + p { border-left: 1px solid var(--line); }

.kpis strong {
  display: block;
  font-family: var(--serif);
  font-size: clamp(2rem, 3.6vw, 3.1rem);
  font-weight: 450;
  letter-spacing: -0.04em;
  line-height: 1;
}

.kpis span,
.kpis em {
  display: block;
  margin-top: 0.4rem;
  font-size: 0.85rem;
  font-style: normal;
}

.kpis span { color: var(--muted); }

.kpis em { color: var(--accent); }

.availability,
.cv-link { margin: 0.85rem 0 0; }

.availability { color: var(--muted); }

.prose li { margin: 0.35rem 0; }

.case .prose li {
  margin: 0;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--line);
  break-inside: avoid;
}

.letters {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem 1.25rem;
  margin: 1.25rem 0 0;
}

.letter__kicker {
  margin: 0 0 0.55rem;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 560;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.letter__sheet {
  height: min(36rem, 68vh);
  overflow-y: auto;
  overflow-x: hidden;
  border: 1px solid var(--line);
  border-radius: 1.2rem;
  background: #fff;
  scrollbar-width: thin;
}

/* The email sits in the middle ~56% of the screenshot; crop the white margins so it fills the sheet. */
.letter__sheet img {
  width: 179%;
  max-width: none;
  height: auto;
  margin-left: -39.5%;
}

.letter h3 {
  margin: 0.85rem 0 0;
  font-family: var(--serif);
  font-size: 1.7rem;
  font-weight: 450;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.letter p:last-child {
  margin: 0.3rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.report {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1.25rem clamp(1.5rem, 4vw, 3rem);
  align-items: start;
}

.report p { margin: 0; }

.report + .report { margin-top: 3.5rem; }

.report > .stats__note { grid-column: 1 / -1; }

.report__data > .board__group:first-child { margin-top: 0; }

.stats__note {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.report__chart {
  display: flex;
  align-items: stretch;
  gap: 1.5rem;
}

.report__col {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  min-width: 0;
  text-align: center;
}

.report__plot {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  width: 100%;
  height: 12rem;
  margin-top: 2.1rem;
  border-bottom: 1px solid var(--line);
}

.report__plot i {
  position: relative;
  display: block;
  width: min(7rem, 72%);
  height: max(0.35rem, calc(var(--h) * 1%));
  border-radius: 0.15rem 0.15rem 0 0;
  background: var(--ink);
}

.report__plot b {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 0.55rem);
  transform: translateX(-50%);
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 450;
  letter-spacing: -0.03em;
  line-height: 1;
  white-space: nowrap;
}

.report__col--now i,
.report__plot i.is-now { background: var(--accent); }

.report__col > span:last-child {
  margin-top: 0.45rem;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 560;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.board__legend {
  margin-top: 1.25rem;
  color: var(--muted);
  font-size: 0.8rem;
}

.board__swatch {
  display: inline-block;
  width: 0.65rem;
  height: 0.65rem;
  margin-right: 0.35rem;
  border-radius: 99px;
  background: var(--ink);
  vertical-align: -0.05em;
}

.board__swatch--now { background: var(--accent); }

.board__swatch:not(:first-child) { margin-left: 1.1rem; }

.board__group {
  margin: 1.2rem 0 0;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 560;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.board__metric {
  display: grid;
  grid-template-columns: 7.5rem minmax(0, 1fr) 7rem;
  gap: 0.35rem 1.25rem;
  align-items: center;
  padding: 0.85rem 0;
  border-top: 1px solid var(--line);
}

.board__figure strong {
  display: block;
  font-family: var(--serif);
  font-size: 1.85rem;
  font-weight: 450;
  letter-spacing: -0.03em;
  line-height: 1;
}

.board__figure span,
.board__aside span {
  display: block;
  margin-top: 0.2rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.board__aside { text-align: right; }

.board__aside em {
  font-style: normal;
  color: var(--accent);
  font-size: 0.85rem;
}

.board__bar {
  display: block;
  height: 0.42rem;
  overflow: hidden;
  border-radius: 999px;
  background: #e4ddd0;
}

.board__bar + .board__bar { margin-top: 0.32rem; }

.board__bar > span {
  display: block;
  height: 100%;
  width: calc(var(--w) * 1%);
  border-radius: inherit;
  background: var(--ink);
}

.board__bar--now > span { background: var(--accent); }

.result {
  display: grid;
  grid-template-columns: minmax(11rem, 0.7fr) minmax(0, 1.3fr);
  gap: 1rem 2.5rem;
  align-items: end;
  margin-top: 3.5rem;
  padding: 1.75rem 0;
  border-block: 1px solid var(--line);
}

.result:not(:has(.result__short)) { grid-template-columns: minmax(0, 42rem); }

.result__short,
.result__text { margin: 0; }

.result__short {
  color: var(--accent);
  font-family: var(--serif);
  font-size: clamp(2.2rem, 4vw, 3.4rem);
  line-height: 0.95;
  letter-spacing: -0.04em;
}

.result__text {
  max-width: 36rem;
  font-family: var(--serif);
  font-size: clamp(1.35rem, 2vw, 1.7rem);
  line-height: 1.3;
  letter-spacing: -0.03em;
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem 1.25rem;
}

.post-card__index {
  margin: 0.85rem 0 0;
  color: var(--muted);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
}

.post-card h3 {
  margin: 0.2rem 0 0.45rem;
  font-size: 1.7rem;
  line-height: 1.05;
}

.post-card p { margin: 0.35rem 0 0; color: var(--muted); font-size: 0.95rem; }

.post-card .meta { display: block; margin-bottom: 0.15rem; }

.post-card--square .post-card__frame,
.ig--square .ig__frame { aspect-ratio: 1; }

.post-card__frame {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: 1.4rem;
  background:
    linear-gradient(160deg, transparent 40%, rgba(28, 25, 23, 0.05)),
    repeating-linear-gradient(0deg, transparent, transparent 22px, rgba(28, 25, 23, 0.05) 23px),
    var(--bg-2);
}

.post-card__frame img,
.post-card__frame video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.post-card__link {
  position: absolute;
  inset: 0;
  z-index: 1;
  outline-offset: -4px;
}

.post-card__frame:has(.post-card__link:is(:hover, :focus-visible)) :is(img, video) { transform: scale(1.04); }

.post-card__placeholder {
  position: absolute;
  inset: auto 1.2rem 1.2rem 1.2rem;
  font-family: var(--serif);
  font-style: italic;
  font-size: 2.4rem;
  letter-spacing: -0.04em;
}

.post-card__badge {
  position: absolute;
  top: 0.8rem;
  left: 0.8rem;
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
  background: #fff;
  font-size: 0.68rem;
  font-weight: 560;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.back { margin: 3rem 0 0; }

.subsection { padding-top: clamp(2.5rem, 6vw, 4rem); }

.skills,
.timeline { display: grid; grid-template-columns: 1fr 1fr; gap: 0 3rem; }

.skills article,
.timeline article {
  padding: 1.15rem 0;
  border-top: 1px solid var(--line);
}

.skills h3,
.timeline h3 { margin: 0; font-size: 1.7rem; line-height: 1.1; }

.skills p,
.timeline p { margin: 0.3rem 0 0; color: var(--muted); }

.timeline__fact {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
}

.timeline__icon {
  width: 0.8rem;
  height: 0.8rem;
  flex: none;
  margin-top: 0.22em;
}

.timeline article:not(.award) > h3,
.timeline article:not(.award) > p:not(.timeline__fact) { padding-left: 1.25rem; }

/* Certificates read as awards: a dark plate with a seal. */
article.award {
  position: relative;
  margin-bottom: 1.25rem;
  padding: 1.6rem 1.6rem 1.5rem;
  border: 1px solid #d9d0bf;
  border-radius: 1.1rem;
  background: #ebe5d9;
  color: var(--ink);
}

article.award h2,
article.award h3 {
  margin: 0;
  padding: 0 2.5rem 0 0;
  color: var(--ink);
}

article.award p,
article.award p:last-child {
  margin: 0.35rem 0 0;
  padding-left: 0;
  color: var(--muted);
}

article.award .meta,
article.award .timeline__icon { color: var(--accent); }

article.award .meta { margin-bottom: 0.6rem; }

article.award .timeline__fact { gap: 0.45rem; }

.award__seal {
  position: absolute;
  top: 1.4rem;
  right: 1.4rem;
  width: 1.5rem;
  height: 1.5rem;
  color: var(--accent);
}

.contact-list {
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
  font-family: var(--serif);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  letter-spacing: -0.03em;
  line-height: 1.25;
}

.contact-list a { text-decoration: none; }
.contact-list a:hover { color: var(--accent); }

.site-footer {
  margin-top: auto;
  padding: 1.5rem 0 2rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.site-footer__links { display: flex; flex-wrap: wrap; gap: 0.75rem 1.25rem; }

.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--accent); }

.empty { color: var(--muted); }

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

@media (max-width: 900px) {
  .steps,
  .post-grid,
  .credential-row,
  .skills,
  .timeline { grid-template-columns: 1fr 1fr; }

  .home-project,
  .case-hero,
  .case-brief,
  .report,
  .result { grid-template-columns: 1fr; }

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

  .case .prose > * { grid-column: 1; }

  .case .prose > h2 + * { margin-top: 1rem; padding-top: 0; border-top: 0; }

  .kpis { grid-auto-flow: row; grid-template-columns: 1fr 1fr; }

  .kpis p:nth-child(odd) { padding-left: 0; border-left: 0; }

  .kpis p:nth-child(n + 3) { border-top: 1px solid var(--line); }

  .case-hero__photo { justify-self: start; width: min(100%, 16rem); }
  .work-row { grid-template-columns: 2.4rem 1fr; }
  .work-row__meta,
  .work-row__result { grid-column: 2; text-align: left; }
  .hero { min-height: 0; align-items: start; }
  .hero__grid { grid-template-columns: 1fr; }
  /* The orbit is 20% larger than the portrait and has to clear the links above it. */
  .hero__figure { width: min(100%, 16rem); margin-top: 4.25rem; }
}

@media (max-height: 760px) and (min-width: 901px) {
  .hero__title { font-size: clamp(3rem, 8vh, 5.5rem); }
  .hero__figure img { max-height: 42vh; width: auto; }
}

@media (max-width: 640px) {
  .case .prose ul { columns: 1; }

  .board__metric { grid-template-columns: 1fr; }
  .board__aside { text-align: left; }

  .letters { grid-template-columns: 1fr; }

  .letter__sheet { height: 28rem; }

  .site-header__inner {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.15rem;
    min-height: 0;
    padding: 0.7rem 0 0.35rem;
  }

  .site-nav a { display: inline-flex; padding-block: 0.45rem; }

  .site-footer__inner {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.85rem;
  }

  .post-grid,
  .credential-row,
  .skills,
  .timeline { grid-template-columns: 1fr; }

  .hero { padding-top: 1rem; }
  .hero .eyebrow { max-width: none; }
  .hero__title { font-size: clamp(3.4rem, 17vw, 4.8rem); }
  .hero__links { margin-top: 1.5rem; }
  .hero__figure { width: min(70%, 15rem); margin-top: 4.25rem; }

  .case-hero__photo { width: 100%; }

  .profile-intro .case-hero__photo {
    order: -1;
    width: 11rem;
    margin-bottom: 0.25rem;
  }

  .home-project,
  .ig-row { min-width: 0; }

  .ig-row {
    display: flex;
    gap: 0.75rem;
    margin-inline: -1.25rem;
    padding-inline: 1.25rem 2rem;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 1.25rem;
    scrollbar-width: none;
    -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 3.5rem), transparent);
    mask-image: linear-gradient(to right, #000 calc(100% - 3.5rem), transparent);
  }

  .ig-row::-webkit-scrollbar { display: none; }

  .ig { flex: 0 0 calc(100% - 1.5rem); scroll-snap-align: start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero__ring,
  .hero__photo img,
  .case-hero__photo img { animation: none; }
  .ig__frame img,
  .ig__frame video,
  .ig__frame::after,
  .post-card__frame img,
  .post-card__frame video { transition: none; }
}
