/* =============================================================================
   Emilio Lingg — Portfolio Stylesheet
   ============================================================================= */

/* =============================================================================
   1. Custom Properties
   ============================================================================= */

:root {
  --bg:           #07060f;
  --surface:      rgba(255, 255, 255, 0.03);
  --border:       rgba(167, 139, 250, 0.18);
  --text-primary: #f3f0ff;
  --text-muted:   rgba(243, 240, 255, 0.45);
  --text-faint:   rgba(243, 240, 255, 0.2);
  --accent:       #a78bfa;
  --accent-dim:   rgba(139, 92, 246, 0.22);
  --glow-soft:    rgba(139, 92, 246, 0.12);
}

/* =============================================================================
   2. Reset & Base
   ============================================================================= */

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

html {
  scroll-behavior: smooth;
}

html, body {
  height: 100%;
}

body {
  background-color: var(--bg);
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  padding: 3rem 1.5rem 2.5rem;
  position: relative;
  overflow-x: hidden;
}

/* Impressum needs more bottom breathing room */
body.impressum-page {
  padding-bottom: 5rem;
}

/* =============================================================================
   3. Background Glow Orbs
   ============================================================================= */

body::before,
body::after {
  content: '';
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}

body::before {
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, rgba(109, 40, 217, 0.18) 0%, transparent 65%);
  top: -260px;
  left: -220px;
}

body::after {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.13) 0%, transparent 65%);
  bottom: -220px;
  right: -180px;
}

.orb-mid {
  position: fixed;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(76, 29, 149, 0.14) 0%, transparent 65%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 0;
}

/* =============================================================================
   4. Page Layout
   ============================================================================= */

.page-wrap {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 720px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.8rem;
}

/* =============================================================================
   5. Panel — Shared Glassmorphism Card
   ============================================================================= */

.panel {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  box-shadow:
    0 0 0 1px rgba(167, 139, 250, 0.06),
    0 8px 32px rgba(0, 0, 0, 0.5),
    0 40px 100px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

/* =============================================================================
   6. Business Card
   ============================================================================= */

.card {
  max-width: 460px;
  padding: 3.5rem 2.5rem 2.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* ── Profile Photo ── */

.photo-wrap {
  width: 112px;
  height: 112px;
  border-radius: 50%;
  overflow: hidden;
  position: relative;
  margin-bottom: 1.8rem;
  flex-shrink: 0;
}

.photo-wrap::before {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: conic-gradient(
    from 0deg,
    #6d28d9,
    #a78bfa,
    #c4b5fd,
    #8b5cf6,
    #6d28d9
  );
  z-index: -1;
  animation: spin 6s linear infinite;
}

.photo-wrap::after {
  content: '';
  position: absolute;
  inset: -12px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.35) 0%, transparent 70%);
  z-index: -2;
  pointer-events: none;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.photo-inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  background: #1a1030;
  position: relative;
  outline: 2px solid var(--bg);
  outline-offset: -2px;
}

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

.photo-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(167, 139, 250, 0.25);
  font-size: 2.8rem;
}

/* ── Name & Role ── */

.name {
  font-family: 'EB Garamond', serif;
  font-size: 2.2rem;
  font-weight: 400;
  letter-spacing: 0.03em;
  color: var(--text-primary);
  line-height: 1.1;
}

.role {
  font-size: 0.68rem;
  font-weight: 300;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--accent);
  margin-top: 0.55rem;
  opacity: 0.85;
}

/* =============================================================================
   7. Divider
   ============================================================================= */

.divider {
  width: 48px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  margin: 1.8rem auto;
  opacity: 0.7;
}

/* =============================================================================
   8. Social Links
   ============================================================================= */

.links {
  display: flex;
  gap: 1.2rem;
  align-items: center;
  justify-content: center;
}

.link-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  text-decoration: none;
  color: var(--text-muted);
  transition: color 0.25s ease, transform 0.25s ease, text-shadow 0.25s ease;
  padding: 0.5rem 0.6rem;
}

