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

html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

:root {
  --primary-gold: #d4af37;
  --secondary-gold: #b8860b;
  --deep-navy: #1b263b;
  --warm-cream: #fdf4e3;
  --light-parchment: #fff8e7;
  --charcoal-dark: #2c2c2c;
  --text-secondary: #5a5a5a;
  --code-bg: #f8f9fa;
  --code-border: #e0e0e0;
  --code-text: #2c2c2c;
  --code-comment: #6a737d;
  --shadow-main: 0 8px 32px rgba(0, 0, 0, 0.12);
  --shadow-hover: 0 20px 40px rgba(0, 0, 0, 0.18);
  --bg-color: #ffffff;
  --section-bg: #fcfbf7;
  --text-main: #1a1a1a;
  --card-bg: #ffffff;
  --border-color: #e2d1a8;
  --footer-bg: #ffffff;
}

body.dark-mode {
  --code-bg: #1e1e1e;      /* Soft dark gray background */
  --code-border: #333333; /* Subtle border */
  --code-text: #e6e6e6;    /* Light readable text */
  --code-comment: #9ca3af; /* Muted gray for comments */
  --footer-bg: #1a1a1a;
}

body {
  font-family: "Crimson Text", Georgia, serif;
  font-size: 15px;
  line-height: 1.7;
  background: linear-gradient(135deg,
      var(--light-parchment) 0%,
      var(--warm-cream) 100%);
  color: var(--charcoal-dark);
}

main {
  margin-top: 0;
  padding-top: 0;
}

/* Hero Section */
.hero-section {
  max-width: 1400px;
  margin: 0 auto;
  padding: 5rem 6% 3rem;
  text-align: center;
  animation: fadeInUp 0.8s ease-out;
}

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

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-section h2 {
  font-family: "Playfair Display", serif;
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 700;
  color: var(--deep-navy);
  margin-bottom: 1.2rem;
  line-height: 1.2;
}

.hero-section h2::after {
  content: "";
  display: block;
  width: 120px;
  height: 4px;
  margin: 1.5rem auto 0;
  background: linear-gradient(90deg,
      var(--primary-gold),
      var(--secondary-gold));
  border-radius: 2px;
}

.hero-section p {
  max-width: 800px;
  margin: 2rem auto 0;
  font-size: 1.15rem;
  color: var(--text-secondary);
  line-height: 1.8;
}

/* Steps Container */
.steps-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 3rem 6% 5rem;
}

.section-title {
  font-family: "Playfair Display", serif;
  font-size: clamp(2rem, 4vw, 2.5rem);
  font-weight: 700;
  text-align: center;
  color: var(--deep-navy);
  margin-bottom: 1rem;
}

.section-title::after {
  content: "";
  display: block;
  width: 90px;
  height: 3px;
  margin: 1.2rem auto 3rem;
  background: linear-gradient(90deg,
      var(--primary-gold),
      var(--secondary-gold));
}



.step {
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* Smoother "pop" effect */
  background: var(--bg-card); /* Ensure there's a base color */
  border: 1px solid transparent;
  margin-top: 20px;
}

.step:hover {
  transform: translateY(-10px); /* Lift it slightly higher */
  border-color: var(--primary-gold);
  
  /* HIGH VISIBILITY SHADOW */
  /* Format: horizontal vertical blur spread color */
  box-shadow: 0 15px 30px rgba(212, 175, 55, 0.4); 
  
  /* Optional: subtle background tint to make the card "pop" */
  background-color: rgba(212, 175, 55, 0.05);
}



.step:nth-child(1) {
  animation-delay: 0.1s;
}

.step:nth-child(2) {
  animation-delay: 0.15s;
}

.step:nth-child(3) {
  animation-delay: 0.2s;
}

.step:nth-child(4) {
  animation-delay: 0.25s;
}

.step:nth-child(5) {
  animation-delay: 0.3s;
}

.step:nth-child(6) {
  animation-delay: 0.35s;
}

.step:nth-child(7) {
  animation-delay: 0.4s;
}

.step:nth-child(8) {
  animation-delay: 0.45s;
}


