/* ===== Tokens ===== */
:root{
  --serif:Manrope,system-ui,sans-serif;
  --sans:Manrope,system-ui,sans-serif;
  --bg:#fbfbfa;--paper:#fff;--text:#16181d;--muted:#6b7280;--line:#e8e8e6;
  --accent:#2f4bd8;--accent-soft:#eef1fd;--ink:#16181d;--on-ink:#fff;
  color-scheme:light;
}
html[data-theme=dark]{
  --bg:#101215;--paper:#16191e;--text:#eceef2;--muted:#9097a3;--line:#262a31;
  --accent:#9db0ff;--accent-soft:#1d2540;--ink:#eceef2;--on-ink:#101215;color-scheme:dark;
}
html[data-theme=pixel]{
  --bg:#0b0a1f;--paper:#14123a;--text:#efe9d8;--muted:#9a96c0;--line:#2f2b66;
  --accent:#ffb62e;--accent-soft:#1d1a4a;--ink:#efe9d8;--on-ink:#0b0a1f;color-scheme:dark;
}

/* ===== Base ===== */
*{box-sizing:border-box;margin:0}
html{scroll-behavior:smooth}
body{overflow-x:clip;font:400 17px/1.65 var(--sans);background:var(--bg);color:var(--text);-webkit-font-smoothing:antialiased}
a{color:inherit;text-decoration:none}
button,input,textarea{font:inherit;color:inherit}
button{cursor:pointer;background:none;border:0}
:focus-visible{outline:2px solid var(--accent);outline-offset:3px;border-radius:6px}
.muted{color:var(--muted)}
.mono{font-family:var(--sans)}

/* ===== Layout ===== */
.shell{display:grid;grid-template-columns:320px minmax(0,1fr);max-width:1480px;margin:0 auto;min-height:100vh}
.main-column{display:flex;flex-direction:column;width:100%;min-width:0;overflow-wrap:break-word;padding:72px 80px 48px}
.right-rail{display:none}