.link-item:hover {
  color: var(--accent);
  transform: translateY(-2px);
  text-shadow: 0 0 18px rgba(167, 139, 250, 0.6);
}

.link-item i {
  font-size: 1.45rem;
}

.link-item span {
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 400;
}

.link-separator {
  width: 1px;
  height: 28px;
  background: var(--border);
}

/* =============================================================================
   9. Email
   ============================================================================= */

.email-wrap {
  margin-top: 1.6rem;
}

.email-link {
  font-size: 0.78rem;
  font-weight: 300;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.25s ease, border-color 0.25s ease;
}

.email-link:hover {
  color: var(--text-primary);
  border-bottom-color: rgba(167, 139, 250, 0.35);
}

/* =============================================================================
   10. Section Label
   ============================================================================= */

.section-label {
  font-size: 0.62rem;
  font-weight: 300;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--accent);
  opacity: 0.85;
  margin-bottom: 1.2rem;
}

/* =============================================================================
   11. About Section
   ============================================================================= */

.about-section {
  padding: 2rem 2.5rem;
}

.about-section p {
  font-size: 0.88rem;
  font-weight: 300;
  line-height: 1.85;
  color: var(--text-muted);
}

.about-section p strong {
  color: var(--text-primary);
  font-weight: 400;
}

/* =============================================================================
   12. Two-Column Content Grid
   ============================================================================= */

.content-grid {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.8rem;
}

.sub-section {
  padding: 2rem 2rem;
}

/* =============================================================================
   13. Timeline
   ============================================================================= */

.timeline {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  margin-top: 0.2rem;
}

.timeline-item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.timeline-year {
  font-size: 0.6rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  opacity: 0.75;
  font-weight: 300;
}

.timeline-title {
  font-size: 0.83rem;
  font-weight: 400;
  color: var(--text-primary);
  line-height: 1.45;
}

.timeline-sub {
  font-size: 0.75rem;
  font-weight: 300;
  color: var(--text-muted);
  line-height: 1.4;
}

.timeline-bullets {
  margin-top: 0.35rem;
  padding-left: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  list-style: none;
}

.timeline-bullets li {
  font-size: 0.75rem;
  font-weight: 300;
  color: var(--text-muted);
  line-height: 1.4;
  position: relative;
  padding-left: 0.85rem;
}

.timeline-bullets li::before {
  content: '–';
  position: absolute;
  left: 0;
  color: var(--accent);
  opacity: 0.5;
}

.timeline-separator {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, var(--border), transparent);
  margin-top: 0.2rem;
}

/* =============================================================================
   14. Demo Reel
   ============================================================================= */

.reel-section {
  padding: 2rem 2.5rem;
}

.reel-embed {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
}

.reel-embed iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

.reel-placeholder {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  border: 1px dashed rgba(167, 139, 250, 0.25);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  color: var(--text-faint);
}

.reel-placeholder i {
  font-size: 2rem;
  opacity: 0.4;
}

.reel-placeholder span {
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 300;
}

/* =============================================================================
   15. Footer
   ============================================================================= */

.footer {
  position: relative;
  z-index: 1;
  margin-top: 2.2rem;
  text-align: center;
}

.footer a {
  font-size: 0.62rem;
  font-weight: 300;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-faint);
  text-decoration: none;
  transition: color 0.25s ease;
}

.footer a:hover {
  color: var(--text-muted);
}

/* =============================================================================
   16. Page: Impressum
   ============================================================================= */

.impressum-back,
.impressum-main {
  position: relative;
  z-index: 1;
}

/* Back navigation */
.impressum-back {
  width: 100%;
  max-width: 560px;
  margin-bottom: 2.5rem;
}

.impressum-back a {
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-faint);
  text-decoration: none;
  transition: color 0.2s ease;
}

.impressum-back a::before {
  content: '← ';
}

.impressum-back a:hover {
  color: var(--text-muted);
}

