/* Переменные из fig.css */
:root {
  --color-bg: #ffffff;
  --color-bg-brand: #0d99ff;
  --color-bg-brand-hover: #007be5;
  --color-bg-brand-pressed: #007be5;
  --color-bg-brand-secondary: #0768cf;
  --color-bg-brand-tertiary: #e5f4ff;
  --color-bg-component: #9747ff;
  --color-bg-component-hover: #8638e5;
  --color-bg-component-pressed: #8638e5;
  --color-bg-component-secondary: #7c2bda;
  --color-bg-component-tertiary: #f1e5ff;
  --color-bg-danger: #f24822;
  --color-bg-danger-hover: #dc3412;
  --color-bg-danger-pressed: #dc3412;
  --color-bg-danger-secondary: #bd2915;
  --color-bg-danger-tertiary: #ffe2e0;
  --color-bg-disabled: #d9d9d9;
  --color-bg-disabled-secondary: #b3b3b3;
  --color-bg-hover: #f5f5f5;
  --color-bg-inverse: #2c2c2c;
  --color-bg-onselected: #bde3ff;
  --color-bg-onselected-hover: #bde3ff;
  --color-bg-onselected-pressed: #bde3ff;
  --color-bg-pressed: #f5f5f5;
  --color-bg-secondary: #f5f5f5;
  --color-bg-selected: #e5f4ff;
  --color-bg-selected-hover: #bde3ff;
  --color-bg-selected-pressed: #bde3ff;
  --color-bg-selected-secondary: #f2f9ff;
  --color-bg-selected-strong: #0d99ff;
  --color-bg-selected-tertiary: #f2f9ff;
  --color-bg-success: #14ae5c;
  --color-bg-success-hover: #009951;
  --color-bg-success-pressed: #009951;
  --color-bg-success-secondary: #008043;
  --color-bg-success-tertiary: #cff7d3;
  --color-bg-tertiary: #e6e6e6;
  --color-bg-warning: #ffcd29;
  --color-bg-warning-hover: #ffc21a;
  --color-bg-warning-pressed: #ffc21a;
  --color-bg-warning-secondary: #fab815;
  --color-bg-warning-tertiary: #fff1c2;
  --color-border: #e6e6e6;
  --color-border-brand: #bde3ff;
  --color-border-brand-strong: #007be5;
  --color-border-component: #e4ccff;
  --color-border-component-hover: #9747ff;
  --color-border-component-strong: #8638e5;
  --color-border-danger: #ffc7c2;
  --color-border-danger-strong: #dc3412;
  --color-border-disabled: #e6e6e6;
  --color-border-disabled-strong: #0000004d;
  --color-border-onbrand: #007be5;
  --color-border-onbrand-strong: #ffffff;
  --color-border-oncomponent: #8638e5;
  --color-border-oncomponent-strong: #ffffff;
  --color-border-ondanger: #dc3412;
  --color-border-ondanger-strong: #ffffff;
  --color-border-onselected: #bde3ff;
  --color-border-onselected-strong: #000000e5;
  --color-border-onsuccess: #009951;
  --color-border-onsuccess-strong: #ffffff;
  --color-border-onwarning: #fab815;
  --color-border-onwarning-strong: #000000e5;
  --color-border-selected: #0d99ff;
  --color-border-selected-strong: #007be5;
  --color-border-strong: #2c2c2c;
  --color-border-success: #aff4c6;
  --color-border-success-strong: #009951;
  --color-border-warning: #ffe8a3;
  --color-border-warning-strong: #b86200;
  --color-icon: #000000e5;
  --color-icon-brand: #007be5;
  --color-icon-brand-pressed: #0768cf;
  --color-icon-brand-secondary: #80caff;
  --color-icon-brand-tertiary: #bde3ff;
  --color-icon-component: #8638e5;
  --color-icon-component-pressed: #7c2bda;
  --color-icon-component-secondary: #c5b2dc;
  --color-icon-component-tertiary: #c5b2dc;
  --color-icon-danger: #f24822;
  --color-icon-danger-hover: #bd2915;
  --color-icon-danger-pressed: #bd2915;
  --color-icon-danger-secondary: #f24822;
  --color-icon-danger-secondary-hover: #f24822;
  --color-icon-danger-tertiary: #f24822;
  --color-icon-disabled: #0000004d;
  --color-icon-hover: #000000e5;
  --color-icon-onbrand: #ffffff;
  --color-icon-onbrand-secondary: #ffffffcc;
  --color-icon-onbrand-tertiary: #ffffff66;
  --color-icon-oncomponent: #ffffff;
  --color-icon-oncomponent-secondary: #ffffffcc;
  --color-icon-oncomponent-tertiary: #ffffff66;
  --color-icon-ondanger: #ffffff;
  --color-icon-ondanger-secondary: #ffffffcc;
  --color-icon-ondanger-tertiary: #ffffff66;
  --color-icon-ondisabled: #ffffff;
  --color-icon-oninverse: #ffffffe5;
  --color-icon-onselected: #000000e5;
  --color-icon-onselected-secondary: #00000080;
  --color-icon-onselected-strong: #ffffff;
  --color-icon-onselected-tertiary: #0000004d;
  --color-icon-onsuccess: #ffffff;
  --color-icon-onsuccess-secondary: #ffffffcc;
  --color-icon-onsuccess-tertiary: #ffffff66;
  --color-icon-onwarning: #000000e5;
  --color-icon-onwarning-secondary: #00000080;
  --color-icon-onwarning-tertiary: #0000004d;
  --color-icon-pressed: #007be5;
  --color-icon-secondary: #00000080;
  --color-icon-secondary-hover: #000000e5;
  --color-icon-selected: #007be5;
  --color-icon-selected-secondary: #007be5;
  --color-icon-selected-tertiary: #007be5;
  --color-icon-success: #14ae5c;
  --color-icon-success-pressed: #008043;
  --color-icon-success-secondary: #14ae5c;
  --color-icon-success-tertiary: #14ae5c;
  --color-icon-tertiary: #0000004d;
  --color-icon-tertiary-hover: #000000e5;
  --color-icon-warning: #ffcd29;
  --color-icon-warning-pressed: #b86200;
  --color-icon-warning-secondary: #ffcd29;
  --color-icon-warning-tertiary: #ffcd29;
  --color-text: #000000e5;
  --color-text-brand: #007be5;
  --color-text-brand-secondary: #007be5;
  --color-text-brand-tertiary: #007be5;
  --color-text-component: #8638e5;
  --color-text-component-pressed: #7c2bda;
  --color-text-component-secondary: #c5b2dc;
  --color-text-component-tertiary: #c5b2dc;
  --color-text-danger: #dc3412;
  --color-text-danger-secondary: #dc3412;
  --color-text-danger-tertiary: #dc3412;
  --color-text-disabled: #0000004d;
  --color-text-hover: #000000e5;
  --color-text-onbrand: #ffffff;
  --color-text-onbrand-secondary: #ffffffcc;
  --color-text-onbrand-tertiary: #ffffff66;
  --color-text-oncomponent: #ffffff;
  --color-text-oncomponent-secondary: #ffffffcc;
  --color-text-oncomponent-tertiary: #ffffff66;
  --color-text-ondanger: #ffffff;
  --color-text-ondanger-secondary: #ffffffcc;
  --color-text-ondanger-tertiary: #ffffff66;
  --color-text-ondisabled: #ffffff;
  --color-text-oninverse: #ffffffe5;
  --color-text-onselected: #000000e5;
  --color-text-onselected-secondary: #00000080;
  --color-text-onselected-strong: #ffffff;
  --color-text-onselected-tertiary: #0000004d;
  --color-text-onsuccess: #ffffff;
  --color-text-onsuccess-secondary: #ffffffcc;
  --color-text-onsuccess-tertiary: #ffffff66;
  --color-text-onwarning: #000000e5;
  --color-text-onwarning-secondary: #00000080;
  --color-text-onwarning-tertiary: #0000004d;
  --color-text-secondary: #00000080;
  --color-text-secondary-hover: #000000e5;
  --color-text-selection: rgba(13, 153, 255, 0.4);
  --color-text-selected: #007be5;
  --color-text-selected-secondary: #007be5;
  --color-text-selected-tertiary: #007be5;
  --color-text-success: #009951;
  --color-text-success-secondary: #009951;
  --color-text-success-tertiary: #009951;
  --color-text-tertiary: #0000004d;
  --color-text-tertiary-hover: #000000e5;
  --color-text-warning: #b86200;
  --color-text-warning-secondary: #b86200;
  --color-text-warning-tertiary: #b86200;

  /* Дополнительные переменные из fig.css */
  --font-size: 16px;
  --color-bordertranslucent: rgba(0, 0, 0, 0.1);
  --checkerboard: repeating-conic-gradient(rgba(0, 0, 0, 0.1) 0% 25%,
      rgba(255, 255, 255, 0.1) 0% 50%) 0 0 / 0.66666rem 0.66666rem;
  --bg-hue: linear-gradient(90deg,
      rgba(255, 0, 0, 1),
      rgba(255, 48, 0, 1),
      rgba(255, 96, 0, 1),
      rgba(255, 143, 0, 1),
      rgba(255, 191, 0, 1),
      rgba(255, 239, 0, 1),
      rgba(223, 255, 0, 1),
      rgba(175, 255, 0, 1),
      rgba(128, 255, 0, 1),
      rgba(80, 255, 0, 1),
      rgba(32, 255, 0, 1),
      rgba(0, 255, 16, 1),
      rgba(0, 255, 64, 1),
      rgba(0, 255, 112, 1),
      rgba(0, 255, 159, 1),
      rgba(0, 255, 207, 1),
      rgba(0, 255, 255, 1),
      rgba(0, 207, 255, 1),
      rgba(0, 159, 255, 1),
      rgba(0, 112, 255, 1),
      rgba(0, 64, 255, 1),
      rgba(0, 16, 255, 1),
      rgba(32, 0, 255, 1),
      rgba(80, 0, 255, 1),
      rgba(127, 0, 255, 1),
      rgba(175, 0, 255, 1),
      rgba(223, 0, 255, 1),
      rgba(255, 0, 239, 1),
      rgba(255, 0, 191, 1),
      rgba(255, 0, 143, 1),
      rgba(255, 0, 96, 1),
      rgba(255, 0, 48, 1));
  --input-transition: all 0.08s ease-out;
  --bg-selected: #f5f5f5;
  --bg-selected-active: #e5f4ff;
  --bg-tooltip: #1e1e1e;
  --body-medium-fontSize: 0.6875rem;
  --body-large-fontSize: 0.8125rem;
  --spacer-1: 0.25rem;
  --spacer-2: 0.5rem;
  --spacer-3: 1rem;
  --spacer-4: 1.5rem;
  --spacer-5: 2rem;
  --spacer-6: 2.5rem;
  --color-tooltip: #ffffff;
  --radius-medium: 0.3125rem;
  --radius-large: 0.8125rem;
  --body-letter-spacing: 0.055px;
  --body-medium-strong-fontWeight: 550;
  --body-large-strong-fontWeight: 500;
  --body-medium-fontWeight: 450;
  --handle-shadow: 0px 0 0 0.75px rgba(0, 0, 0, 0.05),
    0px 1px 3px 0px rgba(0, 0, 0, 0.05), 0px 3px 8px 0px rgba(0, 0, 0, 0.05),
    0px 0px 0.5px 0px rgba(0, 0, 0, 0.1), var(--elevation-200);
  --popover-min-width: 15rem;
  --color-bg-ghost-hover: rgba(0, 0, 0, 0.05);
  --elevation-500-modal-window: 0px 0px 0.5px rgba(0, 0, 0, 0.08),
    0px 10px 24px rgba(0, 0, 0, 0.18), 0px 2px 5px rgba(0, 0, 0, 0.15);
  --elevation-500-modal-window: 0px 0px 0.5px 0px rgba(0, 0, 0, 0.08),
    0px 10px 24px 0px rgba(0, 0, 0, 0.18), 0px 2px 5px 0px rgba(0, 0, 0, 0.15);
  color-scheme: light dark;
  --icon-chevron: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5.87868 7.12132L8 9.24264L10.1213 7.12132' stroke='rgb(0 0 0 / 90%)' stroke-linecap='round'/%3E%3C/svg%3E%0A");
  --elevation-100: 0px 0px 0.5px 0px rgba(0, 0, 0, 0.3),
    0px 1px 3px 0px rgba(0, 0, 0, 0.15);
  --elevation-200: 0px 1px 3px 0px rgba(0, 0, 0, 0.102),
    0px 3px 8px 0px rgba(0, 0, 0, 0.102), 0px 0px 0.5px 0px rgba(0, 0, 0, 0.18);
  --font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;

  /* Обновленные переменные для портфолио (теперь используют figma переменные) */
  --portfolio-bg: var(--color-bg);
  --portfolio-text: var(--color-text);
  --portfolio-text-secondary: var(--color-text-secondary);
  --portfolio-text-tertiary: var(--color-text-tertiary);
  --portfolio-brand: var(--color-bg-brand);
  --portfolio-border: var(--color-border);
  --portfolio-hover: var(--color-bg-hover);
  --portfolio-selected: var(--color-bg-selected);

  /* Обновленные типографические переменные */
  --heading-large-fontFamily: var(--font-family);
  --heading-large-fontWeight: var(--body-large-strong-fontWeight);
  --heading-large-fontSize: 24px;
  --heading-large-lineHeight: 32px;
  --heading-large-font-family: var(--font-family);
  --heading-large-font-weight: 600;
  --heading-large-font-size: 24px;
  --heading-large-letter-spacing: -0.408px;
  --heading-large-line-height: 32px;
  --heading-large-font-style: normal;


  --heading-small-fontFamily: var(--font-family);
  --heading-small-fontWeight: var(--body-large-strong-fontWeight);
  --heading-small-fontSize: 13px;
  --heading-small-lineHeight: 22px;
  --heading-small-font-family: var(--font-family);
  --heading-small-font-weight: 550;
  --heading-small-font-size: 13px;

  --body-large-font-family: var(--font-family);
  --body-large-font-weight: 400;
  --body-large-font-size: 13px;
  --body-large-letter-spacing: -0.0325px;
  --body-large-line-height: 22px;
  --body-large-font-style: normal;




  --body-medium-font-family: var(--font-family);
  --body-medium-font-weight: var(--body-medium-strong-fontWeight);
  --body-medium-font-size: 11px;
  --body-medium-letter-spacing: var(--body-letter-spacing);
  --body-medium-line-height: 16px;
  --body-medium-font-style: normal;
}

