/* ============================================================
   CirriusTech — Custom Brand Stylesheet
   Gradient: #7B3FE4 → #2AA7FF
   Gradients are used intentionally as accents, not everywhere.
   ============================================================ */

/* ------------------------------------------------------------
   CSS Custom Properties
   ------------------------------------------------------------ */
:root {
  --ct-gradient-from: #7B3FE4;
  --ct-gradient-to:   #2AA7FF;
  --ct-gradient: linear-gradient(135deg, var(--ct-gradient-from) 0%, var(--ct-gradient-to) 100%);
  --ct-gradient-text: linear-gradient(90deg, var(--ct-gradient-from), var(--ct-gradient-to));

  /* Section accent colours */
  --ct-tech-accent:     #7B3FE4;
  --ct-personal-accent: #2AA7FF;
  --ct-fiction-accent:  #C084FC;
  --ct-projects-accent: #34D399;

  /* Reading width */
  --ct-prose-width: 72ch;
  --ct-site-max:    1200px;

  /* Spacing scale */
  --ct-space-xs: 0.5rem;
  --ct-space-sm: 1rem;
  --ct-space-md: 1.5rem;
  --ct-space-lg: 2.5rem;
  --ct-space-xl: 4rem;
}

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
body {
  font-family: 'Roboto', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Alata', 'Roboto', sans-serif;
  font-weight: 600;
  letter-spacing: -0.02em;
}

/* Body text colours — good contrast in both modes */
body.light,
body:not(.dark) {
  color: #1E293B;
}
body.dark {
  color: #CBD5E1;
}

/* Gradient brand text — for deliberate brand moments */
.ct-brand-text {
  background: var(--ct-gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ============================================================
   DARK / LIGHT BACKGROUNDS
   ============================================================ */
body.dark {
  background-color: #0B0F1A !important;
}
body.light,
body:not(.dark) {
  background-color: #F8FAFC !important;
}
html {
  background-color: transparent !important;
  font-size: 110%;
}

/* ============================================================
   HERO IMAGE SYSTEM
   Single source of truth for all image rendering across the site.
   Used via layouts/partials/content/hero-image.html
   Four contexts: card | featured | single | list

   Recommended source image dimensions (same image is reused across
   all contexts via object-fit: cover, so target the widest context):
     single   — 1600 × 686 px  (21:9 — full-width post header, best all-round)
     card     — 1200 × 675 px  (16:9 — homepage/section grid cards)
     featured —  560 × 420 px  (4:3 desktop / 16:9 mobile thumbnail)
     list     —  260 × 176 px  (fixed 130×88 row thumb, 2× retina)

   Best all-round choice: supply a 1600 × 686 px image (21:9).
   object-fit: cover will crop it correctly for card (16:9),
   featured (4:3), and list (130×88) contexts automatically.
   ============================================================ */

/* Base — shared across all contexts */
.hero-image {
  display: block;
  object-fit: cover;
  object-position: center 20%; /* slight top-bias preserves faces & key detail */
}

/* Card context — homepage grids + section list card grids */
.hero-image--card {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 0.5rem 0.5rem 0 0; /* top corners — card body continues below */
}

/* Featured context — homepage featured post side thumbnail */
.hero-image--featured {
  width: 280px;
  aspect-ratio: 4 / 3;
  flex-shrink: 0;
  border-radius: 0.5rem;
}

/* Single-page context — full-width header on individual post pages */
.hero-image--single {
  width: 100%;
  aspect-ratio: 21 / 9;
  max-height: 480px; /* safety cap for very wide screens */
  border-radius: 0.75rem;
  margin-bottom: 2.5rem;
}

/* List-row thumbnail context — blog + personalblog row lists */
.hero-image--list {
  width: 130px;
  height: 88px;
  flex-shrink: 0;
  border-radius: 0.5rem;
}

/* Responsive adjustments */
@media (max-width: 767px) {
  /* hide list thumbnails on mobile, matching previous .ct-post-item__thumb behaviour */
  .hero-image--list { display: none !important; }
}
@media (max-width: 640px) {
  .hero-image--featured {
    width: 100%;
    aspect-ratio: 16 / 9;
  }
}

/* ============================================================
   NAVBAR ENHANCEMENTS
   ============================================================ */
#profileHeader nav {
  border-bottom: 1px solid rgba(123, 63, 228, 0.1);
  transition: border-color 0.2s ease, background 0.2s ease;
}

#profileHeader .nav-link:hover,
#profileHeader .nav-link:focus {
  color: var(--ct-gradient-from) !important;
}

