/* ==========================================================================
   PORTFOLIO DESIGN SYSTEM
   Developer: Халилов Мирзеахмед
   Dual-Theme System: Light (Default) & Dark (Obsidian/Graphite)
   React Bits patterns: SpotlightCard, DecryptedText, DotGrid.
   ========================================================================== */

/* ==========================================================================
   COLOR TOKENS & THEMES (Default: Light Mode)
   ========================================================================== */
:root {
  color-scheme: light dark;

  /* Typography scales - Instant loading with high-quality native fallbacks */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  /* Radii & Layout */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;
}

/* СВЕТЛАЯ ТЕМА (ПО УМОЛЧАНИЮ) */
:root,
[data-theme="light"] {
  color-scheme: light;

  /* Surfaces & Backgrounds */
  --bg-body: #f8fafc;
  --bg-card: #ffffff;
  --bg-card-hover: #f1f5f9;
  --bg-surface: #ffffff;
  --bg-surface-elevated: #f1f5f9;
  --header-bg: rgba(248, 250, 252, 0.88);

  /* Borders & Dividers */
  --border-subtle: rgba(15, 23, 42, 0.08);
  --border-medium: rgba(15, 23, 42, 0.14);
  --border-focus: rgba(37, 99, 235, 0.45);

  /* Typography */
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-dim: #94a3b8;

  /* Buttons */
  --btn-primary-bg: #0f172a;
  --btn-primary-text: #ffffff;
  --btn-primary-hover: #1e293b;
  --btn-sec-bg: #ffffff;
  --btn-sec-text: #0f172a;
  --btn-sec-border: rgba(15, 23, 42, 0.16);

  /* Functional Accents - Minimalist & Refined (No neon) */
  --accent-live: #0f172a;
  --accent-live-bg: rgba(15, 23, 42, 0.05);
  --accent-live-border: rgba(15, 23, 42, 0.12);
  --accent-tag: rgba(15, 23, 42, 0.04);
  --accent-tag-text: #334155;

  /* Spotlight parameters */
  --spotlight-size: 320px;
  --spotlight-intensity: 0.03;
  --spotlight-border-intensity: 0.16;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 4px 14px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 16px 32px rgba(15, 23, 42, 0.08);

  /* Banner & Price */
  --promo-banner-bg: var(--bg-surface-elevated);
  --promo-banner-border: var(--border-medium);
  --promo-text: var(--text-primary);
  --price-promo: var(--text-primary);
  --price-old: var(--text-dim);
  --discount-bg: rgba(15, 23, 42, 0.05);
  --discount-text: var(--text-secondary);
  --discount-border: var(--border-subtle);

  /* Chip active */
  --chip-active-bg: #0f172a;
  --chip-active-text: #ffffff;
  --chip-active-border: #0f172a;

  /* Badge guarantee */
  --guarantee-badge-bg: var(--bg-surface-elevated);
  --guarantee-badge-border: var(--border-medium);
  --guarantee-badge-text: var(--text-primary);

  /* Card preview banner */
  --card-preview-bg: #f1f5f9;
  --card-preview-border: rgba(15, 23, 42, 0.08);

  /* Modal backdrop */
  --backdrop-bg: rgba(15, 23, 42, 0.6);
}

