/* ============================================================
   rellowman — portfolio
   Дизайн-система 1:1 от лендинга frameless («terminal brutalism»),
   но с сайдбаром-portfolio: плоские цвета, моно-типографика,
   жёсткая сетка, ноль скруглений.
   ============================================================ */
:root {
  --bg: #050505;
  --ink: #e8e8e3;
  --dim: #6f6f68;
  --faint: #3a3a36;
  --line: #1e1e1c;
  --panel: #0a0a09;
  --panel-2: #070706;
  --overlay: rgba(5, 5, 5, 0.92);
  --acc: #b8a6ff;
  --acc-rgb: 184, 166, 255;
  --lime: var(--acc);
  --lime-dim: rgba(var(--acc-rgb), .14);
  --lime-ink: #120b26;
  --red: #ff5f56;
  --warn: #fbbf24;
  --ok: #7ef29a;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, "Cascadia Mono", Consolas, monospace;
  --sans: "Inter", "Segoe UI Variable", "Segoe UI", system-ui, sans-serif;

  --sb: 76px;          /* ширина сайдбара */
  --wrap: 1140px;
  --ease: cubic-bezier(.16, 1, .3, 1);
}

html[data-theme="light"] {
  --bg: #f4f4ef;
  --ink: #161613;
  --dim: #63635b;
  --faint: hsl(60 4% 76%);
  --line: hsl(60 5% 80%);
  --panel: hsl(0 0% 100%);
  --panel-2: hsl(60 20% 98%);
  --overlay: rgba(244, 244, 239, 0.92);
  --acc: #1d6f3c;
  --acc-rgb: 29, 111, 60;
  --lime: var(--acc);
  --lime-dim: rgba(var(--acc-rgb), .09);
  --lime-ink: #ffffff;
  --red: #d64541;
  --warn: #b07d0a;
  --ok: #1d8a4b;
}
html[data-theme="light"] ::selection { background: var(--ink); color: var(--bg); }

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-user-select: none;
  user-select: none;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
  scrollbar-width: thin;
  scrollbar-color: var(--faint) var(--bg);
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: var(--lime); color: var(--lime-ink); }

.mono { font-family: var(--mono); }
.accent { color: var(--lime); }

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 28px;
}

/* ---------- фон: сетка + свечение + зерно ---------- */
.bg-grid,
.bg-glow,
.bg-noise {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.bg-grid {
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 30%, transparent 80%);
  opacity: .55;
}
.bg-noise {
  opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)' opacity='.6'/%3E%3C/svg%3E");
}
.bg-glow {
  background:
    radial-gradient(ellipse 55% 42% at 62% 22%, rgba(var(--acc-rgb), .09), transparent 70%),
    radial-gradient(ellipse 30% 22% at 62% 22%, rgba(var(--acc-rgb), .06), transparent 75%);
  will-change: transform;
}

/* ---------- курсор-точка (декоративная) ---------- */
.cursor-dot {
  position: fixed;
  top: 0; left: 0;
  width: 6px; height: 6px;
  background: var(--lime);
  z-index: 300;
  pointer-events: none;
  opacity: 0;
  box-shadow: 0 0 12px rgba(var(--acc-rgb), .8);
  transition: opacity .3s, width .2s, height .2s;
  transform: translate3d(-20px, -20px, 0);
}
.cursor-dot.on { opacity: .9; }
.cursor-dot.big { width: 16px; height: 16px; opacity: .5; }

/* ---------- reveal ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .75s var(--ease), transform .75s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ============================================================
   САЙДБАР
   ============================================================ */
.sidebar {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: var(--sb);
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 26px;
  padding: 18px 0 20px;
  background: var(--overlay);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-right: 1px solid var(--line);
}

.sb-brand { display: grid; place-items: center; }
.brand-mark {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 30px; height: 30px;
}
.brand-mark img {
  grid-area: 1 / 1;
  width: 100%; height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 0 6px rgba(var(--acc-rgb), .35));
  transition: transform .45s var(--ease), filter .25s;
}
.brand-mark .logo-light { display: none; }
html[data-theme="light"] .brand-mark .logo-dark { display: none; }
html[data-theme="light"] .brand-mark .logo-light { display: block; filter: none; }
.sb-brand:hover .brand-mark img { transform: rotate(-8deg) scale(1.08); filter: drop-shadow(0 0 10px rgba(var(--acc-rgb), .65)); }
html[data-theme="light"] .sb-brand:hover .brand-mark img { filter: none; }

