/* Navigation & Header Font Sizes & Weights */
header nav a,
header a[data-slot="button"] {
  font-size: 0.95rem !important;
}

[data-sidebar="content"] {
  font-size: 0.925rem !important;
}

[data-sidebar="menu-button"] {
  font-size: 0.925rem !important;
  font-weight: 400 !important;
}

[data-sidebar="menu-button"][data-active="true"] {
  font-weight: 600 !important;
}

/* Increase Left Hand Side Sidebar Menu Width */
@media (min-width: 1024px) {
  [data-slot="sidebar-wrapper"] {
    --sidebar-width: 320px !important;
    grid-template-columns: 320px minmax(0, 1fr) !important;
  }

  [data-slot="sidebar"] {
    width: 320px !important;
    --sidebar-menu-width: 300px !important;
  }

  [data-sidebar="content"] {
    width: 100% !important;
    max-width: 100% !important;
  }
}

/* Expand content section width and reduce left/right padding */
article {
  width: 100% !important;
  max-width: 100% !important;
  padding-left: 0.75rem !important;
  padding-right: 0.75rem !important;
}

@media (min-width: 640px) {
  article {
    padding-left: 1.25rem !important;
    padding-right: 1.25rem !important;
  }
}

@media (min-width: 1024px) {
  article {
    padding-left: 1.5rem !important;
    padding-right: 1.5rem !important;
  }
}

/* Reduce TOC side padding so main content area gets more width */
#toc {
  padding-left: 1rem !important;
  padding-right: 1rem !important;
}

/* Sidebar Padding & Alignment */
[data-sidebar="content"] {
  padding-left: 0.25rem;
  padding-right: 0.25rem;
}

[data-sidebar="menu-button"] {
  padding-left: 0.75rem !important;
  padding-right: 0.75rem !important;
}

/* ==========================================================================
   Colorful Code Editor Styling (VS Code / OneDark / Mocha Theme Vibe)
   ========================================================================== */

/* Code Block Container Frame */
.highlight, div.codehilite, div.highlight {
  position: relative;
  margin: 1.5rem 0;
  border-radius: 0.75rem;
  background-color: #181825 !important;
  border: 1px solid #313244;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.05);
  overflow: hidden;
}

/* macOS Window Header Controls Bar */
.highlight::before, div.codehilite::before, div.highlight::before {
  content: "";
  display: block;
  height: 2.25rem;
  background: #1e1e2e;
  border-bottom: 1px solid #313244;
  /* Window Action Dots: Red (#ff5f56), Yellow (#ffbd2e), Green (#27c93f) */
  background-image: 
    radial-gradient(circle at 14px 18px, #ff5f56 5px, transparent 5.5px),
    radial-gradient(circle at 30px 18px, #ffbd2e 5px, transparent 5.5px),
    radial-gradient(circle at 46px 18px, #27c93f 5px, transparent 5.5px);
  background-repeat: no-repeat;
  width: 100%;
}

/* Pre & Code Element Base */
.highlight pre, div.codehilite pre, div.highlight pre, pre {
  margin: 0 !important;
  padding: 1.25rem 1.5rem !important;
  background-color: transparent !important;
  border: none !important;
  overflow-x: auto;
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Fira Code", "Liberation Mono", monospace !important;
  font-size: 0.9rem !important;
  line-height: 1.6 !important;
  color: #cdd6f4 !important;
  -webkit-font-smoothing: antialiased;
}

.highlight pre code, div.codehilite code, div.highlight code {
  background-color: transparent !important;
  font-family: inherit !important;
  padding: 0 !important;
  border: none !important;
}

/* --------------------------------------------------------------------------
   Vibrant Syntax Highlighting Tokens (Pygments Classes)
   -------------------------------------------------------------------------- */

/* Keywords: def, class, return, for, if, while, import, from, in, is, not, and, or */
.highlight .k, .highlight .kd, .highlight .kn, .highlight .kp, .highlight .kr, .highlight .kt, .highlight .ow {
  color: #ff79c6 !important;
  font-weight: 600;
}

/* Functions & Method Names: linearSearch, rotate, move_zeroes_to_end */
.highlight .nf, .highlight .fm {
  color: #89b4fa !important;
  font-weight: 600;
}

/* Classes & Builtin Types / Functions: Solution, list, int, str, range, enumerate, max, len, print */
.highlight .nc, .highlight .nb {
  color: #f9e2af !important;
  font-weight: 500;
}

/* Strings & Docstrings */
.highlight .s, .highlight .s1, .highlight .s2, .highlight .sd, .highlight .se, .highlight .sh, .highlight .si, .highlight .sx, .highlight .sr {
  color: #a6e3a1 !important;
}

/* Numbers & Constants: 0, 1, -1, True, False, None */
.highlight .m, .highlight .mi, .highlight .mf, .highlight .mh, .highlight .mo, .highlight .kc {
  color: #fab387 !important;
  font-weight: 500;
}

/* Comments: # ... */
.highlight .c, .highlight .c1, .highlight .ch, .highlight .cm, .highlight .cp, .highlight .cs {
  color: #7f849c !important;
  font-style: italic;
}

/* Operators: =, ==, !=, +, -, *, /, <, > */
.highlight .o {
  color: #89dceb !important;
}

/* Punctuation & Brackets: (, ), [, ], {, }, :, ,, -> */
.highlight .p {
  color: #cba6f7 !important;
}

/* Variables & Attributes */
.highlight .n, .highlight .nv, .highlight .vc, .highlight .vg, .highlight .vi {
  color: #cdd6f4 !important;
}

/* Inline Code Badges */
:not(pre) > code {
  background-color: rgba(137, 180, 250, 0.15) !important;
  color: #89b4fa !important;
  border: 1px solid rgba(137, 180, 250, 0.25) !important;
  padding: 0.15rem 0.45rem !important;
  border-radius: 0.375rem !important;
  font-size: 0.85em !important;
  font-weight: 500 !important;
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace !important;
}

/* ==========================================================================
   Smooth Navigation & Blog Loader Styles (SPA Progress Bar & Badges)
   ========================================================================== */

/* SPA Top Progress Bar */
.spa-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, #3b82f6, #8b5cf6, #ec4899);
  box-shadow: 0 0 10px rgba(139, 92, 246, 0.8), 0 0 5px rgba(236, 72, 153, 0.6);
  z-index: 99999;
  transition: width 0.15s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
  pointer-events: none;
  border-radius: 0 2px 2px 0;
}

/* SPA Content Container Transition & Loading States */
#inner-body {
  position: relative;
  transition: opacity 0.25s ease, filter 0.25s ease;
}

#inner-body.spa-content-loading {
  opacity: 0.45;
  pointer-events: none;
  user-select: none;
  filter: blur(0.5px);
}

