/* Portfolio — production */

:root {
  --ink: #12151c;
  --surface: #1a2030;
  --surface-raised: #222a3d;
  --paper: #eceae4;
  --muted: #7a8494;
  --border: rgba(236, 234, 228, 0.1);
  --accent: #3791FF;
  --ind-auto: #5b8def;
  --ind-retail: #c47b4a;
  --ind-finance: #6bc9a8;
  --ind-edu: #b07ad4;
  --ind-realty: #d4a843;
  --ind-other: #5a6270;
  --font-display: "IBM Plex Sans", system-ui, sans-serif;
  --font-hero: "IBM Plex Sans", system-ui, sans-serif;
  --font-body: "IBM Plex Sans", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
  --header-h: 56px;
  --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
}

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

html {
  background: var(--ink);
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  width: 100%;
  min-height: 100%;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  color: var(--paper);
  background: var(--ink);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

html.is-modal-open {
  overflow: hidden;
  overscroll-behavior-y: none;
}

html.is-modal-open body {
  position: fixed;
  left: 0;
  right: 0;
  width: 100%;
  overflow: hidden;
  overscroll-behavior-y: none;
}

html.is-modal-dragging body {
  touch-action: none;
}

main {
  width: 100%;
}

a { color: inherit; }

.container {
  box-sizing: border-box;
  width: 100%;
  max-width: 1140px;
  margin-inline: auto;
  padding-inline: 0.75rem;
}

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(18, 21, 28, 0.88);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
  /* Пропускаем скролл сквозь фон; кликабельны только ссылки и кнопки */
  pointer-events: none;
}

.header * {
  pointer-events: none;
}

.header :is(a, button) {
  pointer-events: auto;
}

.header__inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  height: 100%;
}

.header .logo { width: 40px; flex-shrink: 0; }

.header__proof {
  margin: 0 0 0 auto;
  display: flex;
  align-items: baseline;
  gap: 0.45rem;
  flex-shrink: 0;
  font-family: var(--font-mono);
  white-space: nowrap;
}

.header__proof-num {
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--paper);
}

.header__proof-plus {
  color: var(--accent);
}

.header__proof-detail {
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.header__nav {
  flex-shrink: 0;
}

.header__nav a {
  text-decoration: none;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--muted);
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease), background 0.2s var(--ease);
}

.header__nav a:hover,
.header__nav a:focus-visible {
  color: var(--paper);
  border-color: rgba(236, 234, 228, 0.35);
  background: var(--surface);
  outline: none;
}

/* Hero */
.hero {
  padding: clamp(2.25rem, 7vw, 4.5rem) 0 clamp(1.75rem, 4vw, 2.75rem);
  overflow: visible;
}

.hero__statement {
  margin: 0;
  max-width: 20em;
  font-family: var(--font-hero);
  font-size: clamp(1.75rem, 5vw, 2.875rem);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--paper);
  font-synthesis: none;
}

.hero__lead {
  display: block;
}

.hero__arc {
  display: block;
  margin-top: 0.42em;
  font-family: var(--font-body);
  font-size: clamp(1.35rem, 3vw, 2rem);
  font-weight: 400;
  line-height: 1.18;
  letter-spacing: -0.025em;
  color: var(--muted);
}

.hero__arc .tagline-tip__term {
  color: var(--paper);
  font-weight: 500;
}

.hero__era {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-top: clamp(1.5rem, 4vw, 2.25rem);
  max-width: 28rem;
}

.hero__era-year {
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.hero__era-year--now {
  color: var(--accent);
}

.hero__era-track {
  flex: 1;
  position: relative;
  height: 1px;
  background: var(--border);
}

.hero__era-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 100%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(55, 145, 255, 0.15) 55%,
    var(--accent) 100%
  );
  transform-origin: left center;
  animation: hero-era-draw 1.1s var(--ease) both;
}

