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

/* ─── Design Tokens ─────────────────────────────────────── */
:root {
  --bg:         #0b0f14;
  --surface:    #0f1620;
  --text:       #c0c9d6;
  --muted:      #97a6b8;
  --cyan:       #3fe4e4;
  --magenta:    #ff2ee8;
  --purple:     #7a5cff;
  --border:     rgba(63, 228, 228, 0.14);
  --radius:     0.625rem;

  --font-sans:    'Inter', ui-sans-serif, system-ui, sans-serif;
  --font-heading: 'Orbitron', sans-serif;
  --font-subhead: 'Exo 2', 'Inter', sans-serif;
}

/* ─── Reset & Base ───────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-weight: 400;
  line-height: 1.7;
  letter-spacing: 0.01em;
  min-height: 100vh;
  cursor: url('/images/cursor.png') 0 0, auto;
}

h1, h2 {
  font-family: var(--font-heading);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  line-height: 1.05;
  color: var(--text);
}

h3, h4 {
  font-family: var(--font-subhead);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text);
}

p { margin-bottom: 1rem; }

a {
  font-family: var(--font-sans);
  font-weight: 600;
  color: var(--cyan);
  text-decoration: none;
  transition: color 0.2s ease, text-shadow 0.2s ease;
  cursor: url('/images/pointer.png') 8 0, auto;
}

a:hover {
  color: var(--magenta);
  text-shadow: 0 0 12px rgba(63, 228, 228, 0.5);
}

button {
  cursor: url('/images/pointer.png') 8 0, auto;
}

img { max-width: 100%; display: block; }

ul, ol { list-style: none; }

blockquote {
  margin-block: 1.75rem;
  padding: 1.5rem 1.75rem;
  border-left: 3px solid var(--magenta);
  background-color: rgba(10, 212, 212, 0.05);
  border-radius: 0.75rem;
  color: var(--text);
  box-shadow: inset 0 0 0 1px rgba(63, 228, 228, 0.08), 0 0 20px rgba(255, 46, 232, 0.04);
}

/* ─── Effects ────────────────────────────────────────────── */
.heading-gradient {
  background-image: linear-gradient(120deg, var(--cyan), var(--magenta), var(--purple));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: none;
}

.glitch-text {
  position: relative;
  display: inline-block;
  color: var(--cyan);
  font-size: var(--glitch-font-size, 80px);
  font-family: var(--font-heading);
  text-transform: uppercase;
  letter-spacing: 0.22em;
  text-shadow: 0 0 12px rgba(63, 228, 228, 0.85), 0 0 24px rgba(255, 46, 232, 0.6);
  line-height: 1;
}

.glitch-text::before {
  content: attr(data-text);
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  animation: glitch 2s infinite;
  clip-path: polygon(0 0, 100% 0, 100% 45%, 0 45%);
  transform: translate(-0.03em, -0.03em);
  color: var(--magenta);
  opacity: 0.8;
  text-shadow: 0 0 8px rgba(63, 228, 228, 0.6), 0 0 16px rgba(255, 46, 232, 0.6);
  pointer-events: none;
}

.scanline-overlay {
  position: relative;
  isolation: isolate;
}

.scanline-overlay::before {
  content: '';
  position: fixed;
  inset: 0;
  height: 200%;
  pointer-events: none;
  z-index: 999;
  background:
    linear-gradient(rgba(18,16,16,0) 70%, rgba(0,0,0,0.2) 70%),
    linear-gradient(90deg, rgba(255,0,0,0.04), rgba(0,255,0,0.02), rgba(0,0,255,0.04));
  background-size: 100% 5px, 3px 100%;
  animation: scanlines 60s linear infinite;
  will-change: transform;
}

.scanline-overlay::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 998;
  background-image: repeating-linear-gradient(
    to bottom,
    rgba(255,255,255,0.12) 0,
    rgba(255,255,255,0.12) 1px,
    rgba(0,0,0,0.12) 1px,
    rgba(0,0,0,0.12) 2px,
    transparent 2px,
    transparent 6px
  );
  opacity: 0.32;
  mix-blend-mode: overlay;
  animation: scanline-drift 7s linear infinite;
  will-change: transform;
}

/* ─── Keyframes ──────────────────────────────────────────── */
@keyframes glitch {
  0%, 100% { clip-path: polygon(0 0, 100% 0, 100% 45%, 0 45%); transform: translate(0); }
  33%       { clip-path: polygon(0 0, 100% 0, 100% 15%, 0 15%); transform: translate(-0.05em, -0.05em); }
  66%       { clip-path: polygon(0 85%, 100% 85%, 100% 100%, 0 100%); transform: translate(0.05em, 0.05em); }
}

