/* ============================================================
   Rob Ward — Midnight Signal Design System
   robyward.com
   ============================================================ */

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

/* --- Design Tokens --- */
:root {
  --void: #0A0A0F;
  --bg: #0D0D12;
  --surface: #161620;
  --surface-hover: #1C1C28;
  --surface-border: rgba(255,255,255,0.06);
  --accent: #2080D4;
  --accent-glow: rgba(32,128,212,0.15);
  --accent-hover: #3D96E8;
  --accent-secondary: #64DFDF;
  --text: #F3F4F6;
  --text-muted: #D1D5DB;
  --text-dim: #9CA3AF;
  --success: #5EEAA0;
  --error: #FF9090;
  --radius-lg: 20px;
  --radius-md: 12px;
  --radius-sm: 8px;
}

html { scroll-behavior: auto; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* --- Noise Texture Overlay --- */
body::before {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 1;
}

/* --- Skip to Content (Accessibility) --- */
.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  background: var(--accent);
  color: #fff;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  z-index: 10000;
  font-size: 0.875rem;
  text-decoration: none;
}
.skip-link:focus {
  top: 16px;
}

/* --- Container --- */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
}

.container--narrow {
  max-width: 740px;
}

.container--mid {
  max-width: 900px;
}

/* --- Section Label --- */
.section-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 32px;
}

/* --- Scroll Reveal Defaults --- */
[data-animate] {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-animate].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   NAVBAR — The Floating Rail
   ============================================================ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 0 24px;
  transition: background 0.4s ease, border-color 0.4s ease, backdrop-filter 0.4s ease;
  border-bottom: 1px solid transparent;
}

.nav.is-scrolled {
  background: rgba(13, 13, 18, 0.8);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom-color: var(--surface-border);
}

.nav__inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}

.nav__brand {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text);
  text-decoration: none;
  transition: color 0.2s ease;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav__link {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav__link:hover,
.nav__link.is-active {
  color: var(--text);
}

/* Mobile hamburger */
.nav__toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: var(--text);
}

.nav__toggle svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

/* Mobile overlay */
.nav__overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10,10,15,0.95);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  z-index: 999;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.nav__overlay.is-open {
  display: flex;
  opacity: 1;
  visibility: visible;
}

.nav__overlay a {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.2rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text);
  text-decoration: none;
  transition: color 0.2s;
}

.nav__overlay a:hover {
  color: var(--accent);
}

.nav__close {
  position: absolute;
  top: 20px;
  right: 24px;
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  padding: 8px;
  z-index: 1000;
}

.nav__close svg {
  width: 28px;
  height: 28px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

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

/* Hide hamburger when overlay is open */
.nav__overlay.is-open ~ .nav .nav__toggle {
  opacity: 0;
  visibility: hidden;
}

/* Alternative approach - hide when body has overlay open */
body:has(.nav__overlay.is-open) .nav__toggle {
  opacity: 0;
  visibility: hidden;
}

/* ============================================================
   HERO — The Opening Shot (Homepage)
   ============================================================ */
.hero {
  position: relative;
  min-height: 100vh;
  height: 100vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  transform: none !important;
  will-change: auto;
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  transform: none !important;
  will-change: auto;
}

.hero__bg img {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: cover;
  object-position: center 25%;
  transform: none !important;
  will-change: auto;
  image-rendering: auto;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

/* Gradient overlay */
.hero__bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, var(--void) 0%, rgba(10,10,15,0.85) 30%, rgba(10,10,15,0.35) 55%, rgba(10,10,15,0.6) 80%, rgba(10,10,15,0.75) 100%);
  z-index: 1;
}

/* Faint grid pattern */
.hero__grid {
  position: absolute;
  inset: 0;
  z-index: 2;
  opacity: 0.035;
  background-image:
    repeating-linear-gradient(0deg, transparent, transparent 59px, rgba(255,255,255,0.3) 59px, rgba(255,255,255,0.3) 60px),
    repeating-linear-gradient(90deg, transparent, transparent 59px, rgba(255,255,255,0.3) 59px, rgba(255,255,255,0.3) 60px);
  pointer-events: none;
}

.hero__content {
  position: relative;
  z-index: 3;
  padding: 0 clamp(24px, 5vw, 80px) clamp(48px, 8vh, 96px);
  max-width: 800px;
}

@media (max-width: 768px) {
  .hero__content {
    padding: 0 24px 48px;
    max-width: none;
  }
  .hero {
    min-height: 100vh;
    height: auto;
    padding-top: 60px;
  }
}

