/* -------------------------------------------------------------------------- */
/*  DESIGN SYSTEM & TOKENS                                                   */
/* -------------------------------------------------------------------------- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Newsreader:ital,opsz,wght@0,6..72,400..700;1,6..72,400..700&family=Space+Grotesk:wght@500;600;700&family=Space+Mono:ital,wght@0,400;0,700;1,400&display=swap');

:root {
  /* Color Palette - Warm Paper / Nostalgic Optimism */
  --bg-main: #FBF9F5;
  --bg-subtle: #F4F0E6;
  --bg-card: #FFFFFF;
  --bg-card-hover: #FCFBF8;
  
  --text-main: #1C1A17;
  --text-muted: #5C574F;
  --text-subtle: #8A8478;
  
  --accent-terracotta: #C84B26;
  --accent-terracotta-hover: #A63B1C;
  --accent-terracotta-bg: rgba(200, 75, 38, 0.08);
  
  --accent-emerald: #2D5A46;
  --accent-emerald-bg: rgba(45, 90, 70, 0.08);

  --border-color: #E8E4D9;
  --border-color-hover: #D6D0C2;
  
  /* Typography */
  --font-serif: 'Newsreader', Georgia, serif;
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-display: 'Space Grotesk', var(--font-sans);
  --font-mono: 'Space Mono', monospace;

  /* Spacing & Layout */
  --max-width: 920px;
  --header-height: 72px;
  
  /* Shadows & Transitions */
  --shadow-sm: 0 2px 8px rgba(28, 26, 23, 0.04);
  --shadow-md: 0 10px 30px -5px rgba(28, 26, 23, 0.06);
  --shadow-lg: 0 20px 40px -10px rgba(28, 26, 23, 0.09);
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-pill: 9999px;
  
  --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 24px);
  background-color: var(--bg-main);
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  background-image: 
    radial-gradient(circle at 15% 20%, rgba(200, 75, 38, 0.025) 0%, transparent 40%),
    radial-gradient(circle at 85% 80%, rgba(45, 90, 70, 0.025) 0%, transparent 40%);
}

/* Subtle background noise texture simulation */
body::before {
  content: "";
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image: radial-gradient(#1C1A17 0.75px, transparent 0.75px);
  background-size: 24px 24px;
  opacity: 0.03;
  pointer-events: none;
  z-index: -1;
}

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

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

/* -------------------------------------------------------------------------- */
/*  LAYOUT CONTAINER                                                          */
/* -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* -------------------------------------------------------------------------- */
/*  HEADER                                                                    */
/* -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--header-height);
  background: rgba(251, 249, 245, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(232, 228, 217, 0.7);
  transition: var(--transition);
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--text-main);
  color: var(--bg-main);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(0,0,0,0.12);
}

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

.nav-link {
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  position: relative;
  padding: 4px 0;
}

.nav-link:hover, .nav-link.active {
  color: var(--text-main);
}

.nav-link.active::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent-terracotta);
  border-radius: var(--radius-pill);
}

.header-socials {
  display: flex;
  align-items: center;
  gap: 10px;
  border-left: 1px solid var(--border-color);
  padding-left: 20px;
}

.social-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-family: var(--font-sans);
  font-size: 0.825rem;
  font-weight: 500;
  background: var(--bg-subtle);
  color: var(--text-main);
  border: 1px solid var(--border-color);
}

.social-btn:hover {
  background: var(--bg-card);
  border-color: var(--border-color-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
  color: var(--accent-terracotta);
}

.social-btn svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

/* Mobile Nav Toggle */
.mobile-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--text-main);
}

/* -------------------------------------------------------------------------- */
/*  HERO / INTRO SECTION                                                      */
/* -------------------------------------------------------------------------- */
.hero-section {
  padding: 80px 0 60px;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.pulsing-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-terracotta);
  box-shadow: 0 0 0 0 rgba(200, 75, 38, 0.4);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(200, 75, 38, 0.4); }
  70% { box-shadow: 0 0 0 8px rgba(200, 75, 38, 0); }
  100% { box-shadow: 0 0 0 0 rgba(200, 75, 38, 0); }
}

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text-main);
  margin-bottom: 24px;
}

.hero-title em {
  font-style: italic;
  color: var(--accent-terracotta);
  font-weight: 400;
}

.hero-bio {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 780px;
  margin-bottom: 40px;
}

.pillars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 32px;
}

.pillar-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.pillar-card:hover {
  border-color: var(--border-color-hover);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.pillar-num {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent-terracotta);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 12px;
  display: block;
}

.pillar-card.robotics .pillar-num {
  color: var(--accent-emerald);
}

.pillar-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-main);
}

.pillar-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* -------------------------------------------------------------------------- */
/*  SECTION LAYOUT & TITLES                                                   */
/* -------------------------------------------------------------------------- */
.section {
  padding: 64px 0;
  border-top: 1px solid var(--border-color);
}

.section-header {
  margin-bottom: 32px;
}

