/* =========================================================
   KARAS — общие стили
   Цвета и шрифты из бренда (Figma «KARAS»)
   ========================================================= */

@font-face { font-family: "Rubik"; font-weight: 500; font-display: swap; src: url("../assets/fonts/rubik-cyrillic-500-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Rubik"; font-weight: 500; font-display: swap; src: url("../assets/fonts/rubik-latin-500-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Rubik"; font-weight: 700; font-display: swap; src: url("../assets/fonts/rubik-cyrillic-700-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Rubik"; font-weight: 700; font-display: swap; src: url("../assets/fonts/rubik-latin-700-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Rubik"; font-weight: 800; font-display: swap; src: url("../assets/fonts/rubik-cyrillic-800-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Rubik"; font-weight: 800; font-display: swap; src: url("../assets/fonts/rubik-latin-800-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-weight: 400; font-display: swap; src: url("../assets/fonts/inter-cyrillic-400-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Inter"; font-weight: 400; font-display: swap; src: url("../assets/fonts/inter-latin-400-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-weight: 500; font-display: swap; src: url("../assets/fonts/inter-cyrillic-500-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Inter"; font-weight: 500; font-display: swap; src: url("../assets/fonts/inter-latin-500-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-weight: 600; font-display: swap; src: url("../assets/fonts/inter-cyrillic-600-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Inter"; font-weight: 600; font-display: swap; src: url("../assets/fonts/inter-latin-600-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "JetBrains Mono"; font-weight: 500; font-display: swap; src: url("../assets/fonts/jetbrains-mono-cyrillic-500-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "JetBrains Mono"; font-weight: 500; font-display: swap; src: url("../assets/fonts/jetbrains-mono-latin-500-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --black: #000;
  --bg: #090909;
  --panel: #141414;
  --graphite: #363636;
  --ink: #f2f2f2;
  --muted: #8d939c;
  --lime: #beff1d;
  --steel: #bbc4d0;
  --white: #fff;
  --line: rgba(255, 255, 255, 0.14);

  --f-display: "Rubik", "Arial Black", system-ui, sans-serif;
  --f-body: "Inter", system-ui, -apple-system, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, Menlo, monospace;

  --gutter: clamp(20px, 6.5vw, 128px);
  --header-h: 64px;
  --radius: 4px;
  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.5 var(--f-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
::selection { background: var(--lime); color: var(--black); }
:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; }

.mono { font-family: var(--f-mono); font-weight: 500; letter-spacing: 0.02em; }
.muted { color: var(--muted); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { padding-inline: var(--gutter); max-width: 1680px; margin-inline: auto; }
main { min-height: 70vh; }
.page { padding-top: calc(var(--header-h) + 40px); }

/* ---------- Плашки (фирменный приём) ---------- */
.plate {
  display: inline-flex; align-items: center; gap: 0.4em;
  padding: 0.18em 0.42em 0.12em;
  background: var(--lime); color: var(--black);
  font-family: var(--f-display); font-weight: 800; line-height: 1;
  text-transform: uppercase; letter-spacing: 0.02em;
}
.plate--black { background: var(--black); color: var(--lime); }
.plate--steel { background: var(--steel); color: var(--black); }
.plate--white { background: var(--white); color: var(--black); }

.tag {
  display: inline-block;
  padding: 5px 8px 4px;
  font: 500 11px/1 var(--f-mono);
  text-transform: uppercase; letter-spacing: 0.04em;
  background: var(--black); color: var(--lime);
}
.tag--steel { background: var(--steel); color: var(--black); }

/* ---------- Заголовок секции ---------- */
.section { padding-block: clamp(64px, 9vw, 140px); }
.section-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 16px;
  margin-bottom: clamp(24px, 3vw, 44px);
  flex-wrap: wrap;
}
.section-title { display: flex; align-items: stretch; gap: 0; margin: 0; font-size: clamp(32px, 5.4vw, 84px); }
.section-title .plate { padding: 0.12em 0.3em 0.04em; }
.section-title .count {
  display: inline-flex; align-items: flex-start;
  padding: 0.25em 0.35em; font: 500 0.22em/1 var(--f-mono);
  background: var(--black); color: var(--lime);
}
.link-more {
  display: inline-flex; align-items: center; gap: 10px;
  font: 500 13px/1 var(--f-mono); text-transform: uppercase; letter-spacing: 0.04em;
  padding: 12px 14px; border: 1px solid var(--line);
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.link-more:hover { background: var(--lime); color: var(--black); border-color: var(--lime); }
.link-more svg { width: 14px; height: 14px; }

/* =========================================================
   ШАПКА
   ========================================================= */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  height: var(--header-h);
  display: flex; align-items: center; gap: 6px;
  padding: 10px var(--gutter);
  pointer-events: none;
}
.site-header > * { pointer-events: auto; }
.logo {
  display: flex; height: 44px; flex: none;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.06);
}
.logo-eye { width: 73px; height: 44px; background: var(--black); display: grid; place-items: center; }
.logo-eye svg { width: 62px; height: 30px; overflow: visible; }
.logo-word { height: 44px; padding: 0 14px; background: var(--lime); display: grid; place-items: center; }
.logo-word svg { height: 21px; width: auto; color: var(--black); }

.eye-lid { transform-origin: 50% 50%; transform-box: fill-box; transition: transform 0.12s ease-in; }
.eye-lid.is-blink { transform: scaleY(0.06); }

.nav { display: flex; gap: 6px; margin-left: 6px; }
.nav a {
  height: 44px; min-width: 112px; padding: 0 14px 9px;
  display: flex; align-items: flex-end;
  background: rgba(20, 20, 20, 0.82);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--line);
  font: 500 12px/1 var(--f-mono); text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--muted);
  transition: color 0.2s, background 0.2s, border-color 0.2s;
}
.nav a:hover { color: var(--ink); border-color: rgba(255,255,255,0.32); }
.nav a[aria-current="page"] { background: var(--lime); color: var(--black); border-color: var(--lime); }
.nav a sup { font-size: 9px; margin-left: 4px; vertical-align: top; opacity: 0.8; }

.header-meta {
  margin-left: auto; height: 44px;
  display: flex; align-items: center; gap: 14px; padding: 0 14px;
  background: rgba(20, 20, 20, 0.82);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--line);
  font: 500 12px/1 var(--f-mono); text-transform: uppercase; letter-spacing: 0.04em;
}
.status { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); }
.status::before { content: ""; width: 8px; height: 8px; background: var(--lime); border-radius: 50%; box-shadow: 0 0 10px var(--lime); animation: pulse 2s infinite; }
@keyframes pulse { 50% { opacity: 0.35; } }
.clock { color: var(--muted); min-width: 11ch; }

.menu-btn {
  display: none; margin-left: auto; height: 44px; padding: 0 16px;
  background: var(--lime); color: var(--black);
  font: 500 12px/1 var(--f-mono); text-transform: uppercase; letter-spacing: 0.04em;
}
.mobile-menu {
  position: fixed; inset: 0; z-index: 49;
  background: var(--black);
  padding: calc(var(--header-h) + 24px) var(--gutter) 32px;
  display: flex; flex-direction: column; gap: 8px;
  transform: translateY(-100%); visibility: hidden; transition: transform 0.45s var(--ease), visibility 0s 0.45s;
}
.mobile-menu.is-open { transform: none; visibility: visible; transition: transform 0.45s var(--ease); }
.mobile-menu a {
  font: 800 clamp(40px, 12vw, 64px)/1 var(--f-display); text-transform: uppercase;
  display: flex; justify-content: space-between; align-items: flex-start;
  padding: 8px 0; border-bottom: 1px solid var(--line);
}
.mobile-menu a[aria-current="page"] { color: var(--lime); }
.mobile-menu a sup { font: 500 12px/1 var(--f-mono); color: var(--muted); }
.mobile-menu .mm-foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; font: 500 13px/1.4 var(--f-mono); }

@media (max-width: 1100px) { .header-meta .clock { display: none; } }
@media (max-width: 860px) {
  .nav, .header-meta { display: none; }
  .menu-btn { display: block; }
  .logo, .logo-eye, .logo-word, .menu-btn { height: 40px; }
  .logo-eye { width: 64px; }
  .logo-eye svg { width: 54px; }
  .logo-word svg { height: 18px; }
}

/* =========================================================
   ФУТЕР
   ========================================================= */
.site-footer { border-top: 1px solid var(--line); padding: 28px 0 24px; margin-top: 40px; }
.footer-row { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font: 500 12px/1.4 var(--f-mono); text-transform: uppercase; color: var(--muted); }
.footer-row a:hover { color: var(--lime); }
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; }
.footer-word { margin: 28px 0; color: var(--lime); }
.footer-word svg { width: 100%; height: auto; }

/* =========================================================
   ФИЛЬТРЫ-ПИЛЮЛИ (как в рефе UNVEIL)
   ========================================================= */
.pills { display: flex; flex-wrap: wrap; gap: 6px; }
.pill {
  height: 34px; padding: 0 14px;
  display: inline-flex; align-items: center; gap: 4px;
  border: 1px solid var(--line); border-radius: 999px;
  background: rgba(20,20,20,0.82);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  font: 500 11px/1 var(--f-mono); text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--muted);
  transition: color 0.2s, background 0.2s, border-color 0.2s;
  white-space: nowrap;
}
.pill sup { font-size: 9px; align-self: flex-start; margin-top: 8px; }
.pill:hover { color: var(--ink); border-color: rgba(255,255,255,0.35); }
.pill[aria-pressed="true"] { background: var(--lime); border-color: var(--lime); color: var(--black); }

/* =========================================================
   КАРТОЧКА ПРОЕКТА + ШТОРКИ
   ========================================================= */
.projects-grid {
  display: grid; grid-template-columns: repeat(12, 1fr);
  gap: clamp(28px, 3vw, 48px) clamp(12px, 1.6vw, 24px);
}
.project-card { grid-column: span 6; display: block; }
.projects-grid--featured .project-card:nth-child(4n + 1) { grid-column: 1 / span 7; }
.projects-grid--featured .project-card:nth-child(4n + 2) { grid-column: 8 / span 5; margin-top: 18%; }
.projects-grid--featured .project-card:nth-child(4n + 3) { grid-column: 1 / span 5; }
.projects-grid--featured .project-card:nth-child(4n + 4) { grid-column: 6 / span 7; margin-top: -8%; }

.cover {
  position: relative; overflow: hidden; aspect-ratio: 37 / 30;
  background: var(--panel);
}
.cover > svg, .cover > img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.9s var(--ease); }
.project-card:hover .cover > svg, .project-card:hover .cover > img { transform: scale(1.035); }
.cover-tags { position: absolute; left: 10px; top: 10px; display: flex; gap: 4px; flex-wrap: wrap; z-index: 3; max-width: calc(100% - 20px); }

/* шторки: блоки, которые разъезжаются при появлении карточки */
.shutters { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.shutters i {
  position: absolute; display: block;
  transition: transform 1.1s var(--ease);
  transition-delay: var(--d, 0ms);
}
.shutters i:nth-child(1) { left: 0; top: 0; width: 58%; height: 54%; background: var(--steel); }
.shutters i:nth-child(2) { right: 0; top: 0; width: 46%; height: 38%; background: var(--black); }
.shutters i:nth-child(3) { left: 0; bottom: 0; width: 38%; height: 50%; background: var(--black); }
.shutters i:nth-child(4) { right: 0; bottom: 0; width: 66%; height: 66%; background: var(--steel); }
.shutters i:nth-child(5) { left: 30%; top: 30%; width: 34%; height: 30%; background: var(--lime); }
.is-revealed .shutters i:nth-child(1) { transform: translateX(-102%); }
.is-revealed .shutters i:nth-child(2) { transform: translateY(-102%); }
.is-revealed .shutters i:nth-child(3) { transform: translateY(102%); }
.is-revealed .shutters i:nth-child(4) { transform: translateX(102%); }
.is-revealed .shutters i:nth-child(5) { transform: scale(0); }

.card-meta {
  display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: baseline;
  padding-top: 14px;
}
.card-num { font: 500 12px/1 var(--f-mono); color: var(--lime); }
.card-title { margin: 0; font: 700 clamp(20px, 1.9vw, 28px)/1.1 var(--f-display); text-transform: uppercase; }
.card-sub { grid-column: 2 / 3; margin: -8px 0 0; color: var(--muted); font-size: 14px; }
.card-year { font: 500 12px/1 var(--f-mono); color: var(--muted); }

@media (max-width: 760px) {
  .projects-grid { grid-template-columns: 1fr; }
  .project-card, .projects-grid--featured .project-card:nth-child(n) { grid-column: 1 / -1; margin-top: 0; }
}

/* =========================================================
   СТАТЬИ — список
   ========================================================= */
.article-list { border-top: 1px solid var(--line); }
.article-row {
  display: grid; grid-template-columns: 70px 1fr 220px 170px 24px; gap: 20px; align-items: center;
  padding: 22px 0; border-bottom: 1px solid var(--line);
  position: relative; transition: padding 0.35s var(--ease), color 0.2s;
}
.article-row::before { content: ""; position: absolute; inset: 0; background: var(--lime); transform: scaleY(0); transform-origin: bottom; transition: transform 0.35s var(--ease); z-index: -1; }
.article-row:hover { color: var(--black); padding-inline: 16px; }
.article-row:hover::before { transform: scaleY(1); }
.article-row:hover .muted, .article-row:hover .mono { color: var(--black); }
.article-row h3 { margin: 0; font: 700 clamp(18px, 2vw, 28px)/1.15 var(--f-display); }
.article-row .ar-tags { display: flex; gap: 4px; flex-wrap: wrap; }
.article-row .arrow { width: 20px; height: 20px; }
.article-row .ar-date { font-size: 13px; }
.article-list { position: relative; z-index: 0; isolation: isolate; }
@media (max-width: 860px) {
  .article-row { grid-template-columns: 44px 1fr 24px; gap: 12px; }
  .article-row .ar-tags { display: none; }
  .article-row .ar-date { grid-column: 2; grid-row: 2; margin-top: -4px; }
  .article-row .arrow { grid-row: 1 / 3; grid-column: 3; }
}

/* =========================================================
   ДЕТАЛЬНЫЕ СТРАНИЦЫ
   ========================================================= */
.back { display: inline-flex; gap: 8px; align-items: center; font: 500 12px/1 var(--f-mono); text-transform: uppercase; color: var(--muted); margin-bottom: 28px; }
.back:hover { color: var(--lime); }
.detail-title { margin: 0 0 18px; font: 800 clamp(44px, 9vw, 150px)/0.9 var(--f-display); text-transform: uppercase; letter-spacing: -0.01em; }
.detail-lead { font: 500 clamp(18px, 2vw, 28px)/1.3 var(--f-body); max-width: 30ch; margin: 0; }
.detail-head { display: grid; grid-template-columns: 1fr 360px; gap: 40px; align-items: end; padding-bottom: 36px; border-bottom: 1px solid var(--line); }
.facts { display: grid; gap: 0; border-top: 1px solid var(--line); }
.facts div { display: grid; grid-template-columns: 110px 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.facts dt { font: 500 11px/1.6 var(--f-mono); text-transform: uppercase; color: var(--muted); }
.facts dd { margin: 0; }
.detail-cover { margin: 36px 0; aspect-ratio: 16 / 9; }
.prose { max-width: 68ch; font-size: 18px; line-height: 1.65; }
.prose p { margin: 0 0 1.1em; }
.prose h2 { font: 700 clamp(24px, 3vw, 38px)/1.1 var(--f-display); margin: 1.6em 0 0.6em; text-transform: uppercase; }
.prose blockquote.pull { margin: 1.6em 0; padding: 18px 22px; background: var(--lime); color: var(--black); font: 700 clamp(20px, 2.4vw, 30px)/1.2 var(--f-display); border: 0; }
.detail-body { display: grid; grid-template-columns: 1fr 2fr; gap: 40px; margin: 48px 0; }
.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.gallery .g-item { aspect-ratio: 3 / 4; overflow: hidden; background: var(--panel); }
.gallery .g-item:first-child { grid-column: 1 / -1; aspect-ratio: 16 / 9; }
.gallery svg, .gallery img { width: 100%; height: 100%; object-fit: cover; }
.next-link { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 30px 0; border-top: 1px solid var(--line); margin-top: 60px; }
.next-link .nl-title { font: 800 clamp(28px, 5vw, 72px)/1 var(--f-display); text-transform: uppercase; transition: color 0.2s; }
.next-link:hover .nl-title { color: var(--lime); }
@media (max-width: 860px) {
  .detail-head, .detail-body { grid-template-columns: 1fr; gap: 24px; }
  .gallery { grid-template-columns: 1fr; }
}

/* общие анимации появления */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.reveal.is-revealed { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}

/* =========================================================
   СТАТЬЯ: длинный текст, содержание, промты
   ========================================================= */
.article-title { font-size: clamp(34px, 5.4vw, 88px); max-width: 18ch; line-height: 0.95; }
.article-meta { font-size: 13px; text-transform: uppercase; margin: 0; }
.article-body { grid-template-columns: minmax(240px, 320px) minmax(0, 1fr); gap: clamp(28px, 5vw, 80px); align-items: start; }
.article-side { position: sticky; top: calc(var(--header-h) + 24px); max-height: calc(100vh - var(--header-h) - 48px); overflow: auto; scrollbar-width: thin; }
.article-side .detail-lead { font-size: 18px; margin-bottom: 28px; max-width: none; }
.toc summary { font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--lime); cursor: pointer; list-style: none; margin-bottom: 12px; }
.toc summary::-webkit-details-marker { display: none; }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.toc li a { display: block; padding: 6px 0 6px 14px; margin-left: -1px; border-left: 2px solid transparent; font-size: 14px; line-height: 1.3; color: var(--muted); transition: color 0.2s, border-color 0.2s; }
.toc li.toc-l3 a { padding-left: 28px; font-size: 13px; }
.toc li a:hover { color: var(--ink); }
.toc li a.is-active { color: var(--lime); border-left-color: var(--lime); }

.article-body .prose { max-width: 760px; font-size: 18px; }
.prose h2, .prose h3, .prose h4 { scroll-margin-top: calc(var(--header-h) + 24px); }
.prose h2 { padding-top: 1.2em; border-top: 1px solid var(--line); }
.prose h2:first-of-type { border-top: 0; padding-top: 0.4em; }
.prose h3 { font: 700 clamp(20px, 2vw, 26px)/1.2 var(--f-display); margin: 1.8em 0 0.6em; }
.prose h4 { font: 700 17px/1.2 var(--f-display); text-transform: uppercase; margin: 1.6em 0 0.5em; color: var(--lime); }
.prose a { color: var(--lime); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.prose a:hover { background: var(--lime); color: var(--black); text-decoration: none; }
.prose strong { color: var(--white); font-weight: 600; }
.prose ul, .prose ol { margin: 0 0 1.1em; padding-left: 1.3em; }
.prose li { margin: 0.3em 0; }
.prose li::marker { color: var(--lime); font-family: var(--f-mono); }
.prose blockquote { margin: 1em 0; padding: 12px 16px; background: var(--panel); border-left: 3px solid var(--lime); font-weight: 500; font-size: 17px; }
.prose .formula { font: 500 15px/1.5 var(--f-mono); background: var(--black); color: var(--lime); padding: 14px 16px; border: 1px solid var(--line); }
.prose ol.chips { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; margin: 1em 0 1.4em; counter-reset: chip; }
.prose ol.chips li { margin: 0; padding: 8px 12px 7px; background: var(--panel); border: 1px solid var(--line); font-size: 14px; line-height: 1.2; counter-increment: chip; }
.prose ol.chips li::before { content: counter(chip, decimal-leading-zero); font: 500 11px/1 var(--f-mono); color: var(--lime); margin-right: 8px; }
.prose figure { margin: 28px 0; }
.prose figure img { width: 100%; height: auto; display: block; background: var(--panel); border: 1px solid var(--line); }
.prose figcaption { margin-top: 8px; font: 500 12px/1.5 var(--f-mono); color: var(--muted); }
.prose figcaption.prompt, .prose .prompt-block {
  display: grid; grid-template-columns: auto 1fr auto; gap: 10px 14px; align-items: start;
  margin-top: 0; padding: 14px 16px; background: var(--panel); border: 1px solid var(--line); border-top: 0;
  font: 400 15px/1.5 var(--f-body); color: var(--ink);
}
.prose .prompt-block { border-top: 1px solid var(--line); border-left: 3px solid var(--lime); margin: 0.6em 0 1.4em; }
.prose .prompt-block p { margin: 0; }
.prose .prompt .tag, .prose .prompt-block .tag { margin-top: 2px; }
.copy-btn {
  font: 500 11px/1 var(--f-mono); text-transform: uppercase; letter-spacing: 0.04em;
  padding: 7px 9px; border: 1px solid var(--line); color: var(--muted); white-space: nowrap;
  transition: color 0.2s, background 0.2s, border-color 0.2s;
}
.copy-btn:hover { color: var(--black); background: var(--lime); border-color: var(--lime); }
.copy-btn.is-done { color: var(--black); background: var(--lime); border-color: var(--lime); }
.prose .promo { display: block; margin: 8px 0 32px; text-decoration: none; background: none; }
.prose .promo img { width: 100%; height: auto; display: block; border: 1px solid var(--line); transition: transform 0.4s var(--ease); }
.prose .promo:hover { background: none; }
.prose .promo:hover img { transform: scale(1.01); }
.prose .cta { margin-top: 1.2em; padding: 16px 18px; border: 1px solid var(--lime); font-weight: 500; }

@media (max-width: 860px) {
  .article-body { grid-template-columns: 1fr; }
  .article-side { position: static; max-height: none; overflow: visible; }
  .toc details:not([open]) summary { margin-bottom: 0; }
  .article-body .prose { font-size: 17px; }
  .prose figcaption.prompt, .prose .prompt-block { grid-template-columns: 1fr auto; }
  .prose figcaption.prompt .tag, .prose .prompt-block .tag { grid-column: 1 / -1; justify-self: start; }
}

.prose .aside { margin: 1.4em 0; padding: 16px 0 16px 20px; border-left: 3px solid var(--lime); font: 500 clamp(19px, 1.8vw, 22px)/1.4 var(--f-body); color: var(--white); }
.prose .prompt-block .pt p { margin: 0 0 0.5em; }
.prose .prompt-block .pt p:last-child { margin-bottom: 0; }
.prose .cta--nav { border-color: var(--line); background: var(--panel); font-family: var(--f-mono); font-size: 13px; text-transform: uppercase; letter-spacing: 0.03em; }
.prose .cta--nav a { text-transform: none; font-family: var(--f-body); font-size: 16px; }
.prose figcaption.prompt .pt { white-space: pre-line; }

/* =========================================================
   КЕЙС ПРОЕКТА
   ========================================================= */
.project-title { font-size: clamp(40px, 7.5vw, 128px); max-width: 14ch; }
.detail-head { margin-bottom: 0; }
.project-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.case-flow { margin: 48px calc(var(--gutter) * -1) 0; display: flex; flex-direction: column; gap: 0; }
@media (min-width: 1500px) { .case-flow { margin-inline: auto; max-width: 1480px; } }
.cf-item { margin: 0; background: var(--panel); }
.cf-item img { width: 100%; height: auto; display: block; }
.cf-video iframe { width: 100%; height: 100%; border: 0; display: block; }
.case-source { margin: 28px 0 0; font-size: 12px; text-transform: uppercase; }
.case-source a { color: var(--muted); display: inline-flex; gap: 8px; align-items: center; }
.case-source a:hover { color: var(--lime); }
.case-source svg { width: 14px; height: 14px; }

/* =========================================================
   МАСШТАБ И ВОЗДУХ (спокойнее, как на Dprofile)
   — мельче заголовки, ровная сетка, больше отступов
   ========================================================= */
.page { padding-top: calc(var(--header-h) + 64px); }
.section { padding-block: clamp(88px, 10vw, 168px); }
/* соседние блоки на одном фоне: отступ между ними один, а не два сложенных */
.section + .section:not(.about) { padding-top: 0; }
.section-head { margin-bottom: clamp(28px, 2.6vw, 40px); align-items: center; }
.section-title { font-size: clamp(20px, 1.9vw, 28px); }
.section-title .plate { padding: 0.32em 0.6em 0.24em; }
.section-title .count { font-size: 11px; padding: 6px 8px; }

/* проекты: ровная сетка карточек */
.projects-grid { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 56px 20px; }
.project-card,
.projects-grid--featured .project-card:nth-child(n) { grid-column: auto; margin-top: 0; }
.card-meta { grid-template-columns: 1fr auto; gap: 6px 16px; padding-top: 16px; align-items: baseline; }
.card-num { display: none; }
.card-title { font: 600 17px/1.3 var(--f-body); text-transform: none; letter-spacing: 0; }
.card-sub { grid-column: 1 / -1; margin: 0; font-size: 13px; line-height: 1.4; }
.card-year { font-size: 11px; }
.cover-tags .tag { font-size: 10px; padding: 4px 6px 3px; }

/* статьи — список */
.article-row { padding: 26px 0; grid-template-columns: 70px 1fr 220px 170px 24px; }
.article-row h3 { font: 600 clamp(17px, 1.35vw, 21px)/1.35 var(--f-body); }

/* детальные страницы */
.detail-title, .project-title { font-size: clamp(30px, 3.8vw, 58px); line-height: 1.02; max-width: 20ch; margin-bottom: 20px; }
.article-title { font-size: clamp(28px, 3.2vw, 50px); line-height: 1.05; max-width: 24ch; }
.detail-lead { font: 400 clamp(17px, 1.35vw, 20px)/1.5 var(--f-body); max-width: 46ch; }
.detail-head { grid-template-columns: 1fr 340px; gap: 64px; padding-bottom: 48px; }
.detail-body { margin: 72px 0; }
.detail-cover { margin: 56px 0; }
.prose { font-size: 17px; }
.prose h2 { font-size: clamp(20px, 1.9vw, 28px); }
.next-link { margin-top: 112px; padding: 40px 0; }
.next-link .nl-title { font-size: clamp(20px, 2.2vw, 32px) !important; }
.case-flow { margin: 72px auto 0; max-width: 1280px; gap: 16px; }
.case-source { max-width: 1280px; margin-inline: auto; }

/* футер */
.site-footer { margin-top: 96px; padding: 40px 0 32px; }
.footer-word { margin: 56px 0 40px; width: clamp(220px, 34vw, 560px); }

@media (max-width: 860px) {
  .detail-head { grid-template-columns: 1fr; gap: 32px; }
  .article-row { grid-template-columns: 44px 1fr 24px; padding: 20px 0; }
  .case-flow { margin-top: 48px; gap: 10px; }
  .section { padding-block: 72px; }
}
@media (max-width: 760px) {
  .section-head .pills { flex-wrap: nowrap; overflow-x: auto; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); scrollbar-width: none; width: calc(100% + var(--gutter) * 2); }
  .section-head .pills::-webkit-scrollbar { display: none; }
}

/* поля по бокам — больше пустоты */
.projects-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.wrap { max-width: 1760px; }

/* =========================================================
   ЦВЕТНОЙ ФОН СТРАНИЦЫ (у каждого проекта — свой, из обложки)
   ========================================================= */
@property --va { syntax: "<color>"; inherits: true; initial-value: transparent; }
@property --vb { syntax: "<color>"; inherits: true; initial-value: transparent; }
@property --vbase { syntax: "<color>"; inherits: true; initial-value: #090909; }
html { --sp: 0; transition: --va 0.9s ease, --vb 0.9s ease, --vbase 0.9s ease; }
body.has-bg { background: var(--vbase); }
body.has-bg::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(55% 60% at calc(78% - var(--sp) * 40%) calc(18% + var(--sp) * 50%), color-mix(in srgb, var(--va) 30%, transparent), transparent 70%),
    radial-gradient(50% 55% at calc(12% + var(--sp) * 30%) calc(92% - var(--sp) * 40%), color-mix(in srgb, var(--vb) 34%, transparent), transparent 72%);
}
body.has-bg main, body.has-bg .site-footer { position: relative; }
body.has-bg .facts div, body.has-bg .detail-head, body.has-bg .next-link, body.has-bg .site-footer { border-color: rgba(255,255,255,0.16); }
body.has-bg .cf-item { background: transparent; }

/* шапка: при прокрутке под ней появляется подложка, текст не лезет под меню */
.site-header::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  /* матовое стекло: размывает то, что под шапкой, и берёт его цвет — без грязной тени на светлых блоках */
  background: color-mix(in srgb, var(--vbase, #090909) 55%, transparent);
  -webkit-backdrop-filter: blur(18px) saturate(1.4); backdrop-filter: blur(18px) saturate(1.4);
  box-shadow: 0 1px 0 rgba(255,255,255,0.06);
  opacity: 0; transition: opacity 0.3s;
}
body.is-scrolled .site-header::before { opacity: 1; }
.posters-page .site-header::before { display: none; }
/* слайды кейса идут встык, без зазоров */
.case-flow { gap: 0 !important; }
.cf-item { margin: 0; line-height: 0; }
.cf-item img { display: block; vertical-align: top; }

/* =========================================================
   ТЕМА: кнопка + светлая палитра
   ========================================================= */
:root { --chip: rgba(20, 20, 20, 0.82); --chip-ink: var(--muted); --lime-ink: var(--lime); }
.theme-btn {
  height: 44px; padding: 0 14px; display: inline-flex; align-items: center; gap: 8px; margin-left: 6px;
  background: var(--chip); border: 1px solid var(--line); color: var(--ink);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  font: 500 12px/1 var(--f-mono); text-transform: uppercase; letter-spacing: 0.04em;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.theme-btn svg { width: 16px; height: 16px; }
.theme-btn:hover { background: var(--lime); color: var(--black); border-color: var(--lime); }
.ti-moon { display: none; }
[data-theme="light"] .ti-sun { display: none; }
[data-theme="light"] .ti-moon { display: block; }
.header-meta + .theme-btn { margin-left: 6px; }
@media (max-width: 860px) {
  .theme-btn { height: 40px; padding: 0 12px; margin-left: auto; }
  .theme-btn .theme-label { display: none; }
  .theme-btn + .menu-btn { margin-left: 6px; }
}
.theme-anim, .theme-anim body, .theme-anim .site-header *, .theme-anim main * { transition: background-color 0.4s, color 0.4s, border-color 0.4s !important; }

/* светлая тема */
[data-theme="light"] {
  --bg: #efeee9; --panel: #e2e1db; --graphite: #cfd0cc;
  --ink: #0d0d0d; --muted: #61666d; --white: #0d0d0d;
  --line: rgba(0, 0, 0, 0.14);
  --chip: rgba(255, 255, 255, 0.78);
  --lime-ink: #4c6b00;
  color-scheme: light;
}
[data-theme="light"] body { background: var(--bg); color: var(--ink); }
[data-theme="light"] .nav a, [data-theme="light"] .header-meta, [data-theme="light"] .pill,
[data-theme="light"] .ss-btn, [data-theme="light"] .view-toggle button { background: var(--chip); }
[data-theme="light"] .nav a:hover, [data-theme="light"] .pill:hover { border-color: rgba(0,0,0,0.35); }
[data-theme="light"] .nav a[aria-current="page"], [data-theme="light"] .pill[aria-pressed="true"],
[data-theme="light"] .view-toggle button[aria-pressed="true"] { background: var(--lime); color: #000; border-color: var(--lime); }
[data-theme="light"] .logo { box-shadow: 0 0 0 1px rgba(0,0,0,0.12); }
/* лаймовый текст на светлом фоне — темнее, чтобы читался */
[data-theme="light"] .card-num, [data-theme="light"] .prose a, [data-theme="light"] .toc summary,
[data-theme="light"] .toc li a.is-active, [data-theme="light"] .prose h4, [data-theme="light"] .lb-num,
[data-theme="light"] .stack-caption .sc-num, [data-theme="light"] .stack-count b { color: var(--lime-ink); }
[data-theme="light"] .toc li a.is-active { border-left-color: var(--lime-ink); }
[data-theme="light"] .prose a:hover { color: #000; }
[data-theme="light"] .prose blockquote, [data-theme="light"] .prose ol.chips li,
[data-theme="light"] .prose figcaption.prompt, [data-theme="light"] .prose .prompt-block { background: #fff; }
[data-theme="light"] .prose .formula { background: #111; color: var(--lime); }
[data-theme="light"] .footer-word { color: var(--ink); }
[data-theme="light"] .article-row:hover { color: #000; }
[data-theme="light"] .section-title .count { background: #111; }
[data-theme="light"] .plate--white { background: #111; color: #fff; }
[data-theme="light"] .site-header::before { background: color-mix(in srgb, var(--bg) 60%, transparent); box-shadow: 0 1px 0 rgba(0,0,0,0.07); }
[data-theme="light"] .cf-item, [data-theme="light"] .cover, [data-theme="light"] .gallery .g-item { background: var(--panel); }

/* цветной фон проектов и галереи — светлые оттенки */
[data-theme="light"] body.has-bg { background: color-mix(in srgb, var(--va) 9%, var(--bg)); }
[data-theme="light"] body.has-bg::before {
  background:
    radial-gradient(55% 60% at calc(78% - var(--sp) * 40%) calc(18% + var(--sp) * 50%), color-mix(in srgb, var(--va) 26%, transparent), transparent 70%),
    radial-gradient(50% 55% at calc(12% + var(--sp) * 30%) calc(92% - var(--sp) * 40%), color-mix(in srgb, var(--vb) 22%, transparent), transparent 72%);
}
[data-theme="light"] body.has-bg .facts div, [data-theme="light"] body.has-bg .detail-head,
[data-theme="light"] body.has-bg .next-link, [data-theme="light"] body.has-bg .site-footer { border-color: rgba(0,0,0,0.14); }
[data-theme="light"] body.has-bg .site-header::before { background: color-mix(in srgb, color-mix(in srgb, var(--va, transparent) 9%, var(--bg)) 60%, transparent); }

/* то, что всегда остаётся тёмным, — со своими тёмными цветами */
[data-theme="light"] .lightbox, [data-theme="light"] .mobile-menu, [data-theme="light"] .hero-ui {
  --ink: #f2f2f2; --muted: #8d939c; --white: #fff; --line: rgba(255,255,255,0.14); --chip: rgba(20,20,20,0.82); --lime-ink: var(--lime);
  color: var(--ink);
}

/* светлая тема: наведение — не лаймовый текст (на светлом не читается), а чёрный текст на лаймовой плашке */
[data-theme="light"] .next-link .nl-title { transition: color 0.2s, background-color 0.2s, box-shadow 0.2s; }
[data-theme="light"] .next-link:hover .nl-title { color: #000; background: var(--lime); box-shadow: 0 0 0 0.18em var(--lime); }
[data-theme="light"] .back:hover,
[data-theme="light"] .case-source a:hover,
[data-theme="light"] .footer-row a:hover { color: #000; background: var(--lime); box-shadow: 0 0 0 4px var(--lime); }
.project-links--head { margin-top: 28px; }

/* подвал сразу после цветного блока на всю ширину (главная: «Обо мне») — без пустой полосы и линии */
body:has(main > .about:last-child) .site-footer { margin-top: 0; border-top: 0; }

/* теги на обложках и в шапке проекта — фирменный серый, без лайма: лайм остаётся для активного и важного */
.cover-tags .tag { background: rgba(10,10,10,0.78); color: var(--steel); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
[data-theme="light"] .cover-tags .tag { background: rgba(255,255,255,0.86); color: #3a3f4a; }

/* =========================================================
   Шапка: у каждого типа элемента — свой вид
   навигация — одна общая панель-переключатель;
   статус и время — просто информация, без рамки;
   смена темы — квадратная кнопка-иконка
   ========================================================= */
@media (min-width: 861px) {
  .nav { gap: 0; padding: 4px; margin-left: 10px; height: 44px; align-items: stretch;
    background: rgba(20,20,20,0.82); border: 1px solid var(--line);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
  .nav a { height: auto; min-width: 0; padding: 0 16px; align-items: center; background: transparent; border: 0; backdrop-filter: none; -webkit-backdrop-filter: none; }
  .nav a:hover { color: var(--ink); background: rgba(255,255,255,0.06); }
  .nav a[aria-current="page"] { background: var(--lime); color: var(--black); }
  .header-meta { background: transparent; border: 0; backdrop-filter: none; -webkit-backdrop-filter: none; padding: 0 6px; gap: 12px;
    text-shadow: 0 1px 8px rgba(0,0,0,0.6); }
  .theme-btn { width: 44px; padding: 0; justify-content: center; margin-left: 10px; }
  .theme-btn .theme-label { display: none; }
  .theme-btn svg { width: 18px; height: 18px; }
}
[data-theme="light"] .nav { background: var(--chip); border-color: rgba(0,0,0,0.1); }
[data-theme="light"] .nav a { background: transparent; }
[data-theme="light"] .nav a:hover { background: rgba(0,0,0,0.05); border-color: transparent; }
[data-theme="light"] .nav a[aria-current="page"] { background: var(--lime); color: #000; }
[data-theme="light"] .header-meta { background: transparent; text-shadow: 0 1px 8px rgba(255,255,255,0.8); }

/* заголовки разделов — везде на сером (фирменный стальной), лайм остаётся для активного */
.section-title .plate, .section-title .plate--white, .section-title .plate--steel { background: var(--steel); color: var(--black); }
[data-theme="light"] .section-title .plate { background: var(--steel); color: #000; }

/* активный раздел — не лаймовая заливка (спорила с логотипом), а белый текст и лаймовая полоска снизу */
@media (min-width: 861px) {
  .nav a { position: relative; }
  .nav a::after { content: ""; position: absolute; left: 16px; right: 16px; bottom: 3px; height: 2px; background: var(--lime); transform: scaleX(0); transition: transform 0.25s; }
  .nav a[aria-current="page"], [data-theme="light"] .nav a[aria-current="page"] { background: transparent; color: var(--ink); }
  .nav a[aria-current="page"]::after { transform: scaleX(1); }
  .nav a:hover::after { transform: scaleX(0.35); }
  .nav a[aria-current="page"]:hover::after { transform: scaleX(1); }
  [data-theme="light"] .nav a::after { background: #111; }
}
/* навигация без общей рамки — только мягкая подложка */
@media (min-width: 861px) { .nav, [data-theme="light"] .nav { border-color: transparent; } }

/* =========================================================
   Шапка: без фона и без подложки при прокрутке;
   все элементы — по высоте логотипа
   ========================================================= */
.site-header, [data-theme="light"] .site-header { background: transparent; align-items: center; }
.site-header::before, [data-theme="light"] .site-header::before { display: none; }
.nav, [data-theme="light"] .nav { background: transparent; border: 0; backdrop-filter: none; -webkit-backdrop-filter: none; padding: 0; height: var(--logo-h, 44px); align-items: stretch; }
.nav a, [data-theme="light"] .nav a { background: transparent; border: 0; color: var(--muted); height: auto; display: flex; align-items: center; }
.nav a:hover, [data-theme="light"] .nav a:hover { background: transparent; color: var(--ink); }
.nav a[aria-current="page"], [data-theme="light"] .nav a[aria-current="page"] { background: transparent; color: var(--ink); }
.nav a::after { bottom: 0 !important; }
[data-theme="light"] .nav a::after { background: #111; }
.header-meta, [data-theme="light"] .header-meta { background: transparent; border: 0; text-shadow: none; height: var(--logo-h, 44px); }
.theme-btn, [data-theme="light"] .theme-btn { height: var(--logo-h, 44px); width: var(--logo-h, 44px); background: transparent; border: 1px solid var(--line); color: var(--ink); }
.theme-btn:hover, [data-theme="light"] .theme-btn:hover { background: var(--lime); color: #000; border-color: var(--lime); }
[data-theme="light"] .logo { box-shadow: none; }
.site-header { --logo-h: 44px; }
@media (max-width: 860px) { .site-header { --logo-h: 40px; } }

/* островки: шапка без фона, но меню, статус и кнопка темы — на чёрных плашках, как логотип (в обеих темах) */
.nav, .header-meta, .theme-btn,
[data-theme="light"] .nav, [data-theme="light"] .header-meta, [data-theme="light"] .theme-btn {
  --ink: #f2f2f2; --muted: #8d939c; --line: rgba(255,255,255,0.14);
  background: #0a0a0a; color: var(--ink); border: 0;
}
.nav, [data-theme="light"] .nav { padding: 0 6px; }
.header-meta { padding: 0 16px; }
.nav a::after, [data-theme="light"] .nav a::after { background: var(--lime); bottom: 6px !important; }
.theme-btn:hover, [data-theme="light"] .theme-btn:hover { background: var(--lime); color: #000; }
.header-meta + .theme-btn { margin-left: 6px; }
.nav { margin-left: 6px; }

/* без статуса: кнопка темы прижата вправо */
.theme-btn { margin-left: auto !important; }
@media (max-width: 860px) { .theme-btn + .menu-btn { margin-left: 6px; } }


/* кнопка «Написать» справа в шапке — главное действие, поэтому лаймовая */
.write-btn { margin-left: auto; height: var(--logo-h, 44px); padding: 0 18px; display: inline-flex; align-items: center; gap: 8px;
  background: var(--lime); color: #000; font: 500 12px/1 var(--f-mono); text-transform: uppercase; letter-spacing: 0.04em; transition: background 0.2s, color 0.2s; }
.write-btn svg { width: 14px; height: 14px; }
.write-btn:hover { background: #fff; color: #000; }
.write-btn + .theme-btn { margin-left: 6px !important; }
@media (max-width: 860px) { .write-btn { display: none; } .theme-btn { margin-left: auto !important; } }

/* страница 404 */
.page-404 { min-height: 70vh; }
.p404-big { font: 800 clamp(28px, 4vw, 56px)/1.05 var(--f-display); text-transform: uppercase; margin: 40px 0 32px; max-width: 18ch; }
.p404-links { display: flex; gap: 8px; flex-wrap: wrap; }

/* =========================================================
   МОБИЛКА: компактная шапка — лого слева, бургер справа;
   тема переехала в меню
   ========================================================= */
.menu-btn i { display: block; width: 16px; height: 2px; background: currentColor; transition: transform 0.3s var(--ease); }
@media (max-width: 860px) {
  :root { --header-h: 54px; }
  .site-header { --logo-h: 34px; padding: 10px var(--gutter); gap: 0; }
  .logo, .logo-eye, .logo-word { height: 34px; }
  .logo-eye { width: 54px; }
  .logo-eye svg { width: 46px; height: 24px; }
  .logo-word { padding: 0 11px; }
  .logo-word svg { height: 15px; }
  .theme-btn, .write-btn { display: none !important; }
  .menu-btn {
    display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 5px;
    margin-left: auto !important; width: 34px; height: 34px; padding: 0;
  }
  .menu-btn[aria-expanded="true"] i:nth-child(1) { transform: translateY(3.5px) rotate(45deg); }
  .menu-btn[aria-expanded="true"] i:nth-child(2) { transform: translateY(-3.5px) rotate(-45deg); }

  /* меню: пункты поменьше, внизу — переключатель темы и контакты */
  .mobile-menu { padding-top: calc(var(--header-h) + 20px); gap: 0; }
  .mobile-menu > a { font-size: clamp(26px, 7.4vw, 34px); padding: 14px 0 12px; }
  .mobile-menu > a sup { font-size: 11px; }
  .mm-theme { margin-top: auto; display: flex; align-items: center; gap: 4px; padding: 16px 0; border-bottom: 1px solid var(--line); }
  .mm-theme-l { margin-right: auto; font: 500 12px/1 var(--f-mono); text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
  .mm-theme button {
    height: 34px; padding: 0 12px; border: 1px solid var(--line); background: transparent; color: var(--muted);
    font: 500 12px/1 var(--f-mono); text-transform: uppercase; letter-spacing: 0.04em;
  }
  .mm-theme button[aria-pressed="true"] { background: var(--lime); border-color: var(--lime); color: #000; }
  .mobile-menu .mm-foot { margin-top: 18px; }
}
@media (min-width: 861px) { .mm-theme { display: none; } }

/* проекты на телефоне — по две в ряд */
@media (max-width: 760px) {
  .projects-grid, .projects-grid--featured { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 28px 12px; }
  .project-card, .projects-grid--featured .project-card:nth-child(n) { grid-column: auto; }
  .project-card .cover-tags { left: 6px; top: 6px; max-width: calc(100% - 12px); }
  .project-card .cover-tags .tag:nth-child(n + 2) { display: none; }
  .project-card .cover-tags .tag { font-size: 9px; padding: 3px 5px 2px; }
  .card-meta { padding-top: 10px; gap: 4px 8px; }
  .card-title { font-size: 14px; line-height: 1.25; }
  .card-year { font-size: 10px; }
  .card-sub { font-size: 12px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
}

/* =========================================================
   Бургер — чёрный в обеих темах
   ========================================================= */
.menu-btn, [data-theme="light"] .menu-btn { background: #0a0a0a; color: #f2f2f2; }

/* =========================================================
   СВЕТЛАЯ ТЕМА: лайм на светлом фоне запрещён.
   Лаймовые заливки → чёрная плашка с лаймовым текстом,
   лаймовый текст и линии → чёрные. Логотип не трогаем.
   ========================================================= */
[data-theme="light"] { --lime-ink: #111; }
[data-theme="light"] ::selection { background: #111; color: var(--lime); }
[data-theme="light"] :focus-visible { outline-color: #111; }
[data-theme="light"] .about-big .plate,
[data-theme="light"] .write-btn,
[data-theme="light"] .pill[aria-pressed="true"],
[data-theme="light"] .link-more:hover,
[data-theme="light"] .theme-btn:hover,
[data-theme="light"] .copy-btn:hover, [data-theme="light"] .copy-btn.is-done,
[data-theme="light"] .prose blockquote.pull,
[data-theme="light"] .prose a:hover,
[data-theme="light"] .ss-btn:hover,
[data-theme="light"] .stack-scrub:hover .ss-thumb span, [data-theme="light"] .stack-scrub.is-active .ss-thumb span,
[data-theme="light"] .stack-scrub:focus-within .ss-thumb span,
[data-theme="light"] .next-link:hover .nl-title,
[data-theme="light"] .back:hover, [data-theme="light"] .case-source a:hover, [data-theme="light"] .footer-row a:hover {
  background: #111; color: var(--lime); border-color: #111;
}
[data-theme="light"] .write-btn:hover { background: #000; color: #fff; }
[data-theme="light"] .next-link:hover .nl-title { box-shadow: 0 0 0 0.18em #111; }
[data-theme="light"] .back:hover, [data-theme="light"] .case-source a:hover, [data-theme="light"] .footer-row a:hover { box-shadow: 0 0 0 4px #111; }
[data-theme="light"] .stack-scrub:hover .ss-fill, [data-theme="light"] .stack-scrub.is-active .ss-fill, [data-theme="light"] .stack-scrub:focus-within .ss-fill { background: #111; }
[data-theme="light"] .article-row::before { background: #111; }
[data-theme="light"] .article-row:hover, [data-theme="light"] .article-row:hover * { color: #f2f2f2; }
[data-theme="light"] .article-row:hover .tag { background: rgba(255,255,255,0.14); color: #f2f2f2; }
[data-theme="light"] .shutters i:nth-child(5) { background: #111; }
[data-theme="light"] .prose li::marker, [data-theme="light"] .prose ol.chips li::before,
[data-theme="light"] .toc summary, [data-theme="light"] .prose h4, [data-theme="light"] .prose a,
[data-theme="light"] .toc li a.is-active, [data-theme="light"] .stack-caption .sc-num, [data-theme="light"] .stack-count b { color: #111; }
[data-theme="light"] .toc li a.is-active,
[data-theme="light"] .prose blockquote, [data-theme="light"] .prose .prompt-block,
[data-theme="light"] .prose .aside { border-left-color: #111; }
[data-theme="light"] .prose .cta:not(.cta--nav) { border-color: #111; }
[data-theme="light"] .footer-row a:hover { color: var(--lime); }

/* =========================================================
   Плакаты: пока только OVERVIEW — переключатель и архив скрыты
   ========================================================= */
.view-toggle, .posters-page .index-wrap { display: none !important; }

/* =========================================================
   Главная: кнопка раздела — справа от заголовка и на телефоне
   ========================================================= */
@media (max-width: 760px) {
  .section-head { flex-wrap: nowrap; align-items: center; }
  .section-head .link-more { flex: none; padding: 10px 10px; font-size: 11px; gap: 6px; }
  .section-head .link-more svg { width: 12px; height: 12px; }
}

/* =========================================================
   Статья: содержание всегда видно; «Скопировать» — под текстом промта
   ========================================================= */
.prose figcaption.prompt, .prose .prompt-block { grid-template-columns: minmax(0, 1fr) !important; gap: 10px; }
.prose figcaption.prompt .tag, .prose .prompt-block .tag { grid-column: 1 / -1; justify-self: start; }
.copy-btn { justify-self: start; }
.toc { margin-top: 8px; }
@media (max-width: 860px) {
  .toc { margin: 8px 0 12px; padding: 16px 16px 12px; background: var(--panel); border: 1px solid var(--line); }
  .toc summary { margin-bottom: 12px; }
  .toc li a { font-size: 15px; padding-block: 8px; }
}
