:root {
  --bg-primary: #07080c;
  --bg-secondary: #0c1017;
  --bg-card: rgba(18, 22, 31, 0.74);
  --bg-code: #0d0f14;

  --cyan: #57f1ff;
  --magenta: #ff5cf0;
  --green: #39ff88;
  --amber: #ffbf5c;
  --gold: #d8b56c;
  --red: #ff5968;
  --purple: #8f65ff;

  --text-primary: #f2efe9;
  --text-secondary: #b9b6ad;
  --text-dim: #7a7780;

  --border: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(87, 241, 255, 0.22);
  --border-gold: rgba(216, 181, 108, 0.22);
  --surface-edge: rgba(255, 255, 255, 0.16);

  --font-mono: 'JetBrains Mono', 'Share Tech Mono', ui-monospace, monospace;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-serif: 'Iowan Old Style', 'Palatino Linotype', 'Georgia', serif;
  --font-display: 'JetBrains Mono', monospace;

  --shadow-glow: 0 0 24px rgba(87, 241, 255, 0.14);
  --shadow-card: 0 18px 50px rgba(0, 0, 0, 0.42);
  --shadow-deep: 0 28px 80px rgba(0, 0, 0, 0.5);
  --surface-blur: blur(18px) saturate(150%);

  --transition-fast: 150ms ease;
  --transition-normal: 300ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 520ms cubic-bezier(0.16, 1, 0.3, 1);
}

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

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

body {
  font-family: var(--font-sans);
  background:
    radial-gradient(circle at 15% 20%, rgba(87, 241, 255, 0.08), transparent 28%),
    radial-gradient(circle at 85% 10%, rgba(255, 92, 240, 0.07), transparent 24%),
    radial-gradient(circle at 50% 100%, rgba(216, 181, 108, 0.06), transparent 26%),
    linear-gradient(180deg, #090b10 0%, #07080c 42%, #06070a 100%);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  min-height: 100vh;
  position: relative;
}

a {
  color: var(--gold);
  text-decoration: none;
  transition: color var(--transition-fast);
}

::selection {
  background: rgba(87, 241, 255, 0.22);
  color: var(--text-primary);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 18%),
    radial-gradient(circle at top, rgba(255, 255, 255, 0.03), transparent 45%);
  mix-blend-mode: screen;
}

body > * {
  position: relative;
  z-index: 1;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

@keyframes glow-shift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes float-up {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse-edge {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.9; }
}
a:hover {
  color: var(--amber);
}

/* ── Grid Background ───────────────────────────────────── */
.grid-bg {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(196, 163, 90, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(196, 163, 90, 0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
}

.scanline {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 9999;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    rgba(196, 163, 90, 0.015) 0px,
    rgba(196, 163, 90, 0.015) 1px,
    transparent 1px,
    transparent 3px
  );
}

/* ── Navigation ────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(7, 8, 12, 0.62);
  backdrop-filter: var(--surface-blur);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.03), 0 18px 40px rgba(0, 0, 0, 0.22);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  position: relative;
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: linear-gradient(135deg, var(--gold), var(--amber), var(--cyan));
  background-size: 180% 180%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: glow-shift 10s ease infinite;
}

.nav-links {
  display: flex;
  gap: 24px;
  align-items: center;
}

.nav-link {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-dim);
  transition: color var(--transition-fast);
  letter-spacing: 0.02em;
  position: relative;
  padding: 10px 0;
}
.nav-link:hover {
  color: var(--gold);
}
.nav-link.active {
  color: var(--gold);
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 3px;
  width: 100%;
  height: 1px;
  transform: scaleX(0);
  transform-origin: left;
  background: linear-gradient(90deg, transparent, var(--cyan), var(--gold), transparent);
  transition: transform var(--transition-normal);
}

.nav-link:hover::after,
.nav-link.active::after {
  transform: scaleX(1);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--gold);
  transition: all var(--transition-normal);
}
.nav-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0; right: 0;
    flex-direction: column;
    gap: 0;
    background: rgba(7, 8, 12, 0.96);
    backdrop-filter: var(--surface-blur);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 8px 16px;
  }
  .nav-links.open { display: flex; }
  .nav-link {
    width: 100%;
    padding: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }
  .nav-link:last-child { border-bottom: none; }
}

/* ── Main Content ──────────────────────────────────────── */
.site-content {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px 24px 56px;
  min-height: calc(100vh - 64px - 250px);
}

.editorial-hero {
  padding: 28px 0 8px;
}

.home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: 28px;
  align-items: center;
  padding: 14px 0 22px;
}

.home-hero-copy {
  padding-right: 8px;
}

.home-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--cyan);
  margin-bottom: 16px;
}

