/* dedo1911.xyz — blog / long-form pages
   Loaded after style.css: reuses its tokens, backdrop and console frame.
   ------------------------------------------------------------------ */

/* ---- document shell ------------------------------------------------ */

/* style.css centres one viewport-sized console; an article instead
   scrolls, so on these pages the body goes back to normal block flow. */
body.doc {
  display: block;
  height: auto;
  padding: clamp(0.75rem, 3vw, 2.75rem) 1rem;

  /* here the body box is as tall as the article, so the gradients would
     stretch over the whole document and slide past as you scroll — the
     backdrop moves to a fixed layer below and only the flat base stays */
  background: var(--bg);
}

body.doc::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: var(--backdrop);
}

.console--doc {
  width: min(880px, 100%);
  margin-inline: auto;
}

.bar--bottom .back {
  color: var(--muted);
  text-decoration: none;
  letter-spacing: 0.14em;
  transition: color 0.2s, text-shadow 0.2s;
}

.bar--bottom .back::before {
  content: '\2190';   /* ← */
  margin-right: 0.5em;
  color: var(--cyan-dim);
  transition: color 0.2s;
}

.bar--bottom .back:hover,
.bar--bottom .back:focus-visible {
  color: var(--cyan);
  text-shadow: var(--glow);
}

.bar--bottom .back:hover::before,
.bar--bottom .back:focus-visible::before { color: var(--cyan); }

/* ---- index listing -------------------------------------------------- */

.index { padding: 1.2rem 0 1.4rem; }

.index__head { padding-bottom: 1.1rem; }

.index__title {
  margin-top: 0.25rem;
  font-size: clamp(1.6rem, 5vw, 2.2rem);
  font-weight: 700;
  line-height: 1.1;
}

.index__note {
  margin-top: 0.6rem;
  font-size: 0.88rem;
  color: var(--muted);
}

.entries { list-style: none; display: grid; }

.entries a {
  display: grid;
  grid-template-columns: 5.2rem 1fr;
  gap: 0.35rem 1.1rem;
  padding: 1.05rem 0.55rem;
  margin-inline: -0.55rem;
  color: var(--text);
  text-decoration: none;
  border-top: 1px solid var(--line-soft);
  transition: background 0.2s;
}

.entries a:hover,
.entries a:focus-visible { background: rgba(77, 232, 232, 0.06); }

.entry__date {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  color: var(--cyan-dim);
  padding-top: 0.2em;
}

.entry__title {
  display: block;
  font-size: 1.02rem;
  font-weight: 600;
  line-height: 1.3;
  transition: color 0.2s;
}

.entries a:hover .entry__title,
.entries a:focus-visible .entry__title { color: var(--cyan); }

.entry__excerpt {
  display: block;
  margin-top: 0.4rem;
  font-size: 0.86rem;
  line-height: 1.5;
  color: var(--muted);
}

.entry__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.7rem;
}

/* ---- article head --------------------------------------------------- */

.post { padding: 1.2rem 0 1rem; }

.post__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem 0.9rem;
  font-family: var(--mono);
  font-size: 0.63rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--cyan-dim);
}

.post__meta b {
  font-weight: 400;
  color: var(--line);
}

.post__title {
  margin-top: 0.7rem;
  font-size: clamp(1.7rem, 5.2vw, 2.55rem);
  font-weight: 700;
  line-height: 1.12;
  text-shadow: 0 0 26px rgba(77, 232, 232, 0.18);
}

.post__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 1rem;
}

.post__hero {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 7;
  object-fit: cover;
  margin-top: 1.5rem;
  border: 1px solid var(--line-soft);
}

/* ---- article body --------------------------------------------------- */

.prose {
  margin-top: 1.9rem;
  font-size: 0.97rem;
  line-height: 1.72;
  color: var(--text);
}

.prose > p { margin-bottom: 1.15rem; }

.prose > p:first-child {
  font-size: 1.06rem;
  line-height: 1.68;
  color: #E8F6FA;
}

.prose h2 {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin: 2.6rem 0 1.1rem;
  font-size: clamp(1.15rem, 3.6vw, 1.4rem);
  font-weight: 600;
  line-height: 1.25;
  color: var(--cyan);
}

.prose h2::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line-soft);
}

.prose a {
  color: var(--amber);
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 176, 58, 0.35);
  transition: color 0.2s, border-color 0.2s;
}

.prose a:hover,
.prose a:focus-visible {
  color: #FFD68A;
  border-bottom-color: currentColor;
}

