/* ============================================
   OpenCode-style Terminal/Geek Aesthetic
   Blue + White Color Scheme
   ============================================ */

:root {
  /* Core Palette */
  --oc-bg: #FFFFFF;
  --oc-bg-alt: #F8FAFC;
  --oc-bg-card: #F1F5F9;
  --oc-bg-terminal: #0F172A;
  --oc-text: #0F172A;
  --oc-text-secondary: #64748B;
  --oc-text-tertiary: #94A3B8;
  --oc-blue: #2563EB;
  --oc-blue-light: #3B82F6;
  --oc-blue-lighter: #60A5FA;
  --oc-blue-bg: rgba(37, 99, 235, 0.06);
  --oc-blue-border: rgba(37, 99, 235, 0.15);
  --oc-blue-glow: rgba(37, 99, 235, 0.12);
  --oc-border: #E2E8F0;
  --oc-border-light: #F1F5F9;

  /* Mono Font */
  --oc-mono: 'JetBrains Mono', 'Fira Code', 'SF Mono', 'Cascadia Code', 'Consolas', monospace;
  --oc-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;

  /* Spacing */
  --oc-gap: 16px;
  --oc-radius: 8px;
  --oc-radius-lg: 12px;

  /* Transitions */
  --oc-transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   Dark Theme (OpenCode.ai style)
   ============================================ */
html.dark-theme {
  --oc-bg: #0D1117;
  --oc-bg-alt: #161B22;
  --oc-bg-card: #1C2128;
  --oc-bg-terminal: #0D1117;
  --oc-text: #E6EDF3;
  --oc-text-secondary: #8B949E;
  --oc-text-tertiary: #6E7681;
  --oc-blue: #58A6FF;
  --oc-blue-light: #79C0FF;
  --oc-blue-lighter: #A5D6FF;
  --oc-blue-bg: rgba(88, 166, 255, 0.1);
  --oc-blue-border: rgba(88, 166, 255, 0.2);
  --oc-blue-glow: rgba(88, 166, 255, 0.15);
  --oc-border: #30363D;
  --oc-border-light: #21262D;
}

html.dark-theme body {
  background: var(--oc-bg);
  color: var(--oc-text);
}

/* Dark navbar */
html.dark-theme .navbar-custom {
  background-color: #0D1117 !important;
  border-bottom: 1px solid #30363D !important;
}

html.dark-theme .navbar-custom .navbar-brand {
  color: #E6EDF3 !important;
}

html.dark-theme .navbar-custom .nav-link {
  color: #8B949E !important;
}

html.dark-theme .navbar-custom .nav-link:hover {
  color: #58A6FF !important;
}

html.dark-theme .navbar-custom .dropdown-menu {
  background-color: #161B22 !important;
  border: 1px solid #30363D;
}

html.dark-theme .navbar-custom .dropdown-item {
  color: #8B949E !important;
}

html.dark-theme .navbar-custom .dropdown-item:hover {
  background-color: rgba(88, 166, 255, 0.15) !important;
  color: #E6EDF3 !important;
}

/* Dark theme toggle button - terminal style */
.oc-term-btn {
  background: none;
  border: 1px solid rgba(37, 99, 235, 0.25);
  border-radius: 4px;
  width: 36px;
  height: 32px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #58A6FF;
  font-family: var(--oc-mono);
  font-size: 16px;
  line-height: 1;
  transition: all var(--oc-transition);
  position: relative;
  padding: 0;
}

.oc-term-btn:hover {
  background: rgba(37, 99, 235, 0.15);
  border-color: var(--oc-blue);
  box-shadow: 0 0 8px rgba(37, 99, 235, 0.2);
}

.oc-term-btn:active {
  transform: scale(0.95);
}

.oc-term-btn-icon {
  display: inline-block;
  width: 18px;
  text-align: center;
}

html.dark-theme .oc-term-btn .icon-sun { display: inline-block; }
html.dark-theme .oc-term-btn .icon-moon { display: none; }
html:not(.dark-theme) .oc-term-btn .icon-sun { display: none; }
html:not(.dark-theme) .oc-term-btn .icon-moon { display: inline-block; }

/* Hamburger button inherits .oc-term-btn sizing */

.oc-hamburger-lines {
  display: flex;
  flex-direction: column;
  gap: 3px;
  width: 16px;
}

.oc-hamburger-lines span {
  display: block;
  height: 2px;
  background: #58A6FF;
  border-radius: 1px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.oc-hamburger-lines span:nth-child(1) { width: 100%; }
.oc-hamburger-lines span:nth-child(2) { width: 70%; }
.oc-hamburger-lines span:nth-child(3) { width: 85%; }

.oc-hamburger:hover .oc-hamburger-lines span {
  width: 100%;
  background: #fff;
}

.oc-hamburger[aria-expanded="true"] .oc-hamburger-lines span:nth-child(1) {
  transform: rotate(45deg) translate(3.5px, 3.5px);
  width: 100%;
}
.oc-hamburger[aria-expanded="true"] .oc-hamburger-lines span:nth-child(2) {
  opacity: 0;
  width: 0;
}
.oc-hamburger[aria-expanded="true"] .oc-hamburger-lines span:nth-child(3) {
  transform: rotate(-45deg) translate(3.5px, -3.5px);
  width: 100%;
}

/* Override Bootstrap navbar-toggler defaults */
.navbar-custom .navbar-toggler {
  border: none !important;
  padding: 0 !important;
  box-shadow: none !important;
}

.navbar-custom .navbar-toggler:focus {
  outline: none;
  box-shadow: none !important;
}

/* Dark badges */
html.dark-theme .oc-badge--green {
  background: rgba(34, 197, 94, 0.12);
  color: #4ADE80;
  border-color: rgba(34, 197, 94, 0.25);
}

html.dark-theme .oc-badge--amber {
  background: rgba(245, 158, 11, 0.12);
  color: #FBBF24;
  border-color: rgba(245, 158, 11, 0.25);
}

/* Dark code blocks (blog) */
html.dark-theme code {
  background-color: rgba(88, 166, 255, 0.1);
  color: #58A6FF;
}

html.dark-theme pre code {
  background-color: #0D1117;
  color: #E6EDF3;
}

html.dark-theme .highlight > pre {
  background: #0D1117;
  border: 1px solid #30363D;
}

/* Dark blog post preview */
html.dark-theme .post-preview {
  border-color: #30363D;
  background: #161B22;
}

html.dark-theme .post-preview:hover {
  border-color: #58A6FF;
  background: #1C2128;
}

html.dark-theme .post-preview .post-title {
  color: #E6EDF3;
}

/* Dark blockquote */
html.dark-theme blockquote {
  background: rgba(88, 166, 255, 0.06);
  border-left-color: #58A6FF;
  color: #C9D1D9;
}

/* Dark blog tags */
html.dark-theme .blog-tags a {
  background: rgba(88, 166, 255, 0.1);
  color: #58A6FF;
  border-color: rgba(88, 166, 255, 0.2);
}

html.dark-theme .blog-tags a:hover {
  background: #58A6FF;
  color: #0D1117;
  border-color: #58A6FF;
}

/* Dark footer (blog pages) */
html.dark-theme body:not(:has(.oc-layout)) footer {
  background-color: #0D1117 !important;
  border-top-color: #30363D;
}

html.dark-theme footer .list-inline-item a {
  border-color: #30363D;
  color: #8B949E;
  background: #161B22;
}

html.dark-theme footer .list-inline-item a:hover {
  background: #58A6FF;
  color: #0D1117;
  border-color: #58A6FF;
}

/* Dark avatar border glow */
html.dark-theme .oc-avatar:hover {
  border-color: #58A6FF;
  box-shadow: 0 0 0 3px rgba(88, 166, 255, 0.2);
}

/* ============================================
   Main Container - Full Viewport, No Scroll
   ============================================ */
.oc-layout {
  height: calc(100vh - 50px);
  width: 100%;
  display: flex;
  flex-direction: column;
  background: var(--oc-bg);
  color: var(--oc-text);
  font-family: var(--oc-sans);
  padding: 0;
  margin: 0;
  overflow: hidden;
  box-sizing: border-box;
}

/* Account for fixed navbar height */
.navbar-custom {
  position: relative !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  transition: none !important;
}

/* Kill the Jekyll header & footer & container padding on oc-layout pages only */
body:has(.oc-layout) .intro-header {
  display: none !important;
}

body:has(.oc-layout) footer {
  display: none !important;
}

/* Prevent page-level scrolling on desktop; oc-layout handles its own scroll */
@media (min-width: 901px) {
  html:has(.oc-layout),
  html:has(.oc-layout) body {
    overflow: hidden;
    height: 100%;
  }
}

/* Remove ALL Bootstrap padding/margins so oc-layout fills 100% */
body:has(.oc-layout) > .container-fluid,
body:has(.oc-layout) .container-fluid[role="main"] {
  padding: 0 !important;
  margin: 0 !important;
  max-width: 100% !important;
  width: 100% !important;
  overflow-x: hidden;
}

body:has(.oc-layout) .container-fluid[role="main"] > .row {
  margin: 0 !important;
}

body:has(.oc-layout) .container-fluid[role="main"] > .row > .col,
body:has(.oc-layout) .container-fluid[role="main"] > .row > [class*="col-"] {
  padding: 0 !important;
  margin: 0 !important;
  max-width: 100% !important;
  flex: 0 0 100% !important;
}

/* ============================================
   Top Bar - Terminal Prompt Style
   ============================================ */
.oc-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 32px;
  border-bottom: 1px solid var(--oc-border);
  background: var(--oc-bg);
  flex-shrink: 0;
}

.oc-topbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
  font-family: var(--oc-mono);
  font-size: 13px;
  color: var(--oc-text-secondary);
}