@media (prefers-color-scheme: dark) {
  :root {
    --color-bg: #2c2c2c;
    --color-bg-brand: #0c8ce9;
    --color-bg-brand-hover: #0a6dc2;
    --color-bg-brand-pressed: #0a6dc2;
    --color-bg-brand-secondary: #105cad;
    --color-bg-brand-tertiary: #394360;
    --color-bg-component: #8a38f5;
    --color-bg-component-hover: #7a2ed6;
    --color-bg-component-pressed: #7a2ed6;
    --color-bg-component-secondary: #652ca8;
    --color-bg-component-tertiary: #473956;
    --color-bg-danger: #e03e1a;
    --color-bg-danger-hover: #c4381c;
    --color-bg-danger-pressed: #c4381c;
    --color-bg-danger-secondary: #963323;
    --color-bg-danger-tertiary: #60332a;
    --color-bg-disabled: #757575;
    --color-bg-disabled-secondary: #b3b3b3;
    --color-bg-hover: #383838;
    --color-bg-inverse: #ffffff;
    --color-bg-onselected: #667799;
    --color-bg-onselected-hover: #667799;
    --color-bg-onselected-pressed: #667799;
    --color-bg-pressed: #383838;
    --color-bg-secondary: #383838;
    --color-bg-selected: #4a5878;
    --color-bg-selected-hover: #536383;
    --color-bg-selected-pressed: #536383;
    --color-bg-selected-secondary: #394360;
    --color-bg-selected-strong: #0c8ce9;
    --color-bg-selected-tertiary: #394360;
    --color-bg-success: #198f51;
    --color-bg-success-hover: #078348;
    --color-bg-success-pressed: #078348;
    --color-bg-success-secondary: #0a5c35;
    --color-bg-success-tertiary: #476656;
    --color-bg-tertiary: #444444;
    --color-bg-warning: #f3c11b;
    --color-bg-warning-hover: #f2b50d;
    --color-bg-warning-pressed: #f2b50d;
    --color-bg-warning-secondary: #e4a711;
    --color-bg-warning-tertiary: #5c4100;
    --color-border: #444444;
    --color-border-brand: #105cad;
    --color-border-brand-strong: #7cc4f8;
    --color-border-component: #652ca8;
    --color-border-component-hover: #8a38f5;
    --color-border-component-strong: #d6b6fb;
    --color-border-danger: #963323;
    --color-border-danger-strong: #fca397;
    --color-border-disabled: #444444;
    --color-border-disabled-strong: #ffffff66;
    --color-border-onbrand: #0a6dc2;
    --color-border-onbrand-strong: #ffffff;
    --color-border-oncomponent: #7a2ed6;
    --color-border-oncomponent-strong: #ffffff;
    --color-border-ondanger: #c4381c;
    --color-border-ondanger-strong: #ffffff;
    --color-border-onselected: #667799;
    --color-border-onselected-strong: #ffffffe5;
    --color-border-onsuccess: #078348;
    --color-border-onsuccess-strong: #ffffff;
    --color-border-onwarning: #e4a711;
    --color-border-onwarning-strong: #000000e5;
    --color-border-selected: #0c8ce9;
    --color-border-selected-strong: #7cc4f8;
    --color-border-strong: #ffffffe5;
    --color-border-success: #0a5c35;
    --color-border-success-strong: #79d297;
    --color-border-warning: #925711;
    --color-border-warning-strong: #f7d15f;
    --color-icon: #ffffffe5;
    --color-icon-brand: #7cc4f8;
    --color-icon-brand-pressed: #105cad;
    --color-icon-brand-secondary: #4a92e6;
    --color-icon-brand-tertiary: #667799;
    --color-icon-component: #d6b6fb;
    --color-icon-component-pressed: #652ca8;
    --color-icon-component-secondary: #a080c7;
    --color-icon-component-tertiary: #a080c7;
    --color-icon-danger: #fca397;
    --color-icon-danger-hover: #963323;
    --color-icon-danger-pressed: #963323;
    --color-icon-danger-secondary: #fca397;
    --color-icon-danger-secondary-hover: #fca397;
    --color-icon-danger-tertiary: #fca397;
    --color-icon-disabled: #ffffff66;
    --color-icon-hover: #ffffffe5;
    --color-icon-onbrand: #ffffff;
    --color-icon-onbrand-secondary: #ffffffcc;
    --color-icon-onbrand-tertiary: #ffffff66;
    --color-icon-oncomponent: #ffffff;
    --color-icon-oncomponent-secondary: #ffffffcc;
    --color-icon-oncomponent-tertiary: #ffffff66;
    --color-icon-ondanger: #ffffff;
    --color-icon-ondanger-secondary: #ffffffcc;
    --color-icon-ondanger-tertiary: #ffffff66;
    --color-icon-ondisabled: #ffffff;
    --color-icon-oninverse: #000000e5;
    --color-icon-onselected: #ffffffe5;
    --color-icon-onselected-secondary: #ffffffcc;
    --color-icon-onselected-strong: #ffffff;
    --color-icon-onselected-tertiary: #ffffff66;
    --color-icon-onsuccess: #ffffff;
    --color-icon-onsuccess-secondary: #ffffffcc;
    --color-icon-onsuccess-tertiary: #ffffff66;
    --color-icon-onwarning: #000000e5;
    --color-icon-onwarning-secondary: #00000080;
    --color-icon-onwarning-tertiary: #0000004d;
    --color-icon-pressed: #7cc4f8;
    --color-icon-secondary: #ffffffcc;
    --color-icon-secondary-hover: #ffffffe5;
    --color-icon-selected: #7cc4f8;
    --color-icon-selected-secondary: #7cc4f8;
    --color-icon-selected-tertiary: #7cc4f8;
    --color-icon-success: #79d297;
    --color-icon-success-pressed: #0a5c35;
    --color-icon-success-secondary: #79d297;
    --color-icon-success-tertiary: #79d297;
    --color-icon-tertiary: #ffffff66;
    --color-icon-tertiary-hover: #ffffffe5;
    --color-icon-warning: #f7d15f;
    --color-icon-warning-pressed: #925711;
    --color-icon-warning-secondary: #f7d15f;
    --color-icon-warning-tertiary: #f7d15f;
    --color-text: #ffffffe5;
    --color-text-brand: #7cc4f8;
    --color-text-brand-secondary: #7cc4f8;
    --color-text-brand-tertiary: #7cc4f8;
    --color-text-component: #d6b6fb;
    --color-text-component-pressed: #652ca8;
    --color-text-component-secondary: #a080c7;
    --color-text-component-tertiary: #a080c7;
    --color-text-danger: #fca397;
    --color-text-danger-secondary: #fca397;
    --color-text-danger-tertiary: #fca397;
    --color-text-disabled: #ffffff66;
    --color-text-hover: #ffffffe5;
    --color-text-onbrand: #ffffff;
    --color-text-onbrand-secondary: #ffffffcc;
    --color-text-onbrand-tertiary: #ffffff66;
    --color-text-oncomponent: #ffffff;
    --color-text-oncomponent-secondary: #ffffffcc;
    --color-text-oncomponent-tertiary: #ffffff66;
    --color-text-ondanger: #ffffff;
    --color-text-ondanger-secondary: #ffffffcc;
    --color-text-ondanger-tertiary: #ffffff66;
    --color-text-ondisabled: #ffffff;
    --color-text-oninverse: #000000e5;
    --color-text-onselected: #ffffffe5;
    --color-text-onselected-secondary: #ffffffcc;
    --color-text-onselected-strong: #ffffff;
    --color-text-onselected-tertiary: #ffffff66;
    --color-text-onsuccess: #ffffff;
    --color-text-onsuccess-secondary: #ffffffcc;
    --color-text-onsuccess-tertiary: #ffffff66;
    --color-text-onwarning: #000000e5;
    --color-text-onwarning-secondary: #00000080;
    --color-text-onwarning-tertiary: #0000004d;
    --color-text-secondary: #ffffffcc;
    --color-text-secondary-hover: #ffffffe5;
    --color-text-selected: #7cc4f8;
    --color-text-selected-secondary: #7cc4f8;
    --color-text-selected-tertiary: #7cc4f8;
    --color-text-success: #79d297;
    --color-text-success-secondary: #79d297;
    --color-text-success-tertiary: #79d297;
    --color-text-tertiary: #ffffff66;
    --color-text-tertiary-hover: #ffffffe5;
    --color-text-warning: #f7d15f;
    --color-text-warning-secondary: #f7d15f;
    --color-text-warning-tertiary: #f7d15f;
    --icon-chevron: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5.87868 7.12132L8 9.24264L10.1213 7.12132' stroke='rgb(255 255 255 / 100%)' stroke-linecap='round'/%3E%3C/svg%3E%0A");
    --handle-shadow: 0px 0 0 0.75px 0px 0 0 0.75px rgba(0, 0, 0, 0.1),
      0px 0px 0.5px 0px rgba(255, 255, 255, 0.1);
    --color-bg-ghost-hover: rgba(255, 255, 255, 0.05);
    --color-bordertranslucent: rgba(255, 255, 255, 0.1);
    --elevation-500-modal-window: 0px 10px 24px rgba(0, 0, 0, 0.45),
      0px 3px 5px rgba(0, 0, 0, 0.35),
      inset 0px 0.75px 0px rgba(255, 255, 255, 0.1);
    --elevation-100: 0px 0px 0.5px 0px rgba(0, 0, 0, 0.5),
      0px 0.75px 0px 0px rgba(255, 255, 255, 0.1) inset,
      0px 1px 3px 0px rgba(0, 0, 0, 0.4);
  }
}

