/* ==========================================================================
   Atom One Dark — Markdown Buffer Portfolio
   Core 6-token palette + restrained One Dark syntax roles
   ========================================================================== */

:root {
  /* Core 6 named tokens */
  --one-canvas: #282c34;
  --one-chrome: #21252b;
  --one-border: #323842;
  --one-ink: #abb2bf;
  --one-blue: #61afef;
  --one-green: #98c379;

  /* Calibrated supporting tones (Atom One Dark) */
  --one-title: #d7dae0;
  --one-muted: #828997;      /* >= 4.5:1 AA on #282C34 */
  --one-gutter: #4b5263;     /* quiet editor line numbers */
  --one-line-hl: #2c313a;    /* active editor line tint */
  --one-selection: #3e4451;
  --one-chrome-deep: #181a1f;

  /* Semantic syntax accents (used sparingly in Preview, full in Raw .md) */
  --syn-coral: #e06c75;
  --syn-gold: #e5c07b;
  --syn-purple: #c678dd;
  --syn-cyan: #56b6c2;

  /* Git contribution intensity ramp (Atom One Dark Green) */
  --git-0: #21252b;
  --git-1: #2b3e33;
  --git-2: #3d644a;
  --git-3: #63965e;
  --git-4: #98c379;

  /* Typography */
  --font-mono: 'Fira Code', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --font-sans: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Layout measurements */
  --tab-height: 40px;
  --status-height: 28px;
  --gutter-width: 3.25rem;
  --measure: 68ch;
  --radius-sm: 3px;
}

/* Base reset */
*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  background-color: var(--one-canvas);
  color: var(--one-ink);
  font-size: 16px;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--tab-height) + 1.75rem);
  scrollbar-color: var(--one-selection) var(--one-chrome);
}

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--one-canvas);
  color: var(--one-ink);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.68;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection {
  background-color: var(--one-selection);
  color: var(--one-title);
}

/* Keyboard accessibility */
.skip-link {
  position: fixed;
  top: -100px;
  left: 1rem;
  z-index: 100;
  padding: 0.5rem 0.875rem;
  background: var(--one-blue);
  color: var(--one-chrome-deep);
  font-family: var(--font-mono);
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius-sm);
}

.skip-link:focus {
  top: 0.5rem;
}

:focus-visible {
  outline: 2px solid var(--one-blue);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ==========================================================================
   Editor Chrome: Top Tab Bar & Bottom Status Bar
   ========================================================================== */

.editor-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.tab-bar {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--tab-height);
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 0.75rem;
  padding-right: 1rem;
  background-color: var(--one-chrome);
  border-bottom: 1px solid var(--one-chrome-deep);
  user-select: none;
}

.tab-strip {
  display: flex;
  align-items: stretch;
  min-width: 0;
}

.editor-tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0 1.125rem;
  border: 0;
  border-right: 1px solid var(--one-chrome-deep);
  background-color: var(--one-canvas);
  color: var(--one-title);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
}

.editor-tab.is-active::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background-color: var(--one-blue);
}

.tab-icon {
  color: var(--one-blue);
  font-size: 0.75rem;
  font-weight: 600;
}

.tab-saved-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--one-green);
  opacity: 0.85;
}

.tab-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.mode-switch {
  display: inline-flex;
  padding: 2px;
  background-color: var(--one-chrome-deep);
  border: 1px solid var(--one-border);
  border-radius: var(--radius-sm);
}

.mode-btn {
  padding: 0.25rem 0.625rem;
  border: 0;
  border-radius: 2px;
  background: transparent;
  color: var(--one-muted);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: color 120ms ease, background-color 120ms ease;
}

.mode-btn:hover {
  color: var(--one-title);
}

.mode-btn.is-active {
  background-color: var(--one-canvas);
  color: var(--one-title);
}

.chrome-btn {
  padding: 0.3rem 0.65rem;
  border: 1px solid var(--one-border);
  border-radius: var(--radius-sm);
  background-color: transparent;
  color: var(--one-ink);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color 120ms ease, color 120ms ease, background-color 120ms ease;
}

.chrome-btn:hover {
  border-color: var(--one-blue);
  color: var(--one-title);
  background-color: var(--one-line-hl);
}