.hero__name {
  font-size: clamp(3rem, 9vw, 6.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: var(--text);
  margin-bottom: 12px;
}

.hero__tagline {
  font-family: 'JetBrains Mono', monospace;
  font-size: clamp(0.8rem, 1.8vw, 1rem);
  color: var(--accent);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.hero__bio {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 500px;
}

/* Scroll indicator */
.hero__scroll {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-dim);
  opacity: 0.5;
  transition: opacity 0.4s;
}

.hero__scroll-line {
  width: 1px;
  height: 32px;
  background: var(--text-dim);
  animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% { transform: scaleY(1); opacity: 0.5; }
  50% { transform: scaleY(0.5); opacity: 1; }
}

.hero.scrolled-past .hero__scroll {
  opacity: 0;
}

/* ============================================================
   HERO — Compact (Story, Blog pages)
   ============================================================ */
.hero--compact {
  min-height: auto;
  height: auto;
  padding: 100px 0 16px;
  display: block;
  text-align: center;
}

.hero--compact .hero__name {
  font-size: clamp(2.2rem, 6vw, 3.5rem);
  margin-bottom: 16px;
}

.hero--compact .hero__tagline {
  margin-bottom: 0;
}

/* Accent glow mesh behind compact hero */
.hero--compact::before {
  content: '';
  position: absolute;
  top: -20%;
  left: 30%;
  width: 60%;
  height: 120%;
  background: radial-gradient(ellipse at center, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
  opacity: 0.4;
}

.hero--compact > * {
  position: relative;
  z-index: 1;
}

/* ============================================================
   ABOUT SECTION — The Statement
   ============================================================ */
.about {
  padding: clamp(64px, 10vh, 120px) 0;
  position: relative;
}

/* Accent glow */
.about::before {
  content: '';
  position: absolute;
  top: 10%;
  right: -10%;
  width: 50%;
  height: 80%;
  background: radial-gradient(ellipse at center, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
  opacity: 0.3;
}

.about__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
}

.about__pullquote {
  font-family: Georgia, 'Times New Roman', serif;
  font-style: italic;
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  line-height: 1.5;
  color: var(--text);
  margin-bottom: 8px;
}

.about__pullquote .accent {
  color: var(--accent);
}

.about__text {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.85;
  max-width: 640px;
}

.about__text p {
  margin-bottom: 20px;
}

.about__text p:last-child {
  margin-bottom: 0;
}

.about__text a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s;
}

.about__text a:hover {
  color: var(--accent-hover);
}

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

.link-arrow {
  color: var(--accent);
  font-weight: 500;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color 0.2s, gap 0.2s;
}

.link-arrow:hover {
  color: var(--accent-hover);
  gap: 10px;
}

/* ============================================================
   FEATURED WORK — The Showcase
   ============================================================ */
.work {
  padding: clamp(64px, 10vh, 120px) 0;
}

.work__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 32px;
}

.work__grid .card--featured {
  grid-column: 1 / -1;
}

.card {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-lg);
  padding: 28px;
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.3s ease,
              box-shadow 0.3s ease,
              background 0.3s ease;
  position: relative;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-3px);
  border-color: rgba(32,128,212,0.3);
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
  background: var(--surface-hover);
}

.card__visual {
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  border-radius: var(--radius-md);
  background: var(--bg);
  overflow: hidden;
  position: relative;
}

.card__badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  background: rgba(32,128,212,0.1);
  border: 1px solid rgba(32,128,212,0.2);
  padding: 4px 12px;
  border-radius: 100px;
  white-space: nowrap;
  display: inline-block;
  margin-bottom: 12px;
}

.card__title {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 8px;
  line-height: 1.3;
}

.card__desc {
  color: var(--text-muted);
  font-size: 0.875rem;
  line-height: 1.65;
  flex: 1;
}

.card__cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--accent);
  transition: gap 0.2s ease, color 0.2s ease;
}

.card:hover .card__cta {
  gap: 10px;
  color: var(--accent-hover);
}

/* Featured card (DTC Playbook) */
.card--featured {
  flex-direction: row;
  align-items: stretch;
}

.card--featured .card__visual {
  width: 320px;
  min-width: 320px;
  height: auto;
  margin-bottom: 0;
  border-radius: var(--radius-md);
}

.card--featured .card__body {
  padding: 4px 0 0;
  flex: 1;
}

