:root {
  --max: 70ch;
  /* Default theme (dark) */
  --bg: #000000;
  --fg: #f2f2f2;
  --muted: #b5b5b5;
  --border: #2a2a2a;
  --code-bg: #000000;
  --code-border: #2a2a2a;
}

html[data-theme="light"] {
  /* Vintage Parchment Theme - visibly warm and textured */
  --bg: #f0e6d2;
  /* Darker, vintage parchment background */
  --fg: #2b1d0e;
  /* Deep Coffee text */
  --muted: #6f5d49;
  /* Aged Leather muted text */
  --border: #d4c5b0;
  /* Darker Beige border */
  --code-bg: #e6dac4;
  /* Slightly darker parchment for code */
  --code-border: #c8b9a3;
  /* Code border */
}

/* Global paper texture for light mode */
html[data-theme="light"]::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.5;
  /* Increased from 0.35 for visibility */
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.15'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}

html[data-theme="dark"] {
  --bg: #000000;
  --fg: #f2f2f2;
  --muted: #b5b5b5;
  --border: #2a2a2a;
  --code-bg: #000000;
  --code-border: #2a2a2a;
}

* {
  box-sizing: border-box;
}

.skip-link {
  position: absolute;
  top: -40px;
  left: -40px;
  background: var(--fg);
  color: var(--bg);
  padding: 0.5rem 1rem;
  text-decoration: none;
  border-radius: 4px;
  z-index: 9999;
  font-size: 0.875rem;
}

.skip-link:focus {
  top: 1rem;
  left: 1rem;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: 2px;
}

.theme-toggle:focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: 1px;
}

.site-avatar-link:focus-visible img {
  outline: 2px solid var(--fg);
  outline-offset: 2px;
  border-radius: 9999px;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  scroll-behavior: smooth;
}

body {
  font-family: 'Libertinus Serif', system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

a:hover {
  opacity: 0.85;
}

.container {
  width: 100%;
  max-width: calc(var(--max) + 2rem);
  margin: 0 auto;
  padding: 0 1rem;
}

header.site-header {
  padding: 2.5rem 0 1.25rem;
  border-bottom: 0;
  position: relative;
}

.stamp-header {
  text-align: center;
}

/* Fixed back and theme buttons (always visible, scrollable) */
.back-button {
  position: fixed;
  top: max(1.5rem, env(safe-area-inset-top, 0px) + 0.5rem);
  left: max(1.5rem, env(safe-area-inset-left, 0px) + 0.5rem);
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.65rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--fg);
  transition: all 0.2s ease;
  text-decoration: none;
  z-index: 1000;
}

.back-button:hover {
  transform: scale(1.1);
  opacity: 0.7;
}

.back-button:focus,
.back-button:focus-visible {
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

.theme-toggle {
  position: fixed;
  top: max(1.5rem, env(safe-area-inset-top, 0px) + 0.5rem);
  right: max(1.5rem, env(safe-area-inset-right, 0px) + 0.5rem);
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.65rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--fg);
  transition: all 0.2s ease;
  z-index: 1000;
}

.theme-toggle:hover {
  transform: scale(1.1);
  opacity: 0.8;
}

.theme-toggle:focus,
.theme-toggle:focus-visible {
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

@media (max-width: 480px) {
  .back-button {
    padding: 0.6rem;
    top: max(1rem, env(safe-area-inset-top, 0px) + 0.5rem);
    left: max(1rem, env(safe-area-inset-left, 0px) + 0.5rem);
  }

  .theme-toggle {
    top: max(1rem, env(safe-area-inset-top, 0px) + 0.5rem);
    right: max(1rem, env(safe-area-inset-right, 0px) + 0.5rem);
    padding: 0.6rem;
  }

  .back-button svg {
    width: 20px;
    height: 20px;
  }

  .theme-toggle svg {
    width: 22px;
    height: 22px;
  }
}

.stamp-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
}

.intro-line {
  display: block;
  margin: 0;
  font-family: "Lora", serif;
  font-weight: 600;
  letter-spacing: -0.02em;
  font-size: 1.5rem;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}

.intro-line em {
  font-style: italic;
}

.intro-subline {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  position: relative;
}

