/* ------------------------------------------------------------------
   Exploitation Diaries
   A nod to 2000s underground sites and ezines: terminal banner,
   bracketed links, boxed sections, Code:/Quote: blocks.
   Colours are deliberately quiet: charcoal, not black; off-white text,
   not neon; one soft blue for links and a warm sand accent. Nothing
   glows. The only animation is the banner cursor, and it stops for
   people who ask for reduced motion.
   ------------------------------------------------------------------ */

:root {
  --page:    #111214;  /* outside the frame              */
  --frame:   #17191c;  /* frame background               */
  --box:     #1c1f23;  /* section boxes                  */
  --box-alt: #22262b;  /* bars, quote/code headers       */
  --border:  #30353b;
  --text:    #d2d4d0;  /* prose                          */
  --bright:  #ecebe6;  /* headings                       */
  --muted:   #8c9198;  /* meta, small print              */
  --link:    #93b7d8;  /* soft steel blue                */
  --link-hi: #c3d8ec;
  --accent:  #d7b06a;  /* warm sand: logo, numbers       */
  --code-bg: #141619;

  /* syntax — muted so code blocks don't shout */
  --sx-comment: #7a8088;
  --sx-keyword: #d98e8e;
  --sx-string:  #a9c7a0;
  --sx-number:  #c7a8d9;
  --sx-func:    #93b7d8;
  --sx-type:    #d7b06a;

  /* all three cover the full Azerbaijani alphabet (Ə ə Ğ ğ I ı İ Ş ş …) */
  --sans:  "Noto Sans", Verdana, Tahoma, sans-serif;
  --mono:  "IBM Plex Mono", ui-monospace, Consolas, monospace;
  --term:  "VT323", "IBM Plex Mono", monospace;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.75;
  overflow-wrap: break-word;
}

::selection { background: #3a4a5c; color: #fff; }

a { color: var(--link); text-decoration: none; }
a:hover { color: var(--link-hi); text-decoration: underline; }
a:focus-visible { outline: 1px dashed var(--link); outline-offset: 2px; }

.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 1rem; top: 1rem; z-index: 5; padding: 0.3rem 0.7rem; background: var(--bright); color: var(--page); }

/* ---------- frame ---------- */

.forum {
  max-width: 54rem;
  margin: 1.5rem auto;
  background: var(--frame);
  border: 1px solid var(--border);
}

/* ---------- banner ---------- */

.banner {
  padding: 1.6rem 1.75rem 1.3rem;
  border-bottom: 1px solid var(--border);
  background: repeating-linear-gradient(0deg, rgb(0 0 0 / 0.18) 0 1px, transparent 1px 3px);
}

.logo {
  display: inline-block;
  font-family: var(--term);
  font-size: 3.1rem;
  line-height: 1;
  color: var(--bright);
}

.logo:hover { color: var(--bright); text-decoration: none; }

.cursor { color: var(--accent); animation: blink 1s steps(1) infinite; }

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

@media (prefers-reduced-motion: reduce) {
  .cursor { animation: none; }
}

.banner-tag {
  margin: 0.45rem 0 0;
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--muted);
}

/* ---------- navbar ---------- */

.navbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem 1rem;
  padding: 0.5rem 1.75rem;
  background: var(--box-alt);
  border-bottom: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 0.8rem;
}

.nav-links { display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; }
.nav-links a::before { content: "[ "; color: var(--muted); }
.nav-links a::after  { content: " ]"; color: var(--muted); }

.nav-lang { display: inline-flex; border: 1px solid var(--border); }
.nav-lang > * { padding: 0 0.5rem; }
.nav-lang > span { background: var(--bright); color: var(--page); font-weight: 600; }
.nav-lang > a { color: var(--muted); }
.nav-lang > a:hover { color: var(--bright); background: var(--box); text-decoration: none; }

main { padding: 1.75rem 1.75rem 0.25rem; }

/* ---------- boxes ---------- */

.box {
  margin: 0 0 1.75rem;
  background: var(--box);
  border: 1px solid var(--border);
}

.bar {
  margin: 0;
  padding: 0.45rem 1rem;
  background: var(--box-alt);
  border-bottom: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--bright);
}

.bar span { color: var(--muted); font-weight: 400; }

.box-body { padding: 1.25rem 1.4rem 1.4rem; }

/* ---------- about ---------- */

.handle {
  margin: 0 0 0.6rem !important;
  font-family: var(--mono);
  font-weight: 600;
  color: var(--accent);
}

.handle span { color: var(--muted); font-weight: 400; }

.about p { margin: 0 0 0.9rem; }
.about p:last-child { margin-bottom: 0; }

/* ---------- ezine-style index ---------- */

.index { list-style: none; margin: 0; padding: 0; }

.index li {
  display: grid;
  grid-template-columns: 3.25rem minmax(0, 1fr);
  gap: 0 0.75rem;
  padding: 1.1rem 1.4rem;
}

.index li + li { border-top: 1px dashed var(--border); }

.index-no {
  font-family: var(--mono);
  font-size: 0.85rem;
  line-height: 1.75rem;
  color: var(--accent);
}

.index-title { font-size: 1.1rem; font-weight: 700; line-height: 1.45; color: var(--bright); }
.index-title:hover { color: var(--link-hi); }

.index-desc { margin: 0.3rem 0 0.35rem; font-size: 0.92rem; line-height: 1.6; }

.meta {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--muted);
}

