/* ==========================================================
   InfiniteBlogs — shared styles (every page loads this)
   Colors, fonts, the top bar, footer and buttons live here.
   Change a color once in :root and it updates everywhere.
   ========================================================== */

:root {
  /* surfaces */
  --bg: #050608;
  --panel: #0c0e14;
  --panel-2: #151923;
  --line: #1a1e29;
  --line-strong: #2a3040;

  /* text */
  --text: #f3f4f8;
  --text-body: #d7dae4;
  --text-soft: #a3aabd;
  --text-muted: #8d94a8;

  /* accents */
  --accent: #ff7a3d;        /* orange: active tab, labels, highlights */
  --blue: #1f6fd6;          /* primary buttons */
  --blue-hover: #2a82ea;
  --discord: #5865f2;
  --discord-hover: #6c77f5;

  /* type */
  --font-head: "Sora", system-ui, sans-serif;
  --font-body: "Plus Jakarta Sans", system-ui, sans-serif;

  /* layout */
  --page-width: 1320px;
  --gutter: 60px;
  --radius-btn: 10px;
  --radius-card: 14px;
  --galaxy-opacity: 0.25;   /* strength of the galaxy image at the top */
  --header-h: 76px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* hide scrollbars everywhere (scrolling still works) */
html, * { scrollbar-width: none; }
::-webkit-scrollbar { display: none; }

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3 { font-family: var(--font-head); font-weight: 600; color: #fff; margin: 0; }

.container {
  width: min(var(--page-width), 100% - var(--gutter) * 2);
  margin-inline: auto;
}

/* ---------- galaxy at the top of every page ---------- */
.galaxy {
  position: absolute;
  inset: 0 0 auto 0;
  height: 640px;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}
.galaxy img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: var(--galaxy-opacity);
}
.galaxy::after {
  content: "";
  position: absolute;
  inset: 380px 0 0 0;
  background: linear-gradient(to bottom, rgba(5, 6, 8, 0), var(--bg));
}

/* ---------- top bar ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--header-h);
  background: rgba(5, 6, 8, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: flex;
  align-items: center;
  padding-inline: var(--gutter);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.brand { display: flex; align-items: center; gap: 12px; transition: opacity 0.2s ease; }
.brand:hover { opacity: 0.85; }
.brand img { width: 40px; height: 40px; border-radius: 9px; object-fit: cover; }
.brand span {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 22px;
  letter-spacing: -0.3px;
  color: #fff;
}

/* ---------- footer ---------- */
.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--line);
  padding: 28px var(--gutter) 34px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
  color: var(--text-muted);
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 52px;
  padding: 0 26px;
  border: 0;
  border-radius: var(--radius-btn);
  font-weight: 700;
  font-size: 16px;
  color: #fff;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s var(--ease), box-shadow 0.2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(1px) scale(0.98); }
.btn svg, .btn img { flex-shrink: 0; }
.btn-primary { background: var(--blue); }
.btn-primary:hover { background: var(--blue-hover); box-shadow: 0 8px 24px rgba(31, 111, 214, 0.35); }
.btn-outline { background: var(--panel); border: 1px solid var(--line-strong); }
.btn-outline:hover { background: var(--panel-2); border-color: #3a4254; }
.btn-ghost { background: transparent; border: 1px solid var(--line-strong); }
.btn-ghost:hover { background: #10131b; }
.btn-discord { background: var(--discord); }
.btn-discord:hover { background: var(--discord-hover); box-shadow: 0 8px 24px rgba(88, 101, 242, 0.35); }

/* small grey text link with an arrow, e.g. "All updates" */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  font-weight: 600;
  font-size: 15px;
  color: var(--text-muted);
}
.back-link { transition: color 0.2s ease; }
.back-link svg { transition: transform 0.2s var(--ease); }
.back-link:hover { color: #fff; }
.back-link:hover svg { transform: translateX(-3px); }

/* ---------- entrance animation ----------
   add class="reveal" to anything that should fade up on load;
   style="--d: 2" delays it a little (each step = 60ms) */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.reveal { animation: fade-up 0.6s var(--ease) backwards; animation-delay: calc(var(--d, 0) * 60ms); }
.galaxy { animation: fade-in 1.2s ease both; }

/* date · reading time */
.meta { font-size: 14px; color: var(--text-muted); }

[hidden] { display: none !important; }

/* "Link copied" style message */
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 100;
  padding: 12px 18px;
  border-radius: var(--radius-btn);
  background: #fff;
  color: #0a0c12;
  font-weight: 700;
  font-size: 15px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition: opacity 0.25s ease, transform 0.3s var(--ease);
}
.toast.is-shown { opacity: 1; transform: translate(-50%, 0); }

/* ---------- phones ---------- */
@media (max-width: 720px) {
  :root { --gutter: 16px; }
  :root { --header-h: 60px; }
  .brand img { width: 34px; height: 34px; border-radius: 8px; }
  .brand span { font-size: 19px; }
  .galaxy { height: 420px; }
  .galaxy img { object-position: 12% center; }
  .galaxy::after { inset: 240px 0 0 0; }
  .site-footer { padding: 22px var(--gutter) 30px; font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