/* ТЕМНАЯ ТЕМА */
[data-theme="dark"] {
  color-scheme: dark;

  /* Surfaces & Backgrounds */
  --bg-body: #0a0b0d;
  --bg-card: #121316;
  --bg-card-hover: #16181c;
  --bg-surface: #181a1f;
  --bg-surface-elevated: #202329;
  --header-bg: rgba(10, 11, 13, 0.85);

  /* Borders & Dividers */
  --border-subtle: rgba(255, 255, 255, 0.07);
  --border-medium: rgba(255, 255, 255, 0.12);
  --border-focus: rgba(255, 255, 255, 0.28);

  /* Typography */
  --text-primary: #f4f5f6;
  --text-secondary: #9da3ae;
  --text-muted: #646a78;
  --text-dim: #454954;

  /* Buttons */
  --btn-primary-bg: #ffffff;
  --btn-primary-text: #0c0d0e;
  --btn-primary-hover: #e5e7eb;
  --btn-sec-bg: var(--bg-surface);
  --btn-sec-text: #f4f5f6;
  --btn-sec-border: var(--border-medium);

  /* Functional Accents - Refined & Calm (No neon) */
  --accent-live: #f4f5f6;
  --accent-live-bg: rgba(255, 255, 255, 0.06);
  --accent-live-border: rgba(255, 255, 255, 0.14);
  --accent-tag: rgba(255, 255, 255, 0.05);
  --accent-tag-text: #d1d5db;

  /* Spotlight parameters */
  --spotlight-size: 320px;
  --spotlight-intensity: 0.06;
  --spotlight-border-intensity: 0.25;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.65);

  /* Banner & Price */
  --promo-banner-bg: var(--bg-surface-elevated);
  --promo-banner-border: var(--border-medium);
  --promo-text: var(--text-primary);
  --price-promo: #ffffff;
  --price-old: var(--text-dim);
  --discount-bg: rgba(255, 255, 255, 0.08);
  --discount-text: #d1d5db;
  --discount-border: var(--border-medium);

  /* Chip active */
  --chip-active-bg: #ffffff;
  --chip-active-text: #0c0d0e;
  --chip-active-border: #ffffff;

  /* Badge guarantee */
  --guarantee-badge-bg: var(--bg-surface-elevated);
  --guarantee-badge-border: var(--border-medium);
  --guarantee-badge-text: var(--text-primary);

  /* Card preview banner */
  --card-preview-bg: #0d0e11;
  --card-preview-border: var(--border-subtle);

  /* Modal backdrop */
  --backdrop-bg: rgba(0, 0, 0, 0.75);
}

/* Base Reset & Box Sizing */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  background-color: var(--bg-body);
  color: var(--text-primary);
  font-family: var(--font-sans);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.25s ease, color 0.25s ease;
}

body {
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  line-height: 1.6;
  background-color: var(--bg-body);
  color: var(--text-primary);
  transition: background-color 0.25s ease, color 0.25s ease;
}

/* Background Interactive Dot Grid (React Bits DotGrid pattern) */
#canvas-bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.75;
}

/* Layout Container */
.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 1.5rem;
  position: relative;
  z-index: 1;
}

/* ==========================================================================
   NAVIGATION BAR
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: var(--header-bg);
  border-bottom: 1px solid var(--border-subtle);
  transition: background 0.25s ease, border-color 0.25s ease;
}

.nav-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.brand-badge {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--text-primary);
  transition: opacity 0.15s ease;
}

.brand-badge:hover {
  opacity: 0.85;
}

.brand-name {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  transition: color 0.15s ease;
}

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

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Theme Toggle Button */
.theme-toggle-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  box-shadow: var(--shadow-sm);
}

.theme-toggle-btn:hover {
  color: var(--text-primary);
  border-color: var(--border-focus);
  background: var(--bg-surface-elevated);
  transform: translateY(-1px);
}

/* Default icon states (light theme is default: moon icon visible to switch to dark) */
.theme-icon-sun {
  display: none;
}

.theme-icon-moon {
  display: block;
}

/* Explicit theme icon states */
[data-theme="light"] .theme-icon-sun {
  display: none !important;
}
[data-theme="light"] .theme-icon-moon {
  display: block !important;
}
[data-theme="dark"] .theme-icon-sun {
  display: block !important;
}
[data-theme="dark"] .theme-icon-moon {
  display: none !important;
}

/* ==========================================================================
   BURGER BUTTON & MOBILE NAVIGATION DRAWER
   ========================================================================== */
.burger-btn {
  display: none;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  color: var(--text-secondary);
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  box-shadow: var(--shadow-sm);
  padding: 0;
}

.burger-btn:hover {
  color: var(--text-primary);
  border-color: var(--border-focus);
  background: var(--bg-surface-elevated);
  transform: translateY(-1px);
}

.burger-btn:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 2px;
}

