/* Default (Dark Mode) */
:root {
  --background-color: #00000090;
  --text-color: #fffff0;
  --highlight-color: #929292;
  --accent-color: #c25553;
  --accent2-color: #a94442b2;
  --accent3-color: #fffff0;
  --sun-color: #fffb00b2;
  /* Link colors for dark mode */
  /* Gradient colors for dark mode */
  --gradient-top: linear-gradient(to bottom,
          rgba(16, 12, 12, 1) 0%,
          rgba(16, 12, 12, 0.95) 40%,
          rgba(16, 12, 12, 0.8) 50%,
          rgba(16, 12, 12, 0.5) 65%,
          rgba(16, 12, 12, 0.2) 85%,
          rgba(16, 12, 12, 0) 100%);
  --gradient-bottom: linear-gradient(to top,
          rgba(16, 12, 12, 1) 0%,
          rgba(16, 12, 12, 0.95) 40%,
          rgba(16, 12, 12, 0.8) 50%,
          rgba(16, 12, 12, 0.5) 65%,
          rgba(16, 12, 12, 0.2) 85%,
          rgba(16, 12, 12, 0) 100%);
}

/* Light Mode */
:root[data-theme="light"],
body[data-theme="light"],
.light-theme {
  --background-color: #ffffff;
  --text-color: #100c0c;
  --highlight-color: #5a5a5a;
  --accent-color: #d46b6a;
  --accent2-color: #a94442b2;
  --accent3-color: #2c2c2c;
  --sun-color: #fffd77b2;
  /* Link colors for light mode */
  /* Gradient colors for light mode */
  --gradient-top: linear-gradient(to bottom,
          rgba(255, 255, 255, 1) 0%,
          rgba(255, 255, 255, 0.85) 30%,
          rgba(255, 255, 255, 0.75) 40%,
          rgba(255, 255, 255, 0.5) 50%,
          rgba(255, 255, 255, 0.2) 60%,
          rgba(255, 255, 255, 0) 70%);
  --gradient-bottom: linear-gradient(to top,
          rgba(255, 255, 255, 1) 0%,
          rgba(255, 255, 255, 0.85) 30%,
          rgba(255, 255, 255, 0.75) 40%,
          rgba(255, 255, 255, 0.5) 50%,
          rgba(255, 255, 255, 0.2) 60%,
          rgba(255, 255, 255, 0) 70%);
}

/* Apply CSS Variables to Links */
a {
  color: var(--accent-color);
  text-decoration: none;
  /* Remove underline */
  transition: color 0.3s ease;
  /* Smooth color transition */
}

a:hover {
  color: var(--accent2-color);
}