/* Status Bar */
.status-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 40;
  height: var(--status-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1rem;
  background-color: var(--one-chrome);
  border-top: 1px solid var(--one-chrome-deep);
  color: var(--one-muted);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
  user-select: none;
}

.status-left,
.status-right {
  display: flex;
  align-items: center;
  gap: 1.125rem;
}

.status-item {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
}

.status-branch {
  color: var(--one-green);
}

.status-lang {
  color: var(--one-blue);
}

/* ==========================================================================
   Main Workspace Layout (Buffer + Quiet Desktop Outline)
   ========================================================================== */

.workspace-grid {
  flex: 1;
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 2.25rem 1.5rem calc(var(--status-height) + 4.5rem);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 12.5rem;
  gap: 3.5rem;
  align-items: start;
}

.editor-buffer {
  position: relative;
  min-width: 0;
  max-width: calc(var(--gutter-width) + var(--measure) + 2.5rem);
}

/* Subtle 80-column editor guide on wide screens */
@media (min-width: 1024px) {
  .editor-buffer::after {
    content: '';
    position: absolute;
    top: -1rem;
    bottom: -1rem;
    left: calc(var(--gutter-width) + 74ch);
    width: 1px;
    background-color: rgba(171, 178, 191, 0.06);
    pointer-events: none;
  }
}

/* ==========================================================================
   Markdown Document Structure & Synchronized Gutter
   ========================================================================== */

.md-document {
  display: flex;
  flex-direction: column;
}

.doc-block {
  display: grid;
  grid-template-columns: var(--gutter-width) minmax(0, 1fr);
  align-items: baseline;
}

.doc-gutter {
  padding-right: 1.25rem;
  color: var(--one-gutter);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  line-height: 1.68;
  text-align: right;
  font-variant-numeric: tabular-nums;
  user-select: none;
}

.doc-body {
  min-width: 0;
  max-width: var(--measure);
  padding-left: 1.25rem;
  border-left: 1px solid rgba(50, 56, 66, 0.65);
}

/* Section spacing handled inside the gutter grid so the gutter hairline stays continuous */
.doc-section {
  margin-top: 0;
}

.doc-section:not(.doc-section-hero) > .doc-block:first-child .doc-gutter,
.doc-section:not(.doc-section-hero) > .doc-block:first-child .doc-body {
  padding-top: 3.25rem;
}

.career-list {
  margin-top: 0;
  display: flex;
  flex-direction: column;
}

.career-list .doc-block:first-child .doc-gutter,
.career-list .doc-block:first-child .doc-body {
  padding-top: 1.5rem;
}

/* Markdown headings with quiet syntax hash marker */
.md-h1,
.md-h2,
.md-h3 {
  margin: 0;
  font-family: var(--font-mono);
  color: var(--one-title);
  font-weight: 600;
}

.md-h1 {
  font-size: clamp(1.75rem, 3.2vw, 2.25rem);
  line-height: 1.22;
  letter-spacing: -0.02em;
}

.typing-cursor {
  display: inline-block;
  width: 0.1em;
  min-width: 2px;
  height: 0.92em;
  vertical-align: -0.1em;
  background-color: var(--one-blue);
  border-radius: 1px;
  animation: cursor-blink 1.05s steps(1, end) infinite;
}

@keyframes cursor-blink {
  0%,
  49% {
    opacity: 1;
  }
  50%,
  100% {
    opacity: 0;
  }
}

.md-h2 {
  font-size: 1.25rem;
  line-height: 1.35;
  letter-spacing: -0.015em;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--one-border);
}

.md-h3 {
  font-size: 1.02rem;
  line-height: 1.4;
}

.md-hash {
  color: var(--syn-coral);
  font-weight: 400;
  margin-right: 0.45rem;
  user-select: none;
}

.md-lead {
  margin: 1rem 0 0;
  font-size: 1.0625rem;
  line-height: 1.68;
  color: var(--one-ink);
}

.md-p {
  margin: 0.75rem 0 0;
  color: var(--one-ink);
}

.md-blockquote {
  margin: 1.25rem 0 0;
  padding: 0.2rem 0 0.2rem 1rem;
  border-left: 3px solid var(--one-blue);
  color: var(--one-muted);
  font-size: 0.9375rem;
}