/* Базовые стили из fig.css */
html {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  color: var(--color-text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-family: var(--font-family);
  font-size: 16px;
  font-weight: var(--body-medium-fontWeight);
  letter-spacing: var(--body-letter-spacing);
  background-color: var(--color-bg);
  overflow-x: hidden;
}

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

::selection {
  background-color: var(--color-text-selection);
}

::-moz-selection {
  background-color: var(--color-text-selection);
}

/* Обновленные общие стили */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-family);
  font-size: var(--body-medium-fontSize);
  line-height: var(--body-large-line-height);
  color: var(--portfolio-text);
  background-color: var(--portfolio-bg);
  min-height: 100vh;
  overflow-x: hidden;
  letter-spacing: var(--body-letter-spacing);
}

h1,
h2 {
  font-weight: var(--body-large-strong-fontWeight);
  font-size: var(--body-large-fontSize);
}

h3 {
  font-weight: var(--body-medium-strong-fontWeight);
  font-size: var(--body-medium-fontSize);
}

/* Скроллбары */
::-webkit-scrollbar {
  width: var(--spacer-1);
  height: var(--spacer-1);
}

::-webkit-scrollbar-thumb {
  background-color: var(--color-bg-tertiary);
  border-radius: calc(var(--spacer-1) / 2);
}

::-webkit-scrollbar-thumb:hover {
  background-color: var(--color-bg-secondary);
}

* {
  scrollbar-width: thin;
  scrollbar-color: var(--color-bg-tertiary) var(--color-bg-secondary);
}

.subtle {
  color: var(--color-text-tertiary);
}



label {
  color: var(--color-text-secondary);
}

h2 {
  font-weight: var(--body-medium-strong-fontWeight);
  margin: var(--spacer-2) 0;
}

/* Стили компонентов из fig.css */
button,
select,
input,
fieldset {
  display: inline-flex;
  align-items: center;
  margin: 0;
  gap: 0.25rem;
  font: inherit;
  line-height: 1rem;
}

textarea,
input[type="text"],
input[type="number"],
input[type="password"],
.input {
  background-color: var(--color-bg-secondary);
  border: 0;
  border-radius: var(--radius-medium);
  padding: var(--spacer-1) var(--spacer-2);
  line-height: 1rem !important;
  box-sizing: content-box;
  resize: none;
  min-width: 0;
  font: inherit;
  display: flex;
  color: inherit;

}

textarea:focus,
input[type="text"]:focus,
input[type="number"]:focus,
input[type="password"]:focus,
.input:focus {
  box-shadow: inset 0 0 0 1px var(--color-border-selected);
  outline: 0;
}

