@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,wght@0,300;0,400;0,500;1,400&display=swap');

/* ── tokens ───────────────────────────────────────────────────────────────── */
:root {
  --mono: 'JetBrains Mono', monospace;
  --sans: 'JetBrains Mono', monospace;
  --bg: #0d0d0f; --bg2: #111114; --bg3: #18181c;
  --border: #1f1f24; --border2: #2a2a31;
  --fg: #e8e8ec; --fg2: #9898a6; --fg3: #55555f;
  --accent: #2563eb; --accent-dim: rgba(37,99,235,.10); --accent-fg: #93b4fd;
  --green: #22c55e;  --green-dim: rgba(34,197,94,.10);
  --yellow: #eab308; --yellow-dim: rgba(234,179,8,.10);
  --purple: #8b5cf6; --purple-dim: rgba(139,92,246,.10);
  --red: #ef4444;    --red-dim: rgba(239,68,68,.10);
  --max-w: 860px; --radius: 3px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; scroll-behavior: smooth; }
body { font-family: var(--sans); background: var(--bg); color: var(--fg); line-height: 1.6; min-height: 100vh; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* coluna central — resolve inconsistência de cor em ultrawides */
main {
  min-height: calc(100vh - 48px - 52px);
  max-width: var(--max-w);
  margin: 0 auto;
  border-left: .5px solid var(--border);
  border-right: .5px solid var(--border);
}
button, input, select, textarea { font: inherit; color: inherit; background: none; border: none; outline: none; }

/* ── layout ─────────────────────────────────────────────────────────────── */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 1.5rem; }

/* ── nav ────────────────────────────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 100; background: var(--bg);
  border-bottom: 0.5px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 1.5rem; height: 48px;
}
.nav-brand { font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: .05em; }
.nav-brand .accent { color: var(--accent-fg); }
.nav-links { display: flex; gap: 1.5rem; }
.nav-links a {
  font-family: var(--mono); font-size: 11px; letter-spacing: .06em;
  text-transform: lowercase; color: var(--fg3); transition: color .15s;
}
.nav-links a:hover, .nav-links a.active { color: var(--fg); }
.nav-status { display: flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 11px; color: var(--fg3); }
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 6px var(--green); }

/* ── hero ───────────────────────────────────────────────────────────────── */
.hero { padding: 3.5rem 1.5rem 2.5rem; border-bottom: .5px solid var(--border); background: var(--bg); }
.hero-meta { font-family: var(--mono); font-size: 11px; color: var(--fg3); letter-spacing: .04em; margin-bottom: 1.2rem; }
.hero-name { font-size: clamp(2rem,5vw,2.8rem); font-weight: 300; letter-spacing: -.025em; line-height: 1.1; margin-bottom: .5rem; }
.hero-name strong { font-weight: 500; }
.hero-role { font-family: var(--mono); font-size: 13px; color: var(--accent-fg); margin-bottom: 1.5rem; }
.hero-bio { font-size: 15px; color: var(--fg2); max-width: 520px; line-height: 1.75; margin-bottom: 2rem; }

.links-row { display: flex; flex-wrap: wrap; gap: .6rem; }
.link-pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--mono); font-size: 11px; letter-spacing: .04em;
  padding: 6px 12px; border: .5px solid var(--border2); border-radius: var(--radius);
  color: var(--fg2); cursor: pointer; transition: border-color .15s, color .15s;
}
.link-pill:hover { color: var(--fg); border-color: var(--fg3); }

/* ── section ────────────────────────────────────────────────────────────── */
.section { padding: 1.75rem 1.5rem; border-bottom: .5px solid var(--border); background: var(--bg); }
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.25rem; }
.section-label { font-family: var(--mono); font-size: 10px; color: var(--fg3); letter-spacing: .1em; text-transform: uppercase; }
.section-link { font-family: var(--mono); font-size: 11px; color: var(--fg3); display: flex; align-items: center; gap: 4px; transition: color .15s; }
.section-link:hover { color: var(--fg2); }

/* ── stacks ─────────────────────────────────────────────────────────────── */
.stack-row { display: flex; flex-wrap: wrap; gap: 6px; }
.stack-tag {
  font-family: var(--mono); font-size: 11px; padding: 3px 8px;
  border: .5px solid var(--border); border-radius: var(--radius); color: var(--fg2);
}
.stack-tag.primary { border-color: var(--accent); color: var(--accent-fg); background: var(--accent-dim); }

