@font-face {
  font-family: 'font';
  src: url('/fonts/font-Thin.otf') format('opentype');
  font-weight: 100;
  font-style: normal;
  font-display: swap;
}

.header-hover-shield {
  position: fixed;
  left: 0;
  right: 0;
  height: 200px;
  pointer-events: auto;
  z-index: 999;
}

@font-face {
  font-family: 'font';
  src: url('/fonts/font-ExtraLight.otf') format('opentype');
  font-weight: 200;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'font';
  src: url('/fonts/font-Light.otf') format('opentype');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'font';
  src: url('/fonts/font-Regular.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'font';
  src: url('/fonts/font-Medium.otf') format('opentype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'font';
  src: url('/fonts/font-SemiBold.otf') format('opentype');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'font';
  src: url('/fonts/font-Bold.otf') format('opentype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

.arabic-text {
  font-family: "Noto Kufi Arabic", sans-serif !important;
  font-optical-sizing: auto;
  font-weight: 600;
  font-style: normal;
}

.japanese-text {
  font-family: "Kiwi Maru", serif !important;
  font-weight: 400;
  font-style: normal;
}

/* Hide default scrollbar */
html {
  scrollbar-width: none;
  -ms-overflow-style: none;
}
html::-webkit-scrollbar {
  display: none;
}

:root {
  font-family: 'font', system-ui, Avenir, Helvetica, Arial, sans-serif;
  line-height: 1.5;
  font-weight: 400;
  /* Global horizontal side padding for layout */
  --side: 40px;
  /* Default top padding follows measured header height */
  --app-pad-top: var(--desktop-header-h, 96px);
  /* Canonical palette */
  --page-light: #EBEBEB;
  --color-light: #FFFFFF;
  --color-dark: #050505;
  --surface-dark: #141414;
  --glass-light-bg: rgba(255, 255, 255, 0.08);
  --glass-light-outline: rgba(255, 255, 255, 0.65);
  --glass-light-shadow: 0 16px 32px rgba(0, 0, 0, 0.12);
  --glass-dark-bg: rgba(20, 20, 20, 0.22);
  --glass-dark-outline: rgba(255, 255, 255, 0.16);
  --glass-dark-shadow: 0 20px 45px rgba(0, 0, 0, 0.6);
  --dark-glass-90: rgba(5, 5, 5, 0.9);
  --dark-glass-95: rgba(5, 5, 5, 0.95);
  /* Light (default) */
  --bg: var(--page-light);
  --panel-bg: var(--color-light);
  --fg: var(--color-dark);
  --border: var(--fg);
  --stroke: transparent;
  --muted: rgba(33, 33, 32, 0.6);
  --password-box-bg: #ffffff;
  font-synthesis: none;
  text-rendering: optimizeLegibility;

  -moz-osx-font-smoothing: grayscale;
  
  /* iOS safe area support */
  padding-left: max(0px, env(safe-area-inset-left));
  padding-right: max(0px, env(safe-area-inset-right));
}

@media (max-width: 834px) {
  :root {
    --side: 23px;
  }
}

:root[data-theme='dark'],
html[data-theme='dark'],
body[data-theme='dark'] {
  --bg: var(--color-dark);
  --fg: var(--color-light);
  --border: var(--fg);
  --panel-bg: var(--surface-dark);
  --stroke: transparent;
  --muted: rgba(235, 235, 235, 0.7);
  --password-box-bg: #141414;
}

.glass-surface {
  position: relative;
  background: var(--glass-light-bg);
  box-shadow:
    var(--glass-light-outline),
    var(--glass-light-shadow);
  backdrop-filter: url(#frosted);
  -webkit-backdrop-filter: url(#frosted);
  transform: translateZ(0);
}

.glass-surface::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.35),
    rgba(255, 255, 255, 0.35) ,
    
  );
  pointer-events: none;
}

:root[data-theme='dark'] .glass-surface {
  background: var(--glass-dark-bg);
}

html,
body {
  /* Ensure the browser canvas uses the themed background, even beyond body height */
  background-color: var(--bg);
  /* iOS specific: prevent zoom on input focus */
  -webkit-text-size-adjust: 100%;
  /* iOS specific: smooth scrolling */
  -webkit-overflow-scrolling: touch;
}

a {
  font-weight: 500;
  color: #888;
}

a:hover {
  opacity: 0.85;
}

/* Keep project cards/rows fully opaque while hovered */
.proj-card,
.project-image a {
  opacity: 1;
}

.proj-card:hover,
.project-image a:hover {
  opacity: 1;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background-color: var(--bg);
  color: var(--fg);
  padding-bottom: 100px;
  overflow-x: hidden;
}

@media (max-width: 640px) {
  body {
    padding-bottom: 0;
    padding-top: 91px;
  }

  body.no-mobile-top-pad {
    padding-top: 0;
  }
}

/* Page-specific bottom spacing helpers */
.projects-list-wrap { 
  padding-bottom: 0;
}
.braindump-page { 
  padding-bottom: 0;
  padding-left: 23px;
  padding-right: 23px;
  box-sizing: border-box;
}

@media (max-width: 640px) {
  .projects-list-wrap { padding-bottom: 0; }
  .braindump-page { padding-bottom: 0; }
  
  /* Mobile: stretch topic buttons */
  .topic-buttons-container button {
    flex: 1;
  }
  
  /* Mobile: stretch message mode buttons */
  .message-mode-buttons-container {
    justify-content: stretch;
  }
}

@media (min-width: 641px) {
  /* Desktop: center buttons, don't stretch */
  .topic-buttons-container {
    justify-content: center;
  }
  
  .topic-buttons-container button {
    flex: 0 1 auto;
  }
  
  .message-mode-buttons-container {
    justify-content: center;
  }
}

/* App component padding: 23px mobile and desktop */
.app-root {
  padding-left: 23px;
  padding-right: 23px;
}

h1 {
  font-size: 3.2em;
  line-height: 1.1;
  text-transform: none;
}

button {
  border-radius: 8px;
  border: 1px solid var(--stroke);
  padding: 0.6em 1.2em;
  font-size: 1em;
  font-weight: 500;
  font-family: inherit;
  background-color: transparent;
  color: inherit;
  cursor: pointer;
  transition: border-color 0.25s;
}
button:hover {
  opacity: 0.9;
}
button:focus,
button:focus-visible {
  outline: 4px auto -webkit-focus-ring-color;
}

/* Desktop search bar entry animation: border width grows in 6 frames + glitchy placeholder */
.desktop-search-bar.searchbar-enter [data-role="search-input"] {
  animation: searchbar-stroke 900ms steps(6, end) forwards;
}

.desktop-search-bar.searchbar-enter input::placeholder {
  animation: searchbar-glitch-text 900ms steps(6, end) forwards;
}

@keyframes searchbar-stroke {
  0% {
    border-right-width: 0;
    border-top-width: 0;
    border-bottom-width: 0;
    border-left-width: 0;
  }
  16.6% {
    border-left-width: 1px;
  }
  33.3% {
    border-left-width: 1px;
    border-top-width: 1px;
  }
  50% {
    border-left-width: 1px;
    border-top-width: 1px;
    border-right-width: 1px;
  }
  66.6% {
    border-left-width: 1px;
    border-top-width: 1px;
    border-right-width: 1px;
    border-bottom-width: 1px;
  }
  83.3% {
    border-width: 1px;
  }
  100% {
    border-width: 1px;
  }
}

@keyframes searchbar-glitch-text {
  0% {
    opacity: 0;
    letter-spacing: 0.3em;
  }
  16.6% {
    opacity: 0.2;
    letter-spacing: 0.25em;
    text-shadow: -3px 0 var(--fg), 3px 0 var(--muted);
  }
  33.3% {
    opacity: 0.4;
    letter-spacing: 0.15em;
    text-shadow: 3px 0 var(--muted), -3px 0 var(--fg);
  }
  50% {
    opacity: 0.6;
    letter-spacing: 0.08em;
    text-shadow: -2px 0 var(--muted), 2px 0 var(--fg);
  }
  66.6% {
    opacity: 0.8;
    letter-spacing: 0.03em;
    text-shadow: 1px 0 var(--fg);
  }
  83.3% {
    opacity: 0.95;
    letter-spacing: 0;
    text-shadow: 0 0 3px var(--fg);
  }
  100% {
    opacity: 1;
    letter-spacing: normal;
    text-shadow: none;
  }
}


/* Animated dots for "chatting now..." */
@keyframes chat-dot-jump {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-2px); }
}

.chat-dots { display: inline-flex; gap: 1px; }
.chat-dot { display: inline-block; width: 0.35em; }
.chat-dot::after { content: '.'; display: inline-block; animation: chat-dot-jump 900ms ease-in-out infinite; }
.chat-dot.dot-1::after { animation-delay: 0ms; }
.chat-dot.dot-2::after { animation-delay: 200ms; }
.chat-dot.dot-3::after { animation-delay: 400ms; }

/* Global typewriter-on-theme-toggle effect */
@keyframes ty-reveal {
  from { max-width: 0ch; }
  to { max-width: var(--ty-ch, 28)ch; }
}

@keyframes ty-caret {
  0%, 49% { border-right-color: currentColor; }
  50%, 100% { border-right-color: transparent; }
}

/* When the root has data-ty (set briefly on theme toggle), animate any element
   explicitly marked with data-tyi (assigned via JS per element). */
:root[data-ty] [data-tyi] {
  display: inline-block;
  vertical-align: bottom;
  white-space: nowrap;
  overflow: hidden;
  max-width: 100%;
  text-overflow: clip;
  max-width: 0ch;
  border-right: 1px solid currentColor; /* caret */
  will-change: width, border-right-color;
  /* Define both animations with matching list lengths */
  animation-name: ty-reveal, ty-caret;
  animation-duration: var(--ty-dur, 1100ms), 700ms;
  animation-timing-function: steps(40, end), step-end;
  animation-iteration-count: 1, infinite;
  animation-delay: var(--ty-delay, 0ms), 0ms;
  animation-fill-mode: both, none;
}

/* Opt-out hook for any element that should not type */
:root[data-ty] [data-no-ty] {
  animation: none !important;
  border-right: none !important;
  white-space: normal !important;
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  :root[data-ty] [data-tyi] {
    animation: none !important;
    border-right: none !important;
  }
}

@media (pointer: fine) {
  html.has-custom-cursor,
  html.has-custom-cursor body {
    cursor: none !important;
  }

  html.has-custom-cursor * {
    cursor: none !important;
  }

  html.has-custom-cursor a,
  html.has-custom-cursor button,
  html.has-custom-cursor [role='button'],
  html.has-custom-cursor input,
  html.has-custom-cursor textarea,
  html.has-custom-cursor select,
  html.has-custom-cursor label {
    cursor: none !important;
  }
}


/* ─── Custom cursor: dual-body gooey ─── */
.custom-cursor {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0;
  transition: opacity 120ms ease;
  mix-blend-mode: difference;
}
.custom-cursor[data-has-label='true'] {
  mix-blend-mode: normal;
}
.custom-cursor.is-visible { opacity: 1; }
.custom-cursor__gooey {
  position: absolute;
  inset: 0;
  mix-blend-mode: inherit;
}

.custom-cursor__body {
  position: absolute;
  left: 0;
  top: 0;
  will-change: transform;
  backface-visibility: hidden;
}
.custom-cursor__circle {
  background: #fff;
  border-radius: 50%;
  will-change: transform, width, height, border-radius;
  backface-visibility: hidden;
  transform: translate(-50%, -50%);
}
.custom-cursor[data-variant='project'] .custom-cursor__circle {
  background: var(--fg);
}
.custom-cursor[data-variant='autopan'] .custom-cursor__circle {
  background: transparent;
}
.custom-cursor[data-variant='avatar-large'] .custom-cursor__circle {
  background: #fff;
}

.custom-cursor__ui {
  position: absolute;
  left: 0;
  top: 0;
  will-change: transform;
  backface-visibility: hidden;
}
.custom-cursor__ui-inner {
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.custom-cursor__label {
  mix-blend-mode: normal;
}

.custom-cursor__label {
  font-family: 'font';
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  line-height: 1;
  color: var(--bg);
  padding: 0 12px;
  white-space: nowrap;
}

.custom-cursor__autopan {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 36px;
}
.custom-cursor__autopan-node {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #fff;
  margin: 2px 0;
}
.custom-cursor__autopan-node.is-active { opacity: 1; }
.custom-cursor__autopan-spine {
    width: 3px;
  height: 18px;
  background: #fff;
  opacity: 0.5;
  display: none;
}

/* ─── Playground command panel scroll styling ─── */
.playground-command-scroll {
  scrollbar-width: thin;
  scrollbar-color: #2d2d2d transparent;
}
.playground-command-scroll::-webkit-scrollbar {
  width: 10px;
}
.playground-command-scroll::-webkit-scrollbar-track {
  background: transparent;
}
.playground-command-scroll::-webkit-scrollbar-thumb {
  background: #2d2d2d;
  border-radius: 0;
}
.playground-command-scroll::-webkit-scrollbar-thumb:hover {
  background: #3a3a3a;
}

/* ─── Loading progress ─── */
.loading-progress {
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-transform: uppercase;
  font-family: 'font';
  letter-spacing: 0.18em;
  gap: 16px;
  box-sizing: border-box;
  padding: 24px;
}
.loading-progress__inner {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: clamp(12px, 1.5vw, 16px);
  color: var(--fg);
}
.loading-progress__label {
  display: inline-block;
}
.loading-progress__percent {
  font-weight: 600;
}
.loading-progress__track {
  width: min(420px, 100%);
  height: 3px;
  background: rgba(0, 0, 0, 0.08);
  position: relative;
  overflow: hidden;
}
:root[data-theme='dark'] .loading-progress__track,
html[data-theme='dark'] .loading-progress__track,
body[data-theme='dark'] .loading-progress__track {
  background: rgba(255, 255, 255, 0.2);
}
.loading-progress__thumb {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  background: currentColor;
  transform-origin: left center;
  transition: width 200ms ease;
}

/* Utility: hide element on mobile */
@media (max-width: 640px) {
  .hide-mobile { display: none !important; }
}

.ascii-ring-overlay {
  pointer-events: none;
  overflow: hidden;
  font-family: monospace;
  font-size: var(--ascii-cell-size, 14px);
  line-height: 1;
  letter-spacing: calc(var(--ascii-cell-size, 14px) * 0.02);
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--ascii-color, currentColor);
  mix-blend-mode: var(--ascii-blend, normal);
}

.ascii-ring-grid {
  display: grid;
  gap: 0;
  width: var(--ascii-width, calc(var(--ascii-cols, 36) * var(--ascii-cell-width, var(--ascii-cell-size, 14px))));
  height: var(--ascii-height, calc(var(--ascii-rows, 36) * var(--ascii-cell-height, var(--ascii-cell-size, 14px))));
  grid-template-columns: repeat(var(--ascii-cols, 36), var(--ascii-cell-width, var(--ascii-cell-size, 14px)));
  grid-template-rows: repeat(var(--ascii-rows, 36), var(--ascii-cell-height, var(--ascii-cell-size, 14px)));
}

.ascii-ring-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1ch;
  height: 100%;
  text-align: center;
  font-weight: 300;
}