.sb-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
  align-items: center;
  margin-top: 8px;
}
.sb-nav a {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  width: 100%;
  padding: 9px 0;
  text-decoration: none;
  color: var(--dim);
  transition: color .15s, background-color .15s;
}
.sb-nav a b { font-size: 10px; font-weight: 500; color: var(--faint); transition: color .15s; }
.sb-nav a span { font-size: 11px; letter-spacing: .02em; }
.sb-nav a::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 2px;
  background: var(--lime);
  transform: scaleY(0);
  transition: transform .2s var(--ease);
  transform-origin: center;
}
.sb-nav a:hover { color: var(--ink); background: var(--lime-dim); }
.sb-nav a:hover b { color: var(--lime); }
.sb-nav a.active { color: var(--lime); }
.sb-nav a.active b { color: var(--lime); }
.sb-nav a.active::before { transform: scaleY(1); }

.sb-bottom {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.sb-btn {
  width: 36px; height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  background: none;
  color: var(--ink);
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color .15s, background-color .15s, color .15s;
}
.sb-btn:hover { border-color: var(--lime); background: var(--lime-dim); color: var(--lime); }
.tico { color: var(--lime); }
.tico-auto, .tico-dark, .tico-light { display: none; }
.mode-auto .tico-auto { display: block; }
.mode-dark .tico-dark { display: block; }
.mode-light .tico-light { display: block; }
.sb-label {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-size: 10px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--faint);
  margin-top: 8px;
}

.sb-progress {
  position: absolute;
  top: 0; right: -1px; bottom: 0;
  width: 1px;
  background: var(--lime);
  transform-origin: top;
  transform: scaleY(var(--p, 0));
  box-shadow: 0 0 8px var(--lime);
}

/* ============================================================
   MAIN
   ============================================================ */
.main {
  position: relative;
  z-index: 1;
  margin-left: var(--sb);
}

/* ---------- hero ---------- */
.hero { padding: 108px 0 0; }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  gap: 40px;
  align-items: center;
  min-height: calc(100vh - 250px);
}

.hero-tag {
  color: var(--dim);
  font-size: 12.5px;
  margin-bottom: 26px;
}
.hero-tag::before { content: "» "; color: var(--lime); }

.hero-title {
  font-size: clamp(52px, 8.4vw, 118px);
  font-weight: 800;
  letter-spacing: -.045em;
  line-height: .94;
  text-transform: lowercase;
}
.hero-title .line { display: block; }
.line-grad {
  color: transparent;
  -webkit-text-stroke: 1.5px var(--ink);
  background: linear-gradient(90deg, var(--lime), var(--lime)) no-repeat 0 100% / 0 100%;
  -webkit-background-clip: text;
  background-clip: text;
  transition: background-size .9s var(--ease);
}
.hero-title:hover .line-grad { background-size: 100% 100%; }

/* «+» между словами — раскрывает ссылки (как в примере) */
.hero-plus {
  vertical-align: .28em;
  display: inline-grid;
  place-items: center;
  width: .5em; height: .5em;
  margin-right: .1em;
  border: 1.5px solid var(--lime);
  background: none;
  color: var(--lime);
  font: inherit;
  font-size: .34em;
  -webkit-text-stroke: 0;
  cursor: pointer;
  transition: background-color .2s, color .2s, transform .4s var(--ease);
}
.hero-plus:hover { background: var(--lime); color: var(--lime-ink); }
.hero-plus[aria-expanded="true"] { background: var(--lime); color: var(--lime-ink); transform: rotate(45deg); }

