/**
 * Articles Shared Styles
 * Extracted from inline styles to reduce duplication across article pages
 */

/* Page Transitions */
body {
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
}

body.page-loaded {
  opacity: 1;
}

body.page-transition {
  opacity: 0;
}

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

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

.stagger-fade {
  opacity: 0;
  animation: fadeInUp 0.6s ease forwards;
}

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

/* Initial hidden state for animated elements */
.article-header,
.section,
.cta-section,
.footer {
  opacity: 0;
  animation: fadeInUp 0.8s ease forwards;
}

.article-header {
  animation-delay: 0.1s;
}
.section:nth-child(1) {
  animation-delay: 0.3s;
}
.section:nth-child(2) {
  animation-delay: 0.4s;
}
.section:nth-child(3) {
  animation-delay: 0.5s;
}
.section:nth-child(4) {
  animation-delay: 0.6s;
}
.section:nth-child(5) {
  animation-delay: 0.7s;
}
.section:nth-child(6) {
  animation-delay: 0.8s;
}
.cta-section {
  animation-delay: 0.9s;
}
.footer {
  animation-delay: 1s;
}

/* Smooth transitions for interactive elements */
a,
button {
  transition: all 0.3s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, sans-serif;
  line-height: 1.6;
  color: #1a1a1a;
  background-color: #ffffff;
  min-height: 100vh;
}

