/* Nick Spanos — Dark Pixel / Retro-Tech Aesthetic */
/* Inspired by nickspanos.com — black, monospaced, minimal */

/* ── Google Fonts ────────────────────────────────────
   Load via HTML <link>:
   https://fonts.googleapis.com/css2?family=Press+Start+2P&family=Space+Mono:ital,wght@0,400;0,700;1,400&display=swap
   ──────────────────────────────────────────────────── */

:root {
  --black: #000;
  --near-black: #0a0a0a;
  --dark: #111;
  --dark-2: #1a1a1a;
  --gray-dark: #333;
  --gray-mid: #666;
  --gray-light: #999;
  --gray-lighter: #bbb;
  --white: #fff;
  --border: rgba(255, 255, 255, 0.15);
  --border-hover: rgba(255, 255, 255, 0.4);
  --glow: rgba(255, 255, 255, 0.06);
  --font-pixel: 'Press Start 2P', monospace;
  --font-mono: 'Space Mono', 'SF Mono', Menlo, monospace;
  --max-w: 720px;
  --wide-w: 960px;
  --gutter: 1.5rem;
}

/* ── Reset + Base ───────────────────────────────────── */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-mono);
  color: var(--gray-lighter);
  background: var(--black);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--white);
  text-decoration: none;
  transition: opacity 0.2s;
}

a:hover {
  opacity: 0.7;
}

::selection {
  background: rgba(255, 255, 255, 0.2);
  color: var(--white);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ── Nav ────────────────────────────────────────────── */

nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 1rem var(--gutter);
}

.nav-inner {
  max-width: var(--wide-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  font-family: var(--font-pixel);
  font-size: 0.55rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--white);
  text-decoration: none;
}

.nav-brand:hover {
  opacity: 0.7;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray-mid);
  text-decoration: none;
  transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--white);
  opacity: 1;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.25rem;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 1px;
  background: var(--white);
  margin: 5px 0;
  transition: transform 0.3s, opacity 0.3s;
}

/* ── Layout ─────────────────────────────────────────── */

.content-wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.page-content {
  padding: 4rem 0 5rem;
}

/* ── Typography ─────────────────────────────────────── */

h1 {
  font-family: var(--font-pixel);
  font-size: 1.6rem;
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: 0.08em;
  color: var(--white);
  text-transform: uppercase;
  margin-bottom: 1rem;
}

h2 {
  font-family: var(--font-pixel);
  font-size: 0.75rem;
  font-weight: 400;
  line-height: 2;
  letter-spacing: 0.06em;
  color: var(--white);
  text-transform: uppercase;
  margin-top: 3rem;
  margin-bottom: 1.5rem;
}

h3 {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gray-mid);
  margin-top: 3rem;
  margin-bottom: 1rem;
}

h4 {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1.5;
  color: var(--white);
  margin-top: 2rem;
  margin-bottom: 0.5rem;
}

p {
  margin-bottom: 1.5rem;
}

.subtitle {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--gray-mid);
  line-height: 1.8;
  letter-spacing: 0.04em;
  margin-bottom: 2rem;
}

.author-label {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 400;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gray-light);
  border: 1px solid var(--border);
  padding: 0.4rem 1.2rem;
  margin-bottom: 1.5rem;
}

/* ── Hero Section ───────────────────────────────────── */

.hero {
  background: var(--black);
  color: var(--white);
  padding: 0;
  position: relative;
  overflow: hidden;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.hero-inner {
  position: relative;
  z-index: 2;
  max-width: var(--wide-w);
  margin: 0 auto;
  padding: 8rem var(--gutter) 6rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.hero-text {
  max-width: 700px;
  text-align: center;
}

.hero h1 {
  font-family: var(--font-pixel);
  font-size: clamp(1.4rem, 4vw, 2.2rem);
  color: var(--white);
  margin-bottom: 1.5rem;
  line-height: 1.8;
  letter-spacing: 0.1em;
}

.hero .subtitle {
  font-size: 0.75rem;
  color: var(--gray-mid);
  max-width: 600px;
  margin: 0 auto 2rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 2;
}

.hero .author-label {
  margin-bottom: 2rem;
}

.hero-rule {
  width: 40px;
  height: 1px;
  background: var(--border-hover);
  margin: 2rem auto;
  border: none;
}

.hero-intro {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--gray-mid);
  max-width: 520px;
  line-height: 1.9;
  margin: 0 auto;
}

.hero-cover {
  display: flex;
  justify-content: center;
  margin-top: 3rem;
}

.hero-cover img {
  width: 100%;
  max-width: 200px;
  height: auto;
  border: 1px solid var(--border);
  opacity: 0.9;
  transition: opacity 0.3s;
}

.hero-cover img:hover {
  opacity: 1;
}

/* ── Pill Buttons Row ───────────────────────────────── */

.hero-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 3rem;
}

.pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  padding: 0.6rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: 100px;
  color: var(--gray-lighter);
  text-decoration: none;
  transition: border-color 0.3s, color 0.3s, background 0.3s;
}