/* Brain dump cards */

.dump-card-grid {
  width: 100%;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: clamp(18px, 2vw, 28px);
  justify-items: stretch;
  justify-content: flex-start;
}

@media (max-width: 1280px) {
  .dump-card-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 1040px) {
  .dump-card-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .dump-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.dump-card {
  width: 100%;
  padding: clamp(20px, 2vw + 8px, 32px);
  box-sizing: border-box;
  border-radius: 4px;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.site-footer-strip {
  margin-top: 23px;
  padding: 60px 0 0 0;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

/* Add padding to footer in pages that need it */
.braindump-page ~ .site-footer-strip,
.projects-list-wrap ~ .site-footer-strip {
  padding: 60px 23px 0 23px;
}

/* ProjectId footer should have 23px margins */
.project-detail-page .site-footer-strip {
  padding: 60px 23px 0 23px;
}

.site-footer-strip--ascii {
  margin-top: 120px;
}

.site-footer-line {
  width: 100%;
  height: 1px;
  background: var(--border);
  opacity: 0.4;
}

.site-footer-grid {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) auto;
  gap: 32px;
  text-transform: uppercase;
  align-items: start;
}

.site-footer-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-family: font;
}

.site-footer-col--brand {
  grid-column: 1;
}

.site-footer-trio {
  grid-column: 2;
  display: flex;
  gap: 73px;
  justify-content: flex-end;
}

.site-footer-trio .site-footer-col {
  min-width: 160px;
}

.site-footer-trio .site-footer-col--social {
  text-align: right;
  align-items: flex-end;
}

.site-footer-label {
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.18em;
  color: var(--fg);
}

.site-footer-value {
  font-size: 14px;
  letter-spacing: 0.16em;
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--fg);
}

