/* ── BLOG POST SHARED SYSTEM ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:       #1a1b26;
  --bg2:      #16161e;
  --bg3:      #1f2335;
  --bg4:      #24283b;
  --border:   rgba(122,162,247,0.12);
  --border2:  rgba(122,162,247,0.22);
  --text:     #c0caf5;
  --text2:    #9aa5ce;
  --muted:    #565f89;
  --cyan:     #7dcfff;
  --blue:     #7aa2f7;
  --purple:   #bb9af7;
  --green:    #9ece6a;
  --yellow:   #e0af68;
  --red:      #f7768e;
  --orange:   #ff9e64;
  --teal:     #73daca;
  --font-mono: 'JetBrains Mono', monospace;
  --font-sans: 'Inter', sans-serif;
  --font-display: 'Syne', sans-serif;
  --radius: 12px;
}

html { scroll-behavior: smooth; }
body {
  background: var(--bg2);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.8;
  overflow-x: hidden;
  padding-top: 54px;
}

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg2); }
::-webkit-scrollbar-thumb { background: var(--muted); border-radius: 3px; }

/* ── NAV ── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; justify-content: space-between; align-items: center;
  padding: 0 2.5rem;
  height: 54px;
  background: rgba(22,22,30,0.92);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.nav-logo-link {
  text-decoration: none;
}
.nav-logo {
  font-family: var(--font-mono);
  font-size: 0.85rem; font-weight: 700;
  color: var(--green);
  display: flex; align-items: center; gap: 8px;
}
.nav-logo::before { content: '❯'; color: var(--blue); }
.nav-links { display: flex; gap: 0; list-style: none; }
.nav-links a {
  color: var(--muted); text-decoration: none;
  font-family: var(--font-mono); font-size: 0.78rem;
  padding: 0.4rem 1rem;
  border-left: 1px solid var(--border);
  transition: color 0.2s, background 0.2s;
}
.nav-links li:last-child a { border-right: 1px solid var(--border); }
.nav-links a:hover { color: var(--blue); background: rgba(122,162,247,0.06); }

/* ── READING PROGRESS BAR ── */
.progress-container {
  position: fixed;
  top: 53px;
  left: 0;
  width: 100%;
  height: 2px;
  background: transparent;
  z-index: 101;
}
.progress-bar {
  height: 100%;
  width: 0%;
  background: var(--blue);
  transition: width 0.1s;
}

/* ── LAYOUT ── */
.blog-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 3rem 1.5rem 6rem;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--blue);
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  margin-bottom: 2rem;
  transition: color 0.2s, transform 0.2s;
}
.back-link:hover {
  color: var(--cyan);
  transform: translateX(-4px);
}

/* ── HEADER ── */
.post-header {
  margin-bottom: 3rem;
}
.post-category {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 10px;
  border-radius: 4px;
  margin-bottom: 1rem;
  border: 1px solid;
}
.cat-aws     { background: rgba(224,175,104,0.1); color: var(--yellow); border-color: rgba(224,175,104,0.25); }
.cat-iac     { background: rgba(122,162,247,0.1); color: var(--blue);   border-color: rgba(122,162,247,0.25); }
.cat-cicd    { background: rgba(115,218,202,0.1); color: var(--teal);   border-color: rgba(115,218,202,0.25); }
.cat-obs     { background: rgba(187,154,247,0.1); color: var(--purple); border-color: rgba(187,154,247,0.25); }
.cat-linux   { background: rgba(247,118,142,0.1); color: var(--red);    border-color: rgba(247,118,142,0.25); }
.cat-script  { background: rgba(115,218,202,0.1); color: var(--teal);   border-color: rgba(115,218,202,0.25); }