textarea::-webkit-outer-spin-button,
textarea::-webkit-inner-spin-button,
input[type="text"]::-webkit-outer-spin-button,
input[type="text"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button,
input[type="password"]::-webkit-outer-spin-button,
input[type="password"]::-webkit-inner-spin-button {
  display: none;
  margin: 0;
}

/* Textarea */
textarea {
  min-height: 2rem;
  display: block;
  width: 100%;
  box-sizing: border-box;
}

/* Dropdown */
select,
input[type="text"][list] {
  height: var(--spacer-4);
  padding: 0 calc(var(--spacer-2) - 1px);
  appearance: none;
  border-radius: var(--radius-medium);
  display: flex;
  align-items: center;
  flex: 1 0 0;
  border: 0;
  color: var(--color-text);
  background-color: var(--color-bg);
  box-shadow: inset 0 0 0 1px var(--color-border);
  accent-color: var(--color-bg-brand);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

select:focus,
input[type="text"][list]:focus {
  box-shadow: inset 0 0 0 1px var(--color-border-selected);
  outline: 0;
}

select::-webkit-calendar-picker-indicator,
input[type="text"][list]::-webkit-calendar-picker-indicator {
  opacity: 0;
}

input[type="text"][list]:hover,
input[type="text"][list]:active,
input[type="text"][list]:focus,
select {
  background-image: var(--icon-chevron);
  background-position: calc(100% - 0.25rem) center;
  background-repeat: no-repeat;
}

input[type="text"][list],
select {
  padding-right: 1.5rem;
}

fig-dialog>*:not(dialog) {
  display: none !important;
}

/* Dropdown */
fig-dropdown,
.fig-dropdown {
  display: inline-flex;
  position: relative;
}

fig-dropdown>*:not(select),
.fig-dropdown>*:not(select) {
  display: none !important;
}

fig-dropdown>select,
.fig-dropdown>select {
  display: block;
  width: 100%;
}

/* Button */
.fig-button,
fig-button {
  color: var(--color-text-onbrand);
  display: flex;
  align-items: center;
  justify-content: center;
  height: var(--spacer-4);
  padding: 0 var(--spacer-2);
  appearance: none;
  border: 0;
  outline: 0;
  border-radius: var(--radius-medium);
  background-color: var(--color-bg-brand);
  font-weight: 500;
  cursor: pointer;
  transition: var(--input-transition);
}

.fig-button:active,
fig-button:active {
  background-color: var(--color-bg-brand-pressed);
}

/* Variant: Ghost */
.fig-button[variant="ghost"],
fig-button[variant="ghost"],
.fig-button[variant="link"],
fig-button[variant="link"] {
  box-shadow: none;
  background: none;
  color: var(--color-text);
}

.fig-button[variant="ghost"]:hover:not(:active),
fig-button[variant="ghost"]:hover:not(:active),
.fig-button[variant="link"]:hover:not(:active),
fig-button[variant="link"]:hover:not(:active) {
  background-color: var(--color-bg-ghost-hover);
}

.fig-button[variant="ghost"]:active,
fig-button[variant="ghost"]:active,
.fig-button[variant="link"]:active,
fig-button[variant="link"]:active {
  outline: 0;
  background-color: var(--color-bg-selected);
}

.fig-button[variant="ghost"][disabled]:not([disabled="false"]),
fig-button[variant="ghost"][disabled]:not([disabled="false"]) {
  background-color: transparent;
}

.fig-button[variant="link"],
fig-button[variant="link"] {
  color: var(--color-text-brand);
}

/* Variant: Secondary */
.fig-button[variant="secondary"],
fig-button[variant="secondary"] {
  border: 1px solid var(--color-border);
  padding: 0 calc(var(--spacer-2) - 1px);
  background: none;
  color: var(--color-text);
}

.fig-button[variant="secondary"]:active,
fig-button[variant="secondary"]:active {
  background-color: var(--color-bg-secondary);
}

/* Variant: Input */
.fig-button[variant="input"],
fig-button[variant="input"] {
  background-color: var(--color-bg-secondary);
  box-shadow: none;
}

/* Icon only */
.fig-button[icon],
fig-button[icon] {
  width: var(--spacer-4);
  padding: 0;
  flex-grow: 0;
  flex-shrink: 0;
  flex-basis: var(--spacer-4);
}

.fig-button[icon][size="compact"],
fig-button[icon][size="compact"] {
  width: var(--spacer-3);
  flex-basis: var(--spacer-3);
}

/* Disabled */
.fig-button[disabled]:not([disabled="false"]),
fig-button[disabled]:not([disabled="false"]) {
  background-color: var(--color-bg-disabled);
  pointer-events: none;
  cursor: not-allowed;
}

.fig-button[disabled]:not([disabled="false"]):not([variant="secondary"]),
fig-button[disabled]:not([disabled="false"]):not([variant="secondary"]) {
  color: var(--color-text-ondisabled);
  box-shadow: none;
}

.fig-button[disabled]:not([disabled="false"])[variant="secondary"],
fig-button[disabled]:not([disabled="false"])[variant="secondary"],
.fig-button[disabled]:not([disabled="false"])[variant="ghost"],
fig-button[disabled]:not([disabled="false"])[variant="ghost"] {
  color: var(--color-text-disabled);
  background-color: transparent;
}

/* Size */
.fig-button[size="large"],
fig-button[size="large"] {
  height: var(--spacer-5);
}

.fig-button[size="large"][icon],
fig-button[size="large"][icon] {
  width: var(--spacer-5);
}

/* Full width */
.fig-button[full],
fig-button[full] {
  width: 100%;
}

/* Block button */
.fig-button[inline="false"],
fig-button[inline="false"] {
  display: flex;
  width: 100%;
  justify-content: left;
  height: auto;
  text-align: left;
  align-items: center;
  padding: var(--spacer-1) var(--spacer-2);
}

.fig-button[type="select"],
fig-button[type="select"],
.fig-button[type="upload"],
fig-button[type="upload"] {
  position: relative;
  overflow: hidden;
}

.fig-button[type="select"]>select,
fig-button[type="select"]>select,
.fig-button[type="select"]>input,
fig-button[type="select"]>input,
.fig-button[type="select"]>fig-dropdown,
fig-button[type="select"]>fig-dropdown,
.fig-button[type="upload"]>select,
fig-button[type="upload"]>select,
.fig-button[type="upload"]>input,
fig-button[type="upload"]>input,
.fig-button[type="upload"]>fig-dropdown,
fig-button[type="upload"]>fig-dropdown {
  position: absolute;
  inset: 0;
  opacity: 0;
  appearance: none;
}

.fig-button[inline="false"],
fig-button[inline="false"] {
  padding: 0;
}

/* Button selected state */
.fig-button[selected]:not([selected="false"]),
fig-button[selected]:not([selected="false"]) {
  color: var(--color-icon-brand);
  background-color: var(--color-bg-selected);
}

.fig-button[selected]:not([selected="false"]):hover,
fig-button[selected]:not([selected="false"]):hover {
  color: var(--color-icon-brand);
  background-color: var(--color-bg-selected);
}

.fig-button:focus,
fig-button:focus,
.fig-button:focus-within,
fig-button:focus-within {
  outline: 0;
  box-shadow: inset 0 0 0 1px var(--color-border-selected);
}

.fig-button:focus:not(:active),
fig-button:focus:not(:active),
.fig-button:focus-within:not(:active),
fig-button:focus-within:not(:active) {
  outline: 0;
  box-shadow: inset 0 0 0 1px var(--color-border-selected);
}

/* Combo button */
.fig-button-combo,
fig-button-combo,
.fig-input-combo,
fig-input-combo {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0px;
}

.fig-button-combo>*:first-child,
fig-button-combo>*:first-child,
.fig-input-combo>*:first-child,
fig-input-combo>*:first-child,
.fig-button-combo>*:first-child>*,
fig-button-combo>*:first-child>*,
.fig-input-combo>*:first-child>*,
fig-input-combo>*:first-child>* {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.fig-button-combo>*:last-child,
fig-button-combo>*:last-child,
.fig-input-combo>*:last-child,
fig-input-combo>*:last-child,
.fig-button-combo>*:last-child>*,
fig-button-combo>*:last-child>*,
.fig-input-combo>*:last-child>*,
fig-input-combo>*:last-child>* {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

.fig-button-combo>*:not(:last-child):not(:first-child),
fig-button-combo>*:not(:last-child):not(:first-child),
.fig-input-combo>*:not(:last-child):not(:first-child),
fig-input-combo>*:not(:last-child):not(:first-child),
.fig-button-combo>*:not(:last-child):not(:first-child)>*,
fig-button-combo>*:not(:last-child):not(:first-child)>*,
.fig-input-combo>*:not(:last-child):not(:first-child)>*,
fig-input-combo>*:not(:last-child):not(:first-child)>* {
  border-radius: 0;
}

.fig-button-combo>*:not([variant="secondary"]):not(:first-child),
fig-button-combo>*:not([variant="secondary"]):not(:first-child) {
  box-shadow: inset 1px 0 0 0 var(--color-bg-brand-hover);
}

.fig-button-combo>*:not([variant="secondary"]):not(:first-child)[disabled]:not([disabled="false"]),
fig-button-combo>*:not([variant="secondary"]):not(:first-child)[disabled]:not([disabled="false"]) {
  box-shadow: inset 1px 0 0 0 var(--color-border-disabled);
}

.fig-button-combo>*[variant="secondary"]:not(:first-child),
fig-button-combo>*[variant="secondary"]:not(:first-child) {
  border-left-width: 0 !important;
}

.fig-button-combo>*[variant="secondary"]:not(:first-child)[disabled]:not([disabled="false"]),
fig-button-combo>*[variant="secondary"]:not(:first-child)[disabled]:not([disabled="false"]) {
  border-left-width: 0 !important;
}

/* Tabs */
fig-tab,
.fig-tab {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 1.5rem;
  padding: 0 var(--spacer-2);
  appearance: none;
  border: 0;
  cursor: default;
  gap: 0 !important;
  user-select: none;
  border-radius: var(--radius-medium);
  color: var(--color-text-secondary);
  position: relative;
  transition: var(--input-transition);
}

fig-tab[label]::after,
.fig-tab[label]::after {
  content: attr(label);
  color: var(--color-text-secondary);
  height: 0 !important;
  width: auto !important;
  visibility: hidden;
  overflow: hidden;
  user-select: none;
  pointer-events: none;
  font-weight: var(--body-medium-strong-fontWeight);
}

fig-tab:has(:checked),
.fig-tab:has(:checked),
fig-tab[selected]:not([selected="false"]),
.fig-tab[selected]:not([selected="false"]) {
  background-color: var(--color-bg-secondary);
  font-weight: var(--body-medium-strong-fontWeight);
  color: var(--color-text);
}

fig-tab:hover,
.fig-tab:hover {
  background-color: var(--color-bg-secondary);
}

fig-tab [type="radio"],
.fig-tab [type="radio"] {
  position: absolute;
  inset: 0;
  border-radius: 0;
  opacity: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
}

fig-tabs,
.tabs {
  display: flex;
  gap: var(--spacer-2);
}

/* Avatar */
fig-avatar,
.fig-avatar {
  --size: 1.5rem;
  width: var(--size);
  display: inline-grid;
  place-items: center;
  height: var(--size);
  border-radius: 100%;
  border: 0;
  background: var(--color-bg-brand);
  overflow: hidden;
  color: var(--color-icon-onbrand);
}

fig-avatar img,
.fig-avatar img {
  width: var(--size);
  height: var(--size);
  position: absolute;
  border-radius: 100%;
  box-shadow: inset 0 0 0 1px var(--color-bordertranslucent);
}

fig-avatar img:not([src]),
.fig-avatar img:not([src]) {
  background: var(--checkerboard);
}

fig-avatar[borderless] img,
.fig-avatar[borderless] img {
  box-shadow: none;
}

fig-avatar:has(img[src]),
.fig-avatar:has(img[src]) {
  background: none;
}

fig-avatar::after,
.fig-avatar::after {
  content: attr(initials);
}

fig-avatar[size="large"],
.fig-avatar[size="large"] {
  --size: 3rem;
}

/* Color input */
input[type="color"] {
  width: 0.875rem;
  height: 0.875rem;
  -webkit-appearance: none;
  appearance: none;
  border: 0;
  padding: 0;
  margin: 0;
  background: none;
  padding: 0.3125rem;
  flex-shrink: 0;
  box-sizing: content-box;
  border-radius: var(--radius-medium);
  background-color: var(--color-bg-secondary);
  display: inline-grid;
}

input[type="color"]:focus {
  box-shadow: inset 0 0 0 1px var(--color-border-selected);
  outline: 0;
}

input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 0;
  border: 0;
  appearance: none;
  border-radius: 0.125rem;
  background: var(--checkerboard);
  overflow: hidden;
  grid-area: 1/1;
  outline: 0;
}

input[type="color"]::-webkit-color-swatch {
  padding: 0;
  border: 0;
  box-shadow: inset 0 0 0 1px var(--color-bordertranslucent);
  border-radius: 0.125rem;
  mask-image: linear-gradient(to right,
      black 0%,
      black 50%,
      rgba(0, 0, 0, var(--alpha)) 50%);
}

input[type="color"]::-moz-color-swatch {
  border-radius: 0.125rem;
  padding: 0;
  border: 0;
  appearance: none;
  mask-image: linear-gradient(to right,
      black 0%,
      black 50%,
      rgba(0, 0, 0, var(--alpha)) 50%);
  border-radius: 0.125rem;
  box-shadow: inset 0 0 0 1px var(--color-bordertranslucent);
}

/* Input combo */
.input-combo {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0px;
}

.input-combo>*:first-child,
.input-combo>*:first-child>* {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.input-combo>*:last-child,
.input-combo>*:last-child>* {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

.input-combo>*:not(:last-child):not(:first-child),
.input-combo>*:not(:last-child):not(:first-child)>* {
  border-radius: 0;
}

/* Основная структура */
.main-page-desktop {
  background-color: var(--color-bg);
  display: flex;
  flex-direction: row;
  width: 100%;
  min-height: 100vh;
}

/* Сайдбар */
.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  display: flex;
  width: 240px;
  height: 100vh;
  flex-direction: column;
  align-items: stretch;
  background: var(--color-bg);
  border-right: 1px solid var(--color-border);
  flex-shrink: 0;
  overflow-y: auto;
  z-index: 1000;
  box-sizing: border-box;
}

.overlap-group-wrapper {
  background-color: var(--color-bg);
  flex: 1;
  height: 100vh;
  overflow-y: auto;
}

.overlap-group {
  position: relative;
  width: 100%;
  min-height: 100vh;
  background-color: var(--color-bg);
}

.design-sample {
  padding-left: 240px;
  position: relative;
  width: 100%;
  background-color: var(--color-bg);
  min-height: 100vh;
}

.design-sample_project {
  padding-left: 240px;
  position: relative;
  width: 100%;
  min-height: 100vh;
}

.main {
  display: flex;
  flex-direction: column;
  width: 100%;
  align-items: flex-start;
  gap: 20px;
  position: relative;
  margin-bottom: 100px;
}
.main_project {
  display: flex;
  flex-direction: column;
  width: 100%;
  align-items: flex-start;
  gap: 20px;
  position: relative;
  /* margin-bottom: 100px; */
}

/* Фон для всей страницы проекта */
body.project-page {
  background: var(--color-bg-secondary);
}

body.project-page .main {
  background: var(--color-bg-secondary);
}

body.project-page .overlap-group-wrapper {
  background: var(--color-bg-secondary);
  min-height: 100vh;
  overflow-y: auto;
}

body.project-page .design-sample {
  background: var(--color-bg-secondary);
}

/* Удалено: теперь цвет фона контролируется системой тем */
/* body.project-page .design-sample_project {
  background: var(--color-bg-secondary);
} */

/* Центрирование контента проекта */
#projectContent {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px;

}

/* Заголовок с профилем */
.frame {

  align-items: center;
  gap: 10px;
  padding: 30px 32px;
  align-self: stretch;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: left;
  position: relative;
}

.header {
  display: flex;
  align-items: center;
  gap: 24px;
  position: relative;
  align-self: stretch;
  width: 100%;
  flex: 0 0 auto;
  background-color: transparent;
}

.my-photo {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 33px;
  flex-shrink: 0;
}

.header-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
}

.header-title {
  display: flex;
  align-items: flex-start;
  gap: 4px;
  align-self: stretch;
  flex-wrap: wrap;
}

.name {
  color: var(--color-text);

  /* heading/heading.large */
  font-family: var(--heading-large-fontFamily, Inter);
  font-size: var(--heading-large-fontSize, 24px);
  font-style: normal;
  font-weight: var(--heading-large-fontWeight, 550);
  line-height: var(--heading-large-lineHeight, 32px);
  /* 133.333% */
  letter-spacing: -0.408px;
}

.selection {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 10px;
  background-color: var(--color-bg-brand);
}

p.selection-text {
  color: var(--color-text-onbrand) !important;
  margin: 0 !important;

  /* heading/heading.large */
  font-family: var(--heading-large-fontFamily, Inter) !important;
  font-size: var(--heading-large-fontSize, 24px) !important;
  font-style: normal !important;
  font-weight: var(--heading-large-fontWeight, 550) !important;
  line-height: var(--heading-large-lineHeight, 32px) !important;
  /* 133.333% */
  letter-spacing: -0.408px !important;
}


p.header-description {
  color: var(--color-text-secondary) !important;
  margin: 0 !important;
  margin-top: 0px !important;

  /* heading/heading.large */
  font-family: var(--heading-large-fontFamily, Inter) !important;
  font-size: var(--heading-large-fontSize, 24px) !important;
  font-style: normal !important;
  font-weight: var(--heading-large-fontWeight, 550) !important;
  line-height: var(--heading-large-lineHeight, 32px) !important;
  /* 133.333% */
  letter-spacing: -0.408px !important;
}

/* Секция с фильтрами */
.section-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
  padding: 0px 32px;
  position: relative;
  align-self: stretch;
  width: 100%;
  flex: 0 0 auto;
}

.section-title {
  font-family: var(--heading-large-font-family);
  font-weight: var(--heading-large-font-weight);
  color: var(--color-text);
  font-size: var(--heading-large-font-size);
  letter-spacing: var(--heading-large-letter-spacing);
  line-height: var(--heading-large-line-height);
  font-style: var(--heading-large-font-style);
  align-self: stretch;
}

.project-filter {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.tab {
  display: inline-flex;
  height: 24px;
  align-items: center;
  gap: 4px;
  padding: 0px 8px;
  background-color: var(--color-bg);
  border-radius: 5px;
  border: none;
  cursor: pointer;
  transition: background-color 0.3s ease;
  flex: 0 0 auto;
  -webkit-tap-highlight-color: transparent;
}

.tab.active {
  background-color: var(--color-bg-secondary);
}

.tab:hover {
  background-color: var(--color-bg-hover);
}

.value {
  font-family: var(--body-medium-font-family);
  font-weight: var(--body-medium-font-weight);
  color: var(--color-text-secondary);
  font-size: var(--body-medium-font-size);
  text-align: center;
  letter-spacing: var(--body-medium-letter-spacing);
  line-height: var(--body-medium-line-height);
  white-space: nowrap;
}

.tab.active .value {
  font-weight: 600;
  color: var(--color-text);
}

/* Проекты - динамическая сетка */
.projects {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 32px;
  padding: 0px 32px;
  position: relative;
  align-self: stretch;
  width: 100%;
  box-sizing: border-box;
  justify-content: start;
}

/* Убираем project-row, теперь не нужен */
.project-row {
  display: contents;
}

.project-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 500px;
  height: 270px;
  align-items: flex-start;
  position: relative;
  background-color: var(--color-bg);
  border-radius: 13px;
  overflow: hidden;
  box-shadow: 0 0 0 1px var(--color-border);
  transition: background-color 0.3s ease;
  cursor: pointer;
  justify-self: start;
  -webkit-tap-highlight-color: transparent;
}

.project-card:hover {
  background-color: var(--color-bg-hover);
}

.cover-image {
  position: relative;
  align-self: stretch;
  width: 100%;
  height: 200px;
  overflow: hidden;
  /* border-bottom: 1px solid var(--color-border); */
}

.img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-info {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  flex: 1;
  width: 100%;
  gap: 12px;
}

.project-icon {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.project-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.name-tags {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  flex: 1;
  width: 100%;
}

.project-name {
  color: var(--color-text);

  /* body/body.medium.strong */
  font-family: var(--body-medium-strong-fontFamily, Inter);
  font-size: var(--body-medium-strong-fontSize, 11px);
  font-style: normal;
  font-weight: var(--body-medium-strong-fontWeight, 550);
  line-height: var(--body-medium-strong-lineHeight, 16px);
  /* 145.455% */
  letter-spacing: 0.055px;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  width: 100%;
  list-style: none;
  margin: 0;
  padding: 0;
}

.tag {
  color: var(--color-text-secondary);

  /* body/body.medium */
  font-family: var(--body-medium-fontFamily, Inter);
  font-size: var(--body-medium-fontSize, 11px);
  font-style: normal;
  font-weight: var(--body-medium-fontWeight, 450);
  line-height: var(--body-medium-lineHeight, 16px);
  /* 145.455% */
  letter-spacing: 0.055px;

}

/* Состояния */
.loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
  color: var(--color-text-secondary);
  gap: 20px;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--color-bg-secondary);
  border-top: 4px solid var(--color-bg-brand);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}



