/* =========================================
   COMPETITIVE FEATURES CSS
   ========================================= */

:root {
  --competitive-text: #1d1d1f;
  --competitive-text-secondary: #555;
  --competitive-muted: #86868b;
  --competitive-border: #e5e5e7;
  --competitive-accent: #e60023;
  --competitive-accent-hover: #c5001e;
  --competitive-surface: #ffffff;
  --competitive-surface-soft: #f7f7f8;
  --competitive-image-background: #f2f2f2;
}

@media (prefers-color-scheme: dark) {
  :root {
    --competitive-text: #f5f5f7;
    --competitive-text-secondary: #c5c5c7;
    --competitive-muted: #86868b;
    --competitive-border: #2d2d2f;
    --competitive-accent: #ff3b5c;
    --competitive-accent-hover: #ff5573;
    --competitive-surface: #131315;
    --competitive-surface-soft: #1c1c1e;
    --competitive-image-background: #242426;
  }
}


/* =========================================
   POST META
   ========================================= */

.post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin-top: 12px;
  color: var(--competitive-muted);
  font-size: 0.88rem;
  line-height: 1.6;
}

.post-meta-separator {
  color: var(--competitive-muted);
  opacity: 0.6;
}

.post-updated {
  font-weight: 600;
  color: var(--competitive-text-secondary);
}


/* =========================================
   ARTICLE IMAGES
   ========================================= */

.post-content img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  margin: 28px auto;
  border-radius: 12px;
  background: var(--competitive-image-background);
}

.post-content figure {
  margin: 32px 0;
}

.post-content figure img {
  margin-top: 0;
  margin-bottom: 10px;
}

.post-content a img {
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.post-content a:hover img {
  opacity: 0.96;
}


/* =========================================
   IMAGE CREDITS SECTION
   ========================================= */

.post-content h2#image-credits {
  margin-top: 46px;
  padding-top: 8px;
  font-size: 1.15rem;
}

.post-content h2#image-credits + ul {
  margin-top: 12px;
  padding-left: 1.2rem;
}

.post-content h2#image-credits + ul li {
  margin-bottom: 6px;
  color: var(--competitive-muted);
  font-size: 0.82rem;
  line-height: 1.55;
}


/* =========================================
   TABLE OF CONTENTS
   ========================================= */

.toc {
  margin: 28px 0 36px;
}

.toc a[href="#image-credits"] {
  display: none !important;
}

.toc a[href="#image-attribution"] {
  display: none !important;
}

.toc li:has(> a[href="#image-credits"]) {
  display: none !important;
}

.toc li:has(> a[href="#image-attribution"]) {
  display: none !important;
}


/* =========================================
   AUTHOR BOX
   ========================================= */

.author-box {
  margin-top: 45px;
  padding: 25px;
  border: 1px solid var(--competitive-border);
  border-radius: 16px;
  background: var(--competitive-surface-soft);
}

.author-box-inner {
  display: flex;
  align-items: flex-start;
  gap: 18px;
}

.author-avatar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 62px;
  width: 62px;
  height: 62px;
  border-radius: 18px;
  background: linear-gradient(
    135deg,
    var(--competitive-text),
    var(--competitive-text-secondary)
  );
  color: transparent;
  font-size: 0;
  font-weight: 800;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.author-avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.author-content {
  min-width: 0;
}

.author-label {
  margin: 0 0 4px;
  color: var(--competitive-muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.author-name {
  margin: 0 0 8px;
  font-size: 1.15rem;
  line-height: 1.3;
}

.author-description {
  margin: 0 0 10px;
  color: var(--competitive-muted);
  line-height: 1.65;
  font-size: 0.95rem;
}

.author-link {
  color: var(--competitive-accent);
  font-weight: 700;
  text-decoration: none;
  font-size: 0.95rem;
}

.author-link:hover {
  color: var(--competitive-accent-hover);
}


/* =========================================
   BREADCRUMB
   ========================================= */

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin-bottom: 18px;
  color: var(--competitive-muted);
  font-size: 0.8rem;
  line-height: 1.5;
}

.breadcrumb a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

.breadcrumb a:hover {
  color: var(--competitive-accent);
}

.breadcrumb [aria-current="page"] {
  color: var(--competitive-text);
  font-weight: 600;
}


/* =========================================
   MOBILE
   ========================================= */

@media (max-width: 600px) {

  .post-content img {
    margin-top: 24px;
    margin-bottom: 24px;
    border-radius: 10px;
  }

  .author-box-inner {
    align-items: flex-start;
  }

  .author-avatar {
    flex-basis: 50px;
    width: 50px;
    height: 50px;
    border-radius: 15px;
  }

  .author-avatar::before {
    width: 29px;
    height: 29px;
  }

  .author-box {
    padding: 20px;
  }

  .author-name {
    font-size: 1.05rem;
  }

  .author-description {
    font-size: 0.9rem;
  }

}


/* =========================================
   REDUCED MOTION
   ========================================= */

@media (prefers-reduced-motion: reduce) {
  .post-content a img {
    transition: none;
  }
}