@media (max-width: 768px) {
  .card--featured {
    flex-direction: column;
  }
  .card--featured .card__visual {
    width: 100%;
    min-width: auto;
    height: 140px;
  }
}

/* --- Card Visual: Futures Chart (AI Futures Framework) --- */
.card__futures {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card__futures-chart {
  width: 75%;
  height: 75%;
}

.card__futures-shape {
  transition: all 0.8s ease-in-out;
}

.card__futures-dot {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  animation: futuresPulse 3s ease-in-out infinite;
}

.card__futures-dot:nth-child(2) { animation-delay: 0.4s; }
.card__futures-dot:nth-child(3) { animation-delay: 0.8s; }
.card__futures-dot:nth-child(4) { animation-delay: 1.2s; }
.card__futures-dot:nth-child(5) { animation-delay: 1.6s; }
.card__futures-dot:nth-child(6) { animation-delay: 2.0s; }
.card__futures-dot:nth-child(7) { animation-delay: 2.4s; }
.card__futures-dot:nth-child(8) { animation-delay: 2.8s; }

@keyframes futuresPulse {
  0%, 100% { opacity: 0.4; transform: scale(1); box-shadow: none; }
  50%      { opacity: 1;   transform: scale(1.6); box-shadow: 0 0 8px currentColor; }
}

/* --- Card Visual: Typewriter (DTC Playbook) --- */
.card__typewriter {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  color: var(--text-dim);
  line-height: 2;
  text-align: left;
  padding: 16px;
  width: 100%;
}

.card__typewriter-line {
  opacity: 0;
  animation: typewriterFadeIn 0.4s ease forwards;
  white-space: nowrap;
  overflow: hidden;
}

.card__typewriter-cursor {
  display: inline-block;
  width: 6px;
  height: 14px;
  background: var(--accent);
  margin-left: 2px;
  vertical-align: text-bottom;
  animation: cursorBlink 0.8s step-end infinite;
}

@keyframes cursorBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

@keyframes typewriterFadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --- Card Visual: Lab Icons --- */
.card__lab-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  padding: 16px;
}

.card__lab-icon {
  font-size: 1.8rem;
  text-align: center;
  animation: labFloat 3s ease-in-out infinite;
}

.card__lab-icon:nth-child(1) { animation-delay: 0s; }
.card__lab-icon:nth-child(2) { animation-delay: 0.5s; }
.card__lab-icon:nth-child(3) { animation-delay: 1s; }
.card__lab-icon:nth-child(4) { animation-delay: 1.5s; }

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

@media (max-width: 1024px) {
  .work__grid {
    grid-template-columns: 1fr;
    max-width: 500px;
    margin: 0 auto;
  }
}

/* ============================================================
   LATEST THINKING — Blog Posts Preview
   ============================================================ */
.latest-thinking {
  padding: clamp(64px, 10vh, 120px) 0;
  position: relative;
}

.thinking__footer {
  text-align: center;
  margin-top: 32px;
}

.link-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: gap 0.2s;
}

.link-cta:hover {
  gap: 12px;
}