.step-header {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.step-number {
  background: linear-gradient(135deg, var(--primary-gold), var(--secondary-gold));
  color: #ffffff;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Playfair Display", serif;
  font-size: 1.8rem;
  font-weight: 700;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
  transition: transform 0.3s ease;
}

.step:hover .step-number {
  transform: scale(1.1) rotate(5deg);
}

.step h3 {
  font-family: "Playfair Display", serif;
  font-size: clamp(1.6rem, 3vw, 2rem);
  color: var(--deep-navy);
  font-weight: 700;
  margin: 0;
}

.step-content p {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  font-size: 1.05rem;
  line-height: 1.7;
}

.step-content p strong {
  color: var(--charcoal-dark);
  font-weight: 600;
}

/* Code Blocks */
.code-block {
  background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
  border: 2px solid var(--primary-gold);
  border-radius: 12px;
  padding: 1.5rem;
  margin: 1.5rem 0;
  overflow-x: auto;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  transition: all 0.3s ease;
}

.code-block:hover {
  box-shadow: 0 6px 20px rgba(212, 175, 55, 0.15);
  transform: translateX(4px);
}

.code-block pre {
  color: var(--deep-navy);
  font-family: 'Courier New', monospace;
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 0;
}

.code-comment {
  color: var(--text-secondary);
  font-style: italic;
}

code {
  background: rgba(212, 175, 55, 0.1);
  color: var(--secondary-gold);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-family: 'Courier New', monospace;
  font-size: 0.9em;
  border: 1px solid rgba(212, 175, 55, 0.2);
}

/* Tips Section */
.tips-section {
  max-width: 1400px;
  margin: 0 auto;
  padding: 3rem 6% 5rem;
}

.tips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2.5rem;
  margin-top: 2rem;
}

.tip-card {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 20px;
  padding: 2.2rem;
  box-shadow: var(--shadow-main);
  text-align: center;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border: 2px solid transparent;
  animation: fadeInUp 0.6s ease-out backwards;
}

.tip-card:nth-child(1) {
  animation-delay: 0.1s;
}

.tip-card:nth-child(2) {
  animation-delay: 0.2s;
}

.tip-card:nth-child(3) {
  animation-delay: 0.3s;
}

.tip-card:nth-child(4) {
  animation-delay: 0.4s;
}

.tip-card:nth-child(5) {
  animation-delay: 0.5s;
}

.tip-card:nth-child(6) {
  animation-delay: 0.6s;
}

.tip-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-hover);
  border-color: var(--primary-gold);
}

.tip-icon {
  font-size: 3rem;
  background: linear-gradient(135deg, var(--primary-gold), var(--secondary-gold));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 1rem;
  transition: transform 0.3s ease;
  display: inline-block;
}

.tip-card:hover .tip-icon {
  transform: scale(1.15) rotateY(360deg);
}

.tip-card h4 {
  font-family: "Playfair Display", serif;
  font-size: 1.5rem;
  color: var(--deep-navy);
  margin-bottom: 1rem;
  font-weight: 700;
}

.tip-card p {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.65;
}

/* Best Practices */
.best-practices {
  max-width: 1400px;
  margin: 0 auto;
  padding: 3rem 6% 5rem;
}

.practices-container {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 20px;
  padding: 3rem;
  box-shadow: var(--shadow-main);
  border: 2px solid transparent;
  transition: all 0.4s ease;
  animation: fadeInUp 0.8s ease-out;
}

.practices-container:hover {
  box-shadow: var(--shadow-hover);
  border-color: var(--primary-gold);
}

.practices-container h3 {
  font-family: "Playfair Display", serif;
  font-size: clamp(1.8rem, 3.5vw, 2.3rem);
  color: var(--deep-navy);
  margin-bottom: 2rem;
  font-weight: 700;
  text-align: center;
}

.practices-container h3::after {
  content: "";
  display: block;
  width: 80px;
  height: 3px;
  margin: 1rem auto 0;
  background: linear-gradient(90deg,
      var(--primary-gold),
      var(--secondary-gold));
}

.practice-list {
  list-style: none;
  padding: 0;
  margin-top: 2rem;
}

.practice-list li {
  position: relative;
  padding: 1.5rem 1rem;
  border-bottom: 1px solid rgba(212, 175, 55, 0.2);
  color: var(--text-secondary);
  display: flex;
  align-items: flex-start;
  gap: 1.2rem;
  font-size: clamp(1.05rem, 2vw, 1.15rem);
  line-height: 1.8;
  transition: transform 0.25s ease;
  animation: fadeInLeft 0.6s ease-out backwards;
}

/* Invisible border layer */
.practice-list li::before {
  content: "";
  position: absolute;
  inset: -6px -10px;
  border: 1.5px solid transparent;
  border-radius: 12px;
  transition: border-color 0.25s ease;
  pointer-events: none;
}

/* Hover = golden border only */
.practice-list li:hover::before {
  border-color: var(--primary-gold);
}

.practice-list li:hover {
  transform: translateX(6px);
}

.practice-list li:nth-child(1) {
  animation-delay: 0.1s;
}

