/* ==========================================================================
   assets/css/style.css
   Artistic, editorial, independent section-card architecture for Guillermo Sahonero
   Discrete snap cards in center + dedicated interactive stage on the right
   ========================================================================== */

:root {
  --bg-color: #fcfcfc;
  --bg-surface: #ffffff;
  --bg-subtle: #f3f4f6;
  --text-main: #111827;
  --text-muted: #4b5563;
  --text-dim: #9ca3af;
  --accent: #2563eb;
  --link-color: #2563eb;
  --border: #e5e7eb;
  --border-subtle: rgba(0, 0, 0, 0.08);
  --shadow-subtle: 0 15px 35px rgba(0, 0, 0, 0.06);
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-serif: "Newsreader", "Georgia", "Cambria", serif;
  --font-display: "Instrument Serif", "Newsreader", Georgia, serif;
  --font-mono: ui-monospace, "SFMono-Regular", Menlo, Monaco, Consolas, monospace;
}

[data-theme="dark"] {
  --bg-color: #0f1115;
  --bg-surface: #141820;
  --bg-subtle: #1a202c;
  --text-main: #f9fafb;
  --text-muted: #9ca3af;
  --text-dim: #6b7280;
  --accent: #3b82f6;
  --link-color: #93c5fd;
  --border: #232936;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --shadow-subtle: 0 20px 45px rgba(0, 0, 0, 0.5);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg-color: #0f1115;
    --bg-surface: #141820;
    --bg-subtle: #1a202c;
    --text-main: #f9fafb;
    --text-muted: #9ca3af;
    --text-dim: #6b7280;
    --accent: #3b82f6;
    --link-color: #93c5fd;
    --border: #232936;
    --border-subtle: rgba(255, 255, 255, 0.08);
    --shadow-subtle: 0 20px 45px rgba(0, 0, 0, 0.5);
  }
}

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

html {
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.7;
  display: flex;
  height: 100vh;
  overflow: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Custom Minimal Scrollbar */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background-color: var(--border);
  border-radius: 999px;
}

/* App 3-Column Architecture */
.app-container {
  display: flex;
  height: 100vh;
  width: 100%;
  overflow: hidden;
}

/* 1. Left Sidebar: Pure, Minimal Typography */
.sidebar {
  width: 270px;
  flex-shrink: 0;
  height: 100vh;
  padding: 2.75rem 1.8rem 2rem 2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-right: 1px solid var(--border-subtle);
  background-color: var(--bg-color);
  z-index: 40;
}

.branding h1 {
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  margin-bottom: 0.35rem;
  color: var(--text-main);
}

.branding p {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.45;
  margin-bottom: 1.35rem;
}

.menu {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.menu a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.98rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.18s ease;
  display: flex;
  align-items: center;
  padding: 0.45rem 0.75rem;
  border-radius: 6px;
  border-left: 3px solid transparent;
  margin-left: -0.75rem;
}

.menu a:hover {
  color: var(--text-main);
  background: var(--bg-subtle);
}

.menu a.active {
  color: var(--accent);
  background: rgba(37, 99, 235, 0.08);
  border-left-color: var(--accent);
  font-weight: 600;
}

[data-theme="dark"] .menu a.active {
  background: rgba(59, 130, 246, 0.12);
  color: #93c5fd;
  border-left-color: #3b82f6;
}

.sidebar-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-subtle);
  margin-top: auto;
}

/* Sleek Typographic Action for Download CV (No Outline, No Background) */
.sidebar-cv-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.15rem 0;
  background: transparent;
  border: none;
  outline: none;
  box-shadow: none;
  color: var(--accent);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.2s ease, transform 0.2s ease;
  text-align: left;
  width: auto;
}

.sidebar-cv-cta:hover {
  color: var(--link-color);
  transform: translateX(3px);
  background: transparent;
  border: none;
  box-shadow: none;
}

