:root {
  --bg: #0a0712;
  --bg-2: #0f0a1c;
  --surface: #16102a;
  --surface-2: #1d1535;
  --border: #2c2240;
  --text: #ece9f4;
  --text-dim: #8b81a8;
  --text-soft: #b5acca;
  --accent: #a880ff;
  --accent-2: #d162ff;
  --accent-soft: rgba(168, 128, 255, 0.13);
  --accent-line: rgba(168, 128, 255, 0.38);
  --grad-a: #a880ff;
  --grad-b: #d162ff;
  --grad-c: #5b6cff;
  --good: #5fd1a3;
  --warn: #ffb547;
  --danger: #ff5b6b;
  --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; position: relative; }
a { color: inherit; text-decoration: none; }

.bg-orb {
  position: fixed; border-radius: 50%; filter: blur(140px);
  opacity: 0.3; pointer-events: none; z-index: 0;
}
.orb-1 { width: 580px; height: 580px; background: radial-gradient(circle, var(--grad-a) 0%, transparent 70%); top: -200px; right: -140px; }
.orb-2 { width: 680px; height: 680px; background: radial-gradient(circle, var(--grad-c) 0%, transparent 70%); bottom: -280px; left: -200px; opacity: 0.2; }
.grid-bg {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(168,128,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(168,128,255,0.04) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(ellipse 80% 50% at 50% 0%, #000 30%, transparent 90%);
  -webkit-mask-image: radial-gradient(ellipse 80% 50% at 50% 0%, #000 30%, transparent 90%);
}

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

.site-header {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(18px); background: rgba(10,7,18,0.74);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 16px 28px; }
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 14px; letter-spacing: -0.01em;
}
.brand-mark {
  font-weight: 700; color: var(--accent);
  background: var(--accent-soft); padding: 4px 9px; border-radius: 6px;
  font-size: 13px; letter-spacing: 0;
}
.brand-dot { color: var(--accent-2); }
.brand-text { font-weight: 600; color: var(--text); }

.nav { display: flex; gap: 6px; align-items: center; }
.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(--accent); background: var(--accent-soft); }

.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; }

.view { display: none; }
.view.active { display: block; }

.hero { padding: 88px 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(38px, 6.5vw, 64px); line-height: 1.04;
  font-weight: 800; letter-spacing: -0.03em; margin-bottom: 22px;
  background: linear-gradient(180deg, #ffffff 0%, #b5acca 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-accent {
  background: linear-gradient(135deg, var(--grad-a), var(--grad-b));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-sub { font-size: 17px; color: var(--text-soft); max-width: 640px; line-height: 1.55; }
.hero-meta {
  display: flex; align-items: center; gap: 12px; margin-top: 26px;
  font-family: var(--mono); font-size: 12px; color: var(--text-dim);
}
.dot { width: 4px; height: 4px; border-radius: 50%; background: var(--text-dim); }
.dot-sep { width: 4px; height: 4px; border-radius: 50%; background: var(--text-dim); display: inline-block; }

.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 { 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: #a880ff; }
.post-tag.t-net::before  { background: #5fd1a3; }
.post-tag.t-k8s::before  { background: #ffb547; }
.post-tag.t-sec::before  { background: #ff5b6b; }
.post-tag.t-post::before { background: #d162ff; }
.post-tag.t-misc::before { background: #5b6cff; }
.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; gap: 16px; margin-top: 14px;
  font-family: var(--mono); font-size: 11.5px; color: var(--text-dim);
}
.post-footer .read-more { margin-left: auto; color: var(--accent); }
.new-badge {
  display: inline-block; font-family: var(--mono); font-size: 10px;
  background: linear-gradient(135deg, var(--grad-a), var(--grad-b)); color: #0a0712;
  padding: 2px 7px; border-radius: 4px; font-weight: 700; margin-right: 8px;
  text-transform: uppercase; letter-spacing: 0.04em;
}

.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); }

.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); }

.back-link { display: inline-block; margin: 30px 0 24px; color: var(--text-dim); font-family: var(--mono); font-size: 13px; }
.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%, #b5acca 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-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-text { color: var(--text-soft); font-size: 16px; line-height: 1.7; max-width: 640px; }
.about-text p { margin: 14px 0; }

.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); }

.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); }

.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.7); 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: var(--danger); font-size: 13px; font-family: var(--mono); }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; }
.btn-primary {
  background: linear-gradient(135deg, var(--grad-a), var(--grad-b)); color: #0a0712;
  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 { filter: brightness(1.12); }

@media (max-width: 600px) {
  .header-inner { padding: 14px 18px; flex-direction: column; gap: 12px; align-items: flex-start; }
  .nav { flex-wrap: wrap; }
  .hero { padding: 56px 0 40px; }
  .post { padding: 20px 22px; }
  .article { padding: 26px 22px; }
  .note { grid-template-columns: 80px 1fr; }
}
