/* ==========================================================================
   CANONICAL BRAND DESIGN SYSTEM — SPACE4YOU v2.1 EDITION
   Applied to Stanislav Pyatetsky Personal Brand & Isolated C-Level Landings
   Source of Truth: D:\Я\harness\design_system\SPACE4YOU.md & space4you_brandbook.html
   Rules:
   1. Fonts: ONLY Manrope (400..800) + JetBrains Mono. Zero Inter / Space Grotesk.
   2. Colors: Carbon #0A0A0C, Surface #121316, Ink #FAFAFA, Muted #A1A1AA, Sole Signal #FF5500.
   3. Buttons: Carbon #0A0A0C text on Signal #FF5500 background (6.5:1 AA). Never white on orange.
   4. Logos: Outlined SVG files only (wordmark >= 24px on desktop, 22%-radius tile >= 16px on mobile).
   ========================================================================== */

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

:root,
[data-theme="dark"] {
  --carbon: #0A0A0C;
  --surface: #121316;
  --elevated: #181A1F;
  --bg-canvas: #0A0A0C;
  --bg-surface: #121316;
  --bg-elevated: #181A1F;
  --bg-glass: rgba(10, 10, 12, 0.90);
  --text-primary: #FAFAFA;
  --text-secondary: #A1A1AA;
  --text-muted: #A1A1AA;
  --text-dim: #71717A;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --accent-primary: #FF5500;
  --accent-hover: #FF6B1A;
  --accent-soft: rgba(255, 85, 0, 0.12);
  --accent-border: rgba(255, 85, 0, 0.28);
  --shadow-card: none;
  --shadow-elevated: 0 18px 44px rgba(0, 0, 0, 0.60);
  --shadow-drawer: -20px 0 56px rgba(0, 0, 0, 0.72);
  --font-sans: 'Manrope', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --radius-sm: 6px;
  --radius-md: 14px;
  --radius-lg: 14px;
}

[data-theme="light"] {
  --bg-canvas: #FFFFFF;
  --bg-surface: #FAFAFA;
  --bg-elevated: #F4F4F5;
  --bg-glass: rgba(255, 255, 255, 0.92);
  --text-primary: #09090B;
  --text-secondary: #52525B;
  --text-muted: #52525B;
  --text-dim: #71717A;
  --border-subtle: #E4E4E7;
  --border-strong: #D4D4D8;
  --accent-primary: #FF5500;
  --accent-hover: #E64D00;
  --accent-soft: rgba(255, 85, 0, 0.10);
  --accent-border: rgba(255, 85, 0, 0.30);
  --shadow-card: none;
  --shadow-elevated: 0 12px 32px rgba(9, 9, 11, 0.08);
  --shadow-drawer: -16px 0 48px rgba(9, 9, 11, 0.14);
}

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

html {
  scroll-behavior: smooth;
  font-size: 15.5px;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  line-height: 1.62;
  transition: background-color 0.18s ease, color 0.18s ease;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

code {
  font-family: var(--font-mono);
  font-size: 0.92em;
}

/* ==========================================================================
   LAYOUT & CONTAINERS (MAX 1200PX PER BRANDBOOK)
   ========================================================================== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 26px;
}

.section {
  padding: 64px 0;
  border-top: 1px solid var(--border-subtle);
}

.section-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 18px;
  margin-bottom: 32px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--accent-primary);
  margin-bottom: 14px;
}

.eyebrow::before {
  content: "";
  display: inline-block;
  width: 22px;
  height: 1px;
  background-color: var(--accent-primary);
}

.section-title {
  font-size: clamp(1.5rem, 2.6vw, 2.05rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.12;
  color: var(--text-primary);
  max-width: 34ch;
}

.section-subtitle {
  font-size: 15px;
  color: var(--text-secondary);
  max-width: 68ch;
  margin-top: 12px;
  line-height: 1.62;
}

/* ==========================================================================
   TOP NAVIGATION BAR & CANONICAL SVG LOCKUPS (NO SIGN BEFORE WORDMARK)
   ========================================================================== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 90;
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  gap: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

/* Wordmark >= 24px per SPACE4YOU.md §1 & §3 */
.brand-wordmark {
  height: 24px;
  width: auto;
  display: block;
}

[data-theme="dark"] .brand-wordmark-light {
  display: none;
}

[data-theme="light"] .brand-wordmark-dark {
  display: none;
}

/* Compact tile СП. (22% radius, no border) — hidden on desktop, shown on mobile <= 760px */
.brand-tile {
  display: none;
  width: 34px;
  height: 34px;
  flex-shrink: 0;
}

.brand-chip {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 4px 9px;
  color: var(--text-secondary);
  white-space: nowrap;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-left: auto;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-secondary);
}

