:root {
  --bg: #fbfbf8;
  --bg-tint: #f1f4ef;
  --surface: #ffffff;
  --ink: #15201a;
  --ink-2: #47554c;
  --line: #dde3dc;
  --brand: #1f6f3a;      /* verde institucional, escurecido p/ contraste AA */
  --brand-ink: #ffffff;
  --brand-soft: #e3f0e6;
  --accent: #c8341f;     /* vermelho IF, uso pontual */
  --radius: 14px;
  --shadow: 0 1px 2px rgba(20, 32, 26, .06), 0 6px 24px rgba(20, 32, 26, .06);
  --wrap: 1160px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1512; --bg-tint: #141c17; --surface: #18221c; --ink: #e7ede8; --ink-2: #a5b3aa;
    --line: #26332b; --brand: #5cc27a; --brand-ink: #0b130e; --brand-soft: #1b2e21; --accent: #ff7a63;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 28px rgba(0,0,0,.25); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f1512; --bg-tint: #141c17; --surface: #18221c; --ink: #e7ede8; --ink-2: #a5b3aa;
  --line: #26332b; --brand: #5cc27a; --brand-ink: #0b130e; --brand-soft: #1b2e21; --accent: #ff7a63;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 28px rgba(0,0,0,.25); color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.6 Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--brand); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -.02em; margin: 0; }
h1 { font-size: clamp(2.1rem, 4.6vw, 3.5rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 3vw, 2.25rem); font-weight: 700; }
h3 { font-size: 1.05rem; font-weight: 600; }
p { margin: 0; }
.muted { color: var(--ink-2); }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 32px; } }

.skip { position: absolute; left: -9999px; top: 8px; background: var(--brand); color: var(--brand-ink); padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }

.eyebrow {
  font: 500 .78rem/1.2 "JetBrains Mono", ui-monospace, monospace; text-transform: uppercase;
  letter-spacing: .08em; color: var(--brand); margin-bottom: 12px;
}
.eyebrow--light { color: rgba(255,255,255,.8); }

/* ---------- topo ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar__inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.brand__mark { width: 30px; height: 30px; color: var(--brand); }
.brand__text { display: flex; flex-direction: column; line-height: 1.1; }
.brand__text strong { font-size: 1.1rem; letter-spacing: -.01em; }
.brand__text small { font-size: .72rem; color: var(--ink-2); }

.nav { display: flex; gap: 4px; align-items: center; }
.nav a { color: var(--ink-2); text-decoration: none; font-weight: 500; font-size: .94rem; padding: 8px 12px; border-radius: 8px; }
.nav a:hover { color: var(--ink); background: var(--bg-tint); }
.nav .nav__cta { color: var(--brand-ink); background: var(--brand); margin-left: 6px; }
.nav .nav__cta:hover { color: var(--brand-ink); background: var(--brand); filter: brightness(1.08); }

.navtoggle { display: none; width: 44px; height: 44px; border: 0; background: transparent; border-radius: 10px; cursor: pointer; padding: 11px 10px; }
.navtoggle span { display: block; height: 2px; background: var(--ink); margin: 5px 0; border-radius: 2px; transition: transform .2s, opacity .2s; }
.navtoggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.navtoggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.navtoggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 860px) {
  .navtoggle { display: block; }
  .nav {
    position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; align-items: stretch;
    background: var(--bg); border-bottom: 1px solid var(--line); padding: 8px 16px 16px; gap: 2px;
    display: none;
  }
  .nav.is-open { display: flex; }
  .nav a { padding: 12px; font-size: 1rem; }
  .nav .nav__cta { margin: 8px 0 0; text-align: center; }
}

/* ---------- botões ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 20px; border-radius: 10px; font-weight: 600; text-decoration: none; transition: transform .15s, filter .15s, background .15s; }
.btn:hover { transform: translateY(-1px); }
.btn--primary { background: var(--brand); color: var(--brand-ink); }
.btn--primary:hover { filter: brightness(1.08); }
.btn--ghost { color: var(--ink); border: 1px solid var(--line); background: var(--surface); }
.btn--light { background: #fff; color: #174f2a; white-space: nowrap; }

/* ---------- hero ---------- */
.hero { padding: 56px 0 40px; background:
  radial-gradient(900px 400px at 85% -10%, var(--brand-soft), transparent 70%), var(--bg); }
.hero__grid { display: grid; gap: 40px; align-items: center; }
@media (min-width: 960px) { .hero__grid { grid-template-columns: 1.05fr 1fr; gap: 56px; } .hero { padding: 88px 0 56px; } }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.2rem); color: var(--ink-2); margin-top: 20px; max-width: 34em; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