.home-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 5vw, 4.5rem);
  line-height: 0.95;
  letter-spacing: 0.01em;
  max-width: 12ch;
  margin-bottom: 18px;
  text-wrap: balance;
}

.home-deck {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 56ch;
  margin-bottom: 24px;
}

.home-cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 26px;
}

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

.proof-item {
  position: relative;
  padding: 16px;
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent 30%),
    rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: var(--surface-blur);
  box-shadow: var(--shadow-card);
}

.proof-kicker {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 8px;
}

.proof-item p {
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.55;
}

.home-hero .editorial-hero {
  padding: 0;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 24%),
    rgba(10, 12, 18, 0.82);
  box-shadow: var(--shadow-deep);
}

.home-hero .editorial-hero canvas {
  height: 620px;
  border-radius: 0;
}

.signal-section,
.featured-work {
  margin-top: 72px;
}

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

.featured-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) repeat(2, minmax(0, 0.9fr));
  gap: 20px;
}

.spotlight-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 320px;
  padding: 28px;
  border-radius: 12px;
  background:
    radial-gradient(circle at top left, rgba(87, 241, 255, 0.08), transparent 36%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent 26%),
    var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: var(--surface-blur);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: transform var(--transition-normal), border-color var(--transition-normal), box-shadow var(--transition-normal);
  color: var(--text-primary);
}

.spotlight-card:hover {
  color: var(--text-primary);
  transform: translateY(-4px);
  border-color: rgba(87, 241, 255, 0.22);
  box-shadow: var(--shadow-deep), 0 0 0 1px rgba(87, 241, 255, 0.08);
}

.spotlight-card--large {
  min-height: 352px;
}

.spotlight-label {
  align-self: flex-start;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--cyan);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(87, 241, 255, 0.08);
  border: 1px solid rgba(87, 241, 255, 0.14);
}

.spotlight-card h3 {
  font-family: var(--font-display);
  font-size: 1.55rem;
  color: var(--text-primary);
}

.spotlight-lede {
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 36ch;
}

.spotlight-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}

.spotlight-meta span {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-dim);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  border-radius: 999px;
  padding: 5px 10px;
}

.signal-grid .feature-card,
.featured-grid .spotlight-card {
  animation: fade-in-up 520ms ease both;
}

.signal-grid .feature-card:nth-child(2),
.featured-grid .spotlight-card:nth-child(2) {
  animation-delay: 80ms;
}

.signal-grid .feature-card:nth-child(3),
.featured-grid .spotlight-card:nth-child(3) {
  animation-delay: 140ms;
}

.editorial-cta {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  position: relative;
  z-index: 2;
}

/* ── Editorial Typography ──────────────────────────── */
.editorial-body {
  font-family: var(--font-serif);
  color: var(--text-primary);
  line-height: 1.7;
  max-width: 700px;
  margin: 0 auto;
}

.editorial-dropcap::first-letter {
  font-family: var(--font-serif);
  font-size: 3.2em;
  font-weight: 700;
  color: var(--gold);
  float: left;
  line-height: 0.85;
  margin-right: 10px;
  margin-top: 4px;
}