.section-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent-terracotta);
  margin-bottom: 8px;
  display: block;
}

.section-title {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 3.5vw, 2.4rem);
  font-weight: 500;
  color: var(--text-main);
  letter-spacing: -0.01em;
}

/* -------------------------------------------------------------------------- */
/*  USA ROBOTICS SECTION                                                      */
/* -------------------------------------------------------------------------- */
.robotics-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.robotics-box::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--accent-emerald), #4A8C6F);
}

.robotics-content {
  max-width: 680px;
}

.robotics-lead {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  line-height: 1.5;
  color: var(--text-main);
  margin-bottom: 24px;
}

.manifest-card {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  padding: 16px 24px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  transition: var(--transition);
  text-decoration: none;
  margin-top: 8px;
}

.manifest-card:hover {
  background: #FFFFFF;
  border-color: var(--accent-emerald);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.manifest-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--accent-emerald);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.manifest-icon svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.manifest-text-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 6px;
}

.manifest-text-sub {
  font-size: 0.85rem;
  color: var(--text-subtle);
  font-family: var(--font-mono);
}

/* -------------------------------------------------------------------------- */
/*  CHARISMATIC CAPITAL SECTION                                               */
/* -------------------------------------------------------------------------- */
.capital-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.capital-box::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--accent-terracotta), #E8835A);
}

.capital-pitch {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  line-height: 1.5;
  color: var(--text-main);
  margin-bottom: 28px;
}

.capital-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 36px;
}

.capital-tag {
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.cta-box {
  padding: 24px;
  border-radius: var(--radius-md);
  background: var(--accent-terracotta-bg);
  border: 1px dashed rgba(200, 75, 38, 0.3);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.cta-text {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-main);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 24px;
  background: var(--accent-terracotta);
  color: #FFFFFF;
  border-radius: var(--radius-pill);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(200, 75, 38, 0.3);
  transition: var(--transition);
}

.btn-primary:hover {
  background: var(--accent-terracotta-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(200, 75, 38, 0.4);
  color: #FFFFFF;
}

.btn-primary svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

/* -------------------------------------------------------------------------- */
/*  GREAT ARTIST / ESSAYS SECTION                                             */
/* -------------------------------------------------------------------------- */
.essays-container {
  margin-top: 32px;
}

.essay-tabs {
  display: flex;
  gap: 12px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 32px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.tab-btn {
  background: none;
  border: none;
  padding: 12px 18px;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-subtle);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: var(--transition);
  white-space: nowrap;
}

.tab-btn:hover {
  color: var(--text-main);
}

.tab-btn.active {
  color: var(--accent-terracotta);
  border-bottom-color: var(--accent-terracotta);
}

.essay-card {
  display: none;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 48px;
  box-shadow: var(--shadow-sm);
  animation: fadeIn 0.4s ease-out;
}

.essay-card.active {
  display: block;
}

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

.essay-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-subtle);
  margin-bottom: 16px;
}

.essay-badge {
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: var(--bg-subtle);
  color: var(--accent-terracotta);
  font-weight: 700;
}

.essay-header-title {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  font-weight: 600;
  line-height: 1.25;
  color: var(--text-main);
  margin-bottom: 32px;
  letter-spacing: -0.01em;
}

.essay-body {
  font-family: var(--font-serif);
  font-size: 1.18rem;
  line-height: 1.75;
  color: #2D2A26;
  max-width: 68ch;
}

.essay-body p {
  margin-bottom: 24px;
}

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

.essay-body h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 36px 0 16px;
}

.essay-footer {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-pill);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
}

.share-btn:hover {
  background: var(--bg-card);
  color: var(--accent-terracotta);
  border-color: var(--accent-terracotta);
}

/* -------------------------------------------------------------------------- */
/*  FOOTER                                                                    */
/* -------------------------------------------------------------------------- */
.site-footer {
  padding: 60px 0;
  border-top: 1px solid var(--border-color);
  background: var(--bg-main);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-copy {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-subtle);
}

.back-to-top {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.back-to-top:hover {
  color: var(--accent-terracotta);
}

/* -------------------------------------------------------------------------- */
/*  RESPONSIVE BREAKPOINTS                                                    */
/* -------------------------------------------------------------------------- */
@media (max-width: 768px) {
  :root {
    --header-height: 64px;
  }

  .nav-menu {
    display: none;
    position: absolute;
    top: var(--header-height);
    left: 0; right: 0;
    background: var(--bg-main);
    flex-direction: column;
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    gap: 16px;
  }

  .nav-menu.open {
    display: flex;
  }

  .mobile-toggle {
    display: block;
  }

  .header-socials {
    border-left: none;
    padding-left: 0;
  }

  .hero-section {
    padding: 48px 0 40px;
  }

  .robotics-box, .capital-box, .essay-card {
    padding: 24px;
  }

  .cta-box {
    flex-direction: column;
    align-items: flex-start;
  }

  .btn-primary {
    width: 100%;
    justify-content: center;
  }
}