.practice-list li:nth-child(2) {
  animation-delay: 0.2s;
}

.practice-list li:nth-child(3) {
  animation-delay: 0.3s;
}

.practice-list li:nth-child(4) {
  animation-delay: 0.4s;
}

.practice-list li:nth-child(5) {
  animation-delay: 0.5s;
}

.practice-list li:nth-child(6) {
  animation-delay: 0.6s;
}

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.practice-list li:last-child {
  border-bottom: none;
}

.practice-list i {
  color: var(--primary-gold);
  font-size: clamp(1.4rem, 2.5vw, 1.6rem);
  margin-top: 0.2rem;
  flex-shrink: 0;
  transition: transform 0.25s ease;
}

.practice-list li:hover i {
  transform: scale(1.15);
}

.practice-list strong {
  color: var(--deep-navy);
  font-weight: 600;
  font-size: clamp(1.1rem, 2.2vw, 1.2rem);
}

/* Footer */
footer {
  background: var(--deep-navy);
  color: var(--warm-cream);
  text-align: center;
  padding: 3rem 6% 2.5rem;
  font-size: 0.95rem;
}

footer a {
  color: var(--primary-gold);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
}

footer a:hover {
  color: var(--secondary-gold);
  text-decoration: underline;
}

/* =========================
RESPONSIVE
========================= */
@media (max-width: 768px) {

  .hero-section,
  .steps-container,
  .tips-section,
  .best-practices {
    padding: 3rem 5%;
  }

  .step {
    padding: 2rem 1.5rem;
  }

  .step-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .step-number {
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
  }

  .tips-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .practices-container {
    padding: 2rem 1.5rem;
  }

  .code-block {
    padding: 1rem;
  }

  .code-block pre {
    font-size: 0.85rem;
  }
}

@media (max-width: 480px) {
  body {
    font-size: 14px;
  }

  .nav-links a {
    font-size: 0.8rem;
  }

  .step {
    padding: 1.5rem 1rem;
  }

  .step-number {
    width: 45px;
    height: 45px;
    font-size: 1.3rem;
  }

  .tip-card {
    padding: 1.6rem 1.3rem;
  }
}

/* Back to Top Button */
#scrollTopBtn {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: var(--primary-gold);
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  z-index: 999;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

#scrollTopBtn:hover {
  transform: translateY(-4px);
}

#scrollTopBtn.show {
  display: flex;
}

/* Dark mode fixes scoped to Contribute page */
body.dark-mode main,
body.dark-mode section {
  background-color: #121212;
  color: #e0e0e0;
}



/* Cards in dark mode */
body.dark-mode .step,
body.dark-mode .tip-card,
body.dark-mode .practices-container {
  background-color: #1e1e1e;
  border-color: #333;
}

/* Headings + emphasis */
body.dark-mode h1,
body.dark-mode h2,
body.dark-mode h3,
body.dark-mode h4,
body.dark-mode h5,
body.dark-mode strong,
body.dark-mode b {
  color: var(--primary-gold);
}

/* Step number contrast */
body.dark-mode .step-number {
  color: #ffffff;
}

/* Body text readability */
body.dark-mode p,
body.dark-mode li {
  color: #cccccc;
}

/* =========================
   BEST PRACTICES DARK MODE
========================= */

body.dark-mode .best-practices {
  background-color: #111111;
}

body.dark-mode .practices-container {
  background-color: #1e1e1e;
  border: 1px solid #333;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

body.dark-mode .practice-list li {
  border-bottom: 1px solid rgba(212, 175, 55, 0.15);
  color: #cccccc;
}

body.dark-mode .practice-list strong {
  color: var(--primary-gold);
}

body.dark-mode .practice-list li::before {
  border-color: transparent;
}

body.dark-mode .practice-list li:hover::before {
  border-color: var(--primary-gold);
}

/* Dark mode version */
body.dark-mode .practices-section {
  background-color: #111111;
}

body.dark-mode .practices-section h2 {
  color: #c9a227;
}

body.dark-mode .practices-container {
  background-color: #1b1b1b;
  border: 1px solid #333333;
}

body.dark-mode .practices-container p {
  color: #eeeeee;
}

body.dark-mode .best-practices .section-title {
  color: var(--primary-gold) !important;
}

/* Step Card Base Styling */
.step {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 18px;
  padding: 2.5rem 2rem;   /* ✅ Added proper padding */
  box-shadow: var(--shadow-main);
  margin-top: 2rem;
  border: 1px solid transparent;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.steps-container {
  padding-top: 4rem;
}