.hero-links {
  margin-top: 22px;
  border: 1px solid var(--faint);
  background: var(--panel);
  animation: drop .35s var(--ease);
}
.hero-links[hidden] { display: none; }
@keyframes drop { from { opacity: 0; transform: translateY(-8px); } }
.hl-head {
  display: flex;
  justify-content: space-between;
  padding: 9px 14px;
  border-bottom: 1px solid var(--line);
  font-size: 10.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--dim);
}
.hl-status { display: inline-flex; align-items: center; gap: 7px; color: var(--ok); }
.hl-status i { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 8px var(--ok); }
.hero-links a {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: var(--ink);
  transition: background-color .15s;
}
.hero-links a:last-child { border-bottom: none; }
.hero-links a:hover { background: var(--lime-dim); }
.hl-mark {
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border: 1px solid var(--line);
  font-size: 10px;
  color: var(--lime);
  flex: none;
}
.hero-links a > span:nth-child(2) { display: flex; flex-direction: column; line-height: 1.35; }
.hero-links b { font-weight: 650; font-size: 14px; }
.hero-links small { color: var(--dim); font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; }
.hero-links a > i { margin-left: auto; color: var(--lime); font-style: normal; transition: transform .2s var(--ease); }
.hero-links a:hover > i { transform: translate(2px, -2px); }

.cursor { color: var(--lime); -webkit-text-stroke: 0; font-weight: 400; animation: blink 1.05s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.hero-sub { margin-top: 30px; max-width: 540px; color: var(--dim); font-size: 17.5px; }
.hero-sub b { color: var(--ink); font-weight: 550; }

.hero-actions { margin-top: 38px; display: flex; gap: 14px; flex-wrap: wrap; align-items: stretch; }

.hero-meta {
  margin-top: 30px;
  font-size: 12.5px;
  color: var(--ink);
  display: flex;
  flex-wrap: wrap;
  gap: 2px 8px;
  align-items: center;
}
.meta-dim { color: var(--faint); }
.ok-dot {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 8px rgba(126, 242, 154, .7);
  margin-right: 4px;
}

/* ---------- кнопки ---------- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  position: relative;
  overflow: hidden;
  background: var(--lime);
  color: var(--lime-ink);
  text-decoration: none;
  padding: 14px 24px;
  border: 1px solid var(--lime);
  cursor: pointer;
  transition: box-shadow .2s, transform .1s;
}
.btn-label { font-weight: 750; font-size: 15.5px; letter-spacing: .01em; }
.btn-ico { flex: none; transition: transform .25s var(--ease); }
.btn-primary:hover .btn-ico { transform: translateY(3px); }
.btn-primary::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .45) 50%, transparent 70%);
  transform: translateX(-120%);
  pointer-events: none;
}
.btn-primary:hover::after { transform: translateX(120%); transition: transform .7s ease; }
.btn-primary:hover { box-shadow: 0 0 34px rgba(var(--acc-rgb), .4); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(1px); }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  background: transparent;
  color: var(--dim);
  border: 1px solid var(--line);
  padding: 14px 22px;
  font-size: 13.5px;
  text-decoration: none;
  cursor: pointer;
  transition: color .15s, border-color .15s;
  font-family: var(--mono);
}
.btn-ghost:hover { color: var(--lime); border-color: rgba(var(--acc-rgb), .45); }

/* ---------- hero visual ---------- */
.hero-visual {
  position: relative;
  aspect-ratio: 1 / 1;
  width: 100%;
  max-width: 520px;
  justify-self: end;
}
.hero-canvas { width: 100%; height: 100%; display: block; }
.hv-corner { position: absolute; font-size: 10.5px; color: var(--faint); letter-spacing: .06em; }
.hv-tl { top: 0; left: 0; }
.hv-br { bottom: 0; right: 0; }
.hv-label {
  position: absolute;
  bottom: 22px; left: 0;
  font-size: 11px;
  color: var(--dim);
  letter-spacing: .12em;
  text-transform: uppercase;
}

/* ---------- бегущая строка ---------- */
.ticker {
  margin-top: 56px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  position: relative;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.ticker-track {
  display: inline-flex;
  align-items: center;
  gap: 28px;
  padding: 13px 0;
  white-space: nowrap;
  animation: ticker 30s linear infinite;
}
.ticker-track span { font-size: 11.5px; text-transform: uppercase; letter-spacing: .18em; color: var(--dim); }
.ticker-track i { color: var(--lime); font-size: 9px; font-style: normal; }
@keyframes ticker { to { transform: translateX(-50%); } }

.ticker--big { margin-top: 90px; border-bottom: none; }
.ticker--big .ticker-track { padding: 20px 0; gap: 32px; animation-duration: 24s; }
.ticker--big span {
  font-family: var(--sans);
  font-weight: 800;
  font-size: clamp(26px, 4.4vw, 54px);
  letter-spacing: -.03em;
  text-transform: lowercase;
  color: transparent;
  -webkit-text-stroke: 1px var(--faint);
}
.ticker--big i { font-size: 14px; }

/* ---------- статы ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-bottom: 1px solid var(--line);
  margin-top: 26px;
}
.stat { padding: 26px 0 30px; border-left: 1px solid var(--line); padding-left: 22px; }
.stat:first-child { border-left: none; padding-left: 0; }
.stat b { display: block; font-size: clamp(26px, 3.4vw, 40px); font-weight: 600; letter-spacing: -.03em; line-height: 1.1; }
.stat b::after { content: ""; display: block; width: 18px; height: 2px; background: var(--lime); margin-top: 12px; }
.stat span { display: block; margin-top: 10px; color: var(--dim); font-size: 13px; }

/* ---------- секции ---------- */
.section { padding: 110px 0; border-top: 1px solid var(--line); position: relative; }

.sec-head {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 40px;
  margin-bottom: 64px;
}
.sec-num {
  display: inline-block;
  font-size: 12px;
  color: var(--lime);
  border: 1px solid rgba(var(--acc-rgb), .35);
  padding: 4px 10px;
  margin-bottom: 22px;
  text-transform: lowercase;
  letter-spacing: .02em;
}
.sec-head h2, .about-copy h2 {
  font-size: clamp(32px, 4.8vw, 54px);
  font-weight: 800;
  letter-spacing: -.035em;
  text-transform: lowercase;
  line-height: 1;
}
.sec-head h2 em { font-style: normal; color: transparent; -webkit-text-stroke: 1.2px var(--ink); }
.sec-intro { max-width: 300px; color: var(--dim); font-size: 15px; text-align: right; }

/* ============================================================
   ПРОЕКТЫ
   ============================================================ */
.proj {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 64px;
  align-items: center;
  padding: 64px 0;
  border-top: 1px solid var(--line);
}
.proj:first-of-type { border-top: none; padding-top: 0; }
.proj--rev .proj-copy { order: 2; }
.proj--rev .proj-visual { order: 1; }

.proj-eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 18px;
}
.proj-eyebrow span { color: var(--lime); }
.proj-eyebrow i { width: 28px; height: 1px; background: var(--faint); }

.proj h3 {
  font-size: clamp(34px, 4.6vw, 58px);
  font-weight: 800;
  letter-spacing: -.04em;
  line-height: 1;
  text-transform: lowercase;
  margin-bottom: 20px;
}

.proj-desc { color: var(--dim); font-size: 15.5px; max-width: 480px; }
.proj-desc code {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--lime);
  background: var(--lime-dim);
  padding: 1px 6px;
}