.editorial-pullquote {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--gold);
  border-left: 3px solid var(--gold);
  padding-left: 18px;
  margin: 24px 0 24px auto;
  max-width: 60%;
}

/* ── Buttons ───────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  padding: 12px 28px;
  border-radius: 6px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition-normal);
  letter-spacing: 0.03em;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  transform: translateY(0);
}

.btn-primary {
  background: linear-gradient(135deg, rgba(216, 181, 108, 0.96), rgba(255, 191, 92, 0.9));
  color: #0a0a0c;
  border-color: rgba(255, 255, 255, 0.14);
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(216, 181, 108, 0.16);
}
.btn-primary:hover {
  color: #050608;
  transform: translateY(-1px);
  box-shadow: 0 16px 34px rgba(216, 181, 108, 0.24);
}

.btn-outline {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-secondary);
  border-color: rgba(255, 255, 255, 0.1);
  backdrop-filter: var(--surface-blur);
}
.btn-outline:hover {
  border-color: var(--border-glow);
  color: var(--gold);
  background: rgba(87, 241, 255, 0.05);
  transform: translateY(-1px);
  box-shadow: var(--shadow-glow);
}

.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 0%, rgba(255, 255, 255, 0.18) 40%, transparent 70%);
  transform: translateX(-120%);
  transition: transform 700ms ease;
  z-index: -1;
}

.btn:hover::before {
  transform: translateX(120%);
}

/* ── Section Headers ───────────────────────────────────── */
.section-header {
  text-align: center;
  margin-bottom: 44px;
}

.section-header + .signal-grid,
.section-header + .featured-grid,
.section-header + .projects-grid {
  margin-top: -8px;
}

.section-header h2 {
  font-family: var(--font-serif);
  font-size: 2.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

.section-header p {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

/* ── Feature Cards ─────────────────────────────────────── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
  margin: 40px 0;
}

.feature-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent 24%),
    var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: var(--surface-blur);
  border-radius: 12px;
  padding: 32px;
  transition: all var(--transition-normal);
  position: relative;
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.feature-card:hover {
  border-color: rgba(87, 241, 255, 0.25);
  box-shadow: var(--shadow-deep), 0 0 0 1px rgba(87, 241, 255, 0.08);
  transform: translateY(-4px);
}

.feature-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  margin-bottom: 20px;
  font-size: 1.4rem;
  background:
    linear-gradient(135deg, rgba(87, 241, 255, 0.1), rgba(216, 181, 108, 0.08));
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 0 20px rgba(87, 241, 255, 0.08);
  animation: float-up 6s ease-in-out infinite;
}

.feature-card h3 {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.feature-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ── Blog CTA Section ──────────────────────────────────── */
.blog-cta {
  position: relative;
  text-align: center;
  padding: 72px 24px;
  margin-top: 48px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  background:
    radial-gradient(circle at top, rgba(87, 241, 255, 0.08), transparent 40%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
  backdrop-filter: var(--surface-blur);
  box-shadow: var(--shadow-deep);
}

.blog-cta h2 {
  font-family: var(--font-display);
  font-size: 2.15rem;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.blog-cta p {
  color: var(--text-secondary);
  margin-bottom: 28px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

/* ── Posts / Blog ──────────────────────────────────────── */
.post-list {
  display: grid;
  gap: 24px;
  margin: 20px 0 40px;
}

.post-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent 26%),
    var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: var(--surface-blur);
  border-radius: 8px;
  padding: 28px;
  transition: all var(--transition-normal);
  box-shadow: var(--shadow-card);
}
.post-card:hover {
  border-color: rgba(87, 241, 255, 0.24);
  box-shadow: var(--shadow-deep), 0 0 0 1px rgba(87, 241, 255, 0.08);
  transform: translateY(-3px);
}

.post-card time {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-dim);
  display: block;
  margin-bottom: 8px;
}

.post-card h2 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  margin-bottom: 8px;
}
.post-card h2 a {
  color: var(--text-primary);
}
.post-card h2 a:hover {
  color: var(--gold);
}

.post-card .post-excerpt {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 12px;
}

.post-card .post-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--green);
  background: rgba(57, 255, 136, 0.08);
  border: 1px solid rgba(57, 255, 136, 0.18);
  padding: 3px 10px;
  border-radius: 4px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.post-full {
  max-width: 800px;
  margin: 0 auto;
  animation: fade-in-up 600ms ease both;
}

