/* Markdown */
:root {
  --maincolor: #fa0000a6;
  --bordercl: #7369a2bf;
  --mainheaderborder: #a200ff;
  --darkBordercl: red;
  --darkThemeLine: #fffa00a6;
  --callouctcolor: dodgerblue;
  --hovercolor: #0739ff;
  --darkMaincolor: #f6fa50;
  --mainTitleColor: pink;
  --darkTitleColor: brown;
  --mainSiteDescription: rgb(179 150 150 / 53%);
  --darkSiteDescription: rgb(109 0 0 / 54%);
}

html {
  color: #232333;
  font-family: "Roboto Mono", sans-serif;
  font-size: 1.05rem;
  line-height: 1.55em;
}

body {
  display: block;
  margin: 8px;
  background-color: #fff0ce;
}

* {
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

::selection {
  background: #2b0303ad;
  color: #f3f3f3;
}

p {
  line-height: 1.55;
  font-family: "Roboto Mono", sans-serif;
  font-size: 0.93rem;
  font-weight: 500;
  letter-spacing: -0.03rem;
}

.site-description p {
  text-align: -webkit-center;
}

hr {
  border: 0;
  border-top: 3px dotted var(--bordercl);
  margin: 1.7em 0;
}

blockquote {
  border-left: 3px solid var(--bordercl);
  color: #737373;
  margin: 0;
  padding-left: 1em;
}

a {
  border-bottom: 2px solid var(--maincolor);
  color: inherit;
  text-decoration: none;
  font-weight: 500;
}

a:hover {
  background-color: var(--maincolor);
  color: #fff;
}

footer .soc:hover {
  border-radius: 40%;
}

ul {
  list-style: none;
  padding-left: 2ch;
}

ul li {
  line-height: 1.2rem;
  margin-bottom: 0.2rem;
  margin-right: 0.4rem;
  font-size: 0.9rem;
  letter-spacing: -0.05rem;
}

ul > li::before {
  content: " - ";
  font-weight: bold;
}

/* ────────────────────────────────────────
   Images & Figures – centered, responsive, one after another
   ──────────────────────────────────────── */

img {
  border: 2px solid #0e0920;
  border-radius: 5%;
  max-width: 100%;
  height: auto;
  display: block;
  margin: 1rem auto 0.5rem; /* top spacing + true centering */
}

figure {
  display: block; /* crucial – was inline-block before */
  margin: 2.5rem auto; /* good vertical spacing + horizontal center */
  max-width: 100%;
  text-align: center;
  padding: 0; /* no side padding to avoid shifting */
}

figure img {
  max-height: 500px;
  width: auto; /* important: narrow images keep natural width */
  max-width: 100%;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1); /* subtle enhancement – remove if unwanted */
}

figure h4 {
  font-size: 1rem;
  margin: 0.8em 0 0;
  text-align: center;
}

figure h4::before {
  content: "↳ ";
}

/* Remove side padding on larger screens that was breaking centering */
@media screen and (min-width: 600px) {
  figure {
    padding: 0;
  }
}

/* Breathing room between consecutive images */
figure + figure {
  margin-top: 1.8rem;
}

/* If you ever use this class directly (fallback) */
.center-image {
  display: block;
  margin: 2rem auto;
  max-width: 100%;
  height: auto;
}

/* ────────────────────────────────────────
   Code blocks
   ──────────────────────────────────────── */

code {
  background-color: #f1f1f1;
  padding: 0.1em 0.2em;
  border-radius: 20%;
}

pre {
  background-color: #ececec;
  line-height: 1.4;
  overflow-x: auto;
  padding: 1em;
}

.highlight pre ::selection {
  background: rgba(255, 255, 255, 0.2);
  color: inherit;
}

pre code {
  background-color: transparent;
  color: inherit;
  font-size: 100%;
  padding: 0;
}

/* Containers */
.content {
  margin-bottom: 4em;
  margin-left: auto;
  margin-right: auto;
  max-width: 800px;
  padding: 0 1ch;
  word-wrap: break-word;
}

/* Header */
header {
  display: flow;
  justify-items: start;
  margin: 1em 0;
  line-height: 2.5em;
  margin-bottom: 1.5rem;
}

#mainTitle a {
  color: #060b0e;
  border-bottom: thick double var(--maincolor);
}

#mainTitle a:hover {
  color: white;
  border-bottom: 1mm ridge var(--maincolor);
  font-weight: 600;
}

header .main {
  font-size: 1.9rem;
}

h3,
h4,
h5,
h6 {
  font-size: 1.11rem;
  margin-top: 1.5em;
  margin-bottom: 0.7em;
}

h1 {
  font-size: 1.2rem;
  margin-top: 1.2rem;
  margin-bottom: 0.4em;
}

h2 {
  font-size: 1.14rem;
  margin-top: 1.6em;
  margin-bottom: 0.5em;
}