.site-footer-value a {
  color: inherit;
  text-decoration: none;
}

.site-footer-value a:hover {
  opacity: 0.8;
}

.site-footer-logo-strip {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0;
  margin-top: 60px;
  margin-bottom: 0;
  order: 2;
  padding-right: 0px;
  margin-right: 0px;
  margin-left: 0px;
  padding-left: 0px;
  box-sizing: border-box;
}

.site-footer-logo-cell {
  display: flex;
  justify-content: center;
  align-items: center;
  aspect-ratio: 1 / 1;
  overflow: hidden;
}

.site-footer-logo-frame {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.site-footer-logo-cell img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0.9;
  display: block;
}

.site-footer-ascii {
  font-family: 'font', 'IBM Plex Mono', monospace;
  font-size: 9px;
  line-height: 9px;
  letter-spacing: 0.05em;
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  white-space: pre;
  overflow: hidden;
}

@media (max-width: 640px) {
  .site-footer-strip--ascii .site-footer-line {
    order: 0;
  }

  .site-footer-strip--ascii .site-footer-logo-strip {
    order: 1;
    margin-top: 0;
    margin-bottom: 0;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .site-footer-strip--ascii .site-footer-logo-strip .site-footer-logo-cell:nth-child(n + 4) {
    display: none;
  }

  .site-footer-strip--ascii .site-footer-grid {
    order: 2;
  }

  .site-footer-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
  }

  .site-footer-trio {
    flex-direction: column;
    gap: 20px;
    align-items: flex-start;
  }

  .site-footer-trio .site-footer-col--social {
    text-align: left;
    align-items: flex-start;
  }

  .site-footer-col--brand,
  .site-footer-col--call,
  .site-footer-col--email,
  .site-footer-col--social {
    margin-left: 0;
    text-align: left;
    align-items: flex-start;
  }

  .site-footer-col {
    gap: 8px;
  }

  .site-footer-label,
  .site-footer-value {
    font-size: 14px;
  }
}