/* Адаптивность */
@media (max-width: 1280px) {
  .overlap-group-wrapper {
    height: auto;
    min-height: 100vh;
    overflow-y: auto;
  }
}

/* Стили для структуры сайдбара */
.sidebar-list {
  display: flex;
  flex-direction: column;
  width: 240px;
  height: 100%;
  padding: 16px 0;
  box-sizing: border-box;
}

.sidebar-subtitle {
  color: var(--color-text-secondary);

  /* body/body.medium */
  font-family: var(--body-medium-fontFamily, Inter);
  font-size: var(--body-medium-fontSize, 11px);
  font-style: normal;
  font-weight: var(--body-medium-fontWeight, 450);
  line-height: var(--body-medium-lineHeight, 16px);
  /* 145.455% */
  letter-spacing: 0.055px;
}

.sidebar-left-header {
  display: flex;
  width: 100%;
  padding: 8px 8px 12px 8px;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  border-bottom: 1px solid var(--color-border);
  /* background: var(--color-bg); */
  box-sizing: border-box;
}

.sidebar-content {
  display: flex;
  flex-direction: column;
  gap: 1px;
  width: 100%;
}

.sidebar-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.file-title {
  overflow: hidden;
  color: var(--color-text);
  text-overflow: ellipsis;

  /* body/body.large.strong */
  font-family: var(--body-large-strong-fontFamily, Inter);
  font-size: var(--body-large-strong-fontSize, 13px);
  font-style: normal;
  font-weight: var(--body-large-strong-fontWeight, 550);
  line-height: var(--body-large-strong-lineHeight, 22px);
  /* 169.231% */
  letter-spacing: -0.032px;
}