@keyframes scanlines {
  0%   { transform: translateY(0%); }
  100% { transform: translateY(-50%); }
}

@keyframes scanline-drift {
  0%   { transform: translateY(0); }
  40%  { transform: translateY(6px); }
  65%  { transform: translateY(2px); }
  100% { transform: translateY(0); }
}

/* ─── Layout Utilities ───────────────────────────────────── */
.container { width: 100%; max-width: 80rem; margin-inline: auto; padding-inline: 1.5rem; }
.container--narrow { max-width: 64rem; }
.container--article { max-width: 56rem; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-6 { gap: 1.5rem; }
.flex-1 { flex: 1; }
.min-h-screen { min-height: 100vh; }
.w-full { width: 100%; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* ─── Navigation ─────────────────────────────────────────── */
.nav {
  position: relative;
  inset-x: 0;
  top: 0;
  z-index: 50;
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 2rem;
}

.nav__logo {
  --glitch-font-size: 20px;
  text-decoration: none;
}

.nav__logo:hover { color: var(--cyan); text-shadow: none; }

.nav__links {
  display: flex;
  gap: 3rem;
}

.nav__link {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.5;
}

.nav__link:hover { color: var(--cyan); text-shadow: none; }

/* Mobile nav */
.nav__hamburger {
  display: none;
  background: none;
  border: none;
  color: var(--muted);
  padding: 0.5rem;
}

.nav__hamburger svg { width: 1.5rem; height: 1.5rem; }

.nav__mobile {
  display: none;
  position: fixed;
  inset-y: 0;
  right: 0;
  z-index: 100;
  width: 100%;
  max-width: 24rem;
  background: var(--surface);
  padding: 1.5rem;
  overflow-y: auto;
  box-shadow: -4px 0 24px rgba(0,0,0,0.4);
  ring: 1px solid rgba(124, 58, 237, 0.2);
}

.nav__mobile.is-open { display: block; }

.nav__mobile-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.nav__mobile-close {
  background: none;
  border: none;
  color: var(--muted);
  padding: 0.5rem;
}

.nav__mobile-close svg { width: 1.5rem; height: 1.5rem; }

.nav__mobile-link {
  display: block;
  padding: 0.75rem;
  border-radius: 0.5rem;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.25rem;
}

.nav__mobile-link:hover { background: rgba(63, 228, 228, 0.1); color: var(--text); text-shadow: none; }

@media (max-width: 1023px) {
  .nav__links { display: none; }
  .nav__hamburger { display: block; }
}

/* ─── Footer ─────────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--border);
  background: rgba(15, 22, 32, 0.8);
  backdrop-filter: blur(8px);
}

.footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 3rem 1.5rem;
  max-width: 80rem;
  margin-inline: auto;
}

.footer__copy {
  font-size: 0.875rem;
  color: var(--muted);
  width: 100%;
  text-align: left;
}

.footer__socials {
  display: flex;
  gap: 1.5rem;
  width: 100%;
  justify-content: flex-end;
}

.footer__social-link {
  color: var(--muted);
  transition: color 0.2s;
}

.footer__social-link:hover { color: var(--text); text-shadow: none; }
.footer__social-link svg { width: 1.5rem; height: 1.5rem; }

@media (min-width: 768px) {
  .footer__inner { flex-direction: row; }
}

/* ─── Hero ───────────────────────────────────────────────── */
.hero {
  position: relative;
  overflow: hidden;
  padding-top: 3.5rem;
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: -20;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  z-index: -10;
  background: rgba(0, 0, 0, 0.5);
}

.hero__blur-top {
  position: absolute;
  inset-x: 0;
  top: -10rem;
  z-index: -10;
  overflow: hidden;
  filter: blur(3rem);
}

.hero__blur-bottom {
  position: absolute;
  inset-x: 0;
  bottom: -10rem;
  z-index: -10;
  overflow: hidden;
  filter: blur(3rem);
}

.hero__blob {
  width: 36rem;
  aspect-ratio: 1155/678;
  background: linear-gradient(to top right, #ff80b5, #9089fc);
  opacity: 0.2;
  clip-path: polygon(74.1% 44.1%, 100% 61.6%, 97.5% 26.9%, 85.5% 0.1%, 80.7% 2%, 72.5% 32.5%, 60.2% 62.4%, 52.4% 68.1%, 47.5% 58.3%, 45.2% 34.5%, 27.5% 76.7%, 0.1% 64.9%, 17.9% 100%, 27.6% 76.8%, 76.1% 97.7%, 74.1% 44.1%);
}

.hero__blob--top {
  position: relative;
  left: calc(50% - 11rem);
  transform: translateX(-50%) rotate(30deg);
}

.hero__blob--bottom {
  position: relative;
  left: calc(50% + 3rem);
  transform: translateX(-50%);
}

.hero__content {
  max-width: 80rem;
  margin-inline: auto;
  padding-inline: 1.5rem;
}

.hero__center {
  max-width: 48rem;
  margin-inline: auto;
  padding-block: 8rem;
  text-align: center;
}

@media (min-width: 640px) { .hero__center { padding-block: 12rem; } }
@media (min-width: 1024px) { .hero__center { padding-block: 14rem; } }

.hero__title {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.hero__subtitle {
  margin-top: 2rem;
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--muted);
  line-height: 1.75;
}

/* ─── Recent Posts (home) ────────────────────────────────── */
.recent-posts { padding-block: 6rem; }

.recent-posts__header { max-width: 100%; }

.recent-posts__eyebrow {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--cyan);
  line-height: 1.75;
  font-family: var(--font-sans);
}

.recent-posts__title {
  margin-top: 0.5rem;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 600;
}

.recent-posts__desc {
  margin-top: 0.5rem;
  font-size: 1.125rem;
  color: var(--muted);
  line-height: 2;
}

.recent-posts__grid {
  margin-top: 2.5rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem 2rem;
  border-top: 1px solid var(--border);
  padding-top: 2.5rem;
}

@media (min-width: 640px) { .recent-posts__grid { margin-top: 4rem; padding-top: 4rem; } }
@media (min-width: 1024px) { .recent-posts__grid { grid-template-columns: repeat(3, 1fr); } }

.post-card {
  display: flex;
  flex-direction: column;
  background: rgba(15, 22, 32, 0.6);
  border: 1px solid rgba(63, 228, 228, 0.18);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.post-card__meta {
  font-size: 0.75rem;
  color: var(--muted);
}

.post-card__body { position: relative; flex: 1; }

.post-card__title {
  margin-top: 0.75rem;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text);
  transition: color 0.2s;
  font-family: var(--font-subhead);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.post-card__title a::before {
  content: '';
  position: absolute;
  inset: 0;
}

.post-card__title a { color: inherit; font-weight: inherit; }
.post-card:hover .post-card__title { color: var(--cyan); }

.post-card__excerpt {
  margin-top: 1.25rem;
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.75;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card__tags {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag {
  border: 1px solid var(--border);
  border-radius: 9999px;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--muted);
}

.recent-posts__empty {
  margin-top: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(63,228,228,0.18);
  border-radius: 0.5rem;
  background: rgba(63,228,228,0.03);
  padding: 4rem 1.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.24em;
  color: var(--muted);
}

/* ─── System Diagnostics (home) ──────────────────────────── */
.diagnostics {
  position: relative;
  overflow: hidden;
  background: var(--bg);
  padding: 6rem 1.5rem;
}

.diagnostics__grid-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.diagnostics__grid-bg svg {
  position: absolute;
  top: 0;
  left: 50%;
  height: 64rem;
  width: 128rem;
  transform: translateX(-50%);
  -webkit-mask-image: radial-gradient(64rem 64rem at top, white, transparent);
  mask-image: radial-gradient(64rem 64rem at top, white, transparent);
  stroke: #2a2442;
}

.diagnostics__layout {
  position: relative;
  z-index: 1;
  max-width: 80rem;
  margin-inline: auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}

@media (min-width: 1024px) {
  .diagnostics__layout {
    grid-template-columns: 1fr 1fr;
    align-items: start;
    gap: 2rem;
  }
}

.diagnostics__text { max-width: 100%; }

.diagnostics__eyebrow {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--cyan);
  line-height: 1.75;
  font-family: var(--font-sans);
}

.diagnostics__title {
  margin-top: 0.5rem;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 600;
}

.diagnostics__lead {
  margin-top: 1.5rem;
  font-size: 1.25rem;
  color: var(--muted);
  line-height: 2;
}

.diagnostics__body {
  font-size: 0.9375rem;
  color: var(--muted);
  line-height: 1.75;
}

.diagnostics__list {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.diagnostics__list-item {
  display: flex;
  gap: 0.75rem;
}

.diagnostics__list-icon {
  flex-shrink: 0;
  margin-top: 0.25rem;
  width: 1.25rem;
  height: 1.25rem;
  color: var(--cyan);
}

.diagnostics__list-item strong {
  font-weight: 600;
  color: var(--text);
}

.diagnostics__h2 {
  margin-top: 4rem;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
}

.diagnostics__image-wrap {
  position: sticky;
  top: 1rem;
}

.diagnostics__image {
  border-radius: 0.75rem;
  background: #17132d;
  box-shadow: 0 0 0 1px rgba(124,58,237,0.25), 0 20px 60px rgba(0,0,0,0.5);
  width: 100%;
}

/* ─── Blog List (Transmissions) ──────────────────────────── */
.blog-bg {
  position: relative;
  background-color: #020617;
  background-image:
    linear-gradient(to bottom, rgba(2,6,23,1) 0%, rgba(2,6,23,1) 15%, rgba(2,6,23,0.5) 70%, rgba(2,6,23,0) 100%),
    url('/images/transmissions.png');
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center bottom;
  background-attachment: fixed;
  flex: 1;
}

.transmissions {
  padding: 6rem 1.5rem;
}

@media (min-width: 640px) { .transmissions { padding: 8rem 2rem; } }

.transmissions__header { max-width: 64rem; margin-inline: auto; }

.transmissions__eyebrow {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--cyan);
  line-height: 1.75;
  font-family: var(--font-sans);
}

.transmissions__title {
  margin-top: 0.5rem;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 600;
}

.transmissions__desc {
  margin-top: 1.5rem;
  font-size: 1.25rem;
  color: var(--muted);
  line-height: 2;
}

.transmissions__list {
  max-width: 64rem;
  margin: 3rem auto 0;
  border-top: 1px solid rgba(63,228,228,0.15);
  padding-top: 3rem;
  display: flex;
  flex-direction: column;
  gap: 4rem;
}

@media (min-width: 640px) { .transmissions__list { margin-top: 4rem; padding-top: 4rem; } }

.transmission-item {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  background: rgba(15, 22, 32, 0.6);
  border: 1px solid rgba(63, 228, 228, 0.18);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.transmission-item__meta {
  font-size: 0.75rem;
  color: var(--muted);
}

.transmission-item__body { position: relative; }

.transmission-item__title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text);
  transition: color 0.2s;
  font-family: var(--font-subhead);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.transmission-item__title a::before { content: ''; position: absolute; inset: 0; }
.transmission-item__title a { color: inherit; font-weight: inherit; }
.transmission-item:hover .transmission-item__title { color: var(--cyan); }

.transmission-item__excerpt {
  margin-top: 1rem;
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.75;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.transmission-item__tags {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.transmissions__empty {
  max-width: 64rem;
  margin: 4rem auto 0;
  border: 1px solid rgba(63,228,228,0.18);
  border-radius: 0.75rem;
  background: rgba(0,0,0,0.4);
  padding: 2.5rem;
  text-align: center;
  font-size: 0.875rem;
  color: var(--muted);
}

.transmissions__footer {
  max-width: 64rem;
  margin: 3rem auto 0;
  border-top: 1px solid rgba(63,228,228,0.15);
  padding-top: 3rem;
}

.transmissions__end {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--cyan);
  font-family: var(--font-sans);
}

/* ─── Blog Post ───────────────────────────────────────────── */
.post {
  max-width: 56rem;
  margin-inline: auto;
  padding: 6rem 1.5rem;
  background: rgba(15, 22, 32, 0.6);
  border: 1px solid rgba(63, 228, 228, 0.18);
  border-radius: var(--radius);
}

@media (min-width: 640px) { .post { padding: 8rem 2rem; } }


.post__eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.32em;
  color: rgba(63, 228, 228, 0.8);
  font-family: var(--font-sans);
}

.post__title {
  margin-top: 1rem;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 600;
}

.post__byline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1rem;
  font-size: 0.75rem;
  color: var(--muted);
}

.post__byline-author {
  font-weight: 600;
  color: rgba(192, 201, 214, 0.8);
}

.post__byline-dot {
  width: 0.25rem;
  height: 0.25rem;
  border-radius: 50%;
  background: rgba(151, 166, 184, 0.6);
}

.post__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
  padding-top: 0.5rem;
}

.post__content {
  margin-top: 3rem;
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text);
}

.post__content p { margin-bottom: 1.5rem; }
.post__content h2 { margin-top: 2rem; font-size: 1.25rem; }
.post__content h3 { margin-top: 1.5rem; font-size: 1.125rem; }
.post__content a { color: var(--cyan); text-decoration: underline; }
.post__content a:hover { color: var(--magenta); }
.post__content ul, .post__content ol { padding-left: 1.5rem; margin-bottom: 1.5rem; }
.post__content ul { list-style: disc; }
.post__content ol { list-style: decimal; }

.post__end {
  margin-top: 2.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.32em;
  color: rgba(63, 228, 228, 0.8);
  font-family: var(--font-sans);
}