[data-theme="dark"] .sidebar-cv-cta {
  background: transparent;
  border: none;
  box-shadow: none;
  color: #93c5fd;
}

[data-theme="dark"] .sidebar-cv-cta:hover {
  background: transparent;
  border: none;
  box-shadow: none;
  color: #bfdbfe;
}

.theme-toggle-btn {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 0.84rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  transition: color 0.2s ease, background 0.2s ease;
  padding: 0.35rem 0.65rem;
  border-radius: 6px;
  outline: none;
}

.theme-toggle-btn:hover {
  color: var(--text-main);
  background: var(--bg-subtle);
}

.cv-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0;
  background: transparent;
  border: none;
  outline: none;
  box-shadow: none;
  color: var(--accent);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.2s ease, transform 0.2s ease;
  text-align: left;
  width: auto;
}
.cv-btn:hover {
  color: var(--link-color);
  transform: translateX(3px);
  background: transparent;
  border: none;
  outline: none;
  box-shadow: none;
}

/* 2. Center Column: Independent Section-Card Mechanics (Wheel) */
.wheel-container {
  flex: 1 1 54%;
  max-width: 860px;
  min-width: 460px;
  height: 100vh;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
  position: relative;
  padding: 0 2.5rem;
}

/* Independent Snap Section */
.snap-section {
  height: 100vh;
  scroll-snap-align: center;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 2.5rem 1rem;
  position: relative;
}

/* Independent Card Container with signature accent border */
.content-card {
  width: 100%;
  padding: 1.5rem 0 1.5rem 2rem;
  position: relative;
  max-height: 80vh;
  overflow-y: auto;
  border-left: 2px solid var(--border-subtle);
  transition: border-color 0.4s ease;
}

.snap-section.is-active .content-card,
.content-card:hover {
  border-left: 2px solid var(--accent);
}

.section-label {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
  display: block;
}

h2 {
  font-size: 2.1rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  margin-bottom: 1.5rem;
  color: var(--text-main);
  line-height: 1.25;
}

p {
  line-height: 1.8;
  margin-bottom: 1.3rem;
  color: var(--text-muted);
  font-size: 1.05rem;
}

a {
  color: var(--link-color);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, color 0.2s ease;
}
a:hover {
  border-bottom-color: var(--link-color);
}

/* Distinct interactive styling for inline narrative links in cards */
.content-card p a {
  color: var(--link-color);
  text-decoration: underline;
  text-decoration-color: rgba(37, 99, 235, 0.35);
  text-underline-offset: 3px;
  font-weight: 500;
  transition: all 0.18s ease;
}

.content-card p a:hover {
  text-decoration-color: var(--link-color);
  color: var(--accent);
}

[data-theme="dark"] .content-card p a {
  color: #93c5fd;
  text-decoration-color: rgba(147, 197, 253, 0.4);
}

[data-theme="dark"] .content-card p a:hover {
  color: #bfdbfe;
  text-decoration-color: #93c5fd;
}

/* Publications Type Toggle (Papers vs Abstracts) */
.pub-type-toggle {
  display: inline-flex;
  gap: 0.25rem;
  background: var(--border-subtle);
  padding: 0.25rem;
  border-radius: 6px;
  margin-bottom: 1.25rem;
}

.type-toggle-btn {
  background: transparent;
  border: none;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  padding: 0.4rem 0.85rem;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.type-toggle-btn:hover {
  color: var(--text-main);
}
.type-toggle-btn.active {
  background: var(--bg-surface);
  color: var(--accent);
  font-weight: 600;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

/* Minimalist Publications Feed */
.pubs-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.5rem 0 0.8rem 0;
}

.filter-tab {
  background: none;
  border: none;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-dim);
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.filter-tab:hover {
  color: var(--text-main);
}
.filter-tab.active {
  color: var(--accent);
  font-weight: 600;
  background: rgba(37, 99, 235, 0.08);
}

.pubs-search {
  width: 100%;
  padding: 0.5rem 0;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-main);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
  outline: none;
  transition: border-color 0.2s ease;
}
.pubs-search:focus {
  border-bottom-color: var(--accent);
}
.pubs-search::placeholder {
  color: var(--text-dim);
}