/* ---------- post ---------- */

.back { margin: 0 0 1rem; font-family: var(--mono); font-size: 0.8rem; }
.box + .back { margin-top: -0.5rem; }

.post-header {
  padding: 1.4rem 1.4rem 1.1rem;
  background: var(--box-alt);
  border-bottom: 1px solid var(--border);
}

.post-header h1 {
  margin: 0 0 0.5rem;
  font-size: 1.75rem;
  line-height: 1.3;
  color: var(--bright);
}

.content { max-width: 44rem; }
.content > *:first-child { margin-top: 0; }

.content h2, .content h3, .content h4 { color: var(--bright); line-height: 1.35; }
.content h2 { font-size: 1.35rem; margin: 2.5rem 0 0.8rem; padding-bottom: 0.3rem; border-bottom: 1px dashed var(--border); }
.content h3 { font-size: 1.15rem; margin: 2rem 0 0.7rem; }
.content h4 { font-size: 1rem;    margin: 1.75rem 0 0.6rem; }

.content h2::before { content: "# "; color: var(--accent); font-family: var(--mono); font-weight: 400; }

.content p, .content ul, .content ol { margin: 0 0 1.2rem; }
.content ul, .content ol { padding-left: 1.4rem; }
.content li { margin-bottom: 0.35rem; }
.content li::marker { color: var(--muted); }

.content strong { color: var(--bright); }
.content a { text-decoration: underline; text-decoration-color: rgb(147 183 216 / 0.4); text-underline-offset: 0.15em; }

.content blockquote {
  margin: 1.5rem 0;
  padding: 0.8rem 1rem;
  background: var(--frame);
  border: 1px solid var(--border);
  border-left: 3px solid var(--muted);
  font-size: 0.95rem;
}

.content blockquote::before {
  content: "Quote:";
  display: block;
  margin-bottom: 0.3rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
}

.content blockquote p:last-child { margin-bottom: 0; }

.content img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 1.75rem auto 0.5rem;
  border: 1px solid var(--border);
}

.content figure { margin: 1.75rem 0; }
.content figure img { margin: 0 auto; }

.content figcaption {
  margin-top: 0.5rem;
  text-align: center;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--muted);
}

.content hr { border: 0; border-top: 1px dashed var(--border); margin: 2.5rem 0; }

.content table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; font-size: 0.9rem; }
.content th, .content td { border: 1px solid var(--border); padding: 0.4rem 0.7rem; text-align: left; }
.content th { background: var(--box-alt); color: var(--bright); }

.signature {
  margin-top: 2.5rem;
  padding-top: 0.75rem;
  border-top: 1px dashed var(--border);
  font-family: var(--mono);
  font-size: 0.78rem;
  line-height: 1.6;
  color: var(--muted);
}

.signature p { margin: 0 0 0.5rem; }

/* ---------- code ---------- */

code, kbd, samp, pre { font-family: var(--mono); }

:not(pre) > code {
  padding: 0.05em 0.3em;
  background: var(--code-bg);
  border: 1px solid var(--border);
  font-size: 0.85em;
  color: var(--bright);
}

div.highlighter-rouge { margin: 1.5rem 0; border: 1px solid var(--border); background: var(--code-bg); }

div.highlighter-rouge::before {
  content: "Code:";
  display: block;
  padding: 0.2rem 0.75rem;
  background: var(--box-alt);
  border-bottom: 1px solid var(--border);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
}

.highlight { margin: 0; }

.highlight pre {
  margin: 0;
  padding: 0.9rem 1rem;
  overflow-x: auto;
  font-size: 0.8rem;
  line-height: 1.6;
  color: var(--text);
}

pre code { background: none; border: 0; padding: 0; font-size: inherit; color: inherit; }

.highlight .c, .highlight .c1, .highlight .cm, .highlight .cs { color: var(--sx-comment); font-style: italic; }
.highlight .cp, .highlight .cpf { color: var(--sx-number); }
.highlight .k, .highlight .kd, .highlight .kn, .highlight .kr, .highlight .kc { color: var(--sx-keyword); }
.highlight .kt { color: var(--sx-type); }
.highlight .s, .highlight .s1, .highlight .s2, .highlight .sc, .highlight .se, .highlight .sb { color: var(--sx-string); }
.highlight .m, .highlight .mi, .highlight .mh, .highlight .mf, .highlight .mo, .highlight .no { color: var(--sx-number); }
.highlight .nf, .highlight .nb { color: var(--sx-func); }
.highlight .nt, .highlight .gi { color: var(--sx-string); }
.highlight .err, .highlight .gd { color: var(--sx-keyword); }

/* ---------- footer ---------- */

.site-footer {
  margin: 0 1.75rem;
  padding: 1rem 0 1.1rem;
  border-top: 1px solid var(--border);
  text-align: center;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--muted);
}

.site-footer p { margin: 0; }

/* ---------- small screens ---------- */

@media (max-width: 44rem) {
  .forum { margin: 0; border-width: 0 0 1px; }
  .banner, .navbar { padding-inline: 1rem; }
  main { padding: 1.25rem 0.75rem 0.25rem; }
  .site-footer { margin-inline: 0.75rem; }
  .logo { font-size: 2.4rem; }
  .box-body, .post-header { padding-inline: 1rem; }
  .post-header h1 { font-size: 1.45rem; }
  .index li { grid-template-columns: 1fr; padding-inline: 1rem; }
}