/* Shine effect in dark mode only */
html[data-theme="dark"] .intro-subline {
  background: linear-gradient(90deg,
      var(--muted) 0%,
      var(--muted) 40%,
      #ffffff 50%,
      var(--muted) 60%,
      var(--muted) 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shineText 3s ease-in-out infinite;
}

/* Light mode: disable shine, show normal text */
html[data-theme="light"] .intro-subline {
  background: none;
  -webkit-background-clip: unset;
  background-clip: unset;
  -webkit-text-fill-color: unset;
  color: var(--muted);
}

@keyframes shineText {
  0% {
    background-position: 100% 0;
  }

  100% {
    background-position: -100% 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html[data-theme="dark"] .intro-subline {
    animation: none;
    background: none;
    -webkit-text-fill-color: inherit;
    color: var(--muted);
  }
}

.stamp {
  position: relative;
  width: 240px;
  height: 240px;
  display: grid;
  place-items: center;
  margin-top: 0.5rem;
}

.stamp::before {
  content: "";
  position: absolute;
  inset: 12px;
  border-radius: 9999px;
  border: 1px dashed color-mix(in srgb, var(--muted) 30%, transparent);
}

.stamp-center {
  width: 185px;
  height: 185px;
  border-radius: 9999px;
  border: 2px solid var(--border);
  overflow: hidden;
  background: var(--code-bg);
  z-index: 1;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

html[data-theme="dark"] .stamp-center {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.stamp-ring-link {
  position: absolute;
  inset: 0;
  display: block;
  text-decoration: none;
  cursor: pointer;
  border-radius: 9999px;
  transition: opacity 0.2s ease;
}

.stamp-ring-link:focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: 4px;
}

/* Stamp wrapper for tooltip positioning */
.stamp-wrapper {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Terminal tooltip - ONLY show on hover-capable devices */
.terminal-tooltip {
  display: none;
}

@media (hover: hover) and (pointer: fine) {
  .stamp-ring-link:hover {
    opacity: 1;
  }

  .stamp-ring-link:hover .stamp-ring {
    opacity: 0.5;
  }

  .terminal-tooltip {
    display: block;
    position: absolute;
    top: calc(100% + 25px);
    left: 50%;
    transform: translateX(-50%) scaleY(0);
    transform-origin: top center;
    width: 280px;
    max-width: 90vw;
    background: rgba(10, 10, 10, 0.97);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    box-shadow:
      0 25px 60px rgba(0, 0, 0, 0.7),
      0 0 0 1px rgba(255, 255, 255, 0.05),
      inset 0 1px 0 rgba(255, 255, 255, 0.08);
    opacity: 0;
    visibility: hidden;
    z-index: 9999;
    overflow: hidden;
    pointer-events: none;
    transition: left 0.15s ease-out, top 0.15s ease-out;
  }

  .stamp-wrapper:hover .terminal-tooltip {
    opacity: 1;
    visibility: visible;
    animation: terminalPop 0.15s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  }

  .stamp-wrapper:hover .terminal-flash {
    animation: terminalFlash 0.1s ease-out;
  }

  .stamp-wrapper:hover .binary-stream {
    animation: binaryScramble 0.6s steps(1) forwards;
  }

  .stamp-wrapper:hover .terminal-line.binary-dump {
    animation: lineHide 0.1s ease 0.4s forwards;
  }

  .stamp-wrapper:hover .terminal-line.cmd {
    animation: lineShow 0.05s ease 0.45s forwards;
  }

  .stamp-wrapper:hover .terminal-typed {
    animation: typeCommand 0.6s steps(15) 0.5s forwards;
  }

  .stamp-wrapper:hover .terminal-cursor {
    animation: cursorBlink 0.5s step-end infinite;
  }

  .stamp-wrapper:hover .terminal-line.compile {
    animation: lineShow 0.05s ease 1.2s forwards;
  }

  .stamp-wrapper:hover .compile-text {
    animation: textFlicker 0.15s steps(1) 1.2s 4;
  }

  .stamp-wrapper:hover .terminal-line.result {
    animation: lineShow 0.05s ease 1.8s forwards;
  }

  .stamp-wrapper:hover .terminal-output {
    animation: glitchReveal 0.5s steps(6) 1.85s forwards;
  }
}

/* Terminal flash overlay */
.terminal-flash {
  position: absolute;
  inset: 0;
  background: rgba(180, 180, 180, 0.15);
  opacity: 0;
  pointer-events: none;
  z-index: 5;
}

.terminal-header {
  background: rgba(30, 30, 30, 0.9);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 7px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.terminal-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  transition: background 0.2s ease;
}

.stamp-wrapper:hover .terminal-dot:nth-child(1) {
  background: rgba(255, 95, 86, 0.9);
}

.stamp-wrapper:hover .terminal-dot:nth-child(2) {
  background: rgba(255, 189, 46, 0.9);
}

.stamp-wrapper:hover .terminal-dot:nth-child(3) {
  background: rgba(39, 202, 64, 0.9);
}

.terminal-title {
  margin-left: auto;
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.35);
  letter-spacing: 0.02em;
}

.terminal-body {
  padding: 16px 18px;
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
  line-height: 1.6;
  background: rgba(8, 8, 8, 0.5);
}

.terminal-line {
  margin: 0 0 10px 0;
  color: rgba(255, 255, 255, 0.6);
  white-space: nowrap;
  font-family: inherit;
  display: flex;
  align-items: center;
  height: 18px;
}

.terminal-line:last-child {
  margin-bottom: 0;
}

.terminal-line.cmd,
.terminal-line.compile,
.terminal-line.result {
  opacity: 0;
  height: 0;
  margin: 0;
  overflow: hidden;
}

.terminal-line.binary-dump {
  opacity: 1;
  height: 18px;
}

.terminal-prompt {
  color: rgba(255, 255, 255, 0.4);
  margin-right: 10px;
  flex-shrink: 0;
}

/* Binary stream animation */
.binary-stream {
  color: rgba(255, 255, 255, 0.3);
  font-size: 11px;
  letter-spacing: 0.08em;
}

/* Command typing */
.terminal-typed {
  color: rgba(255, 255, 255, 0.8);
  overflow: hidden;
  white-space: nowrap;
  display: inline-block;
  width: 0;
}

.terminal-cursor {
  color: rgba(100, 255, 140, 0.8);
  font-weight: 400;
  margin-left: 1px;
}

/* Compile text */
.compile-text {
  color: rgba(255, 200, 100, 0.9);
}

.compile-dots {
  color: rgba(255, 200, 100, 0.7);
}

/* Output - starts muted, glows on reveal */
.terminal-output {
  color: rgba(100, 255, 140, 0.9);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-shadow: 0 0 10px rgba(100, 255, 140, 0.4);
}

/* Keyframes */
@keyframes terminalPop {
  0% {
    transform: translateX(-50%) scaleY(0);
    opacity: 0;
  }

  60% {
    transform: translateX(-50%) scaleY(1.02);
  }

  100% {
    transform: translateX(-50%) scaleY(1);
    opacity: 1;
  }
}

@keyframes terminalFlash {
  0% {
    opacity: 0;
  }

  30% {
    opacity: 1;
  }

  100% {
    opacity: 0;
  }
}

@keyframes binaryScramble {
  0% {
    opacity: 1;
  }

  25% {
    opacity: 0.7;
  }

  50% {
    opacity: 0.9;
  }

  75% {
    opacity: 0.6;
  }

  100% {
    opacity: 0.3;
  }
}

@keyframes typeCommand {
  from {
    width: 0;
  }

  to {
    width: 15ch;
  }
}

@keyframes cursorBlink {

  0%,
  50% {
    opacity: 1;
  }

  51%,
  100% {
    opacity: 0;
  }
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

@keyframes lineHide {
  to {
    opacity: 0;
    height: 0;
    margin: 0;
  }
}

@keyframes lineShow {
  to {
    opacity: 1;
    height: 18px;
    margin: 0 0 10px 0;
  }
}

@keyframes textFlicker {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.3;
  }
}

@keyframes glitchReveal {

  0%,
  16% {
    opacity: 0.5;
    filter: blur(2px);
  }

  17%,
  33% {
    opacity: 0.7;
    filter: blur(1px);
  }

  34%,
  50% {
    opacity: 0.8;
    filter: blur(0.5px);
  }

  51%,
  66% {
    opacity: 0.9;
    filter: blur(0);
  }

  67%,
  83% {
    opacity: 0.95;
    text-shadow: 0 0 15px rgba(100, 255, 140, 0.6);
  }

  84%,
  100% {
    opacity: 1;
    text-shadow: 0 0 10px rgba(100, 255, 140, 0.4);
    filter: blur(0);
  }
}

.stamp-avatar {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  filter: grayscale(100%) contrast(1.05) brightness(1.02);
}

html[data-theme="dark"] .stamp-avatar {
  filter: grayscale(100%) contrast(0.95) brightness(0.95);
}

.stamp-ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  animation: stamp-rotate 60s linear infinite;
  will-change: transform;
}

.stamp-text {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 9.5px;
  letter-spacing: 0.18em;
  fill: var(--muted);
  font-weight: 500;
  user-select: none;
  pointer-events: none;
}

@keyframes stamp-rotate {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

/* Hide header hero section on post pages only - keep on blog listing */
.is-post-page .stamp-header {
  display: none;
}

/* Blog page fadeInUp effect */
.is-blog-page .writing {
  animation: fadeInUpBlur 0.6s ease-out both;
}

@keyframes fadeInUpBlur {
  from {
    filter: blur(10px);
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    filter: blur(0);
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .is-blog-page .writing {
    animation: none;
  }
}

/* Homepage navigation */
.home-nav {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 1.5rem;
  align-items: center;
}

.home-nav-btn {
  font-family: "Lora", serif;
  font-size: 1rem;
  font-weight: 400;
  text-decoration: none;
  color: var(--fg);
  transition: opacity 0.2s ease;
  padding: 0.25rem 0;
  border-bottom: 1px solid transparent;
}

.home-nav-btn:hover {
  opacity: 0.7;
  border-bottom-color: var(--fg);
}

/* Font variable definitions */
:root {
  --body-font: 'Libertinus Serif', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --heading-font: 'Lora', serif;
  --mono-font: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

html.fonts-loaded body {
  font-family: var(--body-font);
  letter-spacing: 0;
  line-height: 1.65;
}

html.fonts-loaded .post-content code,
html.fonts-loaded pre,
html.fonts-loaded .compile-text {
  font-family: var(--mono-font);
}

/* Home intro section */
.home-intro {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  max-width: none;
  margin: 1.75rem 0 0;
  padding: 0;
  flex-wrap: wrap;
}

.home-bio {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--muted);
  margin: 0;
  text-align: left;
  flex: 1 1 100%;
  word-wrap: break-word;
}

@media (max-width: 480px) {
  .home-intro {
    flex-direction: column;
    gap: 0.75rem;
  }
}

.bio-seg {
  transition: color 0.3s ease, text-shadow 0.3s ease;
}

.bio-seg.highlight {
  /* Highlighting disabled */
  color: inherit;
  text-shadow: none;
}

html[data-theme="light"] .bio-seg.highlight {
  text-shadow: none;
}

/* More clickable, non-circular listen control */
.listen-btn {
  flex-shrink: 0;
  background: none;
  border: 1px solid transparent;
  padding: 0.35rem 0.5rem;
  cursor: pointer;
  color: var(--fg);
  display: inline-flex;
  align-items: baseline;
  gap: 0.5rem;
  margin-top: 0.1rem;
  font-family: "Lora", serif;
  font-size: 1rem;
  text-decoration: underline;
  text-underline-offset: 0.22em;
  transition: all 0.2s ease;
  border-radius: 4px;
}

.listen-btn:hover {
  opacity: 0.8;
  border-color: var(--fg);
  background: rgba(242, 242, 242, 0.05);
}

html[data-theme="light"] .listen-btn:hover {
  background: rgba(0, 0, 0, 0.05);
}

.listen-glyph {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.1rem;
  /* fixed width to avoid layout shifts when glyph changes */
  min-width: 1.1rem;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 0.95rem;
  line-height: 1;
  text-align: center;
}

.listen-btn.playing {
  opacity: 1;
}

/* Waveform visualizer – row of bars next to listen button */
.listen-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.waveform-viz {
  display: flex;
  align-items: center;
  gap: 2px;
  height: 1.25rem;
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}

.waveform-viz.is-active {
  opacity: 1;
}

.waveform-bar {
  width: 2.5px;
  border-radius: 999px;
  background: var(--fg);
  opacity: 0.45;
  height: 3px;
  min-height: 2px;
  will-change: height;
  transition: height 80ms linear;
}

@keyframes pulse {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.05);
  }
}

/* Recent posts on home */
.recent-posts {
  max-width: none;
  margin: 2rem 0 0;
  padding: 0;
}

.recent-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.recent-link {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1.5rem;
  padding: 12px 0;
  border-bottom: 1px solid transparent;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s ease;
}

.recent-link:hover {
  border-bottom-color: var(--border);
}

.recent-title {
  font-family: "Lora", serif;
  font-size: 1rem;
  font-weight: 500;
  flex: 1 1 auto;
  min-width: 0;
}

.recent-date {
  font-family: "Lora", serif;
  color: var(--muted);
  font-size: 0.88rem;
  flex-shrink: 0;
  white-space: nowrap;
}

.recent-link:hover .recent-title {
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

main {
  padding: 1.5rem 0 2.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

@media (max-width: 480px) {
  main {
    padding-top: 3.5rem;
  }
}

/* Blog (Writing) – minimal list (no cover images) */
.writing {
  max-width: 720px;
  margin: 0 auto;
  padding: 1.5rem 0 2rem;
}

@media (min-width: 640px) {
  .writing {
    padding: 2.5rem 0 3rem;
  }
}

.writing-heading {
  font-family: "Lora", serif;
  font-weight: 400;
  font-size: 1.75rem;
  letter-spacing: -0.01em;
  text-align: center;
  margin: 0 0 2.5rem;
  color: var(--fg);
}

.writing-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.writing-link {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 12px 0;
  text-decoration: none;
  color: inherit;
  flex-wrap: wrap;
  /* allow title to wrap onto next line if needed */
  border-bottom: 1px solid transparent;
}

@media (min-width: 640px) {
  .writing-link {
    align-items: baseline;
    gap: 0.5rem;
    padding: 16px 0;
  }
}

.writing-title {
  font-family: "Lora", serif;
  font-size: 1.05rem;
  font-weight: 500;
  letter-spacing: -0.005em;
  line-height: 1.3;
  flex: 1 1 auto;
  min-width: 0;
  /* prevents overflow when title is long */
}

.writing-date {
  font-family: "Lora", serif;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 400;
  flex: 0 0 auto;
  margin-left: 1rem;
  text-align: right;
  white-space: nowrap;
}

@media (min-width: 640px) {
  .writing-date {
    flex-shrink: 0;
  }
}

.writing-link:hover .writing-title {
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

article.post {
  max-width: 880px;
  margin: 0 auto;
}

.post-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: baseline;
  color: var(--muted);
  font-size: 0.95rem;
  margin: 1.25rem 0 1.5rem;
}

.post-breadcrumb-link {
  text-decoration: none;
  color: inherit;
}

.post-breadcrumb-link:hover {
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.post-breadcrumb-sep {
  opacity: 0.6;
}

.post-breadcrumb-current {
  color: color-mix(in srgb, var(--muted) 75%, transparent);
}

.post-head {
  margin: 3rem 0 2.5rem;
}

.post-section-title {
  font-family: "Lora", serif;
  text-align: center;
  /* larger, responsive size */
  font-size: clamp(1.125rem, 1.2vw + 0.8rem, 1.375rem);
  font-weight: 500;
  color: var(--muted);
  margin: 0 0 2.5rem;
  letter-spacing: -0.01em;
}

.post-section-title a {
  color: inherit;
  text-decoration: none;
  display: inline-block;
  padding: 0.06rem 0.12rem;
  border-radius: 4px;
}

.post-section-title a:hover,
.post-section-title a:focus {
  text-decoration: underline;
  color: var(--fg);
}

.post-section-title a:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.06);
}

.post-title {
  font-family: "Lora", serif;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 1.25rem;
  line-height: 1.1;
  font-size: clamp(2rem, 5vw, 3rem);
}

.post .post-meta {
  margin-bottom: 1.5rem;
}

.post-content {
  font-size: 1rem;
  line-height: 1.6;
}

/* Responsive embeds */
.embed {
  margin: 1.25rem 0;
}

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

/* Post open blur animation */
.is-post-page .post-enter {
  animation: postEnter 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes postEnter {
  from {
    filter: blur(10px);
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    filter: blur(0);
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .is-post-page .post-enter {
    animation: none;
  }
}

/* Ensure animation works on desktop */
@media (min-width: 640px) {
  .is-post-page .post-enter {
    animation: postEnter 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) both;
  }
}

.post-content h2,
.post-content h3,
.post-content h4 {
  font-family: "Lora", serif;
  margin-top: 2rem;
  line-height: 1.25;
}

.post-content p {
  margin: 1.5rem 0;
}

.post-content blockquote {
  margin: 1.5rem 0;
  padding: 0.25rem 1rem;
  border-left: 3px solid var(--border);
  color: var(--muted);
  background: color-mix(in srgb, var(--code-bg) 70%, transparent);
  border-radius: 6px;
}

.post-content hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 2.5rem 0;
}

.post-content pre {
  padding: 1rem;
  overflow: auto;
  border: 1px solid var(--code-border);
  border-radius: 8px;
  background: var(--code-bg);
  font-size: 0.9rem;
  margin: 1.5rem 0;
}

.post-content :not(pre)>code {
  background: var(--code-bg);
  border: 1px solid var(--code-border);
  padding: 0.1rem 0.3rem;
  border-radius: 6px;
  font-size: 0.95rem;
}

.post-content img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
  border: 1px solid var(--border);
  margin: 1.5rem 0;
}

.post-content ul,
.post-content ol {
  padding-left: 1.25rem;
  margin: 1.5rem 0;
}

.post-content li {
  margin: 0.25rem 0;
}

@media (min-width: 480px) {
  header.site-header {
    padding: 2.25rem 0 1.5rem;
  }

  main {
    padding: 2rem 0 3rem;
  }
}

footer.site-footer {
  padding: 2.5rem 0 2rem;
  color: var(--muted);
  font-size: 0.875rem;
  text-align: center;
  margin-top: auto;
}

@media (max-width: 480px) {
  footer.site-footer {
    padding: 2rem 0 2.5rem;
  }
}

.footer-text {
  margin: 0 0 1rem 0;
  letter-spacing: 0.01em;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

/* System Link Status Badge in Footer */
.system-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  color: var(--muted);
  text-decoration: none;
  padding: 0.35rem 0.75rem;
  background: var(--code-bg);
  border-radius: 9999px;
  transition: all 0.2s ease;
}

.system-badge:hover {
  color: var(--fg);
  opacity: 1;
}

.system-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #27ca40;
  animation: systemPulse 2s ease-in-out infinite;
}

@keyframes systemPulse {

  0%,
  100% {
    opacity: 0.5;
    box-shadow: 0 0 0 0 rgba(39, 202, 64, 0.4);
  }

  50% {
    opacity: 1;
    box-shadow: 0 0 6px 2px rgba(39, 202, 64, 0.25);
  }
}

/* ============================================
   HERMES CHAT PAGE
   ============================================ */

.is-hermes-page .stamp-header,
.is-hermes-page .site-header,
.is-hermes-page .site-footer,
.is-hermes-page .skip-link {
  display: none !important;
}

/* Show and style theme toggle on hermes page for quick access */
.is-hermes-page .back-button {
  display: inline-flex !important;
  position: fixed;
  top: max(1rem, env(safe-area-inset-top, 0px) + 0.5rem);
  left: max(1rem, env(safe-area-inset-left, 0px) + 0.5rem);
  background: transparent;
  border: none;
  padding: 0.5rem;
  color: var(--muted);
  z-index: 1002;
  outline: none;
}

.is-hermes-page .back-button:focus,
.is-hermes-page .back-button:focus-visible {
  outline: none !important;
  box-shadow: none !important;
}

.is-hermes-page .back-button:hover {
  color: var(--fg);
  transform: none;
  opacity: 1;
}

.is-hermes-page .theme-toggle {
  display: inline-flex !important;
  position: fixed;
  top: max(1rem, env(safe-area-inset-top, 0px) + 0.5rem);
  right: max(1rem, env(safe-area-inset-right, 0px) + 0.5rem);
  background: transparent;
  border: none;
  padding: 0.5rem;
  color: var(--muted);
  z-index: 1002;
}

.is-hermes-page .theme-toggle:hover {
  color: var(--fg);
}

/* ============================================
   SYSLINK PAGE - HIDE DECORATIVE HEADER ELEMENTS
   ============================================ */

.is-syslink-page .stamp-header,
.is-syslink-page .stamp-avatar,
.is-syslink-page .stamp-ring,
.is-hermes-page .stamp-header,
.is-hermes-page .stamp-avatar,
.is-hermes-page .stamp-ring {
  display: none !important;
}

.is-hermes-page .theme-toggle:focus,
.is-hermes-page .theme-toggle:focus-visible {
  outline: none;
}

/* Remove all focus outlines on Hermes page to prevent annoying white borders */
.is-hermes-page *:focus,
.is-hermes-page *:focus-visible {
  outline: none !important;
}

.is-hermes-page body {
  overflow: hidden;
  height: 100vh;
  height: 100dvh;
}

.is-hermes-page main {
  padding: 0;
  width: 100%;
  max-width: 100%;
  margin: 0;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

/* ============================================
   HERMES PAGE STYLES - Minimalist Design
   ============================================ */

/* Container - Full viewport fixed chat layout */
.hermes-container {
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background: var(--bg);
  z-index: 1;
  border: none;
  box-shadow: none;
}

/* Messages area */
.hermes-messages {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: calc(4rem + env(safe-area-inset-top, 0px)) 1rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 1.25rem;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
}

.hermes-messages::-webkit-scrollbar {
  width: 0;
}

/* Hide header on hermes page */
.is-hermes-page .hermes-header {
  display: none !important;
}

/* Topbar for hermes (small header to separate messages from page) */
/* Topbar: only holds visually-hidden status for screen readers */
.hermes-topbar {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  white-space: nowrap;
  padding: 0;
  margin: -1px;
  border: 0;
}

.hermes-topbar-inner {
  max-width: 840px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

/* Page header / wordmark - translucent bar spanning full width */
.hermes-page-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  justify-content: center;
  align-items: center;
  pointer-events: none;
  padding: max(0.875rem, calc(env(safe-area-inset-top, 0px) + 0.5rem)) 1rem 0.625rem;
  background: color-mix(in srgb, var(--bg) 70%, transparent);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.hermes-page-header-inner {
  pointer-events: auto;
}

.hermes-wordmark {
  font-family: var(--mono-font);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  color: var(--fg);
  margin: 0;
  padding: 0.35rem 1rem;
  border-radius: 999px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.06);
}

html[data-theme="light"] .hermes-wordmark {
  border-color: rgba(0, 0, 0, 0.1);
  background: rgba(255, 255, 255, 0.35);
}

/* Desktop typography tweaks */
@media (min-width: 1024px) {
  .hermes-message-text {
    font-size: 1.4375rem;
    /* 23px */
    line-height: 1.9;
  }

  .hermes-input {
    font-size: 1.1875rem;
  }

  .hermes-wordmark {
    font-size: 0.85rem;
  }
}

/* Keep status text available for assistive tech but visually hidden */
.hermes-topbar .hermes-status-text {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(1px, 1px, 1px, 1px) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Layout constraining and desktop centering */
@media (min-width: 1024px) {
  .hermes-container {
    max-width: 900px;
    margin: 0 auto;
    border-radius: 0;
    overflow: hidden;
    border: none;
    box-shadow: none;
  }

  .hermes-input-wrapper {
    max-width: 840px;
    margin: 0 auto;
    border-top: none;
    /* Remove bottom boundary - header provides separation */
  }

  /* topbar is now globally hidden for a11y-only use */
}

/* Hide scrollbars more aggressively (mobile & desktop) */
.hermes-messages {
  scrollbar-width: none;
  /* Firefox */
  -ms-overflow-style: none;
  /* IE 10+ */
}

.hermes-messages::-webkit-scrollbar {
  width: 0 !important;
  height: 0 !important;
}

/* Remove the subtle border separating messages and input to favor a header-only separation */
.hermes-input-wrapper {
  border-top: none;
}


/* Welcome screen - centered, minimal */
.hermes-welcome {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 100%;
  max-width: 420px;
  margin: auto 0;
  gap: 0.75rem;
  opacity: 0;
  animation: fadeIn 0.5s ease 0.1s forwards;
}

.hermes-welcome-text {
  font-size: 1.25rem;
  color: var(--muted);
  font-family: var(--body-font);
  font-weight: 400;
  margin: 0;
  letter-spacing: -0.01em;
}

.hermes-prompt-suggestions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 1rem;
  width: 100%;
  max-width: 420px;
}

.hermes-prompt-btn {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.9rem 1rem;
  color: var(--muted);
  font-family: var(--body-font);
  font-size: 0.9375rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  line-height: 1.4;
  outline: none;
}

.hermes-prompt-btn:hover {
  background: var(--code-bg);
  color: var(--fg);
  border-color: var(--muted);
}

.hermes-prompt-btn:focus,
.hermes-prompt-btn:focus-visible {
  outline: none;
  border-color: var(--muted);
}

.hermes-prompt-btn:active {
  transform: scale(0.98);
}

.hermes-info-link {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 0.8125rem;
  font-family: var(--mono-font);
  cursor: pointer;
  padding: 0.5rem 0;
  margin-top: 0.5rem;
  opacity: 0.6;
  transition: opacity 0.2s;
}

.hermes-info-link:hover {
  opacity: 1;
}

/* Modal - Minimal */
.hermes-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  z-index: 998;
}

.hermes-modal-overlay.hermes-modal-active {
  opacity: 1;
  pointer-events: auto;
}

.hermes-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -48%);
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s cubic-bezier(0.32, 0.72, 0, 1);
  z-index: 999;
  width: calc(100% - 3rem);
  max-width: 360px;
}