/* ── project card ───────────────────────────────────────────────────────── */
.project-list { display: flex; flex-direction: column; }
.project-card {
  display: grid; grid-template-columns: 1fr auto; gap: 0 1rem; align-items: start;
  padding: 1.1rem 0; border-bottom: .5px solid var(--border); cursor: pointer;
}
.project-card:last-child { border-bottom: none; }
.project-card:hover .project-title { color: var(--accent-fg); }
.project-num { font-family: var(--mono); font-size: 10px; color: var(--fg3); margin-bottom: 3px; }
.project-title { font-size: 15px; font-weight: 500; color: var(--fg); margin-bottom: 4px; transition: color .15s; }
.project-desc { font-size: 13px; color: var(--fg2); line-height: 1.55; margin-bottom: 8px; }
.project-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.ptag { font-family: var(--mono); font-size: 10px; padding: 2px 6px; background: var(--bg3); border-radius: 2px; color: var(--fg3); }
.project-meta { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.project-version { font-family: var(--mono); font-size: 11px; color: var(--fg3); }

/* ── badges ─────────────────────────────────────────────────────────────── */
.badge { font-family: var(--mono); font-size: 10px; padding: 2px 7px; border-radius: 2px; display: inline-block; }
.status-active    { background: var(--green-dim);  color: var(--green); }
.status-wip       { background: var(--yellow-dim); color: var(--yellow); }
.status-archived  { background: var(--bg3);        color: var(--fg3); }
.status-completed { background: var(--accent-dim); color: var(--accent-fg); }
.kind-feat     { background: var(--accent-dim);  color: var(--accent-fg); }
.kind-fix      { background: var(--yellow-dim);  color: var(--yellow); }
.kind-refactor { background: var(--purple-dim);  color: var(--purple); }
.kind-perf     { background: var(--green-dim);   color: var(--green); }
.kind-docs     { background: var(--bg3);         color: var(--fg2); }
.kind-chore    { background: var(--bg3);         color: var(--fg3); }

/* ── devlog feed ────────────────────────────────────────────────────────── */
.log-list { display: flex; flex-direction: column; }
.log-entry { display: grid; grid-template-columns: 90px 1fr; gap: 0 1rem; padding: .75rem 0; border-bottom: .5px solid var(--border); }
.log-entry:last-child { border-bottom: none; }
.log-date { font-family: var(--mono); font-size: 11px; color: var(--fg3); padding-top: 2px; }
.log-project { font-family: var(--mono); font-size: 10px; color: var(--accent-fg); margin-bottom: 2px; }
.log-msg { font-size: 13px; color: var(--fg); margin-bottom: 4px; }
.log-tags { display: flex; gap: 4px; }

/* ── page header ────────────────────────────────────────────────────────── */
.page-header { padding: 2.5rem 1.5rem 2rem; border-bottom: .5px solid var(--border); background: var(--bg); }
.page-title { font-size: 1.5rem; font-weight: 300; margin-bottom: .35rem; letter-spacing: -.015em; }
.page-title--post { font-size: 1.75rem; font-weight: 500; }
.page-subtitle { font-size: 14px; color: var(--fg2); line-height: 1.65; margin-top: .5rem; }

/* ── project detail ─────────────────────────────────────────────────────── */
.project-detail-header { padding: 2.5rem 1.5rem 1.5rem; border-bottom: .5px solid var(--border); background: var(--bg2); }
.project-detail-meta { font-family: var(--mono); font-size: 11px; color: var(--fg3); display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; flex-wrap: wrap; }
.project-detail-title { font-size: 2rem; font-weight: 500; margin-bottom: .75rem; }
.project-detail-desc { font-size: 15px; color: var(--fg2); max-width: 600px; line-height: 1.75; }
.project-links { display: flex; gap: .6rem; margin-top: 1.25rem; }
.project-link-btn {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--mono); font-size: 11px; padding: 6px 14px;
  border: .5px solid var(--border2); border-radius: var(--radius);
  color: var(--fg2); transition: all .15s; cursor: pointer;
}
.project-link-btn:hover { color: var(--fg); border-color: var(--fg3); }
.project-link-btn.primary { border-color: var(--accent); color: var(--accent-fg); background: var(--accent-dim); }
.project-content { padding: 2rem 1.5rem; }

/* ── timeline ───────────────────────────────────────────────────────────── */
.timeline { display: flex; flex-direction: column; }
.timeline-entry { display: grid; grid-template-columns: 100px 1fr; gap: 0 1.5rem; padding: 1rem 0; border-bottom: .5px solid var(--border); }
.timeline-entry:last-child { border-bottom: none; }
.timeline-version { font-family: var(--mono); font-size: 11px; color: var(--accent-fg); margin-bottom: 3px; }
.timeline-date { font-family: var(--mono); font-size: 10px; color: var(--fg3); }
.timeline-title { font-size: 14px; font-weight: 500; margin-bottom: 4px; }
.timeline-content { font-size: 13px; color: var(--fg2); line-height: 1.6; }