@media (max-width: 640px) {
  .dump-card-grid {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
    padding: 0;
  }
  .dump-card {
    grid-column: auto !important;
  }
  .dump-card:hover {
    transform: translateY(-6px) var(--dump-rotation, rotate(1deg)) !important;
  }
}


.dump-detail-page {
  padding: 0 0 150px;
  padding-left: 23px;
  padding-right: 23px;
  display: flex;
  justify-content: flex-start;
  flex-direction: row;
  overflow: visible;
  box-sizing: border-box;
}

.dump-detail {
  width: 100%;
  max-width: 100%;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
  overflow: visible;
}

.dump-detail-header {
  padding-bottom: 13px;
}

.dump-detail-header h1 {
  margin: 0 0 12px 0;
  font-size: clamp(32px, 5vw, 44px);
  line-height: 1.2;
  text-transform: uppercase;
  font-family: font;
}

.dump-detail-excerpt {
  margin: 0 0 16px 0;
  font-size: 18px;
  line-height: 1.6;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

.dump-detail-excerpt--body {
  display: none;
  margin-top: -6px;
  margin-bottom: 28px;
}

.dump-detail-excerpt--header {
  display: block;
}

.dump-detail-meta {
  font-size: 14px;
  opacity: 0.65;
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  text-transform: uppercase;
}

.dump-detail-body {
  line-height: 1.7;
  font-size: 16px;
  color: var(--fg);
}

.dump-detail-blocks {
  margin-top: 16px;
  display: grid;
  gap: 16px;
}

.dump-detail-blocks figure {
  margin: 0;
}

.dump-detail-blocks img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 6px;
}