.hermes-modal.hermes-modal-active {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%);
}

.hermes-modal-content {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2rem;
  position: relative;
  text-align: center;
  max-width: 380px;
  width: 100%;
  box-sizing: border-box;
}

.hermes-modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 32px;
  height: 32px;
  background: transparent;
  border: none;
  color: var(--muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.15s;
}

.hermes-modal-close:hover {
  background: var(--code-bg);
  color: var(--fg);
}

.hermes-modal-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: var(--muted);
}

.hermes-modal-title {
  font-family: var(--heading-font);
  font-size: 1.5rem;
  font-weight: 400;
  margin: 0 0 1.5rem 0;
  color: var(--fg);
  letter-spacing: -0.02em;
}

.hermes-modal-body {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.8;
  font-family: var(--body-font);
  text-align: left;
}

.hermes-modal-body p {
  margin: 0 0 1.25rem 0;
}

.hermes-modal-body a {
  color: var(--fg);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.hermes-modal-body a:hover {
  opacity: 0.7;
}

.hermes-modal-features {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.hermes-modal-feature {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.875rem;
  color: var(--fg);
  width: 100%;
  box-sizing: border-box;
}

.hermes-modal-feature-icon {
  width: 20px;
  height: 20px;
  min-width: 20px;
  min-height: 20px;
  max-width: 20px;
  max-height: 20px;
  flex-shrink: 0;
  color: var(--muted);
  stroke: currentColor;
  display: block;
}

.hermes-modal-action {
  width: 100%;
  padding: 0.875rem 1.5rem;
  margin-top: 1.5rem;
  background: var(--fg);
  color: var(--bg);
  border: none;
  border-radius: 10px;
  font-size: 0.9375rem;
  font-weight: 500;
  font-family: var(--body-font);
  cursor: pointer;
  transition: all 0.15s;
}

.hermes-modal-action:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.hermes-modal-action:active {
  transform: translateY(0);
}

/* Messages */
.hermes-message {
  display: flex;
  flex-direction: column;
  width: 100%;
  animation: messageIn 0.3s ease;
}

@keyframes messageIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* User message - right aligned, plain text (no bubble) */
.hermes-message--user {
  align-items: flex-end;
}

.hermes-message--user .hermes-message-text {
  text-align: right;
  background: transparent;
  border-radius: 0;
  padding: 0;
  color: var(--fg);
  font-weight: 500;
  font-size: 1.0625rem;
  line-height: 1.6;
  max-width: 85%;
  font-family: var(--body-font);
  word-break: break-word;
  opacity: 1;
  transition: font-size 0.5s cubic-bezier(0.22, 1, 0.36, 1),
              line-height 0.5s cubic-bezier(0.22, 1, 0.36, 1),
              opacity 0.4s ease;
}

/* Prompt starts large when first sent */
.hermes-message--user.is-hero .hermes-message-text {
  font-size: 1.75rem;
  line-height: 1.4;
  font-weight: 600;
}

/* Shrinks back when response arrives */
.hermes-message--user.is-settled .hermes-message-text {
  font-size: 1.0625rem;
  line-height: 1.6;
  font-weight: 500;
}

/* Ensure user prompt is bright in dark mode */
html[data-theme="dark"] .hermes-message--user .hermes-message-text {
  color: #ffffff;
}

/* AI message - left aligned, no background */
.hermes-message--assistant {
  align-items: flex-start;
}

.hermes-message-text {
  color: var(--fg);
  font-size: 1.3125rem;
  /* 21px - larger for better readability */
  line-height: 1.85;
  white-space: pre-wrap;
  font-family: var(--body-font);
  max-width: 85%;
}

/* Paragraph-by-paragraph reveal container */
.hermes-message-text.hermes-paragraph-container {
  display: flex;
  flex-direction: column;
  gap: 1.25em;
}

/* Individual paragraph - entering state (hidden) */
.hermes-paragraph-entering {
  opacity: 0;
  transform: translateY(10px);
  filter: blur(2px);
}

/* Individual paragraph - visible state (animated in) */
.hermes-paragraph-visible {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
  /* Smoother transition: longer duration, gentle curve */
  transition: opacity 0.8s ease-out,
    transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1),
    filter 0.6s ease-out;
}

/* 3x3 Matrix Loader - Smooth snake pattern */
.hermes-matrix-loader {
  display: inline-flex;
  flex-direction: column;
  gap: 3px;
  padding: 0.75rem 0;
}

.hermes-matrix-row {
  display: flex;
  gap: 3px;
}

.hermes-matrix-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #2a2a2a;
}