/* Year Accordion Architecture */
.year-group.year-accordion {
  margin: 1.5rem 0 0.8rem 0;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 0.5rem;
}

.year-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  list-style: none;
  user-select: none;
  padding: 0.4rem 0.2rem;
  transition: color 0.18s ease;
}

.year-summary::-webkit-details-marker,
.year-summary::marker {
  display: none;
  content: "";
}

.year-summary:hover .year-heading-text {
  color: var(--accent);
}

.year-heading-text {
  font-family: var(--font-sans);
  font-size: 1.22rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-main);
  transition: color 0.18s ease;
}

.year-chevron {
  font-size: 0.82rem;
  color: var(--text-dim);
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), color 0.18s ease;
  display: inline-block;
}

.year-accordion[open] > .year-summary .year-chevron {
  transform: rotate(0deg);
  color: var(--accent);
}

.year-accordion:not([open]) > .year-summary .year-chevron {
  transform: rotate(-90deg);
}

.year-content {
  padding-top: 0.75rem;
}

/* Smart Author Truncation & Interactive Toggle */
.authors-wrap {
  display: inline;
}

.authors-toggle-btn {
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 600;
  font-family: var(--font-mono);
  padding: 0.12rem 0.42rem;
  border-radius: 4px;
  cursor: pointer;
  margin-left: 0.35rem;
  vertical-align: 1px;
  line-height: 1.2;
  transition: all 0.18s ease;
  display: inline-block;
  outline: none;
}

.authors-toggle-btn:hover {
  background: rgba(37, 99, 235, 0.08);
  border-color: var(--accent);
}

[data-theme="dark"] .authors-toggle-btn {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.15);
  color: #93c5fd;
}

[data-theme="dark"] .authors-toggle-btn:hover {
  background: rgba(147, 197, 253, 0.15);
  border-color: #93c5fd;
  color: #bfdbfe;
}

.year-heading {
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--text-main);
  margin: 2rem 0 1rem 0;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--border-subtle);
}

.publication-item {
  margin-bottom: 1.6rem;
  padding-bottom: 0.8rem;
}

.paper-citation {
  font-family: var(--font-serif);
  font-size: 1.02rem;
  line-height: 1.65;
  color: var(--text-main);
  margin-bottom: 0.45rem;
}

.paper-citation strong {
  font-family: var(--font-sans);
  font-weight: 600;
}

.paper-citation em {
  color: var(--text-muted);
}

.paper-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  margin-top: 0.35rem;
}

.paper-btn {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  font-size: 0.78rem;
  font-weight: 600;
  border-radius: 4px;
  text-decoration: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  background: transparent;
  cursor: pointer;
  transition: all 0.2s ease;
}
.paper-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.paper-btn-primary {
  border-color: var(--accent);
  color: var(--accent);
}
.paper-btn-primary:hover {
  background: var(--accent);
  color: #ffffff;
}

/* Teaching & Experience Items */
.teaching-group {
  margin-bottom: 2rem;
}

.teaching-group h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.2rem;
}

.teaching-subtitle {
  font-size: 0.88rem;
  color: var(--text-dim);
  margin-bottom: 0.75rem;
}

.editorial-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.editorial-item {
  position: relative;
  padding-left: 1.2rem;
  font-size: 0.98rem;
  color: var(--text-muted);
}
.editorial-item::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--accent);
}
.editorial-item strong {
  color: var(--text-main);
}

/* 3. Right Interactive Stage (Third Column) */
.interactive-stage {
  width: 350px;
  flex-shrink: 0;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.8rem;
  border-left: 1px dashed var(--border-subtle);
  background-color: var(--bg-color);
  position: relative;
  overflow: hidden;
}

