/* ==========================================================================
   Org-mode HTML export theme
   Cream paper, deep teal ink, olive + indigo accents.
   Fonts: Inter (UI/headings), Source Serif 4 (body), JetBrains Mono (code)

   Usage in your .org file:
     #+OPTIONS: html-style:nil
     #+HTML_HEAD: <link rel="stylesheet" href="org-style.css">
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Merriweather:ital,opsz,wght@0,18..144,300..900;1,18..144,300..900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Public+Sans:wght@300;500;600;800&family=Fira+Code:wght@400&family=STIX+Two+Text:ital,wght@0,400;0,600;1,400;1,600&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;500;600;800&family=JetBrains+Mono:wght@400&family=Source+Serif+4:ital,opsz,wght@0,8..60,400;0,8..60,600;1,8..60,400;1,8..60,600&display=swap');
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@300;400;500;600;700&family=IBM+Plex+Serif:ital,wght@0,400;0,600;1,400;1,600&family=IBM+Plex+Mono:wght@400&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300..800&family=JetBrains+Mono:wght@400..600&family=Literata:ital,opsz,wght@0,7..72,300..800;1,7..72,300..800&display=swap');

/* ---------- Design tokens ---------- */
:root {
  --bg:      #fdf6e3;
  --paper:   #f5ecd2;   /* code blocks, inline code */
  --ink:     #002b36;   /* headings, strong text */
  --body:    #2f4a4f;   /* paragraph text */
  --muted:   #5f7a7a;   /* captions, metadata */
  --rule:    rgba(0, 43, 54, .15);
  --olive:   #566d00;
  --indigo:  #4f54a8;
  --link:    #4f54a8;



  /* Config A */
  /* --sans:  'Inter', Helvetica, Arial, sans-serif; */
  /* --serif: 'Source Serif 4', Georgia, 'Times New Roman', serif; */
  /* --mono:  'JetBrains Mono', Menlo, Consolas, monospace; */

  /* /\* Config B *\/ */
  /* --sans:  'Public Sans', Helvetica, Arial, sans-serif; */
  /* --serif: 'STIX Two Text', Georgia, 'Times New Roman', serif; */
  /* --mono:  'Fira Code', Menlo, Consolas, monospace; */

  /* Config C */
  /* --sans:  'IBM Plex Sans', Helvetica, Arial, sans-serif; */
  /* /\* --serif: 'IBM Plex Serif', Georgia, 'Times New Roman', serif; *\/ */
  /* --serif: 'Literata', Georgia, serif;  */
  /* --mono:  'IBM Plex Mono', Menlo, Consolas, monospace; */

  --serif: 'Merriweather', serif;
  --sans: 'Inter', Helvetica, Arial, sans-serif;
  --mono: 'JetBrains Mono', Menlo, Consolas, monospace;

  /* --measure: 44rem; */     /* ~70 characters per line */

  /* (~80-90 caracteres/linha) */
  --measure: 56rem; /* Excelente para leitura em telas desktop */
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--body);
  font-family: var(--serif);
  font-size: 1.2rem;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

/* Org wraps everything in #content */
#content, .content {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 2.5rem 1.25rem 6rem;
}

@media (min-width: 900px) {
  #content, .content { padding: 3.5rem 0 7rem; }
}

p { margin: 0 0 1.1rem; }

::selection { background: rgba(79, 84, 168, .22); }

.meta-alt-lang {
    color: var(--muted);
    font-style: italic;
    font-size: 0.9rem;
}

/* ---------- Headings ---------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--sans);
  color: var(--ink);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin: 2.6rem 0 .8rem;
}

/* Document title (#+TITLE:) in monospace, like "build_" */
h1.title {
  font-family: var(--mono);
  font-weight: 500;
  letter-spacing: -0.02em;
  font-size: clamp(2.6rem, 7vw, 4.2rem);
  line-height: 1.1;
  margin: 0 0 1.7rem;
}
h1.title::after { content: "_"; }  /* remove this line if you don't want the cursor */

