/*
 * Terminal Sublime — Geek Minimal Custom Styles
 * Applies the design philosophy from .opencode/skills/canvas-design/design-philosophy.md
 *
 * Principles: monochrome discipline, cyan accent, terminal aesthetics, minimal noise
 */

/* ── Base typography ─────────────────────────────────────────────────── */

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Selection — cyan glow like terminal highlight ──────────────────── */

::selection {
  background: rgba(0, 212, 255, 0.25);
  color: #e6edf3;
}

::-moz-selection {
  background: rgba(0, 212, 255, 0.25);
  color: #e6edf3;
}

/* ── Scrollbar — thin, minimal, terminal-inspired ───────────────────── */

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: #30363d;
  border-radius: 0;
}

::-webkit-scrollbar-thumb:hover {
  background: #484f58;
}

/* ── Focus ring — cyan glow ─────────────────────────────────────────── */

*:focus-visible {
  outline: 2px solid rgba(0, 212, 255, 0.5);
  outline-offset: 2px;
}

/* ── Links — underline on hover only, terminal style ────────────────── */

a {
  text-decoration: none;
  position: relative;
  transition: color 0.2s ease;
}

a:hover {
  text-decoration: none;
}

a::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 0;
  height: 1px;
  background: currentColor;
  transition: width 0.2s ease;
}

a:hover::after {
  width: 100%;
}

/* ── Navbar — clean, no border ──────────────────────────────────────── */

.navbar {
  box-shadow: none !important;
  border-bottom: none !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.navbar .navbar-brand {
  font-weight: 600;
  letter-spacing: -0.01em;
}

/* ── Navbar circular avatar ─────────────────────────────────────────── */

.navbar .navbar-avatar {
  display: inline-block;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
  vertical-align: -7px;
  margin-right: 8px;
  border: 1px solid rgba(0, 212, 255, 0.25);
  box-shadow: 0 0 0 2px rgba(0, 212, 255, 0.08);
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.navbar .navbar-brand:hover .navbar-avatar {
  border-color: rgba(0, 212, 255, 0.6);
  box-shadow: 0 0 0 2px rgba(0, 212, 255, 0.18);
}

/* ── Cards / Boards — subtle border instead of shadow ──────────────── */

.board {
  border: 1px solid #d0d7de !important;
  border-radius: 6px !important;
  box-shadow: none !important;
}

[data-user-color-scheme="dark"] .board {
  border-color: #30363d !important;
}

/* ── Headings ───────────────────────────────────────────────────────── */

h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  letter-spacing: -0.01em;
}

/* ── Code blocks ────────────────────────────────────────────────────── */

.highlight,
pre,
code {
  font-family: 'JetBrains Mono', 'Cascadia Code', 'Fira Code', 'SF Mono', Consolas, monospace !important;
}

.highlight {
  border: 1px solid #21262d !important;
  border-radius: 6px !important;
}

.highlight .code pre {
  background: #0d1117 !important;
}

/* ── Inline code ────────────────────────────────────────────────────── */

code:not(.hljs) {
  background: rgba(0, 212, 255, 0.08) !important;
  color: #0550ae !important;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 0.85em;
}

[data-user-color-scheme="dark"] code:not(.hljs) {
  color: #00d4ff !important;
}

/* ── Blockquote — terminal-style vertical bar ───────────────────────── */

blockquote {
  border-left: 3px solid #d0d7de !important;
  padding-left: 1em;
}

[data-user-color-scheme="dark"] blockquote {
  border-left-color: #30363d !important;
}

/* ── Horizontal rule — minimal ──────────────────────────────────────── */

hr {
  border: none;
  height: 1px;
  margin: 2em 0;
}

/* ── Post meta — smaller, muted ─────────────────────────────────────── */

.post-meta {
  font-size: 0.85em;
  color: #6e7681;
}

/* ── Tag & category badges ──────────────────────────────────────────── */

.tag-wrap,
.category-wrap {
  background: rgba(0, 212, 255, 0.06) !important;
  border: 1px solid rgba(0, 212, 255, 0.12) !important;
  border-radius: 3px !important;
  color: #00d4ff !important;
  font-size: 0.8em !important;
  padding: 2px 8px !important;
  transition: all 0.2s ease;
}

.tag-wrap:hover,
.category-wrap:hover {
  background: rgba(0, 212, 255, 0.12) !important;
  border-color: #00d4ff !important;
}

/* ── Pagination ─────────────────────────────────────────────────────── */

.pagination .page-item.active .page-link {
  background: rgba(0, 212, 255, 0.12) !important;
  border-color: rgba(0, 212, 255, 0.3) !important;
  color: #00d4ff !important;
}

.pagination .page-link {
  border: 1px solid #21262d !important;
  color: #c9d1d9 !important;
  background: transparent !important;
}

.pagination .page-link:hover {
  background: rgba(0, 212, 255, 0.08) !important;
}

/* ── Table ──────────────────────────────────────────────────────────── */

table {
  border: 1px solid #21262d !important;
}

th {
  background: #161b22 !important;
  border-bottom: 2px solid #21262d !important;
}

td {
  border: 1px solid #21262d !important;
}

/* ── Footer — clean, no border ─────────────────────────────────────── */

footer {
  border-top: none !important;
  padding-top: 1.5em;
  margin-top: 2em;
}

/* ── Button — terminal flat style ────────────────────────────────────── */

.btn {
  border-radius: 4px !important;
  border: 1px solid #30363d !important;
  transition: all 0.2s ease;
}

.btn:hover {
  border-color: #00d4ff !important;
  color: #00d4ff !important;
}

/* ── Next / prev post links — clean, no borders ───────────────────── */

.post-prevnext {
  border-top: none !important;
  border-bottom: none !important;
}

/* ── Typing cursor (home subtitle) ─────────────────────────────────── */

.typed-cursor {
  font-family: 'JetBrains Mono', monospace;
  color: #00d4ff;
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

/* ── Anchor icon ────────────────────────────────────────────────────── */

.headerlink {
  color: #30363d !important;
  transition: color 0.2s ease;
}

.headerlink:hover {
  color: #00d4ff !important;
}

/* ── Banner overlay — subtle, not overpowering ──────────────────────── */

.banner-mask {
  background: rgba(0, 0, 0, 0.4) !important;
}

/* ── Post card on index — clean, no borders ────────────────────────── */

.index-card {
  border: none !important;
  padding-bottom: 1.5em;
  margin-bottom: 1.5em;
}

/* ── Dark mode toggle ───────────────────────────────────────────────── */

#dark-mode-toggle {
  color: #8b949e;
  transition: color 0.2s ease;
}

#dark-mode-toggle:hover {
  color: #00d4ff;
}

/* ── Progress bar ────────────────────────────────────────────────────── */

#nprogress .bar {
  background: #00d4ff !important;
  height: 2px !important;
}

#nprogress .peg {
  box-shadow: 0 0 10px #00d4ff, 0 0 5px #00d4ff !important;
}

/* ── Responsive adjustments ─────────────────────────────────────────── */

@media (max-width: 768px) {
  .board {
    border-radius: 0 !important;
    border-left: none !important;
    border-right: none !important;
  }
}