.hero__fig { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
#mesh { width: 100%; height: auto; }
#mesh .el { stroke: rgba(255,255,255,.55); stroke-width: .6; stroke-linejoin: round; animation: pop .6s both; animation-delay: var(--d); }
#mesh .load { fill: none; stroke: var(--ink-2); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
@keyframes pop { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { #mesh .el { animation: none; } html { scroll-behavior: auto; } .btn:hover { transform: none; } }
.hero__fig figcaption { display: flex; flex-wrap: wrap; gap: 8px 16px; justify-content: space-between; align-items: center; margin-top: 12px; font-size: .8rem; color: var(--ink-2); }
.scale { display: inline-flex; align-items: center; gap: 8px; }
.scale i { font-style: normal; }
.scale b { width: 96px; height: 8px; border-radius: 4px; background: linear-gradient(90deg, rgb(36,52,112), rgb(33,120,160), rgb(45,160,110), rgb(190,200,60), rgb(240,150,40), rgb(210,60,40)); }

.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; margin: 48px 0 0; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
@media (min-width: 720px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stats div { background: var(--surface); padding: 20px 22px; display: flex; flex-direction: column-reverse; }
.stats dt { color: var(--ink-2); font-size: .9rem; }
.stats dd { margin: 0; font-size: 2rem; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }

/* ---------- seções ---------- */
.section { padding: 72px 0; }
@media (min-width: 960px) { .section { padding: 96px 0; } }
.section--tint { background: var(--bg-tint); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section__head { max-width: 640px; margin-bottom: 40px; }
.section__head p:last-child:not(.eyebrow) { color: var(--ink-2); margin-top: 12px; }
.two { display: grid; gap: 28px; }
@media (min-width: 960px) { .two { grid-template-columns: 1fr 1.4fr; gap: 64px; } }
.prose p + p { margin-top: 16px; }
.prose p { color: var(--ink-2); font-size: 1.05rem; }
.prose strong { color: var(--ink); }

.facts { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 0; border-top: 1px solid var(--line); }
.facts li { display: grid; grid-template-columns: 1fr; gap: 2px; padding: 12px 0; border-bottom: 1px solid var(--line); }
@media (min-width: 560px) { .facts li { grid-template-columns: 190px 1fr; gap: 16px; } }
.facts span { color: var(--ink-2); font-size: .9rem; }

/* linhas */
.lines { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.line { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; display: flex; flex-direction: column; gap: 10px; transition: border-color .2s, box-shadow .2s; }
.line:hover { border-color: color-mix(in srgb, var(--brand) 45%, var(--line)); box-shadow: var(--shadow); }
.line__icon { width: 44px; height: 44px; border-radius: 10px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; }
.line__icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.line__num { position: absolute; top: 22px; right: 24px; font: 500 .8rem "JetBrains Mono", monospace; color: var(--ink-2); opacity: .7; }
.line h3 { margin-top: 6px; }
.line p { color: var(--ink-2); font-size: .95rem; }
.line .line__meta { margin-top: auto; padding-top: 8px; font-size: .82rem; font-family: "JetBrains Mono", monospace; }

/* pessoas */
.people { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.person { display: flex; gap: 16px; align-items: flex-start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.person--lead { border-color: color-mix(in srgb, var(--brand) 50%, var(--line)); box-shadow: inset 3px 0 0 var(--brand); }
.avatar { flex: none; width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; font-weight: 600; color: var(--brand); background: var(--brand-soft); overflow: hidden; letter-spacing: .02em; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar--sm { width: 42px; height: 42px; font-size: .85rem; }
.person__body { min-width: 0; }
.person h3 { font-size: 1rem; }
.person__role { color: var(--brand); font-size: .88rem; font-weight: 500; margin-top: 2px; }
.person__meta { color: var(--ink-2); font-size: .85rem; margin-top: 2px; }
.person__links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.chip { font-size: .78rem; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); text-decoration: none; color: var(--ink-2); }
.chip:hover { color: var(--brand); border-color: var(--brand); }
.people--compact .person { padding: 14px 16px; align-items: center; }
.subhead { font-size: 1.25rem; margin: 48px 0 18px; }
.note { margin-top: 18px; color: var(--ink-2); font-size: .9rem; }

/* infra */
.tools { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); }
.tools li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; display: flex; flex-direction: column; gap: 4px; }
.tools span { color: var(--ink-2); font-size: .9rem; }

/* cta */
.cta { display: grid; gap: 24px; align-items: center; background: linear-gradient(135deg, #1f6f3a, #14532b); color: #fff; border-radius: 20px; padding: 36px 28px; }
@media (min-width: 860px) { .cta { grid-template-columns: 1fr auto; padding: 48px 56px; gap: 48px; } }
.cta p:not(.eyebrow) { color: rgba(255,255,255,.88); margin-top: 12px; max-width: 46em; }

/* contato */
.contact { font-style: normal; display: grid; gap: 0; border-top: 1px solid var(--line); }
.contact div { display: grid; gap: 2px; padding: 16px 0; border-bottom: 1px solid var(--line); }
@media (min-width: 560px) { .contact div { grid-template-columns: 140px 1fr; gap: 16px; } }
.contact span { color: var(--ink-2); font-size: .9rem; }

/* rodapé */
.footer { padding: 36px 0 44px; font-size: .9rem; }
.footer__inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; }

/* ---------- páginas internas ---------- */
.nav a[aria-current="page"] { color: var(--ink); background: var(--bg-tint); }
.pagehead { padding: 56px 0 8px; background: radial-gradient(700px 300px at 90% -20%, var(--brand-soft), transparent 70%), var(--bg); }
@media (min-width: 960px) { .pagehead { padding: 80px 0 12px; } }
.pagehead .lead { margin-top: 14px; }
.section--top { padding-top: 40px; }
.section__head--row { max-width: none; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 12px; }
.more { font-weight: 600; text-decoration: none; white-space: nowrap; }
.more:hover { text-decoration: underline; }
.stretched { color: inherit; text-decoration: none; }
.stretched::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.line h3 a:hover, .news h3 a:hover { color: var(--brand); }
.line:focus-within, .news:focus-within { border-color: var(--brand); }
.lead--sm { font-size: 1.02rem; margin-top: 8px; }
.prose--page { max-width: 46em; }
.prose--page h2 { font-size: 1.35rem; margin: 32px 0 12px; }
.prose--page ul, .prose--page ol { color: var(--ink-2); padding-left: 1.3em; }
.prose--page li + li { margin-top: 6px; }
.prose--page img { border-radius: var(--radius); margin: 20px 0; }
.empty { color: var(--ink-2); padding: 28px; border: 1px dashed var(--line); border-radius: var(--radius); text-align: center; }

.newsgrid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.news { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; display: flex; flex-direction: column; gap: 8px; transition: border-color .2s, box-shadow .2s; }
.news:hover { box-shadow: var(--shadow); }
.news time { font: 500 .78rem "JetBrains Mono", monospace; color: var(--ink-2); }
.news p { color: var(--ink-2); font-size: .95rem; }
.news__img { width: calc(100% + 44px); max-width: none; margin: -22px -22px 6px; aspect-ratio: 16/9; object-fit: cover; border-radius: var(--radius) var(--radius) 0 0; }
.pager { display: flex; gap: 16px; justify-content: center; align-items: center; margin-top: 32px; color: var(--ink-2); }

.article { padding: 48px 0 80px; }
.wrap--narrow { max-width: 820px; }
.crumbs { margin-bottom: 20px; font-size: .92rem; }
.crumbs a { text-decoration: none; }
.article h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.article__meta { color: var(--ink-2); font-size: .9rem; margin: 14px 0 28px; }
.article__img { border-radius: var(--radius); margin-bottom: 28px; width: 100%; }
.article .prose p { color: var(--ink); font-size: 1.07rem; line-height: 1.75; }
.article .prose p + p { margin-top: 18px; }

.lines-detail { display: grid; gap: 0; }
.ldetail { display: grid; grid-template-columns: 44px 1fr; gap: 20px; padding: 32px 0; border-top: 1px solid var(--line); scroll-margin-top: 80px; }
.ldetail:target { background: linear-gradient(90deg, var(--brand-soft), transparent 60%); }
.ldetail h2 { font-size: clamp(1.25rem, 2.2vw, 1.55rem); margin-top: 4px; }
.ldetail .prose { margin-top: 12px; }
.ldetail .person__meta { margin-top: 10px; }
.line__num--inline { position: static; }

.subhead--first { margin-top: 0; }
.person__bio { font-size: .9rem; margin-top: 8px; color: var(--ink-2); }
.alumni { padding-left: 1.2em; color: var(--ink-2); }
.alumni strong { color: var(--ink); }

.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.filter { font: inherit; font-size: .9rem; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); cursor: pointer; min-height: 40px; }
.filter span { opacity: .7; margin-left: 4px; }
.filter[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.pubyear { display: grid; gap: 8px 32px; padding: 24px 0; border-top: 1px solid var(--line); }
@media (min-width: 860px) { .pubyear { grid-template-columns: 100px 1fr; } }
.pubyear__h { font: 600 1.4rem "JetBrains Mono", monospace; color: var(--brand); }
.pubs { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.pub__tipo { display: inline-block; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--brand); font-weight: 600; }
.pub__title { font-weight: 600; margin-top: 2px; }
.pub__title a { color: var(--ink); text-decoration: none; }
.pub__title a:hover { color: var(--brand); text-decoration: underline; }
.pub__authors, .pub__venue { color: var(--ink-2); font-size: .92rem; }
[hidden] { display: none !important; }
