﻿:root {
  --bg: #090b11;
  --bg-soft: #111723;
  --line: #243043;
  --text: #f2f6ff;
  --muted: #9fb0c8;
  --accent-a: #00e0b8;
  --accent-b: #7ad7ff;
  --accent-c: #ffb864;
  --shadow: 0 24px 42px rgba(2, 8, 18, 0.45);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--text);
  font-family: "Outfit", "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 10% 10%, rgba(122, 215, 255, 0.16), transparent 38%),
    radial-gradient(circle at 90% 80%, rgba(0, 224, 184, 0.14), transparent 40%),
    linear-gradient(165deg, #0b0f18 0%, #080b12 48%, #070a10 100%);
  line-height: 1.65;
  overflow-x: hidden;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 14px 5.5vw;
  border-bottom: 1px solid #2430438f;
  background: rgba(8, 12, 20, 0.76);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-size: 1.1rem;
  font-weight: 700;
}

.brand img {
  width: 34px;
  height: 34px;
  object-fit: cover;
  border-radius: 10px;
}

.main-nav {
  justify-self: center;
  display: flex;
  gap: 18px;
}

.main-nav a {
  color: #d9e3f4;
  text-decoration: none;
  font-size: 0.93rem;
  font-weight: 600;
  position: relative;
}

.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-a), var(--accent-b));
  transition: width .26s ease;
}

.main-nav a:hover::after,
.main-nav a.active::after { width: 100%; }

.menu-toggle {
  display: none;
  justify-self: end;
  border: 1px solid #cde8ff4a;
  background: rgba(21, 29, 42, 0.82);
  color: #eaf5ff;
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: 600;
}

main { padding: 0 5.5vw 56px; }

.blog-hero {
  padding: 72px 0 28px;
}

.hero-kicker {
  margin: 0 0 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-size: 0.78rem;
  color: #95abc7;
}

h1, h2, h3 {
  margin: 0;
  line-height: 1.2;
  font-family: "Outfit", "Segoe UI", sans-serif;
}

h1 {
  font-size: clamp(2.1rem, 4.8vw, 4.3rem);
  font-weight: 800;
  max-width: 980px;
}

.hero-lead {
  max-width: 760px;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.blog-wrap { padding: 8px 0 0; }

.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.blog-card {
  border: 1px solid #304766;
  border-radius: 24px;
  background: linear-gradient(160deg, rgba(20, 33, 48, 0.92), rgba(11, 20, 31, 0.9));
  box-shadow: var(--shadow);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: transform .28s ease, border-color .28s ease;
}

.blog-card:hover {
  transform: translateY(-4px);
  border-color: #7ad7ff8e;
}

.blog-meta {
  font-size: 0.75rem;
  color: #95abc7;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.blog-title {
  font-size: 1.08rem;
  color: #f3fbff;
}

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

.read-btn {
  margin-top: auto;
  border: 1px solid #84d9ff66;
  background: rgba(18, 30, 45, 0.58);
  color: #d8ebff;
  border-radius: 999px;
  padding: 8px 12px;
  font-weight: 700;
  width: fit-content;
}

.pagination-wrap {
  margin-top: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.pager,
.page-btn {
  border: 1px solid #304766;
  background: rgba(18, 30, 45, 0.7);
  color: #e5f3ff;
  border-radius: 999px;
  padding: 8px 12px;
  font-weight: 700;
}

.page-btn.active {
  background: linear-gradient(100deg, var(--accent-a), var(--accent-b));
  color: #07211d;
  border-color: transparent;
}

.pager:disabled {
  opacity: .45;
}

.post-modal {
  position: fixed;
  inset: 0;
  background: rgba(3, 8, 16, 0.76);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 20px;
}

.post-modal.open {
  display: flex;
}

.modal-card {
  width: min(900px, 100%);
  max-height: 86vh;
  overflow: auto;
  border: 1px solid #304766;
  border-radius: 26px;
  background: linear-gradient(170deg, rgba(18, 28, 42, 0.97), rgba(12, 20, 31, 0.95));
  box-shadow: var(--shadow);
  padding: 24px;
}

.close-modal {
  border: 1px solid #84d9ff66;
  background: rgba(18, 30, 45, 0.58);
  color: #d8ebff;
  border-radius: 999px;
  padding: 8px 12px;
  font-weight: 700;
  float: right;
}

.modal-meta {
  margin-top: 6px;
  color: #95abc7;
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.modal-content p {
  color: var(--muted);
}

.site-footer {
  padding: 22px 5.5vw 30px;
  color: #9fb0c8;
  text-align: center;
}

.reveal {
  opacity: 0;
  transform: translateY(20px);
  filter: blur(4px);
  transition: opacity .7s ease, transform .7s ease, filter .7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}

@media (max-width: 1080px) {
  .blog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
  .site-header { grid-template-columns: auto auto; }
  .menu-toggle { display: inline-flex; }

  .main-nav {
    grid-column: 1 / -1;
    justify-self: stretch;
    display: none;
    flex-direction: column;
    gap: 10px;
    padding: 14px;
    border: 1px solid #304766;
    border-radius: 18px;
    background: rgba(12, 20, 31, 0.95);
  }

  .main-nav.open { display: flex; }

  .blog-grid { grid-template-columns: 1fr; }
}