/*
  Matrix positions:
  1 2 3
  4 5 6
  7 8 9
  
  Snake sequence: 1 → 2 → 3 → 6 → 9 → 8 → 7 → 4 → 5 → repeat
  9 positions, each gets ~11.1% of the animation
*/

/* Position 1: Row 1, Dot 1 */
.hermes-matrix-loader .hermes-matrix-row:nth-child(1) .hermes-matrix-dot:nth-child(1) {
  animation: snakeDot1 0.5s ease-in-out infinite;
}

/* Position 2: Row 1, Dot 2 */
.hermes-matrix-loader .hermes-matrix-row:nth-child(1) .hermes-matrix-dot:nth-child(2) {
  animation: snakeDot2 0.5s ease-in-out infinite;
}

/* Position 3: Row 1, Dot 3 */
.hermes-matrix-loader .hermes-matrix-row:nth-child(1) .hermes-matrix-dot:nth-child(3) {
  animation: snakeDot3 0.5s ease-in-out infinite;
}

/* Position 4: Row 2, Dot 1 */
.hermes-matrix-loader .hermes-matrix-row:nth-child(2) .hermes-matrix-dot:nth-child(1) {
  animation: snakeDot8 0.5s ease-in-out infinite;
}

/* Position 5: Row 2, Dot 2 (center) */
.hermes-matrix-loader .hermes-matrix-row:nth-child(2) .hermes-matrix-dot:nth-child(2) {
  animation: snakeDot9 0.5s ease-in-out infinite;
}

/* Position 6: Row 2, Dot 3 */
.hermes-matrix-loader .hermes-matrix-row:nth-child(2) .hermes-matrix-dot:nth-child(3) {
  animation: snakeDot4 0.5s ease-in-out infinite;
}

/* Position 7: Row 3, Dot 1 */
.hermes-matrix-loader .hermes-matrix-row:nth-child(3) .hermes-matrix-dot:nth-child(1) {
  animation: snakeDot7 0.5s ease-in-out infinite;
}

/* Position 8: Row 3, Dot 2 */
.hermes-matrix-loader .hermes-matrix-row:nth-child(3) .hermes-matrix-dot:nth-child(2) {
  animation: snakeDot6 0.5s ease-in-out infinite;
}

