:root,
[data-theme="dark"] {
  --bg-page: #000000;
  --bg-card: rgba(12, 12, 14, 0.88);
  --bg-inset: #0a0a0c;
  --border-card: #1f1f24;
  --border-divider: #19191d;
  --text-bright: #f0f0f2;
  --text-body: #b0b0b8;
  --text-muted: #73737d;
  --text-faint: #4e4e57;
  --accent-orange: #d97757;
  --arch-blue: #1793d1;
}

[data-theme="light"] {
  --bg-page: #f5f5f4;
  --bg-card: rgba(255, 255, 255, 0.92);
  --bg-inset: #f0efed;
  --border-card: #e2e2df;
  --border-divider: #e7e7e4;
  --text-bright: #171717;
  --text-body: #404040;
  --text-muted: #737373;
  --text-faint: #a3a3a3;
  --accent-orange: #c25938;
  --arch-blue: #0e7490;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 86px;
}

body {
  background-color: var(--bg-page);
  color: var(--text-body);
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  line-height: 1.65;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Fullscreen Interactive Deep Space Canvas */
#space-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
}

/* Centered Single-Column Container */
.page-wrapper {
  position: relative;
  z-index: 10;
  max-width: 780px;
  margin: 0 auto;
  padding: 28px 18px 64px;
}

.page-wrapper.plan-mode {
  padding-bottom: 0;
  pointer-events: none;
}

.page-wrapper.plan-mode .top-nav-box {
  pointer-events: auto;
}

/* Top Boxed Header ($ ./ sriyansh.dev) */
.top-nav-box {
  background-color: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-card);
  border-radius: 6px;
  padding: 12px 20px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  position: sticky;
  top: 14px;
  z-index: 30;
}

.brand-link {
  text-decoration: none;
  font-size: 13.5px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.prompt-dollar {
  color: var(--text-muted);
  font-weight: 400;
}

.brand-host {
  color: var(--text-bright);
  font-weight: 600;
}

.nav-files {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: auto;
}

.nav-file {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 12.5px;
  transition: color 0.15s ease;
  background: none;
  border: none;
  font-family: inherit;
  cursor: pointer;
}

.nav-file.active,
.nav-file:hover {
  color: var(--text-bright);
}

.nav-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.theme-btn {
  width: 28px;
  height: 28px;
  border-radius: 4px;
  background: transparent;
  border: 1px solid var(--border-card);
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.theme-btn:hover {
  color: var(--text-bright);
  border-color: var(--text-muted);
}

.mobile-menu-btn {
  display: none;
}

/* Terminal Cards */
.term-card {
  background-color: var(--bg-card);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border-card);
  border-radius: 6px;
  margin-bottom: 16px;
  overflow: hidden;
  transition: border-color 0.2s ease;
  scroll-margin-top: 86px;
}

.term-card:hover {
  border-color: #2c2c35;
}

.card-body {
  padding: 22px 24px 18px;
}

/* Arch Linux SSH Header Row */
.ssh-header {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 18px;
}

.arch-logo {
  color: var(--arch-blue);
  display: inline-flex;
  align-items: center;
}

.ssh-title {
  color: var(--text-muted);
  font-size: 12px;
}

/* Hero Heading */
.hero-heading {
  font-size: 21px;
  font-weight: 400;
  line-height: 1.35;
  margin-bottom: 4px;
}

.hey-text {
  color: var(--text-muted);
}

.hero-name {
  color: var(--text-bright);
  font-weight: 700;
  cursor: default;
}

.hero-aka {
  color: var(--text-muted);
  font-weight: 400;
  font-size: 18px;
}

.hero-subline {
  color: var(--text-muted);
  font-size: 12.5px;
  margin-bottom: 18px;
}

/* Inset Origin / Summary Callout Box */
.origin-box {
  background-color: #131316;
  border: 1px solid var(--border-card);
  border-radius: 4px;
  padding: 14px 16px;
  color: var(--text-bright);
  font-size: 12.3px;
  line-height: 1.65;
  margin-bottom: 20px;
}

[data-theme="light"] .origin-box {
  background-color: var(--bg-inset);
}

.origin-box strong {
  color: var(--accent-orange);
  font-weight: 600;
}

/* Two-Column Info Table */
.info-table {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.info-row {
  display: grid;
  grid-template-columns: 145px 1fr;
  align-items: baseline;
  font-size: 12.5px;
}

.info-label {
  color: var(--text-muted);
}

.info-value {
  color: var(--text-body);
}

.accent-orange-link {
  color: var(--accent-orange);
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 4px;
}

.accent-orange-link:hover {
  opacity: 0.85;
}

.accent-orange-plain {
  color: var(--accent-orange);
  text-decoration: none;
}

.accent-orange-plain:hover {
  text-decoration: underline;
  text-decoration-style: dotted;
}

.inline-copy-btn {
  background: none;
  border: none;
  color: var(--text-faint);
  font-family: inherit;
  font-size: 11px;
  margin-left: 8px;
  cursor: pointer;
}

.inline-copy-btn:hover {
  color: var(--text-bright);
}

.social-icons-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-top: 2px;
}

.social-icons-row a {
  color: var(--text-body);
  font-size: 16px;
  text-decoration: none;
  transition: color 0.15s ease;
}

.social-icons-row a:hover {
  color: var(--text-bright);
}

.card-divider {
  border: none;
  border-top: 1px solid var(--border-divider);
  margin: 16px 0;
}

/* Curated 2-Line Tech Stack Row with Subtle Spotlight Glow */
.tech-stack-row {
  position: relative;
}

.tech-tokens {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  color: var(--text-muted);
  position: relative;
  max-width: 540px;
}

.tech-tokens::after {
  content: "";
  position: absolute;
  left: 38%;
  top: 50%;
  width: 90px;
  height: 28px;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(255, 255, 255, 0.14) 0%, transparent 70%);
  pointer-events: none;
}

