/* Final theme separation: rich dark, clean light, consistent fades */
:root{
  --text:#f5f5f7; --muted:#b0b3b8;
  --accent:#0a84ff; --accent-press:#0071e3;
  --border-dark: rgba(255,255,255,.08);
  --border-light: rgba(0,0,0,.08);
  --container: 1024px;
}
/* DARK THEME (default) */
html[data-theme="dark"]{
  --bg1:#060708; --bg2:#111216;
  --text:#f5f5f7; --muted:#b0b3b8;
  --header-bg: rgba(0,0,0,.28);
  --header-border: var(--border-dark);
  --border: var(--border-dark);
}
/* LIGHT THEME */
html[data-theme="light"]{
  --bg1:#f7f8fb; --bg2:#eef1f6;
  --text:#1d1d1f; --muted:#6e6e73;
  --header-bg: rgba(255,255,255,.72);
  --header-border: var(--border-light);
  --border: var(--border-light);
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family:-apple-system, BlinkMacSystemFont, "SF Pro Text","SF Pro Display", Inter, Roboto, "Segoe UI", Arial, sans-serif;
  color:var(--text);
  background: #05070c;
  display:flex; flex-direction:column; min-height:100vh; -webkit-font-smoothing:antialiased; text-rendering:optimizeLegibility;
  position: relative;
  overflow-x: hidden;
}
/* Light theme softens the radial and keeps linear clean */
html[data-theme="light"] body{
  background: var(--bg1);
}

body::before{
  content:"";
  position:fixed;
  inset:-20%;
  z-index:-1;
  pointer-events:none;
  background:
    radial-gradient(1400px 900px at 12% -8%, rgba(28,73,128,.28) 0%, rgba(28,73,128,0) 55%),
    radial-gradient(1200px 800px at 88% 6%, rgba(88,64,155,.16) 0%, rgba(88,64,155,0) 52%),
    linear-gradient(180deg, #05070c 0%, #0a0e15 45%, #0b0f16 100%);
}

html[data-theme="light"] body::before{
  background:
    radial-gradient(1200px 700px at 18% -6%, rgba(28,73,128,.10) 0%, rgba(28,73,128,0) 40%),
    linear-gradient(180deg, var(--bg1) 0%, var(--bg2) 100%);
}

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

/* Header */
.site-header{position:sticky; top:0; z-index:10; opacity:0; transform:translateY(-6px); transition:opacity .4s ease, transform .4s ease; background:var(--header-bg); backdrop-filter:blur(12px); border-bottom:1px solid var(--header-border)}
.site-header.show{opacity:1; transform:none}
.nav-container{display:flex; align-items:center; justify-content:space-between; padding:12px 0}
.brand{display:flex; align-items:center; gap:10px; text-decoration:none; color:var(--text); font-weight:700; letter-spacing:.2px; white-space:nowrap}
.logo{width:28px; height:28px}
.main-nav{display:flex; align-items:center; gap:10px; flex-wrap:wrap; justify-content:flex-end}
.main-nav a{color:var(--text); text-decoration:none; padding:8px 12px; border-radius:12px; opacity:.9}
html[data-theme="dark"] .main-nav a:hover{background:rgba(255,255,255,.06); opacity:1}
html[data-theme="light"] .main-nav a:hover{background:rgba(0,0,0,.04); opacity:1}
.icon-btn{display:inline-flex; align-items:center; justify-content:center; width:36px; height:36px; border-radius:10px; border:1px solid var(--border); color:var(--text)}
html[data-theme="dark"] .icon-btn:hover{background:rgba(255,255,255,.06)}
html[data-theme="light"] .icon-btn:hover{background:rgba(0,0,0,.04)}
.icon-btn svg{width:18px; height:18px}
.theme-btn{margin-left:4px; padding:8px 10px; border-radius:10px; border:1px solid var(--border); background:transparent; color:var(--text); cursor:pointer}
html[data-theme="dark"] .theme-btn:hover{background:rgba(255,255,255,.06)}
html[data-theme="light"] .theme-btn:hover{background:rgba(0,0,0,.04)}

/* Content */
.site-content{flex:1; padding:56px 0 64px; line-height:1.7}
.markdown-body h1{font-size:48px; line-height:1.1; letter-spacing:-0.02em; margin:.6em 0 .4em; font-weight:800}
.markdown-body h2{font-size:28px; margin:1.4em 0 .6em; font-weight:800}
.markdown-body p{font-size:18px}
.markdown-body strong{font-weight:700}
.markdown-body a{color:var(--accent); text-decoration:none}
.markdown-body a:hover{text-decoration:underline}

/* Hero */
.hero{display:grid; grid-template-columns:1.1fr .9fr; gap:28px; align-items:center; margin:18px 0 6px}
.eyebrow{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:5px 12px;
  border-radius:999px;
  font-size:12px;
  font-weight:600;
  letter-spacing:0.14px;
  color:#cbd5e8;
  background:rgba(255,255,255,.04);
  border:1px solid rgba(255,255,255,.16);
  box-shadow:0 8px 18px rgba(0,0,0,.16), inset 0 1px 0 rgba(255,255,255,.07);
  margin:0 0 10px;
  width:fit-content;
}
.eyebrow::before{
  display:none;
}
.eyebrow strong{font-weight:800;}
.hero h1{margin:0 0 12px}
.hero p.sub{font-size:20px; color:var(--muted); margin:0 0 22px}
.hero .btns{display:flex; gap:12px; margin-top:8px; flex-wrap:wrap}
.btn{display:inline-block; padding:14px 24px; border-radius:30px; font-weight:800; text-decoration:none; background:var(--accent); color:#fff !important; border:1px solid transparent; letter-spacing:.2px}
.btn:hover{background:var(--accent-press)}
.btn.secondary{background:transparent; color:var(--accent) !important; border:1px solid var(--accent)}
.btn.secondary:hover{background:rgba(10,132,255,.12)}
.hero-visual{position:relative}
.hero-visual{display:flex; justify-content:flex-end}
.hero-visual .terminal-window{width:100%; max-width:480px; margin-left:auto;}

html[data-theme="light"] .eyebrow{
  background:rgba(255,255,255,.9);
  border:1px solid rgba(0,0,0,.05);
  box-shadow:0 5px 14px rgba(0,0,0,.07), inset 0 1px 0 rgba(255,255,255,.9);
  color:#1d1d1f;
}

/* Luxe metric + card surfaces */
.metrics{display:grid; grid-template-columns:repeat(auto-fit,minmax(200px,1fr)); gap:12px; margin:40px 0; padding:14px; background:linear-gradient(135deg, rgba(255,255,255,.04), rgba(255,255,255,.02)); border:1px solid var(--border); border-radius:18px; box-shadow:0 22px 60px rgba(0,0,0,.18)}
.metric{padding:14px 16px; border-radius:14px; border:1px solid var(--border); background:linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.01)); box-shadow:0 12px 36px rgba(0,0,0,.12)}
.metric .num{display:block; font-weight:800; font-size:22px; letter-spacing:.3px; margin-bottom:6px}
.metric .label{color:var(--muted); font-size:14px; line-height:1.5}