/* Position 9: Row 3, Dot 3 */
.hermes-matrix-loader .hermes-matrix-row:nth-child(3) .hermes-matrix-dot:nth-child(3) {
  animation: snakeDot5 0.5s ease-in-out infinite;
}

/* Keyframes - each position lights up in sequence with smooth fade */
@keyframes snakeDot1 {

  0%,
  5% {
    background: #ffffff;
  }

  11%,
  100% {
    background: #2a2a2a;
  }
}

@keyframes snakeDot2 {

  0%,
  5% {
    background: #2a2a2a;
  }

  11%,
  16% {
    background: #ffffff;
  }

  22%,
  100% {
    background: #2a2a2a;
  }
}

@keyframes snakeDot3 {

  0%,
  16% {
    background: #2a2a2a;
  }

  22%,
  27% {
    background: #ffffff;
  }

  33%,
  100% {
    background: #2a2a2a;
  }
}

@keyframes snakeDot4 {

  0%,
  27% {
    background: #2a2a2a;
  }

  33%,
  38% {
    background: #ffffff;
  }

  44%,
  100% {
    background: #2a2a2a;
  }
}

@keyframes snakeDot5 {

  0%,
  38% {
    background: #2a2a2a;
  }

  44%,
  49% {
    background: #ffffff;
  }

  55%,
  100% {
    background: #2a2a2a;
  }
}

@keyframes snakeDot6 {

  0%,
  49% {
    background: #2a2a2a;
  }

  55%,
  60% {
    background: #ffffff;
  }

  66%,
  100% {
    background: #2a2a2a;
  }
}

@keyframes snakeDot7 {

  0%,
  60% {
    background: #2a2a2a;
  }

  66%,
  71% {
    background: #ffffff;
  }

  77%,
  100% {
    background: #2a2a2a;
  }
}

@keyframes snakeDot8 {

  0%,
  71% {
    background: #2a2a2a;
  }

  77%,
  82% {
    background: #ffffff;
  }

  88%,
  100% {
    background: #2a2a2a;
  }
}

@keyframes snakeDot9 {

  0%,
  82% {
    background: #2a2a2a;
  }

  88%,
  94% {
    background: #ffffff;
  }

  100% {
    background: #2a2a2a;
  }
}

/* Light mode - warm paper theme */
html[data-theme="light"] .hermes-matrix-dot {
  background: #e0d6c8;
  /* Warm beige to match paper theme */
}

html[data-theme="light"] .hermes-matrix-loader .hermes-matrix-row:nth-child(1) .hermes-matrix-dot:nth-child(1) {
  animation: snakeDotLight1 0.5s ease-in-out infinite;
}

html[data-theme="light"] .hermes-matrix-loader .hermes-matrix-row:nth-child(1) .hermes-matrix-dot:nth-child(2) {
  animation: snakeDotLight2 0.5s ease-in-out infinite;
}

html[data-theme="light"] .hermes-matrix-loader .hermes-matrix-row:nth-child(1) .hermes-matrix-dot:nth-child(3) {
  animation: snakeDotLight3 0.5s ease-in-out infinite;
}

html[data-theme="light"] .hermes-matrix-loader .hermes-matrix-row:nth-child(2) .hermes-matrix-dot:nth-child(1) {
  animation: snakeDotLight8 0.5s ease-in-out infinite;
}

html[data-theme="light"] .hermes-matrix-loader .hermes-matrix-row:nth-child(2) .hermes-matrix-dot:nth-child(2) {
  animation: snakeDotLight9 0.5s ease-in-out infinite;
}

html[data-theme="light"] .hermes-matrix-loader .hermes-matrix-row:nth-child(2) .hermes-matrix-dot:nth-child(3) {
  animation: snakeDotLight4 0.5s ease-in-out infinite;
}

html[data-theme="light"] .hermes-matrix-loader .hermes-matrix-row:nth-child(3) .hermes-matrix-dot:nth-child(1) {
  animation: snakeDotLight7 0.5s ease-in-out infinite;
}

html[data-theme="light"] .hermes-matrix-loader .hermes-matrix-row:nth-child(3) .hermes-matrix-dot:nth-child(2) {
  animation: snakeDotLight6 0.5s ease-in-out infinite;
}

html[data-theme="light"] .hermes-matrix-loader .hermes-matrix-row:nth-child(3) .hermes-matrix-dot:nth-child(3) {
  animation: snakeDotLight5 0.5s ease-in-out infinite;
}



@keyframes snakeDotLight1 {

  0%,
  5% {
    background: #5c4d3d;
  }

  11%,
  100% {
    background: #e0d6c8;
  }
}

@keyframes snakeDotLight2 {

  0%,
  5% {
    background: #e0d6c8;
  }

  11%,
  16% {
    background: #5c4d3d;
  }

  22%,
  100% {
    background: #e0d6c8;
  }
}

@keyframes snakeDotLight3 {

  0%,
  16% {
    background: #e0d6c8;
  }

  22%,
  27% {
    background: #5c4d3d;
  }

  33%,
  100% {
    background: #e0d6c8;
  }
}

@keyframes snakeDotLight4 {

  0%,
  27% {
    background: #e0d6c8;
  }

  33%,
  38% {
    background: #5c4d3d;
  }

  44%,
  100% {
    background: #e0d6c8;
  }
}

@keyframes snakeDotLight5 {

  0%,
  38% {
    background: #e0d6c8;
  }

  44%,
  49% {
    background: #5c4d3d;
  }

  55%,
  100% {
    background: #e0d6c8;
  }
}

@keyframes snakeDotLight6 {

  0%,
  49% {
    background: #e0d6c8;
  }

  55%,
  60% {
    background: #5c4d3d;
  }

  66%,
  100% {
    background: #e0d6c8;
  }
}

@keyframes snakeDotLight7 {

  0%,
  60% {
    background: #e0d6c8;
  }

  66%,
  71% {
    background: #5c4d3d;
  }

  77%,
  100% {
    background: #e0d6c8;
  }
}

@keyframes snakeDotLight8 {

  0%,
  71% {
    background: #e0d6c8;
  }

  77%,
  82% {
    background: #5c4d3d;
  }

  88%,
  100% {
    background: #e0d6c8;
  }
}

@keyframes snakeDotLight9 {

  0%,
  82% {
    background: #e0d6c8;
  }

  88%,
  94% {
    background: #5c4d3d;
  }

  100% {
    background: #e0d6c8;
  }
}

/* Matrix loader fadeout when done */
.hermes-matrix-loader.hermes-typing-fadeout {
  opacity: 0;
  transition: opacity 0.3s ease-out;
}

/* Error state */
.hermes-message--error .hermes-message-text {
  color: var(--muted);
}

/* Message actions - appear on hover */
.hermes-message-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
  opacity: 0;
  transition: opacity 0.15s;
}

.hermes-message--assistant:hover .hermes-message-actions {
  opacity: 1;
}

.hermes-message-copy {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s;
}

.hermes-message-copy:hover {
  color: var(--fg);
  border-color: var(--fg);
}

.hermes-message-copy svg {
  width: 14px;
  height: 14px;
}

.hermes-message-copy--copied {
  color: var(--fg) !important;
  border-color: var(--fg) !important;
}

.hermes-message-tokens {
  font-size: 0.6875rem;
  color: var(--muted);
  font-family: var(--mono-font);
  opacity: 0.6;
}

/* Clear conversation button */
.hermes-clear {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: transparent;
  border: none;
  border-radius: 8px;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s;
  opacity: 0.6;
}

.hermes-clear:hover {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
  opacity: 1;
}

.hermes-clear svg {
  width: 16px;
  height: 16px;
}

/* Thinking indicator — LLM inference pipeline */
.hermes-thinking {
  font-size: 0.875rem;
  color: var(--muted);
  font-family: var(--mono-font);
  font-weight: 400;
  letter-spacing: 0.02em;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.25rem 0;
}

.hermes-inference-stages {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.hermes-inference-step {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--muted);
  opacity: 0.35;
  transform: translateX(-4px);
  transition: opacity 0.5s ease, transform 0.5s ease, color 0.5s ease;
}

.hermes-inference-step.is-active {
  opacity: 1;
  transform: translateX(0);
  color: var(--fg);
}

.hermes-inference-step.is-done {
  opacity: 0.5;
  transform: translateX(0);
  color: var(--muted);
}

.hermes-step-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hermes-step-icon .dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--muted);
  transition: background 0.4s ease;
}

.hermes-inference-step.is-active .hermes-step-icon .dot {
  background: var(--fg);
  animation: inferencePulse 1.2s ease-in-out infinite;
}

.hermes-inference-step.is-done .hermes-step-icon .dot {
  background: var(--muted);
}

@keyframes inferencePulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.7); }
}

/* Disclaimer above input */
.hermes-disclaimer {
  width: 100%;
  box-sizing: border-box;
  text-align: center;
  font-size: 0.75rem;
  color: var(--muted);
  font-family: var(--mono-font);
  padding: 0.5rem 1rem;
  opacity: 0.6;
  letter-spacing: 0.02em;
}

/* Input wrapper - fixed bottom */
.hermes-input-wrapper {
  width: 100%;
  box-sizing: border-box;
  padding: 0.875rem 1rem;
  padding-bottom: max(0.875rem, env(safe-area-inset-bottom));
  background: var(--bg);
  border-top: none;
  flex-shrink: 0;
  /* Fixed at bottom for native app feel */
  margin-top: auto;
}