.hero-cta {
  margin: 1.25rem 0 0;
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.48rem 0.95rem;
  border: 1px solid var(--one-blue);
  border-radius: var(--radius-sm);
  background-color: var(--one-blue);
  color: var(--one-chrome-deep);
  font-family: var(--font-mono);
  font-size: 0.84rem;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 120ms ease, border-color 120ms ease, transform 120ms ease;
}

.cta-btn:hover {
  background-color: #79bbf2;
  border-color: #79bbf2;
}

.cta-arrow {
  transition: transform 120ms ease;
}

.cta-btn:hover .cta-arrow {
  transform: translateX(2px);
}

/* Opening Profile Summary Table (clean markdown key-value feel) */
.profile-table {
  margin: 1.5rem 0 0;
  display: grid;
  gap: 0.5rem;
  font-size: 0.9375rem;
}

.profile-row {
  display: grid;
  grid-template-columns: 6.25rem minmax(0, 1fr);
  gap: 1rem;
  align-items: baseline;
}

.profile-row dt {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--one-muted);
}

.profile-row dd {
  margin: 0;
  color: var(--one-title);
}

.inline-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.25rem;
}

.md-link,
.inline-action {
  color: var(--one-blue);
  text-decoration: underline;
  text-decoration-color: rgba(97, 175, 239, 0.4);
  text-underline-offset: 3px;
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  cursor: pointer;
  transition: text-decoration-color 120ms ease, color 120ms ease;
}

.md-link:hover,
.inline-action:hover {
  color: var(--one-title);
  text-decoration-color: var(--one-blue);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--one-green);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--one-green);
}

/* Inline code tokens */
.code-token {
  display: inline-block;
  padding: 0.08rem 0.42rem;
  background-color: var(--one-chrome);
  border: 1px solid var(--one-border);
  border-radius: var(--radius-sm);
  color: var(--one-ink);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  line-height: 1.45;
}

.stack-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin-top: 0.75rem;
}

/* ==========================================================================
   Career History — Chronological Git-Branch Rail
   ========================================================================== */

/* Career entries inside continuous gutter grid */

.career-entry {
  position: relative;
  padding: 0 0 2rem 1.5rem;
}

.career-entry.is-last {
  padding-bottom: 0;
}

/* Vertical chronological rail */
.career-entry::before {
  content: '';
  position: absolute;
  top: 0.55rem;
  bottom: 0;
  left: 0.25rem;
  width: 1px;
  background-color: var(--one-border);
}

.career-entry.is-last::before {
  bottom: auto;
  height: 0.55rem;
}

/* Commit node dot */
.career-entry::after {
  content: '';
  position: absolute;
  top: 0.48rem;
  left: 0;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 2px solid var(--one-muted);
  background-color: var(--one-canvas);
}

.career-entry.is-current::after {
  border-color: var(--one-green);
  background-color: var(--one-green);
}

.career-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.25rem 1rem;
}

.career-role-line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.6rem;
}

.career-company {
  color: var(--one-blue);
  font-family: var(--font-mono);
  font-size: 0.9375rem;
  font-weight: 500;
}

.career-period {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--syn-gold);
  font-variant-numeric: tabular-nums;
}

.career-location {
  margin: 0.2rem 0 0;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--one-muted);
}

.career-summary {
  margin: 0.65rem 0 0;
  color: var(--one-ink);
}

.md-bullets {
  margin: 0.65rem 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.md-bullets li {
  position: relative;
  padding-left: 1.15rem;
}

.md-bullets li::before {
  content: '-';
  position: absolute;
  left: 0;
  color: var(--one-muted);
  font-family: var(--font-mono);
}

.metric-emphasis {
  color: var(--one-title);
  font-weight: 500;
}

/* ==========================================================================
   Git Activity — Contribution Heatmap, Language Ratio, Shortlog
   ========================================================================== */

.git-panel {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.git-header-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
}

.git-readout {
  color: var(--one-title);
  min-height: 1.3em;
}

.git-source-note {
  color: var(--one-muted);
  font-size: 0.75rem;
}

.heatmap-frame {
  padding: 0.9rem 1rem;
  background-color: var(--one-chrome);
  border: 1px solid var(--one-border);
  border-radius: var(--radius-sm);
  overflow-x: auto;
}

.heatmap-months {
  display: grid;
  grid-template-columns: 1.65rem repeat(52, 8px);
  gap: 2px;
  margin-bottom: 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--one-muted);
  min-width: max-content;
}

