/* slowdev — заметки о коде и около
   Тёмная тема, акцент — красно-розовый, поверхности — тонкие стеклянные слои. */

:root {
  color-scheme: dark;

  --bg: #000;
  --panel: rgba(255, 255, 255, .035);
  --panel-2: rgba(255, 255, 255, .055);
  --line: rgba(255, 255, 255, .08);
  --line-strong: rgba(255, 255, 255, .14);

  --text: #f5f5f5;
  --text-soft: #d7d7dd;
  --muted: #9a9aa2;
  --muted-2: #6e6e78;

  --accent: #ff2e60;
  --accent-soft: rgba(255, 46, 96, .15);
  --accent-line: rgba(255, 46, 96, .34);
  --accent-text: #ffb3c4;
  --deep: #b6004c;
  --deep-2: #590000;

  --radius: 16px;
  --radius-sm: 12px;
  --wrap: 960px;

  --sans: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --display: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Code", SFMono-Regular, Menlo, Consolas, monospace;

  --ease: cubic-bezier(.215, .61, .355, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scrollbar-color: #2a2a30 #000;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--bg);
  background-image:
    radial-gradient(1100px 520px at 50% -12%, rgba(255, 46, 96, .13), transparent 68%),
    radial-gradient(760px 420px at 88% 0%, rgba(255, 46, 96, .055), transparent 70%);
  background-repeat: no-repeat;
  color: var(--text);
  font: 17px/1.7 var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection { background: rgba(255, 46, 96, .35); color: #fff; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 8px;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  color: #fff;
  text-decoration: none;
  z-index: 100;
}
.skip:focus { left: 16px; }

/* ---------- шапка ---------- */

.top {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(0, 0, 0, .78);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  backdrop-filter: blur(18px) saturate(140%);
  border-bottom: 1px solid var(--line);
}

.bar {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
}

.brand-mark {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: linear-gradient(140deg, #ff2e60, #8e0033);
  box-shadow:
    0 6px 18px -8px rgba(255, 46, 96, .9),
    inset 0 1px 0 rgba(255, 255, 255, .35);
  font: 600 16px/1 var(--mono);
  color: #fff;
}

.brand-name {
  font-family: var(--display);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -.01em;
}

.nav { display: flex; gap: 4px; }

.nav a {
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 15px;
  text-decoration: none;
  transition: color .2s var(--ease), background .2s var(--ease);
}
.nav a:hover { color: var(--text); background: var(--panel); }

/* ---------- основная колонка ---------- */

main {
  flex: 1;
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 60px 24px 80px;
}

/* ---------- герой главной ---------- */

.hero {
  padding-bottom: 38px;
  border-bottom: 1px solid var(--line);
}

.badge {
  display: flex;
  width: max-content;
  align-items: center;
  gap: 8px;
  margin: 0 0 22px;
  padding: 7px 14px;
  border: 1px solid var(--accent-line);
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-text);
  font: 500 11px/1 var(--mono);
  letter-spacing: .14em;
  text-transform: uppercase;
}

.badge .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
}

.hero-title {
  position: relative;
  display: inline-block;
  margin: 0 0 22px;
  font-family: var(--display);
  font-size: clamp(34px, 5.1vw, 56px);
  font-weight: 600;
  line-height: 1.06;
  letter-spacing: -.032em;
}

.hero-bar {
  position: absolute;
  left: -.07em;
  right: -.07em;
  bottom: .16em;
  height: .3em;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--deep), var(--deep-2));
  opacity: .95;
}

.hero-text { position: relative; }

.hero-lead {
  max-width: 54ch;
  margin: 0;
  color: var(--muted);
  font-size: 18px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin-top: 26px;
  color: var(--muted-2);
  font: 400 12px/1 var(--mono);
  letter-spacing: .06em;
  text-transform: uppercase;
}

/* ---------- список заметок ---------- */

.feed {
  display: grid;
  gap: 14px;
  padding-top: 26px;
}

.card {
  position: relative;
  isolation: isolate;
  display: block;
  padding: 26px 26px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .012));
  color: inherit;
  text-decoration: none;
  transition: border-color .25s var(--ease), transform .25s var(--ease), background .25s var(--ease);
}

.card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: radial-gradient(520px 220px at 10% 0%, rgba(255, 46, 96, .14), transparent 70%);
  opacity: 0;
  transition: opacity .25s var(--ease);
  pointer-events: none;
}

.card:hover {
  transform: translateY(-2px);
  border-color: var(--accent-line);
}
.card:hover::after { opacity: 1; }

.card-date {
  display: block;
  margin-bottom: 10px;
  color: var(--muted-2);
  font: 400 11px/1 var(--mono);
  letter-spacing: .14em;
  text-transform: uppercase;
}

.card-title {
  margin: 0 0 8px;
  font-family: var(--display);
  font-size: 22px;
  font-weight: 600;
  line-height: 1.32;
  letter-spacing: -.015em;
  color: var(--text);
}