.nav-links a:hover {
  color: var(--text-primary);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ==========================================================================
   BUTTONS & CONTROLS (CARBON #0A0A0C ON SIGNAL #FF5500 = 6.5:1 AA)
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 15px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 700;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--bg-surface);
  color: var(--text-primary);
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}

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

/* STRICT CANON: #0A0A0C text on #FF5500 background — NEVER white text */
.btn-primary {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: #0A0A0C !important;
  font-weight: 800;
}

.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: #0A0A0C !important;
}

.btn-sm {
  padding: 7px 12px;
  font-size: 12px;
}

.icobtn {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  flex-shrink: 0;
}

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

.mode-switch {
  display: inline-flex;
  background: var(--bg-surface);
  padding: 3px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
}

.mode-switch button {
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.mode-switch button.active {
  background: var(--accent-primary);
  color: #0A0A0C;
  font-weight: 800;
}

/* ==========================================================================
   HERO BLOCK & IMPACT STRIP
   ========================================================================== */
.hero {
  padding: 56px 0 60px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.35fr 0.65fr;
  gap: 44px;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-primary);
  margin-bottom: 18px;
}

.hero-badge::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--accent-primary);
}

.hero-title {
  font-size: clamp(2.1rem, 4vw, 3.15rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.06;
  margin-bottom: 18px;
}

.hero-title em {
  font-style: normal;
  color: var(--accent-primary);
}

.hero-lead {
  font-size: 16px;
  color: var(--text-secondary);
  max-width: 64ch;
  margin-bottom: 26px;
  line-height: 1.62;
}

.hero-lead strong {
  color: var(--text-primary);
  font-weight: 600;
}

.hero-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 26px;
}

.hero-meta-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 5px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.04em;
  background: var(--bg-surface);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
}

.tag-accent {
  background: var(--accent-soft);
  color: var(--accent-primary);
  border-color: var(--accent-border);
}

.hero-portrait-card {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
}

.hero-portrait-card img {
  width: 100%;
  height: 410px;
  object-fit: cover;
  object-position: center 18%;
  display: block;
}

.hero-portrait-caption {
  padding: 12px 16px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-secondary);
  background: var(--bg-surface);
}

.impact-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 38px;
}

.impact-strip.cols-6 {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.kpi-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px;
  transition: border-color 0.16s ease;
}

.kpi-card:hover {
  border-color: var(--border-strong);
}

.kpi-value {
  font-family: var(--font-sans);
  font-size: clamp(1.45rem, 2.2vw, 1.85rem);
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 6px;
}

.kpi-label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-primary);
  margin-bottom: 6px;
}

.kpi-note {
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.48;
}

/* ==========================================================================
   CARDS & GRIDS
   ========================================================================== */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

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

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

.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  transition: border-color 0.16s ease, transform 0.16s ease;
}

.card-interactive {
  cursor: pointer;
}

.card-interactive:hover {
  border-color: var(--accent-primary);
  transform: translateY(-2px);
}