.oc-topbar-left .oc-prompt {
  color: var(--oc-blue);
  font-weight: 600;
}

.oc-topbar-left .oc-cmd {
  color: var(--oc-text);
  font-weight: 500;
}

.oc-topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.oc-lang-btn {
  font-family: var(--oc-mono);
  font-size: 12px;
  padding: 4px 12px;
  border-radius: 6px;
  border: 1px solid var(--oc-border);
  background: var(--oc-bg);
  color: var(--oc-text-secondary);
  cursor: pointer;
  transition: all var(--oc-transition);
  text-decoration: none;
}

.oc-lang-btn:hover,
.oc-lang-btn.active {
  background: var(--oc-blue);
  color: #fff;
  border-color: var(--oc-blue);
}

.oc-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22C55E;
  animation: oc-pulse 2s ease-in-out infinite;
}

@keyframes oc-pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.4;
  }
}

.oc-status-text {
  font-family: var(--oc-mono);
  font-size: 12px;
  color: #22C55E;
}

/* ============================================
   Content Area - Grid Layout
   ============================================ */
.oc-content {
  flex: 1;
  display: grid;
  grid-template-columns: 240px 1fr;
  grid-template-rows: 1fr;
  gap: 0;
  max-width: 100%;
  width: 100%;
  margin: 0;
  padding-top: 0;
  padding-bottom: 0;
  padding-left: 10px;
  padding-right: 10px;
  /* padding: 0px; */
}