.burger-box {
  width: 18px;
  height: 14px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.burger-line {
  display: block;
  width: 100%;
  height: 2px;
  background-color: currentColor;
  border-radius: 2px;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.2s ease;
  transform-origin: center;
}

/* Morphing Hamburger -> Cross */
.burger-btn.is-active .line-1,
.burger-btn[aria-expanded="true"] .line-1 {
  transform: translateY(6px) rotate(45deg);
}

.burger-btn.is-active .line-2,
.burger-btn[aria-expanded="true"] .line-2 {
  opacity: 0;
  transform: scaleX(0);
}

.burger-btn.is-active .line-3,
.burger-btn[aria-expanded="true"] .line-3 {
  transform: translateY(-6px) rotate(-45deg);
}

/* Mobile Nav Overlay */
.mobile-nav-overlay {
  position: fixed;
  inset: 0;
  background: var(--backdrop-bg);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 998;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-nav-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

/* Mobile Nav Drawer */
.mobile-nav-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(340px, 86vw);
  background: var(--bg-card);
  border-left: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-lg);
  z-index: 999;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1),
              visibility 0.32s cubic-bezier(0.16, 1, 0.3, 1);
  visibility: hidden;
  will-change: transform;
}

.mobile-nav-drawer.is-open {
  transform: translateX(0);
  visibility: visible;
}

.mobile-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.25rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
  padding-top: max(1.25rem, env(safe-area-inset-top));
}

.mobile-drawer-title-group {
  display: flex;
  flex-direction: column;
}

.mobile-drawer-brand {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

.mobile-drawer-subtitle {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.mobile-drawer-close {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.mobile-drawer-close:hover {
  color: var(--text-primary);
  border-color: var(--border-medium);
  transform: scale(1.05);
}

.mobile-drawer-close:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 2px;
}

.mobile-drawer-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 1rem 1.25rem;
  padding-bottom: max(1.5rem, env(safe-area-inset-bottom));
  gap: 1.25rem;
}

.mobile-nav-menu {
  flex: 1;
}

.mobile-nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.mobile-nav-link {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.75rem 0.85rem;
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--text-secondary);
  background: transparent;
  border: 1px solid transparent;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-nav-link:hover,
.mobile-nav-link:focus-visible {
  background: var(--bg-surface-elevated);
  border-color: var(--border-subtle);
  color: var(--text-primary);
  transform: translateX(2px);
}

.mobile-link-icon {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}

.mobile-link-content {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.mobile-link-title {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
}

.mobile-link-desc {
  font-size: 0.74rem;
  color: var(--text-muted);
  line-height: 1.3;
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mobile-link-arrow {
  color: var(--text-dim);
  transition: transform 0.2s ease, color 0.2s ease;
  flex-shrink: 0;
}

.mobile-nav-link:hover .mobile-link-arrow,
.mobile-nav-link:focus-visible .mobile-link-arrow {
  color: var(--text-primary);
  transform: translateX(2px);
}

.mobile-drawer-footer {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
}

.mobile-cta-btn {
  width: 100%;
  justify-content: center;
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  gap: 0.5rem;
}

.mobile-socials-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.mobile-social-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--text-secondary);
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  transition: all 0.2s ease;
}

.mobile-social-badge:hover {
  background: var(--bg-surface-elevated);
  color: var(--text-primary);
  border-color: var(--border-focus);
  transform: translateY(-1px);
}

/* Page body lock when mobile nav drawer is open */
body.mobile-nav-locked {
  overflow: hidden !important;
  touch-action: none;
}

/* ==========================================================================
   BUTTONS & TACTILE CONTROLS
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  font-size: 0.88rem;
  font-weight: 600;
  font-family: var(--font-sans);
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid transparent;
  user-select: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--btn-primary-bg);
  color: var(--btn-primary-text);
  border-color: var(--btn-primary-bg);
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background: var(--btn-primary-hover);
  border-color: var(--btn-primary-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: var(--btn-sec-bg);
  color: var(--btn-sec-text);
  border-color: var(--btn-sec-border);
}

.btn-secondary:hover {
  background: var(--bg-surface-elevated);
  border-color: var(--border-focus);
  transform: translateY(-1px);
}

.btn-icon {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: var(--shadow-sm);
}

.btn-icon:hover {
  color: var(--text-primary);
  border-color: var(--border-focus);
  background: var(--bg-surface-elevated);
  transform: translateY(-1px);
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero-section {
  padding: 5rem 0 3.5rem;
}

/* Hero Value Proposition Badges (Prominent & Refined) */
.hero-meta {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1.25rem;
  font-size: 0.92rem;
  font-weight: 500;
  line-height: 1.35;
  color: var(--text-primary);
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-sm);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
  letter-spacing: -0.01em;
}