.design-sidebar,
.layers-section {
  display: flex;
  flex-direction: column;
  /* gap: 2px; */
}

.collapse-header {
  display: flex;
  width: 240px;
  height: 40px;
  min-width: 240px;
  padding: 4px 8px 4px 0px;
  justify-content: space-between;
  align-items: center;
}

.lead {
  display: flex;
  padding-right: 8px;
  align-items: center;
  flex: 1 0 0;
}

.icon-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.icon {
  width: 16px;
  height: 16px;
  color: var(--color-icon);
}

.collapsible-header {
  display: flex;
  align-items: center;
}

.label {
  color: var(--color-text);

  /* body/body.medium.strong */
  font-family: var(--body-medium-strong-fontFamily, Inter);
  font-size: var(--body-medium-strong-fontSize, 11px);
  font-style: normal;
  font-weight: var(--body-medium-strong-fontWeight, 550);
  line-height: var(--body-medium-strong-lineHeight, 16px);
  /* 145.455% */
  letter-spacing: 0.055px;
}

.sidebar-row-simple {
  display: flex;
  width: 240px;
  padding: 4px 8px;
  align-items: flex-start;
  gap: 8px;
  -webkit-tap-highlight-color: transparent;
}

.container,
.lead-wrapper:active {
  background-color: var(--color-bg-ghost-hover);
}

.container,
.lead-wrapper {
  display: flex;
  height: 24px;
  align-items: center;
  gap: 4px;
  flex: 1 0 0;
  border-radius: 4px;
  padding: 8px;
  cursor: pointer;
  transition: background-color 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.text-label-wrapper {
  display: flex;
  align-items: center;
}

.text-label {
  display: flex;
  align-items: center;
}

.text-wrapper {
  overflow: hidden;
  color: var(--color-text);
  text-overflow: ellipsis;

  /* body/body.medium */
  font-family: var(--body-medium-fontFamily, Inter);
  font-size: var(--body-medium-fontSize, 11px);
  font-style: normal;
  font-weight: var(--body-medium-fontWeight, 450);
  line-height: var(--body-medium-lineHeight, 16px);
  /* 145.455% */
  letter-spacing: 0.055px;
}

.sidebar-row-layer {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  -webkit-tap-highlight-color: transparent;
}

.appearance-wrapper {
  display: flex;
  align-items: center;
  width: 100%;
}

.sidebar-layer-item {
  display: flex;
  padding: 8px 16px 8px 16px;
  align-items: flex-start;
  gap: 8px;
  align-self: stretch;
  cursor: pointer;
  transition: background-color 0.15s ease;
  border-radius: 4px;
  margin: 0 8px;
  width: calc(100% - 16px);
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}



/* Стили для обычных элементов (detach) - черные */
.sidebar-layer-item .name {
  display: flex;
  align-items: center;
}

.sidebar-layer-item .sidebar-layer-text {
  font-family: var(--body-medium-fontFamily, Inter);
  font-weight: var(--body-medium-fontWeight, 450);
  font-size: var(--body-medium-fontSize, 11px);
  line-height: var(--body-medium-lineHeight, 16px);
  color: var(--color-text);
  letter-spacing: var(--body-medium-letterSpacing, 0.055px);
}

.sidebar-layer-item .icon {
  color: var(--color-icon);
}

/* Стили для component элементов - фиолетовые */
.sidebar-layer-item.component .sidebar-layer-text {
  color: var(--color-text-component);
}

.sidebar-layer-item.component .icon {
  color: var(--color-icon-component);
}

/* Мобильная навигация */
.mobile-nav {
  display: none;
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  height: 60px;
  background-color: var(--color-bg);
  padding: var(--spacer-2, 0.5rem) 8px;
  border-radius: 13px;
  z-index: 1000;
  box-shadow: 0px 0px 0.5px 0px rgba(0, 0, 0, 0.30), 0px 1px 3px 0px rgba(0, 0, 0, 0.15);
}

.mobile-nav-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  width: 280px;
}

.mobile-nav-title {
  color: var(--color-text);

  /* body/body.large.strong */
  font-family: var(--body-large-strong-fontFamily, Inter);
  font-size: var(--body-large-strong-fontSize, 13px);
  font-style: normal;
  font-weight: var(--body-large-strong-fontWeight, 550);
  line-height: var(--body-large-strong-lineHeight, 22px);
  /* 169.231% */
  letter-spacing: -0.032px;
}

.mobile-nav-menu-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: none;
  background: none;
  color: var(--color-text);
  cursor: pointer;
  border-radius: 8px;
  transition: background-color 0.3s ease;
  -webkit-tap-highlight-color: transparent;
}

.mobile-nav-menu-btn:hover {
  background-color: var(--color-bg-hover);
}

/* Диалоговое меню */
.mobile-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  z-index: 1100;
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.mobile-menu-overlay.active {
  display: flex;
  opacity: 1;
}

.mobile-menu-dialog {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 240px;
  max-width: 85vw;
  background-color: var(--color-bg);
  border-right: 1px solid var(--color-border);
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.mobile-menu-overlay.active .mobile-menu-dialog {
  transform: translateX(0);
}

.mobile-sidebar-close {
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
  color: var(--color-icon-secondary);
  border-radius: 4px;
  margin-left: auto;
  -webkit-tap-highlight-color: transparent;
}

.mobile-sidebar-close:hover {
  background: var(--color-bg-hover);
  color: var(--color-icon);
}

/* Кликабельные элементы сайдбара */
.sidebar-row-simple,
.sidebar-row-layer {
  cursor: pointer;
  transition: background-color 0.15s ease;
  border-radius: 4px;
}


.sidebar-row-layer:hover {

  background-color: var(--color-bg-hover);
}

/* Sidebar footer */
.sidebar-footer {
  margin-top: auto; /* прижимаем футер к низу сайдбара */
  padding: 12px 8px 16px 8px;
  border-top: 1px solid var(--color-border);
  display: grid;
  gap: 8px;
}

.sidebar-footer .sidebar-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 32px;
  padding: 0 10px;
  border-radius: 6px;
  background: var(--color-bg);
  color: var(--color-text) !important;
  text-decoration: none !important;
  font-size: 12px;
  border: 1px solid var(--color-border);
  width: 100%;
}

.sidebar-footer .sidebar-btn:hover {
  background: var(--color-bg-hover);
}

/* Обновленные медиа-запросы для сайдбара */
/* Динамическая сетка для разных размеров экрана */



@media (max-width: 1024px) {
  .sidebar {
    width: 240px;
  }

  .projects {
    padding: 0px 16px;
  }

  .frame {
    padding: 30px 16px;
  }

  .section-header {
    padding: 0px 16px;
  }
}