/* ── blog ───────────────────────────────────────────────────────────────── */
.post-list { display: flex; flex-direction: column; }
.post-item { padding: 1.1rem 0; border-bottom: .5px solid var(--border); display: grid; grid-template-columns: 1fr auto; gap: 0 1rem; align-items: start; }
.post-item:last-child { border-bottom: none; }
.post-item:hover .post-title { color: var(--accent-fg); }
.post-title { font-size: 15px; font-weight: 500; margin-bottom: 4px; transition: color .15s; }
.post-summary { font-size: 13px; color: var(--fg2); line-height: 1.55; margin-bottom: 6px; }
.post-date { font-family: var(--mono); font-size: 11px; color: var(--fg3); white-space: nowrap; }

/* ── post body (markdown) ───────────────────────────────────────────────── */
.post-body { padding: 2rem 1.5rem; font-size: 15px; line-height: 1.8; color: var(--fg2); }
.post-body--bare { padding: 0; background: none; }
.post-body h1,.post-body h2,.post-body h3 { color: var(--fg); font-weight: 500; margin: 2rem 0 .75rem; line-height: 1.3; }
.post-body h2 { font-size: 1.25rem; }
.post-body h3 { font-size: 1.05rem; }
.post-body p  { margin-bottom: 1rem; }
.post-body a  { color: var(--accent-fg); border-bottom: .5px solid var(--accent); }
.post-body code { font-family: var(--mono); font-size: 13px; background: var(--bg3); padding: 2px 6px; border-radius: 2px; color: var(--fg); }
.post-body pre { background: var(--bg3); border: .5px solid var(--border); border-radius: var(--radius); padding: 1.25rem; overflow-x: auto; margin: 1.25rem 0; }
.post-body pre code { background: none; padding: 0; }
.post-body blockquote { border-left: 2px solid var(--border2); padding-left: 1rem; color: var(--fg3); margin: 1rem 0; }
.post-body ul,.post-body ol { padding-left: 1.5rem; margin-bottom: 1rem; }
.post-body li { margin-bottom: .3rem; }

/* ── filters HTMX ───────────────────────────────────────────────────────── */
.filter-row { display: flex; flex-wrap: wrap; gap: 6px; padding: 1rem 1.5rem; border-bottom: .5px solid var(--border); background: var(--bg); }
.filter-btn { display: inline-block; font-family: var(--mono); font-size: 11px; padding: 4px 10px; border: .5px solid var(--border); border-radius: var(--radius); color: var(--fg3); cursor: pointer; transition: all .15s; text-decoration: none; background: none; }
.filter-btn:hover, .filter-btn.active { border-color: var(--accent-fg); color: var(--accent-fg); background: var(--accent-dim); }
.htmx-indicator { display: none; }
.htmx-request .htmx-indicator { display: inline; }

/* ── footer ─────────────────────────────────────────────────────────────── */
.footer { padding: 1.25rem 1.5rem; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .5rem; font-family: var(--mono); font-size: 10px; color: var(--fg3); background: var(--bg); border-top: .5px solid var(--border); }

/* ════════════════════════════════════════════════════════════════════════════
   ADMIN
   ════════════════════════════════════════════════════════════════════════════ */
.admin-layout { display: grid; grid-template-columns: 200px 1fr; min-height: 100vh; }
.admin-sidebar { background: var(--bg2); border-right: .5px solid var(--border); padding: 1.5rem 0; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.sidebar-brand { font-family: var(--mono); font-size: 12px; font-weight: 500; padding: 0 1.25rem 1.25rem; border-bottom: .5px solid var(--border); margin-bottom: 0; color: var(--fg2); }
.sidebar-brand span { color: var(--accent-fg); }
.sidebar-nav { display: flex; flex-direction: column; padding-bottom: 1rem; }
.sidebar-group { border-bottom: .5px solid var(--border); padding: .5rem 0; }
.sidebar-group:last-child { border-bottom: none; }
.sidebar-section {
  display: block;
  font-family: var(--mono); font-size: 9px;
  color: var(--fg3); letter-spacing: .12em; text-transform: uppercase;
  padding: .65rem 1.25rem .35rem;
}
.sidebar-link { display: flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 11px; color: var(--fg2); padding: .45rem 1.25rem; transition: color .15s, background .15s; }
.sidebar-link:hover { color: var(--fg); background: var(--bg3); }
.sidebar-link.active { color: var(--fg); background: var(--bg3); border-left: 2px solid var(--accent); }
.admin-main { overflow-y: auto; background: var(--bg2); }
.admin-topbar { display: flex; align-items: center; justify-content: space-between; padding: 0 1.5rem; height: 48px; border-bottom: .5px solid var(--border); font-family: var(--mono); font-size: 12px; background: var(--bg2); position: sticky; top: 0; z-index: 10; }
.admin-topbar-title { color: var(--fg2); }
.admin-topbar-user { color: var(--fg3); display: flex; align-items: center; gap: 1rem; }
.admin-content { padding: 2rem 1.5rem; max-width: 900px; margin: 0 auto; }

.admin-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.admin-table th { font-family: var(--mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--fg3); padding: .6rem .75rem; text-align: left; border-bottom: .5px solid var(--border); }
.admin-table td { padding: .7rem .75rem; border-bottom: .5px solid var(--border); vertical-align: middle; color: var(--fg2); }
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: var(--bg3); }

