:root {
  --bg: #0a0a0c;
  --bg-2: #111114;
  --surface: #14141a;
  --surface-2: #1c1c24;
  --border: #25252e;
  --text: #e7e7ea;
  --text-dim: #8a8a93;
  --text-soft: #b7b7be;
  --accent: #ff7849;
  --accent-soft: rgba(255, 120, 73, 0.12);
  --accent-line: rgba(255, 120, 73, 0.35);
  --grad-a: #ff7849;
  --grad-b: #ff4d80;
  --grad-c: #5f6bff;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: var(--bg); color: var(--text); font-family: var(--sans); line-height: 1.6; -webkit-font-smoothing: antialiased; }
body { min-height: 100vh; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }

/* background orbs */
.bg-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.28;
  pointer-events: none;
  z-index: 0;
}
.orb-1 {
  width: 520px; height: 520px;
  background: radial-gradient(circle, var(--grad-a) 0%, transparent 70%);
  top: -180px; right: -120px;
}
.orb-2 {
  width: 620px; height: 620px;
  background: radial-gradient(circle, var(--grad-c) 0%, transparent 70%);
  bottom: -260px; left: -180px;
  opacity: 0.18;
}

.container { max-width: 920px; margin: 0 auto; padding: 0 28px; position: relative; z-index: 1; }

/* header */
.site-header {
  position: sticky; top: 0;
  backdrop-filter: blur(16px);
  background: rgba(10, 10, 12, 0.72);
  border-bottom: 1px solid var(--border);
  z-index: 50;
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 28px;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 600; font-size: 15px; letter-spacing: -0.01em;
}
.brand-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: linear-gradient(135deg, var(--grad-a), var(--grad-b));
  box-shadow: 0 0 14px var(--accent-line);
}
.nav { display: flex; gap: 8px; }
.nav-link {
  font-size: 13.5px; color: var(--text-dim);
  padding: 8px 12px; border-radius: 8px;
  transition: color .15s, background .15s;
}
.nav-link:hover { color: var(--text); background: var(--surface); }
.nav-link.active { color: var(--text); }

.lang-toggle {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text-dim); font-family: var(--mono); font-size: 11.5px;
  padding: 6px 10px; border-radius: 8px; cursor: pointer;
  margin-left: 8px; transition: all .15s; letter-spacing: 0.05em;
}
.lang-toggle:hover { color: var(--text); border-color: var(--accent-line); }
.lang-toggle .lang-on  { color: var(--accent); font-weight: 600; }
.lang-toggle .lang-off { color: var(--text-dim); }
.lang-toggle .lang-sep { color: var(--text-dim); opacity: .5; }
.lang-toggle.ru .lang-on  { color: var(--text-dim); font-weight: 400; }
.lang-toggle.ru .lang-off { color: var(--accent); font-weight: 600; }