.tech-tokens span {
  transition: color 0.15s ease;
  cursor: default;
}

.tech-tokens span:hover {
  color: var(--text-bright);
}

/* Card Bottom Prompt */
.card-footer-prompt {
  border-top: 1px solid var(--border-divider);
  padding: 10px 24px;
  color: var(--text-faint);
  font-size: 12px;
}

.prompt-symbol {
  color: var(--text-faint);
  margin-right: 6px;
}

/* Section Headings inside Cards */
.card-section-title {
  font-size: 14.5px;
  font-weight: 500;
  color: var(--text-bright);
  margin-bottom: 18px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: default;
}

.code-icon {
  color: var(--accent-orange);
  font-weight: 600;
}

/* Numbered Project List */
.numbered-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.numbered-item {
  display: grid;
  grid-template-columns: 26px 22px 1fr;
  align-items: baseline;
  font-size: 12.5px;
  line-height: 1.65;
}

.item-idx {
  color: var(--text-faint);
}

.item-icon {
  font-size: 11.5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.icon-prompt { color: var(--accent-orange); font-weight: 700; }
.icon-teal { color: #34d399; }
.icon-blue { color: #60a5fa; }
.icon-purple { color: #a78bfa; }

.item-title {
  color: var(--text-bright);
  font-weight: 600;
  text-decoration: none;
}

.item-title:hover {
  color: var(--accent-orange);
}

.item-arrow {
  color: var(--text-faint);
  margin: 0 4px;
}

.item-desc {
  color: var(--text-muted);
}

/* Experience & Education Blocks */
.edu-blocks {
  display: flex;
  flex-direction: column;
}

.edu-meta-line {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.edu-dot {
  margin: 0 4px;
}

.edu-status {
  color: var(--accent-orange);
}

.edu-degree-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-bright);
  margin-bottom: 4px;
}

.edu-sub-detail {
  color: var(--text-muted);
  font-size: 12.5px;
  margin-bottom: 4px;
}

.edu-accreditation {
  color: var(--text-faint);
  font-size: 11.8px;
}

/* Date-Row Lists (3 AM Thoughts & Certifications) */
.post-rows {
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.post-row {
  display: grid;
  grid-template-columns: 110px 1fr;
  align-items: baseline;
  font-size: 12.5px;
}

.post-row-link {
  text-decoration: none;
  padding: 4px 0;
  transition: transform 0.15s ease;
}

.post-row-link:hover .post-title {
  color: var(--accent-orange);
}

.post-date {
  color: var(--text-faint);
}

.post-title {
  color: var(--text-bright);
  transition: color 0.15s ease;
}

.post-issuer {
  color: var(--text-muted);
}

.back-to-thoughts {
  display: inline-block;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 12px;
  margin-bottom: 16px;
  transition: color 0.15s ease;
}

.back-to-thoughts:hover {
  color: var(--accent-orange);
}

.telemetry-card {
  background: #0d1117;
  border: 1px solid #21262d;
  border-radius: 10px;
  padding: 20px 22px 16px;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
}

.telemetry-top-row {
  position: relative;
  min-height: 295px;
  display: flex;
  align-items: center;
  justify-content: center;
}

#iso-contrib-canvas {
  width: 100%;
  max-width: 720px;
  height: 295px;
  display: block;
}

.telemetry-contrib-group {
  position: absolute;
  top: 2px;
  right: 4px;
  z-index: 3;
}

.telemetry-streak-group {
  position: absolute;
  bottom: 14px;
  left: 6px;
  z-index: 3;
}

.stat-group-label {
  font-size: 11px;
  color: #c9d1d9;
  font-weight: 600;
  margin-bottom: 5px;
}

.telemetry-stat-box {
  background: rgba(13, 17, 23, 0.9);
  border: 1px solid #30363d;
  border-radius: 6px;
  padding: 10px 16px;
}

.stat-box-grid {
  display: grid;
  gap: 20px;
}

.stat-box-grid.three-col {
  grid-template-columns: repeat(3, auto);
}

.stat-box-grid.two-col {
  grid-template-columns: repeat(2, auto);
}

.stat-big-green {
  font-size: 20px;
  font-weight: 600;
  color: #39d353;
  line-height: 1.15;
}

.stat-unit {
  font-size: 12px;
  font-weight: 400;
  color: #39d353;
}

.stat-sub-title {
  font-size: 10.5px;
  font-weight: 600;
  color: #e6edf3;
  margin-top: 3px;
}

.stat-date-range {
  font-size: 9.5px;
  color: #7d8590;
  margin-top: 1px;
}

.stat-avg-line {
  text-align: right;
  font-size: 10.5px;
  color: #8b949e;
  margin-top: 6px;
}

.stat-avg-val {
  color: #39d353;
  font-weight: 600;
}

.heatmap-wrapper {
  margin-top: 4px;
  padding-top: 8px;
}

.heatmap-months {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  padding-left: 30px;
  font-size: 10.5px;
  color: #8b949e;
  margin-bottom: 5px;
}

.heatmap-body {
  display: flex;
  align-items: center;
  gap: 6px;
}

.heatmap-days {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 58px;
  font-size: 10px;
  color: #8b949e;
  width: 24px;
}

.heatmap-grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(52, 1fr);
  grid-template-rows: repeat(7, 1fr);
  grid-auto-flow: column;
  gap: 2.5px;
}

.hm-cell {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 2px;
  background: #161b22;
  border: 1px solid rgba(255, 255, 255, 0.03);
}

.hm-cell.lvl-0, .heatmap-legend .lvl-0 { background: #161b22; }
.hm-cell.lvl-1, .heatmap-legend .lvl-1 { background: #0e4429; }
.hm-cell.lvl-2, .heatmap-legend .lvl-2 { background: #006d32; }
.hm-cell.lvl-3, .heatmap-legend .lvl-3 { background: #26a641; }
.hm-cell.lvl-4, .heatmap-legend .lvl-4 { background: #39d353; }

.heatmap-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
  font-size: 10.5px;
  color: #7d8590;
  padding-left: 30px;
}

.live-sync-indicator {
  color: #7d8590;
  font-size: 10.5px;
}

.heatmap-legend {
  display: flex;
  align-items: center;
  gap: 3px;
}

.heatmap-legend i {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 2px;
}

.post-article-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-bright);
  margin-bottom: 6px;
}

.post-article-meta {
  display: flex;
  gap: 16px;
  font-size: 11.5px;
  color: var(--text-muted);
}

.post-article-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  font-size: 13px;
  line-height: 1.75;
  color: var(--text-body);
}

.post-article-body p strong {
  color: var(--text-bright);
}

.post-article-body blockquote {
  border-left: 2px solid var(--accent-orange);
  padding-left: 14px;
  color: var(--text-bright);
  font-style: italic;
}

.knowme-page-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-bright);
  margin-bottom: 8px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: default;
}

.knowme-page-sub {
  color: var(--text-muted);
  font-size: 12.5px;
  margin-bottom: 18px;
}

.knowme-terminal-box {
  background-color: var(--bg-inset);
  border: 1px solid var(--border-card);
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 470px;
}

.knowme-viewport {
  flex: 1;
  padding: 28px 24px;
  overflow-y: auto;
  max-height: 440px;
  display: flex;
  flex-direction: column;
}

.knowme-EmptyState {
  text-align: center;
  margin: 28px auto 22px;
}

.whoami-cmd {
  color: var(--text-muted);
  font-size: 12px;
  margin-bottom: 10px;
}

.whoami-title {
  color: var(--text-bright);
  font-size: 16.5px;
  font-weight: 600;
  margin-bottom: 6px;
}

.whoami-sub {
  color: var(--text-muted);
  font-size: 12px;
  margin-bottom: 18px;
}

.whoami-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.whoami-pill {
  background: transparent;
  border: 1px solid var(--border-card);
  color: var(--text-muted);
  font-family: inherit;
  font-size: 12px;
  padding: 6px 14px;
  border-radius: 4px;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.whoami-pill:hover {
  color: var(--text-bright);
  border-color: var(--accent-orange);
}

.knowme-chat-log {
  display: flex;
  flex-direction: column;
  gap: 14px;
  font-size: 12.5px;
}

.chat-msg {
  line-height: 1.65;
}

.user-msg {
  color: var(--text-muted);
}

.assistant-msg {
  color: var(--text-bright);
}

.msg-prefix {
  color: var(--accent-orange);
  font-weight: 600;
  margin-right: 6px;
}

.knowme-bottom-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  border-top: 1px solid var(--border-card);
  padding: 12px 16px;
  background-color: rgba(18, 18, 22, 0.65);
}

.prompt-orange {
  color: var(--accent-orange);
  font-weight: 600;
}

#knowme-input {
  background: transparent;
  border: none;
  color: var(--text-bright);
  font-family: inherit;
  font-size: 12.5px;
  width: 100%;
  outline: none;
}

