/* Design Tokens */
:root {
  --color-bg: #000000;
  --color-text: #FFFFFF;
  --color-text-secondary: #A3A3A3;
  --color-text-muted: #737373;
  --color-card-bg: #0A0A0A;
  --color-border: #222222;
  --color-accent: #FF2B2B;
  --color-accent-hover: #FF4545;
  --max-width: 1160px;
  --space-section: clamp(48px, 6vw, 80px);
  --space-x: clamp(20px, 5vw, 80px);
  --space-card-gap: 24px;
  --radius-card: 14px;
  --radius-btn: 8px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: 'Open Sans', sans-serif;
  overflow-x: hidden;
  line-height: 1.7;
}

a {
  color: inherit;
  text-decoration: none;
}

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

::selection {
  background: var(--color-accent);
  color: #ffffff;
}

/* Typography */
h1, .h1 {
  font-family: 'Permanent Marker', cursive;
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  text-transform: uppercase;
  line-height: 1.1;
  font-weight: normal;
}

h2, .section-title {
  font-family: 'Permanent Marker', cursive;
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.2;
  font-weight: normal;
}

h3, .card-title {
  font-family: 'Open Sans', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
}

p {
  font-family: 'Open Sans', sans-serif;
  font-size: 1rem;
  color: var(--color-text-secondary);
}

.accent { background-color: var(--color-accent); color: #ffffff; padding: 2px 6px; font-weight: bold;  }

/* Utility Classes */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-x);
}

.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Buttons */
.btn-primary {
  background-color: var(--color-accent);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-btn);
  padding: 14px 32px;
  font-size: 0.9375rem;
  font-weight: 600;
  font-family: 'Open Sans', sans-serif;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
  text-align: center;
}

.btn-primary:hover {
  background-color: var(--color-accent-hover);
  transform: translateY(-1px);
}

.btn-secondary {
  background-color: transparent;
  color: #ffffff;
  border: 1px solid #333333;
  border-radius: var(--radius-btn);
  padding: 14px 32px;
  font-size: 0.9375rem;
  font-weight: 600;
  font-family: 'Open Sans', sans-serif;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
  text-align: center;
}

.btn-secondary:hover {
  border-color: #555555;
  transform: translateY(-1px);
}

/* Navigation (.site-header) */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  height: 72px;
}

.nav-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-x);
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
}

.nav-logo img {
  height: 40px;
  width: auto;
}

.nav-links {
  display: flex;
  gap: 32px;
  align-items: center;
  list-style: none;
}

.nav-links a {
  color: #ffffff;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-family: 'Open Sans', sans-serif;
  font-weight: 600;
  transition: color 0.3s ease;
}

.nav-links a:hover {
  color: #ffffff;
}

.mobile-toggle {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 1001;
  padding: 5px;
}

.mobile-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: #ffffff;
  margin: 6px 0;
  transition: 0.3s;
}

.mobile-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 7px);
}

.mobile-toggle.active span:nth-child(2) {
  opacity: 0;
}

.mobile-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -7px);
}

@media (max-width: 767px) {
  .mobile-toggle {
    display: block;
  }
  
  .nav-links {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.98);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 40px;
    transform: translateX(100%);
    transition: transform 0.4s ease;
    padding: 2rem;
  }
  
  .nav-links.active {
    transform: translateX(0);
  }
  
  .nav-links a {
    font-size: 1.25rem;
  }
}

/* Hero (.hero) */
.hero {
  position: relative;
  overflow: hidden;
  min-height: 0;
  max-width: var(--max-width);
  margin: 0 auto;
  padding-inline: var(--space-x);
}

.hero-picture,
.hero-picture img {
  display: block;
  width: 100%;
  height: auto;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  width: 100%;
  margin: 0 auto;
  padding: 48px var(--space-x);
}

.hero-eyebrow {
  font-family: 'Open Sans', sans-serif;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--color-accent);
  margin-bottom: 24px;
  display: block;
}

.hero h1 {
  margin-bottom: 24px;
  color: #ffffff;
}

.hero-subtitle {
  font-family: 'Open Sans', sans-serif;
  font-size: clamp(1rem, 2vw, 1.35rem);
  color: var(--color-text-secondary);
  margin-bottom: 40px;
  max-width: 600px;
}

.hero-cta {
  padding: 16px 40px;
  font-size: 1rem;
}

/* Social Links (.social-links) */
.social-links {
  background-color: var(--color-card-bg);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.social-links-container {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  justify-content: center;
  gap: clamp(24px, 5vw, 56px);
  padding: 32px var(--space-x);
  flex-wrap: wrap;
}

.social-link {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--color-text-secondary);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.3s ease;
}

.social-link svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
  flex-shrink: 0;
}

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

.social-link .arrow {
  margin-left: 4px;
  transition: transform 0.3s ease;
  display: inline-block;
}

.social-link:hover .arrow {
  transform: translateX(3px);
}

/* Content Cards (.content-cards) */
.content-cards {
  /* No specific styles needed here, structural */
}

.cards-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--space-section) var(--space-x);
}