.form-group { margin-bottom: 1.25rem; }
.form-label { display: block; font-family: var(--mono); font-size: 11px; color: var(--fg3); letter-spacing: .05em; margin-bottom: 6px; }
.form-input, .form-select, .form-textarea { width: 100%; padding: 8px 12px; background: var(--bg3); border: .5px solid var(--border2); border-radius: var(--radius); color: var(--fg); font-size: 14px; transition: border-color .15s; }
.form-select { appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2355555f' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; padding-right: 30px; }
.form-input:focus, .form-select:focus, .form-textarea:focus { border-color: var(--accent); outline: none; }
.form-textarea { resize: vertical; min-height: 180px; font-family: var(--mono); font-size: 13px; }
.form-hint { font-family: var(--mono); font-size: 11px; color: var(--fg3); margin-top: 4px; }
.form-check { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.form-check input[type="checkbox"] { width: 14px; height: 14px; accent-color: var(--accent); }

.btn { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 12px; padding: 7px 16px; border-radius: var(--radius); cursor: pointer; transition: all .15s; }
.btn-primary { background: var(--accent); color: #fff; border: .5px solid var(--accent); }
.btn-primary:hover { background: #1d4ed8; }
.btn-ghost { border: .5px solid var(--border2); color: var(--fg2); }
.btn-ghost:hover { border-color: var(--fg3); color: var(--fg); }
.btn-danger { border: .5px solid var(--red-dim); color: var(--red); }
.btn-danger:hover { background: var(--red-dim); }
.btn-sm { padding: 4px 10px; font-size: 11px; }

.stat-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 1rem; margin-bottom: 2rem; }
.stat-card { background: var(--bg3); border: .5px solid var(--border); border-radius: var(--radius); padding: 1rem; }
.stat-value { font-size: 1.75rem; font-weight: 300; color: var(--fg); }
.stat-label { font-family: var(--mono); font-size: 10px; color: var(--fg3); margin-top: 2px; }

.alert { padding: 10px 14px; border-radius: var(--radius); margin-bottom: 1rem; font-size: 13px; font-family: var(--mono); }
.alert-error { background: var(--red-dim); color: var(--red); border: .5px solid var(--red); }
.alert-success { background: var(--green-dim); color: var(--green); border: .5px solid var(--green); }

.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; }
.login-card { width: 100%; max-width: 380px; padding: 2.5rem; background: var(--bg2); border: .5px solid var(--border); border-radius: var(--radius); }
.login-title { font-family: var(--mono); font-size: 13px; color: var(--fg2); margin-bottom: .5rem; }
.login-brand { font-size: 1.5rem; font-weight: 300; margin-bottom: 2rem; }
.login-brand span { color: var(--accent-fg); }

.multi-check { display: flex; flex-wrap: wrap; gap: 6px; }
.check-pill { display: flex; align-items: center; gap: 5px; font-family: var(--mono); font-size: 11px; padding: 4px 10px; border: .5px solid var(--border); border-radius: var(--radius); cursor: pointer; transition: all .15s; color: var(--fg3); user-select: none; }
.check-pill input[type="checkbox"] { display: none; }
.check-pill.checked { border-color: var(--accent-fg); color: var(--accent-fg); background: var(--accent-dim); }

/* ── hamburger ──────────────────────────────────────────────────────────── */
.nav-hamburger {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 6px;
  cursor: pointer;
  background: none;
  border: none;
}

/* ── mobile menu ────────────────────────────────────────────────────────── */
.mobile-menu {
  display: none;
  flex-direction: column;
  background: var(--bg2);
  border-bottom: .5px solid var(--border);
  padding: .5rem 0;
  position: sticky;
  top: 48px;
  z-index: 99;
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--fg2);
  padding: .75rem 1.5rem;
  border-bottom: .5px solid var(--border);
  transition: color .15s, background .15s;
}
.mobile-menu a:last-of-type { border-bottom: none; }
.mobile-menu a:hover { color: var(--fg); background: var(--bg3); }
.mobile-menu-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--fg3);
  padding: .75rem 1.5rem;
}

/* ── responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 700px) {
  /* nav */
  .nav-links  { display: none; }
  .nav-status { display: none; }
  .nav-hamburger { display: flex; }

  /* admin layout */
  .admin-layout { grid-template-columns: 1fr; }
  .admin-sidebar { display: none; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }

  /* log / project cards */
  .log-entry     { grid-template-columns: 1fr; gap: 4px; }
  .project-card  { grid-template-columns: 1fr; }
  .project-meta  { flex-direction: row; margin-top: 8px; }
  .post-item     { grid-template-columns: 1fr; gap: 4px; }
  .post-date     { margin-top: 2px; }

  /* timeline */
  .timeline-entry { grid-template-columns: 1fr; gap: 2px; }
  .timeline-date  { margin-bottom: 4px; }

  /* hero */
  .hero { padding: 2rem 1.25rem 1.75rem; }
  .hero-name { font-size: clamp(1.75rem, 8vw, 2.4rem); }

  /* sections / headers */
  .section            { padding: 1.25rem 1.25rem; }
  .page-header        { padding: 1.75rem 1.25rem 1.5rem; }
  .project-detail-header { padding: 1.75rem 1.25rem 1.25rem; }
  .project-content    { padding: 1.5rem 1.25rem; }
  .post-body          { padding: 1.5rem 1.25rem; }
  .admin-content      { padding: 1.25rem 1rem; }

  /* project detail links — stack vertically */
  .project-links { flex-wrap: wrap; }

  /* forms */
  .form-grid-2 { grid-template-columns: 1fr; }
  .inline-form { flex-wrap: wrap; }

  /* docs */
  .docs-grid-2 { grid-template-columns: 1fr; }

  /* footer */
  .footer { flex-direction: column; align-items: flex-start; gap: .35rem; padding: 1rem 1.25rem; }

  /* login card — remove fixed width, add padding */
  .login-card { padding: 2rem 1.25rem; }
}

/* ── utilitários admin ──────────────────────────────────────────────────── */
.admin-page-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 1.5rem;
}
.admin-page-title { font-size: 1rem; font-weight: 500; color: var(--fg); }
.admin-page-sub   { font-family: var(--mono); font-size: 12px; color: var(--fg3); margin-top: .25rem; }

.admin-card {
  background: var(--bg3);
  border: .5px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.action-row  { display: flex; gap: .4rem; flex-wrap: wrap; }
.inline-form { display: flex; gap: .5rem; align-items: center; }

.fw-500   { font-weight: 500; }
.mono-sm  { font-family: var(--mono); font-size: 12px; }
.mono-dim { font-family: var(--mono); font-size: 11px; color: var(--fg3); }

.empty-state {
  color: var(--fg3); font-family: var(--mono); font-size: 13px; padding: 1rem 0;
}

/* ── utilitários públicos ───────────────────────────────────────────────── */
.log-project a { color: var(--accent-fg); }
.log-body { font-size: 13px; color: var(--fg2); margin-top: 3px; line-height: 1.55; }

/* ── youtube embed ──────────────────────────────────────────────────────── */
.yt-embed {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  margin: 1.5rem 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: .5px solid var(--border);
}
.yt-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* ── autocomplete ───────────────────────────────────────────────────────── */
.ac-dropdown {
  position: absolute;
  z-index: 1000;
  background: var(--bg2);
  border: .5px solid var(--border2);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(0,0,0,.4);
  max-height: 220px;
  overflow-y: auto;
}
.ac-option {
  font-family: var(--mono);
  font-size: 12px;
  padding: 8px 12px;
  color: var(--fg2);
  cursor: pointer;
  border-bottom: .5px solid var(--border);
  transition: background .1s, color .1s;
}
.ac-option:last-child { border-bottom: none; }
.ac-option:hover,
.ac-option.ac-selected { background: var(--bg3); color: var(--fg); }

/* ── docs page ──────────────────────────────────────────────────────────── */
.docs-nav {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: .5px solid var(--border);
}
.docs-nav a {
  font-family: var(--mono);
  font-size: 11px;
  padding: 4px 10px;
  border: .5px solid var(--border);
  border-radius: var(--radius);
  color: var(--fg3);
  transition: all .15s;
}
.docs-nav a:hover { color: var(--fg); border-color: var(--border2); }

.docs-section { margin-bottom: 2.5rem; }
.docs-section-title {
  font-size: .9rem;
  font-weight: 500;
  color: var(--fg);
  margin-bottom: .4rem;
  padding-bottom: .6rem;
  border-bottom: .5px solid var(--border);
}
.docs-desc { font-size: 13px; color: var(--fg2); margin-bottom: 1rem; line-height: 1.6; }

.docs-card {
  background: var(--bg3);
  border: .5px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  margin-bottom: .75rem;
}
.docs-card-header {
  display: flex;
  align-items: center;
  gap: .6rem;
  margin-bottom: .75rem;
}
.docs-card-desc { font-size: 13px; color: var(--fg2); margin-bottom: .75rem; }

.docs-tag {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--accent-fg);
  background: var(--accent-dim);
  padding: 2px 8px;
  border-radius: 2px;
}
.docs-badge {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--fg3);
  border: .5px solid var(--border);
  padding: 2px 6px;
  border-radius: 2px;
}