.pill-btn:hover {
  border-color: var(--border-hover);
  color: var(--white);
  background: var(--glow);
  opacity: 1;
}

.pill-btn svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.5;
}

/* ── Accent Band ────────────────────────────────────── */

.accent-band {
  background: var(--near-black);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 4rem 0;
}

.accent-band-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ── Concept Cards Grid ─────────────────────────────── */

.concept-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin-top: 1.5rem;
  border: 1px solid var(--border);
}

.concept-card {
  padding: 2rem 1.5rem;
  background: var(--black);
  text-align: center;
  transition: background 0.3s;
}

.concept-card:hover {
  background: var(--dark);
}

.concept-card .concept-icon {
  font-size: 1.4rem;
  margin-bottom: 1rem;
  display: block;
  opacity: 0.5;
}

.concept-card h4 {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--white);
  margin-bottom: 0.75rem;
  margin-top: 0;
}

.concept-card p {
  font-size: 0.75rem;
  color: var(--gray-mid);
  line-height: 1.7;
  margin-bottom: 0;
}

/* ── Chapter Cards ──────────────────────────────────── */

.chapter-list {
  margin-top: 1rem;
}

.chapter-card {
  display: block;
  padding: 2rem;
  background: transparent;
  border: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.3s, background 0.3s;
  margin-bottom: 1rem;
  position: relative;
}

.chapter-card:hover {
  border-color: var(--border-hover);
  background: var(--glow);
  opacity: 1;
}

.chapter-card::after {
  content: "\2192";
  position: absolute;
  right: 2rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1rem;
  color: var(--gray-mid);
  opacity: 0;
  transition: opacity 0.3s;
}

.chapter-card:hover::after {
  opacity: 1;
}

.chapter-num {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 400;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gray-mid);
  margin-bottom: 0.5rem;
}

.chapter-card-title {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.5;
  color: var(--white);
  margin-bottom: 0.5rem;
}

.chapter-card-subtitle {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--gray-mid);
}

.chapter-coming {
  opacity: 0.25;
  pointer-events: none;
}

/* ── Chapter Hero (Inner Pages) ─────────────────────── */

.chapter-hero {
  background: var(--black);
  color: var(--white);
  padding: 8rem 0 4rem;
  text-align: center;
  position: relative;
  border-bottom: 1px solid var(--border);
}

.chapter-hero .chapter-num {
  color: var(--gray-mid);
  margin-bottom: 1.5rem;
}

.chapter-hero h1 {
  font-family: var(--font-pixel);
  color: var(--white);
  font-size: clamp(0.9rem, 2.5vw, 1.4rem);
  max-width: 700px;
  margin: 0 auto 1rem;
  line-height: 2;
}

.chapter-hero .subtitle {
  color: var(--gray-mid);
  max-width: 500px;
  margin: 0 auto 1.5rem;
}

.chapter-hero .author-label {
  border: none;
  padding: 0;
  color: var(--gray-mid);
}

/* ── Chapter Body (Reading) ─────────────────────────── */

.chapter-body {
  padding: 3rem 0 4rem;
}

.chapter-body p {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  text-align: left;
  color: var(--gray-lighter);
  line-height: 2;
}

.chapter-body h2 {
  margin-top: 3.5rem;
}

.chapter-body h3 {
  color: var(--gray-mid);
}

.chapter-body ul {
  list-style: none;
  padding: 0;
  margin-bottom: 1.5rem;
}

.chapter-body ul li {
  padding-left: 1.5rem;
  position: relative;
  margin-bottom: 0.5rem;
  color: var(--gray-lighter);
  font-size: 0.85rem;
}

.chapter-body ul li::before {
  content: ">";
  font-family: var(--font-mono);
  color: var(--gray-mid);
  position: absolute;
  left: 0;
  top: 0;
}

.chapter-body strong {
  color: var(--white);
  font-weight: 700;
}

.chapter-body em {
  color: var(--gray-lighter);
  font-style: italic;
}

/* ── Pull Quote ─────────────────────────────────────── */

.pull-quote {
  border-left: 2px solid var(--gray-mid);
  padding: 1.5rem 0 1.5rem 2rem;
  margin: 3rem 0;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--white);
  line-height: 1.9;
  background: transparent;
}

.pull-quote cite {
  display: block;
  font-size: 0.65rem;
  font-style: normal;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gray-mid);
  margin-top: 0.75rem;
}

/* ── Signature Block ────────────────────────────────── */

.signature {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.signature-name {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--white);
}

.signature-role {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray-mid);
  margin-top: 0.25rem;
}

/* ── Section Divider ────────────────────────────────── */

.section-divider {
  text-align: center;
  margin: 4rem 0;
  position: relative;
}

.section-divider::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--border);
}

.section-divider span {
  position: relative;
  background: var(--black);
  padding: 0 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gray-mid);
}

/* ── Download Section ───────────────────────────────── */

.download-section {
  margin: 3rem 0;
  padding: 2.5rem;
  background: var(--near-black);
  color: var(--white);
  position: relative;
  border: 1px solid var(--border);
}