@keyframes hero-era-draw {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

/* Tagline tooltips */
.tagline-tip {
  position: relative;
  display: inline;
  white-space: nowrap;
}

.tagline-tip__term {
  white-space: nowrap;
}

.tagline-tip__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 1.125rem;
  height: 1.125rem;
  margin-inline: 0.12em 0;
  padding: 0;
  vertical-align: text-top;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-style: normal;
  font-weight: 500;
  line-height: 1;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(55, 145, 255, 0.14);
  border: 1px solid rgba(55, 145, 255, 0.4);
  border-radius: 50%;
  cursor: help;
  appearance: none;
  -webkit-appearance: none;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s var(--ease), color 0.15s var(--ease), border-color 0.15s var(--ease);
}

.tagline-tip__btn:hover,
.tagline-tip__btn.is-open {
  background: rgba(55, 145, 255, 0.3);
  border-color: rgba(55, 145, 255, 0.7);
  color: var(--paper);
}

.tagline-tip__btn:focus,
.tagline-tip__btn:focus-visible,
.tagline-tip__btn:active {
  outline: none;
  box-shadow: none;
}

.tagline-floating-tip {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 160;
  width: max-content;
  max-width: min(22rem, calc(100vw - 1.5rem));
  padding: 0.7rem 0.85rem;
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-style: normal;
  font-weight: 400;
  line-height: 1.45;
  color: var(--paper);
  background: var(--surface-raised);
  border: 1px solid rgba(236, 234, 228, 0.14);
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate3d(var(--tip-x, -9999px), var(--tip-y, -9999px), 0);
  transition: opacity 0.15s var(--ease), visibility 0.15s;
}

.tagline-floating-tip.is-visible {
  opacity: 1;
  visibility: visible;
}

.tagline-floating-tip::after {
  content: "";
  position: absolute;
  left: var(--tip-arrow-x, 50%);
  border: 6px solid transparent;
}

.tagline-floating-tip[data-placement="top"]::after {
  top: 100%;
  transform: translateX(-50%);
  border-top-color: var(--surface-raised);
}

.tagline-floating-tip[data-placement="bottom"]::after {
  bottom: 100%;
  transform: translateX(-50%);
  border-bottom-color: var(--surface-raised);
}

/* Timeline sticky block */
.timeline-bar {
  position: relative;
  z-index: 90;
  background: rgba(26, 32, 48, 0.95);
  border-block: 1px solid var(--border);
  backdrop-filter: blur(12px);
  padding: 0.85rem 0;
  --tl-text: #9aa3b2;
  --tl-track-line: rgba(236, 234, 228, 0.17);
  --tl-ind-auto: #72a0f2;
  --tl-ind-retail: #d08f68;
  --tl-ind-finance: #85d4b9;
  --tl-ind-edu: #c095de;
  --tl-ind-realty: #ddb965;
  --tl-ind-other: #727a8a;
  /* Не перехватывать скролл над списком проектов под плавающей панелью */
  pointer-events: none;
}

.timeline-bar-slot {
  position: relative;
}

.timeline-bar.is-pinned {
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
}

.timeline-bar * {
  pointer-events: none;
}

.timeline-bar :is(button, input) {
  pointer-events: auto;
}