/* Main container */
.impressum-main {
  width: 100%;
  max-width: 560px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 3rem 2.5rem;
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  box-shadow:
    0 0 0 1px rgba(167, 139, 250, 0.05),
    0 8px 32px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* The divider sits right after the subtitle — collapse top margin */
.impressum-main .divider {
  margin-top: 0;
  margin-bottom: 2.5rem;
}

/* Page title & subtitle */
.impressum-page-title {
  font-family: 'EB Garamond', serif;
  font-size: 2.4rem;
  font-weight: 400;
  letter-spacing: 0.03em;
  color: var(--text-primary);
  margin-bottom: 0.35rem;
}

.impressum-page-subtitle {
  font-size: 0.65rem;
  font-weight: 300;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--accent);
  opacity: 0.8;
  margin-bottom: 2rem;
}

/* Section heading */
.impressum-section-title {
  font-size: 0.6rem;
  font-weight: 400;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--accent);
  opacity: 0.75;
  margin-bottom: 0.7rem;
}

/* Section body text */
.impressum-section {
  margin-bottom: 1.8rem;
}

.impressum-section p,
.impressum-section address {
  font-size: 0.8rem;
  font-weight: 300;
  line-height: 1.9;
  color: var(--text-muted);
  font-style: normal;
}

.impressum-section a {
  color: var(--text-muted);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s ease;
}

.impressum-section a:hover {
  color: var(--text-primary);
}

/* Horizontal rule */
.impressum-main hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 1.8rem 0;
}

/* Footer note */
.impressum-note {
  font-size: 0.68rem;
  font-weight: 300;
  line-height: 1.8;
  color: var(--text-faint);
  font-style: italic;
  margin-top: 2rem;
  padding-top: 1.8rem;
  border-top: 1px solid var(--border);
}

/* =============================================================================
   17. Responsive
   ============================================================================= */

@media (max-width: 580px) {
  .content-grid {
    grid-template-columns: 1fr;
  }
}

/* =============================================================================
   18. Blog — Back Navigation
   ============================================================================= */

.blog-back {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: min(90vw, 1360px);
  margin-bottom: 2.5rem;
}

.blog-back a {
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-faint);
  text-decoration: none;
  transition: color 0.2s ease;
}

.blog-back a::before {
  content: '← ';
}

.blog-back a:hover {
  color: var(--text-muted);
}

/* =============================================================================
   19. Blog — Listing Page
   ============================================================================= */

.blog-listing-header {
  padding: 2.5rem 2.5rem 2rem;
}

.blog-listing-title {
  font-family: 'EB Garamond', serif;
  font-size: 2.4rem;
  font-weight: 400;
  letter-spacing: 0.03em;
  color: var(--text-primary);
  line-height: 1.1;
  margin-bottom: 0.6rem;
}

.blog-listing-subtitle {
  font-size: 0.82rem;
  font-weight: 300;
  line-height: 1.7;
  color: var(--text-muted);
  margin-top: 0.4rem;
}

/* Blog listing page is wider than the default 720px card layout */
.blog-listing-wrap {
  max-width: min(75vw, 1100px);
}

/* ── Post List ── */

.blog-post-list {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.blog-post-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.6rem 2rem;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
  gap: 1rem;
}

.blog-post-card:hover {
  border-color: rgba(167, 139, 250, 0.35);
  box-shadow:
    0 0 0 1px rgba(167, 139, 250, 0.12),
    0 8px 32px rgba(0, 0, 0, 0.5),
    0 40px 100px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transform: translateY(-1px);
}

.blog-post-card-inner {
  flex: 1;
  min-width: 0;
}

.blog-post-card-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.55rem;
}

.blog-post-date {
  font-size: 0.62rem;
  font-weight: 300;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.blog-post-category {
  font-size: 0.62rem;
  font-weight: 300;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  opacity: 0.75;
}

.post-meta-sep {
  color: var(--text-faint);
  font-size: 0.7rem;
}

.blog-post-title {
  font-family: 'EB Garamond', serif;
  font-size: 1.35rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--text-primary);
  line-height: 1.3;
  margin-bottom: 0.5rem;
}

.blog-post-excerpt {
  font-size: 0.82rem;
  font-weight: 300;
  line-height: 1.7;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.blog-post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.5rem;
}

