/* Palette after the UTFPR identity: yellow + graphite/black. */
:root {
  --yellow: #ffbe00;
  --yellow-soft: #fff4d1;
  --ink: #18181a;
  --graphite: #2e3132;
  --text: #1f2123;
  --muted: #5b6064;
  --line: #e2ded3;
  --surface: #ffffff;
  --band-light: #ffffff;
  --band-sand: #fbf6e8;
  --band-gray: #eeeeec;
  --band-dark: #18181a;
  --link: #1f2123;
  --heading: #18181a;
  --sans: "Open Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Montserrat", "Open Sans", system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --yellow-soft: #3a3115;
    --text: #e7e7e5;
    --muted: #a3a7aa;
    --line: #34363a;
    --surface: #232427;
    --band-light: #1c1d20;
    --band-sand: #211f1a;
    --band-gray: #19191b;
    --band-dark: #101011;
    --link: #f2f2f0;
    --heading: #ffffff;
  }
}
:root[data-theme="dark"] {
  --yellow-soft: #3a3115;
  --text: #e7e7e5;
  --muted: #a3a7aa;
  --line: #34363a;
  --surface: #232427;
  --band-light: #1c1d20;
  --band-sand: #211f1a;
  --band-gray: #19191b;
  --band-dark: #101011;
  --link: #f2f2f0;
  --heading: #ffffff;
}