.post-full h1 {
  font-family: var(--font-display);
  font-size: 2.2rem;
  color: var(--gold);
  margin-bottom: 8px;
}

.post-meta {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-bottom: 32px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.post-content {
  line-height: 1.8;
  font-size: 1.05rem;
}

.post-content h2 {
  font-family: var(--font-mono);
  color: var(--gold);
  margin: 40px 0 16px;
  font-size: 1.5rem;
}

.post-content h3 {
  font-family: var(--font-mono);
  color: var(--magenta);
  margin: 28px 0 12px;
  font-size: 1.2rem;
}

.post-content p { margin-bottom: 16px; }

.post-content ul, .post-content ol {
  margin: 8px 0 16px 24px;
}
.post-content li { margin-bottom: 6px; }

.post-content code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--bg-code);
  color: var(--green);
  padding: 2px 6px;
  border-radius: 3px;
  border: 1px solid var(--border);
}

.post-content pre {
  background: var(--bg-code);
  border: 1px solid var(--border-glow);
  border-radius: 8px;
  padding: 20px;
  overflow-x: auto;
  margin: 16px 0 24px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.6;
}

.post-content pre code {
  background: none;
  border: none;
  padding: 0;
  color: var(--text-primary);
}

.post-content blockquote {
  border-left: 3px solid var(--gold);
  padding: 12px 20px;
  margin: 20px 0;
  background: rgba(196, 163, 90, 0.05);
  border-radius: 0 6px 6px 0;
  color: var(--text-secondary);
  font-style: italic;
}

.post-content strong { color: var(--gold); }

.post-content img {
  max-width: 100%;
  border-radius: 8px;
  margin: 16px 0;
  border: 1px solid var(--border-glow);
}

.post-content hr {
  border: none;
  border-top: 1px solid var(--border-glow);
  margin: 32px 0;
}

.post-content a {
  border-bottom: 1px dashed var(--gold);
}
.post-content a:hover {
  border-bottom-style: solid;
}

/* ── Page Header ───────────────────────────────────────── */
.page-header {
  position: relative;
  text-align: left;
  padding: 30px 32px 34px;
  background:
    radial-gradient(circle at top right, rgba(87, 241, 255, 0.08), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent 30%),
    rgba(255, 255, 255, 0.02);
  backdrop-filter: var(--surface-blur);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  box-shadow: var(--shadow-card);
  margin-bottom: 32px;
}

.page-header h1 {
  font-family: var(--font-display);
  font-size: 2.5rem;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.page-header p {
  margin-top: 10px;
  max-width: 52ch;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 0.88rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.page-content {
  max-width: 800px;
  margin: 0 auto;
  animation: fade-in-up 600ms ease both;
}

/* ── Projects ──────────────────────────────────────────── */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
  gap: 24px;
  margin: 40px 0;
}

.projects-grid#projects-grid {
  margin-top: 0;
}

.project-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent 28%),
    var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: var(--surface-blur);
  border-radius: 8px;
  padding: 28px;
  transition: all var(--transition-normal);
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}

.project-card a {
  color: var(--text-primary);
}
.project-card:hover {
  border-color: rgba(216, 181, 108, 0.3);
  box-shadow: var(--shadow-deep), 0 0 0 1px rgba(216, 181, 108, 0.08);
  transform: translateY(-3px);
}