.docs-example { margin-top: .75rem; }
.docs-example-label {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--fg3);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: .35rem;
}
.docs-pre {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--fg2);
  background: var(--bg);
  border: .5px solid var(--border);
  border-radius: var(--radius);
  padding: .75rem 1rem;
  overflow-x: auto;
  white-space: pre;
  line-height: 1.6;
}
.docs-pre strong { color: var(--accent-fg); font-weight: 500; }
.docs-note {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--fg3);
  margin-top: .6rem;
  padding-left: .75rem;
  border-left: 2px solid var(--border2);
}
.docs-code {
  font-family: var(--mono);
  font-size: 12px;
  background: var(--bg);
  padding: 1px 5px;
  border-radius: 2px;
  color: var(--fg2);
}

.docs-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .75rem;
}

/* ── upload widget ──────────────────────────────────────────────────────────── */
.upload-panel {
  border: .5px solid var(--border);
  border-radius: 4px;
  background: var(--bg2);
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow: hidden;
}
.up-header {
  display: flex;
  align-items: baseline;
  gap: .75rem;
  padding: .6rem .875rem;
  border-bottom: .5px solid var(--border);
}
.up-title {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--fg);
  text-transform: uppercase;
  letter-spacing: .06em;
}
.up-hint {
  font-size: 11px;
  color: var(--fg3);
}
.up-dropzone {
  display: block;
  margin: .75rem;
  border: 1px dashed var(--border);
  border-radius: 3px;
  cursor: pointer;
  transition: border-color .15s, background .15s;
  position: relative;
  overflow: hidden;
}
.up-dropzone:hover,
.up-dropzone.up-drag {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 6%, transparent);
}
.up-drop-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.25rem .75rem;
  gap: .3rem;
}
.up-drop-icon {
  font-size: 1.25rem;
  color: var(--fg3);
  line-height: 1;
}
.up-drop-text {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--fg2);
}
.up-drop-sub {
  font-size: 11px;
  color: var(--fg3);
}
.up-progress {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  background: var(--border);
}
.up-progress-bar {
  height: 100%;
  background: var(--accent);
  transition: width .1s linear;
}
.up-error {
  margin: 0 .75rem .5rem;
  font-size: 12px;
  color: #e05c5c;
  font-family: var(--mono);
}
.up-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: .5rem;
  padding: 0 .75rem .75rem;
  max-height: 320px;
  overflow-y: auto;
}
.up-item {
  position: relative;
  border-radius: 3px;
  overflow: hidden;
  border: .5px solid var(--border);
  aspect-ratio: 1;
  background: var(--bg);
}
.up-item:hover .up-item-actions { opacity: 1; }
.up-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.up-item-actions {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.7);
  opacity: 0;
  transition: opacity .15s;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  gap: 4px;
  padding: 6px;
}
.up-btn {
  font-family: var(--mono);
  font-size: 10px;
  padding: 3px 6px;
  border: .5px solid rgba(255,255,255,.25);
  border-radius: 2px;
  background: rgba(255,255,255,.15);
  color: #fff;
  cursor: pointer;
  text-align: center;
  transition: background .1s;
}
.up-btn:hover     { background: rgba(255,255,255,.3); }
.up-btn-del       { border-color: rgba(220,80,80,.5); color: #f08080; }
.up-btn-del:hover { background: rgba(220,80,80,.35); }

/* form layout with upload panel */
.form-with-upload {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 1.25rem;
  align-items: start;
}
.form-with-upload .form-main  { min-width: 0; }
.form-with-upload .form-aside { position: sticky; top: 1rem; }

@media (max-width: 900px) {
  .form-with-upload { grid-template-columns: 1fr; }
  .form-with-upload .form-aside { position: static; }
}

/* ── autosave banner ─────────────────────────────────────────────────────── */
.autosave-banner {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .5rem .875rem;
  margin-bottom: .5rem;
  background: var(--bg3);
  border: .5px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--mono);
  font-size: 12px;
  color: var(--fg2);
}
.autosave-banner button {
  font-family: var(--mono);
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 2px;
  border: .5px solid var(--border);
  background: none;
  color: var(--fg2);
  cursor: pointer;
  transition: all .15s;
}
.autosave-banner button:hover { color: var(--fg); border-color: var(--fg3); }
.autosave-banner #as-restore { border-color: var(--accent); color: var(--accent-fg); }
.autosave-banner #as-restore:hover { background: var(--accent-dim); }