.stage-panel {
  position: absolute;
  width: 100%;
  max-width: 320px;
  opacity: 0;
  transform: scale(0.97) translateY(8px);
  pointer-events: none;
  transition: opacity 0.45s cubic-bezier(0.16, 1, 0.3, 1), transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

.stage-panel.is-active {
  opacity: 1;
  transform: scale(1) translateY(0);
  pointer-events: auto;
}

/* Stage Header */
.stage-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-subtle);
}

.stage-panel-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
}

.stage-panel-badge {
  font-size: 0.75rem;
  color: var(--accent);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Interactive Tech Grid on Home Stage */
.interactive-skills-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.8rem;
}

.interactive-skill-pill {
  font-size: 0.8rem;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  background: var(--bg-subtle);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
  transition: all 0.2s ease;
  cursor: default;
}
.interactive-skill-pill:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* 3D Bloch Simulator Visual Stage */
.bloch-stage-wrap {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.bloch-canvas-stage {
  width: 280px;
  height: 230px;
  display: block;
  margin: 0 auto;
}

.bloch-stage-controls {
  width: 100%;
  margin-top: 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.stage-btn-row {
  display: flex;
  justify-content: center;
  gap: 0.4rem;
}

.stage-pill-btn {
  padding: 0.3rem 0.65rem;
  font-size: 0.78rem;
  font-weight: 600;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}
.stage-pill-btn:hover,
.stage-pill-btn.active {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(37, 99, 235, 0.08);
}

.stage-slider-row {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  text-align: left;
}

.stage-slider-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-dim);
}

.stage-slider {
  width: 100%;
  accent-color: var(--accent);
  cursor: pointer;
}

.stage-readout-row {
  display: flex;
  justify-content: space-around;
  font-size: 0.75rem;
  color: var(--text-dim);
  padding: 0.35rem 0;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}
.stage-readout-row strong {
  color: var(--text-main);
  font-family: var(--font-mono);
}

.mrijs-link-btn {
  display: inline-block;
  margin-top: 0.4rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 6px;
  padding: 0.45rem 1rem;
  text-align: center;
  transition: all 0.2s ease;
}
.mrijs-link-btn:hover {
  background: var(--accent);
  color: #ffffff;
}

/* Toast */
.site-toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  padding: 0.7rem 1.2rem;
  background: var(--text-main);
  color: var(--bg-color);
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
  z-index: 100;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}
.site-toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* Mobile Header */
.mobile-header {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 60px;
  background-color: var(--bg-color);
  border-bottom: 1px solid var(--border-subtle);
  z-index: 50;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
}

.mobile-header h2 {
  font-size: 1.2rem;
  margin: 0;
}

.burger-btn {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 5px;
}
.burger-btn span {
  display: block;
  width: 25px;
  height: 2px;
  background-color: var(--text-main);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.mobile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 35;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.mobile-overlay.nav-open {
  display: block;
  opacity: 1;
}

/* Mobile Simulator Trigger Pill */
.mobile-tool-pill {
  display: none;
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  background: var(--accent);
  color: #ffffff;
  padding: 0.65rem 1.15rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
  z-index: 42;
  cursor: pointer;
  border: none;
}

/* Responsive Breakpoints */
@media (max-width: 1100px) {
  .interactive-stage {
    display: none;
  }
  .wheel-container {
    max-width: 100%;
    padding: 0 1.5rem;
  }
}

@media (max-width: 900px) {
  body {
    flex-direction: column;
    overflow-y: auto;
    height: auto;
  }
  .app-container {
    flex-direction: column;
    height: auto;
    overflow: visible;
  }
  .mobile-header {
    display: flex;
  }
  .mobile-tool-pill {
    display: block;
  }
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 280px;
    transform: translateX(-100%);
    padding-top: 5.5rem;
    transition: transform 0.3s ease;
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.2);
  }
  .sidebar.nav-open {
    transform: translateX(0);
  }
  .wheel-container {
    height: auto;
    overflow-y: visible;
    scroll-snap-type: none;
    padding-top: 60px;
  }
  .snap-section {
    height: auto;
    min-height: 80vh;
    scroll-snap-align: none;
    padding: 2rem 0;
  }
  .content-card {
    max-height: none;
    overflow-y: visible;
  }
}