[data-theme="dark"] .hero-badge {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

.hero-badge:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--text-primary);
}

[data-theme="dark"] .hero-badge:hover {
  border-color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.09);
}

/* Flagship Primary Badge (High Visual Contrast) */
.hero-badge.badge-flagship {
  background: #0f172a;
  color: #ffffff;
  border-color: #0f172a;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.16);
}

[data-theme="dark"] .hero-badge.badge-flagship {
  background: #ffffff;
  color: #0a0b0e;
  border-color: #ffffff;
  box-shadow: 0 4px 22px rgba(255, 255, 255, 0.22);
}

.hero-badge.badge-flagship:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(15, 23, 42, 0.25);
}

[data-theme="dark"] .hero-badge.badge-flagship:hover {
  background: #ffffff;
  box-shadow: 0 6px 28px rgba(255, 255, 255, 0.32);
}

.hero-title {
  font-size: clamp(2.1rem, 4.8vw, 3.6rem);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  margin-bottom: 1.25rem;
  max-width: 900px;
}

.hero-title .name-highlight {
  color: var(--text-primary);
  position: relative;
  display: inline-block;
  text-decoration: underline;
  text-decoration-color: var(--border-focus);
  text-underline-offset: 6px;
}

.decrypted-text {
  display: inline-block;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.hero-desc {
  font-size: 1.15rem;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 740px;
  margin-bottom: 2rem;
}

.hero-desc strong {
  color: var(--text-primary);
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* Bento Stats Matrix */
.stats-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-top: 3.5rem;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.35rem;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
  border-color: var(--border-medium);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.stat-value {
  font-family: var(--font-mono);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  display: flex;
  align-items: baseline;
  gap: 0.2rem;
}

.stat-suffix {
  font-size: 1rem;
  color: var(--text-muted);
  font-weight: 600;
}

.stat-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
  line-height: 1.45;
  font-weight: 500;
}

/* Promo Announcement Banner */
.promo-banner {
  background: var(--promo-banner-bg);
  border: 1px solid var(--promo-banner-border);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2.25rem;
  flex-wrap: wrap;
}

.promo-badge-text {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9rem;
  color: var(--promo-text);
  font-weight: 500;
}

.promo-pill {
  background: var(--btn-primary-bg);
  color: var(--btn-primary-text);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-sm);
}

.promo-spots {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-weight: 500;
}

.service-prices {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

.price-old {
  font-size: 0.85rem;
  color: var(--price-old);
  text-decoration: line-through;
  font-family: var(--font-mono);
}

.price-promo {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--price-promo);
  font-family: var(--font-mono);
}

.discount-badge {
  font-size: 0.7rem;
  font-family: var(--font-mono);
  font-weight: 600;
  background: var(--discount-bg);
  color: var(--discount-text);
  border: 1px solid var(--discount-border);
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
}

.service-benefit-badge {
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px dashed var(--border-subtle);
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* ==========================================================================
   SERVICES SECTION
   ========================================================================== */
.section {
  padding: 4.5rem 0;
  scroll-margin-top: 80px;
}

.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 2.25rem;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.section-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
}

.section-label::before {
  content: '//';
  color: var(--text-dim);
}

.section-title {
  font-size: 1.85rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.service-card {
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
}

.service-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-medium);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  margin-bottom: 1.15rem;
  transition: all 0.2s ease;
}

.service-card:hover .service-icon {
  background: var(--btn-primary-bg);
  color: var(--btn-primary-text);
  border-color: var(--btn-primary-bg);
}

.service-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.6rem;
}

.service-desc {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.service-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
}