/* --- Card Visual: Scenario Mapper (Blog — AI Futures) --- */
.card__scenario {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card__scenario-grid {
  width: 80%;
  height: 80%;
}

.card__scenario-dot {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  animation: scenarioPulse 3s ease-in-out infinite;
}

.card__scenario-dot--1 { top: 12%; left: 48%; background: var(--accent-secondary); animation-delay: 0s; }
.card__scenario-dot--2 { top: 22%; right: 15%; background: #ff6b6b; animation-delay: 0.4s; }
.card__scenario-dot--3 { top: 55%; right: 8%; background: #ff9090; animation-delay: 0.8s; }
.card__scenario-dot--4 { bottom: 12%; right: 22%; background: var(--accent-secondary); animation-delay: 1.2s; }
.card__scenario-dot--5 { bottom: 10%; left: 25%; background: var(--accent-secondary); animation-delay: 1.6s; }
.card__scenario-dot--6 { top: 50%; left: 8%; background: #9acd32; animation-delay: 2.0s; }
.card__scenario-dot--7 { top: 22%; left: 18%; background: #ff6b6b; animation-delay: 2.4s; }

@keyframes scenarioPulse {
  0%, 100% { opacity: 0.4; transform: scale(1); box-shadow: none; }
  50%      { opacity: 1;   transform: scale(1.5); box-shadow: 0 0 6px currentColor; }
}

/* --- Card Visual: Hero variant (blog post hero) --- */
.card__visual--hero {
  max-width: 720px;
  height: 220px;
  margin: 0 auto 32px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--surface-border);
  overflow: hidden;
}

@media (max-width: 768px) {
  .card__visual--hero {
    height: 160px;
    margin-bottom: 24px;
  }
}

/* --- Card Visual: Signal Bars (AI Futures blog post) --- */
.card__signal {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.card__signal-bars {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 70%;
  padding: 0 24px;
}

.card__signal-bar {
  width: 12px;
  border-radius: 2px 2px 0 0;
  opacity: 0.7;
  animation: signalRand 3s ease-in-out infinite alternate;
}

.card__signal-bar:nth-child(1) { animation-delay: 0s;   animation-duration: 2.4s; }
.card__signal-bar:nth-child(2) { animation-delay: 0.7s; animation-duration: 3.1s; }
.card__signal-bar:nth-child(3) { animation-delay: 0.2s; animation-duration: 2.8s; }
.card__signal-bar:nth-child(4) { animation-delay: 1.1s; animation-duration: 3.5s; }
.card__signal-bar:nth-child(5) { animation-delay: 0.5s; animation-duration: 2.6s; }
.card__signal-bar:nth-child(6) { animation-delay: 1.4s; animation-duration: 3.2s; }
.card__signal-bar:nth-child(7) { animation-delay: 0.3s; animation-duration: 2.9s; }

@keyframes signalRand {
  0%   { height: 25%; opacity: 0.5; }
  25%  { height: 70%; opacity: 0.9; }
  50%  { height: 40%; opacity: 0.6; }
  75%  { height: 85%; opacity: 1; }
  100% { height: 35%; opacity: 0.7; }
}

/* --- Card Visual: Archetype Typewriter (13 Futures blog) --- */
.card__archetype-tw {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  font-weight: 500;
  line-height: 2;
  text-align: center;
  padding: 16px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
  overflow: hidden;
}

.card__archetype-tw-line {
  opacity: 0;
  white-space: nowrap;
  overflow: hidden;
}

.card__archetype-tw-cursor {
  display: inline-block;
  width: 6px;
  height: 13px;
  margin-left: 2px;
  vertical-align: text-bottom;
  animation: cursorBlink 0.8s step-end infinite;
}

/* --- Card Visual: Coming Soon (Pending blog post) --- */
.card--coming {
  cursor: default;
  opacity: 0.5;
}

.card--coming:hover {
  transform: none;
  box-shadow: none;
  border-color: var(--surface-border);
  background: var(--surface);
}

.card__pending {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  color: var(--text-dim);
  text-align: left;
  padding: 16px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.card__pending-line {
  height: 2px;
  background: var(--text-dim);
  border-radius: 1px;
  opacity: 0.3;
}

.card__pending-line:nth-child(1) { width: 80%; }
.card__pending-line:nth-child(2) { width: 60%; }
.card__pending-line:nth-child(3) { width: 70%; }

.card__pending-cursor {
  width: 6px;
  height: 14px;
  background: var(--text-dim);
  opacity: 0.4;
  animation: cursorBlink 0.8s step-end infinite;
}

/* ============================================================
   PHILOSOPHY — The Lens
   ============================================================ */
.philosophy {
  padding: clamp(80px, 12vh, 160px) 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.philosophy::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80%;
  height: 100%;
  background: radial-gradient(ellipse at center, var(--accent-glow) 0%, transparent 60%);
  pointer-events: none;
  opacity: 0.3;
}

.philosophy__small {
  font-size: clamp(0.9rem, 2vw, 1.15rem);
  color: var(--text-dim);
  margin-bottom: 16px;
  position: relative;
}

.philosophy__big {
  font-family: Georgia, 'Times New Roman', serif;
  font-style: italic;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 600;
  line-height: 1.3;
  color: var(--text);
  position: relative;
}

.philosophy__big .accent {
  color: var(--accent);
}

/* ============================================================
   CONTACT — The Signal
   ============================================================ */
.contact {
  padding: clamp(64px, 10vh, 120px) 0;
}

.contact__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}

.contact__heading {
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.contact__subtext {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: 32px;
}

/* Social links */
.socials {
  display: flex;
  gap: 24px;
}

.socials a {
  color: var(--text-dim);
  text-decoration: none;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  transition: color 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.socials a:hover {
  color: var(--text);
}

.socials svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

/* Form */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 8px;
  letter-spacing: 0.02em;
}

.form-group input,
.form-group textarea {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-dim);
}

.form-group textarea {
  min-height: 140px;
  resize: vertical;
}

/* Button — magnetic hover */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              box-shadow 0.25s ease;
}

.btn:hover {
  transform: scale(1.03);
}

.btn:active {
  transform: scale(0.97);
}

.btn--primary,
.btn--primary:hover {
  background: var(--accent);
  color: #fff;
  padding: 14px 32px;
  text-decoration: none;
}

.btn--primary:hover {
  box-shadow: 0 4px 20px var(--accent-glow);
}

.btn--primary .btn__bg {
  position: absolute;
  inset: 0;
  background: var(--accent-hover);
  transform: translateX(-101%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn--primary:hover .btn__bg {
  transform: translateX(0);
}

.btn__label {
  position: relative;
  z-index: 1;
}

.btn--full {
  width: 100%;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.form-status {
  margin-top: 16px;
  font-size: 0.9rem;
  min-height: 24px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
}

.form-status.success { color: var(--success); }
.form-status.error { color: var(--error); }

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

/* ============================================================
   FOOTER — The Baseline
   ============================================================ */
.footer {
  background: var(--void);
  border-radius: 3rem 3rem 0 0;
  padding: clamp(48px, 8vh, 80px) 24px 32px;
  margin-top: clamp(64px, 10vh, 120px);
}

.footer__inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 32px;
  align-items: start;
}

.footer__brand {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.footer__brand-tagline {
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-top: 4px;
  letter-spacing: 0;
  text-transform: none;
}

.footer__nav {
  display: flex;
  gap: 24px;
}

.footer__nav a {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--text-dim);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transition: color 0.2s;
}

.footer__nav a:hover {
  color: var(--text);
}

.footer__right {
  text-align: right;
}

.footer__status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  color: var(--text-dim);
  letter-spacing: 0.05em;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.3s ease;
}

.footer__status:hover {
  color: var(--accent);
}

.footer__status-label {
  transition: opacity 0.2s ease;
}

.footer__status:hover .footer__status-label {
  display: none;
}

.footer__status-hover {
  display: none;
}

.footer__status:hover .footer__status-hover {
  display: inline;
}

.footer__status-dot {
  width: 6px;
  height: 6px;
  background: var(--success);
  border-radius: 50%;
  animation: statusPulse 2s ease-in-out infinite;
}

@keyframes statusPulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(94, 234, 160, 0.4); }
  50% { opacity: 0.7; box-shadow: 0 0 0 4px rgba(94, 234, 160, 0); }
}

.footer__bottom {
  max-width: 1100px;
  margin: 32px auto 0;
  padding-top: 24px;
  border-top: 1px solid var(--surface-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer__copy {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  color: var(--text-dim);
  letter-spacing: 0.05em;
}

.footer__socials {
  display: flex;
  gap: 16px;
}

.footer__socials a {
  color: var(--text-dim);
  transition: color 0.2s;
}

.footer__socials a:hover {
  color: var(--text);
}

.footer__socials svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

@media (max-width: 768px) {
  .footer__inner {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .footer__nav { justify-content: center; }
  .footer__right { text-align: center; }
  .footer__bottom { flex-direction: column; gap: 16px; text-align: center; }
  .footer__socials { justify-content: center; }
}

/* ============================================================
   DIVIDER
   ============================================================ */
.divider {
  border: none;
  height: 1px;
  background: var(--surface-border);
  margin: 0;
}

/* ============================================================
   STORY PAGE
   ============================================================ */
.story {
  padding: 0 0 clamp(64px, 10vh, 120px);
}

.story h2 {
  font-size: clamp(1.4rem, 3vw, 1.75rem);
  font-weight: 700;
  margin: clamp(40px, 6vh, 64px) 0 20px;
  color: var(--text);
  line-height: 1.3;
}

.story p {
  font-size: 17px;
  line-height: 1.8;
  margin-bottom: 24px;
  color: var(--text-muted);
}

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

.story a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s;
}

.story a:hover {
  color: var(--accent-hover);
}

/* Timeline marker */
.story__marker {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  display: block;
  margin-bottom: 8px;
  margin-top: clamp(40px, 6vh, 64px);
}

.story__marker + h2 {
  margin-top: 0;
}

/* Pull quote in story */
.story__pullquote {
  font-family: Georgia, 'Times New Roman', serif;
  font-style: italic;
  font-size: clamp(1.3rem, 3vw, 1.6rem);
  line-height: 1.6;
  color: var(--text);
  border-left: 3px solid var(--accent);
  padding-left: 24px;
  margin: 40px 0;
}

/* Back link */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  transition: color 0.2s;
}

.back-link:hover {
  color: var(--accent);
}

/* ============================================================
   BLOG INDEX
   ============================================================ */
.blog-grid {
  padding: clamp(16px, 2vh, 24px) 0 clamp(64px, 10vh, 120px);
}

.post-card {
  display: block;
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--surface-border);
  padding: 32px;
  text-decoration: none;
  color: var(--text);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  margin-bottom: 20px;
}

.post-card:hover {
  background: var(--surface-hover);
  transform: translateY(-2px);
  border-color: rgba(32,128,212,0.3);
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

.post-card__image {
  width: 100%;
  height: 200px;
  overflow: hidden;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  margin: -32px -32px 0;
  width: calc(100% + 64px);
}

.post-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top left;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.post-card:hover .post-card__image img {
  transform: none;
}

.post-card__body {
  padding-top: 24px;
}

.post-card__meta {
  font-family: 'JetBrains Mono', monospace;
  color: var(--text-muted);
  font-size: 0.82rem;
  letter-spacing: 0.03em;
  margin-bottom: 12px;
}

.post-card__title {
  font-size: clamp(1.3rem, 3vw, 1.7rem);
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 12px;
}

.post-card__excerpt {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.65;
  margin-bottom: 16px;
}

.post-card__read {
  color: var(--accent);
  font-weight: 500;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: gap 0.2s;
}

.post-card:hover .post-card__read {
  gap: 8px;
}

/* ============================================================
   BLOG POST — Article
   ============================================================ */

/* Reading Progress Bar */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: rgba(32,128,212,0.1);
  z-index: 9999;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.1s ease-out;
}

.reading-progress__bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-secondary));
  width: 100%;
  transform: scaleX(var(--progress, 0));
  transform-origin: left;
}
.article {
  padding: clamp(16px, 2vh, 24px) 0 clamp(64px, 10vh, 120px);
  max-width: 720px;
  margin: 0 auto;
}

