/* ============================================================
   ZECKWORK BLOG — custom.css
   ============================================================ */

/* ============================================================
   1. VARIÁVEIS GLOBAIS
   ============================================================ */
:root {
  --grid-size: 40px;
  --grid-color-dark: rgba(255, 255, 255, 0.07);
  --grid-color-light: rgba(0, 0, 0, 0.07);
}

/* ============================================================
   2. BACKGROUND GRID — padrão ZeckWork
   ============================================================ */
body {
  background-color: #09090b !important;
}

body.light-theme,
html[data-theme="light"] body {
  background-color: #ffffff !important;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;

  background-image:
    linear-gradient(var(--grid-color-dark) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-color-dark) 1px, transparent 1px);
  background-size: var(--grid-size) var(--grid-size);

  -webkit-mask-image: radial-gradient(ellipse at center, transparent 25%, black 80%);
          mask-image: radial-gradient(ellipse at center, transparent 25%, black 80%);
}

body.light-theme::before,
html[data-theme="light"] body::before {
  background-image:
    linear-gradient(var(--grid-color-light) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-color-light) 1px, transparent 1px);
}

/* ============================================================
   3. Z-INDEX — conteúdo acima do grid
   ============================================================ */
.container,
.content,
.index-content {
  position: relative;
  z-index: 1;
}

.portrait,
.index-content {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* ============================================================
   4. LOGO
   ============================================================ */
img.circle {
  border-radius: 0 !important;
  transition: filter 0.3s ease;
  display: block;
  box-sizing: content-box !important;
  margin: 0 auto !important;
}

body.light-theme img.circle,
html[data-theme="light"] img.circle {
  filter: invert(1);
}

/* ============================================================
   5. TAGS — badge estilo terminal
   ============================================================ */
.post__tag,
.tags__list a,
a.tag {
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: lowercase;
  border-radius: 2px !important;
  padding: 0.15em 0.5em !important;
  border: 1px solid currentColor !important;
  opacity: 0.6;
  transition: opacity 0.2s ease;
}

.post__tag:hover,
.tags__list a:hover,
a.tag:hover {
  opacity: 1;
}

/* ============================================================
   6. CONTEÚDO DO POST
   ============================================================ */
.post__content {
  text-align: justify;
}

/* Inline code — badge discreto */
.post__content p code,
.post__content li code {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  padding: 0.1em 0.4em;
}

body.light-theme .post__content p code,
html[data-theme="light"] .post__content p code,
body.light-theme .post__content li code,
html[data-theme="light"] .post__content li code {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.12);
}

/* ============================================================
   7. HEADINGS DO POST — prefixo markdown visível
   ============================================================ */
.post__content h2::before {
  content: "## ";
  opacity: 0.25;
}

.post__content h3::before {
  content: "### ";
  opacity: 0.25;
}

/* ============================================================
   8. CURSOR PISCANDO NA HOME
   ============================================================ */
@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

.index-content h1::after,
.portrait + * h1::after {
  content: "_";
  animation: blink 1.2s steps(1) infinite;
  margin-left: 2px;
  opacity: 0.7;
}

/* ============================================================
   9. SELEÇÃO DE TEXTO — verde terminal
   ============================================================ */
::selection {
  background: rgba(74, 222, 128, 0.2);
  color: inherit;
}

/* ============================================================
   10. SCROLLBAR — 4px discreta
   ============================================================ */
::-webkit-scrollbar {
  width: 4px;
  height: 4px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 2px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

body.light-theme ::-webkit-scrollbar-thumb,
html[data-theme="light"] ::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.15);
}

body.light-theme ::-webkit-scrollbar-thumb:hover,
html[data-theme="light"] ::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.3);
}

/* ============================================================
   11. DIVISORES — dashed estilo terminal
   ============================================================ */
hr {
  border: none;
  border-top: 1px dashed rgba(255, 255, 255, 0.12);
  margin: 2rem 0;
}

body.light-theme hr,
html[data-theme="light"] hr {
  border-top-color: rgba(0, 0, 0, 0.12);
}

/* ============================================================
   12. LINKS DO POST
   ============================================================ */
.post__content a {
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: opacity 0.15s ease;
}

.post__content a:hover {
  opacity: 0.75;
}

/* ============================================================
   13. HEADER
   ============================================================ */
.header__inner {
  height: 40px;
}