.proj-facts { list-style: none; margin-top: 24px; border-top: 1px dashed var(--line); }
.proj-facts li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 12px;
}
.proj-facts span { color: var(--faint); text-transform: uppercase; letter-spacing: .12em; }
.proj-facts b { font-weight: 500; color: var(--ink); }
.proj-facts .ok { color: var(--ok); }

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 22px; }
.chips span {
  font-size: 11px;
  color: var(--dim);
  border: 1px solid var(--line);
  padding: 3px 9px;
  transition: color .15s, border-color .15s, background-color .15s;
}
.proj:hover .chips span { border-color: rgba(var(--acc-rgb), .25); }
.chips span:hover { color: var(--lime); border-color: var(--lime); background: var(--lime-dim); }

.proj-actions { display: flex; gap: 18px; margin-top: 26px; font-size: 12.5px; flex-wrap: wrap; }
.proj-actions a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--faint);
  padding-bottom: 2px;
  transition: color .15s, border-color .15s;
}
.proj-actions a:hover { color: var(--lime); border-color: var(--lime); }

/* ---------- визуал проекта ---------- */
.proj-visual {
  position: relative;
  min-height: 380px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 10px;
}
.pv-bgtext {
  position: absolute;
  top: 50%; left: 50%;
  translate: -50% -50%;
  font-size: clamp(64px, 9vw, 132px);
  font-weight: 700;
  line-height: .84;
  letter-spacing: -.06em;
  text-align: center;
  color: transparent;
  -webkit-text-stroke: 1px var(--faint);
  opacity: .35;
  pointer-events: none;
  text-transform: lowercase;
  white-space: pre;
}
.proj-visual::before {
  content: "";
  position: absolute;
  inset: 12% 0;
  background: radial-gradient(closest-side, rgba(var(--acc-rgb), .10), transparent 75%);
  filter: blur(24px);
  pointer-events: none;
}

