@charset "UTF-8";
/* Sidebar Link Styling for Interesting Games */
:root {
  --fg-sidebar-link: #0969da;
  /* Blue for light mode */ }

[data-theme='dark'] {
  --fg-sidebar-link: #58a6ff;
  /* Blue for dark mode */ }

.sidebar-action-link {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  color: var(--fg-sidebar-link);
  text-decoration: none;
  padding: 8px 12px;
  background: rgba(9, 105, 218, 0.05);
  border: 1px solid rgba(9, 105, 218, 0.2);
  border-radius: 4px;
  transition: all 0.2s;
  margin-top: 8px; }

.sidebar-action-link:hover {
  background: rgba(9, 105, 218, 0.1);
  border-color: var(--fg-sidebar-link);
  transform: translateX(4px); }

.sidebar-action-link svg {
  width: 14px;
  height: 14px; }

/* =============================================================
   Scroll Performance Fixes
   ============================================================= */
/* 1. Remove backdrop-filter from sticky nav.
      backdrop-filter re-blurs everything behind the nav on every
      scroll frame. Replace with a more opaque solid background. */
.main-nav {
  background: rgba(255, 255, 255, 0.96) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08) !important; }

[data-theme='dark'] .main-nav {
  background: rgba(13, 17, 23, 0.96) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important; }

/* 2. Kill mix-blend-mode on the atmosphere overlay.
      mix-blend-mode forces the browser to composite every layer
      below it separately on every paint. Without it the noise
      grain still renders — it just doesn't trigger full
      re-compositing on scroll. */
.site-atmosphere {
  mix-blend-mode: normal !important;
  opacity: 0.04 !important; }

[data-theme='dark'] .site-atmosphere {
  mix-blend-mode: normal !important;
  opacity: 0.07 !important; }

/* 3. Remove the dark-theme glow pseudo-elements.
      filter: blur(100px) on a 60vw × 60vh element is one of
      the most expensive GPU operations you can run. */
[data-theme='dark'] .site-atmosphere::before,
[data-theme='dark'] .site-atmosphere::after {
  display: none !important; }

/* =============================================================
   Horizontal Rules - Reduce excessive padding */
hr {
  margin: 1.5rem 0 !important; }

/* =============================================================
   Mermaid Diagrams */
.mermaid {
  display: flex;
  justify-content: center;
  background: transparent;
  padding: 1rem 0;
  margin: 2rem 0;
  overflow-x: auto;
  white-space: pre;
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px; }

/* Mermaid: scrollable wrapper */
.mermaid-zoom-wrap {
  position: relative;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 1.5rem 0;
  border-radius: 6px; }

.mermaid-zoom-wrap .mermaid {
  margin: 0;
  display: inline-block;
  min-width: 100%; }

/* Ensure mermaid SVG does not shrink inside wrapper */
.mermaid-zoom-wrap .mermaid svg {
  max-width: none;
  height: auto;
  display: block; }

/* Fallback for diagrams not yet wrapped */
.mermaid svg {
  max-width: 100%;
  height: auto; }

/* Full-size button */
.mermaid-fullscreen-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.52);
  color: #fff;
  border: none;
  border-radius: 5px;
  padding: 5px 10px;
  font-size: 11px;
  font-family: inherit;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s ease;
  z-index: 5;
  line-height: 1.4; }

.mermaid-zoom-wrap:hover .mermaid-fullscreen-btn {
  opacity: 1; }

/* Always visible on touch / mobile */
@media (hover: none) {
  .mermaid-fullscreen-btn {
    opacity: 1 !important; } }

/* Modal backdrop */
.mermaid-modal {
  position: fixed;
  inset: 0;
  z-index: 50000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px; }

.mermaid-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  cursor: pointer; }