.timeline-bar__inner {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.timeline-bar__row {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.timeline-bar__dots-wrap {
  flex: 1;
  min-width: 0;
  position: relative;
  height: 24px;
}

.timeline-bar__track {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: var(--tl-track-line);
  transform: translateY(-50%);
}

.timeline-bar__dots {
  position: absolute;
  inset: 0;
}

.timeline-dot-group {
  position: absolute;
  top: 50%;
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
  touch-action: pan-y;
  transform: translateY(-50%);
  transition: opacity 0.2s var(--ease);
}

.timeline-dot-group:focus-visible {
  outline: none;
}

.timeline-dot-group:focus-visible .timeline-dot {
  box-shadow: 0 0 0 2px var(--ink), 0 0 0 3px var(--paper);
}

.timeline-dot-group:hover .timeline-dot,
.timeline-dot-group:focus-visible .timeline-dot {
  transform: translate(calc(-50% + var(--stack-x)), calc(-50% + var(--stack-y))) scale(1.6);
}

.timeline-dot-group.is-dimmed { opacity: 0.7; }

.timeline-dot-group.is-focused .timeline-dot {
  transform: translate(calc(-50% + var(--stack-x)), calc(-50% + var(--stack-y))) scale(1.35);
  box-shadow: 0 0 0 2px var(--ink), 0 0 0 3px var(--paper);
}

.timeline-dot-group.is-focused { z-index: 15; }

.timeline-dot-group:hover { z-index: 20; }

.timeline-dot {
  --stack-x: 0px;
  --stack-y: 0px;
  position: absolute;
  top: 50%;
  left: 50%;
  width: 7px;
  height: 7px;
  margin-left: -3.5px;
  border-radius: 50%;
  pointer-events: none;
  transform: translate(calc(-50% + var(--stack-x)), calc(-50% + var(--stack-y)));
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.timeline-dot[data-industry="Автомобили"] { background: var(--tl-ind-auto); }
.timeline-dot[data-industry="Ритейл"] { background: var(--tl-ind-retail); }
.timeline-dot[data-industry="Финансы"] { background: var(--tl-ind-finance); }
.timeline-dot[data-industry="Образование"] { background: var(--tl-ind-edu); }
.timeline-dot[data-industry="Недвижимость"] { background: var(--tl-ind-realty); }
.timeline-dot[data-industry=""] { background: var(--tl-ind-other); }

.timeline-bar__legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.85rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--tl-text);
  letter-spacing: 0.03em;
}

.timeline-bar__legend-item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.timeline-bar__legend-item::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.timeline-bar__legend-item[data-industry="Автомобили"]::before { background: var(--tl-ind-auto); }
.timeline-bar__legend-item[data-industry="Ритейл"]::before { background: var(--tl-ind-retail); }
.timeline-bar__legend-item[data-industry="Финансы"]::before { background: var(--tl-ind-finance); }
.timeline-bar__legend-item[data-industry="Образование"]::before { background: var(--tl-ind-edu); }
.timeline-bar__legend-item[data-industry="Недвижимость"]::before { background: var(--tl-ind-realty); }
.timeline-bar__legend-item[data-industry=""]::before { background: var(--tl-ind-other); }

.timeline-bar__controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.timeline-bar__year-pill {
  flex-shrink: 0;
  min-width: 4.5rem;
  padding: 0.35rem 0.65rem;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 500;
  text-align: center;
  color: var(--paper);
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: 6px;
}

.timeline-bar__scrubber {
  flex: 1;
  min-width: 0;
  height: 28px;
  margin: 0;
  accent-color: var(--accent);
  cursor: pointer;
  touch-action: pan-x;
}

.timeline-bar__stat {
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--tl-text);
  text-align: right;
}

.timeline-bar__stat strong { color: var(--paper); font-weight: 500; }

/* Works */
.works {
  padding: 1rem 0 2rem;
}

.year-section {
  margin-bottom: 2.75rem;
  transition: opacity 0.25s var(--ease);
}

.year-section.is-dimmed { opacity: 0.7; }
.year-section.is-focused .year-section__heading { color: var(--paper); }

.year-section__heading {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 0 0 1rem;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.25s var(--ease);
}

.year-section__heading span {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 400;
  letter-spacing: -0.02em;
}

.year-section__heading::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.year-section__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
}