/* ноутбук */
.laptop { position: relative; width: min(100%, 520px); perspective: 1400px; }
.laptop-lid {
  position: relative;
  aspect-ratio: 16 / 10;
  border: 1px solid var(--faint);
  background: #0a0a09;
  box-shadow: 0 30px 60px -24px rgba(0, 0, 0, .85);
  transform-style: preserve-3d;
  transition: transform .6s var(--ease);
}
.laptop:hover .laptop-lid { transform: rotateX(4deg) rotateY(-3deg); }
.laptop-lid::before {
  content: "";
  position: absolute;
  top: 6px; left: 50%;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--line);
  transform: translateX(-50%);
}
.laptop-screen {
  position: absolute;
  inset: 16px 8px 8px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #050505;
}
.laptop-screen img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity .6s var(--ease), transform 1.2s var(--ease);
}
.laptop-screen img.is-on { opacity: 1; transform: none; }
.laptop-base {
  height: 11px;
  margin: 0 -5% 0;
  width: 110%;
  border: 1px solid var(--faint);
  border-top: none;
  background: linear-gradient(to bottom, #111110, #0a0a09);
  position: relative;
}
.laptop-base i {
  position: absolute;
  top: 1px; left: 50%;
  width: 58px; height: 3px;
  background: var(--line);
  transform: translateX(-50%);
}
.pv-dots { display: flex; gap: 8px; margin-top: 26px; font-size: 11px; color: var(--faint); }
.pv-dots span {
  padding: 3px 10px;
  border: 1px solid var(--line);
  cursor: pointer;
  transition: color .15s, border-color .15s;
}
.pv-dots span.is-on { color: var(--lime); border-color: rgba(var(--acc-rgb), .45); }

/* терминал */
.term {
  position: relative;
  width: 100%;
  max-width: 520px;
  border: 1px solid var(--faint);
  background: var(--panel-2);
  box-shadow: 12px 12px 0 0 rgba(var(--acc-rgb), .07);
}
.term-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  font-size: 11.5px;
  color: var(--dim);
}
.term-r { margin-left: auto; color: var(--faint); }
.tdot { width: 9px; height: 9px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 8px rgba(var(--acc-rgb), .6); flex: none; }
.term pre {
  padding: 18px 20px;
  font-size: 12px;
  line-height: 1.85;
  color: #a8a8a0;
  white-space: pre-wrap;
  word-break: break-word;
  min-height: 250px;
}
.term pre i { color: var(--lime); font-style: normal; }
.term pre em { color: var(--ok); font-style: normal; }