.pillars h2{margin-bottom:18px}
.card-grid{display:grid; grid-template-columns:repeat(auto-fit,minmax(260px,1fr)); gap:16px}
.card{padding:18px 18px 16px; border-radius:18px; border:1px solid var(--border); background:linear-gradient(150deg, rgba(255,255,255,.05), rgba(255,255,255,.02)); box-shadow:0 18px 48px rgba(0,0,0,.16)}
.card h3{margin-top:0; margin-bottom:8px}
.card p{color:var(--muted); margin-top:0; margin-bottom:10px}
.card ul{margin:0; padding-left:18px; color:var(--text)}

.toolbox h2{margin-bottom:14px}
.badge-grid{display:grid; grid-template-columns:repeat(auto-fit,minmax(240px,1fr)); gap:12px}
.badge-chip{display:flex; align-items:center; gap:10px; padding:14px 16px; border-radius:14px; border:1px solid var(--border); background:linear-gradient(145deg, rgba(255,255,255,.10), rgba(255,255,255,.04)); box-shadow:0 14px 40px rgba(0,0,0,.16); backdrop-filter:blur(9px)}
.badge-chip i{font-size:22px; opacity:.9}
.badge-chip span{font-size:14px; color:var(--text); line-height:1.5}
.badge-chip .colored{color:#0a84ff}
.badge-chip:nth-child(odd) .colored{color:#7b42bc}

/* Reveal */
.reveal{opacity:0; transform:translateY(18px); will-change:opacity, transform; transition:opacity .6s ease, transform .6s ease}
.reveal.in{opacity:1; transform:none}

/* Footer */
.site-footer{margin-top:auto; border-top:1px solid var(--header-border); padding:18px 0; text-align:center; opacity:.85; font-size:14px}

/* 404 Apple-like */
.notfound{display:flex; align-items:center; justify-content:center; min-height:70vh; text-align:center}
.notfound .box{
  max-width:720px; padding:28px; border-radius:24px;
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.03));
  border:1px solid var(--header-border);
  box-shadow: 0 22px 60px rgba(0,0,0,.25);
}
.notfound h1{font-size:72px; margin:0 0 8px; letter-spacing:-.03em}
.notfound p{color:var(--muted); font-size:18px; margin:0 0 18px}