.project-card::after,
.feature-card::after,
.post-card::after,
.terminal-box::after,
.blog-cta::after,
.page-header::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.22), rgba(87, 241, 255, 0.16), rgba(216, 181, 108, 0.12), rgba(255, 255, 255, 0.04));
  background-size: 200% 200%;
  opacity: 0.7;
  mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: glow-shift 12s ease infinite;
}

.project-card > *,
.feature-card > *,
.post-card > *,
.terminal-box > *,
.blog-cta > *,
.page-header > * {
  position: relative;
  z-index: 1;
}

@media (max-width: 768px) {
  .projects-grid {
    grid-template-columns: 1fr;
  }

  .home-hero,
  .signal-grid,
  .featured-grid {
    grid-template-columns: 1fr;
  }

  .home-hero h1 {
    max-width: 100%;
  }

  .home-proof {
    grid-template-columns: 1fr;
  }

  .page-header {
    padding: 24px 20px 26px;
  }

  .spotlight-card,
  .spotlight-card--large {
    min-height: auto;
  }
}

.project-card h2 {
  font-family: var(--font-mono);
  font-size: 1.2rem;
  color: var(--gold);
  margin-bottom: 8px;
}

.project-card .project-status {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 3px 10px;
  border-radius: 20px;
  margin-bottom: 12px;
  letter-spacing: 0.04em;
}
.status-active {
  background: rgba(0, 255, 65, 0.15);
  color: var(--green);
  border: 1px solid rgba(0, 255, 65, 0.3);
}
.status-wip {
  background: rgba(255, 184, 0, 0.15);
  color: var(--amber);
  border: 1px solid rgba(255, 184, 0, 0.3);
}

.project-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 12px;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.project-full .page-content {
  max-width: 800px;
  margin: 0 auto;
}

/* ── Project Full Page ──────────────────────────────────── */
.project-full {
  max-width: 900px;
  margin: 0 auto;
}

