/**
 * whyAI.css - Why AI Can Revive Marcus Aurelius Page Styling
 * The Stoic Wire - Philosophical Content Styling
 * Version 1.0
 */

/* ============================================ */
/* 1. HERO SECTION                             */
/* ============================================ */

.hero-section {
  padding: var(--space-lg) 0 var(--space-xxl) 0;
  text-align: center;
  /*background: var(--color-paper);*/
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    radial-gradient(circle at 20% 30%, rgba(156, 102, 68, 0.03) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(156, 102, 68, 0.03) 0%, transparent 50%);
  pointer-events: none;
}

.hero-visual {
  max-width: 500px;
  margin: 0 auto var(--space-xl);
  position: relative;
  z-index: 1;
}

.hero-svg {
  width: 100%;
  height: auto;
  max-height: 300px;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 500;
  color: var(--color-ink);
  margin-bottom: var(--space-md);
  position: relative;
  z-index: 1;
  line-height: 1.1;
}

.hero-subtitle {
  font-size: 1.5rem;
  color: var(--color-ink) !important;
  margin-bottom: var(--space-xl);
  font-weight: 700 !important;
  font-style: normal !important;
  position: relative;
  z-index: 1;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.hero-quote {
  max-width: 700px;
  margin: var(--space-xl) auto 0;
  font-size: 1.4rem;
  font-style: italic;
  line-height: 1.6;
  color: var(--color-ink);
  border: none;
  padding: var(--space-lg);
  background: rgba(255, 255, 255, 0.8);
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  position: relative;
  z-index: 1;
}

.hero-quote::before,
.hero-quote::after {
  content: """;
  font-family: Georgia, serif;
  font-size: 4rem;
  position: absolute;
  color: var(--color-accent);
  opacity: 0.2;
}

.hero-quote::before {
  left: var(--space-md);
  top: 0;
}

.hero-quote::after {
  content: """;
  right: var(--space-md);
  bottom: -2rem;
}

.hero-quote cite {
  display: block;
  margin-top: var(--space-md);
  font-size: 1rem;
  font-style: normal;
  color: var(--color-accent);
  font-weight: 500;
}

/* ============================================ */
/* 2. PHILOSOPHICAL CONTENT                    */
/* ============================================ */

.philosophical-content {
  max-width: 900px;
  margin: 0 auto;
  padding: var(--space-xl) var(--space-lg);
}

.content-section {
  margin-bottom: var(--space-xxl);
  position: relative;
}

.content-section:last-child {
  margin-bottom: 0;
}

.content-section h2 {
  font-size: 2.5rem;
  font-weight: 500;
  color: var(--color-ink);
  margin-bottom: var(--space-lg);
  position: relative;
  padding-bottom: var(--space-sm);
}

.content-section h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 80px;
  height: 3px;
  background: linear-gradient(90deg, var(--color-accent) 0%, var(--color-accent-light) 100%);
  border-radius: 2px;
}

.opening-text {
  font-size: 1.4rem;
  font-weight: 400;
  line-height: 1.7;
  color: var(--color-ink);
  margin-bottom: var(--space-lg);
}

.opening-text::first-letter {
  font-size: 4rem;
  float: left;
  line-height: 1;
  margin-right: 0.5rem;
  margin-top: 0.1rem;
  color: var(--color-accent);
  font-weight: 600;
}

.content-section p {
  font-size: 1.3rem;
  line-height: 1.8;
  color: var(--color-ink);
  margin-bottom: var(--space-lg);
}

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

.content-section em {
  font-style: italic;
  color: var(--color-accent);
  font-weight: 500;
}

/* ============================================ */
/* 3. LIMITATION GRID                          */
/* ============================================ */

.limitation-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-lg);
  margin: var(--space-xl) 0;
}

.limitation-card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: var(--space-lg);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.limitation-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--color-accent) 0%, var(--color-accent-light) 100%);
}

.limitation-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.limitation-card h3 {
  font-size: 1.4rem;
  font-weight: 500;
  color: var(--color-accent);
  margin-bottom: var(--space-md);
  position: relative;
}

.limitation-card p {
  font-size: 1.1rem;
  line-height: 1.6;
  color: var(--color-ink);
  margin-bottom: 0;
}

/* ============================================ */
/* 4. SPECIAL HIGHLIGHT SECTIONS               */
/* ============================================ */

.insight-highlight {
  /*background: var(--color-bg-alt);*/
  border-left: 4px solid var(--color-accent);
  padding: var(--space-lg) var(--space-xl);
  margin: var(--space-xl) 0;
  border-radius: 0 8px 8px 0;
  position: relative;
  font-style: italic;
}