.subtitle {
  font-size: 1.4rem;
  color: var(--ink);
  margin: 0 0 2rem;
}

h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; letter-spacing: -0.01em; }
h4 { font-size: 1.2rem; letter-spacing: 0; }
h5, h6 { font-size: 1rem; letter-spacing: 0; text-transform: uppercase; color: var(--muted); }

/* Org section numbers (e.g. "1.2") */
.section-number-2, .section-number-3, .section-number-4,
.section-number-5, .section-number-6 {
  color: var(--muted);
  font-weight: 400;
  margin-right: .35em;
}

/* Dotted divider under the title block */
h1.title + *,
.subtitle + * { margin-top: 0; }

hr {
  border: 0;
  border-top: 1px dotted var(--ink);
  margin: 2.4rem 0;
}

/* ---------- Links ---------- */
a {
  color: var(--link);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: .18em;
  text-decoration-color: rgba(79, 84, 168, .45);
  transition: text-decoration-color .15s, color .15s;
}
a:hover { color: var(--ink); text-decoration-color: currentColor; }

/* ---------- Inline text ---------- */
strong, b { color: var(--ink); font-weight: 600; }
em, i { font-style: italic; }
del { color: var(--muted); }
sup, sub { line-height: 0; }

code, kbd, samp, tt, .org-code, .org-verbatim {
  font-family: var(--mono);
  font-size: .85em;
  background: var(--paper);
  color: var(--ink);
  padding: .1em .35em;
  border-radius: 2px;
}

kbd {
  border: 1px solid var(--rule);
  border-bottom-width: 2px;
  background: #fff9e8;
}

/* ---------- Lists ---------- */
ul, ol { margin: 0 0 1.2rem; padding-left: 1.5rem; }
li { margin: .3rem 0; }
li > p { margin-bottom: .5rem; }
ul li::marker { color: var(--olive); }
ol li::marker { color: var(--olive); font-family: var(--sans); font-weight: 600; font-size: .85em; }

dl { margin: 0 0 1.2rem; }
dt { font-family: var(--sans); font-weight: 600; color: var(--ink); margin-top: .8rem; }
dd { margin: .2rem 0 .6rem 1.5rem; }

/* Checkbox lists: - [ ] / - [X] */
li.on > code, li.off > code, li.trans > code {
  background: none; padding: 0; font-size: .9em; color: var(--olive);
}

/* ---------- Blockquotes, verse, centered, examples ---------- */
blockquote {
  margin: 1.5rem 0;
  padding: .1rem 0 .1rem 1.25rem;
  border-left: 4px solid var(--olive);
  color: var(--ink);
  font-style: italic;
}
blockquote p:last-child { margin-bottom: 0; }

.verse { margin: 1.5rem 0 1.5rem 1rem; white-space: pre-wrap; font-style: italic; }

/* ---------- Code blocks ---------- */
pre {
  font-family: var(--mono);
  font-size: .88rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 2px;
  padding: 1rem 1.1rem;
  margin: 1.4rem 0;
  overflow-x: auto;
  tab-size: 4;
}
pre code { background: none; padding: 0; font-size: inherit; }

/* Language label (Org adds "src-<lang>" class) */
pre.src { position: relative; padding-top: 1.6rem; }
pre.src::before {
  position: absolute; top: .3rem; right: .6rem;
  font-family: var(--sans);
  font-size: .65rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  background: none;
  border: 0;
  padding: 0;
}
pre.src-python::before     { content: "python"; }
pre.src-emacs-lisp::before { content: "elisp"; }
pre.src-sh::before, pre.src-shell::before, pre.src-bash::before { content: "shell"; }
pre.src-sql::before        { content: "sql"; }
pre.src-julia::before      { content: "julia"; }
pre.src-C::before, pre.src-c::before { content: "c"; }
pre.src-cpp::before        { content: "c++"; }
pre.src-R::before          { content: "r"; }
pre.src-js::before, pre.src-javascript::before { content: "javascript"; }
pre.src-yaml::before       { content: "yaml"; }
pre.src-latex::before      { content: "latex"; }

