/* ── Layer 8 — mesh gradient theme ── */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bubble-bg: rgba(255, 255, 255, 0.65);
  --bubble-text: #0a0a0a;
  --bubble-text-secondary: #555;
  --bubble-text-muted: #888;
  --bubble-border: #f0f0f0;
  --accent: #3b82f6;
  --nav-text: rgba(255, 255, 255, 0.85);
  --nav-text-active: #fff;
  --hero-text: #fff;
  --hero-sub: rgba(255, 255, 255, 0.75);
  --footer-text: rgba(255, 255, 255, 0.8);
  --green: #22c55e;
  --amber: #f59e0b;
  --red: #ef4444;
}

[data-theme="dark"] {
  --bubble-bg: rgba(15, 20, 35, 0.68);
  --bubble-text: #ffffff;
  --bubble-text-secondary: rgba(255, 255, 255, 0.85);
  --bubble-text-muted: rgba(255, 255, 255, 0.5);
  --bubble-border: rgba(255, 255, 255, 0.1);
  --accent: #60a5fa;
  --footer-text: rgba(255, 255, 255, 0.7);
}

html, body {
  min-height: 100%;
  overflow-x: hidden;
  width: 100%;
}

body {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  color: var(--bubble-text);
  position: relative;
  min-height: 100vh;
  padding-top: 76px;
  /* Fallback background — shows briefly while the WebGL shader loads,
     then sits behind it (shader canvas is position:fixed, z-index -2,
     created dynamically by shader-background.js) */
  background:
    radial-gradient(circle at 15% 15%, #1e3a8a 0%, transparent 40%),
    radial-gradient(circle at 82% 12%, #3b82f6 0%, transparent 45%),
    radial-gradient(circle at 90% 80%, #93c5fd 0%, transparent 40%),
    radial-gradient(circle at 15% 85%, #60a5fa 0%, transparent 45%),
    radial-gradient(circle at 55% 45%, #1d4ed8 0%, transparent 50%),
    linear-gradient(135deg, #0f1c3f 0%, #1e3a8a 100%);
  background-attachment: fixed;
}

.page-wrapper { max-width: 1100px; margin: 0 auto; }

/* ── Nav ── */
.nav-wrap { position: fixed; top: 0; left: 0; right: 0; z-index: 100; background: rgba(12, 18, 38, 0.35); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); border-bottom: 1px solid rgba(255,255,255,0.1); }
nav { display: flex; justify-content: space-between; align-items: center; padding: 1.25rem 2.75rem; max-width: 1100px; margin: 0 auto; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.logo-text { font-size: 18.5px; font-weight: 700; color: var(--hero-text); }
.logo-text span { color: #bfdbfe; }
.nav-right { display: flex; align-items: center; gap: 1.75rem; }
nav ul { display: flex; gap: 0.35rem; list-style: none; }
nav ul li a { position: relative; font-size: 16px; text-decoration: none; font-weight: 500; color: var(--nav-text); padding: 8px 16px; border-radius: 20px; display: inline-block; transition: all 0.25s ease; }
nav ul li a:hover { background: rgba(59, 130, 246, 0.25); color: #fff; }
nav ul li.active a { background: #3b82f6; color: #fff; font-weight: 600; }
nav ul li.active a:hover { background: #4a8bf5; }

/* Theme toggle */
.theme-toggle { width: 48px; height: 26px; background: rgba(255,255,255,0.2); border-radius: 20px; display: flex; align-items: center; padding: 2px; cursor: pointer; border: none; flex-shrink: 0; }
[data-theme="dark"] .theme-toggle { justify-content: flex-end; }
.theme-toggle-knob { width: 20px; height: 20px; background: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 13px; transition: transform 0.15s; }

.hamburger { display: none; width: 22px; flex-direction: column; gap: 4px; background: none; border: none; cursor: pointer; }
.hamburger div { height: 2px; background: var(--hero-text); border-radius: 2px; }
.mobile-menu { display: none; }

/* ── Hero ── */
.hero { text-align: center; padding: 2.5rem 2.75rem 2rem; max-width: 1100px; margin: 0 auto; }
h1 { font-size: 44px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.05; color: var(--hero-text); max-width: 620px; margin: 0 auto; text-shadow: 0 2px 20px rgba(0,0,0,0.3); }
h1 .title-line { display: block; }
.hero-stack { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem; margin-top: 1.25rem; }
.byline { font-size: 21.5px; color: rgba(255,255,255,0.95); margin-top: 1.1rem; font-weight: 700; }

.learn-more-link { display: inline-block; font-size: 15px; color: #bfdbfe; font-weight: 700; text-decoration: none; margin-top: 0.75rem; }
.learn-more-link:hover { text-decoration: underline; color: #fff; }

/* ── Bubbles ── */
.bubble { background: var(--bubble-bg); backdrop-filter: blur(22px); border-radius: 16px; box-shadow: 0 16px 45px rgba(0,0,0,0.3); color: var(--bubble-text); }

/* Status bubble */
.status-bubble { max-width: 1100px; margin: 0 auto; padding: 0 2.75rem 0.9rem; }
.status-head { display: flex; justify-content: space-between; align-items: center; padding: 0.85rem 1.4rem; }
.clock-time { font-size: 19.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
.clock-date { font-size: 12px; color: var(--bubble-text-muted); }
.status-services { display: flex; flex-wrap: wrap; gap: 0.4rem 1.2rem; padding: 0 1.4rem 0.85rem; }
.svc { display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 500; text-decoration: none; color: var(--bubble-text-secondary); padding: 3px 6px; border-radius: 6px; }
.svc:hover { background: rgba(0,0,0,0.04); }
[data-theme="dark"] .svc:hover { background: rgba(255,255,255,0.06); }
.svc-dot { width: 5px; height: 5px; border-radius: 50%; flex-shrink: 0; }
.svc-dot.op { background: var(--green); }
.svc-dot.dg { background: var(--amber); }
.svc-label { font-size: 12px; font-weight: 600; color: var(--amber); }
.status-summary { padding: 0 1.4rem 0.85rem; display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--green); font-weight: 600; }
.status-degraded { padding: 0 1.4rem 0.85rem; display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--amber); font-weight: 600; }

/* News/updates row */
.feed-row { max-width: 1100px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: 0.9rem; padding: 0 2.75rem 0.9rem; }
.feed-col-head { display: flex; justify-content: space-between; align-items: center; padding: 0.75rem 1.3rem; border-bottom: 1px solid var(--bubble-border); }
.feed-col-title { font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--bubble-text-muted); }
.feed-count { font-size: 12px; color: var(--bubble-text-muted); background: rgba(0,0,0,0.05); padding: 2px 8px; border-radius: 10px; }
[data-theme="dark"] .feed-count { background: rgba(255,255,255,0.08); }
.feed-item { padding: 0.6rem 1.3rem; border-bottom: 1px solid var(--bubble-border); }
.feed-item:last-child { border-bottom: none; }
.feed-source { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--accent); margin-bottom: 2px; }
.feed-title { font-size: 14px; line-height: 1.4; color: var(--bubble-text-secondary); }
.feed-title a { color: inherit; text-decoration: none; }
.feed-title a:hover { color: var(--accent); }
.feed-viewmore { font-size: 12px; color: var(--accent); font-weight: 700; text-decoration: none; }

/* ── Projects section ── */
.projects-section { max-width: 1100px; margin: 0 auto; padding: 0.5rem 2.75rem 2.5rem; }
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.section-label { font-size: 12.5px; font-weight: 700; color: var(--hero-sub); text-transform: uppercase; letter-spacing: 0.06em; }
.view-all { font-size: 13.5px; color: #bfdbfe; font-weight: 700; text-decoration: none; }

.proj-list { display: flex; flex-direction: column; gap: 0.9rem; }
.proj-bubble { padding: 1.2rem 1.4rem; cursor: pointer; }
.proj-icon { width: 34px; height: 34px; border-radius: 10px; background: rgba(59,130,246,0.15); display: flex; align-items: center; justify-content: center; font-size: 17.5px; margin-bottom: 0.6rem; }
.proj-meta-row { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.35rem; }
.proj-tag { font-size: 12.5px; color: var(--accent); background: rgba(59,130,246,0.12); padding: 2px 9px; border-radius: 20px; font-weight: 600; }
.proj-date { font-size: 13px; color: var(--bubble-text-muted); }
.proj-bubble h3 { font-size: 17.5px; font-weight: 700; margin-bottom: 0.3rem; }
.proj-bubble p { font-size: 14px; color: var(--bubble-text-secondary); }

.page-intro { max-width: 1100px; margin: 0 auto; padding: 0 2.75rem 1.5rem; color: var(--hero-sub); font-size: 15.5px; max-width: 500px; }

/* ── About page ── */
.stats-row { max-width: 1100px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0.9rem; padding: 0 2.75rem 1.25rem; }
.stat-bubble { padding: 1.1rem 1.25rem; }
.stat-label { font-size: 12px; font-weight: 700; color: var(--bubble-text-muted); text-transform: uppercase; margin-bottom: 0.4rem; }
.stat-value { font-size: 24.5px; font-weight: 800; }

.terminal-wrap { max-width: 1100px; margin: 0 auto; padding: 0 2.75rem 1.5rem; }
.terminal { background: #0a0c10; border-radius: 16px; overflow: hidden; box-shadow: 0 16px 45px rgba(0,0,0,0.3); }
.terminal-bar { background: #1a1d26; padding: 0.6rem 1rem; display: flex; align-items: center; gap: 0.5rem; }
.t-dot { width: 10px; height: 10px; border-radius: 50%; }
.terminal-title { font-size: 13px; color: #7e8ea8; margin: 0 auto; }
.terminal-body { padding: 1rem 1.4rem; min-height: 300px; max-height: 420px; overflow-y: auto; font-family: 'JetBrains Mono', monospace; font-size: 14.5px; color: #9ba1ac; line-height: 1.7; }
.t-line { margin-bottom: 1px; }
.t-prompt { color: #7ba3ff; }
.t-input-row { display: flex; align-items: center; gap: 0.5rem; padding: 0 1.4rem 1rem; }
.t-input { background: transparent; border: none; outline: none; color: #f2ede4; font-family: 'JetBrains Mono', monospace; font-size: 14.5px; flex: 1; }

.stack-row { max-width: 1100px; margin: 0 auto; display: flex; flex-wrap: wrap; gap: 0.5rem; padding: 0 2.75rem 1.5rem; }
.stack-tag { font-size: 13px; color: #1e3a8a; background: rgba(255,255,255,0.92); backdrop-filter: blur(8px); padding: 4px 12px; border-radius: 20px; font-weight: 700; box-shadow: 0 2px 10px rgba(0,0,0,0.15); }

.contact-block { max-width: 1100px; margin: 0 auto; padding: 0 2.75rem 2rem; display: flex; flex-direction: column; gap: 0.75rem; }
.contact-link { display: flex; align-items: center; gap: 0.75rem; font-size: 15px; text-decoration: none; padding: 0.75rem 1rem; border-radius: 10px; max-width: 300px; }
.contact-link.bubble:hover { transform: translateY(-1px); }

/* ── Security page ── */
.sec-stats { max-width: 1100px; margin: 0 auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.9rem; padding: 0 2.75rem 1.25rem; }
.sec-stats-4col { grid-template-columns: repeat(4, 1fr); }
.month-selector-row { max-width: 1100px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; padding: 0 2.75rem 1.25rem; flex-wrap: wrap; gap: 0.75rem; }
.month-selector { display: flex; align-items: center; gap: 0.5rem; background: var(--bubble-bg); backdrop-filter: blur(22px); border-radius: 10px; padding: 0.5rem 0.75rem; box-shadow: 0 8px 24px rgba(0,0,0,0.25); }
.month-selector select { background: transparent; border: none; font-family: 'Inter', sans-serif; font-size: 15px; font-weight: 600; color: var(--bubble-text); cursor: pointer; outline: none; }
.month-nav-btn { background: transparent; border: none; color: var(--bubble-text-muted); cursor: pointer; font-size: 16px; padding: 2px 6px; border-radius: 4px; }
.live-badge { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--green); font-weight: 600; background: rgba(34,197,94,0.15); padding: 4px 10px; border-radius: 20px; }

.filter-row { max-width: 1100px; margin: 0 auto; display: flex; gap: 0.5rem; padding: 0 2.75rem 1rem; flex-wrap: wrap; }
.filter-chip { font-size: 13.5px; font-weight: 600; padding: 6px 14px; border-radius: 20px; background: var(--bubble-bg); backdrop-filter: blur(10px); color: var(--bubble-text-secondary); cursor: pointer; box-shadow: 0 4px 15px rgba(0,0,0,0.2); }
.filter-chip.active { background: var(--accent); color: #fff; }

.attack-list { max-width: 1100px; margin: 0 auto; padding: 0 2.75rem 1.5rem; display: flex; flex-direction: column; gap: 0.6rem; }
.attack-bubble { padding: 0.85rem 1.1rem; cursor: pointer; }
.attack-head { display: flex; align-items: center; gap: 0.85rem; }
.sev-bar { width: 3px; height: 28px; border-radius: 2px; flex-shrink: 0; }
.sev-major { background: var(--red); } .sev-minor { background: var(--amber); } .sev-other { background: var(--bubble-text-muted); }
.attack-main { flex: 1; min-width: 0; }
.attack-top-row { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.attack-ip { font-family: 'JetBrains Mono', monospace; font-size: 15px; color: var(--accent); font-weight: 700; }
.attack-time { font-size: 12.5px; color: var(--bubble-text-muted); }
.attack-sig { font-size: 14px; color: var(--bubble-text-secondary); margin-top: 2px; word-break: break-word; overflow-wrap: break-word; }
.tag-pill { font-size: 11.5px; font-weight: 700; padding: 2px 8px; border-radius: 10px; white-space: nowrap; }
.tag-cins { color: #b8790a; background: rgba(184,121,10,0.15); }
.tag-dshield { color: var(--accent); background: rgba(59,130,246,0.12); }
.attack-detail { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; }
.attack-bubble.open .attack-detail { max-height: 200px; margin-top: 0.75rem; }
.detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 0.65rem; padding-top: 0.75rem; border-top: 1px solid var(--bubble-border); }
.detail-label { font-size: 11.5px; color: var(--bubble-text-muted); text-transform: uppercase; margin-bottom: 2px; }
.detail-value { font-size: 14px; font-family: 'JetBrains Mono', monospace; color: var(--bubble-text); }

.pagination { max-width: 1100px; margin: 0 auto; display: flex; align-items: center; justify-content: center; gap: 0.5rem; padding: 0 2.75rem 1.5rem; flex-wrap: wrap; }
.page-btn { font-size: 14px; background: var(--bubble-bg); color: var(--bubble-text-secondary); border: none; padding: 6px 12px; border-radius: 6px; cursor: pointer; }
.page-btn.active { background: var(--accent); color: #fff; }
.page-btn:disabled { opacity: 0.3; cursor: not-allowed; }

/* ── Full post read ── */
.back-link { max-width: 1100px; margin: 0 auto; padding: 0 2.75rem; margin-bottom: 0.75rem; }
.back-link a { color: rgba(255,255,255,0.75); font-size: 15px; font-weight: 600; text-decoration: none; }
.post-tag { display: inline-block; font-size: 12.5px; font-weight: 700; color: #fff; background: rgba(255,255,255,0.15); backdrop-filter: blur(10px); padding: 5px 12px; border-radius: 20px; }
.post-tag-wrap { max-width: 1100px; margin: 0 auto 0.85rem; padding: 0 2.75rem; text-align: center; }
.post-title { font-size: 33px; font-weight: 800; color: #fff; letter-spacing: -0.02em; line-height: 1.15; max-width: 680px; margin: 0 auto; text-shadow: 0 2px 20px rgba(0,0,0,0.3); }
.post-title-wrap { max-width: 1100px; margin: 0 auto; padding: 0 2.75rem; text-align: center; }
.post-meta { font-size: 14.5px; color: rgba(255,255,255,0.7); padding: 0.75rem 2.75rem 1.5rem; max-width: 1100px; margin: 0 auto; text-align: center; }
.post-body-wrap { max-width: 1100px; margin: 0 auto; padding: 0 2.75rem 2.5rem; display: flex; justify-content: center; }
.post-bubble { padding: 2.25rem 2.5rem; max-width: 720px; width: 100%; }
.post-bubble h2 { font-size: 21.5px; font-weight: 700; margin: 1.75rem 0 0.85rem; }
.post-bubble h2:first-child { margin-top: 0; }
.post-bubble p { font-size: 17px; line-height: 1.75; color: var(--bubble-text-secondary); margin-bottom: 1.1rem; }
.post-bubble ul, .post-bubble ol { margin: 0 0 1.1rem 1.25rem; color: var(--bubble-text-secondary); font-size: 17px; line-height: 1.75; }
.post-bubble code:not(pre code) { background: rgba(59,130,246,0.1); color: var(--accent); padding: 2px 6px; border-radius: 4px; font-family: 'JetBrains Mono', monospace; font-size: 15px; }
.post-bubble table { width: 100%; border-collapse: collapse; margin-bottom: 1.25rem; font-size: 15px; table-layout: fixed; word-break: break-word; }
.post-bubble th, .post-bubble td { text-align: left; padding: 0.5rem 0.75rem; border-bottom: 1px solid var(--bubble-border); }
.post-bubble th { font-weight: 700; color: var(--bubble-text-muted); font-size: 13px; text-transform: uppercase; }
.post-bubble pre { background: #0d1117; border-radius: 10px; padding: 1rem 1.25rem; margin: 0 0 1.25rem; overflow-x: auto; }
.post-bubble pre code { font-family: 'JetBrains Mono', monospace; font-size: 14.5px; color: #c9d1d9; line-height: 1.6; }
.post-footer-row { max-width: 720px; padding-top: 1.5rem; margin-top: 1rem; border-top: 1px solid var(--bubble-border); display: flex; flex-wrap: wrap; gap: 0.5rem; }
.post-tag-plain { font-size: 13px; color: var(--bubble-text-muted); border: 1px solid var(--bubble-border); padding: 2px 10px; border-radius: 20px; }

/* ── Footer ── */
footer { max-width: 1100px; margin: 0 auto; padding: 1.5rem 2.75rem; display: flex; justify-content: space-between; align-items: center; border-top: 1px solid rgba(255,255,255,0.15); color: var(--footer-text); }
.footer-status { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.footer-dot { width: 6px; height: 6px; background: #4ade80; border-radius: 50%; animation: blink 2.5s ease-in-out infinite; }
footer p { font-size: 14px; }
@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: 0.3; } }

/* ── Responsive ── */
@media (max-width: 800px) {
  body { padding-top: 66px; }
  nav { padding: 1rem 1.25rem; }
  nav ul { display: none; }
  .hamburger { display: flex; }
  .mobile-menu.open { display: flex; flex-direction: column; gap: 0.5rem; padding: 0 2.75rem 1rem; max-width: 1100px; margin: 0 auto; background: rgba(12, 18, 38, 0.35); backdrop-filter: blur(24px); }
  .mobile-menu.open a { color: var(--hero-text); text-decoration: none; font-size: 17.5px; font-weight: 600; padding: 0.6rem 0; }

  .hero, .status-bubble, .feed-row, .projects-section, .page-intro, .stats-row, .terminal-wrap, .stack-row, .contact-block, .sec-stats, .month-selector-row, .filter-row, .attack-list, .pagination, .back-link, .post-tag-wrap, .post-title-wrap, .post-meta, .post-body-wrap, footer {
    padding-left: 1.25rem; padding-right: 1.25rem;
  }
  h1 { font-size: 30px; }
  .feed-row { grid-template-columns: 1fr; }
  .status-services-full { display: none; }
  .stats-row, .sec-stats { grid-template-columns: 1fr 1fr; }
  .post-bubble { padding: 1.5rem 1.5rem; }
}