/* Navigation */
.navbar {
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 1rem 0;
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo a {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Alliance No 2', 'Alliance No. 2', 'Helvetica Neue', 'Arial', sans-serif !important;
  font-size: 1.5rem;
  font-weight: 400;
  color: #000000;
  text-decoration: none;
  letter-spacing: 0.5px;
  font-feature-settings: 'ss01' 1, 'ss02' 1, 'ss03' 1, 'ss04' 1, 'ss05' 1, 'ss06' 1, 'ss07' 1, 'ss08' 1, 'ss09' 1, 'ss10' 1, 'liga' 1, 'kern' 1 !important;
  -webkit-font-feature-settings: 'ss01' 1, 'ss02' 1, 'ss03' 1, 'ss04' 1, 'ss05' 1, 'ss06' 1, 'ss07' 1, 'ss08' 1, 'ss09' 1, 'ss10' 1, 'liga' 1, 'kern' 1 !important;
  -moz-font-feature-settings: 'ss01' 1, 'ss02' 1, 'ss03' 1, 'ss04' 1, 'ss05' 1, 'ss06' 1, 'ss07' 1, 'ss08' 1, 'ss09' 1, 'ss10' 1, 'liga' 1, 'kern' 1 !important;
}

.nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav-link {
  color: #000000;
  text-decoration: none;
  font-weight: 400;
  font-size: 0.9rem;
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

.nav-link:hover {
  opacity: 1;
}

.back-button {
  background-color: #000000;
  color: #ffffff;
  padding: 0.625rem 1.5rem;
  border: 1px solid #000000;
  border-radius: 4px;
  transition: all 0.3s ease;
  font-size: 0.875rem;
  font-weight: 500;
}

.back-button:hover {
  background-color: transparent;
  color: #000000;
  border-color: #000000;
}

/* Article Header */
.article-header {
  background: #f8f8f8;
  padding: 10rem 0 5rem;
  margin-top: 80px;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid #e0e0e0;
}

.header-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;
  position: relative;
  z-index: 1;
}

.article-category {
  display: inline-block;
  color: #b19cd9;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  margin-bottom: 1rem;
  font-weight: 600;
  text-transform: uppercase;
}

.article-title {
  font-size: 3.5rem;
  font-weight: 300;
  line-height: 1.2;
  margin-bottom: 1.5rem;
  letter-spacing: -1px;
  color: #000000;
}

.article-subtitle {
  font-size: 1.35rem;
  color: #666666;
  margin-bottom: 2rem;
  line-height: 1.6;
  font-weight: 300;
}

.article-meta {
  display: flex;
  gap: 2rem;
  font-size: 0.9rem;
  color: #999999;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Article Content - Two Column Layout */
.article-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 5rem 3rem;
  display: flex;
  gap: 1rem;
  position: relative;
  background-color: #ffffff;
}

/* Left Column - Sticky Subtitles */
.subtitles-column {
  flex: 0 0 500px;
  position: sticky;
  top: 100px;
  height: fit-content;
  padding-right: 80px;
}

.subtitles-title {
  font-size: 3.5rem;
  font-weight: 300;
  color: #000000;
  margin-bottom: 2rem;
  margin-top: 60px;
  position: relative;
  overflow: visible;
  white-space: normal;
  word-wrap: break-word;
  min-height: 200px;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.subtitles-title::before {
  content: "";
  position: absolute;
  top: -1rem;
  left: 0;
  right: 0;
  height: 1px;
  background-color: #e0e0e0;
}

/* Cursor for typewriter effect */
.cursor {
  display: inline-block;
  width: 2px;
  height: 1.2em;
  background-color: #000000;
  margin-left: 2px;
  vertical-align: text-bottom;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.cursor.typing {
  opacity: 1;
  animation: blink 1s infinite;
}

@keyframes blink {
  0%,
  49% {
    opacity: 1;
  }
  50%,
  100% {
    opacity: 0;
  }
}

/* Progress bar for sections */
.section-progress {
  position: absolute;
  top: 20px;
  left: 0;
  right: 80px;
  height: 40px;
  display: flex;
  gap: 8px;
  align-items: center;
}

.progress-segment {
  flex: 1;
  height: 3px;
  background: #f0f0f0;
  position: relative;
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 2px;
  overflow: hidden;
}

.progress-segment::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #000000 0%, #333333 100%);
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 2px;
}

.progress-segment.active {
  background: #e0e0e0;
}

.progress-segment.active::before {
  width: 100%;
  animation: pulse 2s ease-in-out infinite;
}

.progress-segment.passed {
  background: #e0e0e0;
}

.progress-segment.passed::before {
  width: 100%;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

.progress-label {
  position: absolute;
  top: -24px;
  left: 0;
  font-size: 0.7rem;
  color: #b0b0b0;
  white-space: nowrap;
  font-weight: 500;
  letter-spacing: 0.05em;
  transition: all 0.4s ease;
  opacity: 0.6;
}

.progress-segment.active .progress-label,
.progress-segment.passed .progress-label {
  color: #666666;
  opacity: 1;
  transform: translateY(-2px);
}

.progress-segment:first-child .progress-label {
  left: 0;
}

.progress-segment:last-child .progress-label {
  right: 0;
  left: auto;
}

/* Add smooth entrance animation */
.progress-segment {
  animation: slideIn 0.6s ease-out forwards;
  opacity: 0;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: scaleX(0);
  }
  to {
    opacity: 1;
    transform: scaleX(1);
  }
}

.progress-segment:nth-child(1) { animation-delay: 0.1s; }
.progress-segment:nth-child(2) { animation-delay: 0.2s; }
.progress-segment:nth-child(3) { animation-delay: 0.3s; }
.progress-segment:nth-child(4) { animation-delay: 0.4s; }
.progress-segment:nth-child(5) { animation-delay: 0.5s; }
.progress-segment:nth-child(6) { animation-delay: 0.6s; }
.progress-segment:nth-child(7) { animation-delay: 0.7s; }

/* Subtitle items hidden */
.subtitle-item {
  display: none;
}

/* Right Column - Main Content */
.content-column {
  flex: 1;
  min-width: 0;
}

.section {
  margin-bottom: 6rem;
  scroll-margin-top: 120px;
}

.section h2 {
  font-size: 2.5rem;
  font-weight: 400;
  margin-bottom: 2rem;
  color: #000000;
  position: relative;
  padding-left: 0;
  letter-spacing: -0.02em;
}

.section h3 {
  font-size: 1.5rem;
  font-weight: 500;
  margin: 2rem 0 1rem;
  color: #000000;
}

.section p {
  color: #666666;
  margin-bottom: 1.5rem;
  line-height: 1.8;
  font-size: 1.05rem;
}

/* Reset and style ALL unordered lists */
.section ul {
  list-style: none;
  margin: 1rem 0 1.5rem 0;
  padding: 0;
  margin-left: 0;
}

/* Standalone UL (after OL) gets standard padding */
.section > ul,
.section ol + ul {
  padding-left: 2.5rem;
}

/* Nested UL inside OL LI already inherits the 2.5rem from parent, so no extra padding */
.section ol li ul {
  padding-left: 0;
  margin-left: 0;
}

/* Style ALL list items uniformly */
.section ul li {
  color: #666666;
  margin-bottom: 0.75rem;
  margin-left: 0;
  padding-left: 25px;
  position: relative;
  line-height: 1.8;
  font-size: 1.05rem;
  list-style: none;
}

/* Bullet positioning */
.section ul li::before {
  content: "\2022";
  position: absolute;
  left: 0;
  color: #b19cd9;
  font-weight: 600;
  font-size: 1.2rem;
}

.section ol {
  list-style: none;
  margin-bottom: 1.5rem;
  counter-reset: item;
}

.section ol > li {
  color: #666666;
  margin-bottom: 1rem;
  padding-left: 2.5rem;
  position: relative;
  line-height: 1.8;
  font-size: 1.05rem;
  counter-increment: item;
}

.section ol > li::before {
  content: counter(item) ".";
  position: absolute;
  left: 0;
  color: #b19cd9;
  font-weight: 600;
}

/* Highlight Box */
.highlight-box {
  background-color: #f8f5ff;
  border-left: 4px solid #b19cd9;
  padding: 1.5rem;
  margin: 2rem 0;
  border-radius: 0 8px 8px 0;
}

.highlight-box p {
  color: #333333;
  margin-bottom: 0;
}

/* Strong text styling */
strong {
  color: #000000;
  font-weight: 600;
}

/* Footer */
.footer {
  background-color: #ffffff;
  padding: 3rem 0;
  margin-top: 5rem;
  border-top: 1px solid #e0e0e0;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;
  text-align: center;
}

.footer-content p {
  color: #999999;
  font-size: 0.875rem;
}

/* Responsive Design */
@media (max-width: 1400px) {
  .article-content {
    padding: 5rem 80px;
  }
}

@media (max-width: 1024px) {
  .article-content {
    flex-direction: column;
    gap: 2rem;
    padding: 5rem 40px;
  }

  .subtitles-column {
    display: none;
  }

  .content-column {
    flex: 1;
    max-width: 100%;
  }
}

@media (max-width: 768px) {
  .navbar {
    padding: 0;
  }

  .nav-container {
    padding: 5vw;
    padding-top: calc(5vw + env(safe-area-inset-top));
    justify-content: flex-start;
  }

  .nav-logo a {
    gap: 3vw;
    font-size: 6vw;
  }

  .nav-logo a span {
    font-size: 6vw;
    font-weight: 500;
  }

  .nav-logo img {
    width: 8vw;
    height: 8vw;
  }

  .nav-links {
    margin-left: auto;
  }

  .back-button {
    padding: 2vw 4vw;
    font-size: 3.5vw;
  }

  .article-content {
    padding: 3rem 20px;
  }
  .article-header {
    padding: 8rem 0 4rem;
  }

  .article-title {
    font-size: 2.5rem;
  }

  .article-subtitle {
    font-size: 1.1rem;
  }

  .article-meta {
    flex-direction: column;
    gap: 1rem;
  }

  .section h2 {
    font-size: 1.75rem;
  }
}