.service-tag {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* ==========================================================================
   FEATURED LANDING SERVICE CARD (Выделенная карточка для новичков)
   ========================================================================== */
.service-card-featured {
  grid-column: span 2;
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  box-shadow: var(--shadow-md);
  padding: 2.25rem;
  border-radius: var(--radius-md);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

[data-theme="light"] .service-card-featured {
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border-color: rgba(15, 23, 42, 0.2);
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.06);
}

[data-theme="dark"] .service-card-featured {
  background: linear-gradient(180deg, #14161c 0%, #0d0e11 100%);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
}

.service-card-featured:hover {
  border-color: var(--border-focus);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.featured-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.featured-title-wrap {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.featured-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-medium);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.service-card-featured:hover .featured-icon {
  background: var(--btn-primary-bg);
  color: var(--btn-primary-text);
  border-color: var(--btn-primary-bg);
}

.featured-title {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  margin-bottom: 0.25rem;
}

.featured-subtitle {
  font-size: 0.92rem;
  color: var(--text-muted);
}

.featured-pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--btn-primary-bg);
  color: var(--btn-primary-text);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.35rem 0.8rem;
  border-radius: var(--radius-full);
  font-family: var(--font-mono);
  box-shadow: var(--shadow-sm);
}

/* Блок объяснения для тех, кто заказывает сайт впервые ("для незнающих") */
.landing-explainer-box {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 1.5rem;
  margin: 1.25rem 0 0;
}

.explainer-heading {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.explainer-heading svg {
  color: var(--text-muted);
}

.explainer-main-text {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 1.15rem;
}

.explainer-main-text strong {
  color: var(--text-primary);
}

.explainer-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.85rem;
  margin-bottom: 0;
}

.explainer-point {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  background: var(--bg-card);
  padding: 0.9rem 1.1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  transition: border-color var(--duration-fast) var(--ease-out), background-color var(--duration-fast) var(--ease-out);
}

.explainer-point:hover {
  border-color: var(--border-hover);
}

.point-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-xs);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--accent);
  flex-shrink: 0;
  margin-top: 0.05rem;
}

.point-icon svg {
  width: 17px;
  height: 17px;
}

.point-content {
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--text-secondary);
}

.point-content strong {
  display: block;
  color: var(--text-primary);
  font-size: 0.88rem;
  margin-bottom: 0.25rem;
}

/* ==========================================================================
   PORTFOLIO SECTION & SPOTLIGHT CARDS
   ========================================================================== */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-card);
  padding: 0.35rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  overflow-x: auto;
  box-shadow: var(--shadow-sm);
}

.filter-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 0.45rem 0.95rem;
  font-size: 0.82rem;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  font-weight: 500;
}

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

.filter-btn.active {
  background: var(--bg-surface-elevated);
  color: var(--text-primary);
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.5rem;
}

/* React Bits Spotlight Card effect */
.spotlight-card {
  --spotlight-x: 50%;
  --spotlight-y: 50%;
  --spotlight-opacity: 0;
  
  position: relative;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), 
              border-color 0.25s ease,
              box-shadow 0.25s ease;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
}

.portfolio-grid .spotlight-card {
  cursor: pointer;
}

.portfolio-grid .spotlight-card:hover {
  border-color: var(--border-medium);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

/* Radial light follower on card surface */
.spotlight-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    var(--spotlight-size) circle at var(--spotlight-x) var(--spotlight-y),
    rgba(255, 255, 255, var(--spotlight-intensity)),
    transparent 80%
  );
  opacity: var(--spotlight-opacity);
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 1;
}

/* Specular border sheen */
.spotlight-card::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: radial-gradient(
    220px circle at var(--spotlight-x) var(--spotlight-y),
    rgba(255, 255, 255, var(--spotlight-border-intensity)),
    transparent 70%
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: var(--spotlight-opacity);
  transition: opacity 0.3s ease;
  z-index: 2;
}

/* Card Graphic Banner / Screenshot Preview */
.card-preview {
  height: 200px;
  background: var(--card-preview-bg);
  border-bottom: 1px solid var(--card-preview-border);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.card-preview.has-image {
  padding: 0;
}

.card-preview-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--card-preview-bg);
}

.card-preview-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1), filter 0.3s ease;
  display: block;
}

.spotlight-card:hover .card-preview-img {
  transform: scale(1.04);
}

.card-preview-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(10, 11, 14, 0.55) 0%, rgba(10, 11, 14, 0.08) 45%, rgba(10, 11, 14, 0.65) 100%);
  transition: opacity 0.3s ease;
}

[data-theme="light"] .card-preview-overlay {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.4) 0%, rgba(15, 23, 42, 0.05) 45%, rgba(15, 23, 42, 0.5) 100%);
}

.card-live-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.28rem 0.65rem;
  border-radius: var(--radius-full);
  background: rgba(15, 23, 42, 0.85);
  color: #ffffff;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.card-live-pill:hover {
  background: #0f172a;
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-1px);
  color: #ffffff;
}