/* ============================================
   Left Sidebar - Profile
   ============================================ */
.oc-sidebar {
  grid-row: 1 / -1;
  padding: 20px 20px 20px 20px;
  border-right: 1px solid var(--oc-border);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.oc-avatar-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
}

.oc-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--oc-blue-border);
  transition: border-color var(--oc-transition), box-shadow var(--oc-transition);
}

.oc-avatar:hover {
  border-color: var(--oc-blue);
  box-shadow: 0 0 0 3px var(--oc-blue-glow);
}

.oc-avatar-info h1 {
  font-size: 16px;
  font-weight: 700;
  color: var(--oc-text);
  margin: 0;
  line-height: 1.3;
}

.oc-avatar-info .oc-handle {
  font-family: var(--oc-mono);
  font-size: 12px;
  color: var(--oc-text-secondary);
}

/* Sidebar sections */
.oc-sidebar-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.oc-sidebar-label {
  font-family: var(--oc-mono);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--oc-text-tertiary);
  padding-bottom: 4px;
  border-bottom: 1px solid var(--oc-border-light);
}

.oc-bio {
  font-size: 13px;
  line-height: 1.6;
  color: var(--oc-text-secondary);
}

.oc-bio a {
  color: var(--oc-blue);
  text-decoration: none;
  border-bottom: 1px solid var(--oc-blue-border);
  transition: all var(--oc-transition);
}

.oc-bio a:hover {
  color: var(--oc-blue-light);
  border-bottom-color: var(--oc-blue-light);
}