.prose strong { font-weight: 600; color: #EAF7FB; }

.prose ul {
  list-style: none;
  display: grid;
  gap: 0.85rem;
  margin: 0 0 1.4rem;
  padding-left: 0.15rem;
}

.prose li { padding-left: 1.5em; position: relative; }

.prose li::before {
  content: '\25B8';
  position: absolute;
  left: 0;
  top: 0;
  color: var(--cyan);
  font-size: 0.85em;
  line-height: 1.95;
}

/* inline code, and the code inside a block (which .code re-styles) */
.prose :not(pre) > code {
  font-family: var(--mono);
  font-size: 0.83em;
  padding: 0.15em 0.4em;
  color: var(--cyan);
  background: rgba(77, 232, 232, 0.08);
  border: 1px solid var(--line-soft);
}

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

.code {
  margin: 1.5rem 0 1.7rem;
  border: 1px solid var(--line-soft);
  background: var(--panel-2);
}

.code__lang {
  padding: 0.5rem 0.9rem;
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--cyan-dim);
  border-bottom: 1px solid var(--line-soft);
  background: rgba(77, 232, 232, 0.04);
}

.code pre {
  overflow-x: auto;
  padding: 1rem 0.9rem 1.1rem;
  -webkit-overflow-scrolling: touch;
}

.code code {
  font-family: var(--mono);
  font-size: 0.76rem;
  line-height: 1.55;
  color: var(--text);
  tab-size: 2;
  white-space: pre;
}

/* ---- syntax highlight -------------------------------------------------- */

/* Prism runs without its own theme: these are the only token colours, kept
   to the console palette — cyan for structure, amber for literals, a
   terminal green for callables, everything else recedes. */
.code {
  --tok-comment: var(--muted);
  --tok-key:     var(--cyan);
  --tok-string:  var(--amber);
  --tok-number:  #FFD68A;
  --tok-call:    #7FD1A6;
  --tok-var:     #BFE9F2;
  --tok-punct:   var(--cyan-dim);
}

.code .token.comment,
.code .token.prolog,
.code .token.cdata { color: var(--tok-comment); font-style: italic; }

.code .token.punctuation,
.code .token.operator { color: var(--tok-punct); }

/* YAML keys and Dockerfile instructions carry the structure */
.code .token.key,
.code .token.atrule,
.code .token.keyword,
.code .token.tag,
.code .token.selector,
.code .token.attr-name,
.code .token.property { color: var(--tok-key); }

.code .token.string,
.code .token.attr-value,
.code .token.char,
.code .token.regex { color: var(--tok-string); }

.code .token.number,
.code .token.boolean,
.code .token.constant,
.code .token.symbol { color: var(--tok-number); }

.code .token.function,
.code .token.builtin,
.code .token.class-name { color: var(--tok-call); }

.code .token.variable,
.code .token.entity,
.code .token.url { color: var(--tok-var); }

.code .token.important,
.code .token.bold { font-weight: 500; }

/* ---- figures ---------------------------------------------------------- */

.shot {
  margin: 1.7rem 0 1.9rem;
  border: 1px solid var(--line-soft);
  background: var(--panel-2);
}

.shot img {
  display: block;
  width: 100%;
  height: auto;
}

.shot figcaption {
  padding: 0.7rem 0.9rem;
  font-family: var(--mono);
  font-size: 0.63rem;
  letter-spacing: 0.1em;
  line-height: 1.6;
  color: var(--muted);
  border-top: 1px solid var(--line-soft);
}

.note {
  margin: 1.5rem 0 1.6rem;
  padding: 0.9rem 1.1rem;
  border: 1px solid var(--line-soft);
  border-left: 2px solid var(--amber);
  background: rgba(255, 176, 58, 0.04);
  font-size: 0.9rem;
  line-height: 1.65;
  color: var(--muted);
}

.note strong { color: var(--amber); }

/* ---- end of article ---------------------------------------------------- */

.post__end {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 2.4rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line-soft);
}

/* ---- responsive --------------------------------------------------------- */

@media (max-width: 640px) {
  .entries a {
    grid-template-columns: 1fr;
    gap: 0.5rem;
    margin-inline: 0;
    padding-inline: 0;
  }

  .post__hero { aspect-ratio: 4 / 3; }

  .code code { font-size: 0.72rem; }

  .post__end { flex-direction: column; }
  .post__end .panel__cta { text-align: center; }
}