.card-preview-svg {
  width: 100%;
  height: 100%;
  transition: transform 0.3s ease;
}

.spotlight-card:hover .card-preview-svg {
  transform: scale(1.02);
}

/* Theme adaptation for SVG preview cards in Light Mode */
[data-theme="light"] .card-preview-svg rect:first-child {
  fill: #f1f5f9;
}
[data-theme="light"] .card-preview-svg text {
  fill: #0f172a;
}
[data-theme="light"] .card-preview-svg text[fill="#9ca3af"],
[data-theme="light"] .card-preview-svg text[fill="#9ca3ae"] {
  fill: #64748b;
}
[data-theme="light"] .card-preview-svg rect[fill="#14161c"],
[data-theme="light"] .card-preview-svg rect[fill="#121318"],
[data-theme="light"] .card-preview-svg rect[fill="#13151b"],
[data-theme="light"] .card-preview-svg rect[fill="#181a20"],
[data-theme="light"] .card-preview-svg rect[fill="#191c24"] {
  fill: #ffffff;
  stroke: #cbd5e1;
}
[data-theme="light"] .card-preview-svg rect[fill="#20232a"],
[data-theme="light"] .card-preview-svg rect[fill="#1f232b"],
[data-theme="light"] .card-preview-svg rect[fill="#1e2129"],
[data-theme="light"] .card-preview-svg rect[fill="#242832"] {
  fill: #e2e8f0;
}

.card-badge-row {
  position: absolute;
  top: 0.85rem;
  left: 0.85rem;
  right: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 3;
}

.card-category-tag {
  font-size: 0.72rem;
  color: var(--text-muted);
  background: var(--bg-surface);
  backdrop-filter: blur(8px);
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-sm);
}

.card-status-indicator {
  font-size: 0.7rem;
  color: var(--text-secondary);
  background: var(--bg-surface);
  backdrop-filter: blur(8px);
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-medium);
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 500;
  box-shadow: var(--shadow-sm);
}

.card-status-indicator .dot {
  display: none;
}

/* Card Content Body */
.card-content {
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  position: relative;
  z-index: 3;
}

.card-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
}

.card-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.card-arrow {
  color: var(--text-muted);
  transition: transform 0.2s ease, color 0.2s ease;
}

.spotlight-card:hover .card-arrow {
  color: var(--text-primary);
  transform: translate(2px, -2px);
}

.card-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-bottom: 1.25rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Metrics bar */
.card-metrics {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1.25rem;
  padding: 0.55rem 0.8rem;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
}

.metric-item {
  display: flex;
  flex-direction: column;
}

.metric-val {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-primary);
  font-family: var(--font-mono);
}

.metric-key {
  font-size: 0.68rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 500;
}

/* Tech Stack Tags */
.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: auto;
}

.card-tag,
.tech-tag {
  font-size: 0.74rem;
  font-weight: 500;
  color: var(--accent-tag-text);
  background: var(--accent-tag);
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  display: inline-flex;
  align-items: center;
}

/* ==========================================================================
   EXPERIENCE & CAREER SECTION (Опыт в компаниях & Преподавание)
   ========================================================================== */
.experience-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  align-items: stretch;
}

.experience-card {
  padding: 2.25rem 2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.25s ease,
              box-shadow 0.25s ease;
}

.experience-card:hover {
  border-color: var(--border-medium);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.experience-card-header {
  display: flex;
  align-items: center;
  gap: 1.15rem;
  margin-bottom: 1.5rem;
  position: relative;
  flex-wrap: wrap;
}

.experience-logo-box {
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.experience-logo-box.vk-brand-box {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: #0077ff;
  border: 1px solid rgba(0, 119, 255, 0.3);
  box-shadow: 0 4px 14px rgba(0, 119, 255, 0.25);
}

.experience-logo-box.vk-brand-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.experience-logo-box.algo-brand-box {
  height: 48px;
  border-radius: 12px;
  background: transparent;
  border: none;
  box-shadow: 0 4px 14px rgba(99, 40, 149, 0.25);
}

.experience-logo-box.algo-brand-box img {
  height: 48px;
  width: auto;
  object-fit: contain;
  display: block;
  border-radius: 12px;
}

.experience-title-wrap {
  flex: 1 1 200px;
  min-width: 0;
}

.experience-role-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.experience-role {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
}

.role-badge {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-muted);
}

.experience-company-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-top: 0.2rem;
}