/* Responsive */
@media (max-width: 920px){
  .container{padding:0 16px}
  .markdown-body h1{font-size:38px}
  .markdown-body h2{font-size:24px}
  .hero{grid-template-columns:1fr; gap:16px}
  .brand-text{display:none;}
}
@media (max-width: 600px){
  .site-content{padding:40px 0 56px}
  .btn{padding:12px 20px}
  .icon-btn{width:34px; height:34px}
  .markdown-body p, .markdown-body li{font-size:17px}
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  margin-left: 4px;
  background: #666;
  transition: background 0.3s ease;
}


.terminal-loader {
  font-family: 'JetBrains Mono', 'SFMono-Regular', Menlo, Consolas, monospace;
  font-size: 1rem;
  margin-bottom: 30px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.02);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  position: relative;
  letter-spacing: 0.35px;
  width: fit-content;
  transition: transform 120ms ease, box-shadow 120ms ease;
  overflow: hidden;
}

.terminal-loader::before { display:none; }

.terminal-loader::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1px solid rgba(255, 255, 255, 0.05);
  pointer-events: none;
}

.terminal-loader .t-line {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  z-index: 1;
}

.terminal-loader .t-led {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: radial-gradient(circle, #4ade80 40%, #1e9e5a 100%);
  box-shadow: 0 0 8px rgba(74, 222, 128, 0.5);
  position: relative;
  z-index: 1;
}

.t-user, .t-host {
  color: #7fb3ff;
  font-weight: 600;
}

.t-pc { color: #6b7280; }

.t-path { color: #9ddba5; }

.t-command {
  color: #d6dde7;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  padding: 4px 10px;
  border-radius: 6px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.t-cursor {
  display: inline-block;
  width: 9px;
  height: 1.05em;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.55));
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.3);
  border-radius: 1px;
  animation: blink-cursor 1.1s steps(2, start) infinite;
}

@keyframes blink-cursor {
  0% { opacity: 1; }
  50% { opacity: 0; }
  100% { opacity: 1; }
}

.terminal-loader:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.terminal-window {
  font-family: 'JetBrains Mono', 'SFMono-Regular', Menlo, Consolas, monospace;
  color: #e4e8f0;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  box-shadow: 0 14px 32px rgba(0,0,0,0.24), inset 0 1px 0 rgba(255,255,255,0.05);
  overflow: hidden;
}

.terminal-window .tw-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 12px;
  background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.terminal-window .tw-btn {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.08);
}
.tw-btn.red{background:#ff5f56}
.tw-btn.yellow{background:#ffbd2e}
.tw-btn.green{background:#27c93f}
.terminal-window .tw-title {
  margin-left: 6px;
  font-size: 13px;
  color: #9aa3b5;
}

.terminal-window .tw-body {
  padding: 14px 14px 16px;
  display: grid;
  gap: 6px;
}

.terminal-window .tw-line { font-size: 15px; letter-spacing: 0.25px; }
.terminal-window .tw-table {
  display:flex; justify-content:space-between; align-items:center;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 8px;
  padding: 6px 10px;
}
.tw-label { color: #9ddba5; font-weight: 600; }
.tw-level { color: #d6dde7; font-size: 14px; }

.terminal-window .tw-tags { display:flex; gap:8px; flex-wrap:wrap; margin-top:4px; }
.terminal-window .tw-tag {
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.05);
  font-size: 12px;
  color: #d6dde7;
}




/* Специальные правки для СВЕТЛОЙ темы */
html[data-theme="light"] .t-command {
  color: #1d1d1f !important; /* Тёмный цвет из твоей переменной --text */
}

html[data-theme="light"] .t-pc {
  color: #86868b !important; /* Серый цвет для символов @ и : */
}

html[data-theme="light"] .t-cursor {
  background-color: #1d1d1f !important; /* Тёмный мигающий курсор */
}

/* Путь (~) в светлой теме можно оставить зеленым или сделать чуть темнее */
html[data-theme="light"] .t-path {
  color: #4e7d4a !important; /* Более глубокий зеленый для читаемости */
}

html[data-theme=\"light\"] .terminal-loader {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

html[data-theme=\"light\"] .terminal-loader::before {
  display:none;
}

html[data-theme=\"light\"] .t-led {
  background: radial-gradient(circle, #1b8f3d 40%, #11662c 100%);
  box-shadow: 0 0 6px rgba(17, 102, 44, 0.35);
}