.post-tag {
  font-size: 0.58rem;
  font-weight: 300;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(167, 139, 250, 0.08);
  border: 1px solid rgba(167, 139, 250, 0.18);
  border-radius: 4px;
  padding: 0.2rem 0.5rem;
  opacity: 0.85;
}

.blog-post-arrow {
  font-size: 1.1rem;
  color: var(--text-faint);
  flex-shrink: 0;
  transition: color 0.2s ease, transform 0.2s ease;
}

.blog-post-card:hover .blog-post-arrow {
  color: var(--accent);
  transform: translateX(3px);
}

/* ── Card Thumbnail ── */

.blog-post-card-thumb {
  width: 130px;
  height: 86px;
  object-fit: cover;
  border-radius: 10px;
  flex-shrink: 0;
  opacity: 0.88;
  transition: opacity 0.2s ease;
}

.blog-post-card:hover .blog-post-card-thumb {
  opacity: 1;
}

/* ── Empty State ── */

.blog-empty {
  padding: 3rem 2.5rem;
  text-align: center;
}

.blog-empty .section-label {
  margin-bottom: 0.6rem;
}

.blog-empty-text {
  font-size: 0.85rem;
  font-weight: 300;
  color: var(--text-muted);
}

/* =============================================================================
   20. Blog — Post Page
   ============================================================================= */

body.post-page {
  padding-bottom: 5rem;
}

/* Post page layout: sidebar TOC + article side by side */
.post-layout {
  display: flex;
  align-items: flex-start;
  gap: 2rem;
  width: 100%;
  max-width: min(90vw, 1360px);
  position: relative;
  z-index: 1;
}

/* Sticky TOC sidebar */
.post-toc-wrap {
  width: 220px;
  flex-shrink: 0;
  position: sticky;
  top: 3rem;
  max-height: calc(100vh - 6rem);
  overflow-y: auto;
  scrollbar-width: none;
}

.post-toc-wrap::-webkit-scrollbar {
  display: none;
}

/* Main article container */
.post-main {
  flex: 1;
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 3rem 2.5rem;
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  box-shadow:
    0 0 0 1px rgba(167, 139, 250, 0.06),
    0 8px 32px rgba(0, 0, 0, 0.5),
    0 40px 100px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

/* ── Post Header ── */

.post-header {
  margin-bottom: 2rem;
}

.post-header .section-label {
  margin-bottom: 0.75rem;
}

.post-title {
  font-family: 'EB Garamond', serif;
  font-size: 2.4rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--text-primary);
  line-height: 1.15;
  margin-bottom: 0.75rem;
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.65rem;
  font-weight: 300;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 1.8rem;
}

.post-tags {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.post-header .divider {
  margin-top: 0;
  margin-bottom: 0;
}

/* ── Post Hero Image ── */

.post-hero {
  margin: 1.8rem 0 0;
}

.post-hero-img {
  width: 100%;
  display: block;
  border-radius: 12px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  opacity: 0.92;
}

/* ── Table of Contents ── */

.post-toc {
  padding: 1.1rem 1.4rem;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.post-toc-title {
  font-size: 0.6rem;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 0.65rem;
}

.post-toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.post-toc-item.post-toc-h0 { padding-left: 0; }
.post-toc-item.post-toc-h1 { padding-left: 1rem; }
.post-toc-item.post-toc-h2 { padding-left: 2rem; }

.post-toc-link {
  display: block;
  padding: 0.15rem 0.4rem;
  font-size: 0.75rem;
  font-weight: 300;
  line-height: 1.5;
  color: var(--text-muted);
  text-decoration: none;
  border-left: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}

.post-toc-link:hover {
  color: var(--text-primary);
  border-left-color: var(--border);
}

.post-toc-link.is-active {
  color: var(--accent);
  border-left-color: var(--accent);
}

/* ── Post Prose — Typography ── */

.post-prose {
  font-size: 0.92rem;
  font-weight: 300;
  line-height: 1.9;
  color: var(--text-muted);
}

.post-prose p {
  margin-bottom: 1.4em;
}

.post-prose p:last-child {
  margin-bottom: 0;
}

.post-prose h2 {
  font-family: 'EB Garamond', serif;
  font-size: 1.55rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--text-primary);
  line-height: 1.25;
  margin-top: 2.5em;
  margin-bottom: 0.8em;
}

.post-prose h3 {
  font-family: 'EB Garamond', serif;
  font-size: 1.22rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--text-primary);
  line-height: 1.3;
  margin-top: 2em;
  margin-bottom: 0.6em;
}