pre.example, pre.verbatim { background: transparent; border-style: dashed; }

/* #+RESULTS: blocks from org-babel */
.org-src-container { margin: 1.4rem 0; }
pre.example { border-left: 3px solid var(--indigo); border-style: solid; border-width: 0 0 0 3px; background: rgba(79,84,168,.06); }

/* ---------- Syntax highlighting (htmlize with CSS classes) ----------
   In Emacs:  (setq org-html-htmlize-output-type 'css)             */
.org-comment, .org-comment-delimiter { color: #8a9a9a; font-style: italic; }
.org-keyword, .org-preprocessor      { color: var(--olive); font-weight: 500; }
.org-string, .org-doc                { color: #8a5a00; }
.org-constant, .org-builtin          { color: var(--indigo); }
.org-function-name                   { color: #0b5c7a; }
.org-variable-name, .org-type        { color: #a13b5a; }
.org-warning                         { color: #b3261e; }
.org-org-meta-line, .org-org-block-begin-line, .org-org-block-end-line { color: var(--muted); }

/* ---------- Tables ---------- */
table {
  width: 100%;
  margin: 1.6rem 0;
  border-collapse: collapse;
  font-family: var(--sans);
  font-size: .95rem;
  font-variant-numeric: tabular-nums;
  border: 0 !important;
}
caption, .table-caption {
  caption-side: top;
  text-align: left;
  font-family: var(--sans);
  font-size: .85rem;
  color: var(--muted);
  padding-bottom: .5rem;
}
.table-number { font-weight: 600; color: var(--ink); }

th, td { padding: .5rem .8rem .5rem 0; text-align: left; vertical-align: top; }
td.org-right,  th.org-right  { text-align: right; padding-right: 0; padding-left: .8rem; }
td.org-center, th.org-center { text-align: center; }
td.org-left,   th.org-left   { text-align: left; }

thead { border-top: 2px solid var(--ink); border-bottom: 1px solid var(--ink); }
th { font-weight: 600; color: var(--ink); }
tbody tr { border-bottom: 1px solid var(--rule); }
tbody tr:last-child { border-bottom: 2px solid var(--ink); }

/* Wide tables scroll rather than overflow */
@media (max-width: 700px) {
  table { display: block; overflow-x: auto; }
}

/* ---------- Figures & images ---------- */
img { max-width: 100%; height: auto; }
figure, .figure { margin: 1.8rem 0; text-align: center; }
figcaption, .figure p {
  font-family: var(--sans);
  font-size: .85rem;
  color: var(--muted);
  margin-top: .5rem;
}
.figure-number { font-weight: 600; color: var(--ink); }

/* ---------- Math (MathJax / KaTeX) ---------- */
mjx-container { color: var(--ink); }
mjx-container[display="true"] {
  overflow-x: auto;
  overflow-y: hidden;
  padding: .3rem 0;
  margin: 1.1rem 0 !important;
}
.katex { font-size: 1.05em; }
.katex-display { overflow-x: auto; overflow-y: hidden; padding: .3rem 0; }

/* ---------- Table of contents ---------- */
#table-of-contents {
  font-family: var(--sans);
  font-size: .95rem;
  border-top: 1px dotted var(--ink);
  border-bottom: 1px dotted var(--ink);
  padding: 1rem 0 1.1rem;
  margin: 2rem 0 2.5rem;
}
#table-of-contents h2 {
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--muted);
  margin: 0 0 .6rem;
}
#table-of-contents ul { list-style: none; padding-left: 1rem; margin: 0; }
#table-of-contents > div > ul { padding-left: 0; }
#table-of-contents li { margin: .2rem 0; }
#table-of-contents a { text-decoration: none; color: var(--ink); }
#table-of-contents a:hover { color: var(--indigo); text-decoration: underline; }

/* ---------- Org-specific inline elements ---------- */
.todo, .done {
  font-family: var(--mono);
  font-size: .6em;
  font-weight: 400;
  letter-spacing: 0;
  padding: .15em .5em;
  margin-right: .5em;
  border-radius: 2px;
  vertical-align: .15em;
  color: var(--bg);
}
.todo      { background: var(--indigo); }
.done      { background: var(--olive); }
.TODO      { background: var(--indigo); }
.DONE      { background: var(--olive); }
.NEXT, .WAIT, .HOLD { background: #8a5a00; }
.CANCELLED { background: var(--muted); }

.tag { float: right; margin-left: 1rem; }
.tag > span {
  font-family: var(--mono);
  font-size: .65rem;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--olive);
  background: transparent;
  border: 1px solid var(--olive);
  border-radius: 2px;
  padding: .05em .45em;
  margin-left: .3rem;
  text-transform: lowercase;
}

.timestamp, .timestamp-kwd, .timestamp-wrapper {
  font-family: var(--mono);
  font-size: .8rem;
  color: var(--muted);
}
.timestamp-kwd { color: var(--olive); }

.priority { font-family: var(--mono); font-size: .8em; color: var(--indigo); }

.underline { text-decoration: underline; }

/* Author / date / validation lines */
.author, .date, .creator, .validation {
  font-family: var(--sans);
  font-size: .85rem;
  color: var(--muted);
}

/* ---------- Footnotes ---------- */
.footnotes, #footnotes {
  margin-top: 3.5rem;
  padding-top: 1rem;
  border-top: 1px dotted var(--ink);
  font-size: 1rem;
}
.footnotes h2.footnotes, .footnotes .footnotes-title {
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--muted);
  margin: 0 0 .6rem;
}
.footdef { margin-bottom: .6rem; }
.footnum, sup .footref { font-family: var(--sans); font-size: .75em; font-weight: 600; }
.footref { text-decoration: none; }