.hermes-input-form {
  display: flex;
  align-items: flex-end;
  gap: 0.75rem;
}

.hermes-input {
  flex: 1;
  background: rgba(128, 128, 128, 0.08);
  border: none;
  border-radius: 24px;
  padding: 0.875rem 1.25rem;
  color: var(--fg);
  font-size: 1.0625rem;
  /* 17px */
  font-family: var(--body-font);
  resize: none;
  min-height: 28px;
  max-height: 150px;
  line-height: 1.5;
  -webkit-appearance: none;
  appearance: none;
  transition: background 0.2s ease;
}

.hermes-input:focus {
  outline: none;
  background: rgba(128, 128, 128, 0.12);
}

.hermes-input::placeholder {
  color: var(--muted);
  opacity: 0.6;
}

.hermes-input:disabled {
  opacity: 0.4;
}

.hermes-input-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-shrink: 0;
}

.hermes-clear,
.hermes-send {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--fg);
  border: none;
  color: var(--bg);
  cursor: pointer;
  transition: all 0.15s;
  -webkit-tap-highlight-color: transparent;
  outline: none;
}

.hermes-clear:hover,
.hermes-send:hover {
  opacity: 0.85;
  transform: scale(1.02);
}

.hermes-clear:focus,
.hermes-send:focus,
.hermes-clear:focus-visible,
.hermes-send:focus-visible {
  outline: none;
}

.hermes-clear:active,
.hermes-send:active {
  transform: scale(0.92);
}

.hermes-clear:disabled,
.hermes-send:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* Mobile adjustments */
@media (max-width: 640px) {
  .hermes-container {
    /* Use dynamic viewport for mobile keyboard handling */
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    height: 100dvh;
    height: -webkit-fill-available;
  }

  .hermes-messages {
    padding: calc(4rem + env(safe-area-inset-top, 0px)) 1rem 0.75rem;
    gap: 1.25rem;
    /* Prevent overscroll bounce that can interfere with keyboard */
    overscroll-behavior: none;
  }

  .hermes-input-wrapper {
    padding: 0.75rem 1rem;
    padding-bottom: max(0.75rem, env(safe-area-inset-bottom));
    /* Ensure input stays above keyboard */
    z-index: 10;
  }

  .hermes-input {
    font-size: 17px;
    /* Prevent zoom on iOS */
    /* Prevent iOS from scrolling page on focus */
    touch-action: manipulation;
    padding: 0.75rem 1rem;
  }

  .hermes-user-bubble,
  .hermes-message-text {
    max-width: 90%;
    font-size: 1.25rem;
  }

  .hermes-welcome-text {
    font-size: 1.375rem;
  }

  .hermes-prompt-btn {
    font-size: 1rem;
    padding: 1rem 1.25rem;
  }

  /* Modal mobile styles */
  .hermes-modal {
    width: calc(100% - 2rem);
    max-width: 100%;
  }

  .hermes-modal-content {
    padding: 1.5rem;
    border-radius: 16px;
    max-width: 100%;
  }

  .hermes-modal-title {
    font-size: 1.25rem;
  }

  .hermes-modal-body {
    font-size: 0.875rem;
  }

  .hermes-modal-feature {
    font-size: 0.8125rem;
  }

  .hermes-modal-feature-icon {
    width: 18px;
    height: 18px;
    min-width: 18px;
    min-height: 18px;
    max-width: 18px;
    max-height: 18px;
  }

  /* Smaller buttons on mobile */
  .hermes-clear,
  .hermes-send {
    width: 32px;
    height: 32px;
  }

  .hermes-clear svg,
  .hermes-send svg {
    width: 16px;
    height: 16px;
  }

  /* Topbar is now globally hidden (a11y-only), no separate mobile hide needed */

  /* Consistent spacing — same as other breakpoints */
  .hermes-messages {
    padding-top: calc(4rem + env(safe-area-inset-top, 0px));
  }
}

/* Keyboard open state - managed by JS */
body.keyboard-open {
  overflow: hidden;
  position: fixed;
  width: 100%;
  top: 0;
  left: 0;
}

body.keyboard-open .hermes-container {
  /* Height is set dynamically by JS using visualViewport */
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
}

body.keyboard-open .hermes-messages {
  /* Ensure messages don't get pushed up out of view */
  padding-top: calc(3rem + env(safe-area-inset-top));
}

/* Desktop */
@media (min-width: 768px) {
  .hermes-messages {
    padding: calc(5rem + env(safe-area-inset-top)) 2rem 2.5rem;
  }

  .hermes-input-wrapper {
    padding: 1.25rem 2rem;
    padding-bottom: max(1.5rem, env(safe-area-inset-bottom));
  }
}

/* ============================================
   SYS_LINK PAGE STYLES - v2 (Boot → Logs → Bento)
   ============================================ */

.is-status-page {
  background: var(--bg);
}

.is-status-page main {
  padding: 0;
  max-width: 100%;
}

.is-status-page .container {
  max-width: 100%;
  padding: 0;
}

/* Hide stamp header on status page */
.is-status-page .stamp-header {
  display: none;
}

/* Page layout */
.status {
  --sys-accent: #27ca40;
  --sys-warn: #ffbd2e;
  --sys-bad: #ff5f56;
  --sys-blue: #3b82f6;
  --sys-panel: var(--bg);
  --sys-panel-2: var(--code-bg);
  --sys-border: var(--border);
  --sys-text: var(--fg);
  --sys-muted: var(--muted);

  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  padding: calc(5.5rem + env(safe-area-inset-top)) 0.75rem 2.5rem;
  max-width: 1200px;
  margin: 0 auto;
  color: var(--sys-text);
}

@media (min-width: 768px) {
  .syslink {
    padding: calc(6rem + env(safe-area-inset-top)) 1.25rem 3rem;
  }
}

/* Terminal Window */
.status-terminal {
  background: var(--sys-panel);
  border: 1px solid var(--sys-border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: none;
}

.sys-terminal {
  background: var(--sys-panel);
  border: 1px solid var(--sys-border);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.syslink-terminal {
  position: static;
}

.status-terminal-header {
  background: var(--sys-panel-2);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--sys-border);
}

.sys-terminal-header {
  background: var(--sys-panel-2);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--sys-border);
}

.sys-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.sys-dot.red {
  background: #ff5f56;
}

.sys-dot.yellow {
  background: #ffbd2e;
}

.sys-dot.green {
  background: #27ca40;
}

.sys-terminal-title {
  margin-left: 8px;
  font-size: 11px;
  color: var(--sys-muted);
  letter-spacing: 0.04em;
}

.status-pill {
  margin-left: auto;
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--sys-muted);
  transition: all 180ms ease;
}

.status-ok {
  background: rgba(39, 202, 64, 0.15);
  color: var(--sys-accent);
}

.status-warn {
  background: rgba(255, 189, 46, 0.15);
  color: var(--sys-warn);
}

.status-error {
  background: rgba(255, 95, 86, 0.15);
  color: var(--sys-bad);
}

.syslink-status-pill {
  margin-left: auto;
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--sys-muted);
  transition: all 180ms ease;
}

.syslink-status--ok {
  background: rgba(39, 202, 64, 0.15);
  color: var(--sys-accent);
}

.syslink-status--warn {
  background: rgba(255, 189, 46, 0.15);
  color: var(--sys-warn);
}

.syslink-status--error {
  background: rgba(255, 95, 86, 0.15);
  color: var(--sys-bad);
}

.status-terminal-body {
  position: relative;
  min-height: 220px;
  max-height: 320px;
  font-size: 13px;
  line-height: 1.7;
  overflow-y: auto;
  padding: 16px 18px;
}

@media (min-width: 768px) {
  .status-terminal-body {
    min-height: 280px;
    max-height: 360px;
    font-size: 14px;
  }
}

.sys-terminal-body {
  position: relative;
  min-height: 220px;
  max-height: 320px;
  font-size: 13px;
  line-height: 1.7;
  overflow: hidden;
}

@media (min-width: 768px) {
  .sys-terminal-body {
    min-height: 280px;
    max-height: 360px;
    font-size: 14px;
  }
}

