/* krbka.pro — общий сайт. Палитра, шрифт и знак — как у sound.krbka.pro (../sound.krbka.pro/tilda/assets/app.css). */
:root {
  --bg: #15181d; --card: #1e232a; --card-2: #262c35; --line: #2f3640;
  --text: #e6e9ee; --muted: #9aa3b0; --dim: #6b7380; --lime: #c9f03a; --ink: #15181d;
  --radius: 14px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body {
  font-family: 'Manrope', Arial, sans-serif; font-weight: 300; font-size: 17px; line-height: 1.55;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
a { color: inherit; }
button { font: inherit; color: inherit; }
::selection { background: var(--lime); color: var(--ink); }
:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; border-radius: 4px; }
[hidden] { display: none !important; }

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
@media (max-width: 600px) { .wrap { padding: 0 16px; } }

/* ── шапка ── */
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 0; flex-wrap: wrap; }
.logo { display: flex; align-items: center; gap: 14px; text-decoration: none; font-weight: 400; }
.logo img { width: 54px; height: 54px; filter: invert(1) brightness(.92); animation: spin 15s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.menu { display: flex; gap: 28px; flex-wrap: wrap; font-size: 16px; }
.menu a { text-decoration: none; color: var(--muted); padding: 4px 0; background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size .25s, color .2s; }
.menu a:hover { color: var(--text); background-size: 100% 1px; }
@media (max-width: 600px) { .logo img { width: 44px; height: 44px; } }

/* бургер: на узких экранах меню прячется под кнопку и выпадает списком под шапкой */
.burger { display: none; position: relative; width: 44px; height: 44px; margin-right: -10px; border: 0; background: none; cursor: pointer; }
.burger span { position: absolute; left: 11px; right: 11px; height: 1.5px; border-radius: 1px; background: var(--text); transition: transform .25s, top .25s; }
.burger span:first-child { top: 17px; }
.burger span:last-child { top: 25px; }
.top.is-open .burger span:first-child { top: 21px; transform: rotate(45deg); }
.top.is-open .burger span:last-child { top: 21px; transform: rotate(-45deg); }
@media (max-width: 760px) {
  .top { position: relative; flex-wrap: nowrap; }
  .burger { display: block; }
  .menu {
    display: none; position: absolute; z-index: 30; top: 100%; left: -16px; right: -16px;
    flex-direction: column; gap: 0; padding: 0 16px 16px; background: var(--bg);
    border-bottom: 1px solid var(--line); box-shadow: 0 24px 40px rgba(0, 0, 0, .35);
  }
  .top.is-open .menu { display: flex; }
  .menu a { padding: 14px 0; border-top: 1px solid var(--line); font-size: 22px; font-weight: 200; color: var(--text); background: none; }
  .menu a:hover { color: var(--lime); }
}
@media (prefers-reduced-motion: reduce) { .burger span { transition: none; } }

/* ── общие элементы ── */
.label { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; font-weight: 400; letter-spacing: 1.5px; margin: 0 0 14px; }
.label::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--lime); flex: none; }
/* метка с эмодзи вместо лаймовой точки — как на sound.krbka.pro */
.label--emoji::before { display: none; }
.label__emoji { font-size: 18px; line-height: 1; letter-spacing: 0; }
.h1 { font-weight: 200; font-size: clamp(52px, 10vw, 128px); line-height: .98; letter-spacing: -0.02em; margin: 0; }
.h2 { font-weight: 200; font-size: clamp(34px, 5vw, 60px); line-height: 1.08; letter-spacing: -0.02em; margin: 0 0 36px; }
.muted { color: var(--muted); }
section { padding: 90px 0; border-top: 1px solid var(--line); }
@media (max-width: 600px) { section { padding: 64px 0; } }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 0 26px;
  border: 0; border-radius: 999px; background: var(--lime); color: var(--ink); font-weight: 500; text-decoration: none;
  transition: transform .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn--ghost { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1px var(--line); font-weight: 400; }
.btn--ghost:hover { box-shadow: inset 0 0 0 1px var(--muted); }

/* ── первый экран ── */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 40px; padding: 11vh 0 13vh; }
.hero__sub { font-weight: 200; font-size: clamp(24px, 3.4vw, 42px); line-height: 1.18; letter-spacing: -0.01em; margin: .45em 0 0; max-width: 22ch; color: var(--muted); }
.hero__lead { max-width: 58ch; margin: 44px 0 0; font-size: clamp(17px, 1.8vw, 20px); }
.hero__fig { margin: 0; display: grid; justify-items: center; gap: 18px; }
.hero__fig figcaption { color: var(--dim); font-size: 14px; letter-spacing: 1.5px; }
.hero__mark { width: clamp(180px, 24vw, 320px); aspect-ratio: 1; filter: invert(1) brightness(.92); opacity: .9; animation: spin 15s linear infinite; }
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; padding: 6vh 0 10vh; }
  .hero__fig { display: none; }
}

/* ── направления ── */
.dirs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 960px) { .dirs { grid-template-columns: 1fr; } }
.dir {
  position: relative; display: flex; flex-direction: column; gap: 14px; min-height: 320px; padding: 28px;
  border-radius: var(--radius); background: var(--card); text-decoration: none; transition: background .2s, transform .2s;
}
.dir--link:hover { background: var(--card-2); transform: translateY(-2px); }
.dir__cover { position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.dir__text a { position: relative; z-index: 2; }
.dir__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.dir__title { font-weight: 300; font-size: 28px; line-height: 1.15; letter-spacing: -0.01em; margin: 0; }
.dir__arrow { flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--lime); color: var(--ink); transition: transform .2s; }
.dir__arrow svg { display: block; }
.dir--link:hover .dir__arrow { transform: rotate(-45deg); }
.dir__text { margin: 0; color: var(--muted); }
.dir__text a { color: var(--text); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.dir__text a:hover { color: var(--lime); }
.dir__foot { margin-top: auto; display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 14px; color: var(--dim); }
.dir__url { color: var(--text); font-weight: 400; }
.dir__soon { font-size: 13px; padding: 4px 10px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line); color: var(--muted); white-space: nowrap; }