/* Mobile nav: give the search some breathing room */
#navbarContent .nav-item:first-child .nav-link {
  padding-top: 0.75rem;
}

/* ============================================================
   GRADIENT UTILITY CLASSES
   ============================================================ */
.ct-gradient-bg   { background: var(--ct-gradient); }
.ct-gradient-border { border-image: var(--ct-gradient) 1; }

/* ============================================================
   HOMEPAGE — HERO
   ============================================================ */
.ct-hero {
  padding: 5rem 0 4rem;
  position: relative;
  overflow: hidden;
}

/* Subtle gradient tint behind the hero — intentional, not loud */
.ct-hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(ellipse at 20% 50%, rgba(123,63,228,0.07) 0%, transparent 60%);
  pointer-events: none;
}

.ct-hero__eyebrow {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  /* Gradient text — key brand moment */
  background: var(--ct-gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.75rem;
}

.ct-hero__title {
  font-size: clamp(2.4rem, 6vw, 4rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 1.25rem;
}

.ct-hero__subtitle {
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  max-width: 54ch;
  line-height: 1.7;
  opacity: 0.88;
  margin-bottom: 2rem;
}

.ct-hero__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.6rem;
  border-radius: 0.5rem;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none !important;
  transition: opacity 0.2s, transform 0.15s;
}

/* Primary CTA uses gradient fill — justified as primary brand moment */
.ct-hero__cta--primary {
  background: var(--ct-gradient);
  color: #fff !important;
  -webkit-text-fill-color: #fff;
}
.ct-hero__cta--primary:hover {
  opacity: 0.88;
  transform: translateY(-2px);
}

/* Secondary CTA: solid border, no heavy gradient */
.ct-hero__cta--secondary {
  border: 1.5px solid var(--ct-gradient-from);
  color: var(--ct-gradient-from) !important;
  -webkit-text-fill-color: var(--ct-gradient-from);
}
.ct-hero__cta--secondary:hover {
  background: rgba(123,63,228,0.07);
  transform: translateY(-2px);
}

/* Social icon strip */
.ct-social-icon {
  color: inherit;
  opacity: 0.55;
  text-decoration: none !important;
  transition: opacity 0.2s, color 0.2s;
  -webkit-text-fill-color: currentColor;
}
.ct-social-icon:hover {
  opacity: 1;
  color: var(--ct-gradient-from);
  -webkit-text-fill-color: var(--ct-gradient-from);
}

/* Profile image */
.ct-hero .rounded-circle {
  border: 3px solid var(--ct-gradient-from);
}

/* ============================================================
   HOMEPAGE — SECTION CONTAINERS
   ============================================================ */
.ct-section {
  padding: 3.5rem 0;
}

.ct-section--alt {
  padding: 3.5rem 0;
}

body.light .ct-section--alt,
body:not(.dark) .ct-section--alt {
  background-color: #F1F5F9;
}
body.dark .ct-section--alt {
  background-color: #0D1321;
}

.ct-section__header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.ct-section__title {
  font-size: 1.35rem;
  font-weight: 700;
  margin: 0;
}

/* Accent bar — gradient as a subtle accent stripe */
.ct-section__accent {
  display: inline-block;
  width: 2.5rem;
  height: 3px;
  border-radius: 2px;
  background: var(--ct-gradient);
  flex-shrink: 0;
}

/* Section-specific accent colours */
.ct-section--tech .ct-section__accent     { background: var(--ct-tech-accent); }
.ct-section--personal .ct-section__accent { background: var(--ct-personal-accent); }
.ct-section--fiction .ct-section__accent  { background: var(--ct-fiction-accent); }
.ct-section--projects .ct-section__accent { background: var(--ct-projects-accent); }

.ct-section__link {
  margin-left: auto;
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none !important;
  white-space: nowrap;
  color: var(--ct-gradient-from) !important;
  -webkit-text-fill-color: var(--ct-gradient-from);
}
.ct-section--tech .ct-section__link     { color: var(--ct-tech-accent) !important; -webkit-text-fill-color: var(--ct-tech-accent); }
.ct-section--personal .ct-section__link { color: var(--ct-personal-accent) !important; -webkit-text-fill-color: var(--ct-personal-accent); }
.ct-section--fiction .ct-section__link  { color: var(--ct-fiction-accent) !important; -webkit-text-fill-color: var(--ct-fiction-accent); }
.ct-section--projects .ct-section__link { color: var(--ct-projects-accent) !important; -webkit-text-fill-color: var(--ct-projects-accent); }
.ct-section__link:hover { text-decoration: underline !important; }

/* Section intro text */
.ct-section__intro {
  max-width: 62ch;
  font-size: 0.95rem;
  line-height: 1.7;
  opacity: 0.75;
  margin-bottom: 1.75rem;
}

/* ============================================================
   CARDS — STANDARD GRID CARD
   ============================================================ */
.ct-card {
  border-radius: 0.75rem;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
  text-decoration: none !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  border: 1px solid transparent;
}

body.light .ct-card,
body:not(.dark) .ct-card {
  background: #FFFFFF;
  border-color: #E2E8F0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
body.dark .ct-card {
  background: #111827;
  border-color: #1E2D45;
  box-shadow: 0 1px 4px rgba(0,0,0,0.25);
}

.ct-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(123,63,228,0.14);
  border-color: var(--ct-gradient-from);
}

/* card image is now handled by .hero-image--card in the hero image system */

.ct-card__body {
  padding: 1.1rem 1.1rem 0.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Metadata row: small, subtle */
.ct-card__meta {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  flex-wrap: wrap;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.65;
  margin-bottom: 0.55rem;
}

/* Section badges on cards */
.ct-card__section-badge {
  display: inline-block;
  padding: 0.1rem 0.5rem;
  border-radius: 99px;
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  -webkit-text-fill-color: #fff;
}
.ct-card__section-badge--tech     { background: var(--ct-tech-accent); }
.ct-card__section-badge--personal { background: var(--ct-personal-accent); }
.ct-card__section-badge--fiction  { background: var(--ct-fiction-accent); }
.ct-card__section-badge--projects { background: var(--ct-projects-accent); }

/* Title — dominant */
.ct-card__title {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 0.45rem;
  flex-shrink: 0;
}
body.light .ct-card__title,
body:not(.dark) .ct-card__title { color: #0F172A; }
body.dark .ct-card__title        { color: #E6EDF3; }

/* Excerpt — secondary, clamped to 2 lines */
.ct-card__excerpt,
.ct-card__excerpt--clamped {
  font-size: 0.855rem;
  line-height: 1.6;
  /* Clamp to 2 lines with ellipsis */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}
body.light .ct-card__excerpt,
body:not(.dark) .ct-card__excerpt { color: #475569; }
body.dark .ct-card__excerpt       { color: #94A3B8; }

/* Card footer: very subtle metadata */
.ct-card__footer {
  padding: 0.55rem 1.1rem 0.7rem;
  font-size: 0.75rem;
  display: flex;
  gap: 0.75rem;
  align-items: center;
  border-top: 1px solid rgba(128,128,128,0.1);
  opacity: 0.55;
}

.ct-card__footer-tag {
  opacity: 0.8;
}

/* ============================================================
   FEATURED CARD (wide, prominent)
   ============================================================ */
.ct-featured {
  border-radius: 0.875rem;
  overflow: hidden;
  display: flex;
  gap: 2rem;
  padding: 2rem;
  align-items: center;
  /* Gradient border accent — intentional premium feel */
  border: 1.5px solid rgba(123,63,228,0.35);
  text-decoration: none !important;
  transition: box-shadow 0.25s ease;
}

body.light .ct-featured,
body:not(.dark) .ct-featured { background: #FFFFFF; }
body.dark .ct-featured        { background: #111827; }

.ct-featured:hover {
  box-shadow: 0 12px 32px rgba(123,63,228,0.12);
}

/* featured image is now handled by .hero-image--featured in the hero image system */

.ct-featured__content {
  flex: 1;
  min-width: 0;
}

/* Eyebrow — gradient text as brand accent */
.ct-featured__eyebrow {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: var(--ct-gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
}

.ct-featured__title {
  font-size: clamp(1.2rem, 3vw, 1.65rem);
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 0.75rem;
}
body.light .ct-featured__title,
body:not(.dark) .ct-featured__title { color: #0F172A; }
body.dark .ct-featured__title        { color: #E6EDF3; }

.ct-featured__excerpt {
  font-size: 0.925rem;
  line-height: 1.7;
  margin-bottom: 1.1rem;
}
body.light .ct-featured__excerpt,
body:not(.dark) .ct-featured__excerpt { color: #475569; }
body.dark .ct-featured__excerpt        { color: #94A3B8; }

.ct-featured__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ct-gradient-from) !important;
  -webkit-text-fill-color: var(--ct-gradient-from);
}
.ct-featured__cta:hover { text-decoration: underline; }

@media (max-width: 640px) {
  .ct-featured { flex-direction: column; padding: 1.25rem; }
}

/* ============================================================
   FICTION CARDS
   ============================================================ */
.ct-fiction-card {
  border-radius: 0.75rem;
  display: flex;
  flex-direction: column;
  border: 1px solid transparent;
  text-decoration: none !important;
  overflow: hidden;
  height: 100%;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

body.light .ct-fiction-card,
body:not(.dark) .ct-fiction-card {
  background: #FFFFFF;
  border-color: #E2E8F0;
}
body.dark .ct-fiction-card {
  background: #111827;
  border-color: #1E2D45;
}

.ct-fiction-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(192,132,252,0.15);
  border-color: var(--ct-fiction-accent);
}

/* fiction card image is now handled by .hero-image--card in the hero image system */

/* Content area with left accent bar */
.ct-fiction-card__body {
  padding: 1.1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  border-left: 3px solid var(--ct-fiction-accent);
}

.ct-fiction-card__series {
  font-size: 0.69rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ct-fiction-accent) !important;
  -webkit-text-fill-color: var(--ct-fiction-accent);
}

.ct-fiction-card__title {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.3;
  margin: 0;
}
body.light .ct-fiction-card__title,
body:not(.dark) .ct-fiction-card__title { color: #0F172A; }
body.dark .ct-fiction-card__title        { color: #E6EDF3; }

.ct-fiction-card__desc {
  font-size: 0.855rem;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}
body.light .ct-fiction-card__desc,
body:not(.dark) .ct-fiction-card__desc { color: #475569; }
body.dark .ct-fiction-card__desc        { color: #94A3B8; }

.ct-fiction-card__date {
  font-size: 0.75rem;
  opacity: 0.5;
  margin-top: auto;
  padding-top: 0.4rem;
}

/* ============================================================
   PROJECT CARDS
   ============================================================ */
.ct-project-card {
  border-radius: 0.75rem;
  padding: 1.35rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  border: 1px solid transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  text-decoration: none !important;
  height: 100%;
}

body.light .ct-project-card,
body:not(.dark) .ct-project-card {
  background: #FFFFFF;
  border-color: #E2E8F0;
}
body.dark .ct-project-card {
  background: #111827;
  border-color: #1E2D45;
}

.ct-project-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(52,211,153,0.15);
  border-color: var(--ct-projects-accent);
}

.ct-project-card__icon {
  font-size: 1.6rem;
  line-height: 1;
}

.ct-project-card__title {
  font-size: 1rem;
  font-weight: 700;
  margin: 0;
}
body.light .ct-project-card__title,
body:not(.dark) .ct-project-card__title { color: #0F172A; }
body.dark .ct-project-card__title        { color: #E6EDF3; }

.ct-project-card__desc {
  font-size: 0.855rem;
  line-height: 1.6;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
body.light .ct-project-card__desc,
body:not(.dark) .ct-project-card__desc { color: #475569; }
body.dark .ct-project-card__desc        { color: #94A3B8; }

.ct-project-card__links {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-top: auto;
}

.ct-project-card__link {
  font-size: 0.78rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: var(--ct-projects-accent) !important;
  -webkit-text-fill-color: var(--ct-projects-accent);
}
.ct-project-card__link:hover { text-decoration: underline; }

/* ============================================================
   SECTION LIST PAGES (blog, personalblog)
   ============================================================ */
.ct-list-page {
  padding: 2.5rem 0 5rem;
}

.ct-list-header {
  padding-bottom: 2rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid rgba(128,128,128,0.12);
}

.ct-list-header__eyebrow {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 0.6rem;
}

/* Section-coloured eyebrows — gradient as accent label */
.ct-list-header--tech .ct-list-header__eyebrow     { color: var(--ct-tech-accent); }
.ct-list-header--personal .ct-list-header__eyebrow { color: var(--ct-personal-accent); }
.ct-list-header--fiction .ct-list-header__eyebrow  { color: var(--ct-fiction-accent); }
.ct-list-header--projects .ct-list-header__eyebrow { color: var(--ct-projects-accent); }

.ct-list-header__title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 0.75rem;
}

.ct-list-header__desc {
  font-size: 1rem;
  line-height: 1.7;
  max-width: 62ch;
  opacity: 0.75;
  margin: 0;
}

/* Post row (blog / personalblog list items) */
.ct-post-row {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.ct-post-item {
  display: flex;
  gap: 1.5rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid rgba(128,128,128,0.1);
  transition: background 0.15s;
  align-items: flex-start;
}

.ct-post-item:hover .ct-post-item__title {
  color: var(--ct-gradient-from);
}

/* list thumbnail is now handled by .hero-image--list in the hero image system */

.ct-post-item__body {
  flex: 1;
  min-width: 0;
}

.ct-post-item__meta {
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  margin-bottom: 0.4rem;
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  align-items: center;
}
body.light .ct-post-item__meta,
body:not(.dark) .ct-post-item__meta { color: #64748B; }
body.dark .ct-post-item__meta        { color: #64748B; }

.ct-meta-sep { opacity: 0.4; }

.ct-post-item__title {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 0.35rem;
  transition: color 0.15s;
}
body.light .ct-post-item__title,
body:not(.dark) .ct-post-item__title { color: #0F172A; }
body.dark .ct-post-item__title        { color: #E6EDF3; }

.ct-post-item__excerpt {
  font-size: 0.875rem;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
body.light .ct-post-item__excerpt,
body:not(.dark) .ct-post-item__excerpt { color: #475569; }
body.dark .ct-post-item__excerpt        { color: #94A3B8; }

/* ============================================================
   SINGLE PAGES
   ============================================================ */
.ct-single {
  padding: 2.5rem 0 5rem;
}

.ct-single__header {
  padding-bottom: 2rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid rgba(128,128,128,0.12);
}

.ct-single__eyebrow {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}
.ct-single--tech .ct-single__eyebrow      { color: var(--ct-tech-accent); }
.ct-single--personal .ct-single__eyebrow  { color: var(--ct-personal-accent); }
.ct-single--fiction .ct-single__eyebrow   { color: var(--ct-fiction-accent); }
.ct-single--projects .ct-single__eyebrow  { color: var(--ct-projects-accent); }

.ct-single__title {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 1rem;
}

.ct-single__meta {
  font-size: 0.83rem;
  opacity: 0.6;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
}
.ct-single__meta-sep { opacity: 0.4; }

/* single page hero image is now handled by .hero-image--single in the hero image system */

/* ============================================================
   PROSE / ARTICLE BODY
   ============================================================ */
.ct-prose {
  max-width: var(--ct-prose-width);
  font-size: 1.05rem;
  line-height: 1.8;
}
body.light .ct-prose,
body:not(.dark) .ct-prose { color: #1E293B; }
body.dark .ct-prose        { color: #CBD5E1; }

.ct-prose h1, .ct-prose h2, .ct-prose h3,
.ct-prose h4, .ct-prose h5, .ct-prose h6 {
  margin-top: 2em;
  margin-bottom: 0.5em;
}
.ct-prose h2 {
  font-size: 1.5rem;
  border-bottom: 2px solid rgba(123,63,228,0.2);
  padding-bottom: 0.35em;
}

.ct-prose code {
  font-size: 0.875em;
  padding: 0.15em 0.4em;
  border-radius: 0.3em;
}
body.light .ct-prose code,
body:not(.dark) .ct-prose code { background: #F1F5F9; color: #7B3FE4; }
body.dark .ct-prose code        { background: #1E2D45; color: #C084FC; }

.ct-prose pre {
  border-radius: 0.75rem;
  padding: 1.25rem 1.5rem;
  overflow-x: auto;
  font-size: 0.875rem;
  line-height: 1.7;
  margin: 1.5em 0;
}
body.light .ct-prose pre,
body:not(.dark) .ct-prose pre { background: #1E293B; color: #E2E8F0; }
body.dark .ct-prose pre        { background: #0D1321; color: #CBD5E1; }

.ct-prose pre code {
  background: transparent;
  color: inherit;
  padding: 0;
  font-size: inherit;
}

.ct-prose blockquote {
  border-left: 4px solid var(--ct-gradient-from);
  padding-left: 1.25rem;
  margin-left: 0;
  font-style: italic;
  opacity: 0.85;
}

.ct-prose img {
  max-width: 100%;
  border-radius: 0.5rem;
  margin: 1.5em 0;
}

.ct-prose table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.9em;
}
.ct-prose th, .ct-prose td {
  padding: 0.65rem 0.875rem;
  border: 1px solid rgba(128,128,128,0.2);
  text-align: left;
}
.ct-prose th { font-weight: 600; }
body.light .ct-prose th,
body:not(.dark) .ct-prose th { background: #F1F5F9; }
body.dark .ct-prose th        { background: #1E2D45; }

/* TOC sidebar */
.ct-toc {
  border-radius: 0.75rem;
  padding: 1.25rem 1.5rem;
  margin-bottom: 2rem;
  font-size: 0.875rem;
}
body.light .ct-toc,
body:not(.dark) .ct-toc { background: #F1F5F9; border: 1px solid #E2E8F0; }
body.dark .ct-toc        { background: #111827; border: 1px solid #1E2D45; }

.ct-toc__title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 0.75rem;
  color: var(--ct-gradient-from);
}
.ct-toc nav ul { padding-left: 1rem; }
.ct-toc nav li { margin: 0.25rem 0; }
.ct-toc nav a  { text-decoration: none; opacity: 0.8; }
.ct-toc nav a:hover { opacity: 1; text-decoration: underline; }

/* Tags */
.ct-tags { margin: 2rem 0; }

.ct-tag {
  display: inline-block;
  padding: 0.2rem 0.65rem;
  border-radius: 99px;
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
  margin: 0.2rem 0.2rem 0.2rem 0;
  transition: background 0.15s ease, color 0.15s ease;
}
body.light .ct-tag,
body:not(.dark) .ct-tag { background: #F1F5F9; color: #475569; border: 1px solid #CBD5E1; }
body.dark .ct-tag        { background: #1E2D45; color: #94A3B8; border: 1px solid #2D4060; }

.ct-tag:hover {
  background: var(--ct-gradient-from);
  color: #fff !important;
  -webkit-text-fill-color: #fff;
  border-color: transparent;
}

/* Fiction chapter navigation */
.ct-chapter-nav {
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(128,128,128,0.12);
  flex-wrap: wrap;
}

.ct-chapter-nav__link {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  text-decoration: none;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  max-width: 48%;
  border: 1px solid transparent;
  transition: border-color 0.2s, background 0.2s;
}
body.light .ct-chapter-nav__link,
body:not(.dark) .ct-chapter-nav__link { background: #F8FAFC; border-color: #E2E8F0; }
body.dark .ct-chapter-nav__link        { background: #111827; border-color: #1E2D45; }
.ct-chapter-nav__link:hover { border-color: var(--ct-fiction-accent); }

.ct-chapter-nav__dir {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ct-fiction-accent) !important;
  -webkit-text-fill-color: var(--ct-fiction-accent);
}

.ct-chapter-nav__title {
  font-size: 0.9rem;
  font-weight: 600;
}
body.light .ct-chapter-nav__title,
body:not(.dark) .ct-chapter-nav__title { color: #0F172A; }
body.dark .ct-chapter-nav__title        { color: #E6EDF3; }

/* ============================================================
   SOCIAL SHARE
   ============================================================ */
.ct-share { margin: 2rem 0; }

.ct-share__title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.55;
  margin-bottom: 0.5rem;
}

.ct-share__links { display: flex; gap: 0.65rem; flex-wrap: wrap; }

.ct-share__link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.35rem 0.85rem;
  border-radius: 0.4rem;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
body.light .ct-share__link,
body:not(.dark) .ct-share__link { background: #F1F5F9; color: #475569 !important; -webkit-text-fill-color: #475569; }
body.dark .ct-share__link        { background: #1E2D45; color: #94A3B8 !important; -webkit-text-fill-color: #94A3B8; }
.ct-share__link:hover {
  background: var(--ct-gradient);
  color: #fff !important;
  -webkit-text-fill-color: #fff;
}

/* ============================================================
   SCROLL PROGRESS BAR
   ============================================================ */
.progress {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 3px;
  z-index: 9999;
  background: transparent;
}
.progress-bar {
  background: var(--ct-gradient) !important;
  height: 3px;
}

/* ============================================================
   PAGINATION
   ============================================================ */
.ct-pagination {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  padding: 2.5rem 0;
  flex-wrap: wrap;
}

.ct-pagination .page-link {
  border-radius: 0.4rem;
  padding: 0.4rem 0.9rem;
  font-size: 0.875rem;
  font-weight: 600;
  border: 1.5px solid transparent;
}
body.light .ct-pagination .page-link,
body:not(.dark) .ct-pagination .page-link { border-color: #CBD5E1; }
body.dark .ct-pagination .page-link        { border-color: #2D4060; }

.ct-pagination .page-item.active .page-link {
  /* Gradient on active pagination — intentional */
  background: var(--ct-gradient);
  border-color: transparent;
  color: #fff;
}

/* ============================================================
   FOOTER
   ============================================================ */
footer {
  border-top: 1px solid rgba(128,128,128,0.1);
}

/* ============================================================
   CERTIFICATIONS PAGE
   ============================================================ */
.ct-cert-card {
  border-radius: 0.75rem;
  border: 1px solid transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  height: 100%;
}
body.light .ct-cert-card,
body:not(.dark) .ct-cert-card { background: #FFFFFF; border-color: #E2E8F0; }
body.dark .ct-cert-card        { background: #111827; border-color: #1E2D45; }

.ct-cert-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(123,63,228,0.15);
  border-color: var(--ct-gradient-from);
  text-decoration: none;
}

.ct-cert-card__img {
  max-width: 100%;
  max-height: 110px;
  object-fit: contain;
}

.ct-cert-card__label {
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.65;
  text-align: center;
}
body.light .ct-cert-card__label,
body:not(.dark) .ct-cert-card__label { color: #0F172A; }
body.dark .ct-cert-card__label        { color: #E6EDF3; }

/* ============================================================
   UTILITY & RESPONSIVE
   ============================================================ */
.ct-container {
  max-width: var(--ct-site-max);
  margin: 0 auto;
  padding: 0 1.5rem;
}

@media (max-width: 768px) {
  .ct-hero        { padding: 3rem 0 2.5rem; }
  .ct-section     { padding: 2.25rem 0; }
  .ct-section--alt { padding: 2.25rem 0; }
  .ct-list-page   { padding: 1.75rem 0 3rem; }
}