.card-top {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.card-metric {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--accent-primary);
  background: var(--accent-soft);
  padding: 3px 8px;
  border-radius: 4px;
  border: 1px solid var(--accent-border);
  text-transform: none;
}

.card-title {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--text-primary);
  line-height: 1.32;
}

.card-summary {
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.56;
  max-width: 66ch;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--accent-primary);
}

/* ==========================================================================
   FILTER PILLS (CARBON ON SIGNAL WHEN ACTIVE)
   ========================================================================== */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.filter-pill {
  padding: 7px 13px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--bg-surface);
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.filter-pill:hover {
  border-color: var(--accent-primary);
  color: var(--text-primary);
}

.filter-pill.active {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: #0A0A0C;
  font-weight: 800;
}

/* ==========================================================================
   TIMELINE (4 ERAS)
   ========================================================================== */
.timeline-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 230px 1fr auto;
  gap: 24px;
  align-items: center;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  cursor: pointer;
  transition: border-color 0.16s ease;
}

.timeline-item:hover {
  border-color: var(--accent-primary);
}

.timeline-period {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-primary);
}

.timeline-company {
  font-size: 12.5px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.timeline-role {
  font-size: 15.5px;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--text-primary);
  margin-bottom: 5px;
}

.timeline-brief {
  font-size: 13.5px;
  color: var(--text-secondary);
  max-width: 66ch;
}

/* ==========================================================================
   MEDIA GALLERY & PHOTO BANK
   ========================================================================== */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.photo-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.photo-card img {
  width: 100%;
  height: 230px;
  object-fit: cover;
  object-position: center 20%;
  display: block;
  transition: transform 0.25s ease;
}

.photo-card:hover img {
  transform: scale(1.03);
}

.photo-card-body {
  padding: 12px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  border-top: 1px solid var(--border-subtle);
}

/* ==========================================================================
   SLIDE-OVER DRAWER (480px) & BLOG READER (68ch)
   ========================================================================== */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 12, 0.72);
  backdrop-filter: blur(4px);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}

.drawer-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(500px, 100vw);
  background: var(--bg-surface);
  border-left: 1px solid var(--border-strong);
  box-shadow: var(--shadow-drawer);
  z-index: 210;
  transform: translateX(100%);
  transition: transform 0.26s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

.drawer.drawer-wide {
  width: min(780px, 100vw);
}

.drawer.open {
  transform: translateX(0);
}

.drawer-header {
  padding: 20px 26px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--bg-surface);
}

.drawer-body {
  padding: 26px;
  overflow-y: auto;
  flex: 1;
}

.drawer-section {
  margin-bottom: 22px;
}

.drawer-section-label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--accent-primary);
  margin-bottom: 8px;
}

.drawer-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.drawer-list li {
  position: relative;
  padding-left: 18px;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 68ch;
}

.drawer-list li strong {
  color: var(--text-primary);
}

.drawer-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 7px;
  height: 2px;
  background: var(--accent-primary);
}

/* Blog Reader <= 68ch Typography */
.blog-reader-content {
  max-width: 66ch;
  margin: 0 auto;
  font-size: 15.5px;
  line-height: 1.66;
  color: var(--text-primary);
}

.blog-reader-content h2 {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 28px 0 12px;
}

.blog-reader-content h3 {
  font-size: 1.12rem;
  font-weight: 700;
  margin: 22px 0 10px;
}

.blog-reader-content p {
  margin-bottom: 16px;
  color: var(--text-secondary);
}

.blog-reader-content p strong,
.blog-reader-content li strong {
  color: var(--text-primary);
}

.blog-reader-content ul {
  margin: 0 0 18px 20px;
  color: var(--text-secondary);
}

.blog-reader-content li {
  margin-bottom: 8px;
}

.blog-reader-content blockquote {
  border-left: 2px solid var(--accent-primary);
  padding: 6px 0 6px 16px;
  margin: 22px 0;
  font-weight: 600;
  color: var(--text-primary);
}