.dump-detail-blocks blockquote {
  margin: 0;
  padding: 12px 16px;
  border-left: 3px solid var(--border, rgba(0,0,0,0.15));
  opacity: 0.9;
}

.dump-detail-footer {
  border-top: 1px solid rgba(0,0,0,0.1);
  padding-top: 24px;
  margin-top: 8px;
  padding-bottom: 105px;
  font-size: 15px;
  line-height: 1.6;
  opacity: 0.85;
}

.dump-detail-layout {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  width: 100%;
  padding: 0 23px;
  overflow: visible;
  box-sizing: border-box;
}

.dump-detail-standalone {
  padding-left: 23px;
  padding-right: 23px;
  box-sizing: border-box;
}

.dump-detail-left {
  flex: 1 1 0;
  min-width: 0;
}

.dump-detail-left-inner {
  position: sticky;
  top: 105px;
  display: flex;
  flex-direction: column;
  overflow: visible;
  z-index: 10;
}

.dump-detail-right {
  flex: 1 1 0;
  min-width: 0;
  padding-top: 90px;
}

.dump-detail-meta {
  font-size: 14px;
  opacity: 0.65;
  display: flex;
  flex-direction: row;
  gap: 12px;
  text-transform: uppercase;
  align-items: center;
  justify-content: flex-start;
  text-align: left;
  flex-wrap: nowrap;
}