.heatmap-month-label {
  white-space: nowrap;
}

.heatmap-body {
  display: grid;
  grid-template-columns: 1.65rem repeat(52, 8px);
  gap: 2px;
  min-width: max-content;
}

.heatmap-weekdays {
  display: grid;
  grid-template-rows: repeat(7, 8px);
  gap: 2px;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  line-height: 8px;
  color: var(--one-muted);
}

.heatmap-week {
  display: grid;
  grid-template-rows: repeat(7, 8px);
  gap: 2px;
}

.heatmap-cell {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 1px solid rgba(24, 26, 31, 0.55);
  border-radius: 1.5px;
  background-color: var(--git-0);
  cursor: pointer;
}

.heatmap-cell[data-level='1'] { background-color: var(--git-1); }
.heatmap-cell[data-level='2'] { background-color: var(--git-2); }
.heatmap-cell[data-level='3'] { background-color: var(--git-3); }
.heatmap-cell[data-level='4'] { background-color: var(--git-4); }

.heatmap-cell:hover,
.heatmap-cell.is-selected {
  border-color: var(--one-title);
}

.heatmap-footer {
  margin-top: 0.75rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--one-muted);
}

.heatmap-legend {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.legend-swatch {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  border: 1px solid rgba(24, 26, 31, 0.55);
}

/* Markdown table for git summary */
.md-table-wrap {
  overflow-x: auto;
}

.md-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-mono);
  font-size: 0.84rem;
  font-variant-numeric: tabular-nums;
}

.md-table th,
.md-table td {
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid var(--one-border);
  text-align: left;
}

.md-table th {
  color: var(--one-muted);
  font-weight: 500;
  border-bottom-color: var(--one-selection);
}

.md-table td {
  color: var(--one-title);
}

.md-table th.num-col {
  text-align: right;
  color: var(--one-muted);
}

.md-table td.num-col {
  text-align: right;
  color: var(--one-green);
}

/* Git activity loading skeleton & unavailable state */
@keyframes git-skeleton-pulse {
  0%, 100% {
    opacity: 0.45;
  }
  50% {
    opacity: 0.9;
  }
}

.skeleton-bar {
  display: inline-block;
  height: 0.85em;
  border-radius: 3px;
  background-color: var(--one-selection);
  vertical-align: middle;
  animation: git-skeleton-pulse 1.4s ease-in-out infinite;
}

.skeleton-num {
  width: 3.25rem;
}

.skeleton-footer-text {
  width: 14rem;
}

.heatmap-cell.is-skeleton {
  cursor: default;
  background-color: var(--one-selection);
  animation: git-skeleton-pulse 1.4s ease-in-out infinite;
}

.heatmap-cell.is-skeleton:hover {
  border-color: rgba(24, 26, 31, 0.55);
}

.heatmap-months.is-skeleton {
  min-height: 1em;
}

.git-error-box {
  padding: 0.9rem 1rem;
  background-color: var(--one-chrome);
  border: 1px solid var(--one-border);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--one-muted);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem 1rem;
}

@media (prefers-reduced-motion: reduce) {
  .skeleton-bar,
  .heatmap-cell.is-skeleton {
    animation: none;
  }
}

/* ==========================================================================
   Projects — Clean Markdown Document Entries + Expandable Architecture
   ========================================================================== */

.project-filters {
  margin-top: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.125rem;
  border-bottom: 1px solid var(--one-border);
  padding-bottom: 0.6rem;
}

.filter-btn {
  padding: 0.15rem 0;
  border: 0;
  border-bottom: 2px solid transparent;
  margin-bottom: -0.66rem;
  background: transparent;
  color: var(--one-muted);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  cursor: pointer;
  transition: color 120ms ease, border-color 120ms ease;
}