.article__meta {
  font-family: 'JetBrains Mono', monospace;
  color: var(--text-muted);
  font-size: 0.82rem;
  letter-spacing: 0.03em;
  margin-bottom: 20px;
}

.article h1 {
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 28px;
}

.article__intro {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 48px;
  border-left: 3px solid var(--accent);
  padding-left: 20px;
}

.article h2 {
  font-size: clamp(1.3rem, 3vw, 1.6rem);
  font-weight: 700;
  margin-top: 48px;
  margin-bottom: 20px;
  line-height: 1.3;
}

.article p {
  font-size: 17px;
  line-height: 1.8;
  margin-bottom: 20px;
  color: var(--text);
}

@media (max-width: 768px) {
  .article {
    padding: clamp(12px, 2vh, 20px) 0 clamp(48px, 8vh, 80px);
  }
  .hero--compact {
    padding: 64px 0 12px;
  }
  .article p {
    font-size: 16px;
    line-height: 1.75;
    margin-bottom: 18px;
  }
}

.article strong {
  font-weight: 600;
}

.article a:not(.btn) {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s;
}

.article a:not(.btn):hover {
  color: var(--accent-hover);
}

/* Article figure */
.article__figure {
  margin: 32px 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--surface-border);
}

.article__figure img {
  width: 100%;
  height: auto;
  display: block;
}

/* Highlight box */
.highlight-box {
  background: linear-gradient(90deg, var(--surface) 0%, rgba(22, 22, 32, 0.5) 50%, transparent 100%);
  border-left: 3px solid var(--accent);
  padding: 24px 28px;
  margin: 32px 0;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.highlight-box p {
  margin-bottom: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.highlight-box strong {
  color: var(--text);
}

/* CTA box */
.cta-box {
  background: var(--surface);
  border: 1px solid var(--accent);
  border-radius: var(--radius-lg);
  padding: 40px;
  margin: 48px 0;
  text-align: center;
}

.cta-box h3 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.cta-box p {
  color: var(--text-muted);
  margin-bottom: 24px;
  font-size: 0.95rem;
}

.cta-box .btn {
  text-decoration: none;
  color: #fff;
}

/* Tags */
.article__tags {
  display: flex;
  gap: 8px;
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--surface-border);
}

.tag {
  background: var(--surface);
  color: var(--text-muted);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 500;
}

/* ============================================================
   UTILITY
   ============================================================ */
.text-accent { color: var(--accent); }
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}