/* Modal content panel */
.mermaid-modal-inner {
  position: relative;
  z-index: 1;
  width: 96vw;
  max-height: 92vh;
  overflow: auto;
  background: var(--bg, #fff);
  border-radius: 10px;
  padding: 44px 20px 24px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
  touch-action: pan-x pan-y; }

.mermaid-modal-svg-wrap {
  width: 100%;
  overflow: auto;
  -webkit-overflow-scrolling: touch; }

.mermaid-modal-svg-scale {
  display: inline-block;
  min-width: 100%;
  transform-origin: top left; }

.mermaid-modal-svg-scale svg {
  display: block;
  width: 100%;
  height: auto;
  min-width: 600px; }

.mermaid-modal-close {
  position: absolute;
  top: 10px;
  right: 12px;
  background: none;
  border: 1px solid rgba(128, 128, 128, 0.3);
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  color: var(--text, #333);
  padding: 4px 9px;
  border-radius: 5px;
  opacity: 0.65;
  transition: opacity 0.15s; }

.mermaid-modal-close:hover {
  opacity: 1; }

/* Zoom controls */
.mermaid-zoom-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 14px; }

.mermaid-zoom-btn {
  background: rgba(128, 128, 128, 0.12);
  border: 1px solid rgba(128, 128, 128, 0.25);
  color: var(--text, #333);
  border-radius: 5px;
  padding: 4px 12px;
  font-size: 16px;
  line-height: 1.2;
  cursor: pointer;
  transition: background 0.15s;
  font-family: inherit; }

.mermaid-zoom-btn:hover {
  background: rgba(128, 128, 128, 0.22); }

.mermaid-zoom-reset {
  font-size: 12px;
  padding: 5px 10px; }

.mermaid-zoom-label {
  font-size: 12px;
  font-family: monospace;
  min-width: 38px;
  text-align: center;
  opacity: 0.65;
  color: var(--text, #333); }

/* Mermaid Theme Overrides */
[data-theme='dark'] .mermaid .node rect,
[data-theme='dark'] .mermaid .node polygon,
[data-theme='dark'] .mermaid .node circle,
[data-theme='dark'] .mermaid .node ellipse,
[data-theme='dark'] .mermaid .node path {
  stroke: rgba(255, 255, 255, 0.2) !important; }

/* Custom Mermaid Classes for States */
.mermaid .state-initial rect {
  fill: #f8bbd0 !important;
  stroke: #c2185b !important; }

.mermaid .state-final rect {
  fill: #c8e6c9 !important;
  stroke: #2e7d32 !important; }

[data-theme='dark'] .mermaid .state-initial rect {
  fill: #880e4f !important;
  stroke: #ff4081 !important; }

[data-theme='dark'] .mermaid .state-final rect {
  fill: #1b5e20 !important;
  stroke: #69f0ae !important; }

/* Ensure text color in dark mode for custom nodes */
[data-theme='dark'] .mermaid .state-initial .nodeLabel,
[data-theme='dark'] .mermaid .state-initial text,
[data-theme='dark'] .mermaid .state-final .nodeLabel,
[data-theme='dark'] .mermaid .state-final text {
  fill: #ffffff !important;
  color: #ffffff !important; }

/* =============================================================
   Posts Grid Layout
   ============================================================= */
.posts-grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2.5rem; }

.posts-grid-item .post-preview {
  height: 100%;
  margin-bottom: 0; }

/* =============================================================
   TL;DR Callout Box
   ============================================================= */
.tldr-callout-box {
  background: var(--color-bg-card, rgba(0, 0, 0, 0.03));
  border-left: 4px solid var(--fg-sidebar-link, #0969da);
  padding: 1rem 1.25rem;
  margin-top: 1.5rem;
  margin-bottom: 2rem;
  border-radius: 4px; }

.tldr-header {
  display: block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
  color: var(--fg-sidebar-link, #0969da); }

.tldr-body {
  font-size: 0.94rem;
  line-height: 1.6;
  color: #24292f; }

.tldr-body ul,
.tldr-body ol {
  margin: 0;
  padding-left: 1.25rem; }

.tldr-body li {
  margin-bottom: 0.35rem; }

.tldr-body li:last-child {
  margin-bottom: 0; }

[data-theme='dark'] .tldr-callout-box {
  background: rgba(13, 17, 23, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-left: 4px solid #58a6ff; }

[data-theme='dark'] .tldr-header {
  color: #58a6ff; }

[data-theme='dark'] .tldr-body,
[data-theme='dark'] .tldr-body p,
[data-theme='dark'] .tldr-body li {
  color: #e6edf3 !important; }

[data-theme='dark'] .tldr-body a {
  color: #58a6ff !important;
  text-decoration: underline; }

/* =============================================================
   Open to Hire Top Banner
   ============================================================= */
.open-to-hire-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--color-bg-card, #0d1117);
  color: var(--color-text-primary, #f0f6fc);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  padding: 8px 16px;
  text-decoration: none;
  border-bottom: 1px solid rgba(0, 255, 65, 0.25);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
  will-change: transform, opacity;
  position: relative;
  z-index: 1001; }

.open-to-hire-banner:hover {
  color: #00ff41;
  border-bottom-color: #00ff41; }

.open-to-hire-banner.hidden-banner {
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none; }

.hire-pulse-dot {
  width: 8px;
  height: 8px;
  background-color: #00ff41;
  border-radius: 50%;
  box-shadow: 0 0 8px #00ff41;
  animation: hire-pulse 2s infinite;
  flex-shrink: 0; }

@keyframes hire-pulse {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(0, 255, 65, 0.7); }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 8px rgba(0, 255, 65, 0); }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(0, 255, 65, 0); } }

.hire-link-text {
  font-weight: 600;
  color: #00ff41;
  text-decoration: underline;
  white-space: nowrap;
  flex-shrink: 0; }

@media (max-width: 768px) {
  .open-to-hire-banner {
    font-size: 0.78rem;
    padding: 6px 12px;
    gap: 6px; }
  .hire-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis; } }

/* =============================================================
   Sidebar Removal & Full-Width Layout Fix for About Page
   (Scoped exclusively to pages containing .about-hero-card)
   ============================================================= */
body:has(.about-hero-card) .manuscript-sidebar,
body:has(.about-hero-card) .sidebar-container,
body:has(.about-hero-card) aside,
.manuscript-grid:has(.about-hero-card) .manuscript-sidebar,
.container:has(.about-hero-card) .sidebar-container,
.page-about-manuscript .manuscript-sidebar,
.page-about-manuscript .sidebar-container {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important; }

body:has(.about-hero-card) .manuscript-content,
body:has(.about-hero-card) .col-lg-8,
body:has(.about-hero-card) .col-lg-9,
body:has(.about-hero-card) .col-md-9,
.full-width-about-content {
  width: 100% !important;
  max-width: 860px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  float: none !important; }

/* =============================================================
   Homepage Sidebar Video Avatar
   ============================================================= */
.sidebar-video-wrap {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  overflow: hidden;
  margin: 0 auto 0.75rem auto;
  border: 2px solid rgba(88, 166, 255, 0.35);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
  background: #0d1117; }

.sidebar-profile-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block; }

/* =============================================================
   About Page Hero Card & Layout
   ============================================================= */
.about-hero-card {
  background: var(--color-bg-card, rgba(0, 0, 0, 0.03));
  border: 1px solid var(--color-border, rgba(127, 127, 127, 0.2));
  border-radius: 8px;
  padding: 1.75rem;
  margin-top: 2rem;
  margin-bottom: 1.75rem;
  position: relative;
  overflow: hidden; }

[data-theme='dark'] .about-hero-card {
  background: rgba(13, 17, 23, 0.7);
  border-color: rgba(255, 255, 255, 0.1); }

.about-hero-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 2rem;
  align-items: start; }

.about-hero-bio {
  font-size: 1.08rem;
  line-height: 1.7;
  margin: 0; }

.about-hero-knowmore {
  margin-top: 0.75rem;
  margin-bottom: 0;
  font-size: 0.95rem; }

.about-topics-section {
  margin-top: 1.5rem;
  margin-bottom: 2.25rem; }

.about-topics-label,
.nerd-deepdive-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-secondary, #6e7681);
  margin-bottom: 0.5rem;
  display: block; }

[data-theme='dark'] .about-topics-label,
[data-theme='dark'] .nerd-deepdive-tag {
  color: #8b949e; }

@media (max-width: 768px) {
  .about-hero-layout {
    grid-template-columns: 1fr; }
  .about-hero-video-wrap {
    order: -1;
    max-width: 240px;
    margin: 0 auto 1.5rem auto; }
  .about-hero-bio {
    font-size: 1.02rem; } }

.about-hero-video-wrap {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--color-border, rgba(127, 127, 127, 0.2));
  background: #0d1117;
  position: relative; }

.video-time-toggle-btn {
  position: absolute;
  bottom: 8px;
  right: 8px;
  z-index: 10;
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  margin: 0 !important;
  color: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0.35;
  transition: opacity 0.2s ease, color 0.2s ease;
  user-select: none; }

.video-time-toggle-btn:hover {
  opacity: 0.9;
  color: #ffffff; }

.time-overlay-icon {
  display: block;
  width: 12px;
  height: 12px; }

.about-profile-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: filter 0.5s ease; }

/* Local Time-of-Day & Site Theme Adaptive Video Overlay */
.about-hero-video-wrap[data-time-of-day="day"] .about-profile-video {
  filter: brightness(1.04) contrast(1.02) !important; }

.about-hero-video-wrap[data-time-of-day="day"]::after {
  display: none !important; }

.about-hero-video-wrap[data-time-of-day="night"] .about-profile-video,
[data-theme='dark'] .about-hero-video-wrap:not([data-time-of-day="day"]) .about-profile-video {
  filter: brightness(0.72) contrast(1.1) !important; }

.about-hero-video-wrap[data-time-of-day="night"]::after,
[data-theme='dark'] .about-hero-video-wrap:not([data-time-of-day="day"])::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(180deg, rgba(13, 17, 23, 0.25) 0%, rgba(10, 14, 26, 0.55) 100%);
  pointer-events: none;
  border-radius: inherit; }

.inline-role-link {
  color: var(--fg-sidebar-link, #0969da);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: opacity 0.2s ease; }

[data-theme='dark'] .inline-role-link {
  color: #58a6ff; }

.inline-role-link:hover {
  opacity: 0.85; }

.about-tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 0.5rem; }

.tech-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  font-weight: 500;
  padding: 5px 12px;
  background: rgba(127, 127, 127, 0.08);
  border: 1px solid rgba(127, 127, 127, 0.2);
  border-radius: 4px;
  color: inherit;
  text-decoration: none !important;
  display: inline-block;
  transition: all 0.2s ease; }

a.tech-tag:hover {
  border-color: var(--fg-sidebar-link, #0969da);
  background: rgba(9, 105, 218, 0.08);
  transform: translateY(-1px);
  color: var(--fg-sidebar-link, #0969da) !important; }

[data-theme='dark'] .tech-tag {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.12);
  color: #e6edf3; }

[data-theme='dark'] a.tech-tag:hover {
  border-color: #58a6ff;
  background: rgba(88, 166, 255, 0.12);
  color: #58a6ff !important;
  box-shadow: 0 2px 8px rgba(88, 166, 255, 0.15); }

/* Featured Article Cards */
.nerd-deepdive-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
  margin: 1.25rem 0 2.25rem 0; }

.nerd-deepdive-card {
  display: block;
  background: var(--color-bg-card, rgba(0, 0, 0, 0.02));
  border: 1px solid var(--color-border, rgba(127, 127, 127, 0.15));
  border-radius: 6px;
  padding: 1.25rem;
  text-decoration: none !important;
  color: inherit !important;
  transition: border-color 0.2s ease, transform 0.2s ease; }

.nerd-deepdive-card:hover {
  border-color: var(--fg-sidebar-link, #0969da);
  transform: translateY(-2px); }

[data-theme='dark'] .nerd-deepdive-card {
  background: rgba(13, 17, 23, 0.6);
  border-color: rgba(255, 255, 255, 0.08); }

[data-theme='dark'] .nerd-deepdive-card:hover {
  border-color: #58a6ff;
  background: rgba(13, 17, 23, 0.9); }

/* Strictly Scoped About Page Headings & Typography */
.page-about-manuscript h2,
.full-width-about-content h2 {
  font-size: 1.05rem !important;
  font-weight: 700 !important;
  letter-spacing: -0.01em;
  margin: 1.75rem 0 0.85rem 0 !important;
  border-bottom: none !important;
  padding-bottom: 0 !important; }

.page-about-manuscript h3,
.full-width-about-content h3,
.nerd-deepdive-title,
.about-grid-card h3 {
  font-size: 0.95rem !important;
  font-weight: 600 !important;
  line-height: 1.35 !important;
  margin: 0 0 0.35rem 0 !important; }

.nerd-deepdive-desc,
.about-grid-card p {
  font-size: 0.85rem !important;
  line-height: 1.5 !important;
  color: var(--color-text-secondary, #57606a);
  margin: 0; }

[data-theme='dark'] .nerd-deepdive-desc,
[data-theme='dark'] .about-grid-card p {
  color: #8b949e; }

.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
  margin: 1.5rem 0 2.5rem 0; }

.about-grid-card {
  background: var(--color-bg-card, rgba(0, 0, 0, 0.02));
  border: 1px solid var(--color-border, rgba(127, 127, 127, 0.15));
  border-radius: 6px;
  padding: 1.25rem; }

.about-social-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 0.5rem; }

.social-pill {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  font-weight: 500;
  padding: 5px 12px;
  background: rgba(127, 127, 127, 0.08);
  border: 1px solid var(--color-border, rgba(127, 127, 127, 0.2));
  border-radius: 4px;
  color: var(--fg-sidebar-link, #0969da) !important;
  text-decoration: none !important;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s ease; }

.social-pill:hover {
  border-color: var(--fg-sidebar-link, #0969da);
  background: rgba(9, 105, 218, 0.08);
  transform: translateY(-1px); }

[data-theme='dark'] .social-pill {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.12);
  color: #58a6ff !important; }

[data-theme='dark'] .social-pill:hover {
  border-color: #58a6ff;
  background: rgba(88, 166, 255, 0.12);
  box-shadow: 0 2px 8px rgba(88, 166, 255, 0.15); }

/* =============================================================
   No-Sidebar Page Layout Override
   ============================================================= */
.manuscript-grid.no-sidebar {
  display: block !important; }

.manuscript-grid.no-sidebar .manuscript-content {
  max-width: 860px !important;
  margin: 0 auto !important; }

/* =============================================================
   Anti-FOUC Dark Mode & View Transition Flash Prevention
   ============================================================= */
html {
  background-color: #ffffff; }

html[data-theme='dark'],
[data-theme='dark'] {
  background-color: #0d1117 !important;
  color-scheme: dark !important; }

html[data-theme='dark'] body,
[data-theme='dark'] body {
  background-color: #0d1117 !important; }

/* Prevent View Transition White Canvas Flash */
::view-transition-group(root) {
  animation-duration: 0s !important; }

::view-transition-old(root),
::view-transition-new(root) {
  mix-blend-mode: normal !important; }

[data-theme='dark']::view-transition-old(root),
[data-theme='dark']::view-transition-new(root),
html[data-theme='dark']::view-transition-old(root),
html[data-theme='dark']::view-transition-new(root) {
  background-color: #0d1117 !important; }