/* Apply transition to the body */
body, main {
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Apply transition to specific elements if needed */
.toc, .section {
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* TOC specific transitions */
.toc {
  transition: background-color 0.3s ease, color 0.3s ease;
  box-sizing: border-box;
}

.toc-title, .toc-subtitle {
  transition: color 0.3s ease;
}

.toc a {
  transition: color 0.3s ease, font-weight 0.3s ease, font-size 0.3s ease;
}

html, body {
  font-size: 16px;
  background-color: var(--background-color);
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  margin: 0;
  padding: 0;
  scroll-behavior: smooth;
  overflow: hidden;
}

/* Text selection theme color */
::selection {
  background-color: var(--accent-color);
  color: var(--background-color);
}

::-moz-selection {
  background-color: var(--accent-color);
  color: var(--background-color);
}

/* Code selection — match site accent color */
pre[class*="language-"] *::selection,
pre[class*="language-"] *::-moz-selection,
code[class*="language-"] *::selection,
code[class*="language-"] *::-moz-selection {
  background-color: var(--accent-color) !important;
  background: var(--accent-color) !important;
  color: var(--background-color) !important;
  text-shadow: none !important;
  -webkit-text-fill-color: var(--background-color) !important;
}

/* Rounded corners for images and videos */
img, video {
  border-radius: 0.5rem;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

img:hover {
  opacity: 0.9;
  transform: scale(1.02);
}

/* Ensure inline images also get rounded corners */
.section img,
.section video,
main img,
main video {
  border-radius: 0.5rem;
}

/* Image Lightbox Modal */
.image-modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0);
  backdrop-filter: blur(0px);
  opacity: 0;
  transition: opacity 0.3s ease, background-color 0.3s ease, backdrop-filter 0.3s ease;
  align-items: center;
  justify-content: center;
}

.image-modal.show {
  display: flex;
  background-color: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(4px);
  opacity: 1;
}

.image-modal-content {
  margin: auto;
  display: block;
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
  border-radius: 0.5rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.image-modal.show .image-modal-content {
  opacity: 1;
  transform: scale(1);
}

.image-modal-caption {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  color: white;
  text-align: center;
  padding: 0.5rem 1rem;
  background-color: rgba(0, 0, 0, 0.7);
  border-radius: 0.25rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  max-width: 80%;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.image-modal.show .image-modal-caption {
  opacity: 1;
}

.image-modal-close {
  position: absolute;
  top: 1.5rem;
  right: 2rem;
  color: #f1f1f1;
  font-size: 2rem;
  font-weight: 300;
  cursor: pointer;
  z-index: 2001;
  transition: color 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
  line-height: 1;
  opacity: 0;
  transform: scale(0.8);
  font-family: 'Inter', sans-serif;
}

.image-modal.show .image-modal-close {
  opacity: 1;
  transform: scale(1);
}

.image-modal-close:hover,
.image-modal-close:focus {
  color: #fff;
  transform: scale(1.1);
  text-decoration: none;
}


/* Mobile Content */
#mobile-content {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
  background-color: var(--background-color);
  color: var(--text-color);
  padding: 2rem;
  text-align: center;
}

.mobile-container {
  max-width: 500px;
  width: 100%;
}

.mobile-title {
  font-family: "Newsreader", serif;
  font-size: 4rem;
  font-weight: 400;
  margin: 0 0 0.5rem 0;
  color: var(--text-color);
}

.mobile-subtitle {
  font-family: "Raleway", serif;
  font-size: 1.25rem;
  font-weight: 300;
  margin: 0 0 2rem 0;
  color: var(--text-color);
  opacity: 0.8;
}

.mobile-social {
  display: flex;
  flex-direction: row;
  gap: 1.5rem;
  margin-bottom: 2rem;
  justify-content: center;
}

.mobile-link {
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  color: var(--accent-color);
  text-decoration: none;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.mobile-link:hover {
  opacity: 0.7;
  color: var(--accent-color);
}

.mobile-message {
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  color: var(--text-color);
  opacity: 0.6;
  margin: 0;
}

/* Mobile responsive adjustments */
@media (max-width: 480px) {
  .mobile-title {
    font-size: 3.5rem;
  }
  
  .mobile-subtitle {
    font-size: 1.1rem;
  }
  
}

/* TOC Parameters */
.toc {
  position: fixed;
  top: 0;
  left: 0;
  width: 25rem;
  height: 100%;
  background-color: var(--background-color);
  padding: 1.875rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  z-index: 1000;
  overflow: hidden;
  /* Reserve space so the TOC list doesn't run under the git/email icons */
  padding-bottom: 7rem;
}

.toc-title {
  font-family: "Newsreader", serif;
  font-size: 3.375rem;
  font-weight: 350;
  padding: 0;
  margin-top: 2rem;
  margin-bottom: 0;
  margin-left: 3.125rem;
  color: var(--text-color);
}

.toc-subtitle {
  font-family: "Raleway", serif;
  font-size: 0.75rem;
  font-weight: 350;
  line-height: 1.4;
  padding: 0;
  margin: 0;
  margin-left: 3.125rem;
  color: var(--text-color);
}

.toc h2 {
  transition: 200ms ease;
}

.toc.initial-page .toc-title {
  transition: 200ms ease;
  color: var(--text-color);
  font-weight: 400;
}

.toc.initial-page .toc-subtitle {
  transition: 200ms ease;
  color: var(--text-color);
  font-weight: 400;
}

/* TOC list */
.toc ul {
  list-style: none;
  padding: 0;
  margin: 0;
  margin-left: 1.25rem;
  width: calc(100% - 1.25rem);
  margin-top: 1.25rem;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  scroll-snap-type: y mandatory;
}

.toc ul::-webkit-scrollbar {
  display: none;
}

/* Custom scrollbar */
.toc-scrollbar {
  position: absolute;
  width: 2px;
  left: 4rem;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.toc-scrollbar-thumb {
  position: absolute;
  width: 100%;
  background: var(--accent-color);
  border-radius: 1px;
  pointer-events: auto;
  cursor: ns-resize;
  transition: background-color 0.2s ease;
}

.toc-scrollbar-thumb:hover {
  background: var(--accent-color);
}

.toc ul li {
  width: 100%;
  scroll-snap-align: start;
}

/* Keep the divider aligned with links */
.toc ul hr {
  margin-left: 1.875rem !important;
}

/* Each link */
.toc a {
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  font-weight: 475;
  text-decoration: none;
  display: inline-block;
  padding: 0.625rem 0;
  transition: color 0.3s ease, font-weight 0.3s ease, font-size 0.3s ease;
  color: var(--text-color);
  /* Compensate for the TOC scroll area shift */
  margin-left: 1.875rem;
  width: fit-content;
}

/* Hover TOC link box color change */
.toc a:hover {
  font-size: 0.92rem;
  font-weight: 475;
  color: var(--accent-color);
}


/* When page is active */
.toc a.active {
  font-family: 'Inter', sans-serif;
  color: var(--accent-color);
  font-size: 0.92rem;
  font-weight: 550;
}

/* "About" TOC item — always first, italicized and enlarged to set it apart.
   Needs element+class specificity (.toc a.toc-link-about) to beat the
   plain ".toc a" rule above, which a bare ".toc-link-about" class cannot. */
.toc a.toc-link-about {
  font-style: italic;
  font-size: 0.90rem;
}

.toc a.toc-link-about:hover,
.toc a.toc-link-about.active {
  font-size: 0.95rem;
}

/* Content */
main {
  height: 100vh;
  margin-left: 25rem;
  padding: 1.875rem;
  padding-top: 0rem;
  flex-grow: 1;
  display: flex;
  align-items: center;
  flex-direction: column;
  background-color: var(--background-color);
  color: var(--text-color);
  overflow-y: auto;
  transition: opacity 0.15s ease, background-color 0.3s ease, color 0.3s ease;
}

/* Gradient blur overlays */
main::before {
  content: '';
  position: fixed;
  top: 0;
  left: calc(25rem - 1.5rem);
  width: calc(100vw - 23.5rem);
  height: 6rem;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  mask-image: linear-gradient(to right, transparent, black 1.5rem, black),
              linear-gradient(to bottom, black 0%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent, black 1.5rem, black),
                      linear-gradient(to bottom, black 0%, transparent 100%);
  mask-composite: intersect;
  -webkit-mask-composite: source-in;
  z-index: 1001;
  pointer-events: none;
}

main::after {
  content: '';
  position: fixed;
  bottom: 0;
  left: calc(25rem - 1.5rem);
  width: calc(100vw - 23.5rem);
  height: 9rem;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  mask-image: linear-gradient(to right, transparent, black 1.5rem, black),
              linear-gradient(to top, black 0%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent, black 1.5rem, black),
                      linear-gradient(to top, black 0%, transparent 100%);
  mask-composite: intersect;
  -webkit-mask-composite: source-in;
  z-index: 1001;
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.3s ease;
}

main.at-bottom::after {
  opacity: 0;
}

main.has-model-viewer::before,
main.has-model-viewer::after {
  display: none;
}

.section {
  width: 43.75rem;
  max-width: 100%;
  padding: 1.25rem;
  margin-top: 4rem;
  line-height: 150%;
  box-sizing: border-box;
  margin-left: -5rem;
}

/* Projects Screen */
#projects-screen {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* Default Content */
.default-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100vh;
  text-align: center;
  padding: 2rem;
  box-sizing: border-box;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Home model viewer */
.home-model-viewer-container {
  position: relative;
  width: 100%;
  height: calc(100vh - 6rem);
  margin-left: -5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.home-model-viewer-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4rem;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  mask-image: linear-gradient(to bottom, black 0%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, black 0%, transparent 100%);
  z-index: 1;
  pointer-events: none;
}

.home-model-viewer-container::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4rem;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  mask-image: linear-gradient(to top, black 0%, transparent 100%);
  -webkit-mask-image: linear-gradient(to top, black 0%, transparent 100%);
  z-index: 1;
  pointer-events: none;
}

#home-model-viewer {
  flex: 1;
  width: 100%;
  min-height: 0;
  background-color: transparent;
  --progress-bar-color: var(--accent-color);
  --progress-bar-height: 2px;

  /* Fade the model itself out at every edge so a model that runs past the
     frame dissolves into the page instead of being cut off. */
  --fade-y: 7rem;
  --fade-x: 5rem;
  -webkit-mask-image:
    linear-gradient(to bottom, transparent 0, #000 var(--fade-y), #000 calc(100% - var(--fade-y)), transparent 100%),
    linear-gradient(to right, transparent 0, #000 var(--fade-x), #000 calc(100% - var(--fade-x)), transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(to bottom, transparent 0, #000 var(--fade-y), #000 calc(100% - var(--fade-y)), transparent 100%),
    linear-gradient(to right, transparent 0, #000 var(--fade-x), #000 calc(100% - var(--fade-x)), transparent 100%);
  mask-composite: intersect;
}


.default-content h2 {
  font-family: "Raleway", serif;
  font-size: 2.5rem;
  font-weight: 300;
  margin-bottom: 1rem;
  color: var(--text-color);
  transition: color 0.3s ease;
}

.default-content p {
  font-family: 'Inter', sans-serif;
  font-size: 1.1rem;
  color: var(--text-color);
  opacity: 0.8;
  max-width: 600px;
  line-height: 1.6;
  transition: color 0.3s ease;
}

/** SCROLL BAR **/
/* Width - thinner for horizontal scrollbars */
::-webkit-scrollbar {
  width: 0.3rem;
  height: 0.15rem; /* Thinner horizontal scrollbar */
}

/* Track */
::-webkit-scrollbar-track {
  margin-top: 2.75rem;
  margin-bottom: 4rem;
  box-shadow: none;
  border-radius: 10px;
}

/* Handle */
::-webkit-scrollbar-thumb {
  background: var(--accent-color);
  border-radius: 10px;
}

/* Horizontal scrollbar specific styling */
pre::-webkit-scrollbar,
.section::-webkit-scrollbar {
  height: 0.15rem; /* Even thinner for code blocks */
}

pre::-webkit-scrollbar-thumb,
.section::-webkit-scrollbar-thumb {
  background: var(--accent-color);
  border-radius: 0.075rem;
}

@keyframes shake {
  0% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  50% { transform: translateX(5px); }
  75% { transform: translateX(-5px); }
  100% { transform: translateX(0); }
}

.shake {
  animation: shake 0.4s ease-in-out;
}

/* Code Block Styling */
code {
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.9em;
}

/* Inline code */
:not(pre) > code {
  background-color: var(--code-inline-bg);
  color: var(--code-inline-color);
  padding: 0.2em 0.4em;
  border-radius: 0.25rem;
  font-size: 0.9em;
}

/* Code blocks */
pre {
  background-color: var(--code-block-bg);
  color: var(--code-block-color);
  padding: 1rem;
  border-radius: 0.5rem;
  overflow-x: auto;
  margin: 1rem 0;
  line-height: 1.5;
}

pre code {
  background: none;
  padding: 0;
  color: inherit;
  font-size: 0.9em;
}

/* Prism.js code block styling */
pre[class*="language-"] {
  background-color: var(--code-block-bg) !important;
  border: 1px solid var(--code-border);
}

/* Ensure Prism theme doesn't override background */
pre[class*="language-"] code[class*="language-"] {
  background-color: transparent !important;
}

/* Ensure Prism never overrides the themed code background */
pre[class*="language-"],
pre[class*="language-"] code {
  background-color: var(--code-block-bg) !important;
}

/* Code block variables for dark mode */
:root {
  --code-inline-bg: rgba(255, 255, 255, 0.1);
  --code-inline-color: #e0e0e0;
  --code-block-bg: #1e1e1e;
  --code-block-color: #d4d4d4;
  --code-border: #3e3e3e;
}

/* Code block variables for light mode */
:root[data-theme="light"],
.light-theme {
  --code-inline-bg: #f5f5f5;
  --code-inline-color: #333;
  --code-block-bg: #f5f5f5;
  --code-block-color: #333;
  --code-border: #ddd;
}

/* Prism.js syntax highlighting colors for dark mode */
/* Base color for code (but not tokens - tokens have their own colors) */
:root:not([data-theme="light"]):not(.light-theme) pre[class*="language-"] code[class*="language-"]:not(.token),
:root:not([data-theme="light"]):not(.light-theme) code[class*="language-"]:not(.token) {
  color: #d4d4d4;
  text-shadow: none !important;
  background: transparent !important;
}

:root:not([data-theme="light"]):not(.light-theme) .token.comment,
:root:not([data-theme="light"]):not(.light-theme) .token.prolog,
:root:not([data-theme="light"]):not(.light-theme) .token.doctype,
:root:not([data-theme="light"]):not(.light-theme) .token.cdata {
  color: #6a9955 !important;
  text-shadow: none !important;
  background: transparent !important;
}

:root:not([data-theme="light"]):not(.light-theme) .token.punctuation {
  color: #d4d4d4 !important;
  text-shadow: none !important;
  background: transparent !important;
}

:root:not([data-theme="light"]):not(.light-theme) .token.property,
:root:not([data-theme="light"]):not(.light-theme) .token.tag,
:root:not([data-theme="light"]):not(.light-theme) .token.boolean,
:root:not([data-theme="light"]):not(.light-theme) .token.number,
:root:not([data-theme="light"]):not(.light-theme) .token.constant,
:root:not([data-theme="light"]):not(.light-theme) .token.symbol,
:root:not([data-theme="light"]):not(.light-theme) .token.deleted {
  color: #569cd6 !important;
  text-shadow: none !important;
  background: transparent !important;
}

:root:not([data-theme="light"]):not(.light-theme) .token.selector,
:root:not([data-theme="light"]):not(.light-theme) .token.attr-name,
:root:not([data-theme="light"]):not(.light-theme) .token.string,
:root:not([data-theme="light"]):not(.light-theme) .token.char,
:root:not([data-theme="light"]):not(.light-theme) .token.builtin,
:root:not([data-theme="light"]):not(.light-theme) .token.inserted {
  color: #ce9178 !important;
  text-shadow: none !important;
  background: transparent !important;
}

:root:not([data-theme="light"]):not(.light-theme) .token.operator,
:root:not([data-theme="light"]):not(.light-theme) .token.entity,
:root:not([data-theme="light"]):not(.light-theme) .token.url,
:root:not([data-theme="light"]):not(.light-theme) .language-css .token.string,
:root:not([data-theme="light"]):not(.light-theme) .style .token.string {
  color: #d4d4d4 !important;
  text-shadow: none !important;
  background: transparent !important;
}

:root:not([data-theme="light"]):not(.light-theme) .token.atrule,
:root:not([data-theme="light"]):not(.light-theme) .token.attr-value,
:root:not([data-theme="light"]):not(.light-theme) .token.keyword {
  color: #c586c0 !important;
  text-shadow: none !important;
  background: transparent !important;
}

:root:not([data-theme="light"]):not(.light-theme) .token.function,
:root:not([data-theme="light"]):not(.light-theme) .token.class-name {
  color: #dcdcaa !important;
  text-shadow: none !important;
  background: transparent !important;
}

:root:not([data-theme="light"]):not(.light-theme) .token.regex,
:root:not([data-theme="light"]):not(.light-theme) .token.important,
:root:not([data-theme="light"]):not(.light-theme) .token.variable {
  color: #d7ba7d !important;
  text-shadow: none !important;
  background: transparent !important;
}

/* Ensure Prism theme doesn't add unwanted effects */
pre[class*="language-"] .token,
code[class*="language-"] .token,
pre[class*="language-"] .token *,
code[class*="language-"] .token * {
  text-shadow: none !important;
  background: transparent !important;
  box-shadow: none !important;
  filter: none !important;
  -webkit-text-stroke: none !important;
  -webkit-text-fill-color: currentColor !important;
}

pre[class*="language-"],
code[class*="language-"] {
  text-shadow: none !important;
}

/* KaTeX math styling */
.katex {
  font-size: 1.1em;
}

.katex-display {
  margin: 1.5em 0;
  overflow-x: auto;
  overflow-y: hidden;
}

.Hotspot {
  background: rgba(0, 0, 0, 0.75);
  border: none;
  border-radius: 999px;
  padding: 6px 10px;
  color: white;
  font-size: 12px;
  font-weight: 500;
  pointer-events: auto;
  transform: translate(-50%, -50%);
}

.HotspotAnnotation {
  white-space: nowrap;
}

/* Loading Bar */
#loading-bar {
  position: fixed;
  top: 0;
  left: 25rem;
  right: 0;
  height: 2px;
  z-index: 1002;
  opacity: 0;
  pointer-events: none;
  overflow: hidden;
  transition: opacity 0.15s ease;
}

#loading-bar.loading {
  opacity: 1;
}

#loading-bar::after {
  content: '';
  position: absolute;
  top: 0;
  left: -60%;
  width: 60%;
  height: 100%;
  background-color: var(--accent-color);
}

#loading-bar.loading::after {
  animation: loading-sweep 1.2s ease-in-out infinite;
}

@keyframes loading-sweep {
  0%   { left: -60%; }
  100% { left: 110%; }
}

/* About text (replaces the TOC list) */
.toc-about {
  margin-left: 3.125rem;
  width: calc(100% - 3.125rem);
  margin-top: 1.25rem;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  color: var(--text-color);
  font-size: 0.85rem;
  line-height: 1.5;
}

.toc-about::-webkit-scrollbar {
  display: none;
}

.toc-about p {
  margin: 0;
}

.toc-about .toc-contact {
  margin-bottom: 2.25rem;
}

.toc-job {
  margin-bottom: 1.1rem;
}

.toc-about .toc-job-desc {
  margin-top: 0.15rem;
  opacity: 0.75;
}

.toc-job-head,
.toc-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0 0.75rem;
}

.toc-job-date {
  margin-left: auto;
  white-space: nowrap;
}

/* Mobile: job list */
.mobile-about {
  text-align: center;
  font-size: 0.95rem;
  line-height: 1.5;
}

.mobile-about p {
  margin: 0;
}

.mobile-about .toc-job {
  margin-bottom: 1.1rem;
}

.mobile-about .toc-job-desc {
  margin-top: 0.15rem;
  opacity: 0.75;
}

/* Let the mobile page scroll on short screens (body is overflow: hidden) */
#mobile-content {
  box-sizing: border-box;
  height: 100dvh;
  overflow-y: auto;
}

.mobile-container {
  margin: auto;
}

/* Contact, pinned to the bottom of the sidebar like a job entry */
.toc-contact-bottom {
  position: absolute;
  left: 5rem;          /* lines up with the title and job text */
  bottom: 5.5rem;
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.5;
}

.toc-contact-bottom .toc-job-desc {
  margin: 0.15rem 0 0;
  opacity: 0.95;
}