/* браузер (сайт) */
.browser {
  position: relative;
  width: 100%;
  max-width: 520px;
  border: 1px solid var(--faint);
  background: var(--panel);
  box-shadow: 12px 12px 0 0 rgba(var(--acc-rgb), .07);
  transition: transform .5s var(--ease);
}
.proj:hover .browser { transform: translateY(-4px); }
.br-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 14px;
  border-bottom: 1px solid var(--line);
  font-size: 11.5px;
  color: var(--dim);
}
.br-dots { display: flex; gap: 6px; }
.br-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); }
.br-dots i:last-child { background: var(--red); opacity: .85; }
.br-url {
  flex: 1;
  padding: 4px 10px;
  border: 1px solid var(--line);
  color: var(--lime);
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.br-url:hover { border-color: var(--lime); background: var(--lime-dim); }
.br-body { position: relative; padding: 26px 24px 30px; overflow: hidden; }
.br-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(ellipse 70% 80% at 50% 20%, #000, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 80% at 50% 20%, #000, transparent 75%);
  opacity: .7;
}
.br-tag { position: relative; font-size: 10.5px; color: var(--dim); margin-bottom: 16px; }
.br-tag::before { content: "» "; color: var(--lime); }
.br-title { position: relative; font-size: 34px; font-weight: 800; letter-spacing: -.04em; line-height: .98; text-transform: lowercase; }
.br-title span { color: transparent; -webkit-text-stroke: 1.2px var(--ink); }
.br-title i { color: var(--lime); -webkit-text-stroke: 0; font-style: normal; animation: blink 1s steps(1) infinite; }
.br-row { position: relative; display: flex; gap: 8px; margin-top: 20px; flex-wrap: wrap; }
.br-btn { background: var(--lime); color: var(--lime-ink); font-size: 11px; padding: 7px 12px; font-weight: 600; }
.br-ghost { border: 1px solid var(--line); color: var(--dim); font-size: 11px; padding: 7px 12px; }
.br-lines { position: relative; display: grid; gap: 8px; margin-top: 24px; }
.br-lines span { height: 6px; width: var(--w, 60%); background: repeating-linear-gradient(90deg, var(--faint) 0 5px, transparent 5px 10px); }

/* модули */
.mods {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  width: 100%;
  max-width: 520px;
}
.mod {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 16px 14px;
  border: 1px solid var(--line);
  background: var(--panel);
  transition: border-color .2s, background-color .2s, transform .3s var(--ease);
}
.mod:hover { border-color: var(--lime); background: var(--lime-dim); transform: translateY(-2px); }
.mod-ico {
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border: 1px solid var(--line);
  font-size: 10.5px;
  color: var(--dim);
  margin-bottom: 8px;
  transition: color .2s, border-color .2s;
}
.mod:hover .mod-ico { color: var(--lime); border-color: var(--lime); }
.mod b { font-size: 14px; font-weight: 650; font-family: var(--mono); }
.mod small { color: var(--dim); font-size: 10.5px; letter-spacing: .04em; }

.work-foot { display: flex; justify-content: center; padding-top: 54px; }

/* ============================================================
   СТЕК
   ============================================================ */
.feat-list { border-top: 1px solid var(--line); }
.feat {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 26px;
  align-items: center;
  padding: 28px 18px;
  border-bottom: 1px solid var(--line);
  transition: background .18s;
  position: relative;
}
.feat:hover { background: rgba(var(--acc-rgb), .045); }
.feat::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 2px;
  background: var(--lime);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform .2s;
}
.feat:hover::before { transform: scaleY(1); }
.feat-ico {
  position: relative;
  width: 52px; height: 52px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--dim);
  transition: color .2s, border-color .2s, background-color .2s, box-shadow .2s;
}
.feat-ico svg { width: 22px; height: 22px; transition: transform .35s var(--ease); }
.feat:hover .feat-ico { color: var(--lime); border-color: var(--lime); background: var(--lime-dim); box-shadow: 4px 4px 0 0 var(--lime-dim); }
.feat:hover .feat-ico svg { transform: scale(1.1); }
.feat-idx {
  position: absolute;
  top: -8px; right: -10px;
  padding: 0 4px;
  background: var(--bg);
  color: var(--faint);
  font-size: 10.5px;
  line-height: 1.3;
  transition: color .18s;
}
.feat:hover .feat-idx { color: var(--lime); }
.feat-body h3 { font-size: 19px; font-weight: 700; margin-bottom: 7px; letter-spacing: -.01em; }
.feat-body p { color: var(--dim); font-size: 14.5px; max-width: 640px; }
.feat-tag {
  font-size: 11px;
  color: var(--dim);
  border: 1px solid var(--line);
  padding: 3px 9px;
  transition: color .18s, border-color .18s;
}
.feat:hover .feat-tag { color: var(--lime); border-color: rgba(var(--acc-rgb), .4); }

/* ============================================================
   ОБО МНЕ
   ============================================================ */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  gap: 64px;
  align-items: start;
}
.about-tag { margin: 22px 0 26px; font-size: 19px; font-weight: 600; letter-spacing: -.01em; max-width: 460px; }
.about-copy p { color: var(--dim); font-size: 15.5px; max-width: 520px; margin-bottom: 16px; }
.about-copy p b { color: var(--ink); font-weight: 600; }
.about-sign { margin-top: 26px; font-size: 12px; color: var(--faint) !important; letter-spacing: .04em; }