.experience-badge {
  font-size: 0.76rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-medium);
  color: var(--text-primary);
  white-space: nowrap;
}

.experience-card-body {
  flex-grow: 1;
  margin-bottom: 1.5rem;
}

.experience-bullets {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.experience-bullets li {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  font-size: 0.93rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.experience-bullets li strong {
  color: var(--text-primary);
  font-weight: 600;
}

.bullet-check {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  margin-top: 0.2rem;
  color: #10b981;
}

.experience-card-footer {
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.experience-action-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.btn-sm {
  padding: 0.5rem 0.9rem;
  font-size: 0.84rem;
  gap: 0.45rem;
}

.experience-external-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.experience-external-link:hover {
  color: var(--text-primary);
  text-decoration: underline;
}

.experience-benefit-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* ==========================================================================
   ABOUT & PERSONAL STATEMENT SECTION (Личное обращение // О подходе)
   ========================================================================== */
.about-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 1.5rem;
  align-items: stretch;
}

.about-card {
  padding: 2.25rem;
  display: flex;
  flex-direction: column;
}

.about-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1.25rem;
}

.status-dot {
  display: none !important;
}

.about-heading {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.35;
  margin-bottom: 1.25rem;
  letter-spacing: -0.01em;
}

.about-text {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 1rem;
}

.about-stack-wrap {
  margin: 1.5rem 0;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-subtle);
}

.about-stack-label {
  font-size: 0.78rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
}

.about-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: auto;
  padding-top: 1.25rem;
  flex-wrap: wrap;
}

.about-principles-column {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.principle-card {
  padding: 1.5rem;
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  flex: 1;
}

.principle-num {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-muted);
  line-height: 1;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
  padding: 0.45rem 0.65rem;
  flex-shrink: 0;
}

.principle-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.4rem;
}

.principle-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin: 0;
}

/* ==========================================================================
   PROCESS SECTION (4 шага работы)
   ========================================================================== */
.process-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

.process-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  position: relative;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

.process-card:hover {
  border-color: var(--border-medium);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.highlight-step {
  border-color: var(--border-focus);
  background: var(--bg-surface-elevated);
}

.process-step {
  font-family: var(--font-mono);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-dim);
  margin-bottom: 1rem;
}

.highlight-step .process-step {
  color: var(--text-primary);
}

.process-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.6rem;
}

.process-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ==========================================================================
   FAQ SECTION (Нативные details)
   ========================================================================== */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 860px;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: border-color 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.faq-item[open] {
  border-color: var(--border-medium);
}

.faq-summary {
  padding: 1.25rem 1.5rem;
  cursor: pointer;
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: space-between;
  list-style: none;
  user-select: none;
}

.faq-summary::-webkit-details-marker {
  display: none;
}

.faq-chevron {
  color: var(--text-muted);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.faq-item[open] .faq-chevron {
  transform: rotate(180deg);
  color: var(--text-primary);
}

.faq-content {
  padding: 0 1.5rem 1.25rem;
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.65;
  border-top: 1px solid transparent;
}

.faq-content strong {
  color: var(--text-primary);
}

/* ==========================================================================
   FOOTER / CONTACT SECTION
   ========================================================================== */
.site-footer {
  padding: 5rem 0 3rem;
  border-top: 1px solid var(--border-subtle);
  margin-top: 5rem;
  background: var(--bg-surface);
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 3rem;
  margin-bottom: 3.5rem;
}

.footer-info {
  max-width: 480px;
}

.footer-title {
  font-size: 1.7rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.footer-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.footer-desc strong {
  color: var(--text-primary);
}

.contact-links {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 2rem;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.82rem;
  color: var(--text-muted);
  flex-wrap: wrap;
  gap: 1rem;
}

/* ==========================================================================
   NATIVE DIALOG MODAL
   ========================================================================== */
dialog#project-modal {
  position: fixed;
  inset: 0;
  margin: auto;
  width: calc(100% - 2rem);
  max-width: 720px;
  max-height: 88vh;
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  color: var(--text-primary);
  padding: 0;
  overflow: hidden;
  box-shadow: var(--shadow-lg);

  /* Modern top-layer transitions */
  opacity: 0;
  transform: scale(0.96) translateY(8px);
  transition-property: opacity, transform, display, overlay;
  transition-duration: 0.24s;
  transition-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
  transition-behavior: allow-discrete;
}

dialog#project-modal[open] {
  opacity: 1;
  transform: scale(1) translateY(0);
  display: flex;
  flex-direction: column;

  @starting-style {
    opacity: 0;
    transform: scale(0.96) translateY(8px);
  }
}

