:root {
  --script-outline: rgba(0, 0, 0, 0.82);
  --script-shadow: rgba(255, 255, 255, 0.08);
  --reading-width: 920px;
}

html[data-theme="light"] {
  --script-outline: rgba(255, 255, 255, 0.92);
  --script-shadow: rgba(0, 0, 0, 0.08);
}

body {
  font-family: "Manrope", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.hero {
  gap: clamp(30px, 4.4vw, 66px);
}

.hero-kicker {
  justify-content: flex-start;
}

.hero-line {
  font-family: "Manrope", Inter, ui-sans-serif, system-ui, sans-serif;
  font-weight: 800;
  line-height: 0.88;
  letter-spacing: -0.05em;
  font-size: clamp(66px, 12vw, 178px);
}

.hero-meta p,
.lead,
.cap-content p,
.project-card p,
.panel-line p {
  font-family: "Manrope", Inter, ui-sans-serif, system-ui, sans-serif;
}

.hero-meta p,
.lead {
  max-width: var(--reading-width);
  line-height: 1.72;
}

.personal-note {
  width: min(100%, var(--max));
  margin: 0 auto;
  padding: clamp(58px, 6.5vw, 96px) var(--pad);
  border-top: 1px solid var(--line);
}

.personal-note-inner {
  width: min(100%, 1120px);
  margin: 0 auto;
}

.personal-manifesto {
  position: relative;
  margin: 0;
  padding: clamp(4px, 1vw, 12px) 0;
  color: var(--fg);
  font-family: "Caveat", "Segoe Print", "Bradley Hand", cursive;
  font-size: clamp(26px, 2.15vw, 36px);
  font-weight: 500;
  line-height: 1.24;
  letter-spacing: 0.005em;
  -webkit-text-stroke: 0.3px var(--script-outline);
  text-shadow: 0 1px 0 var(--script-outline), 0 0 14px var(--script-shadow);
}

.personal-manifesto::before {
  content: "“";
  position: absolute;
  left: -0.48em;
  top: -0.22em;
  color: var(--muted);
  font-size: 1.55em;
  line-height: 1;
  opacity: 0.28;
}

.personal-manifesto p {
  margin: 0 0 0.58em;
}

.personal-manifesto p:last-child {
  margin-bottom: 0;
}

.section h2 {
  max-width: 1080px;
  font-family: "Manrope", Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: clamp(38px, 5vw, 78px);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.045em;
  text-transform: none;
  text-wrap: balance;
}

.projects-section .section-heading-row {
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}

.projects-section .section-heading-row > div:first-child {
  max-width: 1160px;
}

.projects-section #projects-title {
  max-width: 1160px;
  font-size: clamp(36px, 4.2vw, 64px);
  line-height: 1.04;
  letter-spacing: -0.035em;
}

.projects-section .lead.compact {
  max-width: 940px;
}

.projects-section .filter-bar {
  justify-content: flex-start;
  max-width: none;
}

.cap-content h3,
.project-card h3 {
  font-family: "Manrope", Inter, ui-sans-serif, system-ui, sans-serif;
  font-weight: 700;
  text-transform: none;
}

.cap-content h3 {
  line-height: 1.18;
  letter-spacing: -0.025em;
}

.cap-content p {
  line-height: 1.72;
}

.project-card h3 {
  letter-spacing: -0.03em;
}

.project-card p {
  line-height: 1.68;
}

.evidence-panel {
  align-self: start;
}

.panel-line {
  grid-template-columns: 58px 1fr;
}

.panel-line p strong {
  display: block;
  margin-bottom: 8px;
  color: var(--fg);
  font-size: 1.02em;
  font-weight: 700;
}

.contact-body .lead {
  max-width: 880px;
}

.site-footer {
  align-items: center;
}

@media (min-width: 1181px) {
  html[lang="en"] .hero {
    gap: clamp(28px, 3vw, 46px);
  }

  html[lang="en"] .hero-title {
    width: 100%;
    max-width: none;
    display: grid;
    grid-template-columns: max-content max-content;
    justify-content: start;
    align-items: baseline;
    column-gap: clamp(18px, 2vw, 32px);
  }

  html[lang="en"] .hero-line {
    font-size: clamp(72px, 8.4vw, 144px);
    line-height: 0.86;
  }

  html[lang="en"] .hero-line:first-child {
    grid-column: 1 / -1;
    font-size: clamp(88px, 11vw, 170px);
  }

  html[lang="en"] .hero-line:nth-child(2) {
    margin-left: clamp(32px, 7vw, 108px);
  }

  .hero-meta {
    grid-template-columns: minmax(0, 1fr) minmax(530px, max-content);
    gap: clamp(36px, 4vw, 64px);
  }

  .hero-meta p {
    max-width: 700px;
  }

  .hero-actions {
    flex-wrap: nowrap;
    justify-content: flex-end;
  }
}

@media (max-width: 1180px) {
  .hero-meta {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
  }

  .hero-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 980px) {
  .personal-note-inner {
    width: min(100%, 880px);
  }
}

@media (max-width: 640px) {
  .personal-note {
    padding-top: 52px;
    padding-bottom: 58px;
  }

  .personal-manifesto {
    font-size: clamp(24px, 6.6vw, 31px);
    line-height: 1.22;
  }

  .personal-manifesto::before {
    left: -0.12em;
    top: -0.4em;
  }

  .hero-line {
    font-size: clamp(52px, 17.5vw, 84px);
    line-height: 0.92;
  }

  .section h2 {
    font-size: clamp(35px, 10.4vw, 58px);
    line-height: 1.04;
  }

  .projects-section #projects-title {
    font-size: clamp(32px, 10.6vw, 50px);
    line-height: 1.06;
  }

  .panel-line {
    grid-template-columns: 1fr;
  }
}

html[lang="ru"] .hero-line {
  font-size: clamp(58px, 8.8vw, 128px);
  line-height: 0.9;
  letter-spacing: 0;
  white-space: nowrap;
}

html[lang="ru"] .hero-line.outline {
  letter-spacing: 0.014em;
  -webkit-text-stroke: 1.05px var(--fg);
}

@media (max-width: 760px) {
  html[lang="ru"] .hero-line {
    font-size: clamp(28px, 8.8vw, 54px);
    line-height: 0.96;
    letter-spacing: 0;
  }

  html[lang="ru"] .hero-line.outline {
    letter-spacing: 0.01em;
    -webkit-text-stroke: 0.95px var(--fg);
  }
}
