@font-face {
  font-family: 'FiraCode';
  src: url("fonts/FiraCode-Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: 'FiraCode';
  src: url("fonts/FiraCode-Bold.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: 'GohuFontUni';
  src: url("fonts/GohuFontUni-Subset.woff2") format("woff2");
  font-display: swap;
  /* used ONLY in .ascii-art blocks (código ```ascii). Cobre o range inteiro
     do subset — ASCII imprimível + Box Drawing + Block Elements + Braille —
     de propósito, SEM unicode-range: a arte de pixel (troll de braille, texto
     em block elements tipo "SETUP") mistura esses glyphs com espaços e ASCII
     na MESMA linha. Se o espaço/ASCII caísse numa fonte diferente (Fira Code),
     a diferença de largura quebraria o grid coluna-a-coluna. Uma fonte só pra
     tudo mantém o alinhamento. Fira Code continua sendo a fonte dos blocos de
     código normais. Licença: fonts/GOHUFONT-LICENSE.txt (WTFPL) */
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Courier New', ui-monospace, monospace;
  color: #f0f0f0;
  background: #000 url("gatos/wallhaven-4y3jw7.jpg") center center / cover no-repeat fixed;
  min-height: 100vh;
}

.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.4) 40%, rgba(0,0,0,0.6) 100%);
  z-index: 0;
}

main {
  position: relative;
  z-index: 1;
  max-width: 1000px;
  margin: 0 auto;
  padding: 4rem 1.5rem 3rem;
}

main::before {
  content: "";
  position: fixed;
  top: 0;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(1000px, 100%);
  background: rgba(0, 0, 0, 0.5);
  z-index: -1;
}

main a {
  color: #f0f0f0;
  text-decoration: underline;
  text-decoration-color: rgba(255, 159, 67, 0.5);
}

main a:hover {
  color: #ff9f43;
}

/* links dentro do corpo do post: sublinhado pontilhado (mais visível) que
   vira linha contínua + laranja no hover */
.post-body a {
  color: #f0f0f0;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-decoration-color: #ff9f43;
  text-underline-offset: 3px;
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
}

.post-body a:hover,
.post-body a:focus {
  color: #ff9f43;
  text-decoration-style: solid;
  text-decoration-color: #ff9f43;
}

header {
  margin-bottom: 3rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.5rem;
}

.favicon-side {
  width: auto;
  height: 90px;
  flex-shrink: 0;
}

h1 {
  font-size: clamp(2.2rem, 8vw, 3.2rem);
  color: #ff9f43;
  letter-spacing: 0.05em;
}

.tagline {
  margin-top: 0.5rem;
  color: #999;
  font-size: 0.85rem;
}

.intro {
  margin-bottom: 2.2rem;
  line-height: 1.7;
}

.intro p {
  margin-bottom: 1rem;
  color: #999;
  font-size: 0.9rem;
}

.intro p::before {
  content: "// ";
  color: #777;
}

/* assinatura no canto inferior direito, em GohuFont (pixel) */
.brand-corner {
  position: fixed;
  right: 1.4rem;
  bottom: 1.1rem;
  z-index: 2;
  font-family: 'GohuFontUni', ui-monospace, monospace;
  font-size: 1.7rem;
  line-height: 1;
  color: #ff9f43;
  letter-spacing: 0.03em;
  pointer-events: none;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
}

nav {
  margin-top: 1.2rem;
  display: flex;
  flex-direction: row;
  gap: 1.4rem;
  align-items: center;
}

nav a {
  color: #d8d8d8;
  text-decoration: none;
  font-size: 0.95rem;
  padding-bottom: 0.2rem;
  border-bottom: 2px solid transparent;
}

nav a::before {
  content: "~/";
  color: #ff9f43;
}

nav a:hover {
  color: #ff9f43;
}

nav a.active {
  color: #ff9f43;
  border-bottom-color: #ff9f43;
}

.category {
  margin-bottom: 2.2rem;
}

.category h2 {
  font-size: 1.15rem;
  color: #ff9f43;
  margin-bottom: 0.6rem;
  border-bottom: 1px solid rgba(255, 159, 67, 0.35);
  padding-bottom: 0.3rem;
}