.knowme-run-btn {
  background: transparent;
  border: 1px solid var(--text-muted);
  color: var(--text-bright);
  font-family: inherit;
  font-size: 12px;
  padding: 4px 13px;
  border-radius: 4px;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.knowme-run-btn:hover {
  border-color: var(--accent-orange);
  color: var(--accent-orange);
}

.plan-fullscreen {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 5;
  overflow: hidden;
  user-select: none;
}

.mindmap-canvas {
  width: 100%;
  height: 100%;
  cursor: grab;
  position: relative;
}

.mindmap-canvas.grabbing {
  cursor: grabbing;
}

.mindmap-world {
  position: absolute;
  top: 0;
  left: 0;
  width: 3000px;
  height: 2000px;
  transform-origin: 0 0;
}

.mindmap-svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 3000px;
  height: 2000px;
  pointer-events: none;
}

.mindmap-nodes {
  position: absolute;
  top: 0;
  left: 0;
  width: 3000px;
  height: 2000px;
}

.mm-node {
  position: absolute;
  transform: translate(-50%, -50%);
  padding: 8px 18px;
  border-radius: 10px;
  font-size: 11.5px;
  font-weight: 600;
  color: #121214;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
  transition: transform 0.15s ease, filter 0.15s ease;
  border: 1.5px solid rgba(255, 255, 255, 0.35);
}

