/* Clean interface with restrained rounded surfaces. Orbit styling is preserved. */
/* Palette follows the selected IS. ribbon: cobalt → azure → sky blue. */
:root {
  --brand-cobalt: #2563eb;
  --brand-blue: #2273eb;
  --brand-azure: #159fea;
  --brand-sky: #45b6ef;
  --brand-ribbon: linear-gradient(115deg, #245feb 0%, #2273eb 45%, #198deb 75%, #159fea 100%);
  --brand-action: linear-gradient(115deg, #2059eb 0%, #2563eb 55%, #226cdd 100%);
  --brand-wash: linear-gradient(115deg, #2563eb0e, #159fea12);
  --brand-text: linear-gradient(110deg, #245feb 0%, #2273eb 60%, #198deb 100%);
  --bg: #f6f8fb;
  --surface-2: #f0f3f8;
  --border: #dfe4ec;
  --ill-bg: #eaf3ff;
}
:root[data-theme="dark"] {
  --bg: #090f1e;
  --surface-2: #172236;
  --border: #263247;
  --ill-bg: #102139;
  --brand-wash: linear-gradient(115deg, #2563eb23, #159fea1c);
  --brand-text: linear-gradient(110deg, #6d9cff 0%, #57b0ff 60%, #45b6ef 100%);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #090f1e;
    --surface-2: #172236;
    --border: #263247;
    --ill-bg: #102139;
    --brand-wash: linear-gradient(115deg, #2563eb23, #159fea1c);
    --brand-text: linear-gradient(110deg, #6d9cff 0%, #57b0ff 60%, #45b6ef 100%);
  }
}

html { scroll-padding-top: 88px; }
header { background: var(--bg-2); backdrop-filter: none; }
.nav-links a { padding: 23px 0 21px; border-bottom: 2px solid transparent; transition: color .18s, border-color .18s; }
.nav-links a:hover, .nav-links a:focus-visible { color: var(--accent); border-bottom-color: var(--accent); }
/* Restrained radii: compact controls, softer large surfaces. */
:is(.btn, .icon-btn, .menu-btn, .search, .suggest button, .mobile-menu a) { border-radius: 10px; }
:is(.slider-tab, .chip, .tech, .contact) { border-radius: 10px; }
:is(.slider-tab i, .tag, .tech .badge, .contact i, .chat-head .avatar) { border-radius: 7px; }
:is(.slider-viewport, .project, .empty, .eco-map, .chat) { border-radius: 18px; }
:is(.modal, .cta) { border-radius: 24px; }
:is(.msg, .msg.user, .msg.bot) { border-radius: 13px; }
.project .num { border-radius: 8px 0 0 0; }
:is(.eyebrow, .stat, .stack-group, .step) { border-radius: 0; }
.slider-bar { border-radius: 2px; }
.feature-list li::before { border-radius: 5px; }
/* Header controls have no visible frame; keyboard focus stays accessible. */
#menuBtn, #themeBtn { width: 44px; height: 44px; border: 0; background: transparent; box-shadow: none; }
#menuBtn:hover, #themeBtn:hover, #menuBtn[aria-expanded="true"] { background: var(--accent-soft); color: var(--accent); }
#menuBtn:focus:not(:focus-visible), #themeBtn:focus:not(:focus-visible) { outline: none; }
:is(.slider-viewport, .project, .eco-map, .chat) { box-shadow: none; }
:is(.btn, .chip, .project, .step, .tech, .contact) { transition: border-color .18s, background-color .18s, color .18s; }
:is(.btn-primary, .project, .step, .tech, .contact):hover,
.project:focus-visible { transform: none; box-shadow: none; }
:where(a, button, input):focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.project:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.hero-bg { background: linear-gradient(115deg, transparent 35%, #2273eb04 65%, #159fea0b 100%); }
.grid-lines { opacity: .24; }
.eyebrow { padding: 0 0 0 12px; border-left: 2px solid var(--border); background: none; color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: .06em; }
.eyebrow .dot { display: none; }
h1 { font-weight: 700; }
h1 .grad { background: var(--brand-text); background-clip: text; -webkit-background-clip: text; color: transparent; }
h2 { font-weight: 600; }
.lead { line-height: 1.75; }
.btn { min-height: 48px; font-size: 14px; font-weight: 600; }
.btn-primary { background: var(--brand-action); box-shadow: none; }
.btn-primary:hover { background: linear-gradient(115deg, #1d4fd6, #205bd9 55%, #1b61cd); }
.btn-ghost { background: var(--surface); border-color: var(--border); }
.btn-ghost:hover { background: var(--surface); }
.stats { gap: 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.stat { border: 0; background: none; padding: 22px 20px; }
.stat:first-child { padding-left: 0; }
.stat + .stat { border-left: 1px solid var(--border); }
.stat b { font-weight: 600; font-size: 30px; margin-bottom: 3px; }
.stat span { font-size: 12px; }
/* На широком экране показатели идут одной полосой под заголовком и сферой. */
@media (min-width: 960px) {
  .stat { display: flex; align-items: baseline; gap: 12px; padding: 18px 28px; }
  .stat b { margin-bottom: 0; }
  .stat span { font-size: 13px; }
}
.section-tag { font-size: 11px; letter-spacing: .08em; }
.section-head { padding-left: 20px; border-left: 2px solid var(--border); }
.section-head h2 { margin-top: 12px; }
.section-head p { font-size: 16px; line-height: 1.8; }
.slider-tabs { gap: 0; }
.slider-tab { background: none; border: 0; border-bottom: 2px solid transparent; padding: 13px 15px; font-size: 13px; }
.slider-tab.active { background: var(--brand-wash); color: var(--accent); border-bottom-color: var(--accent); }
.slider-tab.active i { background: none; color: var(--accent); }
.slider-tab i { background: none; color: inherit; }
.slide h3 { font-weight: 600; }
.slider-bar { height: 2px; }
.slider-bar span { background: var(--accent); }
.chips { gap: 0; }
.chip { border-color: transparent; border-bottom: 2px solid transparent; background: transparent; }
.chip:hover { border-color: transparent; border-bottom-color: var(--border); }
.chip.active { background: var(--brand-wash); color: var(--accent); border-color: transparent; border-bottom-color: var(--accent); }
.search { background: transparent; border-width: 0 0 1px; padding-left: 0; }
.projects { gap: 24px; }
.project { animation: none; }
.project:hover .media .ill { transform: none; }
.project:hover .more { text-decoration: underline; text-underline-offset: 4px; }
.project .num { right: 0; bottom: 0; padding: 7px 12px; border-width: 1px 0 0 1px; }
.pbody { padding: 24px; }
.project h3 { font-weight: 700; }
.project .full { font-weight: 500; }
.project p { font-size: 14px; line-height: 1.8; }
.tag { background: none; border: 1px solid var(--border); padding: 3px 7px; font-size: 10px; letter-spacing: .02em; }
.more { margin-top: 8px; padding-top: 14px; border-top: 1px solid var(--border); justify-content: space-between; font-size: 12px; }
.chat-head .avatar { background: var(--brand-action); }
.msg.user { background: var(--brand-action); }
.chat-head { padding-bottom: 18px; }
.chat { padding: 24px; }
.msg { font-size: 14px; line-height: 1.7; }
.suggest button { font-size: 12px; }
.stack-group { padding: 24px 20px; border-width: 1px 0 0; background: transparent; }
.stack-group h3 { font-weight: 600; }
.tech { background: transparent; padding: 12px 0; border-bottom: 1px solid var(--border); }
.tech:hover { border-color: transparent; border-bottom-color: var(--tc); }
.tech .badge { background: transparent; border: 1px solid color-mix(in srgb,var(--tc) 35%,var(--border)); }
.step { background: transparent; border-width: 1px 0 0; }
.step .media { display: none; }
.step-body { padding: 24px 8px 12px 0; }
.step-num { font-size: 24px; font-weight: 500; margin-bottom: 24px; }
.step h3 { font-weight: 600; }
.step p { font-size: 13px; line-height: 1.8; }
.cta { background: linear-gradient(115deg, #173d86 0%, #2059cb 52%, #2273eb 77%, #159fea 100%); border-top: 0; }
.contact { background: none; border-width: 0 0 1px; padding: 15px 0; }
.contact:hover { background: #ffffff08; }
.contact i { background: #159fea18; color: #b8e7ff; border: 1px solid #ffffff30; }
.contact b { font-weight: 600; }
.cta-visual { opacity: .8; }
.mobile-menu { gap: 0; }
.mobile-menu a + a { border-top: 1px solid var(--border); }
@media (max-width: 600px) {
  .eyebrow { font-size: 11px; letter-spacing: 0; }
  .stat { padding: 18px 12px; }
  .stat span { font-size: 11px; }
  .section-head { padding-left: 14px; }
  .pbody { padding: 20px; }
  .hero-cta .btn { padding: 12px 16px; font-size: 13px; }
  .chat { padding: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  :is(.btn, .chip, .project, .step, .tech, .contact, .nav-links a) { transition: none; }
}

/* Quiet native scrollbars: page and dialogs. */
:root { --scroll-track: #eef1f6; --scroll-thumb: #b4bfd0; }
:root[data-theme="dark"] { --scroll-track: #101827; --scroll-thumb: #3b4a63; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --scroll-track: #101827; --scroll-thumb: #3b4a63; }
}
* { scrollbar-width: thin; scrollbar-color: var(--scroll-thumb) var(--scroll-track); }
@supports selector(::-webkit-scrollbar) {
  * { scrollbar-width: auto; scrollbar-color: auto; }
  ::-webkit-scrollbar { width: 10px; height: 10px; }
  ::-webkit-scrollbar-track { background: var(--scroll-track); border-radius: 10px; }
  ::-webkit-scrollbar-thumb {
    background: var(--scroll-thumb);
    border: 2px solid var(--scroll-track);
    border-radius: 10px;
    min-height: 40px;
    min-width: 40px;
  }
  ::-webkit-scrollbar-thumb:hover, ::-webkit-scrollbar-thumb:active { background: color-mix(in srgb, var(--scroll-thumb) 70%, var(--text)); }
  ::-webkit-scrollbar-corner { background: var(--scroll-track); }
  ::-webkit-scrollbar-button { display: none; width: 0; height: 0; }
}
@media (forced-colors: active) {
  * { scrollbar-color: auto; }
  ::-webkit-scrollbar-thumb { background: ButtonText; border-color: Canvas; }
  ::-webkit-scrollbar-track, ::-webkit-scrollbar-corner { background: Canvas; }
}

/* Supporting motion: brief responses, no loops or large-scale movement. */
:root { --motion-ease: cubic-bezier(.22, 1, .36, 1); }
.reveal { opacity: 0; transform: translateY(12px); transition: opacity .48s var(--motion-ease), transform .48s var(--motion-ease); transition-delay: var(--reveal-delay, 0ms); }
.reveal.in { opacity: 1; transform: none; }
.reveal:focus-within { opacity: 1; transform: none; transition-delay: 0ms; }
:is(.btn, .icon-btn, .chip, .slider-tab, .suggest button) { transition: transform .18s var(--motion-ease), background-color .18s, border-color .18s, color .18s, box-shadow .18s; }
.btn svg, .more svg { transition: transform .2s var(--motion-ease); }
@media (hover: hover) and (pointer: fine) {
  .btn:hover { transform: translateY(-1px); }
  .btn:hover svg, .project:hover .more svg { transform: translateX(3px); }
  .project:hover { box-shadow: 0 6px 18px #2563eb09; }
}
:is(.btn, .icon-btn, .chip, .slider-tab, .suggest button):active { transform: scale(.98); }
.project { transition: border-color .2s, box-shadow .2s, opacity .48s var(--motion-ease), transform .48s var(--motion-ease); transition-delay: 0ms, 0ms, var(--reveal-delay, 0ms), var(--reveal-delay, 0ms); }
.slider-track { transition: transform .42s var(--motion-ease); }
.slider-bar span { transition: width .42s var(--motion-ease); }
.modal-backdrop.open { animation: modalFade .18s ease both; }
.modal-backdrop.open .modal { animation: modalEnter .28s var(--motion-ease) both; }
.mobile-menu.open { animation: menuEnter .2s var(--motion-ease) both; }
@keyframes modalFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalEnter { from { opacity: 0; transform: translateY(10px) scale(.995); } to { opacity: 1; transform: none; } }
@keyframes menuEnter { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  .btn:hover, .btn:active, .btn:hover svg, .project:hover .more svg { transform: none; }
}

/* Horizontal lists show edge arrows and fades instead of a scrollbar. */
.chips, .slider-tabs { scrollbar-width: none; }
.chips::-webkit-scrollbar, .slider-tabs::-webkit-scrollbar { display: none; }

.chips, .slider-tabs { scroll-behavior: auto; }
.chips.is-dragging, .chips.is-dragging *, .slider-tabs.is-dragging, .slider-tabs.is-dragging * {
  cursor: grabbing;
  user-select: none;
}
@media (hover: hover) and (max-width: 699px) { .chips, .chips button { cursor: grab; } }
@media (hover: hover) and (max-width: 899px) { .slider-tabs, .slider-tabs button { cursor: grab; } }

/* Phone layout: shorter page, readable labels, comfortable tap targets. */
@media (max-width: 639px) {
  .hero-cta .btn { flex: 1 1 auto; justify-content: center; }
  .chip { padding: 11px 14px; }
  .tag { font-size: 11px; padding: 3px 8px; }
  .more { font-size: 13px; }
  .suggest button { min-height: 44px; font-size: 13px; text-align: left; }
  .stack-group { padding: 20px 0 4px; }
  .stack-group > p { margin-bottom: 8px; }
  .techs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
  .tech { padding: 10px 0; gap: 10px; align-items: flex-start; }
  .tech > div { min-width: 0; }
  .tech small { display: block; line-height: 1.35; margin-top: 2px; overflow-wrap: anywhere; }
  .step-body { display: grid; grid-template-columns: 40px 1fr; column-gap: 12px; padding: 18px 0 14px; }
  .step-num { grid-row: 1 / span 2; font-size: 18px; line-height: 1.5; margin-bottom: 0; }
  .step h3 { margin-top: 0; }
  .modal-cta .btn { flex: 1 1 100%; justify-content: center; }
  .modal-nav button { min-height: 44px; }
}