/* hero */
.hero { padding: 84px 0 56px; }
.kicker {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 18px;
}
.hero-title {
  font-size: clamp(36px, 6vw, 60px); line-height: 1.05;
  font-weight: 700; letter-spacing: -0.025em; margin-bottom: 22px;
  background: linear-gradient(180deg, #ffffff 0%, #b7b7be 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-sub {
  font-size: 17px; color: var(--text-soft); max-width: 620px; line-height: 1.55;
}
.hero-meta {
  display: flex; align-items: center; gap: 14px; margin-top: 26px;
  font-family: var(--mono); font-size: 12px; color: var(--text-dim);
}
.dot-sep { width: 4px; height: 4px; border-radius: 50%; background: var(--text-dim); }

/* filter bar */
.filter-bar {
  display: flex; gap: 8px; flex-wrap: wrap;
  margin: 32px 0 28px; padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}
.chip {
  font-family: var(--mono); font-size: 12px;
  background: var(--surface); color: var(--text-dim);
  border: 1px solid var(--border); border-radius: 999px;
  padding: 7px 14px; cursor: pointer;
  transition: all .15s;
}
.chip:hover { color: var(--text); border-color: var(--accent-line); }
.chip.active {
  background: var(--accent-soft); color: var(--accent);
  border-color: var(--accent-line);
}

/* posts */
.posts { display: flex; flex-direction: column; gap: 14px; }
.post {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 26px 28px;
  transition: border-color .2s, transform .2s;
  cursor: pointer;
  animation: fadeIn .4s ease both;
}
.post:hover { border-color: var(--accent-line); transform: translateY(-1px); }
.post.new { box-shadow: 0 0 0 1px var(--accent-line); }
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.post-meta {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--mono); font-size: 11.5px; color: var(--text-dim);
  margin-bottom: 12px;
}
.post-tag {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--surface-2); padding: 4px 10px; border-radius: 6px;
  color: var(--text-soft); font-weight: 500;
}
.post-tag::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
}
.post-tag.t-ops::before { background: #ff7849; }
.post-tag.t-db::before  { background: #5f6bff; }
.post-tag.t-net::before { background: #4ad295; }
.post-tag.t-k8s::before { background: #ffb547; }
.post-tag.t-post::before { background: #ff4d80; }
.post-tag.t-misc::before { background: #a07cff; }
.post-title {
  font-size: 19px; font-weight: 600; letter-spacing: -0.01em;
  margin-bottom: 8px; color: var(--text);
}
.post-excerpt {
  font-size: 14.5px; color: var(--text-soft); line-height: 1.55;
}
.post-footer {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 14px;
  font-family: var(--mono); font-size: 11.5px; color: var(--text-dim);
}
.read-more { color: var(--accent); }
.new-badge {
  display: inline-block; font-family: var(--mono); font-size: 10px;
  background: var(--accent); color: #0a0a0c;
  padding: 2px 7px; border-radius: 4px; font-weight: 600; margin-right: 8px;
  text-transform: uppercase; letter-spacing: 0.04em;
}

/* load more */
.load-more { display: flex; justify-content: center; margin: 40px 0 80px; }
.btn-ghost {
  background: transparent; border: 1px solid var(--border);
  color: var(--text-soft); padding: 12px 24px; border-radius: 10px;
  font-family: var(--mono); font-size: 13px; cursor: pointer;
  transition: all .15s;
}
.btn-ghost:hover { color: var(--text); border-color: var(--accent-line); background: var(--surface); }

/* footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 48px 0 36px; margin-top: 60px;
  background: var(--bg-2);
}
.footer-inner {
  display: flex; justify-content: space-between; align-items: flex-start;
  flex-wrap: wrap; gap: 24px;
}
.footer-brand { font-weight: 600; font-size: 14px; margin-bottom: 4px; }
.footer-tag { color: var(--text-dim); font-size: 13px; max-width: 420px; }
.footer-links { display: flex; gap: 18px; }
.footer-links a {
  font-size: 13px; color: var(--text-dim);
  transition: color .15s;
}
.footer-links a:hover { color: var(--accent); }
.copy {
  text-align: center; color: var(--text-dim); font-size: 12px;
  margin-top: 36px; font-family: var(--mono);
}

/* mobile */
@media (max-width: 600px) {
  .header-inner { padding: 16px 20px; flex-direction: column; gap: 14px; align-items: flex-start; }
  .nav { flex-wrap: wrap; }
  .hero { padding: 56px 0 40px; }
  .post { padding: 20px 22px; }
}
/* === auth + lang в шапке === */
.auth-box { display: inline-flex; align-items: center; gap: 8px; margin-left: 10px; }
.auth-name { font-family: var(--mono); font-size: 12px; color: var(--accent); }
.auth-btn {
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text-dim); font-family: var(--mono); font-size: 11.5px;
  padding: 6px 10px; border-radius: 8px; cursor: pointer;
  transition: all .15s;
}
.auth-btn:hover { color: var(--text); border-color: var(--accent-line); }

.lang-toggle {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text-dim); font-family: var(--mono); font-size: 11.5px;
  padding: 6px 10px; border-radius: 8px; cursor: pointer;
  margin-left: 8px; transition: all .15s; letter-spacing: 0.05em;
}
.lang-toggle:hover { color: var(--text); border-color: var(--accent-line); }
.lang-toggle .lang-en { color: var(--accent); font-weight: 600; }
.lang-toggle .lang-ru { color: var(--text-dim); font-weight: 400; }
.lang-toggle .lang-sep { color: var(--text-dim); opacity: .5; }
.lang-toggle.ru .lang-en { color: var(--text-dim); font-weight: 400; }
.lang-toggle.ru .lang-ru { color: var(--accent); font-weight: 600; }

/* === views === */
.view { display: none; }
.view.active { display: block; }

/* === like button === */
.like-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: transparent; border: 1px solid var(--border);
  color: var(--text-dim); padding: 5px 10px;
  border-radius: 8px; font-family: var(--mono); font-size: 12px;
  cursor: pointer; transition: all .15s;
}
.like-btn:hover { color: var(--accent); border-color: var(--accent-line); background: var(--accent-soft); }
.like-btn.liked { color: var(--accent); border-color: var(--accent-line); background: var(--accent-soft); }
.like-btn svg { transition: transform .2s; }
.like-btn:hover svg, .like-btn.liked svg { transform: scale(1.15); }
.post-footer { gap: 16px; }
.post-footer .read-more { margin-left: auto; }

/* === article view === */
.back-link {
  display: inline-block; margin: 30px 0 24px;
  color: var(--text-dim); font-family: var(--mono); font-size: 13px;
  transition: color .15s;
}
.back-link:hover { color: var(--accent); }
.article {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; padding: 38px 42px; margin-bottom: 60px;
}
.article-title {
  font-size: clamp(28px, 4vw, 38px); line-height: 1.15;
  font-weight: 700; letter-spacing: -0.02em;
  margin: 16px 0 28px;
  background: linear-gradient(180deg, #ffffff 0%, #b7b7be 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.article-body { color: var(--text-soft); font-size: 15.5px; line-height: 1.75; }
.article-body p { margin: 16px 0; }
.article-body hr { border: none; border-top: 1px solid var(--border); margin: 30px 0; }
.article-actions {
  margin-top: 36px; padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex; gap: 12px;
}
.like-big {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--surface-2); border: 1px solid var(--border);
  color: var(--text-soft); padding: 10px 18px;
  border-radius: 10px; font-family: var(--mono); font-size: 13px;
  cursor: pointer; transition: all .15s;
}
.like-big:hover, .like-big.liked {
  color: var(--accent); border-color: var(--accent-line);
  background: var(--accent-soft);
}
.like-count { color: var(--text-dim); }
.likers {
  margin-top: 16px;
  font-family: var(--mono); font-size: 12px; color: var(--text-dim);
}
.likers-label { margin-right: 6px; }
.liker {
  display: inline-block; color: var(--text-soft);
  background: var(--surface-2); padding: 3px 8px; border-radius: 5px;
  margin: 0 2px;
}

/* === notes view === */
.notes-list { display: flex; flex-direction: column; gap: 12px; margin-top: 20px; }
.note {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 18px 22px;
  display: grid; grid-template-columns: 120px 1fr; gap: 18px;
  align-items: start;
}
.note-time {
  font-family: var(--mono); font-size: 11.5px; color: var(--text-dim);
  padding-top: 3px;
}
.note-text { color: var(--text-soft); font-size: 14.5px; line-height: 1.55; }

/* === about view === */
.about-text { color: var(--text-soft); font-size: 16px; line-height: 1.7; max-width: 640px; }
.about-text p { margin: 14px 0; }

/* === rss view === */
.feed-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; margin-top: 24px; }
.feed-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 20px;
  display: flex; align-items: center; gap: 14px;
  transition: all .15s;
}
.feed-card:hover { border-color: var(--accent-line); transform: translateY(-1px); }
.feed-icon { font-size: 28px; }
.feed-name { font-weight: 600; color: var(--text); margin-bottom: 4px; }
.feed-url { font-family: var(--mono); font-size: 12px; color: var(--text-dim); }

/* === modal === */
.modal {
  position: fixed; inset: 0; display: none;
  align-items: center; justify-content: center;
  z-index: 100; padding: 20px;
}
.modal.active { display: flex; }
.modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.65); backdrop-filter: blur(4px);
}
.modal-card {
  position: relative; background: var(--surface);
  border: 1px solid var(--border); border-radius: 14px;
  padding: 30px 32px; max-width: 420px; width: 100%;
}
.modal-title { font-size: 18px; font-weight: 600; margin-bottom: 8px; }
.modal-sub { color: var(--text-dim); font-size: 13.5px; line-height: 1.5; margin-bottom: 20px; }
.field-label {
  display: block;
  font-family: var(--mono); font-size: 11px; color: var(--text-dim);
  text-transform: uppercase; letter-spacing: 0.06em;
  margin: 12px 0 6px;
}
.field-label:first-of-type { margin-top: 4px; }
#login-input, #login-email {
  width: 100%; padding: 11px 14px;
  background: var(--bg); border: 1px solid var(--border); border-radius: 8px;
  color: var(--text); font-family: var(--mono); font-size: 14px;
  outline: none; transition: border-color .15s;
}
#login-input:focus, #login-email:focus { border-color: var(--accent-line); }
.field-error {
  margin-top: 10px; color: #ff6b6b; font-size: 13px;
  font-family: var(--mono);
}
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; }
.btn-primary {
  background: var(--accent); color: #0a0a0c;
  border: none; padding: 9px 18px; border-radius: 8px;
  font-family: var(--mono); font-size: 13px; font-weight: 600;
  cursor: pointer; transition: all .15s;
}
.btn-primary:hover { background: #ff8e63; }