.post-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  font-weight: 800;
  line-height: 1.25;
  color: #fff;
  margin-bottom: 1.2rem;
}
.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  padding-bottom: 1.5rem;
}
.post-meta span {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ── CONTENT TYPOGRAPHY ── */
.post-content h2 {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 4vw, 1.8rem);
  font-weight: 700;
  color: #fff;
  margin: 2.8rem 0 1.2rem;
}
.post-content h3 {
  font-family: var(--font-sans);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--blue);
  margin: 2rem 0 1rem;
}
.post-content p {
  margin-bottom: 1.5rem;
  color: var(--text2);
}
.post-content strong {
  color: #fff;
  font-weight: 600;
}
.post-content ul, .post-content ol {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
  color: var(--text2);
}
.post-content li {
  margin-bottom: 0.5rem;
}
.post-content blockquote {
  border-left: 3px solid var(--purple);
  background: rgba(187,154,247,0.04);
  padding: 1rem 1.5rem;
  margin: 1.8rem 0;
  border-radius: 0 var(--radius) var(--radius) 0;
}
.post-content blockquote p {
  margin-bottom: 0;
  font-style: italic;
  color: var(--text);
}
.post-content code:not(pre code) {
  font-family: var(--font-mono);
  background: var(--bg3);
  color: var(--cyan);
  font-size: 0.88em;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--border);
}

/* ── TERMINAL CONTAINER FOR CODE ── */
.term-window {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  margin: 1.8rem 0;
  position: relative;
}
.term-bar {
  background: var(--bg4);
  padding: 8px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--border);
}
.term-dot { width: 10px; height: 10px; border-radius: 50%; }
.dot-red   { background: #f7768e; }
.dot-yellow{ background: #e0af68; }
.dot-green { background: #9ece6a; }
.term-title {
  margin-left: 8px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--muted);
}
.btn-copy {
  position: absolute;
  top: 6px;
  right: 12px;
  background: rgba(122,162,247,0.1);
  border: 1px solid var(--border);
  color: var(--text2);
  padding: 3px 8px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  cursor: pointer;
  z-index: 10;
  transition: all 0.2s;
}
.btn-copy:hover {
  background: var(--blue);
  color: var(--bg2);
  border-color: var(--blue);
}
.term-body {
  padding: 1.2rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.6;
  overflow-x: auto;
}
.term-body pre {
  margin: 0;
  white-space: pre;
}

/* ── SYNTAX HIGHLIGHTING UTILITIES ── */
.comment { color: var(--muted); }
.keyword { color: var(--purple); font-weight: 500; }
.builtin { color: var(--purple); }
.string  { color: var(--green); }
.function{ color: var(--blue); }
.variable{ color: var(--yellow); }
.number  { color: var(--orange); }
.command { color: var(--blue); }
.arg     { color: var(--yellow); }
.flag    { color: var(--purple); }
.output  { color: var(--cyan); }
.out-ok  { color: var(--green); }

/* ── FOOTER ── */
footer {
  padding: 2rem 2.5rem; text-align: center;
  border-top: 1px solid var(--border);
  font-family: var(--font-mono); font-size: 0.72rem; color: var(--muted);
  margin-top: 4rem;
}
footer .hl { color: var(--green); }

/* ── AUTHOR CARD ── */
.author-card {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.6rem;
  display: flex;
  gap: 1.4rem;
  align-items: center;
  margin-top: 4rem;
}
.author-avatar {
  font-size: 2.2rem;
  background: var(--bg4);
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border2);
  flex-shrink: 0;
}
.author-info h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: #fff;
  margin: 0 0 6px !important;
}
.author-bio {
  font-size: 0.85rem;
  color: var(--text2);
  margin-bottom: 10px;
  line-height: 1.6;
}
.author-links {
  display: flex;
  gap: 12px;
}
.author-links a {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--blue);
  text-decoration: none;
  transition: color 0.2s;
}
.author-links a:hover {
  color: var(--cyan);
}

/* ── RESPONSIVENESS ── */
@media(max-width:640px){
  nav { padding: 0 1rem; }
  .blog-container { padding: 2rem 1rem 4rem; }
  .post-header { margin-bottom: 2rem; }
  .post-meta { gap: 0.8rem; }
  .author-card { flex-direction: column; text-align: center; padding: 1.2rem; }
  .author-links { justify-content: center; }
}