/* ── проекты ── */
.filters { display: flex; gap: 10px; flex-wrap: wrap; margin: 0 0 22px; }
.filters button {
  min-height: 38px; padding: 0 16px; border-radius: 999px; border: 0; cursor: pointer; font-size: 15px;
  background: transparent; box-shadow: inset 0 0 0 1px var(--line); font-weight: 400;
}
.filters button:hover { box-shadow: inset 0 0 0 1px var(--muted); }
.filters button[aria-pressed="true"] { background: var(--lime); color: var(--ink); box-shadow: none; font-weight: 500; }
.plist { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.pitem { border-bottom: 1px solid var(--line); }
.prow {
  width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) 170px 110px 28px; align-items: baseline; gap: 16px;
  padding: 24px 0; background: none; border: 0; text-align: left; cursor: pointer;
}
.ptitle { font-size: 22px; font-weight: 400; line-height: 1.25; }
.ptitle small { display: block; font-size: 16px; font-weight: 300; color: var(--muted); margin-top: 4px; }
.pmeta { font-size: 15px; color: var(--muted); }
.status { font-size: 13px; padding: 3px 10px; border-radius: 999px; white-space: nowrap; justify-self: start; }
.status.wip { background: var(--lime); color: var(--ink); font-weight: 500; }
.status.done { box-shadow: inset 0 0 0 1px var(--line); color: var(--muted); }
.status.plan { box-shadow: inset 0 0 0 1px var(--dim); color: var(--dim); }
.plus { justify-self: end; font-size: 26px; line-height: 1; color: var(--lime); transition: transform .25s; }
.prow[aria-expanded="true"] .plus { transform: rotate(45deg); }
.pbody { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .3s ease; }
.pbody > div { overflow: hidden; }
.pitem.open .pbody { grid-template-rows: 1fr; }
.how { padding: 0 0 30px; max-width: 760px; }
.how p { font-size: 18px; line-height: 1.6; }
.how h4 { font-size: 13px; font-weight: 400; letter-spacing: 1.5px; text-transform: uppercase; color: var(--lime); margin: 0 0 8px; }
.how p { margin: 0; color: var(--muted); }
.how a { color: var(--lime); }
.how__res { margin-top: 24px !important; }
.res { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.res li { position: relative; padding-left: 22px; color: var(--muted); font-size: 17px; line-height: 1.5; }
.res li::before { content: "+"; position: absolute; left: 0; top: -1px; color: var(--lime); font-weight: 400; }
@media (max-width: 700px) {
  .prow { grid-template-columns: minmax(0, 1fr) 28px; gap: 8px 12px; }
  .prow .pmeta, .prow .status { grid-column: 1; }
  .prow .plus { grid-row: 1; grid-column: 2; }
  .ptitle { font-size: 20px; }
}

/* ── как я работаю ── */
/* принципы: заголовок сверху, под ним сетка 2×2 — название и описание под ним */
.princ { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 48px; }
.princ li { display: grid; gap: 10px; align-content: start; padding: 26px 0 30px; border-top: 1px solid var(--line); }
.princ b { font-weight: 300; font-size: 24px; line-height: 1.25; letter-spacing: -0.01em; }
.princ span { color: var(--muted); max-width: 52ch; }
@media (max-width: 760px) { .princ { grid-template-columns: 1fr; } .princ b { font-size: 21px; } }

/* ── обо мне: два абзаца рядом на всю ширину, под ними образование в три колонки ── */
.about { display: grid; gap: 48px; }
.about__text { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px; }
.about__text p { margin: 0; font-size: clamp(17px, 1.8vw, 20px); color: var(--muted); }
.about__h { font-size: 13px; font-weight: 400; letter-spacing: 1.5px; text-transform: uppercase; color: var(--lime); margin: 0 0 14px; }
.edu { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 32px; }
.edu li { display: grid; gap: 6px; align-content: start; padding: 18px 0; border-top: 1px solid var(--line); }
.edu__year { color: var(--dim); font-size: 15px; font-variant-numeric: tabular-nums; }
.edu b { display: block; font-weight: 400; margin-bottom: 4px; }
.edu li > span:last-child { color: var(--muted); font-size: 15px; line-height: 1.5; }
@media (max-width: 860px) {
  .about { gap: 36px; }
  .about__text { grid-template-columns: 1fr; gap: 18px; }
  .edu { grid-template-columns: 1fr; }
}

/* ── контакты ── */
.contact .h2 { font-size: clamp(38px, 6vw, 80px); max-width: 16ch; }
.contact p { max-width: 52ch; margin: 0 0 32px; color: var(--muted); }
.cta { display: flex; flex-wrap: wrap; gap: 12px; }

.foot { border-top: 1px solid var(--line); padding: 30px 0 50px; color: var(--muted); font-size: 15px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 28px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.foot a { color: var(--text); text-decoration: none; }
.foot a:hover { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }

@media (prefers-reduced-motion: reduce) {
  .logo img, .hero__mark { animation: none; }
  .pbody, .plus, .dir, .dir__arrow { transition: none; }
}
