  :root {
    --bg: #fbfaf7;
    --surface: #ffffff;
    --text: #1d2430;
    --muted: #5b6573;
    --accent: #0f6e8c;
    --accent-soft: #e3f1f5;
    --line: #e3e1da;
  }
  @media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
      --bg: #12171d;
      --surface: #1a2129;
      --text: #e8ecf1;
      --muted: #9aa5b3;
      --accent: #5cc0dd;
      --accent-soft: #1b2f38;
      --line: #2a333d;
    }
  }
  * { box-sizing: border-box; }
  html { scroll-behavior: smooth; }
  body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    line-height: 1.65;
  }
  a { color: var(--accent); }
  .wrap { max-width: 960px; margin: 0 auto; padding: 0 20px; }

  /* idioma */
  html[lang="pt-BR"] .en { display: none !important; }
  html[lang="en"] .pt { display: none !important; }

  header.top {
    position: sticky; top: 0; z-index: 10;
    background: color-mix(in srgb, var(--bg) 92%, transparent);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--line);
  }
  .bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; flex-wrap: wrap; }
  .brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: .2px; text-decoration: none; color: var(--text); }
  .brand img { display: block; height: 52px; width: auto; }
  nav { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }
  nav a { text-decoration: none; color: var(--muted); font-size: .95rem; }
  nav a:hover { color: var(--accent); }
  .lang button {
    border: 1px solid var(--line); background: var(--surface); color: var(--text);
    padding: 4px 10px; border-radius: 999px; cursor: pointer; font-size: .85rem;
  }
  .lang button:hover { border-color: var(--accent); color: var(--accent); }

  .hero { padding: 72px 20px 48px; }
  .hero h1 { font-size: clamp(2rem, 5vw, 3.2rem); line-height: 1.15; margin: 0 0 12px; }
  .hero { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 40px; }
  .hero-logo-big { display: block; height: 240px; width: auto; justify-self: end; }
  .hero p.sub { color: var(--muted); font-size: 1.1rem; margin: 0; max-width: 640px; }

  section { padding: 44px 0; border-top: 1px solid var(--line); }
  h2 { font-size: 1.6rem; margin: 0 0 20px; }
  h3 { margin: 0 0 6px; font-size: 1.05rem; }
  .about p { max-width: 720px; margin: 0 0 16px; }

  .grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
  .card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 18px; }
  .card p { margin: 0; color: var(--muted); font-size: .95rem; }

  .members h3.group { margin: 28px 0 12px; color: var(--muted); font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; }
  .person { display: flex; align-items: center; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; }
  .avatar { position: relative; flex: 0 0 56px; width: 56px; height: 56px; border-radius: 50%; overflow: hidden; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-weight: 700; font-size: 1.05rem; }
  .avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 20%; }
  .lattes { display: inline-block; font-size: .85rem; margin-top: 2px; }
  .person .name { font-weight: 600; }
  .person .role { color: var(--muted); font-size: .9rem; }
  .tag { display: inline-block; background: var(--accent-soft); color: var(--accent); padding: 1px 10px; border-radius: 999px; font-size: .8rem; margin-top: 4px; }

  .news-item { display: grid; grid-template-columns: 110px 1fr; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
  .news-item:last-child { border-bottom: 0; }
  .news-item time { color: var(--muted); font-size: .9rem; }
  .news-item { grid-template-columns: 90px 1fr 210px; align-items: start; }
  .news-img { justify-self: end; }
  .news-img img { display: block; width: auto; max-width: 100%; height: auto; max-height: 230px; border-radius: 8px; border: 1px solid var(--line); }
  .news-item a { text-decoration: underline; text-underline-offset: 2px; }
  .placeholder { color: var(--muted); font-style: italic; }

  footer { border-top: 1px solid var(--line); padding: 28px 0 48px; color: var(--muted); font-size: .9rem; }

  @media (max-width: 560px) {
    header.top { position: static; }
    .brand img { height: 42px; }
    .news-item { grid-template-columns: 1fr; gap: 6px; }
    .news-img { justify-self: start; }
    .news-img img { max-width: 260px; max-height: 220px; }
    .hero { padding: 48px 20px 32px; grid-template-columns: 1fr; gap: 20px; }
    .hero-logo-big { height: 130px; justify-self: start; }
  }

  /* links de nome (professores) */
  .namelink { color: inherit; text-decoration: none; border-bottom: 1px dotted var(--muted); }
  .namelink:hover { color: var(--accent); border-bottom-color: var(--accent); }

  /* página individual */
  .backlink { text-decoration: none; color: var(--muted); font-size: .95rem; }
  .backlink:hover { color: var(--accent); }
  .profile { display: flex; gap: 32px; align-items: flex-start; padding: 64px 0 24px; }
  .profile .avatar { flex: 0 0 160px; width: 160px; height: 160px; font-size: 2.6rem; }
  .profile h1 { margin: 0 0 4px; font-size: clamp(1.7rem, 4vw, 2.4rem); line-height: 1.2; }
  .profile .role { color: var(--muted); margin: 0 0 20px; }
  .profile .bio { max-width: 640px; margin: 0 0 24px; }
  .links { display: flex; flex-wrap: wrap; gap: 12px; }
  .btn { display: inline-block; padding: 8px 16px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--text); text-decoration: none; font-size: .95rem; }
  .btn:hover { border-color: var(--accent); color: var(--accent); }
  .btn.disabled { color: var(--muted); font-style: italic; }
  @media (max-width: 560px) { .profile { flex-direction: column; gap: 20px; padding-top: 40px; } }


  /* publicações */
  .pubs { list-style: none; padding: 0; margin: 0 0 24px; }
  .pubs li { padding: 14px 0; border-bottom: 1px solid var(--line); }
  .pubs li:last-child { border-bottom: 0; }
  .pub-title { font-weight: 600; }
  .pub-title a { color: var(--text); text-decoration: none; }
  .pub-title a:hover { color: var(--accent); text-decoration: underline; }
  .pub-authors { color: var(--muted); font-size: .92rem; margin-top: 2px; }
  .pub-venue { font-size: .92rem; margin-top: 2px; }
  .sec-h { margin: 40px 0 0; font-size: 1.5rem; padding-top: 24px; border-top: 1px solid var(--line); }
  .year-h { margin: 24px 0 4px; font-size: 1.1rem; }
  .sec-h .count, .year-h .count { color: var(--muted); font-weight: 400; font-size: .95rem; }
  .pub-venue .tag { margin: 0 0 0 6px; }