/* ==========================================================================
   Blog Section in Wheel Container
   ========================================================================== */
.blog-entries-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.blog-entry-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-left: 3px solid var(--accent);
  border-radius: 10px;
  padding: 1.6rem 1.8rem;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease, border-color 0.2s ease;
  position: relative;
  cursor: pointer;
}

.blog-entry-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.08);
  border-color: var(--accent);
}

[data-theme="dark"] .blog-entry-card:hover {
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45);
}

.blog-entry-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  gap: 0.75rem;
}

.blog-entry-date {
  font-size: 0.84rem;
  color: var(--text-dim);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  line-height: 1;
}

.blog-entry-badge {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: rgba(37, 99, 235, 0.1);
  color: var(--accent);
  border: 1px solid rgba(37, 99, 235, 0.3);
  padding: 0.22rem 0.65rem;
  border-radius: 9999px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
}

[data-theme="dark"] .blog-entry-badge {
  background: rgba(59, 130, 246, 0.18);
  color: #93c5fd;
  border-color: rgba(147, 197, 253, 0.4);
}

.blog-entry-title {
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 0.75rem;
  letter-spacing: -0.015em;
}

.blog-entry-title a {
  color: var(--text-main);
  text-decoration: none;
  transition: color 0.2s ease;
}

.blog-entry-card:hover .blog-entry-title a,
.blog-entry-title a:hover {
  color: var(--accent);
}

.blog-entry-desc {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.blog-entry-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding-top: 1rem;
  border-top: 1px dashed var(--border-subtle);
}

/* Tag Pills */
.blog-tags-row {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
  align-items: center;
}

.blog-tag-pill {
  font-size: 0.76rem;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
  transition: all 0.2s ease;
  line-height: 1.3;
}

.blog-tag-pill:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: rgba(37, 99, 235, 0.06);
}

/* Solid Filled Call-to-Action Button */
.blog-primary-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 1.25rem;
  background: var(--accent);
  color: #ffffff;
  border-radius: 6px;
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid var(--accent);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}

.blog-primary-btn:hover {
  background: #1d4ed8;
  border-color: #1d4ed8;
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}

/* Right Stage Blog Companion Styling */
.blog-stage-chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.25rem;
}

.blog-stage-topic-chip {
  font-size: 0.74rem;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  transition: all 0.15s ease;
  text-decoration: none;
}

.blog-stage-topic-chip:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.blog-stage-series-box {
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 0.85rem 1rem;
  margin-bottom: 1rem;
}

.blog-stage-series-title {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.blog-stage-series-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.8rem;
  color: var(--text-main);
}

.blog-stage-series-list li {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.blog-stage-num {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-dim);
}

/* Smooth Page Transitions */
body {
  opacity: 1;
  transition: opacity 0.25s ease;
}

body.page-is-exiting {
  opacity: 0;
}

/* ==========================================================================
   Home Hero Section, Profile Avatar & Impact Metrics
   ========================================================================== */

/* ==========================================================================
   Editorial Home Architecture: Single-Column Essay & Mathematical Centerpiece
   ========================================================================== */

/* Lateral Stage Profile Photo & Simulation */
.stage-profile-wrap {
  width: 100%;
  margin-bottom: 0.85rem;
}

.stage-profile-photo {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  display: block;
}

.home-simulation-frame {
  margin: 0;
  width: 100%;
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.home-simulation-frame:hover {
  border-color: rgba(37, 99, 235, 0.3);
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.08);
}