.work-card {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 1rem 1rem 1rem 1.15rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  border-left: 3px solid var(--ind-other);
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: inherit;
  transition: opacity 0.25s var(--ease), border-color 0.2s var(--ease), transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.work-card[data-industry="Автомобили"] { border-left-color: var(--ind-auto); }
.work-card[data-industry="Ритейл"] { border-left-color: var(--ind-retail); }
.work-card[data-industry="Финансы"] { border-left-color: var(--ind-finance); }
.work-card[data-industry="Образование"] { border-left-color: var(--ind-edu); }
.work-card[data-industry="Недвижимость"] { border-left-color: var(--ind-realty); }

.work-card.is-dimmed { opacity: 0.7; }
.work-card.is-focused {
  opacity: 1;
  border-top-color: rgba(236, 234, 228, 0.25);
  border-right-color: rgba(236, 234, 228, 0.25);
  border-bottom-color: rgba(236, 234, 228, 0.25);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
}

.work-card:hover,
.work-card:focus-visible {
  border-top-color: rgba(236, 234, 228, 0.2);
  border-right-color: rgba(236, 234, 228, 0.2);
  border-bottom-color: rgba(236, 234, 228, 0.2);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
  outline: none;
}

.work-card__logo {
  height: 36px;
  display: flex;
  align-items: center;
}

.work-card__logo img {
  max-height: 32px;
  max-width: 100%;
  object-fit: contain;
  filter: grayscale(0.3) brightness(1.15);
}

.work-card__logo-placeholder {
  width: 36px;
  height: 24px;
  background: var(--surface-raised);
  border-radius: 3px;
}

.work-card__client {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.35;
}

.work-card__meta {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--muted);
}

.works-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--muted);
  font-size: 0.9375rem;
  border: 1px dashed var(--border);
  border-radius: 4px;
}

/* Contact */
.contact {
  padding: 0 0 clamp(3rem, 8vw, 5rem);
  scroll-margin-top: calc(var(--header-h) + 1rem);
}

.contact__bridge {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: clamp(2rem, 5vw, 3rem);
  max-width: 28rem;
}

.contact__bridge-year,
.contact__bridge-label {
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.contact__bridge-label {
  color: var(--accent);
}

.contact__bridge-track {
  flex: 1;
  position: relative;
  height: 1px;
  background: var(--border);
}

.contact__bridge-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 100%;
  background: linear-gradient(
    90deg,
    rgba(55, 145, 255, 0.2) 0%,
    var(--accent) 72%,
    rgba(236, 234, 228, 0.55) 100%
  );
  transform-origin: left center;
  animation: contact-bridge-draw 1.2s var(--ease) both;
  animation-delay: 0.15s;
}

@keyframes contact-bridge-draw {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

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

.contact__eyebrow {
  margin: 0 0 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.contact__title {
  margin: 0;
  max-width: 9em;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3.8vw, 2.125rem);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--paper);
}

.contact__lead {
  margin: 1rem 0 0;
  max-width: 26em;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--muted);
}

.contact__mail {
  display: inline-block;
  margin-top: 1.35rem;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(55, 145, 255, 0.35);
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease);
}

.contact__mail:hover,
.contact__mail:focus-visible {
  color: var(--paper);
  border-bottom-color: rgba(236, 234, 228, 0.45);
  outline: none;
}

.contact__panel {
  padding: clamp(1.15rem, 3vw, 1.5rem);
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 4px;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.22);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.contact-form__intents {
  margin: 0;
  padding: 0;
  border: none;
}

.contact-form__intents-label {
  display: block;
  margin-bottom: 0.55rem;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.contact-form__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.contact-form__chip {
  cursor: pointer;
}

.contact-form__chip input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.contact-form__chip span {
  display: inline-block;
  padding: 0.4rem 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--muted);
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: 999px;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease), background 0.2s var(--ease);
}

.contact-form__chip input:checked + span {
  color: var(--paper);
  background: rgba(55, 145, 255, 0.14);
  border-color: rgba(55, 145, 255, 0.45);
}

.contact-form__chip input:focus-visible + span {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.contact-form__chip:hover span {
  border-color: rgba(236, 234, 228, 0.22);
  color: var(--paper);
}

.contact-form__fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem 0.75rem;
}

.contact-form__field {
  position: relative;
}

.contact-form__field--wide {
  grid-column: 1 / -1;
}

