:root {
  --bg: #060608; --bg-soft: #0c0d11;
  --card: rgba(255,255,255,0.04); --border: rgba(255,255,255,0.09);
  --text: #f4f5f7; --muted: #9aa0ab; --accent: #ffffff;
  --radius: 16px;
  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--text); font-family: var(--font-body); line-height: 1.6; overflow-x: hidden; }
::selection { background: #fff; color: #000; }
a { color: var(--text); }
.muted { color: var(--muted); }
.center { text-align: center; }
code { font-family: var(--font-mono); font-size: 0.9em; }

.bg-glow { position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(600px 300px at 50% -10%, rgba(255,255,255,0.10), transparent 70%),
              radial-gradient(900px 500px at 85% 110%, rgba(255,255,255,0.05), transparent 70%); }
.bg-grid { position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, black 30%, transparent 75%); }

.wrap { width: min(1100px, 92%); margin: 0 auto; }
.wrap.narrow { width: min(760px, 92%); }


header { position: sticky; top: 0; z-index: 10; backdrop-filter: blur(14px);
  background: rgba(6,6,8,0.7); border-bottom: 1px solid var(--border); }
nav { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700;
  font-size: 1.05rem; letter-spacing: 0.14em; color: var(--text); text-decoration: none; }
.nav-links { display: flex; gap: 26px; align-items: center; }
.nav-links a { color: var(--muted); text-decoration: none; font-size: 0.92rem; font-weight: 500; transition: color 0.2s; }
.nav-links a:hover { color: var(--text); }
.nav-links a.btn { color: #000; background: var(--accent); padding: 8px 18px; border-radius: 999px; }
.nav-links a.btn:hover { transform: translateY(-1px); opacity: 0.92; color: #000; }

.hero { text-align: center; padding: clamp(70px, 12vh, 130px) 0 clamp(60px, 10vh, 110px); }
.hero-logo { width: min(680px, 88%); margin: 0 auto 34px; display: block;
  filter: drop-shadow(0 0 40px rgba(255,255,255,0.12)); animation: rise 0.9s ease both; }
.tagline { font-family: var(--font-display); font-size: clamp(1.15rem, 2.6vw, 1.5rem); font-weight: 500;
  letter-spacing: 0.06em; animation: rise 0.9s 0.1s ease both; }
.hero p.sub { color: var(--muted); max-width: 560px; margin: 14px auto 0; font-size: 1.02rem; animation: rise 0.9s 0.2s ease both; }
.hero-cta { margin-top: 34px; display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; animation: rise 0.9s 0.3s ease both; }

.btn { display: inline-flex; align-items: center; gap: 10px; padding: 13px 28px; border-radius: 999px;
  font-family: var(--font-display); font-weight: 700; font-size: 0.98rem; letter-spacing: 0.03em;
  text-decoration: none; transition: transform 0.2s, opacity 0.2s, box-shadow 0.2s; cursor: pointer; border: 1px solid transparent; }
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--accent); color: #000; box-shadow: 0 8px 30px rgba(255,255,255,0.18); }
.btn-primary:hover { opacity: 0.92; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { border-color: rgba(255,255,255,0.35); background: rgba(255,255,255,0.05); }

.status { margin-top: 30px; display: inline-flex; align-items: center; gap: 10px; padding: 8px 16px;
  border: 1px solid var(--border); border-radius: 999px; background: var(--card); color: var(--muted);
  font-size: 0.88rem; animation: rise 0.9s 0.4s ease both; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: #3ddc84; animation: pulse 2s infinite; }

section, .page { padding: clamp(56px, 9vh, 96px) 0; }
.section-head { text-align: center; margin-bottom: 44px; }
.section-head.left { text-align: left; }
.kicker { font-family: var(--font-display); font-size: 0.8rem; letter-spacing: 0.28em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
h1, h2 { font-family: var(--font-display); font-weight: 700; letter-spacing: 0.01em; }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.4rem); }
h1 { font-size: clamp(1.9rem, 4vw, 2.7rem); line-height: 1.15; }
.lead { color: var(--muted); max-width: 640px; margin: 14px auto 0; }
.section-head.left .lead { margin-left: 0; }

/* editor / profile code view */
.editor { background: #0a0b0f; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5); max-width: 860px; margin: 0 auto; }
.editor-bar { display: flex; align-items: center; gap: 8px; padding: 10px 14px; background: rgba(255,255,255,0.04); border-bottom: 1px solid var(--border); }
.wdot { width: 11px; height: 11px; border-radius: 50%; display: inline-block; }
.wdot.r { background: #ff5f57; } .wdot.y { background: #febc2e; } .wdot.g { background: #28c840; }
.editor-file { margin-left: 12px; font-family: var(--font-mono); font-size: 0.82rem; color: var(--text); }
.editor-meta { margin-left: auto; font-family: var(--font-mono); font-size: 0.72rem; color: var(--muted); }
.editor-body { margin: 0; padding: 18px 18px 22px 8px; overflow-x: auto; font-family: var(--font-mono);
  font-size: 0.84rem; line-height: 1.55; color: #d6d9e0; }
.editor-body .ln { display: inline-block; width: 38px; margin-right: 14px; text-align: right; color: rgba(255,255,255,0.22); user-select: none; }
.editor-body .k { color: #9cdcfe; }
.editor-body .s { color: #ce9178; }
.editor-body .n { color: #b5cea8; }
.editor-body .b { color: #569cd6; }

/* cards */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px 24px;
  transition: transform 0.25s, border-color 0.25s, background 0.25s; text-decoration: none; color: var(--text); display: block; }
.card:hover { transform: translateY(-4px); border-color: rgba(255,255,255,0.25); background: rgba(255,255,255,0.06); }
.card h3 { font-family: var(--font-display); font-size: 1.08rem; margin-bottom: 8px; }
.card p { color: var(--muted); font-size: 0.95rem; }
.card-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; color: var(--muted); font-size: 0.82rem; margin-bottom: 12px; font-family: var(--font-mono); }

.tag { display: inline-block; font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.06em;
  padding: 2px 8px; border-radius: 999px; border: 1px solid var(--border); color: var(--muted); }

/* teamspeak box */
.join-box { max-width: 640px; margin: 0 auto; background: var(--bg-soft); border: 1px solid var(--border); border-radius: 20px; padding: clamp(28px, 5vw, 44px); text-align: center; }
.ip-row { display: flex; gap: 10px; justify-content: center; align-items: stretch; flex-wrap: wrap; margin-top: 26px; }
.ip { flex: 1 1 260px; max-width: 380px; display: flex; align-items: center; gap: 12px; background: rgba(255,255,255,0.05);
  border: 1px solid var(--border); border-radius: 12px; padding: 14px 18px; font-family: var(--font-mono); font-size: 1rem; letter-spacing: 0.04em; }
.ip span { white-space: nowrap; }
.copy-btn { margin-left: auto; background: transparent; border: 1px solid var(--border); color: var(--muted); border-radius: 8px;
  padding: 6px 12px; font-size: 0.82rem; cursor: pointer; transition: color 0.2s, border-color 0.2s; }
.copy-btn:hover { color: var(--text); border-color: rgba(255,255,255,0.35); }
.steps { margin-top: 28px; text-align: left; color: var(--muted); font-size: 0.95rem; display: grid; gap: 10px; }
.steps li { display: flex; gap: 12px; align-items: baseline; list-style: none; }
.steps .num { flex: 0 0 auto; width: 24px; height: 24px; display: grid; place-items: center; border: 1px solid var(--border);
  border-radius: 50%; font-size: 0.75rem; font-weight: 600; color: var(--text); }

/* contact */
.contact { max-width: 860px; margin: 0 auto; display: grid; grid-template-columns: 1.4fr 1fr; gap: 18px; }
.contact > div { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px 26px; }
.contact-label { font-family: var(--font-display); font-size: 0.75rem; letter-spacing: 0.24em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.contact-mail { cursor: pointer; font-family: var(--font-mono); font-size: clamp(1rem, 2.4vw, 1.35rem); text-decoration: none; border-bottom: 1px solid rgba(255,255,255,0.3); }
.contact-mail:hover { border-bottom-color: #fff; }
.contact-main p { margin-top: 14px; font-size: 0.95rem; }
.contact-channels { display: grid; gap: 18px; align-content: start; }
.channel a { text-decoration: none; border-bottom: 1px solid rgba(255,255,255,0.3); }
.channel a:hover { border-bottom-color: #fff; }

/* blog list */
.post-list { list-style: none; display: grid; gap: 22px; }
.post-list li { border-bottom: 1px solid var(--border); padding-bottom: 22px; }
.post-list a { text-decoration: none; display: flex; gap: 14px; align-items: baseline; flex-wrap: wrap; }
.post-date { font-family: var(--font-mono); font-size: 0.82rem; color: var(--muted); min-width: 90px; }
.post-title { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; }
.post-list a:hover .post-title { text-decoration: underline; }
.post-list p { margin-top: 6px; font-size: 0.95rem; }
.back { color: var(--muted); text-decoration: none; font-size: 0.9rem; }
.back:hover { color: var(--text); }
.post-head { margin: 22px 0 36px; }
.post-head .lead { margin-left: 0; }

/* prose */
.prose { font-size: 1.04rem; }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { font-size: 1.5rem; margin-top: 2em; }
.prose h3 { font-family: var(--font-display); font-size: 1.15rem; margin-top: 1.6em; }
.prose p, .prose li { color: #d6d9e0; }
.prose a { text-decoration: underline; text-underline-offset: 3px; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li + li { margin-top: 0.35em; }
.prose code { background: rgba(255,255,255,0.07); padding: 2px 6px; border-radius: 5px; }
.prose pre { background: #0a0b0f; border: 1px solid var(--border); border-radius: 12px; padding: 16px 18px; overflow-x: auto; }
.prose pre code { background: none; padding: 0; font-size: 0.86rem; }
.prose blockquote { border-left: 2px solid rgba(255,255,255,0.3); padding-left: 16px; color: var(--muted); }
.prose img { max-width: 100%; border-radius: 12px; }
.prose table { border-collapse: collapse; width: 100%; font-size: 0.95rem; }
.prose th, .prose td { border: 1px solid var(--border); padding: 8px 10px; text-align: left; }
.prose hr { border: 0; border-top: 1px solid var(--border); }

footer { border-top: 1px solid var(--border); padding: 28px 0; color: var(--muted); font-size: 0.88rem; }
footer .wrap { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
footer a { color: var(--muted); text-decoration: none; }
footer a:hover { color: var(--text); }

@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(61,220,132,0.45); } 70% { box-shadow: 0 0 0 9px rgba(61,220,132,0); } 100% { box-shadow: 0 0 0 0 rgba(61,220,132,0); } }

@media (max-width: 700px) {
  .contact { grid-template-columns: 1fr; }
  .editor-body { font-size: 0.76rem; }
  .editor-body .ln { width: 28px; margin-right: 10px; }
}
@media (max-width: 560px) {
  .nav-links { gap: 14px; }
  .nav-links a:not(.btn):not([href$="blog/"]) { display: none; }
}