/* Tag list */
.oc-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.oc-tag {
  font-family: var(--oc-mono);
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--oc-blue-bg);
  color: var(--oc-blue);
  border: 1px solid var(--oc-blue-border);
  transition: all var(--oc-transition);
  white-space: nowrap;
}

.oc-tag:hover {
  background: var(--oc-blue);
  color: #fff;
  border-color: var(--oc-blue);
}

/* Links */
.oc-links {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.oc-link {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--oc-mono);
  font-size: 12px;
  color: var(--oc-text-secondary);
  text-decoration: none;
  padding: 4px 0;
  transition: color var(--oc-transition);
}

.oc-link:hover {
  color: var(--oc-blue);
}

.oc-link-icon {
  width: 14px;
  height: 14px;
  opacity: 0.6;
}

/* ============================================
   Main Area - Right Side
   ============================================ */
.oc-main {
  padding: 16px 0 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: hidden;
}

/* Section header - terminal style */
.oc-section-header {
  font-family: var(--oc-mono);
  font-size: 13px;
  color: var(--oc-text-tertiary);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.oc-section-header .oc-prompt {
  color: var(--oc-blue);
  font-weight: 600;
}

.oc-section-header .oc-comment {
  color: var(--oc-text-tertiary);
  font-style: italic;
}

/* ============================================
   Cards Grid - Multi-column flat layout
   ============================================ */
.oc-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  align-items: start;
}

.oc-card {
  background: var(--oc-bg-alt);
  border: 1px solid var(--oc-border);
  border-radius: var(--oc-radius);
  padding: 16px;
  transition: all var(--oc-transition);
  position: relative;
}

.oc-card:hover {
  border-color: var(--oc-blue-border);
  background: var(--oc-bg);
  box-shadow: 0 0 0 1px var(--oc-blue-border), 0 2px 8px var(--oc-blue-glow);
}

.oc-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.oc-card-badges {
  display: flex;
  gap: 6px;
  margin-left: auto;
}

.oc-card-title {
  font-family: var(--oc-mono);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--oc-blue);
  display: flex;
  align-items: center;
  gap: 6px;
}

.oc-card-title::before {
  content: '▸';
  font-size: 10px;
}

.oc-badge {
  font-family: var(--oc-mono);
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 600;
}

.oc-badge--blue {
  background: var(--oc-blue-bg);
  color: var(--oc-blue);
  border: 1px solid var(--oc-blue-border);
}

.oc-badge--green {
  background: rgba(34, 197, 94, 0.08);
  color: #16A34A;
  border: 1px solid rgba(34, 197, 94, 0.2);
}

.oc-badge--amber {
  background: rgba(245, 158, 11, 0.08);
  color: #D97706;
  border: 1px solid rgba(245, 158, 11, 0.2);
}

/* Card items */
.oc-items {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.oc-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px;
  border-radius: 6px;
  transition: background var(--oc-transition);
}

.oc-item:hover {
  background: var(--oc-blue-bg);
}

.oc-item-marker {
  font-family: var(--oc-mono);
  font-size: 11px;
  color: var(--oc-blue);
  flex-shrink: 0;
  line-height: 1.5;
  margin-top: 1px;
}

.oc-item-body {
  flex: 1;
  min-width: 0;
}

.oc-item-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--oc-text);
  line-height: 1.4;
}

.oc-item-title-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.oc-item-title-line > .oc-item-title {
  flex: 1;
  min-width: 0;
}

.oc-item-title-line > .oc-item-meta {
  flex-shrink: 0;
}

.oc-item-sub {
  font-size: 12px;
  color: var(--oc-text-secondary);
  line-height: 1.4;
}

.oc-item-meta {
  font-family: var(--oc-mono);
  font-size: 11px;
  color: var(--oc-text-tertiary);
}

/* ============================================
   Research Card - Full Width
   ============================================ */
.oc-card--full {
  grid-column: 1 / -1;
}

.oc-research-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--oc-text);
  line-height: 1.5;
  margin-bottom: 8px;
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.oc-research-title > span:first-child {
  flex: 1;
  min-width: 0;
}

.oc-research-venue {
  font-family: var(--oc-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--oc-text-tertiary);
  white-space: nowrap;
  flex-shrink: 0;
}

.oc-research-title code {
  font-family: var(--oc-mono);
  background: var(--oc-blue-bg);
  color: var(--oc-blue);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 13px;
}

/* ============================================
   Bottom Bar - Stats/Info
   ============================================ */
