/* Тема «Shell».
   Подача 111cult: тёмный фон, Geist, огромный ник, «/ 01 —», тонкие линии, glitch и скан-полоса.
   Содержание — через терминальные команды: каждый раздел открывается командой, ниже её «вывод».
   Спокойная палитра с одним фиолетовым акцентом; есть светлая схема. */

:root {
  --bg: #09090b;
  --surface: #111015;
  --ink: #f4f2f8;
  --text: rgba(244, 242, 248, .78);
  --muted: rgba(244, 242, 248, .5);
  --line: rgba(244, 242, 248, .11);
  --line-strong: rgba(244, 242, 248, .26);
  --accent: #a78bfa;
  --accent-strong: #8b5cf6;
  --accent-soft: rgba(139, 92, 246, .14);
  --glow: rgba(139, 92, 246, .22);
  --str: #d6cbff;
  --bool: #f0abfc;
  --sans: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  --mono: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --ease: cubic-bezier(.22, 1, .36, 1);
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #f5f4f8;
  --surface: #fcfbff;
  --ink: #141218;
  --text: #34303c;
  --muted: #6c6878;
  --line: rgba(20, 18, 24, .11);
  --line-strong: rgba(20, 18, 24, .26);
  --accent: #6d28d9;
  --accent-strong: #6d28d9;
  --accent-soft: rgba(109, 40, 217, .09);
  --glow: rgba(139, 92, 246, .16);
  --str: #5b21b6;
  --bool: #a21caf;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  transition: background-color .3s, color .3s;
}
main { flex: 1; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul { list-style: none; }
h1, h2, h3 { color: var(--ink); font-weight: 500; }
::selection { background: var(--accent-strong); color: #fff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.container { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 20px; }
@media (min-width: 768px) { .container { padding: 0 48px; } }
.mono { font-family: var(--mono); }
.dim { color: var(--muted); }
.accent { color: var(--accent); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 8px; z-index: 100; background: var(--ink); color: var(--bg); padding: 6px 10px; }
.link { color: var(--ink); border-bottom: 1px solid var(--line-strong); transition: border-color .15s, color .15s; }
.link:hover { color: var(--accent); border-color: var(--accent); }
.caret { display: inline-block; width: .55em; height: 1.05em; vertical-align: -.15em; background: var(--accent); animation: blink 1.1s steps(1) infinite; }

/* ---------- header ---------- */
.header { position: relative; z-index: 30; }
.header__inner { display: flex; align-items: center; gap: 20px; height: 84px; }
.brand { font-size: 20px; font-weight: 600; color: var(--ink); letter-spacing: -.04em; display: flex; align-items: center; gap: 3px; }
.brand .caret { width: .45em; height: .95em; }
.badge { display: none; align-items: center; gap: 8px; font: 12px/1 var(--mono); color: var(--muted); border: 1px solid var(--line-strong); padding: 6px 10px; border-radius: 99px; }
.badge i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px var(--accent); animation: pulse 2.4s ease-in-out infinite; }
.nav { display: none; margin-left: auto; gap: 28px; }
.nav a { font-size: 18px; font-weight: 500; letter-spacing: -.02em; color: var(--ink); }
.nav a:hover { text-decoration: underline; text-underline-offset: 5px; text-decoration-color: var(--accent); }
.header__tools { display: flex; align-items: center; gap: 2px; margin-left: auto; }
/* переключатель языка */
.lang { display: flex; margin-right: 6px; font-size: 12px; border: 1px solid var(--line-strong); border-radius: 99px; padding: 2px; }
.lang a { padding: 4px 9px; border-radius: 99px; color: var(--muted); transition: color .15s, background .15s; }
.lang a:hover { color: var(--ink); }
.lang a.is-active { background: var(--accent-soft); color: var(--accent); }
.icon-btn { width: 40px; height: 40px; display: grid; place-items: center; color: var(--ink); border-radius: 50%; transition: background .15s; }
.icon-btn:hover { background: var(--surface); }
.icon-btn svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.i-sun { display: none; }
:root[data-theme="light"] .i-sun { display: block; }
:root[data-theme="light"] .i-moon { display: none; }
.burger { flex-direction: column; gap: 6px; display: flex; align-items: center; justify-content: center; }
.burger span { width: 20px; height: 1.5px; background: currentColor; transition: transform .25s var(--ease); }
.burger[aria-expanded="true"] span:first-child { transform: translateY(3.75px) rotate(45deg); }
.burger[aria-expanded="true"] span:last-child { transform: translateY(-3.75px) rotate(-45deg); }
.mobile-menu { position: fixed; inset: 84px 0 0; z-index: 29; background: var(--bg); padding: 8px 20px; }
.mobile-menu a { display: block; border-top: 1px solid var(--line-strong); padding: 20px 0; font-size: 30px; font-weight: 500; color: var(--ink); letter-spacing: -.03em; }
.mobile-menu[hidden] { display: none; }
@media (min-width: 960px) {
  .header__inner { height: 128px; }
  .brand { font-size: 24px; }
  .badge { display: inline-flex; }
  .nav { display: flex; }
  .header__tools { margin-left: 12px; }
  .burger, .mobile-menu { display: none !important; }
}

/* ---------- hero (как у 111cult: по центру, огромный ник) ---------- */
.hero { position: relative; }
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  /* свечение затухает до краёв блока, чтобы не было видимых границ */
  background: radial-gradient(ellipse 70% 48% at 50% 52%, var(--glow), transparent 72%);
}
.hero__inner { position: relative; container-type: inline-size; display: flex; flex-direction: column; align-items: center; text-align: center; padding-top: 72px; padding-bottom: 104px; }
.hero__lead { font-size: 20px; color: var(--ink); }
.hero__nick {
  margin-top: 16px;
  font-size: clamp(56px, 19cqi, 230px);
  font-weight: 500;
  line-height: .95;
  letter-spacing: -.055em;
  white-space: nowrap;
}
.hero__tagline { margin-top: 24px; font-size: 16px; color: var(--muted); letter-spacing: -.01em; }
.hero__tagline span { display: block; }
.hero__actions { margin-top: 40px; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
@media (min-width: 768px) {
  .hero__inner { padding-top: 96px; padding-bottom: 152px; }
  .hero__lead { font-size: 28px; }
  .hero__tagline { margin-top: 40px; font-size: 18px; }
}

.btn { display: inline-flex; align-items: center; gap: 8px; height: 48px; padding: 0 24px; border-radius: 99px; background: var(--accent-strong); color: #fff; font-weight: 500; font-size: 15px; border: 1px solid var(--accent-strong); transition: box-shadow .2s, transform .2s; }
.btn:hover { box-shadow: 0 8px 30px -8px var(--accent-strong); transform: translateY(-1px); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn--ghost:hover { border-color: var(--ink); box-shadow: none; }

/* ---------- sections ---------- */
.section { padding: 64px 0; border-top: 1px solid var(--line); }
@media (min-width: 768px) { .section { padding: 104px 0; } }
.sec-head { display: grid; gap: 6px; }
.label { font-size: 13px; color: var(--muted); }
.cmd { font-size: 14px; color: var(--ink); word-break: break-word; }
.cmd__user { color: var(--accent); }
.cmd__text.is-typing::after { content: ""; display: inline-block; width: .55em; height: 1.05em; vertical-align: -.15em; margin-left: 2px; background: var(--accent); }
.h1 { margin-top: 18px; font-size: clamp(32px, 4.6vw, 56px); line-height: 1.06; letter-spacing: -.05em; }
@media (min-width: 768px) { .label, .cmd { font-size: 15px; } }

/* whoami */
.about { margin-top: 40px; display: grid; gap: 40px; }
@media (min-width: 960px) { .about { margin-top: 64px; grid-template-columns: 1fr 1fr; gap: 72px; align-items: start; } }
.term { border: 1px solid var(--line-strong); background: var(--surface); border-radius: 10px; overflow: hidden; min-width: 0; }
.term__bar { display: flex; align-items: center; gap: 7px; padding: 11px 14px; border-bottom: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.term__bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--line-strong); }
.term__bar span { margin-left: auto; }
.term__body { padding: 18px 20px 20px; font-size: 14px; line-height: 1.85; color: var(--ink); overflow-x: auto; }
.prompt { color: var(--accent); }
.t-out { color: var(--text); }
.yml p { padding-left: 0; }
.yml__key { color: var(--accent); }
.yml__str { color: var(--str); }
.yml__bool { color: var(--bool); }
.t-hidden { visibility: hidden; }
.about__text { font-size: 19px; line-height: 1.65; color: var(--text); max-width: 60ch; }
.about__text p + p { margin-top: 1em; }
.stats { margin-top: 40px; display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 0 32px; }
.stats > div { border-top: 1px solid var(--line-strong); padding: 16px 0 8px; }
.stats dt { font-size: 52px; font-weight: 500; line-height: 1; letter-spacing: -.05em; color: var(--ink); }
.stats dd { margin-top: 10px; font-size: 13px; color: var(--muted); }
@media (min-width: 960px) { .about__text { font-size: 21px; } }

/* навыки — сетка как у 111cult */
.grid { margin-top: 40px; display: grid; grid-template-columns: 1fr; gap: 0 48px; }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .grid { margin-top: 56px; grid-template-columns: repeat(4, 1fr); } }
.cell { border-top: 1px solid var(--line-strong); padding: 20px 0 32px; }
.cell__title { font-size: 20px; letter-spacing: -.03em; }
.cell .tags { margin-top: 14px; }

.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tags li { font: 12px/1.5 var(--mono); color: var(--text); border: 1px solid var(--line-strong); padding: 3px 10px; border-radius: 99px; }

/* проекты */
.filters { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 8px; }
.filter { font-size: 13px; padding: 6px 14px; border: 1px solid var(--line-strong); border-radius: 99px; color: var(--muted); transition: all .15s; }
.filter:hover { color: var(--ink); border-color: var(--ink); }
.filter.is-active { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }
.cards { margin-top: 40px; display: grid; gap: 56px 40px; }
@media (min-width: 768px) { .cards { grid-template-columns: repeat(2, 1fr); margin-top: 56px; } }
@media (min-width: 1200px) { .cards { grid-template-columns: repeat(3, 1fr); } }
.card[hidden] { display: none; }
.card__media { position: relative; aspect-ratio: 4 / 3; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; transition: border-color .3s; }
.card__media img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.05); transition: filter .5s, transform .8s var(--ease); }
.card:hover .card__media { border-color: var(--accent); }
.card:hover .card__media img { filter: none; transform: scale(1.03); }
.card__placeholder {
  position: absolute; inset: 0; display: grid; place-items: center; padding: 24px; text-align: center;
  font-size: 15px; color: var(--muted);
  background-image: radial-gradient(var(--line-strong) 1px, transparent 1px);
  background-size: 18px 18px;
  transition: color .3s;
}
.card__placeholder::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 50% 50%, var(--glow), transparent 65%); opacity: 0; transition: opacity .4s; }
.card:hover .card__placeholder { color: var(--ink); }
.card:hover .card__placeholder::after { opacity: 1; }
.card__meta { display: flex; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line-strong); margin-top: 20px; padding-top: 12px; font-size: 12px; color: var(--muted); }
.card__title { margin-top: 10px; font-size: 22px; letter-spacing: -.035em; line-height: 1.2; }
.arrow { display: inline-block; color: var(--muted); transition: transform .3s var(--ease), color .2s; }
.card:hover .arrow, .contact__row:hover .arrow { transform: translate(3px, -3px); color: var(--accent); }
.card__text { margin-top: 8px; color: var(--text); font-size: 15px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card .tags { margin-top: 14px; }

/* строки: достижения, опыт, образование */
.rows { margin-top: 40px; border-bottom: 1px solid var(--line-strong); }
@media (min-width: 768px) { .rows { margin-top: 56px; } }
.row { display: grid; grid-template-columns: 1fr auto; gap: 8px 24px; border-top: 1px solid var(--line-strong); padding: 24px 0; }
.row__side { grid-column: 1 / -1; display: flex; gap: 14px; font-size: 13px; color: var(--muted); }
.row__main h3 { font-size: 22px; letter-spacing: -.03em; line-height: 1.25; }
.row__main .dim { margin-top: 4px; }
.row__text { margin-top: 10px; color: var(--text); max-width: 64ch; }
.row__text p + p { margin-top: .8em; }
.row__link { align-self: start; width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 50%; color: var(--ink); transition: all .2s; }
.row__link:hover { background: var(--accent-strong); border-color: var(--accent-strong); color: #fff; }
@media (min-width: 768px) {
  .row { grid-template-columns: 220px 1fr auto; gap: 40px; padding: 32px 0; }
  .row__side { grid-column: auto; flex-direction: column; gap: 4px; padding-top: 5px; }
  .row__main h3 { font-size: 28px; }
}

/* контакты */
.contact__title { position: relative; isolation: isolate; margin-top: 24px; font-size: clamp(40px, 8vw, 120px); font-weight: 500; line-height: .98; letter-spacing: -.055em; max-width: 13ch; }
.contact__list { margin-top: 48px; border-bottom: 1px solid var(--line-strong); }
.contact__row { display: grid; grid-template-columns: 1fr auto; gap: 2px 16px; border-top: 1px solid var(--line-strong); padding: 20px 0; transition: padding .3s var(--ease); }
.contact__row .mono { grid-column: 1 / -1; font-size: 13px; }
.contact__value { font-size: clamp(20px, 2.6vw, 30px); font-weight: 500; color: var(--ink); letter-spacing: -.03em; word-break: break-word; }
.contact__row .arrow { align-self: center; font-size: 22px; }
.contact__row:hover .contact__value { color: var(--accent); }
@media (min-width: 768px) {
  .contact__row { grid-template-columns: 220px 1fr auto; align-items: center; padding: 26px 0; }
  .contact__row .mono { grid-column: auto; }
  .contact__row:hover { padding-left: 16px; }
}
.contact__foot { margin-top: 32px; display: grid; gap: 10px; font-size: 14px; }
.contact__foot code { color: var(--ink); word-break: break-all; }

/* ---------- страница проекта ---------- */
.article { padding-top: 24px; padding-bottom: 96px; }
.back { display: inline-block; margin-bottom: 40px; font-size: 13px; color: var(--muted); }
.back:hover { color: var(--accent); }
.article__title { position: relative; isolation: isolate; margin-top: 16px; font-size: clamp(40px, 8vw, 120px); font-weight: 500; line-height: .98; letter-spacing: -.055em; max-width: 16ch; word-break: break-word; }
.article__lead { margin-top: 24px; font-size: 20px; max-width: 60ch; color: var(--text); }
.meta { margin-top: 40px; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0 32px; font-size: 14px; }
.meta > div { border-top: 1px solid var(--line-strong); padding: 14px 0 18px; }
.meta dt { color: var(--accent); }
.meta dd { margin-top: 4px; color: var(--ink); }
.article__links { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 10px; }
.article__cover { margin-top: 48px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--surface); }
.article__cover img { width: 100%; }
.prose { max-width: 68ch; font-size: 18px; line-height: 1.75; }
.prose p + p { margin-top: 1em; }
.article__body { margin-top: 48px; }
.gallery { margin-top: 56px; display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.gallery a { border: 1px solid var(--line); border-radius: 6px; background: var(--surface); overflow: hidden; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.gallery a:hover img { transform: scale(1.03); }
.next { display: block; margin-top: 96px; border-top: 1px solid var(--line-strong); padding-top: 20px; }
.next .mono { font-size: 13px; }
.next__title { display: block; margin-top: 8px; font-size: clamp(28px, 5vw, 64px); font-weight: 500; letter-spacing: -.05em; color: var(--ink); transition: color .2s, padding .3s var(--ease); }
.next:hover .next__title { color: var(--accent); padding-left: 12px; }

/* ---------- footer ---------- */
.footer { padding: 0 0 32px; font-size: 14px; color: var(--muted); }
.footer__exit { border-top: 1px solid var(--line); padding: 40px 0 32px; font-size: 13px; color: var(--ink); line-height: 1.8; }
.footer__inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; border-top: 1px solid var(--line-strong); padding-top: 24px; }
.footer__links { display: flex; flex-wrap: wrap; gap: 20px; }
.footer a:hover { color: var(--ink); }

/* ---------- анимации (из 111cult) ---------- */
@keyframes fade-up { 0% { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes fade-in { 0% { opacity: 0; } to { opacity: 1; } }
@keyframes wipe { 0% { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0); } }
@keyframes scan { 0% { transform: translateY(-120%); } to { transform: translateY(900%); } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes pulse { 50% { opacity: .35; } }
@keyframes glitch-main {
  0%, 7% { opacity: 0; transform: none; }
  8% { opacity: 1; transform: translate(-14px); }
  16% { transform: translate(10px) skew(-6deg); }
  24% { transform: translate(-6px); }
  32% { transform: translate(0); }
  44% { transform: translate(8px) skew(4deg); }
  50% { transform: translate(0); }
  68% { transform: translate(-3px); }
  72%, to { opacity: 1; transform: none; }
}
@keyframes glitch-slice-a {
  0%, 7% { opacity: 0; }
  8% { opacity: 1; clip-path: inset(10% 0 62%); transform: translate(-26px); }
  16% { clip-path: inset(48% 0 20%); transform: translate(22px); }
  24% { clip-path: inset(70% 0 6%); transform: translate(-18px); }
  32% { clip-path: inset(22% 0 55%); transform: translate(14px); }
  44% { clip-path: inset(58% 0 12%); transform: translate(-10px); }
  56% { clip-path: inset(34% 0 40%); transform: translate(6px); }
  68% { clip-path: inset(8% 0 80%); transform: translate(-4px); }
  76%, to { opacity: 0; clip-path: inset(0); transform: none; }
}
@keyframes glitch-slice-b {
  0%, 7% { opacity: 0; }
  8% { opacity: 1; clip-path: inset(60% 0 14%); transform: translate(24px); }
  16% { clip-path: inset(6% 0 76%); transform: translate(-20px); }
  24% { clip-path: inset(36% 0 40%); transform: translate(16px); }
  32% { clip-path: inset(78% 0 4%); transform: translate(-12px); }
  44% { clip-path: inset(18% 0 62%); transform: translate(9px); }
  56% { clip-path: inset(52% 0 26%); transform: translate(-7px); }
  68% { clip-path: inset(80% 0 6%); transform: translate(3px); }
  76%, to { opacity: 0; clip-path: inset(0); transform: none; }
}

.glitch { position: relative; isolation: isolate; animation: glitch-main var(--glitch-duration, 1.5s) steps(1, end) var(--glitch-delay, .3s) both; }
.glitch-quick { --glitch-duration: 1s; --glitch-delay: 0s; }
.glitch::before, .glitch::after, .glitch-on-view.is-glitching::before, .glitch-on-view.is-glitching::after {
  content: attr(data-text);
  position: absolute; inset: 0; z-index: -1;
  pointer-events: none; user-select: none;
  animation-duration: var(--glitch-duration, 1.5s);
  animation-delay: var(--glitch-delay, .3s);
  animation-timing-function: step-end;
  animation-fill-mode: both;
}
.glitch::before, .glitch-on-view.is-glitching::before { animation-name: glitch-slice-a; color: var(--accent); }
.glitch::after, .glitch-on-view.is-glitching::after { animation-name: glitch-slice-b; }
.glitch-on-view.is-glitching { --glitch-duration: 1s; --glitch-delay: 0s; animation: glitch-main 1s steps(1, end) both; }

.intro-scan { overflow: hidden; }
.intro-scan::after {
  content: ""; position: absolute; inset: 0 0 auto; height: 96px; pointer-events: none;
  background: linear-gradient(transparent, color-mix(in srgb, var(--accent) 14%, transparent) 50%, transparent);
  animation: scan 1.1s linear 1.7s both;
}
.delay-actions { --intro-delay: 2.1s; }
.delay-lead { --intro-delay: .4s; }
.intro-fade { animation: fade-up .8s var(--ease) var(--intro-delay, 1.8s) both; }
.intro-fade-in { animation: fade-in .8s ease-out var(--intro-delay, 2.4s) both; }
.intro-wipe { animation: wipe .9s steps(22, end) var(--intro-delay, 2s) both; }

.reveal { opacity: 0; transform: translateY(14px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  .t-hidden { visibility: visible; }
  html { scroll-behavior: auto; }
}

/* ---------- now.txt в окне whoami ---------- */
.t-now { white-space: normal; color: var(--ink); }

/* ---------- обложка-hexdump для проектов без картинки ---------- */
.card__placeholder.hx {
  display: grid; place-content: center; margin: 0; padding: 16px; background-image: none;
  font-size: clamp(9px, 1.05vw, 12.5px); line-height: 1.75; white-space: pre; overflow: hidden;
  text-align: left; color: var(--muted);
}
.hx code { font: inherit; position: relative; z-index: 1; }
.hx__off { color: var(--line-strong); }
.hx__asc { color: var(--accent); }
.card:hover .card__placeholder.hx { color: var(--text); }

/* ---------- кнопка >_ в шапке ---------- */
.tty-open { font-size: 14px; font-weight: 500; letter-spacing: -.02em; color: var(--accent); width: auto; padding: 0 10px; border-radius: 99px; }

/* ---------- интерактивный терминал ---------- */
.tty { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 16px; background: color-mix(in srgb, var(--bg) 70%, transparent); backdrop-filter: blur(6px); }
.tty[hidden] { display: none; }
.tty__win { width: min(820px, 100%); height: min(560px, 100%); display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 12px; overflow: hidden; box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .6), 0 0 0 1px var(--line), 0 0 60px -20px var(--glow); animation: fade-up .25s var(--ease) both; }
.tty__win .term__bar span { margin-left: 10px; margin-right: auto; }
.tty__close { color: var(--muted); font-size: 14px; padding: 0 4px; }
.tty__close:hover { color: var(--ink); }
.tty__out { flex: 1; overflow-y: auto; padding: 16px 18px 4px; font-size: 13.5px; line-height: 1.7; color: var(--text); }
.tty__line { white-space: pre-wrap; word-break: break-word; }
.tty__line a { color: var(--ink); border-bottom: 1px solid var(--accent); }
.tty__line a:hover { color: var(--accent); }
.tty__accent, .tty__user { color: var(--accent); }
.tty__muted { color: var(--muted); }
.tty__str { color: var(--str); }
.tty__form { display: flex; align-items: center; gap: 8px; padding: 10px 18px 16px; font-size: 13.5px; }
.tty__prompt { white-space: nowrap; }
.tty__in { flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: var(--ink); font: inherit; caret-color: var(--accent); }
@media (max-width: 640px) {
  .tty { padding: 0; }
  .tty__win { height: 100%; border-radius: 0; }
  .tty__out, .tty__form { font-size: 12.5px; }
}

/* ---------- 404 ---------- */
.notfound__err { margin-top: 6px; font-size: 13px; }

/* ---------- Markdown в описании проекта ---------- */
.md > * + * { margin-top: 1em; }
.md h2, .md h3, .md h4, .md h5, .md h6 { margin-top: 1.8em; color: var(--ink); font-weight: 500; letter-spacing: -.03em; line-height: 1.2; }
.md h2 { font-size: 30px; }
.md h3 { font-size: 23px; }
.md h4, .md h5, .md h6 { font-size: 18px; }
.md h2::before, .md h3::before { content: "# "; font-family: var(--mono); font-size: .6em; color: var(--accent); vertical-align: .25em; }
.md a { color: var(--ink); border-bottom: 1px solid var(--accent); transition: color .15s; }
.md a:hover { color: var(--accent); }
.md strong { color: var(--ink); font-weight: 600; }
.md del { color: var(--muted); }
.md code { font-family: var(--mono); font-size: .86em; color: var(--str); background: var(--accent-soft); padding: .12em .4em; border-radius: 4px; }
.md pre { background: var(--surface); border: 1px solid var(--line-strong); border-radius: 8px; padding: 16px 18px; overflow-x: auto; line-height: 1.6; }
.md pre code { display: block; padding: 0; background: none; color: var(--ink); font-size: 14px; white-space: pre; }
.md pre code[data-lang]::before { content: attr(data-lang); display: block; margin-bottom: 8px; font-size: 11px; color: var(--muted); }
.md ul, .md ol { padding-left: 1.4em; }
.md ul { list-style: none; }
.md ul > li { position: relative; }
.md ul > li::before { content: "›"; position: absolute; left: -1.1em; color: var(--accent); font-family: var(--mono); }
.md ol { list-style: decimal; }
.md ol > li::marker { color: var(--accent); font-family: var(--mono); font-size: .9em; }
.md li + li { margin-top: .35em; }
.md li > ul, .md li > ol { margin-top: .35em; }
.md-task { display: inline-block; width: 14px; height: 14px; margin-right: 8px; vertical-align: -1px; border: 1.5px solid var(--line-strong); border-radius: 3px; }
.md-task.is-done { background: var(--accent-strong); border-color: var(--accent-strong); box-shadow: inset 0 0 0 2px var(--surface); }
.md li:has(> .md-task)::before { content: none; }
.md blockquote { border-left: 2px solid var(--accent); padding: 4px 0 4px 18px; color: var(--text); }
.md blockquote > * + * { margin-top: .6em; }
.md hr { border: 0; border-top: 1px solid var(--line-strong); margin: 2em 0; }
.md img { max-width: 100%; height: auto; border: 1px solid var(--line); border-radius: 6px; }
.md-table { overflow-x: auto; }
.md table { border-collapse: collapse; font-size: 15px; min-width: 50%; }
.md th, .md td { text-align: left; padding: 8px 14px 8px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.md th { font-family: var(--mono); font-size: 12px; font-weight: 500; color: var(--muted); border-bottom-color: var(--line-strong); }
.md .a-right { text-align: right; }
.md .a-center { text-align: center; }