.download-section h3 {
  margin-top: 0;
  color: var(--gray-mid);
}

.download-section p {
  color: var(--gray-mid);
}

.download-links {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
}

.download-btn {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.65rem 1.75rem;
  border: 1px solid var(--border);
  border-radius: 100px;
  color: var(--gray-lighter);
  text-decoration: none;
  transition: border-color 0.3s, color 0.3s, background 0.3s;
}

.download-btn:hover {
  border-color: var(--border-hover);
  color: var(--white);
  background: var(--glow);
  opacity: 1;
}

/* ── About Page ─────────────────────────────────────── */

.about-content {
  max-width: 640px;
}

.about-content p {
  font-size: 0.85rem;
  color: var(--gray-lighter);
}

/* Timeline */

.timeline {
  position: relative;
  padding-left: 2.5rem;
  margin: 2rem 0 3rem;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 1px;
  background: var(--border);
}

.timeline-item {
  position: relative;
  margin-bottom: 2.5rem;
  padding-bottom: 0.5rem;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -2.5rem;
  top: 0.5rem;
  width: 7px;
  height: 7px;
  background: var(--black);
  border: 1px solid var(--gray-mid);
  border-radius: 50%;
  transform: translateX(-3px);
}

.timeline-item:hover::before {
  background: var(--white);
  border-color: var(--white);
}

.timeline-year {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gray-mid);
  margin-bottom: 0.25rem;
}

.timeline-item p {
  font-size: 0.8rem;
  color: var(--gray-lighter);
  line-height: 1.8;
}

/* ── Ventures Grid ──────────────────────────────────── */

.ventures-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  margin: 1.5rem 0 3rem;
  border: 1px solid var(--border);
}

.venture-card {
  padding: 1.5rem;
  background: var(--black);
  transition: background 0.3s;
}

.venture-card:hover {
  background: var(--dark);
}

.venture-card h4 {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--white);
  margin-top: 0;
  margin-bottom: 0.35rem;
}

.venture-card p {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--gray-mid);
  line-height: 1.6;
  margin-bottom: 0;
}

/* ── Footer ─────────────────────────────────────────── */

footer {
  background: var(--black);
  color: var(--gray-mid);
  padding: 3rem var(--gutter) 4rem;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.04em;
  text-align: center;
  border-top: 1px solid var(--border);
}

footer a {
  color: var(--gray-light);
  text-decoration: none;
  transition: color 0.2s;
}

footer a:hover {
  color: var(--white);
  opacity: 1;
}

footer small {
  display: block;
  margin-top: 0.5rem;
}

footer small a {
  color: var(--gray-mid);
}

footer small a:hover {
  color: var(--gray-light);
}

/* ── Mobile Responsive ──────────────────────────────── */

@media (max-width: 768px) {
  html {
    font-size: 15px;
  }

  nav {
    padding: 0.75rem var(--gutter);
  }

  .nav-toggle {
    display: block;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(20px);
    padding: 1rem var(--gutter) 1.25rem;
    border-bottom: 1px solid var(--border);
    gap: 0.75rem;
  }

  .nav-links.open {
    display: flex;
  }

  .hero {
    min-height: auto;
  }

  .hero-inner {
    padding: 6rem var(--gutter) 4rem;
  }

  .hero h1 {
    font-size: clamp(0.9rem, 5vw, 1.6rem);
  }

  .hero-cover img {
    max-width: 160px;
  }

  .hero-nav {
    gap: 0.5rem;
  }

  .pill-btn {
    font-size: 0.62rem;
    padding: 0.5rem 1rem;
  }

  .chapter-hero {
    padding: 6rem 0 3rem;
  }

  .chapter-hero h1 {
    font-size: clamp(0.7rem, 3vw, 1.1rem);
    padding: 0 1rem;
  }

  .concept-grid {
    grid-template-columns: 1fr;
  }

  .ventures-grid {
    grid-template-columns: 1fr;
  }

  .chapter-card {
    padding: 1.5rem;
  }

  .chapter-card::after {
    display: none;
  }

  .download-links {
    flex-direction: column;
  }

  .download-btn {
    text-align: center;
  }

  .timeline {
    padding-left: 2rem;
  }

  .timeline-item::before {
    left: -2rem;
  }

  .page-content {
    padding: 3rem 0 4rem;
  }

  .pull-quote {
    padding: 1.25rem 0 1.25rem 1.5rem;
    font-size: 0.82rem;
  }
}

/* ── Reduced Motion ─────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
  html {
    scroll-behavior: auto;
  }
}

/* ── Print ──────────────────────────────────────────── */

@media print {
  nav, footer, .nav-toggle, .download-section, .hero-nav {
    display: none;
  }
  body {
    background: #fff;
    color: #111;
    font-size: 10pt;
  }
  .hero, .chapter-hero, .accent-band {
    background: #fff;
    color: #111;
    min-height: auto;
  }
  h1, h2, h4, .chapter-card-title, .signature-name {
    color: #111;
  }
  .pull-quote {
    border-left-color: #333;
  }
  a {
    color: #111;
    text-decoration: underline;
  }
}