.section-header {
  text-align: center;
  margin-bottom: 56px;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-card-gap);
}

@media (max-width: 1023px) {
  .cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

@media (max-width: 767px) {
  .hero-content {
    padding: 32px var(--space-x);
  }

  .hero h1 {
    font-size: clamp(2rem, 9vw, 3rem);
  }

  .hero-eyebrow {
    margin-bottom: 12px;
  }

  .hero h1 {
    margin-bottom: 16px;
  }

  .hero-subtitle {
    margin-bottom: 24px;
  }
}

/* Individual Card (.card) */
.card {
  background-color: var(--color-card-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  overflow: hidden;
  transition: border-color 0.3s ease, transform 0.3s ease;
  display: flex;
  flex-direction: column;
}

.card:hover {
  border-color: #333333;
  transform: translateY(-2px);
}

.card-thumbnail {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  position: relative;
}

.card-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.card:hover .card-thumbnail img {
  transform: scale(1.03);
}

.card-body {
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-category {
  align-self: flex-start;
  background-color: var(--color-accent);
  font-size: 0.75rem;
  font-family: 'Open Sans', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #ffffff;
  padding: 2px 6px;
  margin-bottom: 12px;
  font-weight: 700;
  display: inline-block;
}

.card-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 8px;
  line-height: 1.4;
}

.card-description {
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  line-height: 1.6;
  margin-bottom: 20px;
  flex: 1;
}

.card-link {
  font-size: 0.875rem;
  color: #ffffff;
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color 0.3s ease;
  margin-top: auto;
}

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

.card-link .arrow {
  transition: transform 0.3s ease;
}

.card-link:hover .arrow {
  transform: translateX(4px);
}

/* Manifesto (.manifesto) */
.manifesto {
  /* wrapper styles */
}

.manifesto-container {
  max-width: 720px;
  margin: 0 auto;
  padding: var(--space-section) var(--space-x);
}

.manifesto p {
  margin-bottom: 24px;
  font-size: clamp(1rem, 1.5vw, 1.125rem);
  line-height: 1.8;
  color: var(--color-text-secondary);
}

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

.manifesto strong {
  color: #ffffff;
  font-weight: 700;
}

.manifesto .accent { background-color: var(--color-accent); color: #ffffff; padding: 2px 6px; font-weight: bold;  }

/* Newsletter (.newsletter) */
.newsletter {
  border-top: 1px solid var(--color-border);
}

.newsletter-container { max-width: 900px;
  margin: 0 auto;
  text-align: center;
  padding: var(--space-section) var(--space-x);
}

.newsletter h2 {
  margin-bottom: 16px;
  color: #ffffff;
}

.newsletter-description {
  color: var(--color-text-secondary);
  margin-bottom: 40px;
  font-size: 1.0625rem;
  line-height: 1.7;
}

#custom-substack-embed {
  max-width: 420px;
  margin: 0 auto;
}

/* Substack widget overrides (if applicable via general classes) */
.custom-substack-widget input {
  background-color: #111111;
  border: 1px solid #333333;
  color: #ffffff;
}

/* Bio (.bio) */
.bio {
  border-top: 1px solid var(--color-border);
}

.bio-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--space-section) var(--space-x);
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}

@media (max-width: 767px) {
  .bio-container {
    grid-template-columns: 1fr;
  }
}

.bio-image-wrapper {
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  width: 100%;
}

.bio-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bio-text h2 {
  margin-bottom: 24px;
  color: #ffffff;
}

.bio-headline {
  font-size: 1.0625rem;
  color: var(--color-text-secondary);
  margin-bottom: 24px;
  line-height: 1.7;
  font-style: italic;
  display: block;
}

.bio-body p {
  margin-bottom: 16px;
  color: var(--color-text-secondary);
  line-height: 1.7;
}

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

/* Footer (.site-footer) */
.site-footer {
  border-top: 1px solid var(--color-border);
  background-color: #000000;
}

.footer-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 48px var(--space-x);
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 40px;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-brand img {
  height: 32px;
  width: auto;
}

.footer-brand-text {
  color: var(--color-text);
  font-weight: 600;
  font-size: 1.125rem;
}

.footer-links {
  display: flex;
  gap: 32px;
  list-style: none;
}

.footer-links a {
  color: var(--color-text-muted);
  font-size: 0.875rem;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: #ffffff;
}

.footer-bottom {
  border-top: 1px solid var(--color-border);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}

@media (max-width: 767px) {
  .footer-top {
    flex-direction: column;
    gap: 32px;
  }
  
  .footer-bottom {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }
}

body.menu-open { overflow: hidden; }
.site-header.scrolled { border-bottom: 1px solid var(--color-border); background-color: rgba(0, 0, 0, 0.95); }
.bio-cta { margin-top: 32px; }
.section-header p { color: var(--color-text-secondary); margin-top: 12px; font-size: 1.125rem; }
.footer-logo { max-height: 32px; width: auto; }



@media (min-width: 768px) { .newsletter h2, .newsletter-description { white-space: nowrap; } }
.bio-image-wrapper { max-width: 320px; margin: 0 auto; }