.filter-btn:hover {
  color: var(--one-title);
}

.filter-btn.is-active {
  color: var(--one-title);
  border-bottom-color: var(--one-blue);
}

.project-list {
  display: flex;
  flex-direction: column;
}

.project-entry {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--one-border);
}

.project-list .doc-block:last-child .project-entry {
  border-bottom: 0;
  padding-bottom: 0;
}

.doc-block-entry .doc-gutter {
  padding-top: 0.1rem;
}

.project-list .doc-block-entry .doc-gutter {
  padding-top: 1.65rem;
}

.project-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.4rem 1rem;
}

.project-title-group {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.6rem;
}

.project-status {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--one-green);
}

.project-status.is-oss {
  color: var(--syn-cyan);
}

.project-links {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
}

.project-desc {
  margin: 0.55rem 0 0;
  color: var(--one-ink);
}

.project-impact {
  margin: 0.45rem 0 0;
  font-size: 0.92rem;
  color: var(--one-muted);
}

.project-impact strong {
  color: var(--one-title);
  font-weight: 500;
}

.project-footer {
  margin-top: 0.85rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}

.project-footer .stack-list {
  margin-top: 0;
}

/* ==========================================================================
   Contact Section
   ========================================================================== */

.contact-grid {
  margin-top: 1.25rem;
  display: grid;
  gap: 0.65rem;
}

.contact-row {
  display: grid;
  grid-template-columns: 6.25rem minmax(0, 1fr);
  gap: 1rem;
  align-items: baseline;
  font-size: 0.9375rem;
}

.contact-label {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--one-muted);
}

.contact-value {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

/* ==========================================================================
   Raw Markdown Source View (Authentic Atom One Dark Syntax)
   ========================================================================== */

.raw-document {
  font-family: var(--font-mono);
  font-size: 0.84rem;
  line-height: 1.65;
}

.raw-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding: 0.55rem 0.9rem;
  background-color: var(--one-chrome);
  border: 1px solid var(--one-border);
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
}

.raw-meta {
  color: var(--one-muted);
}

.raw-lines {
  display: flex;
  flex-direction: column;
}

.raw-line {
  display: grid;
  grid-template-columns: var(--gutter-width) minmax(0, 1fr);
  border-radius: 2px;
}

.raw-line:hover {
  background-color: var(--one-line-hl);
}

.raw-ln {
  padding-right: 1.25rem;
  color: var(--one-gutter);
  text-align: right;
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
  user-select: none;
}

.raw-code {
  padding-left: 1.25rem;
  border-left: 1px solid rgba(50, 56, 66, 0.65);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: var(--one-ink);
}

/* One Dark Markdown Syntax Tokens */
.tok-heading { color: var(--syn-coral); font-weight: 600; }
.tok-hash { color: var(--syn-coral); }
.tok-strong { color: var(--syn-gold); font-weight: 500; }
.tok-code { color: var(--one-green); }
.tok-link-text { color: var(--one-blue); }
.tok-link-url { color: var(--syn-cyan); }
.tok-quote { color: var(--one-muted); font-style: italic; }
.tok-fence { color: var(--syn-purple); }
.tok-bullet { color: var(--syn-coral); }
.tok-table-pipe { color: var(--one-gutter); }

/* ==========================================================================
   Right-Hand Outline Rail (Desktop >= 1100px)
   ========================================================================== */

.outline-rail {
  position: sticky;
  top: calc(var(--tab-height) + 2.25rem);
  font-family: var(--font-mono);
  font-size: 0.78rem;
}

.outline-heading {
  margin: 0 0 0.65rem;
  color: var(--one-muted);
  font-size: 0.75rem;
  font-weight: 500;
}

.outline-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-left: 1px solid var(--one-border);
  display: flex;
  flex-direction: column;
}

.outline-link {
  display: block;
  padding: 0.32rem 0 0.32rem 0.9rem;
  margin-left: -1px;
  border-left: 2px solid transparent;
  color: var(--one-muted);
  text-decoration: none;
  transition: color 120ms ease, border-color 120ms ease;
}

.outline-link:hover {
  color: var(--one-title);
}

.outline-link.is-active {
  color: var(--one-title);
  border-left-color: var(--one-blue);
}