/* Log Stream */
.status-logstream {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.syslink-logstream {
  position: absolute;
  inset: 0;
  padding: 16px 18px;
  overflow: hidden;
  mask-image: linear-gradient(to bottom, transparent 0%, black 6%, black 92%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 6%, black 92%, transparent 100%);
}

.status-logs-inner {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.status-log {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  animation: none;
  font-size: 13px;
  line-height: 1.6;
}

@media (min-width: 768px) {
  .status-log {
    font-size: 14px;
  }
}

.syslink-log {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  animation: logSlideIn 200ms cubic-bezier(0.2, 0.8, 0.2, 1);
  font-size: 13px;
  line-height: 1.6;
}

@media (min-width: 768px) {
  .syslink-log {
    font-size: 14px;
  }
}

@keyframes logSlideIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.status-log--boot {
  color: var(--sys-text);
}

.status-log--info {
  color: var(--sys-muted);
}

.status-log--success {
  color: var(--sys-accent);
}

.status-log--dim {
  color: var(--sys-muted);
  opacity: 0.6;
}

.status-log--data {
  color: var(--sys-muted);
  font-size: 13px;
}

@media (min-width: 768px) {
  .status-log--data {
    font-size: 14px;
  }
}

.syslink-log--boot {
  color: var(--sys-text);
}

.syslink-log--info {
  color: var(--sys-muted);
}

.syslink-log--success {
  color: var(--sys-accent);
}

.syslink-log--dim {
  color: var(--sys-muted);
  opacity: 0.6;
}

.syslink-log--data {
  color: var(--sys-muted);
  font-size: 13px;
}

@media (min-width: 768px) {
  .syslink-log--data {
    font-size: 14px;
  }
}

.log-prompt {
  color: var(--sys-accent);
}

.log-cmd {
  color: var(--sys-text);
}

.log-cursor {
  color: var(--sys-accent);
  animation: cursorBlink 0.7s step-end infinite;
}

.log-cursor.hide {
  display: none;
}

.log-ts {
  color: var(--sys-muted);
  opacity: 0.7;
  font-weight: 500;
}

.log-data {
  color: var(--sys-muted);
  font-weight: 500;
}

/* Loading indicator */
.status-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--sys-panel);
  border-radius: 0;
  opacity: 1;
  pointer-events: auto;
  transition: opacity 300ms ease;
  z-index: 10;
}

.status-loading.hidden {
  opacity: 0;
  pointer-events: none;
}

.status-loading-spinner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.status-spinner {
  width: 32px;
  height: 32px;
  border: 2px solid var(--sys-border);
  border-top-color: var(--sys-accent);
  border-radius: 50%;
  animation: spinnerRotate 0.8s linear infinite;
}

@keyframes spinnerRotate {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

.status-loading-text {
  font-size: 12px;
  color: var(--sys-muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  animation: pulseOpacity 1.5s ease-in-out infinite;
}

@keyframes pulseOpacity {

  0%,
  100% {
    opacity: 0.6;
  }

  50% {
    opacity: 1;
  }
}

.status-metabar {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  padding: 1rem 0.5rem;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 200ms ease, transform 240ms ease;
}

.status-metabar.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.status-meta-block {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.status-meta-label {
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sys-muted);
}

.status-meta-value {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--sys-text);
}

@media (min-width: 768px) {
  .status-meta-value {
    font-size: 16px;
  }
}

/* Blur Overlay with Stats */
.syslink-overlay {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 62%;
  /* Softer gradient that fades to transparent at the far right to avoid a harsh cut */
  background: linear-gradient(to right,
      transparent 0%,
      rgba(13, 13, 13, 0.06) 6%,
      rgba(13, 13, 13, 0.18) 18%,
      rgba(13, 13, 13, 0.32) 34%,
      rgba(13, 13, 13, 0.44) 54%,
      rgba(13, 13, 13, 0.24) 78%,
      rgba(13, 13, 13, 0.0) 100%);
  backdrop-filter: blur(8px) saturate(1.05);
  -webkit-backdrop-filter: blur(8px) saturate(1.05);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 28px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 300ms cubic-bezier(0.2, 0.8, 0.2, 1);
  /* inner shadow to soften the edge */
  box-shadow: inset -40px 0 60px -30px rgba(0, 0, 0, 0.35);
  /* ensure a gentle right-side fade for browsers that support masking */
  -webkit-mask-image: linear-gradient(to right, black 0%, black 78%, transparent 100%);
  mask-image: linear-gradient(to right, black 0%, black 78%, transparent 100%);
}

html[data-theme="light"] .syslink-overlay {
  background: linear-gradient(to right,
      transparent 0%,
      rgba(245, 245, 245, 0.06) 6%,
      rgba(245, 245, 245, 0.18) 18%,
      rgba(245, 245, 245, 0.32) 34%,
      rgba(245, 245, 245, 0.44) 54%,
      rgba(245, 245, 245, 0.24) 78%,
      rgba(245, 245, 245, 0.0) 100%);
  box-shadow: inset -40px 0 60px -30px rgba(255, 255, 255, 0.06);
}

.syslink--live .syslink-overlay {
  opacity: 1;
}

.syslink-overlay-stats {
  display: flex;
  gap: 32px;
  align-items: flex-end;
  /* small translucent panel to keep metrics legible through the blur */
  background: rgba(0, 0, 0, 0.12);
  padding: 8px 12px;
  border-radius: 10px;
  pointer-events: none;
  transform: translateX(6px);
}

html[data-theme="light"] .syslink-overlay-stats {
  background: rgba(255, 255, 255, 0.08);
}

.syslink-big-stat {
  text-align: right;
}

.syslink-big-label {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--sys-muted);
  margin-bottom: 4px;
  font-weight: 600;
}

.syslink-big-value {
  font-size: 48px;
  font-weight: 900;
  letter-spacing: -0.05em;
  color: var(--sys-text);
  line-height: 0.95;
  font-family: "Source Code Pro", "JetBrains Mono", monospace;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.syslink-big-value span {
  font-size: 20px;
  color: var(--sys-muted);
  font-weight: 600;
  margin-left: 2px;
}

.syslink-big-value--net {
  font-size: 24px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-weight: 800;
}

.syslink-big-value--net .net-up {
  color: var(--sys-accent);
  text-shadow: 0 0 12px rgba(39, 202, 64, 0.4);
}

.syslink-big-value--net .net-down {
  color: var(--sys-blue);
  text-shadow: 0 0 12px rgba(59, 130, 246, 0.4);
}

@media (min-width: 768px) {
  .syslink-big-value {
    font-size: 64px;
  }

  .syslink-big-value span {
    font-size: 26px;
  }

  .syslink-big-value--net {
    font-size: 28px;
  }
}

/* Page Header */
.syslink-page-header {
  text-align: center;
  padding: 3rem 1rem 2rem;
  margin-bottom: 0.5rem;
}

.syslink-page-title {
  margin: 0;
  font-size: 42px;
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--sys-text);
  font-family: var(--heading-font);
  line-height: 1.2;
}

@media (max-width: 640px) {
  .syslink-page-header {
    padding: 2rem 1rem 1.5rem;
  }

  .syslink-page-title {
    font-size: 32px;
  }
}

/* Meta Bar */
.syslink-metabar {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem 2.5rem;
  padding: 1.5rem 0.5rem;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 200ms ease, transform 240ms ease;
  font-family: var(--mono-font);
}

.syslink-metabar.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.syslink-meta-block {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.syslink-meta-label {
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sys-muted);
  font-weight: 500;
}

.syslink-meta-value {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--sys-accent);
  font-family: var(--mono-font);
}

@media (min-width: 768px) {
  .syslink-meta-value {
    font-size: 16px;
  }
}

/* ============================================
   INFO GRID
   ============================================ */

.status-grid {
  display: grid;
  gap: 0.5rem;
  margin-top: 0.5rem;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 280ms ease, transform 300ms ease;
}

.status-grid:not([hidden]) {
  opacity: 1;
  transform: translateY(0);
}

.status--live .status-grid {
  opacity: 1;
  transform: translateY(0);
}

@media (min-width: 860px) {
  .status-grid {
    grid-template-columns: repeat(12, 1fr);
  }

  .status-card--specs {
    grid-column: span 5;
  }

  .status-card--kpi {
    grid-column: span 7;
  }

  .status-card--kpi:nth-of-type(3) {
    grid-column: span 6;
  }

  .status-card--net {
    grid-column: span 6;
  }

  .status-card--disk {
    grid-column: span 6;
  }

  .status-card--procs {
    grid-column: span 5;
  }
}

.status-card {
  background: var(--sys-panel);
  border: 1px solid var(--sys-border);
  border-radius: 12px;
  padding: 0.75rem 0.875rem;
  overflow: hidden;
}

.status-card-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 0.5rem;
}

.status-card-title {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sys-text);
}

.status-card-sub {
  font-size: 10px;
  color: var(--sys-muted);
  white-space: nowrap;
}