.contact-form__input {
  width: 100%;
  padding: 1.15rem 0.85rem 0.45rem;
  font: inherit;
  font-size: 0.9375rem;
  color: var(--paper);
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: 6px;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.contact-form__textarea {
  min-height: 5.5rem;
  resize: vertical;
  line-height: 1.5;
}

.contact-form__label {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.9375rem;
  color: var(--muted);
  pointer-events: none;
  transform-origin: left top;
  transition: transform 0.2s var(--ease), font-size 0.2s var(--ease), color 0.2s var(--ease), top 0.2s var(--ease);
}

.contact-form__field--wide .contact-form__label {
  top: 1rem;
  transform: none;
}

.contact-form__input:focus,
.contact-form__input:not(:placeholder-shown) {
  outline: none;
}

.contact-form__input:focus {
  border-color: rgba(55, 145, 255, 0.55);
  box-shadow: 0 0 0 3px rgba(55, 145, 255, 0.12);
}

.contact-form__input:focus + .contact-form__label,
.contact-form__input:not(:placeholder-shown) + .contact-form__label {
  top: 0.45rem;
  transform: translateY(0) scale(0.78);
  color: var(--accent);
}

.contact-form__field--wide .contact-form__input:focus + .contact-form__label,
.contact-form__field--wide .contact-form__input:not(:placeholder-shown) + .contact-form__label {
  top: 0.4rem;
  transform: scale(0.78);
}

.contact-form__input.is-invalid {
  border-color: rgba(255, 120, 120, 0.55);
}

.contact-form__input.is-invalid:focus {
  box-shadow: 0 0 0 3px rgba(255, 120, 120, 0.12);
}

.contact-form__consent {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--muted);
  cursor: pointer;
}

.contact-form__consent input {
  margin-top: 0.15rem;
  width: 1rem;
  height: 1rem;
  accent-color: var(--accent);
  flex-shrink: 0;
}

.contact-form__consent a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.contact-form__consent.is-invalid {
  color: #ff9a9a;
}

.contact-form__consent-hint {
  margin: -0.5rem 0 0;
  font-size: 0.8125rem;
  color: #ff9a9a;
}

.contact-form__submit {
  align-self: flex-start;
  padding: 0.75rem 1.35rem;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink);
  background: var(--paper);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease);
}

.contact-form__submit:hover:not(:disabled),
.contact-form__submit:focus-visible:not(:disabled) {
  opacity: 0.92;
  transform: translateY(-1px);
  outline: none;
}

.contact-form__submit:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.contact-form__feedback {
  margin: 0;
  font-size: 0.875rem;
  padding: 0.65rem 0.85rem;
  border-radius: 6px;
}

.contact-form__feedback.is-pending {
  color: var(--muted);
  background: rgba(236, 234, 228, 0.05);
}

.contact-form__feedback.is-success {
  color: #a8ddb8;
  background: rgba(107, 201, 168, 0.12);
  border: 1px solid rgba(107, 201, 168, 0.25);
}

.contact-form__feedback.is-error {
  color: #ffb1b1;
  background: rgba(255, 107, 107, 0.1);
  border: 1px solid rgba(255, 107, 107, 0.22);
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s var(--ease), visibility 0.25s;
}