.card-sum {
  margin: 0;
  max-width: 68ch;
  color: var(--muted);
  font-size: 16px;
}

.card-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  color: var(--accent-text);
  font: 500 11px/1 var(--mono);
  letter-spacing: .12em;
  text-transform: uppercase;
}

.card-more .arrow { transition: transform .25s var(--ease); }
.card:hover .card-more .arrow { transform: translateX(4px); }

/* ---------- статья ---------- */

.post {
  max-width: 720px;
  margin: 0 auto;
}

.post-head {
  padding-bottom: 26px;
  margin-bottom: 30px;
  border-bottom: 1px solid var(--line);
}

.post-date {
  margin: 0 0 16px;
  color: var(--muted-2);
  font: 400 11px/1 var(--mono);
  letter-spacing: .14em;
  text-transform: uppercase;
}

.post-head h1 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(29px, 4.3vw, 42px);
  font-weight: 600;
  line-height: 1.14;
  letter-spacing: -.03em;
}

.prose {
  color: var(--text-soft);
  font-size: 18px;
  line-height: 1.78;
}

.prose > * { margin-top: 0; }
.prose p { margin-bottom: 22px; }

.prose ul {
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.prose li { position: relative; padding-left: 26px; }

.prose li::before {
  content: "";
  position: absolute;
  left: 5px;
  top: .7em;
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: linear-gradient(140deg, #ff2e60, #8e0033);
  transform: rotate(45deg);
}

.prose code {
  padding: .1em .42em;
  border: 1px solid rgba(255, 46, 96, .22);
  border-radius: 6px;
  background: var(--accent-soft);
  color: #ffc2d0;
  font: 400 .86em/1.5 var(--mono);
}

.prose a {
  color: var(--accent-text);
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 46, 96, .45);
  transition: color .2s var(--ease), border-color .2s var(--ease);
}
.prose a:hover { color: #fff; border-color: #fff; }

.post-nav { margin-top: 46px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 22px;
  border: 1px solid var(--accent-line);
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  color: #ffd2dc;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  transition: background .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease);
}
.btn:hover {
  background: rgba(255, 46, 96, .24);
  border-color: rgba(255, 46, 96, .55);
  transform: translateY(-1px);
}

/* ---------- 404 ---------- */

.error {
  text-align: center;
  padding: 40px 0 10px;
  max-width: 560px;
  margin: 0 auto;
}

.error-code {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(80px, 20vw, 150px);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -.06em;
  background: linear-gradient(160deg, #ff4d70, #b6004c 55%, #4a0000);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.error h1 {
  margin: 18px 0 12px;
  font-family: var(--display);
  font-size: clamp(24px, 3.4vw, 32px);
  font-weight: 600;
  letter-spacing: -.025em;
}

.error p:not(.error-code) {
  margin: 0 0 30px;
  color: var(--muted);
}

/* ---------- подвал ---------- */

.bottom {
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, transparent, rgba(255, 46, 96, .05));
}

.foot-inner {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 34px 24px 42px;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 26px;
}

.foot-brand { flex: 1 1 280px; display: flex; flex-direction: column; gap: 10px; }

.foot-tag { margin: 0; color: var(--muted); font-size: 14px; }

.foot-copy {
  color: var(--muted-2);
  font: 400 11px/1 var(--mono);
  letter-spacing: .1em;
  text-transform: uppercase;
}

.foot-col { display: flex; flex-direction: column; gap: 10px; }

.foot-head {
  color: var(--muted-2);
  font: 400 11px/1 var(--mono);
  letter-spacing: .14em;
  text-transform: uppercase;
}

.foot-nav { display: flex; flex-direction: column; gap: 8px; }

.foot-nav a {
  color: var(--muted);
  font-size: 14px;
  text-decoration: none;
  transition: color .2s var(--ease);
}
.foot-nav a:hover { color: var(--text); }

.soc-row { display: flex; gap: 8px; }

.soc {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .06);
  border-radius: 999px;
  background: rgba(255, 255, 255, .03);
  color: var(--muted);
  transition: background .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease), transform .2s var(--ease);
}
.soc:hover {
  background: rgba(255, 80, 153, .08);
  border-color: rgba(255, 134, 171, .3);
  color: #fff;
  transform: scale(.96);
}
.soc svg { width: 16px; height: 16px; fill: currentColor; }

/* ---------- адаптив ---------- */

@media (max-width: 720px) {
  .bar { height: 62px; padding: 0 18px; }
  main { padding: 40px 18px 60px; }
  .hero { padding-bottom: 30px; }
  .hero-lead { font-size: 17px; }
  .card { padding: 22px 20px 18px; }
  .card-title { font-size: 20px; }
  .prose { font-size: 17px; line-height: 1.75; }
  .foot-inner { padding: 28px 18px 34px; }
}

@media (max-width: 420px) {
  .brand-name { font-size: 17px; }
  .nav a { padding: 8px 10px; }
  .card-more { margin-top: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
  }
}