.profile {
  border: 1px solid var(--faint);
  background: var(--panel);
  box-shadow: 12px 12px 0 0 rgba(var(--acc-rgb), .07);
}
.kv { background: var(--panel-2); }
html[data-theme="light"] .kv { background: var(--panel); }
.kv-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 16px;
  font-size: 12.5px;
  border-bottom: 1px solid var(--line);
}
.kv-row span { color: var(--dim); }
.kv-row b { font-weight: 500; color: var(--ink); text-align: right; word-break: break-all; }
.kv-row a { color: var(--lime); text-decoration: none; }
.kv-row a:hover { text-decoration: underline; }

.timeline { padding: 16px; }
.tl-head { font-size: 12px; color: var(--lime); margin-bottom: 10px; }
.tl-row { display: flex; gap: 14px; padding: 6px 0; font-size: 12px; color: var(--dim); }
.tl-row span { color: var(--faint); flex: none; }
.tl-row p::before { content: "› "; color: var(--faint); }

/* ============================================================
   КОНТАКТ
   ============================================================ */
.contact { padding-bottom: 0; overflow: hidden; }
.contact-big { display: block; text-decoration: none; color: var(--ink); margin-top: 6px; }
.cb-line {
  display: block;
  font-size: clamp(52px, 10vw, 140px);
  font-weight: 800;
  letter-spacing: -.05em;
  line-height: .95;
  text-transform: lowercase;
  transition: color .2s;
}
.cb-outline { color: transparent; -webkit-text-stroke: 1.5px var(--ink); }
.cb-outline .cb-arrow { -webkit-text-stroke: 0; color: var(--lime); display: inline-block; transition: transform .4s var(--ease); }
.contact-big:hover .cb-line { color: var(--lime); -webkit-text-stroke: 0; }
.contact-big:hover .cb-arrow { transform: translate(10px, -10px); }
.contact-sub { margin-top: 24px; font-size: 12.5px; color: var(--dim); }
.contact-row { display: flex; gap: 14px; align-items: center; margin-top: 26px; flex-wrap: wrap; }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 46px 0; position: relative; z-index: 1; }
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.footer-brand { font-size: 17px; font-weight: 600; color: var(--ink); text-decoration: none; }
.footer-copy { color: var(--dim); font-size: 13px; }
.footer-links { display: flex; gap: 10px; align-items: center; font-size: 12.5px; }
.footer-links a { color: var(--dim); text-decoration: none; transition: color .15s; }
.footer-links a:hover { color: var(--lime); }
.footer-links span { color: var(--faint); }
.footer-meta { width: 100%; color: var(--faint); font-size: 11.5px; border-top: 1px dashed var(--line); padding-top: 16px; }

/* ---------- доступность ---------- */
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 1px solid var(--lime);
  outline-offset: 3px;
}

/* ---------- глитч больших шрифтов ----------
   Редкие короткие «сбои»: JS дёргает .glitch-on на ~320мс,
   CSS делает RGB-сдвиг + clip-полосы + подрагивание. */
.glitchable { position: relative; }
.glitchable::before,
.glitchable::after {
  content: attr(data-glitch);
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  white-space: pre-wrap;
}
.glitchable::before {
  color: var(--acc);
  z-index: -1;
}
.glitchable::after {
  color: #ff5f56;
  z-index: -2;
}
.glitch-on::before {
  opacity: .9;
  animation: glitch-shift .55s steps(7) both;
}
.glitch-on::after {
  opacity: .85;
  animation: glitch-shift .55s steps(7) reverse both;
}
@keyframes glitch-shift {
  0%   { clip-path: inset(0 0 82% 0); transform: translate(-8px, 3px); opacity: .9; }
  15%  { clip-path: inset(30% 0 40% 0); transform: translate(7px, -2px); }
  30%  { clip-path: inset(62% 0 10% 0); transform: translate(-6px, 2px); opacity: .4; }
  45%  { clip-path: inset(12% 0 66% 0); transform: translate(8px, -3px); }
  60%  { clip-path: inset(48% 0 28% 0); transform: translate(-7px, 3px); opacity: .95; }
  75%  { clip-path: inset(70% 0 6% 0); transform: translate(5px, -1px); }
  100% { clip-path: inset(0 0 100% 0); transform: translate(0, 0); opacity: 0; }
}