/* Smooth Loader Badge Overlay */
.spa-loader-badge {
  position: fixed;
  top: 50%;
  left: 55%;
  transform: translate(-50%, -50%);
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 1.35rem;
  background-color: rgba(24, 24, 37, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 9999px;
  box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.5), 0 0 20px rgba(139, 92, 246, 0.25);
  color: #f1f5f9;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  animation: spaBadgeFadeIn 0.2s ease-out forwards;
  pointer-events: none;
}

@media (max-width: 1023px) {
  .spa-loader-badge {
    left: 50%;
  }
}

.spa-spinner {
  width: 1.15rem;
  height: 1.15rem;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-top-color: #8b5cf6;
  border-right-color: #ec4899;
  border-radius: 50%;
  animation: spaSpin 0.7s linear infinite;
}

@keyframes spaSpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes spaBadgeFadeIn {
  from {
    opacity: 0;
    transform: translate(-50%, -40%) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

.spa-content-fade-in {
  animation: spaFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes spaFadeIn {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Sidebar / Menu Link Spinner Feedback */
a.spa-link-loading {
  position: relative;
  opacity: 0.8;
}

a.spa-link-loading::after {
  content: "";
  display: inline-block;
  width: 0.75rem;
  height: 0.75rem;
  margin-left: 0.4rem;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spaSpin 0.6s linear infinite;
  vertical-align: middle;
}

/* ==========================================================================
   Hero Action Buttons (GitHub, LinkedIn, Email, Download Resume)
   ========================================================================== */

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin: 1.5rem 0 2rem 0;
}

.hero-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.55rem 1.15rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none !important;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  line-height: 1.25;
}

.hero-btn svg {
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.hero-btn:hover svg {
  transform: translateY(-1px);
}

.hero-btn-primary {
  background-color: #3b82f6;
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.hero-btn-primary:hover {
  background-color: #2563eb;
  box-shadow: 0 6px 16px rgba(59, 130, 246, 0.35);
  transform: translateY(-2px);
}

.hero-btn-secondary {
  background-color: #1e1e2e;
  color: #cdd6f4 !important;
  border: 1px solid #313244;
}

.hero-btn-secondary:hover {
  background-color: #313244;
  color: #ffffff !important;
  border-color: #45475a;
  transform: translateY(-2px);
}

.hero-btn-outline {
  background-color: rgba(139, 92, 246, 0.1);
  color: #c084fc !important;
  border: 1px solid rgba(139, 92, 246, 0.3);
}

.hero-btn-outline:hover {
  background-color: rgba(139, 92, 246, 0.2);
  border-color: rgba(139, 92, 246, 0.5);
  color: #e9d5ff !important;
  transform: translateY(-2px);
}


