/* ── Synthetic Obsidian — Custom styles ─────────────────────────────────────
   Tailwind handles layout/spacing. This file owns:
   - Glassmorphism
   - Glow effects
   - Carousel transitions
   - Modal animations
   - Terminal mode
   - Scrollbar styling
   - Blog typography
   - Pygments Monokai code highlighting
   ──────────────────────────────────────────────────────────────────────────── */

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

body {
  background-color: #0D1117;
  color: #E6EDF3;
  font-family: 'Inter', sans-serif;
}

/* ── Scrollbar ────────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #0D1117; }
::-webkit-scrollbar-thumb { background: #30363D; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #484F58; }

/* ── Glassmorphism ────────────────────────────────────────────────────────── */
.glass-nav {
  background: rgba(13, 17, 23, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.glass-card {
  background: rgba(22, 27, 34, 0.8);
  border: 1px solid #30363D;
  border-radius: 12px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  transition: box-shadow 0.25s ease, border-color 0.25s ease;
}

/* ── Purple glow on hover ─────────────────────────────────────────────────── */
.project-card:hover,
.blog-card:hover {
  box-shadow: 0 0 20px rgba(126, 66, 255, 0.20),
              0 0 40px rgba(126, 66, 255, 0.08);
  border-color: rgba(126, 66, 255, 0.35);
}

/* ── Gradient text ────────────────────────────────────────────────────────── */
.gradient-text {
  background: linear-gradient(135deg, #E6EDF3 0%, #7E42FF 50%, #2F81F7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Section label ────────────────────────────────────────────────────────── */
.section-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: #8B949E;
}

/* ── CTA Buttons ──────────────────────────────────────────────────────────── */
.cta-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1.1rem;
  background: #2F81F7;
  color: #fff;
  border-radius: 8px;
  font-size: 0.8125rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s ease, box-shadow 0.2s ease;
}
.cta-btn-primary:hover {
  background: #1f6fd0;
  box-shadow: 0 0 16px rgba(47, 129, 247, 0.4);
}

.cta-btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1.1rem;
  border: 1px solid #30363D;
  color: #8B949E;
  border-radius: 8px;
  font-size: 0.8125rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.cta-btn-secondary:hover {
  color: #E6EDF3;
  border-color: #7E42FF;
}

/* ── Tech pills ───────────────────────────────────────────────────────────── */
.tech-pill {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  background: rgba(47, 129, 247, 0.1);
  border: 1px solid rgba(47, 129, 247, 0.25);
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 500;
  color: #8BC7FF;
}

/* ── Stack pills ──────────────────────────────────────────────────────────── */
.stack-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.75rem;
  background: rgba(22, 27, 34, 1);
  border: 1px solid #30363D;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 500;
  color: #E6EDF3;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.stack-pill:hover {
  border-color: #7E42FF;
  color: #C0A0FF;
}

/* ── Difficulty badges ────────────────────────────────────────────────────── */
.difficulty-badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 600;
  font-family: 'JetBrains Mono', monospace;
  white-space: nowrap;
}
.difficulty-high          { background: rgba(248, 81, 73, 0.12); color: #FF7B72; border: 1px solid rgba(248, 81, 73, 0.3); }
.difficulty-production    { background: rgba(63, 185, 80, 0.15); color: #3FB950; border: 1px solid rgba(63, 185, 80, 0.3); }
.difficulty-research      { background: rgba(47, 129, 247, 0.15); color: #79C0FF; border: 1px solid rgba(47, 129, 247, 0.3); }
.difficulty-open-source   { background: rgba(126, 66, 255, 0.15); color: #C0A0FF; border: 1px solid rgba(126, 66, 255, 0.3); }
.difficulty-tool          { background: rgba(139, 148, 158, 0.1); color: #8B949E; border: 1px solid rgba(139, 148, 158, 0.2); }
.difficulty-prototype     { background: rgba(255, 166, 77, 0.1); color: #FFA64D; border: 1px solid rgba(255, 166, 77, 0.25); }
.difficulty-internal      { background: rgba(139, 148, 158, 0.1); color: #8B949E; border: 1px solid rgba(139, 148, 158, 0.2); }
.difficulty-mvp           { background: rgba(63, 185, 80, 0.15); color: #3FB950; border: 1px solid rgba(63, 185, 80, 0.3); }
.difficulty-client        { background: rgba(47, 129, 247, 0.15); color: #79C0FF; border: 1px solid rgba(47, 129, 247, 0.3); }
.difficulty-build         { background: rgba(126, 66, 255, 0.15); color: #C0A0FF; border: 1px solid rgba(126, 66, 255, 0.3); }

/* ── Carousel ─────────────────────────────────────────────────────────────── */
.carousel-container {
  position: relative;
  overflow: hidden;
}

.carousel-track {
  display: flex;
  height: 100%;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

.carousel-slide {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
}

.carousel-btn {
  background: rgba(13, 17, 23, 0.7);
  border: 1px solid #30363D;
  color: #E6EDF3;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease;
}
.carousel-btn:hover { background: rgba(126, 66, 255, 0.5); border-color: #7E42FF; }

.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,0.35);
  transition: background 0.2s ease;
}
.dot.active { background: rgba(255,255,255,0.9); }

/* ── Modal ────────────────────────────────────────────────────────────────── */
#blog-modal {
  display: none;
  animation: modal-fade-in 0.2s ease;
}
#blog-modal.open {
  display: flex;
}
@keyframes modal-fade-in {
  from { opacity: 0; transform: scale(0.97); }
  to   { opacity: 1; transform: scale(1); }
}

/* ── Terminal mode ────────────────────────────────────────────────────────── */
#terminal-overlay {
  font-family: 'JetBrains Mono', monospace;
}
#terminal-output {
  color: #3FB950;
}
.terminal-cursor {
  display: inline-block;
  animation: blink 1s step-start infinite;
}
@keyframes blink {
  50% { opacity: 0; }
}

/* ── Fade-in on scroll ────────────────────────────────────────────────────── */
.fade-in-section {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.fade-in-section.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Blog content typography ──────────────────────────────────────────────── */
.prose-blog {
  color: #E6EDF3;
  font-size: 0.9rem;
  line-height: 1.75;
}
.prose-blog h1, .prose-blog h2, .prose-blog h3, .prose-blog h4 {
  color: #E6EDF3;
  font-weight: 700;
  margin-top: 1.5em;
  margin-bottom: 0.6em;
}
.prose-blog h1 { font-size: 1.5rem; }
.prose-blog h2 { font-size: 1.25rem; border-bottom: 1px solid #30363D; padding-bottom: 0.25em; }
.prose-blog h3 { font-size: 1.05rem; }
.prose-blog p  { margin-bottom: 1em; }
.prose-blog a  { color: #2F81F7; text-decoration: underline; }
.prose-blog a:hover { color: #7E42FF; }
.prose-blog ul, .prose-blog ol { padding-left: 1.5rem; margin-bottom: 1em; }
.prose-blog li { margin-bottom: 0.3em; }
.prose-blog blockquote {
  border-left: 3px solid #7E42FF;
  padding-left: 1rem;
  color: #8B949E;
  margin: 1em 0;
  font-style: italic;
}
.prose-blog code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82em;
  background: rgba(47, 129, 247, 0.1);
  border: 1px solid rgba(47, 129, 247, 0.2);
  border-radius: 4px;
  padding: 0.1em 0.35em;
  color: #79C0FF;
}
.prose-blog pre {
  background: #161B22;
  border: 1px solid #30363D;
  border-radius: 8px;
  padding: 1rem;
  overflow-x: auto;
  margin: 1em 0;
}
.prose-blog pre code {
  background: none;
  border: none;
  padding: 0;
  color: #E6EDF3;
  font-size: 0.8rem;
}
.prose-blog table {
  width: 100%;
  border-collapse: collapse;
  margin: 1em 0;
  font-size: 0.85rem;
}
.prose-blog th {
  background: #161B22;
  border: 1px solid #30363D;
  padding: 0.5rem 0.75rem;
  text-align: left;
  font-weight: 600;
}
.prose-blog td {
  border: 1px solid #30363D;
  padding: 0.5rem 0.75rem;
}
.prose-blog hr {
  border: none;
  border-top: 1px solid #30363D;
  margin: 1.5em 0;
}

/* ── Pygments Monokai (codehilite) ────────────────────────────────────────── */
.highlight { background: #272822; border-radius: 8px; overflow-x: auto; }
.highlight .hll { background-color: #49483e }
.highlight .c  { color: #75715e }
.highlight .err { color: #960050; background-color: #1e0010 }
.highlight .k  { color: #66d9ef }
.highlight .l  { color: #ae81ff }
.highlight .n  { color: #f8f8f2 }
.highlight .o  { color: #f92672 }
.highlight .p  { color: #f8f8f2 }
.highlight .cm { color: #75715e }
.highlight .cp { color: #75715e }
.highlight .c1 { color: #75715e }
.highlight .cs { color: #75715e }
.highlight .gd { color: #f92672 }
.highlight .ge { font-style: italic }
.highlight .gi { color: #a6e22e }
.highlight .gs { font-weight: bold }
.highlight .gu { color: #75715e }
.highlight .kc { color: #66d9ef }
.highlight .kd { color: #66d9ef }
.highlight .kn { color: #f92672 }
.highlight .kp { color: #66d9ef }
.highlight .kr { color: #66d9ef }
.highlight .kt { color: #66d9ef }
.highlight .ld { color: #e6db74 }
.highlight .m  { color: #ae81ff }
.highlight .s  { color: #e6db74 }
.highlight .na { color: #a6e22e }
.highlight .nb { color: #f8f8f2 }
.highlight .nc { color: #a6e22e }
.highlight .no { color: #66d9ef }
.highlight .nd { color: #a6e22e }
.highlight .ni { color: #f8f8f2 }
.highlight .ne { color: #a6e22e }
.highlight .nf { color: #a6e22e }
.highlight .nl { color: #f8f8f2 }
.highlight .nn { color: #f8f8f2 }
.highlight .nx { color: #a6e22e }
.highlight .py { color: #f8f8f2 }
.highlight .nt { color: #f92672 }
.highlight .nv { color: #f8f8f2 }
.highlight .ow { color: #f92672 }
.highlight .w  { color: #f8f8f2 }
.highlight .mf { color: #ae81ff }
.highlight .mh { color: #ae81ff }
.highlight .mi { color: #ae81ff }
.highlight .mo { color: #ae81ff }
.highlight .sb { color: #e6db74 }
.highlight .sc { color: #e6db74 }
.highlight .sd { color: #e6db74 }
.highlight .s2 { color: #e6db74 }
.highlight .se { color: #ae81ff }
.highlight .sh { color: #e6db74 }
.highlight .si { color: #e6db74 }
.highlight .sx { color: #e6db74 }
.highlight .sr { color: #e6db74 }
.highlight .s1 { color: #e6db74 }
.highlight .ss { color: #e6db74 }
.highlight .bp { color: #f8f8f2 }
.highlight .vc { color: #f8f8f2 }
.highlight .vg { color: #f8f8f2 }
.highlight .vi { color: #f8f8f2 }
.highlight .il { color: #ae81ff }