h1::before {
  content: "▶ ";
  color: var(--darkBordercl);
}
h2::before {
  color: var(--maincolor);
  content: "▷ ";
}
h3::before {
  color: var(--maincolor);
  content: "⦿ ";
}
h4::before {
  color: var(--maincolor);
  content: "〇 ";
}
h5::before {
  color: var(--maincolor);
  content: "╳ ";
}
h6::before {
  color: var(--maincolor);
  content: "✖ ";
}

.meta {
  color: #a14b4b;
  letter-spacing: -0.5px;
}

/* Footer */
footer {
  display: flex;
  align-items: center;
  border-top: 0.4rem dotted var(--bordercl);
  padding: 1rem 0rem;
  margin-top: 1.5rem;
}

.soc {
  display: flex;
  align-items: center;
  border-bottom: none;
}

.border {
  margin-left: 0.5rem;
  margin-right: 0.5rem;
  border: 1px solid;
}

.footer-info {
  padding: var(--footer-padding);
}

/* Common */
.title h1 {
  margin-bottom: 0;
}

time {
  color: grey;
  font-size: 0.9rem;
}

/* Posts */
article .title {
  margin-bottom: 1em;
}

/* Callout */
.callout {
  background-color: var(--callouctcolor);
  color: #fff;
  padding: 1em;
}

.callout p {
  font-family: "IBM Plex Mono", monospace;
  margin: 0;
}

.callout a {
  border-bottom: 3px solid #fff;
}

.callout a:hover {
  background-color: #fff;
  color: var(--callouctcolor);
}

.site-description {
  margin-bottom: 2.4rem;
  display: flex;
  justify-content: center;
  border: double #ff130e;
  background-image: linear-gradient(
    to right,
    rgb(255 0 16 / 30%),
    rgb(246 149 0 / 53%),
    rgb(255 134 0 / 42%)
  );
}

.site-description p {
  font-weight: 700;
}

.post-tags {
  display: ruby;
}

.tags {
  margin-top: 0.6rem;
}

.tags li::before {
  content: " ⌦ ";
}

.tags a {
  border-bottom: 3px solid var(--maincolor);
}

.tags a:hover {
  color: white;
  background-color: var(--hovercolor);
}

svg {
  max-height: 1.15rem;
}

svg:hover {
  color: white;
  background-color: #000000;
  border-radius: 80%;
}

.soc:hover {
  color: white;
}

.draft-label {
  color: var(--bordercl);
  text-decoration: none;
  padding: 2px 4px;
  border-radius: 4px;
  margin-left: 6px;
  background-color: #f9f2f4;
}

.highlight {
  position: relative;
  -webkit-overflow-scrolling: touch;
}

.highlight pre code[class*="language-"] {
  -webkit-overflow-scrolling: touch;
}

.highlight pre code[class*="language-"]::before {
  background: black;
  border-radius: 0 0 0.25rem 0.25rem;
  color: white;
  font-size: 12px;
  letter-spacing: 0.025rem;
  padding: 0.1rem 0.5rem;
  position: absolute;
  right: 1rem;
  text-align: right;
  text-transform: uppercase;
  top: 0;
}

/* Language badges */
.highlight pre code[class="language-javaScript"]::before,
.highlight pre code[class="language-js"]::before {
  content: "js";
  background: #f7df1e;
  color: black;
}
.highlight pre code[class*="language-yml"]::before,
.highlight pre code[class*="language-yaml"]::before {
  content: "yaml";
  background: #f71e6a;
  color: white;
}
.highlight pre code[class*="language-shell"]::before,
.highlight pre code[class*="language-bash"]::before,
.highlight pre code[class*="language-sh"]::before {
  content: "shell";
  background: green;
  color: white;
}
.highlight pre code[class*="language-json"]::before {
  content: "json";
  background: dodgerblue;
  color: #000000;
}
.highlight pre code[class*="language-python"]::before,
.highlight pre code[class*="language-py"]::before {
  content: "py";
  background: blue;
  color: yellow;
}
.highlight pre code[class*="language-css"]::before {
  content: "css";
  background: cyan;
  color: black;
}
.highlight pre code[class*="language-go"]::before {
  content: "Go";
  background: cyan;
  color: royalblue;
}
.highlight pre code[class*="language-md"]::before {
  content: "Markdown";
  background: royalblue;
  color: whitesmoke;
}

/* Table */
table {
  border-spacing: 0;
  border-collapse: collapse;
}

table th {
  padding: 6px 13px;
  border: 1px solid #dfe2e5;
  font-size: large;
}

table td {
  padding: 6px 13px;
  border: 1px solid #dfe2e5;
}

.datawpis {
  margin-bottom: -0.1rem;
  margin-top: 0.05rem;
  margin-left: 1.3rem;
  font-size: 0.85rem;
}

/* ────────────────────────────────────────
   Videos – centered, responsive, consistent with images
   ──────────────────────────────────────── */

video {
  max-width: 100%;
  width: auto;
  height: auto;
  display: block;
  margin: 2.5rem auto 1.5rem; /* vertical spacing + center */
  border: 2px solid #0e0920;
  border-radius: 5%;
}

/* Override the inline width="640" attribute */
video[width] {
  width: auto !important;
}