@media (max-width: 900px) {
  .header .name {
    white-space: normal;
    word-wrap: break-word;
  }

  .header p.selection-text {
    white-space: normal;
    word-wrap: break-word;
    font-size: var(--heading-large-fontSize, 24px) !important;
  }

  .header .text-wrapper {
    white-space: normal;
    word-wrap: break-word;
  }

  .header-title {
    flex-wrap: wrap;
  }


}

/* Добавляем медиа запрос для планшетов */
@media (max-width: 800px) {
  .section-header {
    padding: 0px 24px;
  }


  /* Увеличиваем высоту frame для вертикальной компоновки */
  .frame {
    height: auto;
    min-height: 220px;
    padding: 25px 24px;
  }

  /* Вертикальная компоновка header с фото сверху */
  .header {
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    gap: 20px;
  }

  .my-photo {
    width: 100px;
    height: 100px;
    border-radius: 28px;
  }

  .header-content {
    align-items: flex-start;
    text-align: left;
  }

  .header-title {
    justify-content: flex-start;
    align-items: flex-start;
  }
}

@media (max-width: 768px) {
  body {
    overflow-y: auto;
    overflow-x: hidden;
  }

  .main-page-desktop {
    flex-direction: column;
    overflow-x: hidden;
    height: auto;
  }

  .sidebar {
    display: none;
  }

  .mobile-nav {
    display: block;
  }

  .overlap-group-wrapper {
    margin-left: 0;
    height: auto;
    overflow-y: auto;
  }

  .design-sample {
    padding-left: 0px;
  }

  .design-sample_project {
    padding-left: 0px;
  }

  .frame {
    height: auto;
    padding: 20px 16px;
  }

  .header {
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    gap: 16px;
  }

  .header-title {
    flex-direction: column;
    align-items: flex-start;

  }

  p.selection-text {
    font-size: var(--heading-large-fontSize, 24px) !important;
  }

  p.header-description {
    font-size: var(--heading-large-fontSize, 24px) !important;
  }

  .section-header {
    padding: 0px 16px;
    gap: 20px;
    overflow-x: hidden;
  }

  .projects {
    grid-template-columns: 1fr;
  }

  .project-card {
    width: 100%;
  }

  .project-filter {
    flex-wrap: nowrap;
    overflow-x: auto;
    justify-content: flex-start;
    width: 100%;
    max-width: 100%;
    scrollbar-width: none;
    /* -ms-overflow-style: none; */
  }

  .project-filter::-webkit-scrollbar {
    display: none;
  }
}

@media (max-width: 480px) {
  body {
    overflow-y: auto;
    overflow-x: hidden;
  }

  .overlap-group-wrapper {
    height: auto;
    overflow-y: auto;
  }

  .header-title {
    align-items: stretch;
  }

  p.selection-text {
    font-size: var(--heading-large-fontSize, 24px) !important;
  }

  p.header-description {
    font-size: var(--heading-large-fontSize, 24px) !important;
  }

  .projects {
    grid-template-columns: 1fr;
  }

  .project-card {
    width: 100%;
  }

  .project-filter {
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 8px;
    width: 100%;
    max-width: 100%;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .project-filter::-webkit-scrollbar {
    display: none;
  }

  .tab {
    flex-shrink: 0;
    min-width: auto;
    white-space: nowrap;
  }
}



/* Добавляем стили для активного состояния */
.sidebar-row-simple .lead-wrapper.active {
  background-color: var(--color-bg-hover);
  border-radius: 4px;
}

.sidebar-row-simple .lead-wrapper.active:hover {
  background-color: var(--color-bg-hover);
}

/* Hover для неактивных элементов */
.sidebar-row-simple .lead-wrapper:not(.active):hover {
  background-color: var(--color-bg-ghost-hover);
}



/* Основные стили для lead-wrapper */
.lead-wrapper.active {
  background-color: var(--color-bg-hover);
  border-radius: 4px;
}

/* Стили для блоков проекта */
.project-header {
  margin-bottom: 2rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--color-border);
}

.project-header h1 {
  margin: 0 0 0.5rem 0;
  font-size: 2rem;
  font-weight: 600;
  color: var(--color-text);
  line-height: 1.2;
}

.project-header .project-description {
  margin: 0;
  color: var(--color-text-secondary);
  font-size: 1rem;
  line-height: 1.5;
}

.project-block {
  width: 100%;
  max-width:  800px;
}

.project-block:last-child {
  margin-bottom: 0;
}

/* Cover Block */
.cover-block {
  margin-bottom: 24px;
  position: relative;
}

.cover-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
}

/* Cover image wrapper */
.cover-image-wrapper {
  position: relative;
  display: inline-block;
  max-width: 800px;
  margin: 0 auto;
}

/* Cover text для случаев без изображения */
.cover-text {
  width: 100%;
  max-width: 800px;
  height: 308px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  background: var(--color-bg-secondary);
  border-radius: 12px;
  margin-bottom: 0;
  padding: 20px;
  box-sizing: border-box;
}

/* Cover image для страницы проекта */
.project-block .cover-image {
  width: 100%;
  max-width: 800px;
  height: auto;
  border-radius: 12px;
  margin-bottom: 0;
  object-fit: cover;
  position: relative;
  display: block;
}