.modal-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.modal {
  display: grid;
  grid-template-rows: auto 1fr auto;
  width: min(860px, 100%);
  max-height: min(88vh, 680px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  transform: scale(0.97) translateY(8px);
  opacity: 0;
  transition: transform 0.28s var(--ease), opacity 0.28s var(--ease);
}

.modal-overlay.is-open .modal {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.modal__header {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  align-items: center;
  gap: 0.25rem 0.75rem;
  padding: 1.1rem 1.25rem 0.85rem;
  border-bottom: 1px solid var(--border);
}

.modal__handle { display: none; }

.modal__title {
  grid-column: 1;
  grid-row: 1;
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.25rem;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.01em;
  padding-right: 0.5rem;
}

.modal__close {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: start;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--muted);
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}

.modal__close:hover,
.modal__close:focus-visible {
  color: var(--paper);
  border-color: rgba(236, 234, 228, 0.25);
  outline: none;
}

.modal__body {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  min-height: 0;
  overflow: hidden;
}

.modal__gallery {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: 1rem 0.75rem 1rem 1.25rem;
  min-width: 0;
  border-right: 1px solid var(--border);
}

.modal__gallery[hidden] { display: none; }

.modal__gallery[hidden] + .modal__details {
  grid-column: 1 / -1;
}

.modal__image-main {
  aspect-ratio: 16 / 10;
  background: var(--ink);
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.modal__image-main--swipeable {
  touch-action: pan-y;
  cursor: grab;
  -webkit-user-select: none;
  user-select: none;
}

.modal__image-main--swipeable.is-grabbing {
  touch-action: none;
  cursor: grabbing;
}

.modal__slider {
  display: flex;
  height: 100%;
  will-change: transform;
  transition: transform 0.38s cubic-bezier(0.22, 1, 0.36, 1);
}

.modal__slider.is-dragging {
  transition: none;
}

.modal__slide {
  flex: 0 0 100%;
  width: 100%;
  min-width: 0;
  height: 100%;
  margin: 0;
}

.modal__image-main > img,
.modal__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
  -webkit-user-drag: none;
  user-select: none;
}

@media (prefers-reduced-motion: reduce) {
  .modal__slider {
    transition: none;
  }
}

.modal__thumbs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.modal__thumb {
  width: 52px;
  height: 34px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 4px;
  background: var(--ink);
  cursor: pointer;
  overflow: hidden;
}

.modal__thumb.is-active { border-color: var(--accent); }
.modal__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.modal__thumb:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.modal__details {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding: 1rem 1.25rem 1.25rem 0.85rem;
  min-width: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.modal__meta {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--muted);
}

.modal__desc {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: rgba(236, 234, 228, 0.9);
}

.modal__desc[hidden] { display: none; }

.modal__block:empty { display: none; }

.modal__block-label {
  margin: 0 0 0.25rem;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.modal__block-value {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.5;
}

.modal__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: auto;
}

.modal__tags[hidden] { display: none; }

.modal__tag {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  padding: 0.25rem 0.55rem;
  border-radius: 4px;
  background: var(--surface-raised);
  color: var(--muted);
}

.modal__footer {
  display: flex;
  justify-content: flex-end;
  padding: 0.85rem 1.25rem;
  border-top: 1px solid var(--border);
  background: var(--surface-raised);
}

.modal__footer[hidden] { display: none; }

.modal__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.15rem;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--ink);
  background: var(--paper);
  border-radius: 8px;
  transition: opacity 0.15s;
}

.modal__link[hidden] { display: none; }

.modal__link:hover,
.modal__link:focus-visible {
  opacity: 0.9;
  outline: none;
}

.footer {
  padding: 2rem 0 2.5rem;
  border-top: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--muted);
}

.footer p { margin: 0; }

@media (min-width: 640px) {
  .container { padding-inline: 1rem; }
}

@media (min-width: 1280px) {
  .container { max-width: 1200px; }
}