/* ==========================================================================
   PRINTABLE A4 EXECUTIVE CV VIEW
   ========================================================================== */
.cv-sheet {
  max-width: 920px;
  margin: 32px auto;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 44px 48px;
}

.cv-header {
  border-bottom: 2px solid var(--accent-primary);
  padding-bottom: 18px;
  margin-bottom: 22px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
}

.cv-name {
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: -0.025em;
}

.cv-target-role {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--accent-primary);
  margin-top: 4px;
}

.cv-contacts {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-secondary);
  text-align: right;
  line-height: 1.6;
}

.cv-block {
  margin-bottom: 22px;
}

.cv-block-title {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--accent-primary);
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 6px;
  margin-bottom: 12px;
}

.cv-job {
  margin-bottom: 16px;
}

.cv-job-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 4px;
}

.cv-job-company {
  font-weight: 700;
  font-size: 15px;
}

.cv-job-period {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 700;
  color: var(--accent-primary);
}

.cv-job-pos {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

/* ==========================================================================
   PIN GATE (MATCHING BRANDBOOK §06 PIN-GATE REFERENCE) & TOAST
   ========================================================================== */
.pin-overlay {
  position: fixed;
  inset: 0;
  background: #0A0A0C;
  color: #FAFAFA;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.pin-card {
  width: 100%;
  max-width: 390px;
  background: #121316;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 14px;
  padding: 34px 28px;
  text-align: center;
}

.pin-input {
  width: 190px;
  font-family: var(--font-mono);
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: 0.35em;
  text-align: center;
  padding: 10px 14px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: #181A1F;
  color: #FAFAFA;
  margin: 18px 0 10px;
}

.pin-input:focus {
  outline: none;
  border-color: #FF5500;
}

.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #FF5500;
  color: #0A0A0C;
  padding: 11px 18px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 800;
  box-shadow: var(--shadow-elevated);
  z-index: 600;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: all 0.2s ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   RESPONSIVE RULES (390PX MOBILE: COMPACT TILE СП., NO SHRINKING WORDMARK)
   ========================================================================== */
@media (max-width: 1080px) {
  .nav-links {
    display: none;
  }
  .hero-grid {
    grid-template-columns: 1fr;
  }
  .impact-strip,
  .impact-strip.cols-6 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .grid-3, .grid-4, .photo-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .timeline-item {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

@media (max-width: 760px) {
  /* Per SPACE4YOU.md §1 & §5: When space is tight (including 390px mobile),
     do NOT shrink wordmark below 24px — switch cleanly to the 34px square tile СП. */
  .brand-wordmark {
    display: none !important;
  }
  .brand-tile {
    display: block;
  }
}

@media (max-width: 640px) {
  .container {
    padding: 0 18px;
  }
  .impact-strip,
  .impact-strip.cols-6,
  .grid-2, .grid-3, .grid-4, .photo-grid {
    grid-template-columns: 1fr;
  }
  .brand-chip {
    display: none;
  }
  .cv-sheet {
    padding: 24px 18px;
  }
  .cv-header {
    flex-direction: column;
  }
  .cv-contacts {
    text-align: left;
  }
}

@media print {
  @page {
    size: A4 portrait;
    margin: 12mm 14mm;
  }
  body {
    background: #FFFFFF !important;
    color: #09090B !important;
    font-size: 9.5pt !important;
    line-height: 1.38 !important;
  }
  .topbar,
  .no-print,
  .drawer-backdrop,
  .drawer,
  .toast,
  .pin-overlay {
    display: none !important;
  }
  .landing-view-container {
    display: none !important;
  }
  .cv-view-container {
    display: block !important;
  }
  .cv-sheet {
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    background: #FFFFFF !important;
  }
  .drawer-list li {
    color: #27272A !important;
  }
  .drawer-list li strong,
  .cv-name,
  .cv-job-company {
    color: #09090B !important;
  }
}