.dump-detail-meta span:first-child {
  font-weight: 600;
}

.dump-detail-meta span {
  white-space: nowrap;
}

.dump-detail-body {
  line-height: 1.7;
  font-size: 16px;
  color: var(--fg);
}

@media (max-width: 640px) {
  .dump-detail-page {
    padding: 72px 23px 0 23px;
  }
  .dump-detail {
    gap: 20px;
  }
  .dump-detail-layout {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 0 23px;
  }
  .dump-detail-standalone {
    padding-left: 23px;
    padding-right: 23px;
  }
  .dump-detail-left {
    position: static;
    padding-top: 0;
    height: auto;
    left: auto;
    width: auto;
  }
  .dump-detail-right {
    padding-top: 0;
    margin-left: 0;
    width: auto;
  }
  .dump-detail-meta {
    flex-wrap: wrap;
  }

  .dump-detail-excerpt--body {
    display: none;
  }

  .dump-detail-excerpt--header {
    display: block;
  }
}

@media (min-width: 641px) {
  .dump-detail-excerpt--body {
    display: block;
  }

  .dump-detail-excerpt--header {
    display: none;
  }
}

/* Project color theming - apply to logo, header button text, and footer links after scroll */
@media (max-width: 768px) {
  html[data-project-scrolled] .header-desktop a[href="/"] span[aria-hidden] {
    background-color: var(--project-color) !important;
  }

  html[data-project-scrolled] .header-desktop a[href="/projects"] span span:nth-child(2),
  html[data-project-scrolled] .header-desktop a[href="/playground"] span span:nth-child(2),
  html[data-project-scrolled] .header-mobile-bottom[data-mobile-solid="true"] a span span:nth-child(2) {
    color: var(--project-color) !important;
  }

  html[data-project-scrolled] .site-footer-strip a {
    color: var(--project-color) !important;
  }

  html[data-project-scrolled] .header-mobile-top[data-mobile-solid="true"] a[href="/"] span[aria-hidden] {
    background-color: var(--project-color) !important;
  }

  html[data-project-scrolled] .header-mobile-bottom[data-mobile-solid="true"] a span span:nth-child(2) {
    color: var(--project-color) !important;
  }
}

#root {
  max-width: none;
  margin: 0;
  padding: 0;
  text-align: left;
}

/* Hide mobile-only headers by default (desktop/tablet) */
.header-mobile-top,
.header-mobile-bottom {
  display: none;
}

.mobile-search-under-nav {
  display: none;
}

/* Mobile layout overrides */
@media (max-width: 834px) {
  /* Hide fixed desktop header */
  .header-desktop { display: none !important; }

  /* Show mobile header sections */
  .header-mobile-top { display: flex !important; position: relative; }
  .header-mobile-bottom { display: block !important; }

  /* transparency of mobile headers is handled in JS (main.tsx) for project pages only */

  .home-search { display: none !important; }
  .search-sticky { display: none !important; }
  .mobile-search-under-nav { display: block !important; }
  
  /* Hide desktop search bars specifically */
  .desktop-search-bar { display: none !important; }
  
  /* Ensure mobile search bar shows */
  .mobile-search-bar { display: flex !important; }

  /* Revert: show intro and default spacing on mobile */
  /* No special overrides here; layout returns to previous defaults */

  /* Description animation when nav position changes */
  .home-description {
    transition: transform 0.4s ease, opacity 0.4s ease;
    will-change: transform, opacity;
  }

  [data-navpos='top'] .home-description {
    transform: translateY(6px);
    opacity: 0.75;
  }

  [data-navpos='bottom'] .home-description {
    transform: translateY(0);
    opacity: 1;
  }

  /* Show projects list under the nav on Home only (rendered by Shell) */
  .home-projects-mobile {
    display: block !important;
  }
}