.insight-highlight p {
  font-size: 1.4rem;
  font-weight: 500;
  color: var(--color-ink);
  margin-bottom: 0;
  line-height: 1.6;
}

/* ============================================ */
/* 5. CLOSING REFLECTION                       */
/* ============================================ */

.closing-reflection {
  background: #fff;
  border-radius: 16px;
  padding: var(--space-xxl);
  margin-top: var(--space-xl);
  text-align: center;
  position: relative;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  border: 1px solid var(--color-border);
}

.closing-reflection::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 4px;
  background: linear-gradient(90deg, var(--color-accent) 0%, var(--color-accent-light) 100%);
  border-radius: 2px;
}

.final-quote {
  font-size: 1.6rem;
  font-style: italic;
  line-height: 1.6;
  color: var(--color-ink);
  border: none;
  padding: var(--space-lg) 0;
  margin: var(--space-xl) 0;
  position: relative;
}

.final-quote::before,
.final-quote::after {
  content: """;
  font-family: Georgia, serif;
  font-size: 5rem;
  position: absolute;
  color: var(--color-accent);
  opacity: 0.15;
}

.final-quote::before {
  left: -2rem;
  top: -1rem;
}

.final-quote::after {
  content: """;
  right: -2rem;
  bottom: -3rem;
}

.final-quote cite {
  display: block;
  margin-top: var(--space-md);
  font-size: 1.1rem;
  font-style: normal;
  color: var(--color-accent);
  font-weight: 600;
}

.conclusion {
  font-size: 1.4rem;
  font-weight: 500;
  color: var(--color-ink);
  margin-bottom: 0;
  line-height: 1.7;
  font-style: italic;
}

/* ============================================ */
/* 6. SIDEBAR ENHANCEMENTS                     */
/* ============================================ */

.sidebar-card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: var(--space-lg);
  margin-bottom: var(--space-lg);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
}

.sidebar-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--color-accent) 0%, var(--color-accent-light) 100%);
  border-radius: 12px 12px 0 0;
}

.sidebar-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.sidebar-card .sidebar-title {
  font-size: 1.4rem;
  margin-top: 0;
  margin-bottom: var(--space-md);
  color: var(--color-accent);
  padding-bottom: var(--space-xs);
  border-bottom: 1px solid var(--color-border);
  font-weight: 500;
}

.sidebar-card p {
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--color-ink);
  margin-bottom: var(--space-md);
}

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

.sidebar-card blockquote {
  font-style: italic;
  border-left: 3px solid var(--color-accent);
  padding-left: var(--space-md);
  margin: var(--space-md) 0;
  background: rgba(156, 102, 68, 0.05);
  padding: var(--space-md);
  border-radius: 0 8px 8px 0;
  font-size: 1rem;
  color: var(--color-ink);
}

.sidebar-card blockquote cite {
  display: block;
  font-style: normal;
  font-size: 0.875rem;
  margin-top: var(--space-xs);
  font-weight: 500;
  color: var(--color-accent);
}

/* ============================================ */
/* 7. NEURAL NETWORK ANIMATION                 */
/* ============================================ */

@keyframes pulse {
  0%, 100% {
    opacity: 0.6;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.1);
  }
}

@keyframes flow {
  0% {
    stroke-dashoffset: 0;
  }
  100% {
    stroke-dashoffset: 20;
  }
}

.neural-network circle {
  animation: pulse 3s ease-in-out infinite;
}

.neural-network circle:nth-child(2) {
  animation-delay: 0.5s;
}

.neural-network circle:nth-child(3) {
  animation-delay: 1s;
}

.neural-network circle:nth-child(4) {
  animation-delay: 1.5s;
}

.connections line {
  stroke-dasharray: 5, 5;
  animation: flow 2s linear infinite;
}

/* ============================================ */
/* 8. RESPONSIVE DESIGN                        */
/* ============================================ */

@media (max-width: 1024px) {
  .hero-title {
    font-size: 3rem;
  }
  
  .hero-subtitle {
    font-size: 1.3rem;
  }
  
  .content-section h2 {
    font-size: 2.2rem;
  }
  
  .limitation-grid {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }
}

