@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=Manrope:wght@400;500;600;700&display=swap');

:root {
  --ink: #1C211F;
  --paper: #F7F6F2;
  --surface: #FFFFFF;
  --muted: #626864;
  --line: #D8DAD4;
  --accent: #F0B84A;
  --accent-soft: #F3EFE6;
  --accent-pale: #F7F3E8;
  --accent-deep: #79500E;
  --page-gutter: 5.5vw;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: Manrope, Arial, sans-serif; }
a { color: inherit; }
button { font: inherit; }
::selection { background: var(--accent); color: var(--ink); }
:focus-visible { outline: 2px solid var(--accent-deep); outline-offset: 5px; }
[id] { scroll-margin-top: 24px; }
h1, h2, h3, p, figure { margin: 0; }
h1, h2, h3 { font-weight: 500; }
em { font-family: Georgia, serif; font-weight: 400; }
.skip-link { position: absolute; top: 10px; left: var(--page-gutter); z-index: 200; padding: 12px 18px; border-radius: 8px; background: var(--ink); color: var(--paper); transform: translateY(-160%); }
.skip-link:focus { transform: none; }
.eyebrow, .section-label, .photo-number, .photo-caption, .journey-date, .entry-role, .page-sections, .result-context, .approach-number, .contact-meta {
  font-family: 'DM Mono', ui-monospace, monospace;
  font-size: 11px;
  line-height: 1.6;
  letter-spacing: .045em;
}
.eyebrow, .section-label, .entry-role, .result-context, .contact-meta { text-transform: uppercase; }
.eyebrow { display: flex; align-items: center; gap: 10px; color: var(--muted); }
.eyebrow::before { content: ''; flex: 0 0 7px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.about-hero { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: 5vw; align-items: center; padding: 48px var(--page-gutter) 64px; border-top: 1px solid var(--line); }
.hero-copy { min-width: 0; }
.about-hero h1 { margin: 26px 0 28px; font-size: clamp(64px, 8.6vw, 132px); line-height: .91; letter-spacing: -.065em; }
.about-hero h1 em { letter-spacing: -.075em; }
.hero-subtitle { max-width: 560px; font-size: clamp(24px, 2.5vw, 35px); line-height: 1.2; letter-spacing: -.04em; }
.hero-intro { max-width: 560px; margin-top: 22px; color: var(--muted); font-size: 17px; line-height: 1.65; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
.button { border: 1px solid var(--ink); background: transparent; color: var(--ink); }
.button--primary { border-color: var(--accent); background: var(--accent); }
.button:hover { background: var(--accent-soft); }
.button--primary:hover { border-color: var(--ink); background: var(--ink); color: var(--paper); }
.hero-location { margin-top: 28px; color: var(--muted); font-size: 12px; }

/* Пустые места под реальные снимки. Готовое <picture> можно поставить внутрь figure. */
.photo-slot { position: relative; display: flex; flex-direction: column; justify-content: space-between; min-width: 0; aspect-ratio: 4 / 3; padding: 20px; overflow: hidden; border: 1px solid #C9C9BF; border-radius: 20px; background: var(--accent-soft); }
.photo-slot::before, .photo-slot::after { content: ''; position: absolute; z-index: 0; pointer-events: none; background: #D8D6CC; }
.photo-slot::before { width: 1px; height: 40px; left: 50%; top: calc(50% - 20px); }
.photo-slot::after { width: 40px; height: 1px; left: calc(50% - 20px); top: 50%; }
.photo-slot--portrait { aspect-ratio: 4 / 5; min-height: 480px; background: #EBE8DE; }
.photo-slot--portrait::before { height: 56px; top: calc(50% - 28px); }
.photo-slot--portrait::after { width: 56px; left: calc(50% - 28px); }
.photo-number { position: relative; z-index: 1; align-self: flex-start; color: var(--muted); }
.photo-caption { position: relative; z-index: 1; margin-top: auto; padding-top: 70px; color: var(--muted); }
.photo-caption strong { display: block; margin-top: 5px; color: var(--ink); font: 500 16px/1.4 Manrope, Arial, sans-serif; letter-spacing: -.015em; }
.photo-slot picture { position: absolute; inset: 0; z-index: 2; display: block; }
.photo-slot img { display: block; width: 100%; height: 100%; object-fit: cover; }
.photo-slot:has(picture)::before, .photo-slot:has(picture)::after { display: none; }
.photo-slot--image { display: block; aspect-ratio: 3 / 2; padding: 0; border-radius: 16px; background: #393532; }
.photo-slot--image::before, .photo-slot--image::after { display: none; }
.photo-slot--image > img { position: absolute; inset: 0; z-index: 0; }
.photo-slot--image .photo-number { position: absolute; top: 0; left: 0; margin: 14px; padding: 4px 8px; border-radius: 5px; background: rgb(247 246 242 / 90%); color: var(--ink); }
.photo-slot--image .photo-caption { position: absolute; bottom: 0; left: 0; width: 100%; margin-top: auto; padding: 44px 16px 14px; background: linear-gradient(transparent, rgb(20 22 20 / 78%)); color: #fff; }
.photo-slot--image .photo-caption strong { color: #fff; }

.page-sections { display: flex; flex-wrap: wrap; gap: 14px 32px; padding: 22px var(--page-gutter); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.page-sections a { display: inline-flex; gap: 12px; text-decoration: none; }
.page-sections a span { color: var(--accent-deep); }
.page-sections a:hover { text-decoration: underline; text-underline-offset: 4px; }
.journey, .results, .competencies, .approach, .about-contact { padding: 88px var(--page-gutter); }
.section-heading { display: grid; grid-template-columns: minmax(140px, .38fr) minmax(0, 1fr); gap: 30px; margin-bottom: 60px; }
.section-label { padding-top: 9px; color: var(--muted); }
.section-heading h2, .about-contact h2 { font-size: clamp(42px, 5vw, 76px); line-height: 1.02; letter-spacing: -.055em; }
.section-intro { grid-column: 2; max-width: 680px; margin-top: -10px; color: var(--muted); font-size: 17px; line-height: 1.65; }
.journey-list { margin: 0; padding: 0; list-style: none; }
.journey-entry { position: relative; display: grid; grid-template-columns: minmax(100px, .33fr) minmax(0, 1.3fr) minmax(210px, .8fr); gap: 32px; padding: 45px 0 52px; border-top: 1px solid var(--line); }
.journey-date { position: relative; display: flex; flex-direction: column; gap: 9px; align-items: flex-start; padding: 2px 0 0 22px; color: var(--muted); }
.journey-date::before { content: ''; position: absolute; left: 0; top: 8px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 5px var(--paper); }
.journey-entry:not(:last-child) .journey-date::after { content: ''; position: absolute; left: 3px; top: 25px; bottom: -62px; width: 1px; background: var(--line); }
.journey-date time, .journey-date > strong { color: var(--ink); font-size: 13px; font-weight: 500; }
.journey-story { min-width: 0; }
.entry-role { margin-bottom: 12px; color: var(--accent-deep); }
.journey-story h3 { margin-bottom: 20px; font-size: clamp(27px, 2.5vw, 38px); line-height: 1.08; letter-spacing: -.045em; }
.journey-story p, .journey-story li { color: var(--muted); font-size: 15px; line-height: 1.7; }
.journey-story p + p { margin-top: 15px; }
.journey-story ul { margin: 17px 0 0; padding-left: 19px; }
.journey-story li + li { margin-top: 9px; }
.journey-story strong { color: var(--ink); font-weight: 600; }
.journey-entry > .photo-slot { align-self: start; margin-top: 0; }
.journey-entry--renault { grid-template-columns: minmax(0, 1.3fr) minmax(210px, .8fr) minmax(105px, .33fr); }
.journey-entry--renault .journey-story { grid-column: 1; grid-row: 1; }
.journey-entry--renault .journey-date { grid-column: 3; grid-row: 1; }
.renault-gallery { grid-column: 2; grid-row: 1; min-width: 0; }
.nauka-gallery { grid-column: 3; grid-row: 1; min-width: 0; }
.photo-gallery__frame { position: relative; overflow: hidden; aspect-ratio: 3 / 2; border: 1px solid #C9C9BF; border-radius: 16px; background: var(--accent-soft); }
.photo-gallery__slide { position: absolute; inset: 0; margin: 0; }
.photo-gallery__slide[hidden] { display: none; }
.photo-gallery__slide img { display: block; width: 100%; height: 100%; object-fit: cover; }
/* Единый формат снимков; положение значимых деталей задаётся у конкретного фото. */
.photo-gallery__slide img, .photo-slot--image > img { object-position: var(--photo-position, 50% 50%); }
.photo-gallery__slide figcaption { position: absolute; right: 0; bottom: 0; left: 0; padding: 32px 14px 12px; color: #fff; font-size: 12px; line-height: 1.4; background: linear-gradient(transparent, rgb(0 0 0 / 72%)); }
.photo-gallery__arrow { position: absolute; z-index: 2; top: 50%; display: grid; width: 34px; height: 34px; place-items: center; transform: translateY(-50%); border: 1px solid rgb(255 255 255 / 75%); border-radius: 50%; background: rgb(30 30 30 / 52%); color: #fff; font: 24px/1 Arial, sans-serif; cursor: pointer; }
.photo-gallery__arrow:hover { background: rgb(30 30 30 / 82%); }
.photo-gallery__arrow--prev { left: 9px; }
.photo-gallery__arrow--next { right: 9px; }
.photo-gallery__controls { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 3px 0; color: var(--muted); font-size: 11px; }
.photo-gallery__dots { display: flex; gap: 7px; }
.photo-gallery__dots button { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 50%; background: #c9c9bf; cursor: pointer; }
.photo-gallery__dots button[aria-current="true"] { background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.entry-note { margin-top: 20px !important; padding-left: 15px; border-left: 2px solid var(--accent); color: var(--ink) !important; font-size: 13px !important; }
.entry-link { display: inline-block; margin-top: 21px; text-decoration-thickness: 1px; text-underline-offset: 5px; font-size: 13px; }
.entry-link:hover { color: var(--accent-deep); }
.journey-entry--present .journey-date::before { background: var(--ink); }

.results { border-top: 1px solid var(--line); background: var(--accent-pale); }
.results-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.result-item { min-width: 0; padding: 28px 24px 28px 0; }
.result-item + .result-item { padding-left: 24px; border-left: 1px solid var(--line); }
.result-context { display: block; min-height: 36px; color: var(--muted); font-size: 10px; }
.result-value { display: block; margin: 22px 0 16px; font-size: clamp(39px, 4vw, 60px); font-weight: 500; line-height: 1; letter-spacing: -.065em; white-space: nowrap; }
.result-value small { font-size: .38em; letter-spacing: -.035em; }
.result-item p { max-width: 260px; color: var(--muted); font-size: 14px; line-height: 1.65; }
.results-note { max-width: 850px; margin-top: 22px; color: var(--muted); font-size: 12px; line-height: 1.65; }
.results > .button { margin-top: 28px; }

.competencies-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 40px; }
.competency { padding: 25px 0 30px; border-top: 1px solid var(--line); }
.competency h3 { margin-bottom: 13px; font-size: 23px; line-height: 1.25; letter-spacing: -.035em; }
.competency p { max-width: 570px; color: var(--muted); font-size: 15px; line-height: 1.7; }
.tools-details { margin-top: 18px; padding: 22px 24px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.tools-details summary { cursor: pointer; font-size: 16px; font-weight: 600; }
.tools-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 25px 32px; margin-top: 28px; }
.tools-grid h3 { margin-bottom: 8px; font-size: 15px; font-weight: 600; }
.tools-grid p { color: var(--muted); font-size: 13px; line-height: 1.8; overflow-wrap: anywhere; }
.ai-role { max-width: 880px; margin-top: 30px; padding-left: 22px; border-left: 2px solid var(--accent); font-size: 16px; line-height: 1.7; }

.approach { padding-top: 0; }
.approach-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; margin: 0; padding: 0; list-style: none; }
.approach-list li { min-width: 0; padding-top: 17px; border-top: 1px solid var(--line); }
.approach-number { color: var(--accent-deep); }
.approach-list h3 { margin: 23px 0 12px; font-size: 22px; line-height: 1.25; letter-spacing: -.035em; }
.approach-list p { color: var(--muted); font-size: 14px; line-height: 1.7; }
.about-contact { display: grid; grid-template-columns: minmax(140px, .38fr) minmax(0, 1fr); gap: 30px; border-top: 1px solid var(--line); background: var(--accent-soft); }
.about-contact > div > p { max-width: 650px; margin-top: 25px; color: var(--muted); font-size: 17px; line-height: 1.65; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 12px 25px; align-items: center; margin-top: 30px; }
.contact-service { font-size: 14px; text-underline-offset: 5px; }
.contact-meta { margin-top: 30px !important; font-size: 10px !important; }

@media (min-width: 1550px) {
  .about-hero, .journey, .results, .competencies, .approach, .about-contact, .page-sections { padding-right: max(var(--page-gutter), calc((100vw - 1440px) / 2)); padding-left: max(var(--page-gutter), calc((100vw - 1440px) / 2)); }
  .photo-slot--portrait { min-height: 560px; }
}
@media (max-width: 1100px) {
  .about-hero { gap: 4vw; }
  .photo-slot--portrait { min-height: 420px; }
  .journey-entry { grid-template-columns: 120px minmax(0, 1fr) minmax(190px, .7fr); gap: 24px; }
  .journey-entry--renault { grid-template-columns: minmax(0, 1fr) minmax(190px, .75fr) 95px; }
  .nauka-gallery { grid-column: 3; grid-row: 1; }
  .journey-story p, .journey-story li { font-size: 14px; }
  .results-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .result-item { padding-right: 24px; }
  .result-item:nth-child(3) { padding-left: 0; border-left: 0; }
  .result-item:nth-child(n+3) { border-top: 1px solid var(--line); }
  .result-context { min-height: 0; }
  .approach-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; }
}
@media (max-width: 900px) {
  .about-hero { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); align-items: start; padding-top: 36px; }
  .about-hero h1 { font-size: clamp(62px, 8.5vw, 90px); }
  .hero-subtitle { font-size: 25px; }
  .hero-intro { font-size: 15px; }
  .photo-slot--portrait { min-height: 400px; }
  .journey-entry { grid-template-columns: 130px minmax(0, 1fr); }
  .journey-entry--renault { grid-template-columns: minmax(0, 1fr) minmax(210px, .8fr) 90px; }
  .journey-entry > .photo-slot { grid-column: 2; width: min(100%, 520px); }
  .nauka-gallery { grid-column: 2; grid-row: 2; width: min(100%, 520px); }
  .journey-date { grid-row: 1 / 3; }
  .journey-date::after { bottom: -62px; }
  .journey-story p, .journey-story li { font-size: 15px; }
  .section-heading, .about-contact { grid-template-columns: 130px minmax(0, 1fr); gap: 24px; }
}
/* Без готового снимка отдельную колонку под него не резервируем. */
.about-hero:not(:has(> .photo-slot)) { grid-template-columns: minmax(0, 1fr); }
.journey-entry:not(:has(> .photo-slot, > .photo-gallery)) > .journey-story { grid-column: 2 / -1; max-width: 72ch; }

@media (max-width: 700px) {
  :root { --page-gutter: 20px; }
  .about-hero { grid-template-columns: minmax(0, 1fr); gap: 34px; padding-top: 30px; padding-bottom: 34px; }
  .about-hero h1 { margin: 25px 0; font-size: clamp(62px, 16vw, 104px); }
  .hero-subtitle { max-width: 520px; font-size: 27px; }
  .hero-intro { margin-top: 18px; font-size: 16px; }
  .hero-actions { margin-top: 24px; }
  .hero-location { margin-top: 22px; }
  .photo-slot--portrait { width: 100%; min-height: 0; }
  .page-sections { gap: 12px 22px; font-size: 10px; }
  .page-sections a { gap: 7px; }
  .journey, .results, .competencies, .approach, .about-contact { padding-top: 54px; padding-bottom: 54px; }
  .section-heading { grid-template-columns: minmax(0, 1fr); gap: 18px; margin-bottom: 34px; }
  .section-label { padding-top: 0; }
  .section-heading h2, .about-contact h2 { font-size: clamp(38px, 9.5vw, 62px); }
  .section-intro { grid-column: 1; margin-top: 0; font-size: 15px; }
  .journey-entry { display: flex; flex-direction: column; gap: 24px; padding: 29px 0 36px 20px; border-left: 1px solid var(--line); }
  .journey-entry--renault { display: flex; flex-direction: column; }
  .journey-entry--renault .journey-story { order: 1; }
  .renault-gallery { order: 2; }
  .nauka-gallery { order: 3; }
  /* Расширяем фото до полей страницы, компенсируя отступ этапа и линию. */
  .journey-entry > :is(.photo-gallery, .photo-slot--image) {
    width: calc(100% + 21px);
    max-width: none;
    margin-left: -21px;
    margin-right: 0;
  }
  .journey-entry--renault .journey-date { order: 3; align-self: flex-end; text-align: right; }
  .photo-gallery__slide figcaption { padding: 28px 12px 10px; font-size: 11px; }
  .photo-gallery__arrow { width: 32px; height: 32px; }
  .photo-gallery__controls { padding: 8px 3px 0; }
  .journey-entry:first-child { border-top: 0; padding-top: 0; }
  .journey-date { position: static; flex-direction: row; flex-wrap: wrap; gap: 6px 15px; padding: 0; }
  .journey-date::before { left: -4px; top: 34px; }
  .journey-entry:first-child .journey-date::before { top: 6px; }
  .journey-entry .journey-date::after { display: none; }
  .journey-date > span { flex-basis: 100%; }
  .entry-role { font-size: 10px; }
  .journey-story h3 { margin-bottom: 17px; font-size: 29px; }
  .journey-story p, .journey-story li { font-size: 15px; line-height: 1.7; }
  .journey-entry > .photo-slot:not(.photo-slot--image) { width: 100%; }
  .photo-slot { padding: 17px; border-radius: 16px; }
  .journey-entry > .photo-slot--image { padding: 0; }
  .results-grid { grid-template-columns: minmax(0, 1fr); }
  .result-item, .result-item + .result-item, .result-item:nth-child(3) { padding: 24px 0; border-left: 0; }
  .result-item + .result-item { border-top: 1px solid var(--line); }
  .result-value { margin-top: 15px; font-size: 54px; }
  .result-item p { max-width: 440px; }
  .competencies-grid, .tools-grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .tools-grid { gap: 24px; }
  .tools-details { padding: 18px; }
  .ai-role { padding-left: 17px; font-size: 15px; }
  .approach { padding-top: 0; }
  .approach-list { grid-template-columns: minmax(0, 1fr); gap: 27px; }
  .approach-list h3 { margin-top: 13px; }
  .about-contact { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .about-contact > div > p { margin-top: 22px; font-size: 16px; }
  .contact-actions { align-items: flex-start; flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