/* ── rich editor (we = wysiwyg editor) ─────────────────────────────────────── */
.we-wrap {
  border: .5px solid var(--border2);
  border-radius: var(--radius);
  background: var(--bg3);
  overflow: hidden;
}
.we-wrap:focus-within {
  border-color: var(--accent);
}

.we-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  padding: 6px 8px;
  border-bottom: .5px solid var(--border2);
  background: var(--bg2);
  align-items: center;
}

.we-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 26px;
  padding: 0 5px;
  border: .5px solid transparent;
  border-radius: var(--radius);
  background: none;
  color: var(--fg2);
  font-family: var(--mono);
  font-size: 11px;
  cursor: pointer;
  transition: background .12s, color .12s, border-color .12s;
  user-select: none;
}
.we-btn:hover {
  background: var(--bg3);
  border-color: var(--border2);
  color: var(--fg);
}
.we-btn-active {
  background: var(--accent-dim);
  border-color: var(--accent);
  color: var(--accent-fg) !important;
}

.we-sep {
  display: inline-block;
  width: .5px;
  height: 18px;
  background: var(--border2);
  margin: 0 4px;
  flex-shrink: 0;
}

.we-editor {
  min-height: 65vh;
  max-height: 85vh;
  overflow-y: auto;
  padding: 14px 16px;
  font-size: 14px;
  line-height: 1.75;
  color: var(--fg);
  outline: none;
  word-break: break-word;
}
.we-editor:empty::before {
  content: 'Comece a escrever...';
  color: var(--fg3);
  pointer-events: none;
}

/* Typographic styles inside the editor */
.we-editor h2 { font-size: 1.25rem; font-weight: 600; margin: 1.2em 0 .4em; }
.we-editor h3 { font-size: 1.05rem; font-weight: 600; margin: 1em 0 .3em; color: var(--fg2); }
.we-editor p  { margin: 0 0 .8em; }
.we-editor a  { color: var(--accent-fg); text-decoration: underline; }
.we-editor strong { font-weight: 700; }
.we-editor em     { font-style: italic; }
.we-editor u      { text-decoration: underline; }
.we-editor s      { text-decoration: line-through; color: var(--fg3); }
.we-editor blockquote {
  border-left: 2px solid var(--accent);
  margin: .8em 0;
  padding: .4em 1em;
  color: var(--fg2);
  font-style: italic;
}
.we-editor pre, .we-editor code {
  font-family: var(--mono);
  font-size: 12px;
  background: var(--bg);
  border-radius: var(--radius);
}
.we-editor pre  { padding: 10px 14px; overflow-x: auto; margin: .8em 0; }
.we-editor code { padding: 1px 5px; }
.we-editor ul, .we-editor ol { padding-left: 1.5em; margin: .5em 0; }
.we-editor li   { margin-bottom: .2em; }
.we-editor img  { max-width: 100%; border-radius: var(--radius); margin: .5em 0; display: block; }
.we-editor hr   { border: none; border-top: .5px solid var(--border2); margin: 1.2em 0; }
.we-editor table { border-collapse: collapse; width: 100%; margin: .8em 0; font-size: 13px; }
.we-editor th, .we-editor td {
  border: .5px solid var(--border2);
  padding: 6px 10px;
  text-align: left;
}
.we-editor th { background: var(--bg2); font-weight: 600; }

/* ── editor upload integrado ────────────────────────────────────────────────── */
.we-btn-upload {
  padding: 0 10px;
  color: var(--accent-fg);
  border-color: var(--accent);
  background: var(--accent-dim);
}
.we-btn-upload:hover {
  background: var(--accent-dim);
  border-color: var(--accent-fg);
  color: var(--fg);
}

.we-upload-status {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--fg2);
  padding: 4px 12px;
  background: var(--bg2);
  border-bottom: .5px solid var(--border2);
}

.we-editor.we-drag {
  outline: 2px dashed var(--accent);
  outline-offset: -4px;
  background: var(--accent-dim);
}

/* ── link currículo ─────────────────────────────────────────────────────────── */
.link-pill-resume {
  border-color: var(--accent);
  color: var(--accent-fg);
}
.link-pill-resume:hover {
  background: var(--accent-dim);
}

/* ── material symbols ───────────────────────────────────────────────────────── */
.material-symbols-outlined {
  font-size: 16px;
  line-height: 1;
  vertical-align: middle;
  font-variation-settings: 'FILL' 0, 'wght' 300, 'GRAD' 0, 'opsz' 20;
  user-select: none;
}

/* ── back-link ──────────────────────────────────────────────────────────────── */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--fg3);
  transition: color .15s;
}
.back-link:hover { color: var(--fg2); }
.back-link .material-symbols-outlined { font-size: 14px; }