.post-prose h4 {
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  opacity: 0.85;
  margin-top: 1.8em;
  margin-bottom: 0.6em;
}

.post-prose strong {
  color: var(--text-primary);
  font-weight: 400;
}

.post-prose em {
  font-style: italic;
  color: rgba(243, 240, 255, 0.6);
}

.post-prose a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(167, 139, 250, 0.35);
  transition: text-decoration-color 0.2s ease, color 0.2s ease;
}

.post-prose a:hover {
  color: var(--text-primary);
  text-decoration-color: rgba(167, 139, 250, 0.7);
}

/* ── Lists ── */

.post-prose ul,
.post-prose ol {
  padding-left: 1.5rem;
  margin-bottom: 1.4em;
  display: flex;
  flex-direction: column;
  gap: 0.4em;
}

.post-prose ul {
  list-style: none;
  padding-left: 1rem;
}

.post-prose ul li {
  position: relative;
  padding-left: 1rem;
}

.post-prose ul li::before {
  content: '–';
  position: absolute;
  left: 0;
  color: var(--accent);
  opacity: 0.5;
}

.post-prose ol {
  list-style: decimal;
}

.post-prose ol li::marker {
  color: var(--accent);
  opacity: 0.6;
}

/* ── Inline Code ── */

.post-prose code {
  font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
  font-size: 0.82em;
  background: rgba(167, 139, 250, 0.08);
  border: 1px solid rgba(167, 139, 250, 0.14);
  border-radius: 4px;
  padding: 0.12em 0.4em;
  color: var(--accent);
}

/* ── Blockquote ── */

.post-prose blockquote {
  border-left: 2px solid rgba(167, 139, 250, 0.35);
  padding: 0.6rem 0 0.6rem 1.4rem;
  margin: 1.6em 0;
  color: rgba(243, 240, 255, 0.5);
  font-style: italic;
}

.post-prose blockquote p {
  margin-bottom: 0;
}

/* ── Images ── */

.post-prose img {
  width: 100%;
  display: block;
  border-radius: 10px;
  margin: 1.8em 0;
  object-fit: cover;
}

.post-prose figure {
  margin: 2em 0;
}

.post-prose figcaption {
  font-size: 0.72rem;
  font-weight: 300;
  letter-spacing: 0.08em;
  color: var(--text-faint);
  text-align: center;
  margin-top: 0.6rem;
}

/* ── Horizontal Rule ── */

.post-prose hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2.5em 0;
}

/* ── Post Footer ── */

.post-footer {
  margin-top: 2.5rem;
}

.post-footer .divider {
  margin-top: 0;
  margin-bottom: 1.8rem;
}

.post-footer-nav a {
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-faint);
  text-decoration: none;
  transition: color 0.2s ease;
}

.post-footer-nav a:hover {
  color: var(--text-muted);
}

/* =============================================================================
   21. Syntax Highlighting — Rouge / Kramdown
   ============================================================================= */

/*
   Rouge wraps highlighted blocks in:
     <div class="highlight"><pre class="highlight"><code>...</code></pre></div>
   Inside .post-prose, we target .highlight to override the inline code
   styles defined above and apply the full code block treatment.
*/

.post-prose .highlight {
  margin: 1.6em 0;
  border-radius: 12px;
  border: 1px solid rgba(167, 139, 250, 0.12);
  background: rgba(7, 6, 15, 0.85);
  overflow: hidden;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    0 4px 24px rgba(0, 0, 0, 0.4);
}