.oc-bottombar {
  border-top: 1px solid var(--oc-border);
  padding: 10px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--oc-bg-alt);
  flex-shrink: 0;
}

.oc-stats {
  display: flex;
  gap: 24px;
}

.oc-stat {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--oc-mono);
  font-size: 12px;
  color: var(--oc-text-secondary);
}

.oc-stat-value {
  font-weight: 700;
  color: var(--oc-text);
}

.oc-stat-label {
  color: var(--oc-text-tertiary);
}

.oc-cursor {
  display: inline-block;
  width: 8px;
  height: 14px;
  background: var(--oc-blue);
  animation: oc-blink 1s step-end infinite;
  vertical-align: middle;
  margin-left: 4px;
}

@keyframes oc-blink {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0;
  }
}

/* ============================================
   Typing Animation
   ============================================ */
.oc-typing {
  overflow: hidden;
  white-space: nowrap;
  border-right: 2px solid var(--oc-blue);
  animation: oc-typing 2s steps(30) forwards, oc-blink-caret 0.8s step-end infinite;
  width: 0;
}

@keyframes oc-typing {
  to {
    width: 100%;
  }
}

@keyframes oc-blink-caret {

  0%,
  100% {
    border-color: var(--oc-blue);
  }

  50% {
    border-color: transparent;
  }
}

/* ============================================
   Fade-in Animation
   ============================================ */
.oc-fade-in {
  opacity: 0;
  transform: translateY(8px);
  animation: oc-fadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes oc-fadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.oc-delay-1 {
  animation-delay: 0.1s;
}

.oc-delay-2 {
  animation-delay: 0.15s;
}

.oc-delay-3 {
  animation-delay: 0.2s;
}

.oc-delay-4 {
  animation-delay: 0.25s;
}

.oc-delay-5 {
  animation-delay: 0.3s;
}

.oc-delay-6 {
  animation-delay: 0.35s;
}

/* ============================================
   Responsive - Single column on mobile
   ============================================ */
@media (max-width: 900px) {
  .oc-layout {
    overflow-y: auto;
    overflow-x: hidden;
    height: auto;
    min-height: calc(100vh - 50px);
  }

  .oc-content {
    grid-template-columns: 1fr;
    padding: 0 12px;
  }

  .oc-sidebar {
    grid-row: auto;
    border-right: none;
    border-bottom: 1px solid var(--oc-border);
    padding: 16px 0;
    gap: 14px;
  }

  .oc-main {
    padding: 16px 0;
  }

  .oc-grid {
    grid-template-columns: 1fr;
  }

  .oc-topbar {
    padding: 10px 12px;
    gap: 4px;
  }

  .oc-topbar-left {
    gap: 6px;
    font-size: 11px;
    min-width: 0;
    overflow: hidden;
  }

  .oc-topbar-left .oc-cmd {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .oc-topbar-left span[style] {
    display: none;
  }

  .oc-bottombar {
    padding: 10px 12px;
    flex-wrap: wrap;
    gap: 8px;
  }

  /* Research title: allow venue to wrap on mobile */
  .oc-research-title {
    flex-wrap: wrap;
  }

  .oc-research-venue {
    white-space: normal;
  }

  /* Item title line: allow meta to wrap */
  .oc-item-title-line {
    flex-wrap: wrap;
  }

  .oc-item-title-line > .oc-item-meta {
    flex-shrink: 1;
    white-space: normal;
  }

  /* Card padding */
  .oc-card {
    padding: 12px;
  }

  /* Section header */
  .oc-section-header {
    font-size: 12px;
    flex-wrap: wrap;
  }
}

@media (max-width: 600px) {
  .oc-avatar-wrap {
    flex-direction: column;
    text-align: center;
  }

  .oc-stats {
    flex-wrap: wrap;
    gap: 8px;
  }

  .oc-topbar-right .oc-status-text {
    display: none;
  }

  .oc-tag {
    font-size: 10px;
    padding: 2px 6px;
  }

  .oc-link {
    font-size: 11px;
  }

  .oc-item {
    gap: 6px;
    padding: 6px;
  }

  .oc-item-title {
    font-size: 12px;
  }

  .oc-item-sub {
    font-size: 11px;
  }

  .oc-research-title {
    font-size: 12px;
  }

  .oc-research-title code {
    font-size: 11px;
  }

  .oc-bio {
    font-size: 12px;
  }
}

/* ============================================
   i18n Language Toggle
   ============================================ */
html.lang-en [data-lang="cn"],
html.lang-cn [data-lang="en"] {
  display: none !important;
}

/* ============================================
   Override Beautiful Jekyll defaults
   ============================================ */
.apple-hero,
.apple-section,
.apple-academic-section {
  display: none !important;
}

/* ============================================
   Blog Page Styles
   (from custom-styles.css, for non-oc-layout pages)
   ============================================ */

/* --- Global Defaults --- */
html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--oc-sans);
  line-height: 1.6;
}