dialog#project-modal::backdrop {
  background-color: rgba(0, 0, 0, 0);
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
  transition-property: background-color, backdrop-filter, display, overlay;
  transition-duration: 0.24s;
  transition-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
  transition-behavior: allow-discrete;
}

dialog#project-modal[open]::backdrop {
  background-color: var(--backdrop-bg);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);

  @starting-style {
    background-color: rgba(0, 0, 0, 0);
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
  }
}

.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-surface);
}

.modal-header-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.modal-title {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

.modal-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.4rem;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.modal-close-btn:hover {
  color: var(--text-primary);
  background: var(--bg-surface-elevated);
}

/* Modal Media Banner */
.modal-media-banner {
  width: 100%;
  height: 220px;
  max-height: 260px;
  overflow: hidden;
  position: relative;
  background: var(--card-preview-bg);
  border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

.modal-project-screenshot {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}

.modal-media-banner::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 36px;
  background: linear-gradient(to top, var(--bg-card), transparent);
  pointer-events: none;
}

.modal-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-card);
  padding: 0 1.5rem;
  gap: 1.5rem;
}

.modal-tab-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 0.75rem 0;
  font-size: 0.85rem;
  cursor: pointer;
  position: relative;
  transition: color 0.15s ease;
  font-weight: 500;
}

.modal-tab-btn:hover {
  color: var(--text-primary);
}

.modal-tab-btn.active {
  color: var(--text-primary);
  font-weight: 700;
}

.modal-tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--text-primary);
}

.modal-body {
  padding: 1.5rem;
  overflow-y: auto;
  flex-grow: 1;
}

.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
}

.modal-section-title {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

.modal-desc {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 1.5rem;
}

.modal-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.modal-meta-box {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
}

.modal-meta-box .k {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 0.25rem;
  font-weight: 500;
}

.modal-meta-box .v {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-primary);
}

.modal-footer {
  padding: 1.15rem 1.5rem;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

/* ==========================================================================
   TOAST NOTIFICATION
   ========================================================================== */
#toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}

.toast {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  padding: 0.65rem 1rem;
  font-size: 0.85rem;
  color: var(--text-primary);
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  opacity: 0;
  transform: translateY(8px);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: auto;
}

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

/* ==========================================================================
   RESPONSIVENESS & ACCESSIBILITY
   ========================================================================== */
@media (max-width: 900px) {
  .services-grid {
    grid-template-columns: 1fr;
  }
  .services-grid .service-card[style*="span 2"],
  .service-card-featured {
    grid-column: span 1 !important;
  }
  .explainer-grid {
    grid-template-columns: 1fr;
  }
  .stats-strip {
    grid-template-columns: repeat(2, 1fr);
  }
  .about-grid {
    grid-template-columns: 1fr;
  }
  .process-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .portfolio-grid {
    grid-template-columns: 1fr;
  }
  .experience-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none !important;
  }
  .burger-btn {
    display: inline-flex !important;
  }
}

@media (max-width: 640px) {
  #btn-contact-nav {
    display: none !important;
  }
  .hero-section {
    padding: 3.5rem 0 2rem;
  }
  .stats-strip {
    grid-template-columns: 1fr;
  }
  .experience-card {
    padding: 1.35rem;
  }
  .experience-card-header {
    gap: 0.75rem;
  }
  .experience-badge {
    width: 100%;
    text-align: center;
  }
  .process-grid {
    grid-template-columns: 1fr;
  }
  .modal-meta-grid {
    grid-template-columns: 1fr;
  }
}

/* Reduced Motion Mode */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  dialog#project-modal,
  dialog#project-modal::backdrop,
  .burger-line,
  .mobile-nav-overlay,
  .mobile-nav-drawer {
    transition-duration: 0.01ms !important;
  }
}