.post-prose .highlight pre {
  margin: 0;
  padding: 1.4rem 1.6rem;
  overflow-x: auto;
  background: transparent;
  border: none;
}

.post-prose .highlight code {
  font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
  font-size: 0.8rem;
  line-height: 1.7;
  background: transparent;
  border: none;
  padding: 0;
  color: rgba(243, 240, 255, 0.75);
  border-radius: 0;
}

/* ── Rouge Token Colors — Dark Purple Theme ── */

.highlight .p  { color: rgba(243, 240, 255, 0.6); }
.highlight .w  { color: transparent; }

.highlight .c,
.highlight .c1,
.highlight .cm,
.highlight .cp,
.highlight .cs { color: rgba(167, 139, 250, 0.35); font-style: italic; }

.highlight .k,
.highlight .kd,
.highlight .kn,
.highlight .kp,
.highlight .kr,
.highlight .kt { color: #c4b5fd; font-weight: 400; }

.highlight .s,
.highlight .s1,
.highlight .s2,
.highlight .sb,
.highlight .sc,
.highlight .sd,
.highlight .se,
.highlight .sh,
.highlight .sx { color: #86efac; }

.highlight .si { color: #6ee7b7; }

.highlight .m,
.highlight .mb,
.highlight .mf,
.highlight .mh,
.highlight .mi,
.highlight .mo { color: #fbbf24; }

.highlight .o,
.highlight .ow { color: #a78bfa; }

.highlight .nb { color: #93c5fd; }
.highlight .nc { color: #e879f9; }
.highlight .nd { color: #a78bfa; }
.highlight .ne { color: #f87171; }
.highlight .nf,
.highlight .fm { color: #7dd3fc; }
.highlight .nn { color: rgba(243, 240, 255, 0.75); }
.highlight .nv,
.highlight .vc,
.highlight .vg,
.highlight .vi { color: rgba(243, 240, 255, 0.65); }

.highlight .l,
.highlight .ld { color: #86efac; }

.highlight .kc { color: #fb923c; }

.highlight .err { color: #f87171; background: rgba(248, 113, 113, 0.08); }

.highlight .gd { color: #f87171; background: rgba(248, 113, 113, 0.08); }
.highlight .gi { color: #86efac; background: rgba(134, 239, 172, 0.08); }
.highlight .go { color: rgba(243, 240, 255, 0.4); }

/* =============================================================================
   22. Blog — Responsive
   ============================================================================= */

/* On smaller screens, collapse the sidebar TOC into a top block above the article */
@media (max-width: 1100px) {
  .post-layout {
    flex-direction: column;
    align-items: stretch;
    max-width: 100%;
  }

  .post-toc-wrap {
    width: 100%;
    position: static;
    max-height: none;
  }

  .post-toc {
    margin-bottom: 0;
  }
}

/* On smaller screens, drop the wide min(75vw) so the blog fills available space */
@media (max-width: 900px) {
  .blog-listing-wrap,
  .blog-back {
    max-width: 100%;
  }
}

@media (max-width: 700px) {
  .blog-post-card-thumb {
    display: none;
  }

  /* Strip card chrome and go full-bleed on narrow screens */
  body.post-page {
    padding-left: 0;
    padding-right: 0;
  }

  .blog-back {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }

  .post-main {
    border-radius: 0;
    border-left: none;
    border-right: none;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: none;
  }

  .post-hero-img {
    border-radius: 0;
  }
}

@media (max-width: 580px) {
  .post-toc-wrap {
    display: none;
  }

  .post-title {
    font-size: 1.9rem;
  }

  .post-main {
    padding: 2rem 1.5rem;
  }

  .blog-listing-header {
    padding: 2rem 1.5rem 1.5rem;
  }

  .blog-post-card {
    padding: 1.4rem 1.5rem;
  }

  .blog-post-title {
    font-size: 1.15rem;
  }

  .blog-post-arrow {
    display: none;
  }

  .post-prose .highlight pre {
    padding: 1rem 1.2rem;
  }

  .post-prose .highlight code {
    font-size: 0.74rem;
  }
}