/* ---------- Header navigation (optional) ----------
   Put this in #+HTML_LINK_UP / preamble. See the snippet in my reply. */
.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
  padding-left: 1.25rem;
  margin-bottom: 1rem;
}
.site-logo {
  font-family: var(--sans);
  font-weight: 300;
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  letter-spacing: -0.045em;
  line-height: 1;
  color: var(--ink);
  text-decoration: none;
  margin-top: 1.6rem;
}
.site-logo strong { font-weight: 800; color: inherit; }
.site-logo:hover { color: var(--ink); }

.site-nav { display: flex; gap: 2px; }
.site-nav a {
  display: flex;
  align-items: flex-end;
  height: 90px;
  min-width: 0;
  padding: 0 .9rem .7rem;
  color: var(--bg);
  text-decoration: none;
  font-family: var(--sans);
  font-size: 1.1rem;
  background: var(--olive);
}
.site-nav a:hover { color: #fff; filter: brightness(1.12); }
.site-nav a.think { font-family: var(--serif); font-style: italic; }
.site-nav a.build { font-family: var(--mono); background: var(--ink); }
.site-nav a.cta   { font-weight: 600; background: var(--indigo); font-size: 1rem; }
.site-nav .gap    { width: 0; }

@media (min-width: 800px) {
  .site-header { padding-left: 3.2rem; }
  .site-nav a  { height: 150px; min-width: 130px; padding: 0 1.5rem 1rem; font-size: 1.5rem; }
  .site-nav a.cta { font-size: 1.3rem; }
  .site-nav .gap { width: 35px; }
}

/* ---------- Postamble ---------- */
#postamble, .status {
  /* margin-top: 4rem; */
  padding-top: 1rem;
  border-top: 1px dotted var(--ink);
  font-family: var(--sans);
  font-size: .8rem;
  color: var(--muted);
}
#postamble p { margin: .15rem 0; }