.category ul {
  list-style: none;
}

.category li {
  margin-bottom: 0.35rem;
}

.category li::before {
  content: "> ";
  color: #ff9f43;
}

.category a {
  color: #f0f0f0;
  text-decoration: underline;
  text-decoration-color: rgba(255, 159, 67, 0.5);
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s ease, color 0.15s ease, text-decoration-color 0.15s ease;
}

.category a:hover,
.category a:focus {
  color: #ff9f43;
  border-bottom-color: #ff9f43;
  text-decoration-color: #ff9f43;
}

.client-list li {
  margin-bottom: 1rem;
}

.client-desc {
  display: block;
  color: #999;
  font-size: 0.85rem;
  margin-top: 0.15rem;
}

.muted-note {
  color: #999;
  font-size: 0.8rem;
}

footer {
  margin-top: 3rem;
  font-size: 0.85rem;
  color: #999;
}

.posts-list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  flex-wrap: wrap;
}

.posts-list li::before {
  content: none;
}

.post-list-main {
  display: block;
}

.post-list-main::before {
  content: "> ";
  color: #ff9f43;
}

.post-list-author {
  display: block;
  margin-top: 0.15rem;
  margin-left: 1.1rem;
  color: #999;
  font-size: 0.8rem;
}

.post-list-author a::before {
  content: none;
}

.post-date {
  color: #999;
  font-size: 0.85rem;
  white-space: nowrap;
}

.post {
  line-height: 1.7;
}

.post-title {
  color: #ff9f43;
  font-size: 2rem;
  margin-bottom: 0.3rem;
}

.post .post-date {
  display: block;
  margin-bottom: 1.5rem;
}

.post p {
  margin-bottom: 1rem;
}

.post code {
  background: #11120f;
  color: #fff;
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
  font-size: 1.05em;
  font-family: 'FiraCode', 'Courier New', ui-monospace, monospace;
}

/* '# Titulo' no markdown vira <h1> dentro do artigo — sem esta regra ele cairia
   no h1 gigante do site (o "gatoиeт"). Aqui vira um heading de seção normal. */
.post-body h1 {
  color: #ff9f43;
  font-size: 1.55rem;
  letter-spacing: normal;
  margin: 2rem 0 0.8rem;
}

.post-body h2 {
  color: #ff9f43;
  font-size: 1.3rem;
  margin: 1.8rem 0 0.7rem;
}

.post-body h3 {
  color: #ff9f43;
  font-size: 1.05rem;
  margin: 1.5rem 0 0.6rem;
}

.post-body ul,
.post-body ol {
  margin: 0 0 1rem 1.4rem;
}

.post-body li {
  margin-bottom: 0.3rem;
}

.post-body blockquote {
  border-left: 3px solid rgba(255, 159, 67, 0.5);
  padding-left: 1rem;
  color: #ccc;
  margin: 0 0 1rem;
}

.post-body img {
  max-width: 100%;
  border-radius: 4px;
  margin: 0.5rem 0 1rem;
  display: block;
}

.post-body hr {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  margin: 2rem 0;
}

.post-body pre {
  background: rgba(0, 0, 0, 0.55);
  padding: 1rem;
  border-radius: 6px;
  overflow-x: auto;
  margin-bottom: 1.2rem;
  font-size: 0.85rem;
  line-height: 1.5;
  font-family: 'FiraCode', 'Courier New', ui-monospace, monospace;
}

.post-body pre code {
  background: none;
  padding: 0;
  /* o UA stylesheet aplica `code { font-family: monospace }` direto no <code>,
     o que vence a herança do <pre> — sem isto o texto cairia na monospace
     genérica do sistema (quebra a arte e ignora a Fira Code). inherit faz o
     <code> usar a fonte do <pre>: Fira Code nos blocos normais, GohuFont no
     ascii-art. */
  font-family: inherit;
}