.mm-node:hover {
  transform: translate(-50%, -50%) scale(1.06);
  filter: brightness(1.08);
  z-index: 10;
}

.mm-node.root-node {
  padding: 13px 22px;
  font-size: 13px;
  font-weight: 700;
  border-radius: 12px;
  background: linear-gradient(135deg, #d8b4fe, #c084fc);
  color: #171717;
}

.mm-node .node-dot {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 1.5px solid #0b0b0e;
}

.mm-node[data-desc]:hover::after {
  content: attr(data-desc);
  position: absolute;
  left: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%);
  background: rgba(12, 12, 15, 0.96);
  color: #f0f0f2;
  border: 1px solid #2a2a32;
  padding: 6px 11px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 400;
  white-space: nowrap;
  z-index: 30;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.65);
}

.plan-bottom-left {
  position: fixed;
  bottom: 20px;
  left: 24px;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-bright);
}

.plan-bottom-center {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 10px;
}

.plan-hint-pill,
.plan-reset-btn {
  background: rgba(18, 18, 22, 0.88);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-card);
  color: var(--text-muted);
  font-family: inherit;
  font-size: 11.5px;
  padding: 6px 14px;
  border-radius: 999px;
}

.plan-reset-btn {
  cursor: pointer;
  color: var(--text-bright);
  transition: border-color 0.15s ease, color 0.15s ease;
}

.plan-reset-btn:hover {
  border-color: var(--accent-orange);
  color: var(--accent-orange);
}

/* Tooltips */
[data-tooltip] {
  position: relative;
}

[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-inset);
  color: var(--text-bright);
  border: 1px solid var(--border-card);
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
  z-index: 20;
}

[data-tooltip]:hover::after {
  opacity: 1;
}

/* Mobile Responsive */
@media (max-width: 640px) {
  .top-nav-box {
    flex-wrap: wrap;
  }
  .nav-files {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--border-divider);
  }
  .nav-files.open {
    display: flex;
  }
  .mobile-menu-btn {
    display: inline-flex;
  }
  .info-row,
  .post-row {
    grid-template-columns: 1fr;
    gap: 2px;
  }
  .numbered-item {
    grid-template-columns: 24px 20px 1fr;
  }
  .telemetry-contrib-group,
  .telemetry-streak-group {
    position: static;
    margin-bottom: 10px;
  }
  .telemetry-top-row {
    flex-direction: column;
  }
}