/* ---------- Accessibility & print ---------- */
:focus-visible { outline: 2px solid var(--indigo); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

@media print {
  body { background: #fff; color: #000; font-size: 11pt; }
  #content { max-width: none; padding: 0; }
  a { color: inherit; text-decoration: none; }
  pre { background: #fff; border-color: #999; page-break-inside: avoid; }
  .site-header, #table-of-contents { display: none; }
}


/****************************************************/
/* ---------- Header navigation (discreet) ---------- */
.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: .5rem 2rem;
  max-width: var(--measure);
  margin: 0 auto;
  padding: 1.25rem 1.25rem .9rem;
  border-bottom: 1px solid var(--rule);
  background: none;
}

.site-logo {
  font-family: var(--sans);
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
}
.site-logo:hover { color: var(--ink); opacity: .7; }

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.4rem;
  height: auto;
  background: none;
}
.site-nav a {
  display: inline;
  height: auto;
  min-width: 0;
  padding: .15rem 0;
  background: none;
  font-family: var(--sans);
  font-size: .9rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color .15s, border-color .15s;
}
.site-nav a:hover { color: var(--ink); border-bottom-color: var(--ink); filter: none; }
.site-nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--ink); }

@media (min-width: 900px) {
  .site-header { padding-left: 0; padding-right: 0; }
}

/* ---------- Indigo color scheme ---------- */
:root {
  --bg:     #fbfbff;
  --paper:  #eef0fb;
  --ink:    #1b2564;
  --body:   #232a4d;
  --muted:  #5a638a;
  --rule:   rgba(43, 74, 158, .18);
  --link:   #2f4aa8;
  --accent: #5670d4;
  --violet: #7a5fd0;

  /* the old names still used in the file now point to the new palette */
  --olive:  var(--accent);
  --indigo: var(--link);
}

::selection { background: rgba(86, 112, 212, .25); }

a { text-decoration-color: rgba(47, 74, 168, .4); }
a:hover { color: var(--ink); }

hr, h1.title + *, #table-of-contents, .footnotes { border-color: var(--ink); }

kbd { background: #fff; }
pre.example { background: rgba(86, 112, 212, .07); border-left-color: var(--accent); }

.site-lang:hover { color: var(--violet); border-color: var(--violet); }
.site-nav a:hover,
.site-nav a[aria-current="page"] { border-bottom-color: var(--accent); }

/* Syntax highlighting in the same family of hues */
.org-keyword, .org-preprocessor { color: #4b3fb0; }
.org-string, .org-doc           { color: #a2461f; }
.org-constant, .org-builtin     { color: #2f4aa8; }
.org-function-name              { color: #0b6a8f; }
.org-variable-name, .org-type   { color: #8e3a9a; }
.org-comment, .org-comment-delimiter { color: #7a84a8; }

/* Estilos para o RodapÃ© */
footer {
  /* margin-top: 0rem; */
    /* padding: 2rem 1rem; */
    padding-left: 1rem;
    padding-right: 1rem;
  font-size: 0.85rem;
  color: #555; /* Tom de cinza suave, combinando com o restante do texto */
}

/* Linha divisÃ³ria sutil */
footer hr {
  border: none;
  border-top: 1px dotted #ccc;
  margin-bottom: 1.5rem;
}

/* Container flexÃ­vel para alinhar os elementos lado a lado em telas maiores */
.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

/* Lista de links sociais em linha */
.social-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 1.5rem;
}

/* EstilizaÃ§Ã£o dos links */
footer a {
  color: #333;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

footer a:hover {
  opacity: 0.7;
  text-decoration: underline;
}

/* InformaÃ§Ãµes tÃ©cnicas (Emacs) com visual discreto */
.tech-info {
  font-family: monospace;
  font-size: 0.8rem;
  color: #777;
}

/* Responsividade para telas maiores (Desktop) */
@media (min-width: 768px) {
  .footer-content {
    flex-direction: row;
    text-align: left;
  }
}

/* ConfiguraÃ§Ãµes especÃ­ficas da imagem "Quantum Cat" na pÃ¡gina inicial */
#img-quantum-cat {
  width: 40%;
}

/* Responsividade para telas menores (smartphones) */
@media (max-width: 768px) {
  #img-quantum-cat {
      width: 70%;
  }
}

/* ConfiguraÃ§Ãµes especÃ­ficas para os metadados de artigos (Blog Posts) */
.article-metadata {
    font-family: monospace;
    font-size: 0.85rem;
    color: #777;
}
.article-metadata > ul {
    list-style-type: none;
    padding: 0
}

