:root {
  color-scheme: dark;
  --bg: #07080d;
  --panel: rgba(15, 20, 34, .82);
  --line: rgba(255,255,255,.12);
  --text: #f6f8ff;
  --muted: #aeb7c9;
  --cyan: #5be7ff;
  --pink: #ff57cf;
  --lime: #b7ff63;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: radial-gradient(circle at 70% 0%, rgba(91,231,255,.14), transparent 34%), var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
a { color: inherit; text-decoration: none; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 24px;
  width: min(1180px, calc(100% - 32px));
  margin: 18px auto 0;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(6, 8, 14, .76);
  backdrop-filter: blur(18px);
}
.brand { display: flex; align-items: center; gap: 10px; min-width: 170px; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--cyan), var(--pink));
  color: #071018;
  font-weight: 900;
}
.brand strong, .brand small { display: block; }
.brand small, .eyebrow { color: var(--muted); font-size: 11px; letter-spacing: .16em; }
.nav { display: flex; justify-content: center; gap: 22px; flex: 1; font-size: 14px; color: #d9e2f5; }
.nav a:hover, .section-head a:hover { color: var(--cyan); }
.icon-button {
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,.06);
  color: var(--text);
  font-size: 22px;
  cursor: pointer;
}

.hero {
  position: relative;
  min-height: 620px;
  display: grid;
  align-items: center;
  overflow: hidden;
  margin-top: -80px;
  padding: 150px max(24px, calc((100vw - 1180px) / 2)) 80px;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(7,8,13,.94) 0%, rgba(7,8,13,.62) 38%, rgba(7,8,13,.1) 72%),
    linear-gradient(0deg, var(--bg), transparent 24%);
}
.hero-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .92; }
.hero-copy { position: relative; z-index: 1; max-width: 560px; }
h1 { margin: 10px 0; font-size: clamp(58px, 9vw, 124px); line-height: .9; }
h2 { margin: 0; font-size: 30px; }
.lead { max-width: 520px; color: #dce6f7; font-size: 20px; line-height: 1.8; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,.07);
}
.button.primary { background: linear-gradient(135deg, rgba(91,231,255,.28), rgba(255,87,207,.26)); }

.section-strip {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  width: min(1180px, calc(100% - 32px));
  margin: -34px auto 28px;
  position: relative;
  z-index: 2;
}
.section-strip span, .tag {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,.06);
  padding: 10px 14px;
  color: #dce6f7;
}
.content-section { width: min(1180px, calc(100% - 32px)); margin: 0 auto 46px; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.muted { color: var(--muted); }
.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.featured-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card {
  min-height: 360px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
  overflow: hidden;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(145deg, rgba(22, 30, 50, .96), rgba(11, 14, 24, .96));
  box-shadow: 0 16px 50px rgba(0,0,0,.24);
}
.card:hover { border-color: rgba(91,231,255,.45); transform: translateY(-2px); transition: .2s ease; }
.card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-bottom: 1px solid var(--line);
}
.card > div { padding: 0 18px; }
.card > div:last-child { padding-bottom: 18px; }
.card h3 { margin: 10px 0 8px; font-size: 20px; line-height: 1.35; }
.card p { margin: 0; color: #c6d0e2; line-height: 1.7; }
.badge { color: var(--lime); font-size: 12px; }
.meta { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 13px; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; }
.tag { cursor: pointer; font: inherit; }
.tag.active { color: #071018; background: var(--cyan); }

.search-dialog {
  width: min(720px, calc(100% - 30px));
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0b0f19;
  color: var(--text);
}
.search-dialog::backdrop { background: rgba(0,0,0,.68); }
.search-box { display: flex; gap: 10px; margin-bottom: 16px; }
.search-box input {
  flex: 1;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,.06);
  color: var(--text);
  padding: 0 14px;
  font-size: 16px;
}
.search-results { display: grid; gap: 10px; max-height: 55vh; overflow: auto; }
.result { display: block; padding: 12px; border: 1px solid var(--line); border-radius: 8px; }
.post {
  width: min(980px, calc(100% - 32px));
  margin: 48px auto 70px;
}
.post-hero {
  margin: 24px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--panel);
}
.post-hero img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.post-body {
  width: min(760px, 100%);
  margin: 0 auto;
}
.post-body h1 { font-size: clamp(38px, 7vw, 76px); line-height: 1; }
.post-body p:not(.lead):not(.eyebrow) {
  color: #d4dbea;
  font-size: 18px;
  line-height: 2;
}
.footer { display: flex; gap: 12px; justify-content: center; color: var(--muted); padding: 36px 20px; border-top: 1px solid var(--line); }

@media (max-width: 860px) {
  .site-header { align-items: stretch; flex-wrap: wrap; margin-top: 10px; }
  .nav { order: 3; width: 100%; justify-content: flex-start; overflow-x: auto; padding-bottom: 4px; }
  .hero { min-height: 560px; padding-top: 150px; }
  .hero::after { background: linear-gradient(90deg, rgba(7,8,13,.96), rgba(7,8,13,.55)), linear-gradient(0deg, var(--bg), transparent 24%); }
  .featured-grid, .card-grid { grid-template-columns: 1fr; }
  .section-head { align-items: flex-start; flex-direction: column; }
  .footer { flex-direction: column; align-items: center; }
}