@media (max-width: 900px) {
  .year-section__grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 639px) {
  :root { --header-h: 52px; }

  .header__proof-detail {
    display: none;
  }

  .hero__statement {
    max-width: none;
    font-size: clamp(1.5rem, 6.5vw, 2.125rem);
    line-height: 1.22;
    letter-spacing: -0.02em;
  }

  .hero__arc {
    margin-top: 0.55em;
    font-size: clamp(1.375rem, 6vw, 1.625rem);
    line-height: 1.16;
    letter-spacing: -0.025em;
  }

  .hero__era {
    max-width: none;
    margin-top: 3.35rem;
  }

  .tagline-tip__btn {
    width: 1.375rem;
    height: 1.375rem;
    font-size: 0.6875rem;
  }

  .tagline-floating-tip {
    max-width: min(17.5rem, calc(100vw - 1.5rem));
    padding: 0.55rem 0.7rem;
    font-size: 0.75rem;
    line-height: 1.4;
  }

  .timeline-bar__dots-wrap,
  .timeline-bar__legend {
    display: none;
  }

  .timeline-bar { padding: 0.65rem 0; }

  .timeline-bar__controls { flex-wrap: wrap; }

  .timeline-bar__year-pill {
    order: -1;
    width: 100%;
    min-width: 0;
    font-size: 0.9375rem;
    padding: 0.5rem;
  }

  .timeline-bar__scrubber {
    width: 100%;
    height: 36px;
  }

  .timeline-bar__stat {
    width: 100%;
    text-align: left;
  }

  .year-section__grid { grid-template-columns: 1fr; }

  .contact__layout {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }

  .contact__bridge {
    max-width: none;
  }

  .contact-form__fields {
    grid-template-columns: 1fr;
  }

  .contact-form__submit {
    width: 100%;
    align-self: stretch;
    padding: 0.9rem 1.15rem;
  }

  .work-card {
    flex-direction: row;
    align-items: center;
    gap: 0.85rem;
    padding: 0.85rem 1rem;
  }

  .work-card__logo {
    height: auto;
    flex-shrink: 0;
    width: 48px;
  }

  .work-card__body { flex: 1; min-width: 0; }

  /* Modal — mobile bottom sheet */
  .modal-overlay {
    align-items: flex-end;
    justify-content: center;
    padding: 0;
    backdrop-filter: none;
    overflow: hidden;
    overscroll-behavior: none;
    touch-action: none;
  }

  .modal-overlay.is-open .modal__body {
    touch-action: pan-y;
  }

  .modal {
    width: 100%;
    max-width: 100%;
    max-height: 92dvh;
    height: auto;
    border-radius: 16px 16px 0 0;
    border-bottom: none;
    border-left: none;
    border-right: none;
    grid-template-rows: auto minmax(0, 1fr) auto;
    transform: translateY(100%);
  }

  .modal-overlay.is-open .modal {
    transform: translateY(0);
  }

  .modal.is-dragging,
  .modal-overlay.is-dragging {
    transition: none !important;
  }

  .modal__header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.6rem 1.25rem 0.75rem;
    padding-top: max(0.6rem, env(safe-area-inset-top));
    touch-action: none;
    -webkit-user-select: none;
    user-select: none;
  }

  .modal__handle {
    display: block;
    flex: 0 0 100%;
    width: 36px;
    height: 4px;
    margin: 0 auto 0.15rem;
    border-radius: 2px;
    background: rgba(236, 234, 228, 0.2);
  }

  .modal__title {
    flex: 1;
    font-size: 1.125rem;
    padding-right: 0;
    min-width: 0;
  }

  .modal__close {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    font-size: 1.25rem;
  }

  .modal__body {
    grid-template-columns: 1fr;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
  }

  .modal.is-dragging .modal__body {
    overflow: hidden;
    touch-action: none;
  }

  .modal__gallery {
    padding: 0;
    border-right: none;
    gap: 0;
    min-width: 0;
  }

  .modal__image-main {
    aspect-ratio: 16 / 10;
    border-radius: 0;
    border: none;
    border-bottom: 1px solid var(--border);
  }

  .modal__thumbs {
    padding: 0.65rem 1.25rem;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .modal__details {
    padding: 1.15rem 1.25rem 1.25rem;
    overflow: visible;
    overflow-wrap: anywhere;
    word-break: break-word;
    min-width: 0;
  }

  .modal__footer {
    justify-content: stretch;
    padding: 0.75rem 1.25rem;
    padding-bottom: max(0.85rem, env(safe-area-inset-bottom));
  }

  .modal__link {
    display: flex;
    width: 100%;
    padding: 0.9rem 1.15rem;
    font-size: 0.9375rem;
    border-radius: 10px;
  }
}

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

  *, *::before, *::after {
    transition-duration: 0.01ms !important;
  }

  .hero__era-fill {
    animation: none;
    transform: none;
  }

  .contact__bridge-fill {
    animation: none;
    transform: none;
  }

  .modal { transform: none !important; }
  .modal-overlay.is-open .modal { transform: none !important; opacity: 1 !important; }
}
