@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@500;600;700&family=IBM+Plex+Mono:wght@400;500;600&family=IBM+Plex+Sans:wght@400;500;600&display=swap');

:root{
  --bg: #0D0F0E;
  --panel: #161A19;
  --hairline: #1E3B2A;
  --text: #E4E1D6;
  --text-muted: #93998F;
  --green: #55D67F;
  --amber: #E3A94C;
  --accent-dim: #1E2C24;
}

*{ box-sizing: border-box; }
html,body{ margin:0; padding:0; }
body{
  background: var(--bg);
  color: var(--text);
  font-family: 'IBM Plex Sans', sans-serif;
  line-height: 1.6;
}
body::before{
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  background-image: repeating-linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.22) 0px,
    rgba(0, 0, 0, 0.22) 1px,
    transparent 1px,
    transparent 3px
  );
  opacity: 0.65;
}
a{ color: var(--green); text-decoration: none; }
a:hover{ text-decoration: underline; }

.wrap{ max-width: 760px; margin: 0 auto; padding: 0 20px; }

/* ---- Site header ---- */
.site-banner{
  margin: 0 0 -1px 0;
}
.site-banner img{
  width: 100%;
  aspect-ratio: 8 / 1;
  object-fit: cover;
  display: block;
  border-bottom: 1px solid var(--hairline);
}
.site-header{
  border-bottom: 1px solid var(--hairline);
  padding: 44px 0 28px;
  margin-bottom: 28px;
}
.back-to-site{
  display: inline-block;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--green);
  margin-bottom: 16px;
}
.back-to-site:hover{ color: var(--green); text-decoration: none; }
.site-header h1{
  font-family: 'Oswald', sans-serif;
  font-weight: 700;
  font-size: 40px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  margin: 0 0 6px 0;
}
.site-header h1 a{
  color: var(--text);
  text-shadow: 0 0 14px rgba(85, 214, 127, 0.45), 0 0 3px rgba(85, 214, 127, 0.6);
}
.site-header h1 a:hover{ text-decoration: none; opacity: 0.85; }
.site-header p{
  color: var(--text-muted);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  margin: 0;
  letter-spacing: 0.02em;
}
.cursor-blink{
  display: inline-block;
  width: 0.5em;
  height: 1em;
  background: var(--green);
  margin-left: 3px;
  vertical-align: text-bottom;
  animation: hbCursorBlink 1s steps(1) infinite;
  box-shadow: 0 0 6px rgba(85, 214, 127, 0.7);
}
@keyframes hbCursorBlink{
  0%, 49%{ opacity: 1; }
  50%, 100%{ opacity: 0; }
}

/* ---- Category filter ---- */
.category-filter-label{
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 14px;
  color: var(--text-muted);
  margin: 0 0 4px 0;
}
.category-filter{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 32px;
}
.category-sep{
  color: var(--hairline);
  font-size: 14px;
}
.category-filter a{
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 6px 12px;
  border-radius: 4px;
  border: 1px solid var(--hairline);
  background: var(--panel);
  color: var(--text-muted);
  text-decoration: none;
}
.category-filter a:hover{ color: var(--text); border-color: var(--text-muted); text-decoration: none; }
.category-filter a.active{
  background: var(--accent-dim);
  border-color: var(--green);
  color: var(--green);
}

/* ---- Post list ---- */
.post-card{
  border-bottom: 1px solid var(--hairline);
  padding: 28px 0;
}
.post-card:first-child{ padding-top: 0; }
.post-meta{
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11.5px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 10px;
}
.updated-date{ opacity: 0.7; }
.category-tag{
  color: var(--green);
  border: 1px solid var(--accent-dim);
  background: var(--accent-dim);
  padding: 3px 9px;
  border-radius: 3px;
}
.post-card h2{
  font-family: 'Oswald', sans-serif;
  font-weight: 600;
  font-size: 25px;
  margin: 0 0 10px 0;
}
.post-card h2 a{ color: var(--text); }
.post-cover{
  width: 100%;
  border-radius: 6px;
  margin-bottom: 14px;
  display: block;
  border: 1px solid var(--hairline);
}
.post-excerpt{ color: var(--text-muted); font-size: 15px; margin: 0 0 12px 0; }
.read-more{ font-family: 'IBM Plex Mono', monospace; font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.05em; }