/* Specs Card */
.status-specs {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.status-spec-row {
  display: flex;
  gap: 10px;
  font-size: 10.5px;
  line-height: 1.35;
}

.status-spec-key {
  color: var(--sys-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  min-width: 52px;
  flex-shrink: 0;
}

.status-spec-val {
  color: var(--sys-text);
  word-break: break-word;
}

/* KPI Cards */
.status-kpi-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.status-kpi-value {
  font-size: 36px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: -0.05em;
  color: var(--sys-text);
  font-family: "JetBrains Mono", monospace;
}

.status-kpi-unit {
  font-size: 16px;
  color: var(--sys-muted);
  margin-left: 2px;
  font-weight: 500;
}

.status-kpi-meta {
  margin-top: 6px;
  font-size: 9.5px;
  color: var(--sys-muted);
  letter-spacing: 0.02em;
}

/* CPU Cores */
.status-cores {
  display: flex;
  gap: 5px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.status-core {
  width: 28px;
  height: 28px;
  border-radius: 5px;
  background: linear-gradient(to top, var(--sys-accent) var(--pct, 0%), rgba(255, 255, 255, 0.06) var(--pct, 0%));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 8.5px;
  font-weight: 600;
  color: var(--sys-text);
}

/* Network Card */
.status-net-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 8px;
}

.status-net-stat {
  display: flex;
  align-items: center;
  gap: 10px;
}

.status-net-icon {
  font-size: 20px;
  font-weight: 700;
}

.status-net-stat--up .status-net-icon {
  color: var(--sys-accent);
}

.status-net-stat--down .status-net-icon {
  color: var(--sys-blue);
}

.status-net-value {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--sys-text);
  line-height: 1;
}

.status-net-label {
  font-size: 9px;
  color: var(--sys-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* Disk Card */
.status-disk-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 8px;
}

.status-disk-label {
  font-size: 10px;
  color: var(--sys-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 4px;
}

.status-disk-value {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--sys-text);
  line-height: 1;
}

/* Sparklines */
.status-spark {
  width: 120px;
  height: 42px;
  display: block;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
  flex-shrink: 0;
}

.status-spark--wide {
  width: 100%;
  height: 50px;
}

/* Processes */
.status-procs {
  font-size: 11px;
}

.status-procs-head,
.status-proc {
  display: grid;
  grid-template-columns: 54px 1fr 54px;
  gap: 10px;
  align-items: center;
}

.status-procs-head {
  color: var(--sys-muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 9px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--sys-border);
  margin-bottom: 6px;
}

.status-proc {
  padding: 7px 0;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.05);
  color: var(--sys-text);
}

.status-proc:last-child {
  border-bottom: 0;
}

.status-proc-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.syslink-grid {
  display: grid;
  gap: 1rem;
  margin-top: 1.5rem;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 280ms ease, transform 300ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.syslink-grid:not([hidden]) {
  opacity: 1;
  transform: translateY(0);
}

.syslink--live .syslink-grid {
  opacity: 1;
  transform: translateY(0);
}

@media (min-width: 860px) {
  .syslink-grid {
    grid-template-columns: repeat(12, 1fr);
  }

  .syslink-card--specs {
    grid-column: span 5;
  }

  .syslink-card--kpi {
    grid-column: span 7;
  }

  .syslink-card--kpi:nth-of-type(3) {
    grid-column: span 6;
  }

  .syslink-card--net {
    grid-column: span 6;
  }

  .syslink-card--disk {
    grid-column: span 6;
  }

  .syslink-card--procs {
    grid-column: span 5;
  }
}

.syslink-card {
  background: var(--sys-panel);
  border: 1px solid var(--sys-border);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  overflow: hidden;
  font-family: var(--mono-font);
}

.syslink-card-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 1rem;
}

.syslink-card-title {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sys-text);
  font-family: var(--mono-font);
}

.syslink-card-sub {
  font-size: 11px;
  color: var(--sys-accent);
  white-space: nowrap;
  font-weight: 500;
}

/* Specs Card */
.syslink-specs {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.syslink-spec-row {
  display: flex;
  gap: 12px;
  font-size: 11.5px;
  line-height: 1.4;
  font-family: var(--mono-font);
}

.syslink-spec-key {
  color: var(--sys-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  min-width: 54px;
  flex-shrink: 0;
  font-weight: 500;
}

.syslink-spec-val {
  color: var(--sys-accent);
  word-break: break-word;
  font-weight: 500;
}

/* KPI Cards */
.syslink-kpi-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 10px;
}

.syslink-kpi-value {
  font-size: 40px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--sys-accent);
  font-family: var(--mono-font);
}

.syslink-kpi-unit {
  font-size: 18px;
  color: var(--sys-muted);
  margin-left: 4px;
  font-weight: 500;
}

.syslink-kpi-meta {
  margin-top: 10px;
  font-size: 10.5px;
  color: var(--sys-muted);
  letter-spacing: 0.04em;
  font-weight: 500;
}

/* CPU Cores */
.syslink-cores {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.syslink-core {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: linear-gradient(to top, var(--sys-accent) var(--pct, 0%), rgba(255, 255, 255, 0.06) var(--pct, 0%));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9.5px;
  font-weight: 600;
  color: var(--sys-text);
  font-family: var(--mono-font);
}

/* Network Card */
.syslink-net-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 12px;
}

.syslink-net-stat {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--mono-font);
}

.syslink-net-icon {
  font-size: 20px;
  font-weight: 700;
}

.syslink-net-stat--up .syslink-net-icon {
  color: var(--sys-accent);
}

.syslink-net-stat--down .syslink-net-icon {
  color: var(--sys-blue);
}

.syslink-net-value {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--sys-accent);
  line-height: 1;
  font-family: var(--mono-font);
}

.syslink-net-label {
  font-size: 10px;
  color: var(--sys-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 500;
}

/* Disk Card */
.syslink-disk-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 12px;
}

.syslink-disk-label {
  font-size: 10px;
  color: var(--sys-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
  font-weight: 500;
}

.syslink-disk-value {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--sys-accent);
  line-height: 1;
  font-family: var(--mono-font);
}

/* Sparklines */
.syslink-spark {
  width: 120px;
  height: 42px;
  display: block;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
  flex-shrink: 0;
}

.syslink-spark--wide {
  width: 100%;
  height: 50px;
}

/* Processes */
.syslink-procs {
  font-size: 12px;
  font-family: var(--mono-font);
}

.syslink-procs-head,
.syslink-proc {
  display: grid;
  grid-template-columns: 54px 1fr 54px;
  gap: 12px;
  align-items: center;
}

.syslink-procs-head {
  color: var(--sys-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--sys-border);
  margin-bottom: 10px;
  font-weight: 500;
}

.syslink-proc {
  padding: 10px 0;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.05);
  color: var(--sys-accent);
}

.syslink-proc:last-child {
  border-bottom: 0;
}

.syslink-proc-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--sys-text);
}

.is-right {
  text-align: right;
}

/* Heatmap */
.syslink-heatmap {
  width: 100%;
  height: 120px;
  display: block;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
}

.syslink-heatmap-legend {
  margin-top: 10px;
  display: flex;
  justify-content: space-between;
  color: var(--sys-muted);
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: lowercase;
  padding: 0 4px;
}

/* ============================================
   LINUX TIMELINE
   ============================================ */

.status-timeline {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--sys-border);
}

.status-timeline-header {
  margin-bottom: 2rem;
}

.status-timeline-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: lowercase;
  color: var(--sys-text);
}

.status-timeline-sub {
  margin-top: 4px;
  font-size: 11px;
  color: var(--sys-muted);
}

.status-timeline-entries {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.status-timeline-entry {
  position: relative;
  padding-left: 1rem;
  border-left: 2px solid var(--sys-border);
}

.status-timeline-date {
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--sys-muted);
  margin-bottom: 6px;
}

.status-timeline-tag {
  display: inline-block;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--bg);
  background: var(--sys-accent);
  padding: 2px 8px;
  border-radius: 3px;
  margin-bottom: 12px;
}

.status-timeline-content {
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-size: 0.95rem;
  line-height: 1.75;
  color: var(--sys-muted);
}

.status-timeline-content p {
  margin: 0 0 1rem;
}

.status-timeline-content p:last-child {
  margin-bottom: 0;
}

.status-timeline-end {
  text-align: center;
  padding: 2rem 0 0.5rem;
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--sys-muted);
  opacity: 0.6;
}

/* Noscript */
.status-noscript {
  margin-top: 1rem;
  color: var(--sys-muted);
  font-size: 12px;
  text-align: center;
}

.syslink-timeline {
  margin-top: 3rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--sys-border);
  font-family: var(--mono-font);
}

.syslink-timeline-header {
  margin-bottom: 2rem;
}

.syslink-timeline-title {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: lowercase;
  color: var(--sys-text);
  font-family: var(--mono-font);
}

.syslink-timeline-sub {
  margin-top: 6px;
  font-size: 12px;
  color: var(--sys-muted);
  font-weight: 500;
}

.syslink-timeline-entries {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.syslink-timeline-entry {
  position: relative;
  padding-left: 1.25rem;
  border-left: 2px solid var(--sys-border);
}

.syslink-timeline-date {
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--sys-accent);
  margin-bottom: 8px;
  font-weight: 500;
}

.syslink-timeline-tag {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--bg);
  background: var(--sys-accent);
  padding: 4px 10px;
  border-radius: 4px;
  margin-bottom: 14px;
  font-weight: 500;
}

.syslink-timeline-content {
  font-family: var(--mono-font);
  font-size: 0.98rem;
  line-height: 1.8;
  color: var(--sys-text);
}

.syslink-timeline-content p {
  margin: 0 0 1.2rem;
}

.syslink-timeline-content p:last-child {
  margin-bottom: 0;
}

.syslink-timeline-end {
  text-align: center;
  padding: 2.5rem 0 0.5rem;
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--sys-muted);
  opacity: 0.6;
  font-weight: 500;
}

/* Noscript */
.syslink-noscript {
  margin-top: 1rem;
  color: var(--sys-muted);
  font-size: 12px;
  text-align: center;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {

  .syslink-log,
  .syslink-overlay,
  .syslink-metabar,
  .syslink-grid,
  .log-cursor {
    transition: none !important;
    animation: none !important;
  }
}

/* Profile Picture Theming */
.stamp-avatar {
  transition: all 0.5s ease;
}

/* Dark Mode: Black & White */
html[data-theme="dark"] .stamp-avatar {
  filter: grayscale(100%) contrast(1.1);
}

/* Light Mode: Warm "Eastman" Paper Look */
html[data-theme="light"] .stamp-avatar {
  filter: sepia(60%) contrast(1.1) brightness(0.95);
  opacity: 0.9;
  mix-blend-mode: multiply;
  /* Helps it sit "in" the paper */
}