.project-hero {
  padding: 36px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 36px;
  border-radius: 18px;
  background:
    radial-gradient(circle at top right, rgba(255, 92, 240, 0.08), transparent 36%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
  backdrop-filter: var(--surface-blur);
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}

.project-hero-header {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.project-hero-header h1 {
  font-family: var(--font-display);
  font-size: 2.5rem;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.project-description {
  font-size: 1.1rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 20px;
  max-width: 700px;
}

.project-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.project-content h2 {
  font-family: var(--font-mono);
  font-size: 1.4rem;
  color: var(--gold);
  margin: 48px 0 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.project-content h3 {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  color: var(--magenta);
  margin: 32px 0 12px;
}

.project-content p {
  margin-bottom: 16px;
  line-height: 1.8;
}

.project-content ul, .project-content ol {
  margin: 8px 0 16px 24px;
}

.project-content li {
  margin-bottom: 6px;
  color: var(--text-secondary);
}

.project-content pre {
  background: var(--bg-code);
  border: 1px solid var(--border-glow);
  border-radius: 8px;
  padding: 20px;
  overflow-x: auto;
  margin: 16px 0 24px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.6;
}

.project-content pre code {
  background: none;
  border: none;
  padding: 0;
  color: var(--text-primary);
}

.project-content code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--bg-code);
  color: var(--green);
  padding: 2px 6px;
  border-radius: 3px;
  border: 1px solid var(--border);
}

.project-content strong {
  color: var(--gold);
}

/* ── Pagination ────────────────────────────────────────── */
.pagination {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin: 40px 0;
}
.pagination a, .pagination span {
  font-family: var(--font-mono);
  padding: 8px 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  color: var(--text-secondary);
  font-size: 0.85rem;
  background: rgba(255, 255, 255, 0.03);
}
.pagination a:hover {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(216, 181, 108, 0.06);
}
.pagination .current {
  background: var(--gold);
  color: var(--bg-primary);
  border-color: var(--gold);
  font-weight: 600;
}

/* ── Footer ────────────────────────────────────────────── */
.site-footer {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 22%),
    var(--bg-secondary);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 52px 24px 24px;
  position: relative;
  z-index: 1;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
}

.footer-col h3 {
  font-family: var(--font-mono);
  color: var(--text-primary);
  font-size: 0.9rem;
  margin-bottom: 16px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.footer-col a {
  display: block;
  color: var(--text-dim);
  font-size: 0.85rem;
  margin-bottom: 8px;
}
.footer-col a:hover { color: var(--gold); }

.footer-tagline {
  font-size: 0.85rem;
  color: var(--text-dim);
  line-height: 1.5;
}

.social-links {
  display: flex;
  gap: 12px;
}
.social-links a {
  color: var(--text-dim);
  padding: 8px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all var(--transition-normal);
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.02);
}
.social-links a:hover {
  color: var(--gold);
  border-color: var(--gold);
  background: rgba(216, 181, 108, 0.06);
  transform: translateY(-1px);
}

.footer-bottom {
  max-width: 1200px;
  margin: 32px auto 0;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
}

@media (max-width: 768px) {
  .footer-container {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

/* ── Terminal Box ──────────────────────────────────────── */
.terminal-box {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent 24%),
    rgba(10, 12, 18, 0.86);
  border: 1px solid rgba(87, 241, 255, 0.16);
  border-radius: 12px;
  padding: 20px;
  margin: 20px 0;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.6;
  position: relative;
  backdrop-filter: var(--surface-blur);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.terminal-box::before {
  content: '~/shadow-protocol $';
  display: block;
  color: var(--green);
  margin-bottom: 8px;
  font-weight: 600;
}

.terminal-box::after {
  opacity: 0.45;
}

.terminal-box .output {
  color: var(--text-primary);
}

.terminal-box .prompt {
  color: var(--gold);
}

/* ── Page / Content Enhancements ─────────────────────── */
.page-content,
.project-content,
.post-content {
  color: var(--text-primary);
}

.page-content > * + *,
.project-content > * + *,
.post-content > * + * {
  margin-top: 1.1rem;
}

.page-content p,
.project-content p,
.post-content p {
  color: var(--text-secondary);
}

.page-content ul,
.page-content ol,
.project-content ul,
.project-content ol,
.post-content ul,
.post-content ol {
  color: var(--text-secondary);
}

.page-content li::marker,
.project-content li::marker,
.post-content li::marker {
  color: var(--gold);
}

.post-content a,
.project-content a,
.page-content a {
  color: var(--cyan);
  border-bottom-color: rgba(87, 241, 255, 0.45);
}

.post-content a:hover,
.project-content a:hover,
.page-content a:hover {
  color: var(--amber);
}

.feature-card:hover .feature-badge,
.project-card:hover .project-status,
.post-card:hover time {
  animation: pulse-edge 1.6s ease-in-out infinite;
}

.site-header,
.feature-card,
.project-card,
.post-card,
.page-header,
.blog-cta,
.project-hero,
.terminal-box {
  transform: translateZ(0);
}

/* ── Utilities ─────────────────────────────────────────── */
.accent-gold { color: var(--gold); }
.accent-cyan { color: var(--cyan); }
.accent-magenta { color: var(--magenta); }
.accent-green { color: var(--green); }
.accent-amber { color: var(--amber); }

.text-center { text-align: center; }
.mt-20 { margin-top: 20px; }
.mb-20 { margin-bottom: 20px; }

/* ── Scrollbar ─────────────────────────────────────────── */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover { background: var(--gold); }

/* ── Selection ─────────────────────────────────────────── */
::selection {
  background: rgba(196, 163, 90, 0.25);
  color: var(--gold);
}

/* ── Calendar embed ────────────────────────────────────── */
.cal-embed {
  position: relative;
  width: 100%;
  padding-bottom: 75%; /* 4:3 fallback */
  height: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
}
.cal-embed iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
@media (min-width: 768px) {
  .cal-embed { padding-bottom: 62.5%; } /* 8:5 on desktop */
}