@media (max-width: 768px) {
  .hero-section {
    padding: var(--space-md) 0 var(--space-xl) 0;
  }
  
  .hero-title {
    font-size: 2.5rem;
    line-height: 1.2;
  }
  
  .hero-subtitle {
    font-size: 1.2rem;
    margin-bottom: var(--space-lg);
    font-weight: 700 !important;
    color: var(--color-ink) !important;
    font-style: normal !important;
  }
  
  .hero-quote {
    font-size: 1.2rem;
    padding: var(--space-md);
    margin: var(--space-lg) auto 0;
  }
  
  .hero-quote::before,
  .hero-quote::after {
    font-size: 3rem;
  }
  
  .philosophical-content {
    padding: var(--space-lg) var(--space-md);
  }
  
  .content-section {
    margin-bottom: var(--space-xl);
  }
  
  .content-section h2 {
    font-size: 2rem;
    margin-bottom: var(--space-md);
  }
  
  .opening-text {
    font-size: 1.25rem;
  }
  
  .opening-text::first-letter {
    font-size: 3rem;
  }
  
  .content-section p {
    font-size: 1.2rem;
    line-height: 1.7;
  }
  
  .insight-highlight {
    padding: var(--space-md) var(--space-lg);
    margin: var(--space-lg) 0;
  }
  
  .insight-highlight p {
    font-size: 1.25rem;
  }
  
  .closing-reflection {
    padding: var(--space-xl) var(--space-lg);
    margin-top: var(--space-lg);
  }
  
  .final-quote {
    font-size: 1.4rem;
    margin: var(--space-lg) 0;
  }
  
  .final-quote::before,
  .final-quote::after {
    font-size: 4rem;
  }
  
  .conclusion {
    font-size: 1.25rem;
  }
  
  .sidebar-card {
    margin-bottom: var(--space-md);
  }
  
  .sidebar-card p {
    font-size: 1.2rem;
  }
}

@media (max-width: 576px) {
  .hero-title {
    font-size: 2rem;
  }
  
  .hero-subtitle {
    font-size: 1.4rem;
    font-weight: 700 !important;
    color: var(--color-ink) !important;
    font-style: normal !important;
  }
  
  .hero-quote {
    font-size: 1.2rem;
    padding: var(--space-sm);
  }
  
  .hero-quote::before,
  .hero-quote::after {
    font-size: 2.5rem;
  }
  
  .content-section h2 {
    font-size: 1.8rem;
  }
  
  .opening-text {
    font-size: 1.2rem;
  }
  
  .opening-text::first-letter {
    font-size: 2.5rem;
  }
  
  .content-section p {
    font-size: 1.25rem;
    line-height: 1.6;
  }
  
  .limitation-card {
    padding: var(--space-md);
  }
  
  .limitation-card h3 {
    font-size: 1.25rem;
  }
  
  .limitation-card p {
    font-size: 1.2rem;
  }
  
  .insight-highlight {
    padding: var(--space-sm) var(--space-md);
  }
  
  .insight-highlight p {
    font-size: 1.2rem;
  }
  
  .closing-reflection {
    padding: var(--space-lg) var(--space-md);
  }
  
  .final-quote {
    font-size: 1.25rem;
    padding: var(--space-sm) 0;
  }
  
  .final-quote::before {
    left: -1rem;
  }
  
  .final-quote::after {
    right: -1rem;
  }
  
  .conclusion {
    font-size: 1.15rem;
  }
}

/* ============================================ */
/* 9. PRINT STYLES                             */
/* ============================================ */

@media print {
  .hero-section,
  .philosophical-content,
  .sidebar-card {
    page-break-inside: avoid;
  }
  
  .hero-quote::before,
  .hero-quote::after,
  .final-quote::before,
  .final-quote::after {
    display: none;
  }
  
  .limitation-grid {
    display: block;
  }
  
  .limitation-card {
    display: inline-block;
    width: 100%;
    margin-bottom: var(--space-md);
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid #ccc;
  }
  
  .limitation-card::before {
    display: none;
  }
  
  .insight-highlight::before {
    display: none;
  }
  
  .closing-reflection {
    border: 1px solid #ccc;
    box-shadow: none;
  }
  
  .closing-reflection::before {
    display: none;
  }
  
  .neural-network circle,
  .connections line {
    animation: none;
  }
}

/* ============================================ */
/* 10. ACCESSIBILITY ENHANCEMENTS              */
/* ============================================ */

@media (prefers-reduced-motion: reduce) {
  .neural-network circle,
  .connections line {
    animation: none;
  }
  
  .limitation-card,
  .sidebar-card {
    transition: none;
  }
}

@media (prefers-contrast: high) {
  .limitation-card,
  .sidebar-card,
  .insight-highlight,
  .closing-reflection {
    border-width: 2px;
    border-color: #000;
  }
  
  .hero-quote {
    border: 2px solid #000;
  }
}