/* Визуальная рамка для обложки на страницах проекта */
body.project-page .cover-image-wrapper::before {
  content: '';
  position: absolute;
  top: 0px;
  left: 0px;
  right: 0px;
  bottom: 0px;
  border: 1px solid var(--color-border-selected, #0066ff);
  pointer-events: none;
  z-index: 2;
}

/* Квадратик в левом верхнем углу */
body.project-page .cover-image-wrapper::after {
  content: '';
  position: absolute;
  top: -4px;
  left: -4px;
  width: 8px;
  height: 8px;
  background: white;
  border: 1px solid var(--color-border-selected, #0066ff);
  pointer-events: none;
  z-index: 3;
}

/* Квадратик в правом верхнем углу */
body.project-page .cover-corner-top-right {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 8px;
  height: 8px;
  background: white;
  border: 1px solid var(--color-border-selected, #0066ff);
  pointer-events: none;
  z-index: 3;
}

/* Квадратик в левом нижнем углу */
body.project-page .cover-corner-bottom-left {
  position: absolute;
  bottom: -4px;
  left: -4px;
  width: 8px;
  height: 8px;
  background: white;
  border: 1px solid var(--color-border-selected, #0066ff);
  pointer-events: none;
  z-index: 3;
}

/* Квадратик в правом нижнем углу */
body.project-page .cover-corner-bottom-right {
  position: absolute;
  bottom: -4px;
  right: -4px;
  width: 8px;
  height: 8px;
  background: white;
  border: 1px solid var(--color-border-selected, #0066ff);
  pointer-events: none;
  z-index: 3;
}

/* Синяя плашка с размерами под рамкой */
body.project-page .cover-dimensions {
  position: absolute;
  bottom: -30px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-border-selected, #0066ff);
  color: white;
  padding: 0px 3px;
  color: var(--color-text-onbrand);
  text-align: center;
  
  /* body/body.medium */
  font-family: var(--body-medium-fontFamily, Inter);
  font-size: var(--body-medium-fontSize, 11px);
  font-style: normal;
  font-weight: var(--body-medium-fontWeight, 450);
  line-height: var(--body-medium-lineHeight, 16px); /* 145.455% */
  letter-spacing: 0.055px;
  border-radius: 2px;
  pointer-events: none;
  z-index: 3;
}


/* Header Block */
.header-block {
  margin-bottom: 16px;
}

.header-content {
  display: flex;
  width: 100%;
  justify-content: space-between;
  align-items: flex-start;
  padding: 0;
}

.header-content h1 {
  color: var(--color-text);

  /* heading/heading.large */
  font-family: var(--heading-large-fontFamily, Inter);
  font-size: var(--heading-large-fontSize, 24px);
  font-style: normal;
  font-weight: var(--heading-large-fontWeight, 550);
  line-height: var(--heading-large-lineHeight, 32px);
  /* 133.333% */
  letter-spacing: -0.408px;
}

.header-content p {
  color: var(--color-text-secondary);
  margin: 0;
  flex-shrink: 1;

  /* heading/heading.small */
  font-family: var(--heading-small-fontFamily, Inter);
  font-size: var(--heading-small-fontSize, 13px);
  font-style: normal;
  font-weight: var(--heading-small-fontWeight, 550);
  line-height: var(--heading-small-lineHeight, 22px);
  /* 169.231% */
  letter-spacing: -0.032px;
}

/* Tags Block */
.tags-block {
  margin-bottom: 24px;
}

.tags-content {
  text-align: center;
  padding: 0;
}

.tags-content .tags {
  display: flex;
  gap: var(--spacer-1, 0.3rem);
  ;
  flex-wrap: wrap;
  justify-content: center;
  margin: 0;
}

  .tags-content .tag {
    display: flex;
    height: var(--heights-height-input, 24px);
    padding: 0px var(--spacer-2, 0.5rem);
    align-items: center;
    gap: var(--spacer-1, 0.3rem);
    border-radius: var(--radius-medium, 0.3125rem);
    background: var(--color-bg);
    color: var(--color-text);

    /* body/body.medium.strong */
    font-family: var(--body-medium-strong-fontFamily, Inter);
    font-size: var(--body-medium-strong-fontSize, 11px);
    font-style: normal;
    font-weight: var(--body-medium-strong-fontWeight, 550);
    line-height: var(--body-medium-strong-lineHeight, 16px); /* 145.455% */
    letter-spacing: 0.055px;
  }

/* Case Header Block */
.case-header-block {
  margin-bottom: 16px;
}

.case-header-content {
  text-align: center;
}

.case-header-content h2 {
  font-size: 36px;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 0;
  line-height: 1.3;
}

.case-header-content p {
  font-size: 18px;
  color: var(--color-text-secondary);
  line-height: 1.6;
  max-width: 800px;
  margin: 0 auto;
}

/* Image Block */
.image-block {
  margin-bottom: 16px;
  gap: 8px;
}

.image-content img {
  width: 100%;
  height: auto;
  border-radius: 13px;
  margin-bottom: 0;
  object-fit: cover;
}

/* Text Block */
.text-block {
  margin-bottom: 16px;
}

.text-content h3 {
  font-size: 24px;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 0;
  text-align: center;
}


.text-body {
  color: var(--color-text);

  /* body/body.large */
  font-family: var(--body-large-fontFamily, Inter);
  font-size: var(--body-large-fontSize, 13px);
  font-style: normal;
  font-weight: var(--body-large-fontWeight, 450);
  line-height: var(--body-large-lineHeight, 22px);
  /* 169.231% */
  letter-spacing: -0.032px;
}

.text-body h4 {
  color: var(--color-text);

  /* body/body.large */
  font-family: var(--body-large-fontFamily, Inter);
  font-size: var(--body-large-fontSize, 13px);
  font-style: normal;
  font-weight: var(--body-large-fontWeight, 450);
  line-height: var(--body-large-lineHeight, 22px);
  /* 169.231% */
  letter-spacing: -0.032px;
}

.text-body p {
  margin-bottom: 0;
}

.text-body p:last-child {
  margin-bottom: 0;
}

/* Video Block */
.video-block {
  margin-bottom: 16px;
}

.video-content video {
  width: 100%;
  height: auto;
  border-radius: 13px;
  margin-bottom: 0;
}



/* Responsive стили для блоков проекта */
@media (max-width: 768px) {
  .project-block {
    width: 100%;
    max-width: 800px;
  }
  .main {
    margin-bottom: 100px;  
  }
  
  /* Обеспечиваем правильный скролл для страниц проектов на мобильных */
  body.project-page .overlap-group-wrapper {
    height: auto;
    overflow-y: auto;
  }
  .cover-block {
    margin-bottom: 24px;
    position: relative;
  }

  .cover-text h1 {
    font-size: 32px;
  }

  .cover-text p {
    font-size: 18px;
  }

  .cover-text .tags {
    margin-top: 0;
    gap: 8px;
  }

  .cover-text .tag {
    font-size: 12px;
    padding: 4px 8px;
  }

  .header-content h1 {
    font-size: 28px;
  }

  .header-content p {
    font-size: var(--heading-small-fontSize, 13px);
  }

  .tags-content .tag {
    font-size: 12px;
    padding: 4px 8px;
  }

  .case-header-content h2 {
    font-size: 28px;
  }

  .case-header-content p {
    font-size: 16px;
  }

  .image-content h3,
  .text-content h3,
  .video-content h3 {
    font-size: 20px;
  }

  .text-body {
    font-size: var(--body-large-fontSize, 13px);
  }
}

@media (max-width: 900px) {
  body {
    overflow-y: auto;
    overflow-x: hidden;
  }
}

/* ========================================
   PROJECT THEMES
   Стили для разных тем проектов с конкретными HEX кодами
   ======================================== */

/* Светлая тема (принудительно светлые цвета) */
.main_project.theme-light {
  background-color: #f5f5f5; /* --color-bg-secondary светлая */
  color: #000000e5; /* --color-text светлая */
}

.main_project.theme-light h1,
.main_project.theme-light h2,
.main_project.theme-light h3,
.main_project.theme-light h4,
.main_project.theme-light h5,
.main_project.theme-light h6 {
  color: #000000e5; /* --color-text светлая */
}

.main_project.theme-light p,
.main_project.theme-light .text-body {
  color: #00000080; /* --color-text-secondary светлая */
}

.main_project.theme-light .tag {
  background-color: #ffffff; /* --color-bg светлая */
  color: #00000080; /* --color-text-secondary светлая */
}

/* Темная тема (принудительно темные цвета) */
.main_project.theme-dark {
  background-color: #383838; /* --color-bg-secondary темная */
  color: #ffffffe5; /* --color-text темная */
}

.main_project.theme-dark h1,
.main_project.theme-dark h2,
.main_project.theme-dark h3,
.main_project.theme-dark h4,
.main_project.theme-dark h5,
.main_project.theme-dark h6 {
  color: #ffffffe5; /* --color-text темная */
}

.main_project.theme-dark p,
.main_project.theme-dark .text-body {
  color: #ffffffcc; /* --color-text-secondary темная */
}

.main_project.theme-dark .tag {
  background-color: #2c2c2c; /* --color-bg темная */
  color: #ffffffcc; /* --color-text-secondary темная */
}

/* Кастомная тема (пользовательский цвет фона + автоопределение текста) */
.main_project.theme-custom {
  /* Фон устанавливается динамически через JavaScript */
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Когда кастомный фон светлый - используем темные цвета текста */
.main_project.theme-custom.light-background {
  color: #000000e5; /* светлая --color-text */
}

.main_project.theme-custom.light-background h1,
.main_project.theme-custom.light-background h2,
.main_project.theme-custom.light-background h3,
.main_project.theme-custom.light-background h4,
.main_project.theme-custom.light-background h5,
.main_project.theme-custom.light-background h6 {
  color: #000000e5; /* светлая --color-text */
}

.main_project.theme-custom.light-background p,
.main_project.theme-custom.light-background .text-body {
  color: #00000080; /* светлая --color-text-secondary */
}

.main_project.theme-custom.light-background .tag {
  background-color: #ffffff; /* светлая --color-bg */
  color: #00000080; /* светлая --color-text-secondary */
}

/* Когда кастомный фон темный - используем светлые цвета текста */
.main_project.theme-custom.dark-background {
  color: #ffffffe5; /* темная --color-text */
}

.main_project.theme-custom.dark-background h1,
.main_project.theme-custom.dark-background h2,
.main_project.theme-custom.dark-background h3,
.main_project.theme-custom.dark-background h4,
.main_project.theme-custom.dark-background h5,
.main_project.theme-custom.dark-background h6 {
  color: #ffffffe5; /* темная --color-text */
}

.main_project.theme-custom.dark-background p,
.main_project.theme-custom.dark-background .text-body {
  color: #ffffffcc; /* темная --color-text-secondary */
}

.main_project.theme-custom.dark-background .tag {
  background-color: #2c2c2c; /* темная --color-bg */
  color: #ffffffcc; /* темная --color-text-secondary */
}

/* ========================================
   DESIGN-SAMPLE PROJECT THEMES
   Стили для design-sample_project с поддержкой тем
   ======================================== */

/* Светлая тема для design-sample_project (повышенная специфичность) */
body.project-page .design-sample_project.theme-light {
  background-color: #f5f5f5 !important; /* светлый фон */
}

/* Темная тема для design-sample_project (повышенная специфичность) */
body.project-page .design-sample_project.theme-dark {
  background-color: #383838 !important; /* темный фон */
}

/* Кастомная тема для design-sample_project (повышенная специфичность) */
body.project-page .design-sample_project.theme-custom {
  /* Фон устанавливается динамически через JavaScript */
  transition: background-color 0.3s ease;
}

/* ========================================
   SHIMMER EFFECTS
   Шиммер эффекты для карточек проектов
   ======================================== */

/* Анимация шиммера убрана - теперь статичные блоки */

/* Шиммер карточка проекта */
.shimmer-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 500px;
  height: 270px;
  align-items: flex-start;
  position: relative;
  background-color: var(--color-bg);
  border-radius: 13px;
  overflow: hidden;
  cursor: default;
  border: 1px solid var(--color-border);
}

/* Шиммер обложка */
.shimmer-cover {
  position: relative;
  align-self: stretch;
  width: 100%;
  height: 200px;
  background-color: var(--color-bg-tertiary);
}

/* Шиммер информация о проекте */
.shimmer-info {
  display: flex;
  padding: 21px 16px;
  width: 100%;
  gap: 12px;
  align-items: center;
}

/* Шиммер иконка */
.shimmer-icon {
  width: 16px;
  height: 16px;
  border-radius: 2px;
  background-color: var(--color-bg-tertiary);
  flex-shrink: 0;
}

/* Шиммер название и теги */
.shimmer-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Шиммер название проекта */
.shimmer-title {
  height: 12px;
  width: 100px;
  border-radius: 4px;
  background-color: var(--color-bg-tertiary);
}

/* Шиммер теги */
.shimmer-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.shimmer-tag {
  height: 11px;
  border-radius: 9px;
  background-color: var(--color-bg-tertiary);
}

.shimmer-tag:nth-child(1) { width: 60px; }
.shimmer-tag:nth-child(2) { width: 45px; }
.shimmer-tag:nth-child(3) { width: 55px; }

/* Плейсхолдер для шиммера */
.shimmer-placeholder {
  width: 100%;
  display: flex;
  flex-direction: column;
}

/* Загруженная карточка - плавное появление без подпрыгивания */
.shimmer-loaded .project-card {
  animation: fadeIn 0.1s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Адаптивность для шиммеров */
@media (max-width: 768px) {
  .shimmer-card {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .shimmer-card {
    width: 100%;
  }
}

/* Блоки используют существующие стили проекта без дополнительных фонов */