/* ===== Sidebar ===== */
.sidebar{min-width:0;position:sticky;top:0;height:100vh;padding:56px 44px 40px;display:flex;flex-direction:column;border-right:1px solid var(--line)}
.profile{display:flex;flex-direction:column;gap:2px;margin-bottom:48px}
.profile strong{font-size:18px;font-weight:600;margin-top:16px}
.profile .muted{font-size:15px}
.avatar{display:grid;place-items:center;border-radius:50%;background:var(--ink);color:var(--on-ink);font-weight:600;position:relative}
.avatar-large{width:64px;height:64px;font-size:20px}
.avatar-small{width:40px;height:40px;font-size:14px}
.avatar-tiny{width:28px;height:28px;font-size:11px}
.status-dot{position:absolute;right:1px;bottom:1px;width:13px;height:13px;border-radius:50%;background:#34c27a;border:3px solid var(--bg)}
.side-caption{display:none}
.nav{display:flex;flex-direction:column;gap:4px}
.nav-link{display:flex;align-items:center;justify-content:space-between;padding:10px 14px;margin:0 -14px;border-radius:12px;font-size:17px;font-weight:500;color:var(--muted);transition:.2s}
.nav-link:hover{color:var(--text);background:var(--accent-soft)}
.nav-link.active{color:var(--text);background:var(--accent-soft);font-weight:600}
.nav-icon{display:none}
.count{font-weight:500;font-size:14px;color:var(--muted)}
.sidebar-bottom{margin-top:auto}
.theme-switch{display:flex;padding:4px;border:1px solid var(--line);border-radius:999px;width:fit-content}
.theme-option{width:40px;height:40px;display:grid;place-items:center;border-radius:50%;color:var(--muted);transition:.2s}
.theme-option:hover{color:var(--text)}
.theme-option svg.px{fill:currentColor;stroke:none}
.theme-option svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.theme-option.selected{background:var(--ink);color:var(--on-ink)}

/* ===== Page head ===== */
.topbar{display:flex;align-items:flex-end;justify-content:space-between;gap:24px;margin-bottom:12px}
.eyebrow{display:none}
h1{font:700 clamp(38px,5vw,58px)/1.05 var(--serif);letter-spacing:-.035em}
.title-mark{color:var(--accent)}
.header-note{font-size:15px;color:var(--muted);padding-bottom:10px}
.intro-strip{margin:0 0 48px;padding-bottom:40px;border-bottom:1px solid var(--line)}
.intro-strip p{font-size:20px;line-height:1.55;color:var(--muted);max-width:40em}
.intro-strip .pixel-mark,.intro-strip .mono{display:none}

/* ===== Buttons ===== */
.button{display:inline-flex;align-items:center;gap:8px;padding:12px 22px;border-radius:999px;font-weight:600;font-size:16px;transition:.2s}
.button-primary{background:var(--ink);color:var(--on-ink)}
.button-primary:hover{opacity:.85}
.button-quiet{color:var(--muted)}
.button-quiet:hover{color:var(--text)}
.text-button{color:var(--accent);font-weight:600}
.text-button:hover{text-decoration:underline}

/* ===== Feed ===== */
.feed-toolbar{display:flex;justify-content:space-between;align-items:baseline;margin-bottom:8px;font-size:15px;color:var(--muted)}
.section-label{font-weight:600;color:var(--text)}
.post{padding:40px 0;border-bottom:1px solid var(--line)}
.post-head{display:flex;align-items:center;gap:14px;margin-bottom:24px}
.post-head strong{font-size:16px;font-weight:600}
.post-meta{font-size:15px;color:var(--muted)}
.post-meta span{margin:0 4px}
.more-button{margin-left:auto;color:var(--muted);padding:4px 8px;letter-spacing:2px}
.post-content h2{font:700 clamp(24px,2.6vw,30px)/1.22 var(--serif);letter-spacing:-.025em;margin-bottom:16px}
.post-content p{max-width:46em;margin-bottom:14px;color:var(--text);opacity:.88}
.post-art{display:none}
.post-footer{display:flex;align-items:center;flex-wrap:wrap;gap:12px 24px;margin-top:24px;font-size:15px;color:var(--muted)}
.post-footer .like{display:inline-flex;gap:6px;transition:.2s}
.post-footer .like:hover,.post-footer .like.liked{color:var(--accent)}
.post-tag{margin-left:auto;padding:5px 14px;border-radius:999px;background:var(--accent-soft);color:var(--accent);font-weight:600;font-size:14px}
.comment-preview{display:flex;flex-wrap:wrap;align-items:center;gap:8px 12px;margin-top:22px;padding:14px 18px;border-radius:14px;background:var(--accent-soft);font-size:15px;color:var(--muted)}
.comment-preview .text-button{margin-left:auto}

/* ===== Projects ===== */
.project-list{display:flex;flex-direction:column}
.project-card{display:grid;grid-template-columns:1fr auto;gap:24px;align-items:center;padding:40px 0;border-bottom:1px solid var(--line)}
.project-card:first-child{padding-top:8px}
.project-number{display:none}
.project-main{display:flex;gap:28px;align-items:flex-start}
.project-logo{position:relative;overflow:hidden;flex:none;width:88px;height:88px;border-radius:24px;display:grid;place-items:center;font:700 26px var(--sans);letter-spacing:-.02em;background:var(--accent-soft);color:var(--accent);border:1px solid var(--line)}
.project-logo img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.project-main h2{font:700 26px/1.15 var(--serif);letter-spacing:-.025em;margin-bottom:10px}
.project-main p{color:var(--muted);max-width:40em;margin-bottom:14px}
.inline-link{font-weight:600;color:var(--accent);border-bottom:1px solid transparent;transition:.2s}
.inline-link:hover{border-color:var(--accent)}
.project-meta{display:flex;flex-direction:column;align-items:flex-end;gap:6px;font-size:14px;color:var(--muted)}
.project-meta span:first-child{display:none}
.live-dot{color:#2fa76a;font-weight:600}

/* ===== Notes ===== */
.file-toolbar{display:flex;flex-direction:column;gap:20px;margin-bottom:24px}
.breadcrumbs{display:none}
.search-input{width:100%;padding:14px 20px;border:1px solid var(--line);border-radius:999px;background:var(--paper);font-size:16px;outline:0;transition:.2s}
.search-input:focus{border-color:var(--accent)}
.file-layout{display:flex;flex-direction:column;gap:24px}
.folder-tree{display:flex;flex-wrap:wrap;gap:8px}
.tree-title{display:none}
.folder{display:inline-flex;gap:8px;align-items:baseline;padding:8px 16px;border:1px solid var(--line);border-radius:999px;font-size:15px;font-weight:500;color:var(--muted);transition:.2s}
.folder span{display:none}
.folder small{font-size:13px;opacity:.7}
.folder:hover{color:var(--text);border-color:var(--muted)}
.folder.active{background:var(--ink);color:var(--on-ink);border-color:var(--ink)}
.file-panel-head,.file-row{display:grid;grid-template-columns:1fr 110px 90px 90px;gap:16px;align-items:center;text-align:left;width:100%}
.file-panel-head{padding:0 0 12px;font-size:14px;color:var(--muted);border-bottom:1px solid var(--line)}
.file-row{padding:18px 0;border-bottom:1px solid var(--line);font-size:16px;color:var(--muted);transition:.2s}
.file-row:hover .file-name{color:var(--accent)}
.file-row.hidden{display:none}
.file-name{min-width:0;display:flex;align-items:center;gap:14px;color:var(--text);font-weight:600;transition:.2s}
.file-icon{font-style:normal;font-size:11px;font-weight:700;padding:5px 7px;border-radius:8px;background:var(--accent-soft);color:var(--accent);min-width:42px;text-align:center}
.archive-note{margin-top:28px;font-size:15px;color:var(--muted)}
.archive-note .pixel-mark{display:none}

/* ===== Contacts ===== */
.contact-layout{display:flex;flex-direction:column;gap:40px}
.contact-lead h2{font:700 clamp(30px,3.4vw,40px)/1.1 var(--serif);letter-spacing:-.03em;margin-bottom:16px}
.contact-lead p{color:var(--muted);max-width:32em;font-size:18px}
.contact-lead .eyebrow,.contact-stamp{display:none}
.contact-list{display:grid;grid-template-columns:repeat(2,1fr);gap:16px}
.contact-item{position:relative;display:flex;flex-direction:column;gap:4px;padding:28px;border:1px solid var(--line);border-radius:24px;background:var(--paper);transition:.25s}
.contact-item:hover{border-color:var(--accent);transform:translateY(-3px)}
.contact-icon{width:48px;height:48px;border-radius:50%;display:grid;place-items:center;background:var(--accent-soft);color:var(--accent);margin-bottom:28px;font-weight:800;font-size:15px;transition:.25s}
.contact-icon svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.contact-item:hover .contact-icon{background:var(--accent);color:var(--bg)}
.contact-type{display:none}
.contact-item strong{font-size:20px;font-weight:700}
.contact-value{color:var(--muted);font-size:16px}
.contact-value b{position:absolute;top:26px;right:28px;font-size:22px;font-weight:400;color:var(--muted);transition:.25s}
.contact-item:hover .contact-value b{color:var(--accent);transform:translate(3px,-3px)}

/* ===== Post page ===== */
.read-more{color:var(--accent);font-weight:600}
.read-more:hover,.post-content h2 a:hover{text-decoration:underline}
.post-content h2 a:hover{color:var(--accent)}
.back-link{display:inline-block;margin-bottom:40px;font-size:16px;font-weight:600;color:var(--muted);transition:.2s}
.back-link:hover{color:var(--accent)}
.article{max-width:46em}
.article-meta{display:flex;align-items:center;gap:14px;margin:28px 0 40px;padding-bottom:32px;border-bottom:1px solid var(--line);font-size:15px;color:var(--muted)}
.article-meta strong{color:var(--text);font-size:16px;font-weight:600}
.article-meta .post-tag{margin-left:auto}
.article-body p{font-size:19px;line-height:1.8;margin-bottom:24px;opacity:.92}
.article-body h2{font:700 26px/1.25 var(--serif);letter-spacing:-.025em;margin:48px 0 18px}
.article-body blockquote{margin:36px 0;padding:6px 0 6px 28px;border-left:3px solid var(--accent);font-size:22px;line-height:1.5;font-weight:600;letter-spacing:-.01em}
.article-actions{display:flex;flex-wrap:wrap;gap:12px 24px;align-items:center;margin-top:48px;padding-top:28px;border-top:1px solid var(--line);font-size:15px;color:var(--muted)}
.article-actions .text-button{margin-left:auto}
.comments{margin-top:56px}
.comments h2{font:700 22px/1.2 var(--serif);letter-spacing:-.02em;margin-bottom:20px}
html[data-theme=pixel] .article-body h2,html[data-theme=pixel] .comments h2{font-family:'Press Start 2P',ui-monospace,monospace;font-weight:400;letter-spacing:0;font-size:15px;line-height:1.7}
html[data-theme=pixel] .article-body blockquote{border-left-width:4px}

/* ===== Footer ===== */
.page-footer{margin-top:auto;padding-top:72px;font-size:15px;color:var(--muted);text-align:right}

/* ===== Modal / toast ===== */
.modal-backdrop{position:fixed;inset:0;display:none;align-items:center;justify-content:center;padding:20px;background:rgba(10,12,20,.5);backdrop-filter:blur(8px);z-index:10}
.modal-backdrop.open{display:flex}
.modal{width:min(640px,100%);background:var(--paper);border:1px solid var(--line);border-radius:28px;padding:36px;box-shadow:0 30px 90px rgba(0,0,0,.25)}
.modal-head{display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:28px}
.modal-head h2{font:700 28px/1.15 var(--serif);letter-spacing:-.025em}
.close-button{font-size:30px;line-height:1;color:var(--muted);padding:0 6px}
.field-label{display:block;font-size:15px;font-weight:600;margin:18px 0 8px}
.modal input,.modal textarea{width:100%;padding:14px 16px;border:1px solid var(--line);border-radius:14px;background:var(--bg);outline:0;resize:vertical;transition:.2s}
.modal input:focus,.modal textarea:focus{border-color:var(--accent)}
.editor-tools{display:block}
.editor-tools>.mono{display:none}
.modal-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:28px}
.toast{position:fixed;bottom:28px;left:50%;transform:translate(-50%,20px);opacity:0;pointer-events:none;background:var(--ink);color:var(--on-ink);padding:12px 22px;border-radius:999px;font-size:15px;font-weight:500;z-index:20;transition:.25s}
.toast.show{opacity:1;transform:translate(-50%,0)}

/* ===== Cosmic: pixel / space / free jazz ===== */
html[data-theme=pixel] body{position:relative;isolation:isolate;
  background:linear-gradient(to bottom,#0b0a1f 0 76%,#100e2e 76% 86%,#151239 86% 94%,#1b1648 94% 100%) fixed}

/* звёзды: чёткие пиксели, шаговое движение и мигание */
html[data-theme=pixel]::before{content:"";position:fixed;inset:0;z-index:-1;pointer-events:none;
  background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='360' height='360' shape-rendering='crispEdges'%3E%3Crect x='164' y='76' width='2' height='2' fill='%23efe9d8'/%3E%3Crect x='332' y='24' width='2' height='2' fill='%23efe9d8'/%3E%3Crect x='272' y='48' width='2' height='2' fill='%236e69a8'/%3E%3Crect x='296' y='28' width='2' height='2' fill='%239a96c0'/%3E%3Crect x='16' y='44' width='2' height='2' fill='%23efe9d8'/%3E%3Crect x='212' y='32' width='2' height='2' fill='%239a96c0'/%3E%3Crect x='44' y='280' width='2' height='2' fill='%23efe9d8'/%3E%3Crect x='28' y='288' width='2' height='2' fill='%23efe9d8'/%3E%3Crect x='112' y='320' width='2' height='2' fill='%23efe9d8'/%3E%3Crect x='292' y='296' width='2' height='2' fill='%23efe9d8'/%3E%3Crect x='24' y='112' width='2' height='2' fill='%23efe9d8'/%3E%3Crect x='284' y='68' width='2' height='2' fill='%236e69a8'/%3E%3Crect x='212' y='72' width='2' height='2' fill='%23efe9d8'/%3E%3Crect x='292' y='156' width='2' height='2' fill='%239a96c0'/%3E%3Crect x='52' y='296' width='2' height='2' fill='%239a96c0'/%3E%3Crect x='188' y='48' width='2' height='2' fill='%23efe9d8'/%3E%3Crect x='288' y='28' width='2' height='2' fill='%239a96c0'/%3E%3Crect x='252' y='348' width='2' height='2' fill='%23efe9d8'/%3E%3Crect x='160' y='236' width='2' height='2' fill='%23efe9d8'/%3E%3Crect x='184' y='152' width='2' height='2' fill='%239a96c0'/%3E%3Crect x='92' y='356' width='2' height='2' fill='%239a96c0'/%3E%3Crect x='40' y='292' width='2' height='2' fill='%236e69a8'/%3E%3Crect x='268' y='252' width='2' height='2' fill='%236e69a8'/%3E%3Crect x='228' y='144' width='2' height='2' fill='%23efe9d8'/%3E%3Crect x='60' y='260' width='2' height='2' fill='%23efe9d8'/%3E%3Crect x='84' y='172' width='2' height='2' fill='%239a96c0'/%3E%3Crect x='248' y='212' width='2' height='2' fill='%23efe9d8'/%3E%3Crect x='340' y='36' width='2' height='2' fill='%236e69a8'/%3E%3Crect x='172' y='352' width='2' height='2' fill='%236e69a8'/%3E%3Crect x='304' y='252' width='2' height='2' fill='%23efe9d8'/%3E%3Crect x='32' y='44' width='2' height='2' fill='%236e69a8'/%3E%3Crect x='240' y='356' width='2' height='2' fill='%23efe9d8'/%3E%3Crect x='28' y='356' width='2' height='2' fill='%236e69a8'/%3E%3Crect x='328' y='292' width='2' height='2' fill='%23efe9d8'/%3E%3C/svg%3E");image-rendering:pixelated;animation:px-far 240s steps(120) infinite}
html[data-theme=pixel] body::before{content:"";position:fixed;inset:0;z-index:-1;pointer-events:none;
  background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='640' height='640' shape-rendering='crispEdges'%3E%3Crect x='288' y='392' width='4' height='4' fill='%23ffb62e'/%3E%3Crect x='20' y='472' width='4' height='4' fill='%23ffb62e'/%3E%3Crect x='172' y='624' width='4' height='4' fill='%23efe9d8'/%3E%3Crect x='504' y='60' width='4' height='4' fill='%23efe9d8'/%3E%3Crect x='292' y='132' width='4' height='4' fill='%23efe9d8'/%3E%3Crect x='404' y='400' width='4' height='4' fill='%233dd6c6'/%3E%3Crect x='80' y='168' width='4' height='4' fill='%233dd6c6'/%3E%3Crect x='408' y='560' width='4' height='4' fill='%23ffb62e'/%3E%3Crect x='140' y='440' width='4' height='4' fill='%23ffb62e'/%3E%3Crect x='424' y='364' width='4' height='4' fill='%233dd6c6'/%3E%3Crect x='244' y='160' width='4' height='4' fill='%23ffb62e'/%3E%3Crect x='248' y='160' width='4' height='4' fill='%23ffb62e'/%3E%3Crect x='240' y='160' width='4' height='4' fill='%23ffb62e'/%3E%3Crect x='244' y='164' width='4' height='4' fill='%23ffb62e'/%3E%3Crect x='244' y='156' width='4' height='4' fill='%23ffb62e'/%3E%3Crect x='188' y='160' width='4' height='4' fill='%23ff5c8a'/%3E%3Crect x='192' y='160' width='4' height='4' fill='%23ff5c8a'/%3E%3Crect x='184' y='160' width='4' height='4' fill='%23ff5c8a'/%3E%3Crect x='188' y='164' width='4' height='4' fill='%23ff5c8a'/%3E%3Crect x='188' y='156' width='4' height='4' fill='%23ff5c8a'/%3E%3Crect x='244' y='20' width='4' height='4' fill='%23efe9d8'/%3E%3Crect x='248' y='20' width='4' height='4' fill='%23efe9d8'/%3E%3Crect x='240' y='20' width='4' height='4' fill='%23efe9d8'/%3E%3Crect x='244' y='24' width='4' height='4' fill='%23efe9d8'/%3E%3Crect x='244' y='16' width='4' height='4' fill='%23efe9d8'/%3E%3Crect x='608' y='192' width='4' height='4' fill='%233dd6c6'/%3E%3Crect x='612' y='192' width='4' height='4' fill='%233dd6c6'/%3E%3Crect x='604' y='192' width='4' height='4' fill='%233dd6c6'/%3E%3Crect x='608' y='196' width='4' height='4' fill='%233dd6c6'/%3E%3Crect x='608' y='188' width='4' height='4' fill='%233dd6c6'/%3E%3C/svg%3E");image-rendering:pixelated;animation:px-near 120s steps(120) infinite,blink 4s steps(1) infinite}

/* пиксельная планета с кольцом */
html[data-theme=pixel]::after{content:"";position:fixed;right:-60px;bottom:-50px;width:240px;height:240px;z-index:-1;pointer-events:none;
  background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240' shape-rendering='crispEdges'%3E%3Crect x='32' y='72' width='8' height='8' fill='%231f9c92'/%3E%3Crect x='40' y='72' width='8' height='8' fill='%231f9c92'/%3E%3Crect x='48' y='72' width='8' height='8' fill='%231f9c92'/%3E%3Crect x='56' y='72' width='8' height='8' fill='%231f9c92'/%3E%3Crect x='24' y='80' width='8' height='8' fill='%231f9c92'/%3E%3Crect x='32' y='80' width='8' height='8' fill='%231f9c92'/%3E%3Crect x='184' y='120' width='8' height='8' fill='%231f9c92'/%3E%3Crect x='192' y='128' width='8' height='8' fill='%231f9c92'/%3E%3Crect x='200' y='128' width='8' height='8' fill='%231f9c92'/%3E%3Crect x='200' y='136' width='8' height='8' fill='%231f9c92'/%3E%3Crect x='208' y='136' width='8' height='8' fill='%231f9c92'/%3E%3Crect x='208' y='144' width='8' height='8' fill='%231f9c92'/%3E%3Crect x='216' y='144' width='8' height='8' fill='%231f9c92'/%3E%3Crect x='216' y='152' width='8' height='8' fill='%231f9c92'/%3E%3Crect x='88' y='56' width='8' height='8' fill='%23ffb62e'/%3E%3Crect x='96' y='56' width='8' height='8' fill='%23ffb62e'/%3E%3Crect x='104' y='56' width='8' height='8' fill='%23ffb62e'/%3E%3Crect x='112' y='56' width='8' height='8' fill='%23ffb62e'/%3E%3Crect x='120' y='56' width='8' height='8' fill='%23ffb62e'/%3E%3Crect x='128' y='56' width='8' height='8' fill='%23ffb62e'/%3E%3Crect x='136' y='56' width='8' height='8' fill='%23ffb62e'/%3E%3Crect x='144' y='56' width='8' height='8' fill='%23ffb62e'/%3E%3Crect x='80' y='64' width='8' height='8' fill='%23ffb62e'/%3E%3Crect x='88' y='64' width='8' height='8' fill='%23ffb62e'/%3E%3Crect x='96' y='64' width='8' height='8' fill='%23ffb62e'/%3E%3Crect x='104' y='64' width='8' height='8' fill='%23ffb62e'/%3E%3Crect x='112' y='64' width='8' height='8' fill='%23ffb62e'/%3E%3Crect x='120' y='64' width='8' height='8' fill='%23ffb62e'/%3E%3Crect x='128' y='64' width='8' height='8' fill='%23ffb62e'/%3E%3Crect x='136' y='64' width='8' height='8' fill='%23ffb62e'/%3E%3Crect x='144' y='64' width='8' height='8' fill='%23ffb62e'/%3E%3Crect x='152' y='64' width='8' height='8' fill='%23ffb62e'/%3E%3Crect x='72' y='72' width='8' height='8' fill='%23ffb62e'/%3E%3Crect x='80' y='72' width='8' height='8' fill='%23ffb62e'/%3E%3Crect x='88' y='72' width='8' height='8' fill='%23ffb62e'/%3E%3Crect x='96' y='72' width='8' height='8' fill='%23ffb62e'/%3E%3Crect x='104' y='72' width='8' height='8' fill='%23ffb62e'/%3E%3Crect x='112' y='72' width='8' height='8' fill='%23ffb62e'/%3E%3Crect x='120' y='72' width='8' height='8' fill='%23ffb62e'/%3E%3Crect x='128' y='72' width='8' height='8' fill='%23ffb62e'/%3E%3Crect x='136' y='72' width='8' height='8' fill='%23ffb62e'/%3E%3Crect x='144' y='72' width='8' height='8' fill='%23ffb62e'/%3E%3Crect x='152' y='72' width='8' height='8' fill='%23ffb62e'/%3E%3Crect x='160' y='72' width='8' height='8' fill='%23ffb62e'/%3E%3Crect x='64' y='80' width='8' height='8' fill='%23ffb62e'/%3E%3Crect x='72' y='80' width='8' height='8' fill='%23ffb62e'/%3E%3Crect x='80' y='80' width='8' height='8' fill='%23ffb62e'/%3E%3Crect x='88' y='80' width='8' height='8' fill='%23ffb62e'/%3E%3Crect x='96' y='80' width='8' height='8' fill='%23ffb62e'/%3E%3Crect x='104' y='80' width='8' height='8' fill='%23ffb62e'/%3E%3Crect x='112' y='80' width='8' height='8' fill='%23ffb62e'/%3E%3Crect x='120' y='80' width='8' height='8' fill='%23ffb62e'/%3E%3Crect x='128' y='80' width='8' height='8' fill='%23ffb62e'/%3E%3Crect x='136' y='80' width='8' height='8' fill='%23ffb62e'/%3E%3Crect x='144' y='80' width='8' height='8' fill='%23ffb62e'/%3E%3Crect x='152' y='80' width='8' height='8' fill='%23ffb62e'/%3E%3Crect x='160' y='80' width='8' height='8' fill='%23ffb62e'/%3E%3Crect x='168' y='80' width='8' height='8' fill='%23ffb62e'/%3E%3Crect x='56' y='88' width='8' height='8' fill='%23ffb62e'/%3E%3Crect x='64' y='88' width='8' height='8' fill='%23ffb62e'/%3E%3Crect x='72' y='88' width='8' height='8' fill='%23ffb62e'/%3E%3Crect x='80' y='88' width='8' height='8' fill='%23ffb62e'/%3E%3Crect x='88' y='88' width='8' height='8' fill='%23ffb62e'/%3E%3Crect x='96' y='88' width='8' height='8' fill='%23ffb62e'/%3E%3Crect x='104' y='88' width='8' height='8' fill='%23ffb62e'/%3E%3Crect x='112' y='88' width='8' height='8' fill='%23ffb62e'/%3E%3Crect x='120' y='88' width='8' height='8' fill='%23ffb62e'/%3E%3Crect x='128' y='88' width='8' height='8' fill='%23ffb62e'/%3E%3Crect x='136' y='88' width='8' height='8' fill='%23ffb62e'/%3E%3Crect x='144' y='88' width='8' height='8' fill='%23ffb62e'/%3E%3Crect x='152' y='88' width='8' height='8' fill='%23ffb62e'/%3E%3Crect x='160' y='88' width='8' height='8' fill='%23ffb62e'/%3E%3Crect x='168' y='88' width='8' height='8' fill='%23ffb62e'/%3E%3Crect x='176' y='88' width='8' height='8' fill='%23ffb62e'/%3E%3Crect x='56' y='96' width='8' height='8' fill='%23f08a24'/%3E%3Crect x='64' y='96' width='8' height='8' fill='%23f08a24'/%3E%3Crect x='72' y='96' width='8' height='8' fill='%23f08a24'/%3E%3Crect x='80' y='96' width='8' height='8' fill='%23f08a24'/%3E%3Crect x='88' y='96' width='8' height='8' fill='%23f08a24'/%3E%3Crect x='96' y='96' width='8' height='8' fill='%23f08a24'/%3E%3Crect x='104' y='96' width='8' height='8' fill='%23f08a24'/%3E%3Crect x='112' y='96' width='8' height='8' fill='%23f08a24'/%3E%3Crect x='120' y='96' width='8' height='8' fill='%23f08a24'/%3E%3Crect x='128' y='96' width='8' height='8' fill='%23f08a24'/%3E%3Crect x='136' y='96' width='8' height='8' fill='%23f08a24'/%3E%3Crect x='144' y='96' width='8' height='8' fill='%23f08a24'/%3E%3Crect x='152' y='96' width='8' height='8' fill='%23f08a24'/%3E%3Crect x='160' y='96' width='8' height='8' fill='%23f08a24'/%3E%3Crect x='168' y='96' width='8' height='8' fill='%23f08a24'/%3E%3Crect x='176' y='96' width='8' height='8' fill='%23c4671a'/%3E%3Crect x='56' y='104' width='8' height='8' fill='%23f08a24'/%3E%3Crect x='64' y='104' width='8' height='8' fill='%23f08a24'/%3E%3Crect x='72' y='104' width='8' height='8' fill='%23f08a24'/%3E%3Crect x='80' y='104' width='8' height='8' fill='%23f08a24'/%3E%3Crect x='88' y='104' width='8' height='8' fill='%23f08a24'/%3E%3Crect x='96' y='104' width='8' height='8' fill='%23f08a24'/%3E%3Crect x='104' y='104' width='8' height='8' fill='%23f08a24'/%3E%3Crect x='112' y='104' width='8' height='8' fill='%23f08a24'/%3E%3Crect x='120' y='104' width='8' height='8' fill='%23f08a24'/%3E%3Crect x='128' y='104' width='8' height='8' fill='%23f08a24'/%3E%3Crect x='136' y='104' width='8' height='8' fill='%23f08a24'/%3E%3Crect x='144' y='104' width='8' height='8' fill='%23f08a24'/%3E%3Crect x='152' y='104' width='8' height='8' fill='%23f08a24'/%3E%3Crect x='160' y='104' width='8' height='8' fill='%23f08a24'/%3E%3Crect x='168' y='104' width='8' height='8' fill='%23c4671a'/%3E%3Crect x='176' y='104' width='8' height='8' fill='%23c4671a'/%3E%3Crect x='56' y='112' width='8' height='8' fill='%23f08a24'/%3E%3Crect x='64' y='112' width='8' height='8' fill='%23f08a24'/%3E%3Crect x='72' y='112' width='8' height='8' fill='%23f08a24'/%3E%3Crect x='80' y='112' width='8' height='8' fill='%23f08a24'/%3E%3Crect x='88' y='112' width='8' height='8' fill='%23f08a24'/%3E%3Crect x='96' y='112' width='8' height='8' fill='%23f08a24'/%3E%3Crect x='104' y='112' width='8' height='8' fill='%23f08a24'/%3E%3Crect x='112' y='112' width='8' height='8' fill='%23f08a24'/%3E%3Crect x='120' y='112' width='8' height='8' fill='%23f08a24'/%3E%3Crect x='128' y='112' width='8' height='8' fill='%23f08a24'/%3E%3Crect x='136' y='112' width='8' height='8' fill='%23f08a24'/%3E%3Crect x='144' y='112' width='8' height='8' fill='%23f08a24'/%3E%3Crect x='152' y='112' width='8' height='8' fill='%23f08a24'/%3E%3Crect x='160' y='112' width='8' height='8' fill='%23c4671a'/%3E%3Crect x='168' y='112' width='8' height='8' fill='%23c4671a'/%3E%3Crect x='176' y='112' width='8' height='8' fill='%23c4671a'/%3E%3Crect x='56' y='120' width='8' height='8' fill='%23ff5c8a'/%3E%3Crect x='64' y='120' width='8' height='8' fill='%23ff5c8a'/%3E%3Crect x='72' y='120' width='8' height='8' fill='%23ff5c8a'/%3E%3Crect x='80' y='120' width='8' height='8' fill='%23ff5c8a'/%3E%3Crect x='88' y='120' width='8' height='8' fill='%23ff5c8a'/%3E%3Crect x='96' y='120' width='8' height='8' fill='%23ff5c8a'/%3E%3Crect x='104' y='120' width='8' height='8' fill='%23ff5c8a'/%3E%3Crect x='112' y='120' width='8' height='8' fill='%23ff5c8a'/%3E%3Crect x='120' y='120' width='8' height='8' fill='%23ff5c8a'/%3E%3Crect x='128' y='120' width='8' height='8' fill='%23ff5c8a'/%3E%3Crect x='136' y='120' width='8' height='8' fill='%23ff5c8a'/%3E%3Crect x='144' y='120' width='8' height='8' fill='%23ff5c8a'/%3E%3Crect x='152' y='120' width='8' height='8' fill='%23c9376a'/%3E%3Crect x='160' y='120' width='8' height='8' fill='%23c9376a'/%3E%3Crect x='168' y='120' width='8' height='8' fill='%23c9376a'/%3E%3Crect x='176' y='120' width='8' height='8' fill='%23c9376a'/%3E%3Crect x='56' y='128' width='8' height='8' fill='%23ff5c8a'/%3E%3Crect x='64' y='128' width='8' height='8' fill='%23ff5c8a'/%3E%3Crect x='72' y='128' width='8' height='8' fill='%23ff5c8a'/%3E%3Crect x='80' y='128' width='8' height='8' fill='%23ff5c8a'/%3E%3Crect x='88' y='128' width='8' height='8' fill='%23ff5c8a'/%3E%3Crect x='96' y='128' width='8' height='8' fill='%23ff5c8a'/%3E%3Crect x='104' y='128' width='8' height='8' fill='%23ff5c8a'/%3E%3Crect x='112' y='128' width='8' height='8' fill='%23ff5c8a'/%3E%3Crect x='120' y='128' width='8' height='8' fill='%23ff5c8a'/%3E%3Crect x='128' y='128' width='8' height='8' fill='%23ff5c8a'/%3E%3Crect x='136' y='128' width='8' height='8' fill='%23ff5c8a'/%3E%3Crect x='144' y='128' width='8' height='8' fill='%23c9376a'/%3E%3Crect x='152' y='128' width='8' height='8' fill='%23c9376a'/%3E%3Crect x='160' y='128' width='8' height='8' fill='%23c9376a'/%3E%3Crect x='168' y='128' width='8' height='8' fill='%23c9376a'/%3E%3Crect x='176' y='128' width='8' height='8' fill='%23c9376a'/%3E%3Crect x='56' y='136' width='8' height='8' fill='%23ff5c8a'/%3E%3Crect x='64' y='136' width='8' height='8' fill='%23ff5c8a'/%3E%3Crect x='72' y='136' width='8' height='8' fill='%23ff5c8a'/%3E%3Crect x='80' y='136' width='8' height='8' fill='%23ff5c8a'/%3E%3Crect x='88' y='136' width='8' height='8' fill='%23ff5c8a'/%3E%3Crect x='96' y='136' width='8' height='8' fill='%23ff5c8a'/%3E%3Crect x='104' y='136' width='8' height='8' fill='%23ff5c8a'/%3E%3Crect x='112' y='136' width='8' height='8' fill='%23ff5c8a'/%3E%3Crect x='120' y='136' width='8' height='8' fill='%23ff5c8a'/%3E%3Crect x='128' y='136' width='8' height='8' fill='%23ff5c8a'/%3E%3Crect x='136' y='136' width='8' height='8' fill='%23c9376a'/%3E%3Crect x='144' y='136' width='8' height='8' fill='%23c9376a'/%3E%3Crect x='152' y='136' width='8' height='8' fill='%23c9376a'/%3E%3Crect x='160' y='136' width='8' height='8' fill='%23c9376a'/%3E%3Crect x='168' y='136' width='8' height='8' fill='%23c9376a'/%3E%3Crect x='176' y='136' width='8' height='8' fill='%23c9376a'/%3E%3Crect x='56' y='144' width='8' height='8' fill='%23b0346a'/%3E%3Crect x='64' y='144' width='8' height='8' fill='%23b0346a'/%3E%3Crect x='72' y='144' width='8' height='8' fill='%23b0346a'/%3E%3Crect x='80' y='144' width='8' height='8' fill='%23b0346a'/%3E%3Crect x='88' y='144' width='8' height='8' fill='%23b0346a'/%3E%3Crect x='96' y='144' width='8' height='8' fill='%23b0346a'/%3E%3Crect x='104' y='144' width='8' height='8' fill='%23b0346a'/%3E%3Crect x='112' y='144' width='8' height='8' fill='%23b0346a'/%3E%3Crect x='120' y='144' width='8' height='8' fill='%23b0346a'/%3E%3Crect x='128' y='144' width='8' height='8' fill='%237d2352'/%3E%3Crect x='136' y='144' width='8' height='8' fill='%237d2352'/%3E%3Crect x='144' y='144' width='8' height='8' fill='%237d2352'/%3E%3Crect x='152' y='144' width='8' height='8' fill='%237d2352'/%3E%3Crect x='160' y='144' width='8' height='8' fill='%237d2352'/%3E%3Crect x='168' y='144' width='8' height='8' fill='%237d2352'/%3E%3Crect x='176' y='144' width='8' height='8' fill='%237d2352'/%3E%3Crect x='64' y='152' width='8' height='8' fill='%23b0346a'/%3E%3Crect x='72' y='152' width='8' height='8' fill='%23b0346a'/%3E%3Crect x='80' y='152' width='8' height='8' fill='%23b0346a'/%3E%3Crect x='88' y='152' width='8' height='8' fill='%23b0346a'/%3E%3Crect x='96' y='152' width='8' height='8' fill='%23b0346a'/%3E%3Crect x='104' y='152' width='8' height='8' fill='%23b0346a'/%3E%3Crect x='112' y='152' width='8' height='8' fill='%23b0346a'/%3E%3Crect x='120' y='152' width='8' height='8' fill='%237d2352'/%3E%3Crect x='128' y='152' width='8' height='8' fill='%237d2352'/%3E%3Crect x='136' y='152' width='8' height='8' fill='%237d2352'/%3E%3Crect x='144' y='152' width='8' height='8' fill='%237d2352'/%3E%3Crect x='152' y='152' width='8' height='8' fill='%237d2352'/%3E%3Crect x='160' y='152' width='8' height='8' fill='%237d2352'/%3E%3Crect x='168' y='152' width='8' height='8' fill='%237d2352'/%3E%3Crect x='72' y='160' width='8' height='8' fill='%23b0346a'/%3E%3Crect x='80' y='160' width='8' height='8' fill='%23b0346a'/%3E%3Crect x='88' y='160' width='8' height='8' fill='%23b0346a'/%3E%3Crect x='96' y='160' width='8' height='8' fill='%23b0346a'/%3E%3Crect x='104' y='160' width='8' height='8' fill='%23b0346a'/%3E%3Crect x='112' y='160' width='8' height='8' fill='%237d2352'/%3E%3Crect x='120' y='160' width='8' height='8' fill='%237d2352'/%3E%3Crect x='128' y='160' width='8' height='8' fill='%237d2352'/%3E%3Crect x='136' y='160' width='8' height='8' fill='%237d2352'/%3E%3Crect x='144' y='160' width='8' height='8' fill='%237d2352'/%3E%3Crect x='152' y='160' width='8' height='8' fill='%237d2352'/%3E%3Crect x='160' y='160' width='8' height='8' fill='%237d2352'/%3E%3Crect x='80' y='168' width='8' height='8' fill='%23b0346a'/%3E%3Crect x='88' y='168' width='8' height='8' fill='%23b0346a'/%3E%3Crect x='96' y='168' width='8' height='8' fill='%23b0346a'/%3E%3Crect x='104' y='168' width='8' height='8' fill='%237d2352'/%3E%3Crect x='112' y='168' width='8' height='8' fill='%237d2352'/%3E%3Crect x='120' y='168' width='8' height='8' fill='%237d2352'/%3E%3Crect x='128' y='168' width='8' height='8' fill='%237d2352'/%3E%3Crect x='136' y='168' width='8' height='8' fill='%237d2352'/%3E%3Crect x='144' y='168' width='8' height='8' fill='%237d2352'/%3E%3Crect x='152' y='168' width='8' height='8' fill='%237d2352'/%3E%3Crect x='88' y='176' width='8' height='8' fill='%23b0346a'/%3E%3Crect x='96' y='176' width='8' height='8' fill='%237d2352'/%3E%3Crect x='104' y='176' width='8' height='8' fill='%237d2352'/%3E%3Crect x='112' y='176' width='8' height='8' fill='%237d2352'/%3E%3Crect x='120' y='176' width='8' height='8' fill='%237d2352'/%3E%3Crect x='128' y='176' width='8' height='8' fill='%237d2352'/%3E%3Crect x='136' y='176' width='8' height='8' fill='%237d2352'/%3E%3Crect x='144' y='176' width='8' height='8' fill='%237d2352'/%3E%3Crect x='16' y='80' width='8' height='8' fill='%233dd6c6'/%3E%3Crect x='16' y='88' width='8' height='8' fill='%233dd6c6'/%3E%3Crect x='24' y='88' width='8' height='8' fill='%233dd6c6'/%3E%3Crect x='24' y='96' width='8' height='8' fill='%233dd6c6'/%3E%3Crect x='32' y='96' width='8' height='8' fill='%233dd6c6'/%3E%3Crect x='32' y='104' width='8' height='8' fill='%233dd6c6'/%3E%3Crect x='40' y='104' width='8' height='8' fill='%233dd6c6'/%3E%3Crect x='48' y='112' width='8' height='8' fill='%233dd6c6'/%3E%3Crect x='56' y='120' width='8' height='8' fill='%233dd6c6'/%3E%3Crect x='64' y='120' width='8' height='8' fill='%233dd6c6'/%3E%3Crect x='72' y='128' width='8' height='8' fill='%233dd6c6'/%3E%3Crect x='80' y='128' width='8' height='8' fill='%233dd6c6'/%3E%3Crect x='96' y='136' width='8' height='8' fill='%233dd6c6'/%3E%3Crect x='112' y='144' width='8' height='8' fill='%233dd6c6'/%3E%3Crect x='120' y='144' width='8' height='8' fill='%233dd6c6'/%3E%3Crect x='136' y='152' width='8' height='8' fill='%233dd6c6'/%3E%3Crect x='144' y='152' width='8' height='8' fill='%233dd6c6'/%3E%3Crect x='152' y='152' width='8' height='8' fill='%233dd6c6'/%3E%3Crect x='200' y='152' width='8' height='8' fill='%233dd6c6'/%3E%3Crect x='208' y='152' width='8' height='8' fill='%233dd6c6'/%3E%3Crect x='176' y='160' width='8' height='8' fill='%233dd6c6'/%3E%3Crect x='184' y='160' width='8' height='8' fill='%233dd6c6'/%3E%3Crect x='192' y='160' width='8' height='8' fill='%233dd6c6'/%3E%3Crect x='200' y='160' width='8' height='8' fill='%233dd6c6'/%3E%3C/svg%3E");image-rendering:pixelated;opacity:.45;animation:bob 14s steps(7) infinite alternate}

/* пиксельная падающая звезда */
html[data-theme=pixel] body::after{content:"";position:fixed;top:9%;right:10%;width:4px;height:4px;z-index:-1;pointer-events:none;opacity:0;
  background:#efe9d8;box-shadow:8px -4px 0 rgba(239,233,216,.65),16px -8px 0 rgba(239,233,216,.45),24px -12px 0 rgba(239,233,216,.28),32px -16px 0 rgba(239,233,216,.14);
  animation:shoot 17s steps(26) 5s infinite}

/* плоские формы без свечения */
html[data-theme=pixel] .sidebar{border-right:2px dashed var(--line);background:none}
html[data-theme=pixel] h1,html[data-theme=pixel] .post-content h2,html[data-theme=pixel] .project-main h2,html[data-theme=pixel] .modal-head h2{
  font-family:'Press Start 2P',ui-monospace,monospace;font-weight:400;letter-spacing:0}
html[data-theme=pixel] h1{font-size:clamp(22px,2.6vw,32px);line-height:1.35}
html[data-theme=pixel] .post-content h2{font-size:clamp(13px,1.25vw,16px);line-height:1.7}
html[data-theme=pixel] .project-main h2{font-size:16px;line-height:1.6}
html[data-theme=pixel] .modal-head h2{font-size:16px;line-height:1.6}
html[data-theme=pixel] .title-mark{color:var(--accent)}
html[data-theme=pixel] .avatar{border-radius:0;background:var(--accent);color:var(--on-ink);box-shadow:4px 4px 0 #3dd6c6}
html[data-theme=pixel] .status-dot{border-radius:0;border:2px solid var(--bg)}
html[data-theme=pixel] .nav-link{border-radius:0}
html[data-theme=pixel] .nav-link.active{background:var(--accent-soft);color:var(--accent);box-shadow:inset 3px 0 0 var(--accent)}
html[data-theme=pixel] .theme-switch{border:2px solid var(--line);border-radius:0;padding:3px}
html[data-theme=pixel] .theme-option{border-radius:0}
html[data-theme=pixel] .theme-option.selected{background:var(--accent);color:var(--on-ink)}
html[data-theme=pixel] .button{border-radius:0}
html[data-theme=pixel] .button-primary{background:var(--accent);color:var(--on-ink);box-shadow:4px 4px 0 #ff5c8a;transition:transform .08s steps(2),box-shadow .08s steps(2)}
html[data-theme=pixel] .button-primary:hover{opacity:1;transform:translate(2px,2px);box-shadow:2px 2px 0 #ff5c8a}
html[data-theme=pixel] .intro-strip,html[data-theme=pixel] .post,html[data-theme=pixel] .project-card,html[data-theme=pixel] .file-row,html[data-theme=pixel] .file-panel-head{border-bottom:2px dashed var(--line)}
html[data-theme=pixel] .post-tag{border-radius:0;background:#ff5c8a;color:var(--on-ink);transform:rotate(1.5deg)}
html[data-theme=pixel] .post:nth-child(even) .post-tag{background:#3dd6c6;transform:rotate(-2deg)}
html[data-theme=pixel] .comment-preview{border-radius:0;background:var(--accent-soft);border:2px solid var(--line)}
html[data-theme=pixel] .project-logo{border-radius:0;border:2px solid var(--line);background:var(--accent-soft);color:var(--accent);box-shadow:5px 5px 0 var(--line)}
html[data-theme=pixel] .live-dot{color:#3dd6c6}
html[data-theme=pixel] .search-input,html[data-theme=pixel] .contact-item,html[data-theme=pixel] .folder,html[data-theme=pixel] .modal,html[data-theme=pixel] .modal input,html[data-theme=pixel] .modal textarea,html[data-theme=pixel] .file-icon,html[data-theme=pixel] .toast{border-radius:0}
html[data-theme=pixel] .search-input,html[data-theme=pixel] .contact-item,html[data-theme=pixel] .folder,html[data-theme=pixel] .modal{border-width:2px}
html[data-theme=pixel] .contact-item{background:var(--paper);transition:transform .08s steps(2),box-shadow .08s steps(2),border-color .08s steps(2)}
html[data-theme=pixel] .contact-item:hover{transform:translate(-3px,-3px);border-color:var(--accent);box-shadow:6px 6px 0 #ff5c8a}
html[data-theme=pixel] .contact-icon{border-radius:0;background:var(--accent-soft)}
html[data-theme=pixel] .contact-item:hover .contact-icon{background:var(--accent);color:var(--on-ink)}
html[data-theme=pixel] .folder.active{background:var(--accent);border-color:var(--accent);color:var(--on-ink)}
html[data-theme=pixel] .modal{background:var(--paper);box-shadow:8px 8px 0 #ff5c8a}
html[data-theme=pixel] .modal-backdrop{background:rgba(5,4,16,.75);backdrop-filter:none}
html[data-theme=pixel] .toast{background:var(--accent);color:var(--on-ink);box-shadow:4px 4px 0 #ff5c8a}
html[data-theme=pixel] ::selection{background:#ff5c8a;color:#0b0a1f}
@media (min-width:641px){html[data-theme=pixel] .contact-item:nth-child(even){margin-top:28px}}
@media (max-width:1100px){html[data-theme=pixel]::after{display:none}}

@keyframes px-far{to{background-position:360px 360px}}
@keyframes px-near{to{background-position:-640px 640px}}
@keyframes blink{0%,70%{opacity:1}72%,76%{opacity:.35}78%,100%{opacity:1}}
@keyframes bob{to{transform:translateY(-14px)}}
@keyframes shoot{0%,88%{opacity:0;transform:translate(0,0)}89%{opacity:1}100%{opacity:0;transform:translate(-52vw,31vh)}}
@media (prefers-reduced-motion:reduce){
  html[data-theme=pixel]::before,html[data-theme=pixel]::after,html[data-theme=pixel] body::before{animation:none}
  html[data-theme=pixel] body::after{display:none}
  *{transition:none!important}
}

/* ===== Cosmic: глубокий космос, без свечения ===== */
html[data-theme=cosmic]{
  --bg:#05060f;--paper:#0d1126;--text:#ecebff;--muted:#9096bf;--line:#232a4d;
  --accent:#b6a4ff;--accent-soft:#1a1c3f;--ink:#ecebff;--on-ink:#05060f;color-scheme:dark;
}
html[data-theme=cosmic] body{position:relative;isolation:isolate}
html[data-theme=cosmic]::before{content:"";position:fixed;inset:0;z-index:-1;pointer-events:none;
  background-image:radial-gradient(1px 1px at 12% 22%,#fff 98%,transparent),radial-gradient(1px 1px at 37% 81%,#cfd6ff 98%,transparent),radial-gradient(1px 1px at 58% 12%,#fff 98%,transparent),radial-gradient(1px 1px at 76% 47%,#e6dcff 98%,transparent),radial-gradient(1px 1px at 91% 88%,#fff 98%,transparent),radial-gradient(1px 1px at 24% 54%,#bcc8ff 98%,transparent),radial-gradient(1px 1px at 66% 70%,#fff 98%,transparent),radial-gradient(1px 1px at 47% 33%,#fff 98%,transparent),radial-gradient(1px 1px at 5% 93%,#d9ccff 98%,transparent),radial-gradient(1px 1px at 84% 9%,#fff 98%,transparent);
  background-size:380px 380px;animation:stars-far 180s linear infinite,twinkle 8s ease-in-out infinite alternate}
html[data-theme=cosmic]::after{content:"";position:fixed;inset:-25%;z-index:-2;pointer-events:none;will-change:transform;
  background:radial-gradient(38% 34% at 78% 18%,rgba(120,80,255,.20),transparent 70%),radial-gradient(34% 32% at 14% 72%,rgba(40,90,255,.15),transparent 70%),radial-gradient(28% 26% at 62% 86%,rgba(190,70,200,.10),transparent 70%),radial-gradient(24% 22% at 30% 20%,rgba(30,180,200,.07),transparent 70%);
  animation:nebula 70s ease-in-out infinite alternate}
html[data-theme=cosmic] body::before{content:"";position:fixed;inset:0;z-index:-1;pointer-events:none;
  background-image:radial-gradient(2px 2px at 18% 38%,#fff 98%,transparent),radial-gradient(1.6px 1.6px at 72% 24%,#c9b8ff 98%,transparent),radial-gradient(2px 2px at 44% 76%,#aebfff 98%,transparent),radial-gradient(1.6px 1.6px at 88% 62%,#fff 98%,transparent),radial-gradient(2px 2px at 55% 8%,#fff 98%,transparent);
  background-size:620px 620px;animation:stars-near 110s linear infinite,twinkle 6s ease-in-out -2s infinite alternate}
html[data-theme=cosmic] body::after{content:"";position:fixed;top:7%;right:6%;width:140px;height:1.5px;z-index:-1;pointer-events:none;opacity:0;
  background:linear-gradient(90deg,#fff,rgba(185,166,255,.4) 35%,transparent);animation:shooting 23s ease-in 6s infinite}
html[data-theme=cosmic] .button-primary,html[data-theme=cosmic] .theme-option.selected,html[data-theme=cosmic] .folder.active{background:var(--accent);color:var(--on-ink);border-color:var(--accent)}
html[data-theme=cosmic] .avatar{background:var(--accent);color:var(--on-ink)}
html[data-theme=cosmic] .nav-link.active{box-shadow:inset 0 0 0 1px var(--line)}
@keyframes stars-far{to{background-position:380px 380px}}
@keyframes stars-near{to{background-position:-620px 620px}}
@keyframes twinkle{from{opacity:.5}to{opacity:1}}
@keyframes nebula{from{transform:translate3d(-2%,-1%,0) scale(1)}to{transform:translate3d(3%,2%,0) scale(1.1)}}
@keyframes shooting{0%,90%{opacity:0;transform:translate(0,0) rotate(-31deg)}91%{opacity:1}100%{opacity:0;transform:translate(-55vw,33vh) rotate(-31deg)}}
@media (prefers-reduced-motion:reduce){html[data-theme=cosmic]::before,html[data-theme=cosmic]::after,html[data-theme=cosmic] body::before{animation:none}html[data-theme=cosmic] body::after{display:none}}

/* ===== Загрузка нескольких файлов ===== */
.modal{max-height:calc(100vh - 40px);overflow:auto}
#file-input{display:none}
.dropzone{display:flex;flex-direction:column;align-items:center;gap:4px;padding:28px 20px;border:1.5px dashed var(--line);border-radius:18px;text-align:center;cursor:pointer;transition:.2s}
.dropzone strong{font-size:17px;font-weight:700}
.dropzone span{font-size:15px;color:var(--muted)}
.dropzone:hover,.dropzone.over{border-color:var(--accent);background:var(--accent-soft)}
.upload-list{list-style:none;padding:0;margin:14px 0 0;max-height:220px;overflow:auto}
.upload-item{display:flex;align-items:center;gap:12px;padding:9px 0;border-bottom:1px solid var(--line);font-size:15px}
.upload-name{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:600}
.upload-meta{flex:none;font-size:14px;color:var(--muted)}
.upload-item.busy .upload-meta{color:var(--accent)}
.upload-item.ok .upload-meta{color:#2fa76a}
.upload-item.err .upload-meta{color:#d64545}
.upload-remove{flex:none;padding:0 4px;font-size:20px;line-height:1;color:var(--muted)}
.upload-remove:hover{color:var(--text)}
html[data-theme=pixel] .dropzone{border-radius:0;border-width:2px}

/* ===== Responsive ===== */
@media (max-width:1200px){
  .shell{grid-template-columns:260px minmax(0,1fr)}
  .sidebar{padding:48px 32px 32px}
  .main-column{padding:56px 48px 40px}
}
@media (max-width:900px){
  .shell{grid-template-columns:minmax(0,1fr);grid-template-rows:auto 1fr}
  .sidebar{position:static;height:auto;flex-direction:row;flex-wrap:wrap;align-items:center;gap:16px 24px;padding:20px 24px;border-right:0;border-bottom:1px solid var(--line)}
  .profile{flex-direction:row;align-items:center;gap:12px;margin:0}
  .profile>div{width:44px;height:44px;font-size:15px}
  .profile strong{margin:0;font-size:16px}
  .profile .muted{display:none}
  .nav{flex-direction:row;gap:2px;width:100%;order:3;overflow-x:auto}
  .nav-link{margin:0;padding:8px 14px;white-space:nowrap;font-size:16px}
  .count{display:none}
  .sidebar-bottom{margin:0 0 0 auto}
  .main-column{padding:40px 24px 32px}
}
@media (max-width:640px){
  .topbar{flex-direction:column;align-items:flex-start}
  .contact-list{grid-template-columns:1fr}
  .project-card{grid-template-columns:minmax(0,1fr)}
  .project-meta{flex-direction:row;align-items:center}
  .project-main{flex-direction:column;gap:18px}
  .file-panel-head,.file-row{grid-template-columns:1fr 80px}
  .file-panel-head span:nth-child(2),.file-panel-head span:nth-child(3),.file-row>span:nth-child(2),.file-row>span:nth-child(3){display:none}
  .modal{padding:24px}
  .theme-option{width:36px;height:36px}
  .article-body p{font-size:18px}
}

/* ===== Admin additions (видны только админу в окнах управления) ===== */
.modal select{width:100%;padding:14px 16px;border:1px solid var(--line);border-radius:14px;background:var(--bg);color:inherit;font:inherit;outline:0}
.modal select:focus{border-color:var(--accent)}
html[data-theme=pixel] .modal select{border-radius:0;border-width:2px}