/* Bilingual: show only the active language. Without JS, Portuguese is shown. */
html[lang="pt-BR"] body [lang="en"],
html[lang="en"] body [lang="pt"] { display: none !important; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 56px; }
body {
  margin: 0;
  background: var(--band-light);
  color: var(--text);
  font: 16px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
}
a {
  color: var(--link);
  text-decoration: underline;
  text-decoration-color: var(--yellow);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
a:hover { background: var(--yellow); color: var(--ink); text-decoration-color: var(--ink); }
h1, h2, h3, h4 { font-family: var(--display); color: var(--heading); line-height: 1.2; }
.wrap { max-width: 1000px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }

/* Top bar */
.topbar { position: sticky; top: 0; z-index: 10; background: var(--ink); border-bottom: 3px solid var(--yellow); }
.topbar-inner { display: flex; align-items: center; gap: 20px; height: 52px; }
.brand {
  font: 800 .8rem var(--display); letter-spacing: .14em; text-transform: uppercase;
  color: var(--yellow); text-decoration: none; white-space: nowrap;
}
.brand:hover { background: none; color: #fff; }
.nav { display: flex; gap: 2px; list-style: none; margin: 0 0 0 auto; padding: 0; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a {
  display: block; padding: 6px 10px; color: #f1f1ef; text-decoration: none; white-space: nowrap;
  font: 700 .72rem var(--display); letter-spacing: .14em; text-transform: uppercase;
  border-bottom: 2px solid transparent;
}
.nav a:hover { background: none; color: var(--yellow); border-bottom-color: var(--yellow); }
.lang-switch { display: flex; border: 1px solid #55595c; border-radius: 4px; overflow: hidden; flex-shrink: 0; }
.lang-switch button {
  font: 700 .7rem var(--display); letter-spacing: .08em;
  padding: 5px 9px; border: 0; background: transparent; color: #c9cbcc; cursor: pointer;
}
.lang-switch button[aria-pressed="true"] { background: var(--yellow); color: var(--ink); }

/* Bands */
.band { padding: 64px 0; }
.band-light { background: var(--band-light); }
.band-sand { background: var(--band-sand); }
.band-gray { background: var(--band-gray); }
.band-dark, .band-hero { background: var(--band-dark); color: #e9e9e7; }
.band-dark h2, .band-hero h1 { color: #fff; }
.band-dark a, .band-hero a { color: #fff; }
.band-dark a:hover, .band-hero a:hover { color: var(--ink); }
.band-dark .muted, .band-hero .muted { color: #b4b7b9; }

.band h2 {
  font-size: 2rem; font-weight: 800; margin: 0 0 32px;
  display: inline-block; padding-bottom: 10px;
  background: linear-gradient(var(--yellow), var(--yellow)) left bottom / 56px 5px no-repeat;
}
h3.sub {
  font-size: .8rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted); margin: 40px 0 14px;
}

/* Hero */
.band-hero { padding: 72px 0 80px; position: relative; overflow: hidden; }
.band-hero::after {
  /* Yellow stripes echoing the UTFPR logo */
  content: ""; position: absolute; right: 0; top: 0; width: 34%; height: 100%;
  background: repeating-linear-gradient(90deg, transparent 0 22px, rgba(255, 190, 0, .07) 22px 34px);
  pointer-events: none;
}
.hero { display: grid; grid-template-columns: 280px 1fr; gap: 56px; align-items: center; position: relative; z-index: 1; }
.photo {
  width: 280px; height: 280px; border-radius: 50%; object-fit: cover;
  border: 6px solid var(--yellow); box-shadow: 0 0 0 10px rgba(255, 190, 0, .15);
}
.hero h1 { font-size: 2.8rem; font-weight: 800; margin: 0 0 8px; letter-spacing: -.01em; }
.role { color: #c9cbcc; margin: 0 0 16px; }
.lead { font-size: 1.05rem; margin: 0 0 22px; max-width: 62ch; color: #e9e9e7; }
.keywords { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 0 0 22px; }
.keywords li {
  font: 700 .68rem var(--display); letter-spacing: .1em; text-transform: uppercase;
  padding: 4px 10px; border: 1px solid var(--yellow); color: var(--yellow); border-radius: 3px;
}
.links { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0; }
.band-hero .links a {
  display: inline-block; padding: 7px 14px; border-radius: 4px; text-decoration: none;
  background: var(--yellow); color: var(--ink); font: 700 .8rem var(--sans);
}
.band-hero .links a:hover { background: #fff; }

/* Timelines and entries */
.timeline, .entries { list-style: none; margin: 0; padding: 0; }
.timeline li, .entries li {
  display: grid; grid-template-columns: 120px 1fr; gap: 20px; padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.timeline li:last-child, .entries li:last-child { border-bottom: 0; }
.timeline p, .entries p { margin: 2px 0 0; font-size: .925rem; }
.when { font: 700 .85rem var(--display); color: var(--muted); font-variant-numeric: tabular-nums; }

/* Research cards */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.card { background: var(--surface); border-top: 5px solid var(--yellow); border-radius: 4px; padding: 20px; box-shadow: 0 1px 3px rgba(0, 0, 0, .06); }
.card h3 { font-size: 1.02rem; font-weight: 700; margin: 0 0 8px; }
.card p { margin: 0; color: var(--muted); font-size: .92rem; }

.plain { list-style: none; padding: 0; margin: 0; }
.plain li { padding: 6px 0; }
.plain .when { display: inline-block; min-width: 52px; }

/* Publications */
.pubs { list-style: none; margin: 0; padding: 0; }
.pub { padding: 12px 0 12px 16px; border-left: 3px solid var(--line); margin-bottom: 6px; }
.pub:hover { border-left-color: var(--yellow); }
.pub-title { font-weight: 600; }
.pub-title a { text-decoration: none; }
.pub-title a:hover { text-decoration: underline; }
.pub-authors { color: var(--muted); font-size: .9rem; }
.pub-authors b { color: var(--text); font-weight: 700; }
.pub-meta { font-size: .85rem; color: var(--muted); display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 3px; }
.tag { font: 700 .64rem var(--display); text-transform: uppercase; letter-spacing: .08em; padding: 2px 7px; border-radius: 3px; }
.tag-j { background: var(--ink); color: #fff; }
.tag-c { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1px var(--muted); }
.tag-p { background: var(--band-gray); color: var(--muted); }
.tag-award { background: var(--yellow); color: var(--ink); }
.tag-done { background: var(--band-gray); color: var(--muted); }
.tag-ongoing { background: var(--yellow); color: var(--ink); }
.tag-co { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1px var(--text); }
:root[data-theme="dark"] .tag-j { background: #f2f2f0; color: var(--ink); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tag-j { background: #f2f2f0; color: var(--ink); } }
.tabs {
  display: flex; gap: 0; margin: 18px 0 8px; border-bottom: 2px solid var(--line);
  overflow-x: auto; scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  display: flex; align-items: center; gap: 6px; flex-shrink: 0;
  font: 800 .95rem var(--display); color: var(--muted);
  padding: 10px 8px; margin-bottom: -2px; cursor: pointer;
  background: none; border: 0; border-bottom: 4px solid transparent;
}
.tab:hover:not(:disabled) { color: var(--heading); border-bottom-color: var(--line); }
.tab[aria-selected="true"] { color: var(--heading); border-bottom-color: var(--yellow); }
.tab:disabled { opacity: .35; cursor: default; }
.tab:focus-visible { outline: 2px solid var(--yellow); outline-offset: -2px; }
.tab-count {
  font: 700 .65rem var(--display); padding: 1px 7px; border-radius: 999px;
  background: var(--band-gray); color: var(--muted);
}
.tab[aria-selected="true"] .tab-count { background: var(--yellow); color: var(--ink); }
.tab-panel { padding-top: 6px; }

.pub-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  font: 700 .72rem var(--display); letter-spacing: .08em; text-transform: uppercase;
  padding: 7px 14px; border-radius: 4px; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface); color: var(--text);
}
.chip:hover { border-color: var(--yellow); }
.chip[aria-pressed="true"] { background: var(--yellow); border-color: var(--yellow); color: var(--ink); }
#pub-search {
  font: .9rem var(--sans); padding: 7px 12px; border-radius: 4px; width: 240px; max-width: 100%;
  border: 1px solid var(--line); background: var(--surface); color: var(--text);
}
#pub-search:focus { outline: 2px solid var(--yellow); outline-offset: 1px; }

/* Students */
.callout { margin-top: 28px; padding: 14px 18px; border-left: 5px solid var(--yellow); background: var(--surface); border-radius: 0 4px 4px 0; }

/* Contact and footer */
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.contact address { font-style: normal; }
.contact p { margin: 0; }
.footer { background: var(--band-dark); color: #8e9295; font-size: .8rem; padding: 18px 0 28px; border-top: 1px solid #2e3132; }

@media (max-width: 760px) {
  .band { padding: 44px 0; }
  .band h2 { font-size: 1.6rem; margin-bottom: 24px; }
  .topbar-inner { gap: 10px; }
  .brand { display: none; }
  .nav { margin-left: 0; }
  .band-hero { padding: 40px 0 48px; }
  .band-hero::after { width: 50%; }
  .hero { grid-template-columns: 1fr; gap: 24px; }
  .photo { width: 150px; height: 150px; border-width: 4px; box-shadow: 0 0 0 6px rgba(255, 190, 0, .15); }
  .hero h1 { font-size: 2rem; }
  .timeline li, .entries li { grid-template-columns: 1fr; gap: 2px; }
  .contact { grid-template-columns: 1fr; gap: 16px; }
  #pub-search { width: 100%; }
}
