/* Base styles */
:root {
  --text-primary: rgba(255, 255, 255, 0.9);
  --text-secondary: rgba(255, 255, 255, 0.8);
  --text-tertiary: rgba(255, 255, 255, 0.6);
  --accent-color: rgba(42, 255, 255, 0.9);
  --background: rgb(18, 18, 18);
  --spacing-unit: 1rem;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Cormorant Garamond", serif;
}

/* Accessibility and base styles */
body {
  background: var(--background);
  color: var(--text-primary);
  line-height: 1.6;
  padding: 0 5vw;
  font-size: 18px; /* Base font size increased */
}

.back-button {
  position: fixed;
  top: 40px;
  left: 40px;
  color: #2affff;
  text-decoration: none;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 8px;
  opacity: 0;
  animation: fadeIn 0.5s ease forwards 0.5s;
  z-index: 101;
}

.back-button:hover {
  color: white;
}

.back-arrow {
  display: inline-block;
  transform: translateX(0);
  transition: transform 0.3s ease;
}

.back-button:hover .back-arrow {
  transform: translateX(-5px);
}

/* Skip to main content - accessibility */
.skip-to-main {
  position: absolute;
  left: -9999px;
  z-index: 999;
  padding: 1em;
  background-color: var(--accent-color);
  color: var(--background);
  text-decoration: none;
}

.skip-to-main:focus {
  left: 50%;
  transform: translateX(-50%);
}

/* Layout */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 4rem 0;
}

.process-section {
  margin-bottom: 6rem;
  animation: fadeInUp 0.6s ease-out;
}

/* Typography */
.subtitle {
  color: var(--text-tertiary);
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--spacing-unit);
}

.title {
  font-size: 2.5rem;
  font-weight: normal;
  /* margin-bottom: calc(3 * var(--spacing-unit)); */
  line-height: 1.2;
  animation: fadeInUp 0.8s ease-out;
}

/* date and read time indicator: additional information about a post or article - the "metadata.*/
.post-meta {
  color: var(--accent-color);
  font-size: 1rem;
  margin-top: var(--spacing-unit);
  margin-bottom: var(--spacing-unit);
  opacity: 0.9;
  font-style: italic;
}

.post-divider {
  margin: 0 0.5rem;
}

.key-findings {
  background: rgba(42, 255, 255, 0.05);
  border-left: 4px solid var(--accent-color);
  padding: 1.5rem;
  margin: 2rem 0 3rem 0;
  border-radius: 0 8px 8px 0;
}

.key-findings h2 {
  font-size: 1.2rem;
  color: var(--accent-color);
  margin-bottom: 1rem;
}

.key-findings ul {
  margin: 0;
  padding-left: 1.5rem;
}

.key-findings li {
  margin-bottom: 0.8rem;
  line-height: 1.6;
}

.key-findings strong {
  color: var(--accent-color);
}

/* Aha Moments session to the front*/
.findings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}

.finding-item {
  background: rgba(255, 255, 255, 0.03);
  padding: 1.5rem;
  border-radius: 8px;
}

.finding-item .emphasis {
  font-size: 1.2rem;
  margin-bottom: 1rem;
  display: block;
}

.finding-item strong {
  color: var(--accent-color);
}

/* Grid Layout */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.grid-item {
  /* margin-bottom: 0rem; */
  transition: transform 0.3s ease;
  padding: 0.4rem;
  border-radius: 4px;
}

.grid-item:hover {
  transform: translateY(-5px);
}

.grid-item h3 {
  color: var(--text-secondary);
  font-size: 1.6rem;
  margin-bottom: 0.5rem;
  font-weight: normal;
}

.grid-item p {
  color: var(--text-tertiary);
  font-size: 1.2rem;
}

/* Main content */
.content {
  max-width: 800px;
  margin: 4rem auto;
  animation: fadeIn 1s ease-out;
}

.content h2 {
  font-size: 2.4rem;
  margin: 3rem 0 1.5rem;
  font-weight: normal;
  color: var(--text-primary);
}

.content h3 {
  font-size: 1.8rem;
  margin: 2.5rem 0 1rem;
  font-weight: normal;
  color: var(--text-secondary);
}

.content p {
  margin-bottom: 1.5rem;
  color: var(--text-secondary);
  font-size: 1.2rem;
}

.content ul {
  margin: 1.5rem 0 2rem 2rem;
  color: var(--text-secondary);
  font-size: 1.2rem;
}

.content li {
  margin-bottom: 0.8rem;
}

/* Quote styling */
.quote {
  font-style: italic;
  color: var(--text-tertiary);
  padding: 2rem;
  border-left: 4px solid var(--accent-color);
  margin: 2rem 0;
  font-size: 1.4rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 0 8px 8px 0;
  transition: transform 0.3s ease;
}

.quote:hover {
  transform: translateX(10px);
}

/* Image grid */
.image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}

.image-grid img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  transition: transform 0.3s ease;
}

.image-grid img:hover {
  transform: scale(1.02);
}

/* Emphasis */
.emphasis {
  color: var(--accent-color);
  font-weight: 500;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

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

/* Progress bar */
.progress-container {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1.2rem; /* Increased height to accommodate text */
  /* background: rgba(0, 0, 0, 0.8); Darker background */
  z-index: 1000;
  display: flex;
  align-items: center;
  backdrop-filter: blur(5px);
}

.progress-bar {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 4px; /* Keep the actual progress bar thin */
  background: var(--accent-color);
  width: 0%;
  transition: width 0.1s ease;
}

.progress-text {
  position: absolute;
  right: 2rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-style: italic;
}

/* Responsive Design */
@media (max-width: 768px) {
  :root {
    --spacing-unit: 0.8rem;
  }

  body {
    font-size: 16px;
  }

  .title {
    font-size: 2.5rem;
  }

  .content h2 {
    font-size: 2rem;
  }

  .content h3 {
    font-size: 1.6rem;
  }

  .content p,
  .content li {
    font-size: 1.1rem;
  }

  .quote {
    font-size: 1.2rem;
    padding: 1.5rem;
  }

  .container {
    padding: 2rem 0;
  }
}

/* High contrast mode */
@media (prefers-contrast: high) {
  :root {
    --text-primary: #ffffff;
    --text-secondary: #ffffff;
    --text-tertiary: #ffffff;
    --accent-color: #00ffff;
  }
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}