/* ---- Single post ---- */
.post-full .post-meta{ margin-bottom: 16px; }
.post-full h1.post-title{
  font-family: 'Oswald', sans-serif;
  font-weight: 700;
  font-size: 34px;
  letter-spacing: 0.01em;
  margin: 0 0 18px 0;
  line-height: 1.15;
  text-shadow: 0 0 10px rgba(85, 214, 127, 0.25);
}
.post-full .post-cover{ margin-bottom: 26px; }
.post-content{ font-size: 16px; }
.post-content p{ margin: 0 0 18px 0; }
.post-content img{ max-width: 100%; border-radius: 6px; margin: 8px 0 20px; border: 1px solid var(--hairline); }
.post-content h2, .post-content h3{ font-family: 'Oswald', sans-serif; text-transform: uppercase; letter-spacing: 0.02em; margin: 32px 0 14px; }
.post-content ul, .post-content ol{ margin: 0 0 18px 0; padding-left: 22px; }
.post-content code{
  font-family: 'IBM Plex Mono', monospace;
  background: var(--panel);
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 0.9em;
}
.post-content blockquote{
  border-left: 3px solid var(--green);
  margin: 0 0 18px 0;
  padding: 4px 0 4px 16px;
  color: var(--text-muted);
}

/* ---- Enlargeable images / lightbox ---- */
.enlargeable img{
  cursor: zoom-in;
  transition: opacity 0.15s ease;
}
.enlargeable img:hover{ opacity: 0.9; }

.lightbox-overlay{
  position: fixed;
  inset: 0;
  background: rgba(6, 7, 6, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 40px;
  cursor: zoom-out;
  animation: lightboxFade 0.15s ease;
}
@keyframes lightboxFade{ from{ opacity: 0; } to{ opacity: 1; } }
.lightbox-overlay img{
  max-width: 100%;
  max-height: 100%;
  border-radius: 4px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
  cursor: default;
}
.lightbox-close{
  position: fixed;
  top: 18px;
  right: 22px;
  background: none;
  border: none;
  color: var(--text);
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
  z-index: 1001;
  font-family: 'IBM Plex Sans', sans-serif;
}
.lightbox-close:hover{ color: var(--green); }
.back-link{
  display: inline-block;
  margin-top: 30px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ---- Pagination ---- */
.pagination{
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
  padding-top: 24px;
}
.pagination .btn{
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 9px 16px;
  border-radius: 4px;
  border: 1px solid var(--hairline);
  color: var(--text-muted);
  background: transparent;
  text-decoration: none;
  white-space: nowrap;
}
.pagination .btn:hover{ color: var(--text); border-color: var(--text-muted); text-decoration: none; }
.pagination .btn.disabled{ opacity: 0.35; pointer-events: none; }
.pagination .page-count{
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
}

/* ---- Empty / footer ---- */
.empty-state{
  text-align: center;
  padding: 70px 20px;
  color: var(--text-muted);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  border: 1px dashed var(--hairline);
  border-radius: 6px;
}
.site-footer{
  border-top: 1px solid var(--hairline);
  margin-top: 50px;
  padding: 24px 0 60px;
  color: var(--text-muted);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11.5px;
  display: flex;
  justify-content: space-between;
}
.site-footer a{ color: var(--text-muted); }

@media (max-width: 520px){
  .site-header h1{ font-size: 30px; }
  .post-card h2{ font-size: 21px; }
  .post-full h1.post-title{ font-size: 27px; }
  .site-footer{ flex-direction: column; gap: 6px; }
  .pagination{ flex-wrap: wrap; justify-content: center; text-align: center; }
}