.post-body pre.ascii-art {
  /* line-height 1 (sem folga entre linhas) é essencial: block elements e
     braille são desenhados até a borda da célula, então qualquer folga
     vertical abre buracos e desconecta o desenho. */
  line-height: 1;
  background: none;
  /* UMA fonte só pra TODOS os caracteres (inclusive espaço e ASCII). Misturar
     fontes com larguras diferentes é o que quebrava o grid da arte. GohuFont
     cobre ASCII + Box Drawing + Block Elements + Braille no mesmo métrico. */
  font-family: 'GohuFontUni', 'Courier New', ui-monospace, monospace;
  /* ligaduras (|_, __, \_ -> glyphs mesclados) juntariam colunas adjacentes
     e quebrariam a arte por coluna — desligadas aqui */
  font-variant-ligatures: none;
  font-feature-settings: "liga" 0, "calt" 0;
}

.post-body pre code.ascii-inline-code {
  background: #11120f;
  color: #ff9f43;
  padding: 0.05rem 0.3rem;
  border-radius: 3px;
  font-size: inherit;
}

.post-body .highlight {
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 1.2rem;
}

.post-body .highlight pre {
  border-radius: 0;
  margin-bottom: 0;
}

.post-body del {
  color: #999;
}

.post-body input[type="checkbox"] {
  margin-right: 0.4rem;
  accent-color: #ff9f43;
}

.post-body table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.2rem;
  font-size: 0.92rem;
}

.post-body th,
.post-body td {
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 0.5rem 0.7rem;
  text-align: left;
  background: rgba(0, 0, 0, 0.7);
}

.post-body th {
  background: rgba(0, 0, 0, 0.85);
  color: #ff9f43;
}

.post-body tbody tr:nth-child(even) td {
  background: rgba(0, 0, 0, 0.78);
}

.admonition {
  border-left: 4px solid #ff9f43;
  background: rgba(0, 0, 0, 0.7);
  padding: 0.8rem 1rem;
  margin: 0 0 1.2rem;
  border-radius: 4px;
}

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

.admonition-title {
  font-weight: bold;
  margin-bottom: 0.4rem;
}

.admonition-note {
  border-color: #4aa3ff;
}
.admonition-note .admonition-title {
  color: #4aa3ff;
}

.admonition-tip {
  border-color: #3fb950;
}
.admonition-tip .admonition-title {
  color: #3fb950;
}

.admonition-warning {
  border-color: #d29922;
}
.admonition-warning .admonition-title {
  color: #d29922;
}

.admonition-important {
  border-color: #a371f7;
}
.admonition-important .admonition-title {
  color: #a371f7;
}

.admonition-caution {
  border-color: #f85149;
}
.admonition-caution .admonition-title {
  color: #f85149;
}

.btn {
  display: inline-block;
  border: 1px solid #ff9f43;
  color: #ff9f43;
  text-decoration: none;
  padding: 0.6rem 1.3rem;
  border-radius: 4px;
  font-size: 0.95rem;
  font-weight: bold;
  transition: background 0.15s ease, color 0.15s ease;
}

.btn:hover {
  background: #ff9f43;
  color: #111;
}

.register-form {
  display: flex;
  flex-direction: column;
  max-width: 320px;
  gap: 0.3rem;
  margin: 1rem 0;
}

.register-form label {
  color: #999;
  font-size: 0.85rem;
  margin-top: 0.7rem;
}

.register-form input {
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 159, 67, 0.35);
  color: #f0f0f0;
  font-family: inherit;
  font-size: 0.95rem;
  padding: 0.5rem 0.6rem;
  border-radius: 3px;
}

.register-form input:focus {
  outline: none;
  border-color: #ff9f43;
}

.register-form button {
  margin-top: 1.2rem;
  background: transparent;
  border: 1px solid #ff9f43;
  color: #ff9f43;
  font-family: inherit;
  font-size: 0.95rem;
  padding: 0.5rem 1rem;
  border-radius: 3px;
  cursor: pointer;
  align-self: flex-start;
  transition: background 0.15s ease, color 0.15s ease;
}

.register-form button:hover {
  background: #ff9f43;
  color: #111;
}

@media (max-width: 480px) {
  main {
    padding: 2.5rem 1.2rem 2rem;
  }
}