.home-spin-canvas {
  width: 100%;
  height: 340px;
  display: block;
  cursor: grab;
}

.home-spin-canvas:active {
  cursor: grabbing;
}

.home-simulation-caption {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.75rem 0.9rem;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--text-dim);
  line-height: 1.5;
}

.home-simulation-caption .caption-pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.6);
  animation: pulse-dot 2s infinite ease-in-out;
  flex-shrink: 0;
  margin-top: 0.35rem;
}

.home-simulation-caption .caption-text {
  flex: 1;
}

.home-simulation-caption .katex {
  font-size: 0.9em;
}

.caption-pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.6);
  animation: pulse-dot 2s infinite ease-in-out;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

/* Long-Form Prose */
.home-prose {
  margin-bottom: 2.8rem;
}

.home-prose p {
  font-size: 1.08rem;
  line-height: 1.85;
  color: var(--text-muted);
  margin-bottom: 1.6rem;
}

.home-prose p.home-lead {
  font-size: 1.15rem;
  color: var(--text-main);
  line-height: 1.85;
}

.home-prose p a {
  color: var(--text-main);
  text-decoration: underline;
  text-decoration-color: rgba(37, 99, 235, 0.35);
  text-underline-offset: 4px;
  transition: all 0.18s ease;
}

.home-prose p a:hover {
  color: var(--accent);
  text-decoration-color: var(--accent);
}

/* Pathways of Exploration */
.home-pathways {
  border-top: 1px solid var(--border-subtle);
  padding-top: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.home-pathway-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.95rem 1.1rem;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid transparent;
}

.home-pathway-item:hover {
  background: var(--bg-subtle);
  border-color: var(--border-subtle);
  transform: translateX(4px);
}

.pathway-content {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.pathway-title {
  font-family: var(--font-sans);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-main);
  letter-spacing: -0.01em;
}

.pathway-subtitle {
  font-size: 0.82rem;
  color: var(--text-dim);
}

.pathway-arrow {
  font-size: 1.15rem;
  color: var(--text-dim);
  transition: transform 0.2s ease, color 0.2s ease;
}

.home-pathway-item:hover .pathway-arrow {
  color: var(--accent);
  transform: translateX(3px);
}

/* Bio Section Portrait */
.bio-header-layout {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.bio-portrait-wrap {
  flex-shrink: 0;
}

.bio-portrait-img {
  width: 95px;
  height: 95px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid var(--border-subtle);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

/* Right Stage: Skills Categories & Affiliations Box */
.stage-skills-category {
  margin-bottom: 0.75rem;
}

.stage-skills-cat-title {
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim);
  margin-bottom: 0.4rem;
}

.stage-affiliations-title {
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim);
  margin-bottom: 0.5rem;
}

.stage-affiliations-grid {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.stage-affiliation-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.45rem 0.65rem;
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  font-size: 0.8rem;
  color: var(--text-main);
  text-decoration: none;
  transition: all 0.18s ease;
}

.stage-affiliation-link:hover {
  background: var(--bg-surface);
  border-color: var(--accent);
  color: var(--accent);
  transform: translateX(2px);
}

.stage-affiliation-link .aff-acronym {
  font-weight: 700;
  color: var(--accent);
  min-width: 58px;
}

.stage-affiliation-link .aff-name {
  flex: 1;
  color: var(--text-muted);
  font-size: 0.74rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 0.45rem;
}

.stage-affiliation-link .aff-arrow {
  color: var(--text-dim);
  font-size: 0.75rem;
}

.stage-affiliation-link:hover .aff-arrow {
  color: var(--accent);
}

@media (max-width: 768px) {
  .home-hero-layout {
    flex-direction: column-reverse;
    gap: 1rem;
    align-items: flex-start;
  }
  .home-profile-photo {
    width: 80px;
    height: 80px;
  }
  .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