/* ---------- параллакс больших шрифтов ---------- */
[data-parallax] { will-change: transform; }

/* ---------- светлая тема ---------- */
html[data-theme="light"] .bg-glow {
  background: radial-gradient(ellipse 55% 42% at 62% 22%, rgba(var(--acc-rgb), .07), transparent 70%);
}
html[data-theme="light"] .bg-grid { opacity: .8; }
html[data-theme="light"] .term,
html[data-theme="light"] .browser,
html[data-theme="light"] .profile { box-shadow: 12px 12px 0 0 rgba(var(--acc-rgb), .1); }
html[data-theme="light"] .laptop-lid { box-shadow: 0 30px 60px -24px rgba(0, 0, 0, .25); }
html[data-theme="light"] .btn-primary:hover { box-shadow: 0 10px 28px -8px rgba(var(--acc-rgb), .55); }
html[data-theme="light"] .btn-ghost:hover,
html[data-theme="light"] .feat:hover .feat-tag { border-color: rgba(var(--acc-rgb), .5); }
html[data-theme="light"] .sec-num { border-color: rgba(var(--acc-rgb), .4); }
html[data-theme="light"] .feat:hover { background: rgba(var(--acc-rgb), .04); }
html[data-theme="light"] .term pre { color: var(--dim); }
html[data-theme="light"] .cursor-dot { box-shadow: none; }

/* ============================================================
   АДАПТИВ
   ============================================================ */
@media (max-width: 1100px) {
  .proj, .about-grid { gap: 40px; }
}

@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; min-height: 0; }
  .hero-visual { max-width: 380px; justify-self: center; margin-top: 18px; }
  .sec-head { grid-template-columns: 1fr; gap: 18px; align-items: start; }
  .sec-intro { text-align: left; max-width: 420px; }
  .proj { grid-template-columns: 1fr; gap: 34px; }
  .proj--rev .proj-copy { order: 1; }
  .proj--rev .proj-visual { order: 2; }
  .proj-visual { min-height: 0; padding: 26px 0; }
  .about-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat { padding: 22px 0 24px 18px; }
  .stat:nth-child(odd) { border-left: none; padding-left: 0; }
}

@media (max-width: 720px) {
  :root { --sb: 100%; }
  .sidebar {
    top: auto;
    height: 58px;
    flex-direction: row;
    padding: 0 12px;
    gap: 10px;
    border-right: none;
    border-top: 1px solid var(--line);
    justify-content: space-between;
  }
  .sb-brand { display: none; }
  .sb-nav { flex-direction: row; margin: 0; flex: 1; justify-content: space-between; gap: 0; }
  .sb-nav a { padding: 6px 4px; flex: 1; }
  .sb-nav a::before { top: auto; left: 0; right: 0; width: auto; height: 2px; transform: scaleX(0); }
  .sb-nav a.active::before { transform: scaleX(1); }
  .sb-bottom { flex-direction: row; margin: 0; gap: 6px; }
  .sb-label { display: none; }
  .sb-btn { width: 34px; height: 34px; }
  .sb-progress { top: auto; bottom: -1px; left: 0; right: 0; width: 100%; height: 1px; transform: scaleX(var(--p, 0)); }
  .main { margin-left: 0; padding-bottom: 70px; }
  .hero { padding-top: 78px; }
  .hero-actions { flex-direction: column; gap: 10px; }
  .hero-actions > * { justify-content: center; width: 100%; }
  .hero-meta { font-size: 11.5px; }
  .section { padding: 78px 0; }
  .ticker { margin-top: 40px; }
  .mods { grid-template-columns: 1fr 1fr; }
  .feat { grid-template-columns: 52px 1fr; gap: 18px; padding: 24px 12px; }
  .feat-tag { display: none; }
  .br-title { font-size: 28px; }
  .footer-inner { justify-content: flex-start; }
  .footer-links { flex-wrap: wrap; }
  .cursor-dot { display: none; }
}

@media (max-width: 420px) {
  .sb-nav a span { font-size: 10px; }
  .mods { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr; }
  .stat { border-left: none; padding-left: 0; }
}

/* ---------- меньше движения ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
  .glitchable::before, .glitchable::after { display: none; }
}