/* ── page-header-meta ───────────────────────────────────────────────────────── */
.page-header-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: .75rem;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--fg3);
}

/* ── btn-icon ────────────────────────────────────────────────────────────────── */
.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 6px;
}
.btn-icon .material-symbols-outlined { font-size: 14px; }

/* ── section-link icon sizing ────────────────────────────────────────────────── */
.section-link .material-symbols-outlined { font-size: 14px; }

/* ── project-link-btn icon sizing ───────────────────────────────────────────── */
.project-link-btn .material-symbols-outlined { font-size: 14px; }

/* ── nav-hamburger: replace spans with single icon ──────────────────────────── */
.nav-hamburger .material-symbols-outlined { font-size: 20px; color: var(--fg2); }

/* ── utility classes (replace inline styles) ─────────────────────────────── */
.form-header        { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.5rem; }
.form-header h2     { font-size: 1rem; font-weight: 500; color: var(--fg); }
.form-grid-2        { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-grid-3        { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1rem; }
.form-actions       { display: flex; gap: .6rem; margin-top: 1.5rem; }
.form-check-row     { display: flex; align-items: flex-end; padding-bottom: .3rem; gap: 1.5rem; }
.form-check-label   { font-family: var(--mono); font-size: 12px; color: var(--fg2); }
.form-hint--top     { margin-top: 6px; }
.form-hint--mb      { margin-bottom: .75rem; }

.admin-section      { margin-bottom: 2rem; }
.admin-section-header { margin-bottom: 1rem; }
.admin-table--mb    { margin-bottom: 1.25rem; }
.admin-table--mb2   { margin-bottom: 2rem; }
.admin-card--mb     { margin-bottom: 1rem; }
.admin-card--mb15   { margin-bottom: 1.5rem; }
.admin-narrow       { max-width: 480px; }
.admin-narrow--lg   { max-width: 520px; }
.admin-narrow--xl   { max-width: 640px; }

.action-row         { display: flex; gap: .4rem; }
.tag-row            { display: flex; gap: 4px; flex-wrap: wrap; }
.btn-row            { display: flex; gap: .4rem; }
.stack-pills        { display: flex; flex-wrap: wrap; gap: .5rem; }
.status-radio-group { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .4rem; }
.status-radio-pill  {
  cursor: pointer; display: flex; align-items: center; gap: 6px;
  font-family: var(--mono); font-size: 11px; padding: 5px 12px;
  border: .5px solid var(--border); border-radius: var(--radius); transition: all .15s;
}
.status-radio-dot   { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.status-radio-input { display: none; }

.featured-grid      { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; align-items: start; }
.featured-hint      { font-family: var(--mono); font-size: 11px; color: var(--fg3); margin-top: .5rem; }
.featured-desc      { font-family: var(--mono); font-size: 12px; color: var(--fg3); margin-bottom: 1.5rem; }

.mono-sm            { font-family: var(--mono); font-size: 11px; }
.mono-xs            { font-family: var(--mono); font-size: 10px; color: var(--fg3); }
.mono-dim           { font-family: var(--mono); font-size: 11px; color: var(--fg3); }
.fw-500             { font-weight: 500; }

.select--narrow     { width: 120px; }

.section--last      { border-bottom: none; }
.section--last-notop { border-bottom: none; padding-top: 0; }

.upload-header-row  { display: flex; gap: .4rem; }
.resume-progress    { font-family: var(--mono); font-size: 11px; color: var(--fg2); margin-top: 6px; padding: 0 2px; }
.resume-delete      { font-size: 11px; padding: 3px 10px; color: var(--red); }

.autosave-indicator {
  position: fixed; bottom: 1rem; right: 1.25rem;
  font-family: var(--mono); font-size: 11px; color: var(--fg3);
  opacity: 0; transition: opacity .4s; pointer-events: none; z-index: 999;
}

.toggle-label       { font-family: var(--mono); font-size: 12px; color: var(--fg2); }
.published-label    { font-family: var(--mono); font-size: 12px; color: var(--fg2); }

.ptag--link         { text-decoration: none; }

.post-body--bare    { padding: 0; background: none; }
.timeline-body--bare { padding: 0; margin-top: .5rem; background: none; }

.badge-mt           { margin-top: 6px; }
.badge-mt-sm        { margin-top: 5px; }

.login-btn          { width: 100%; justify-content: center; margin-top: .5rem; }
.d-inline { display: inline; }

/* ── docs ────────────────────────────────────────────────────────────────────── */
.docs-card--mt  { margin-top: .75rem; }
.docs-list      { font-size: 13px; color: var(--fg2); line-height: 1.9; padding-left: 1.1rem; }