::selection {
  background-color: var(--oc-blue);
  color: #fff;
}

/* --- Navbar Terminal Style (Blog Pages) --- */
.navbar-custom {
  background-color: #0F172A !important;
  border-bottom: 1px solid rgba(37, 99, 235, 0.2) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.navbar-custom .nav-link {
  font-family: var(--oc-mono);
  font-size: 13px;
  position: relative;
  transition: color 0.2s ease;
}

.navbar-custom .nav-link:hover {
  color: var(--oc-blue-light) !important;
}

.navbar-custom .nav-link::before {
  content: '~/';
  opacity: 0.5;
  font-size: 11px;
}

.navbar-custom .dropdown-menu {
  background-color: #1E293B !important;
  border: 1px solid rgba(37, 99, 235, 0.2);
  border-radius: 8px;
  font-family: var(--oc-mono);
  font-size: 12px;
}

.navbar-custom .dropdown-item {
  color: #CBD5E1 !important;
  transition: all 0.15s ease;
}

.navbar-custom .dropdown-item:hover {
  background-color: rgba(37, 99, 235, 0.15) !important;
  color: #fff !important;
}

/* --- Links --- */
a {
  color: var(--oc-blue);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--oc-blue-light);
}

/* --- Code Blocks --- */
code {
  font-family: var(--oc-mono);
  background-color: var(--oc-blue-bg);
  color: var(--oc-blue);
  padding: 0.1em 0.4em;
  border-radius: 4px;
  font-size: 0.88em;
}

pre code {
  background-color: #0F172A;
  color: #E2E8F0;
  padding: 16px;
  border-radius: 8px;
}

.highlight > pre {
  background: #0F172A;
  border-radius: 8px;
  border: 1px solid rgba(37, 99, 235, 0.15);
  border-left: 3px solid var(--oc-blue);
}

/* --- Blog Tags --- */
.blog-tags a {
  font-family: var(--oc-mono);
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--oc-blue-bg);
  color: var(--oc-blue);
  border: 1px solid rgba(37, 99, 235, 0.15);
  transition: all 0.2s ease;
}

.blog-tags a:hover {
  background: var(--oc-blue);
  color: #fff;
  border-color: var(--oc-blue);
}

/* --- Post Preview --- */
.post-preview {
  border: 1px solid var(--oc-border);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin-bottom: 0.75rem;
  transition: all 0.2s ease;
}

.post-preview:hover {
  border-color: var(--oc-blue);
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.1), 0 2px 8px rgba(37, 99, 235, 0.08);
  background: rgba(37, 99, 235, 0.02);
}

.post-preview .post-title {
  transition: color 0.2s ease;
}

.post-preview:hover .post-title {
  color: var(--oc-blue);
}

/* --- Blockquote --- */
blockquote {
  border-left: 3px solid var(--oc-blue);
  background: var(--oc-blue-bg);
  border-radius: 0 6px 6px 0;
  padding: 0.75rem 1rem;
  font-style: normal;
}

/* --- Footer (Blog Pages) --- */
body:not(:has(.oc-layout)) footer {
  background-color: #F8FAFC !important;
  border-top: 1px solid var(--oc-border);
}

footer .list-inline-item a {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  border: 1px solid var(--oc-border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--oc-text-secondary);
  transition: all 0.2s ease;
  background: #fff;
}

footer .list-inline-item a:hover {
  background: var(--oc-blue);
  color: #fff;
  border-color: var(--oc-blue);
  transform: translateY(-2px);
}

/* --- Scroll Animations --- */
.scroll-animate {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.scroll-animate.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Responsive (Blog) --- */
@media (max-width: 767px) {
  .post-preview:hover {
    transform: none;
  }
}