.outline-shortcuts {
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--one-border);
}

.shortcut-list {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.shortcut-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.shortcut-row dt {
  margin: 0;
}

.shortcut-row dd {
  margin: 0;
  color: var(--one-muted);
  font-size: 0.72rem;
}

kbd {
  display: inline-block;
  min-width: 1.35rem;
  padding: 0.08rem 0.35rem;
  background-color: var(--one-chrome);
  border: 1px solid var(--one-border);
  border-radius: 2px;
  color: var(--one-title);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-align: center;
}

/* Mobile inline jump nav (hidden on wide desktop where outline rail is shown) */
.mobile-jump-nav {
  display: none;
  margin-top: 1.25rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--one-border);
  flex-wrap: wrap;
  gap: 0.4rem 1.1rem;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
}

/* ==========================================================================
   Responsive Adjustments
   ========================================================================== */

@media (max-width: 1099px) {
  .workspace-grid {
    grid-template-columns: minmax(0, 1fr);
    max-width: 820px;
  }

  .outline-rail {
    display: none;
  }

  .mobile-jump-nav {
    display: flex;
  }
}

@media (max-width: 640px) {
  :root {
    --gutter-width: 2.25rem;
  }

  .tab-bar {
    padding-right: 0.65rem;
    gap: 0.45rem;
  }

  .editor-tab {
    padding: 0 0.75rem;
  }

  .hide-xs,
  .chrome-btn-print {
    display: none;
  }

  .mode-btn {
    padding: 0.22rem 0.5rem;
  }

  .chrome-btn {
    padding: 0.25rem 0.55rem;
  }

  .workspace-grid {
    padding: 1.5rem 1rem calc(var(--status-height) + 3.5rem);
  }

  .doc-block {
    grid-template-columns: minmax(0, 1fr);
  }

  .doc-gutter {
    display: none;
  }

  .doc-body {
    padding-left: 0;
    border-left: 0;
  }

  .raw-line {
    grid-template-columns: 2.25rem minmax(0, 1fr);
  }

  .raw-ln {
    padding-right: 0.65rem;
  }

  .raw-code {
    padding-left: 0.65rem;
  }

  .profile-row,
  .contact-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.15rem;
  }

  .status-hide-sm {
    display: none;
  }
}

/* Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }

  .typing-cursor {
    animation: none;
    opacity: 1;
  }
}

/* ==========================================================================
   Print Stylesheet — Clean White Typographic Resume for HRD
   ========================================================================== */

@media print {
  html,
  body {
    background: #ffffff !important;
    color: #1a1d24 !important;
    font-size: 10.5pt;
    line-height: 1.5;
  }

  .tab-bar,
  .status-bar,
  .outline-rail,
  .mobile-jump-nav,
  .doc-gutter,
  .project-filters,
  .chrome-btn,
  .inline-action,
  .hero-cta,
  .typing-cursor,
  #raw-pane {
    display: none !important;
  }

  #preview-pane {
    display: block !important;
  }

  .workspace-grid {
    display: block;
    max-width: none;
    padding: 0;
  }

  .editor-buffer {
    max-width: none;
  }

  .editor-buffer::after {
    display: none;
  }

  .doc-block {
    display: block;
  }

  .doc-body {
    max-width: none;
    padding-left: 0;
    border-left: 0;
  }

  .doc-section {
    margin-top: 1.5rem;
  }

  .md-h1,
  .md-h2,
  .md-h3,
  .profile-row dd,
  .career-company,
  .metric-emphasis,
  .md-table td {
    color: #111418 !important;
  }

  .md-hash,
  .md-blockquote,
  .career-period,
  .career-location,
  .profile-row dt,
  .contact-label,
  .project-impact,
  .md-table th {
    color: #4a5260 !important;
  }

  .md-h2 {
    border-bottom-color: #d0d5dd;
  }

  .code-token,
  .heatmap-frame {
    background: #f5f7fa !important;
    border-color: #d0d5dd !important;
    color: #1a1d24 !important;
  }

  .md-link {
    color: #111418 !important;
    text-decoration: none;
  }

  .career-entry,
  .project-entry {
    break-inside: avoid;
  }
}
