/* 0xc0d3r.ru — dark theme */
:root{
  --bg: #070A12;
  --bg2: #0B1120;
  --card: rgba(255,255,255,0.05);
  --card2: rgba(255,255,255,0.075);
  --border: rgba(255,255,255,0.10);
  --text: rgba(255,255,255,0.92);
  --muted: rgba(255,255,255,0.65);
  --muted2: rgba(255,255,255,0.45);
  --link: #42d9ff;
  --accent: #ff3f6e;
  --shadow: 0 18px 60px rgba(0,0,0,0.55);
  --radius: 14px;
  --radius2: 18px;
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}
*{box-sizing:border-box}
html,body{height:100%}
html{
  background-color: var(--bg);
  background:
    radial-gradient(900px 500px at 15% -10%, rgba(66,217,255,0.18), transparent 55%),
    radial-gradient(900px 550px at 110% 10%, rgba(255,63,110,0.15), transparent 55%),
    radial-gradient(700px 500px at 45% 110%, rgba(120,90,255,0.10), transparent 55%),
    linear-gradient(180deg, var(--bg), var(--bg2));
  background-attachment: fixed;
}
body{
  margin:0;
  font:16px/1.65 system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans,Arial,sans-serif;
  color:var(--text);
  /* iOS Safari can show white behind browser UI if body is transparent */
  background-color: var(--bg);
}

.container{max-width:980px;margin:0 auto;padding:30px 18px 44px}

/* Header */
.site-header{
  position: sticky;
  top: 14px;
  z-index: 40;

  display:flex;align-items:center;justify-content:space-between;gap:16px;
  padding:18px 18px;
  border:1px solid var(--border);
  background:rgba(0,0,0,0.20);
  border-radius:var(--radius2);
  box-shadow:var(--shadow);
  backdrop-filter: blur(10px);
}
.brand{display:flex;align-items:center;gap:14px;min-width:0}
.brand-logo{width:44px;height:44px;border-radius:12px;flex:0 0 auto;overflow:hidden;border:1px solid rgba(255,255,255,0.10)}
.brand-logo img{width:100%;height:100%;object-fit:cover;display:block}
.brand-text{min-width:0}
.brand-title{margin:0;font-size:20px;line-height:1.2;letter-spacing:0.2px}
.brand-title a{color:inherit;text-decoration:none}
.brand-sub{margin:2px 0 0;color:var(--muted);font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

.nav{display:flex;gap:10px;flex-wrap:wrap;justify-content:flex-end}
.nav a{
  color:var(--muted);
  text-decoration:none;
  font-size:13px;
  padding:8px 10px;
  border-radius:10px;
  border:1px solid transparent;
}
.nav a:hover{color:var(--text);border-color:var(--border);background:rgba(255,255,255,0.04)}

/* Content */
main{margin-top:22px}

h1,h2,h3{letter-spacing:-0.2px}
h2{margin:8px 0 14px;font-size:22px}

.card{
  border:1px solid var(--border);
  background:linear-gradient(180deg, var(--card), rgba(255,255,255,0.03));
  border-radius:var(--radius);
  padding:16px 18px;
  box-shadow: 0 10px 34px rgba(0,0,0,0.35);
}

.post-list{display:grid;grid-template-columns:1fr;gap:12px}
.post-item{padding:16px 18px}
.post-item:hover{background:linear-gradient(180deg, var(--card2), rgba(255,255,255,0.04))}

.meta{color:var(--muted2);font-size:13px;margin-top:6px}

a{color:var(--link)}
a:hover{color:#79e8ff}

.post-title{margin:0 0 6px;font-size:18px;line-height:1.35}
.post-title a{color:var(--text);text-decoration:none}
.post-title a:hover{color:#ffffff}

.excerpt{margin:10px 0 0;color:var(--muted)}

.article h2{margin-top:24px}
.article img{max-width:100%}

.cover{display:block;margin:-6px -6px 14px -6px;border-radius:16px;overflow:hidden;border:1px solid var(--border);background:rgba(255,255,255,0.02)}
.cover img{width:100%;height:auto;display:block}

/* Make list covers consistent */
.post-item .cover{margin:-6px -6px 12px -6px}
.post-item .cover img{aspect-ratio: 16 / 9; object-fit: cover}

hr{border:0;border-top:1px solid var(--border);margin:22px 0}

blockquote{
  margin:16px 0;
  padding:12px 14px;
  border-left:3px solid rgba(66,217,255,0.8);
  background:rgba(66,217,255,0.06);
  border-radius:12px;
  color:var(--muted);
}

code{font-family:var(--mono);font-size:0.95em;background:rgba(255,255,255,0.06);padding:2px 6px;border-radius:8px;border:1px solid rgba(255,255,255,0.08)}
pre{background:#0b1020;color:#e6edf3;padding:14px 16px;border-radius:14px;overflow:auto;border:1px solid rgba(255,255,255,0.10)}
pre code{background:transparent;border:0;padding:0}

footer{margin-top:26px;color:var(--muted2);font-size:13px;text-align:center}

@media (min-width: 860px){
  .post-list{grid-template-columns:1fr 1fr}
}

/* Floating action buttons on article pages */
.fab{
  position:fixed;
  right:18px;
  bottom:18px;
  display:flex;
  flex-direction:column;
  gap:10px;
  z-index:50;
}
.fab-btn{
  width:44px;
  height:44px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,0.14);
  background:rgba(0,0,0,0.35);
  color:rgba(255,255,255,0.92);
  box-shadow: 0 12px 40px rgba(0,0,0,0.55);
  backdrop-filter: blur(10px);
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:18px;
  cursor:pointer;
  text-decoration:none;
  user-select:none;
}
.fab-btn:hover{
  border-color: rgba(66,217,255,0.45);
  background: rgba(66,217,255,0.10);
}
.fab-btn:active{transform: translateY(1px)}

@media (max-width: 520px){
  .site-header{padding:14px}
  .brand-logo{width:40px;height:40px}
  .brand-title{font-size:18px}
  .nav{display:none}
  .fab{right:14px; bottom:14px}
}
