/* ==========================================================================
   NanoEng — Stylesheet
   Laboratório de NanoEngenharia (UnB)
   ========================================================================== */

/* ---------- Design Tokens ---------- */
:root {
  /* Colors — base */
  --c-primary:        #0A2540;   /* deep navy */
  --c-primary-2:      #0B3D6E;
  --c-brand:          #0066CC;   /* electric blue */
  --c-brand-light:    #2E86E0;
  --c-cyan:           #06B6D4;
  --c-emerald:        #10B981;

  /* Colors — neutrals */
  --c-text:           #0F172A;   /* slate-900 */
  --c-text-2:         #334155;   /* slate-700 */
  --c-muted:          #64748B;   /* slate-500 */
  --c-border:         #E2E8F0;   /* slate-200 */
  --c-bg:             #FFFFFF;
  --c-bg-soft:        #F8FAFC;   /* slate-50 */
  --c-bg-alt:         #F1F5F9;   /* slate-100 */
  --c-bg-dark:        #0A2540;
  --c-bg-darker:      #061A2B;

  /* Gradients */
  --grad-brand: linear-gradient(135deg, #0066CC 0%, #06B6D4 55%, #10B981 100%);
  --grad-hero:  linear-gradient(135deg, #0A2540 0%, #0B3D6E 60%, #0A4A6E 100%);

  /* Typography */
  --ff-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --ff-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  /* Sizing */
  --container: 1200px;
  --radius:    10px;
  --radius-lg: 16px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow:    0 4px 16px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 12px 40px rgba(15, 23, 42, 0.12);

  /* Motion */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

body {
  margin: 0;
  font-family: var(--ff-sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--c-text);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg { display: block; max-width: 100%; height: auto; }

a {
  color: var(--c-brand);
  text-decoration: none;
  transition: color 0.2s var(--ease);
}
a:hover { color: var(--c-cyan); }

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 0.6em;
  color: var(--c-text);
  letter-spacing: -0.015em;
}

h1 { font-size: clamp(2rem, 4vw, 3.25rem); font-weight: 800; letter-spacing: -0.025em; }
h2 { font-size: clamp(1.6rem, 2.8vw, 2.25rem); font-weight: 800; letter-spacing: -0.02em; }
h3 { font-size: clamp(1.2rem, 1.8vw, 1.4rem); font-weight: 700; }
h4 { font-size: 1.1rem; font-weight: 700; }

p { margin: 0 0 1em; color: var(--c-text-2); }

code, pre, kbd, samp { font-family: var(--ff-mono); }

code {
  background: var(--c-bg-alt);
  padding: 0.15em 0.4em;
  border-radius: 4px;
  font-size: 0.9em;
  color: var(--c-primary);
}

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: clamp(36px, 5vw, 64px) 0;
}
.section + .section { padding-top: clamp(8px, 2vw, 24px); }
.section--soft { background: var(--c-bg-soft); }
.section--alt  { background: var(--c-bg-alt); }
.section--dark {
  background: var(--c-bg-dark);
  color: #E2E8F0;
}
.section--dark h1, .section--dark h2, .section--dark h3 { color: #FFFFFF; }
.section--dark p { color: #CBD5E1; }

.section-header {
  max-width: 760px;
  margin: 0 auto 32px;
  text-align: center;
}
.section-header .eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--c-cyan);
  margin-bottom: 12px;
  background: linear-gradient(90deg, #0066CC, #06B6D4, #10B981);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.section-header p { font-size: 1.05rem; color: var(--c-muted); }

/* Grids */
.grid { display: grid; gap: 24px; }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.15s var(--ease), box-shadow 0.2s var(--ease), background 0.2s var(--ease);
  text-decoration: none;
  white-space: nowrap;
}
.btn--primary {
  background: var(--grad-brand);
  color: #FFFFFF;
  box-shadow: 0 4px 14px rgba(6, 182, 212, 0.35);
}
.btn--primary:hover {
  color: #FFFFFF;
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(6, 182, 212, 0.45);
}
.btn--ghost {
  background: transparent;
  color: var(--c-text);
  border-color: var(--c-border);
}
.btn--ghost:hover {
  border-color: var(--c-brand);
  color: var(--c-brand);
}
.btn--dark-ghost {
  background: transparent;
  color: #FFFFFF;
  border-color: rgba(255, 255, 255, 0.3);
}
.btn--dark-ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: #FFFFFF;
  color: #FFFFFF;
}

/* ---------- Header / Navbar ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--c-border);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  height: 68px;
  gap: 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  flex-shrink: 0;
}
.brand img {
  height: 38px;
  width: 127px;     /* trava aspect ratio do viewBox 320x96 a 38px de altura */
  flex-shrink: 0;
  display: block;
}

.nav {
  display: flex;
  align-items: center;
  gap: 2px;
}
.nav a {
  position: relative;
  display: inline-block;
  padding: 8px 8px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--c-text-2);
  border-radius: 8px;
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
}
.nav a:hover { color: var(--c-brand); background: var(--c-bg-soft); }
.nav a.active {
  color: var(--c-brand);
  background: rgba(0, 102, 204, 0.07);
}

.nav-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;   /* nav fica colado na logo; toggle de idioma vai p/ a direita */
}
.lang-toggle {
  display: inline-flex;
  border: 1px solid var(--c-border);
  border-radius: 999px;
  overflow: hidden;
  background: var(--c-bg);
}
.lang-toggle button {
  background: none;
  border: 0;
  padding: 6px 12px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--c-muted);
  cursor: pointer;
  transition: all 0.2s var(--ease);
}
.lang-toggle button.active {
  background: var(--grad-brand);
  color: #FFFFFF;
}

.menu-toggle {
  display: none;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 8px;
  color: var(--c-text);
}
.menu-toggle svg { width: 24px; height: 24px; }

@media (max-width: 1180px) {
  .menu-toggle { display: inline-flex; }
  .nav {
    position: absolute;
    inset: 68px 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--c-border);
    box-shadow: var(--shadow);
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s var(--ease), transform 0.2s var(--ease);
  }
  .nav.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  .nav a { padding: 12px 14px; font-size: 1rem; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--grad-hero);
  color: #FFFFFF;
  padding: clamp(32px, 5vw, 64px) 0 clamp(56px, 8vw, 96px);
  isolation: isolate;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("../img/svg/hero-bg.svg") center/cover no-repeat;
  opacity: 0.85;
  z-index: -1;
}
.hero__inner {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  align-items: center;
  gap: 48px;
}
@media (max-width: 900px) {
  .hero__inner { grid-template-columns: 1fr; gap: 32px; }
}
.hero h1 {
  color: #FFFFFF;
  font-size: clamp(2.2rem, 4.5vw, 3.6rem);
  margin-bottom: 18px;
}
.hero__brand {
  color: #FFFFFF;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  margin-bottom: 20px;
  line-height: 1.15;
}
.hero__brand-prefix,
.hero__brand-suffix {
  font-size: clamp(0.95rem, 1.4vw, 1.15rem);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.2;
}
.hero__brand-prefix:empty,
.hero__brand-suffix:empty { display: none; }
.hero__brand-suffix { margin-top: -0.9em; }
.hero__brand-mark {
  display: inline-block;
  font-family: var(--ff-display, var(--ff-base));
  font-size: clamp(2.6rem, 6.5vw, 5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-top: -0.06em;
  padding-block: 0 0.22em;
  background: linear-gradient(90deg, #06B6D4 0%, #10B981 60%, #FFFFFF 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 18px rgba(6, 182, 212, 0.25));
}
.home-highlights .card { display: flex; flex-direction: column; }
.home-highlights__body h3 { font-size: 1.15rem; line-height: 1.35; margin: 8px 0 6px 0; }
.home-highlights__body h3 a { color: var(--c-text); }
.home-highlights__body h3 a:hover { color: var(--c-brand); }
.home-highlights__authors { font-size: 0.88rem; color: var(--c-text-2); margin: 0 0 4px 0; }
.home-highlights__journal { font-family: var(--ff-mono); font-size: 0.82rem; color: var(--c-muted); margin: 0 0 14px 0; }
.home-highlights__date {
  font-family: var(--ff-mono);
  font-size: 0.78rem;
  color: var(--c-brand);
  letter-spacing: 0.03em;
}
.card__eyebrow {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--c-muted);
  margin-bottom: 8px;
}

.hero h1 .accent {
  background: linear-gradient(90deg, #06B6D4, #10B981);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero p.lead {
  font-size: 1.15rem;
  color: #CBD5E1;
  max-width: 56ch;
  margin-bottom: 32px;
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
  -webkit-hyphens: auto;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* Decorative chip */
.hero__chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(6, 182, 212, 0.15);
  border: 1px solid rgba(6, 182, 212, 0.35);
  color: #67E8F9;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  margin-bottom: 24px;
}
.hero__chip::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10B981;
  box-shadow: 0 0 10px #10B981;
}

/* ---------- Page banner (non-home) ---------- */
.page-banner {
  background: var(--grad-hero);
  color: #FFFFFF;
  padding: clamp(48px, 7vw, 80px) 0 clamp(28px, 4vw, 44px);
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.page-banner::before {
  content: "";
  position: absolute; inset: 0;
  background: url("../img/svg/hero-bg.svg") center/cover no-repeat;
  opacity: 0.6;
  z-index: -1;
}
.page-banner h1 { color: #FFFFFF; margin-bottom: 12px; }
.page-banner p { color: #CBD5E1; max-width: 70ch; font-size: 1.05rem; margin: 0; }
.page-banner .eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #67E8F9;
  margin-bottom: 14px;
}

/* ---------- Cards ---------- */
.card {
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: transform 0.2s var(--ease), box-shadow 0.25s var(--ease), border-color 0.25s var(--ease);
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(0, 102, 204, 0.4);
}
.card__icon {
  width: 56px;
  height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(0, 102, 204, 0.1), rgba(16, 185, 129, 0.12));
  color: var(--c-brand);
  margin-bottom: 18px;
}
.card__icon svg { width: 30px; height: 30px; }
.card h3 { margin-bottom: 8px; }
.card p { color: var(--c-text-2); margin-bottom: 0; }
.card a.card__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  font-weight: 600;
  font-size: 0.92rem;
}
.card a.card__link::after { content: "→"; transition: transform 0.2s var(--ease); }
.card a.card__link:hover::after { transform: translateX(3px); }

.card--featured {
  background: var(--grad-hero);
  color: #FFFFFF;
  border-color: transparent;
}
.card--featured h3 { color: #FFFFFF; }
.card--featured p { color: #CBD5E1; }
.card--featured .card__icon {
  background: rgba(6, 182, 212, 0.2);
  color: #67E8F9;
}

/* ---------- Stats ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
@media (max-width: 480px) {
  .stats { grid-template-columns: 1fr; }
}
.stat {
  text-align: center;
  padding: 20px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
}
.stat__value {
  font-size: 2rem;
  font-weight: 800;
  background: linear-gradient(90deg, #06B6D4, #10B981);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.stat__label {
  font-size: 0.82rem;
  color: #94A3B8;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 4px;
}

/* ---------- Member cards ---------- */
.member {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: 28px 20px;
  transition: transform 0.2s var(--ease), box-shadow 0.25s var(--ease);
}
.member:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.member__avatar {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: var(--grad-brand);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 700;
  color: #FFFFFF;
  margin-bottom: 18px;
  position: relative;
  overflow: hidden;
}
.member__avatar img { width: 100%; height: 100%; object-fit: cover; }
.member__name { font-weight: 700; font-size: 1.08rem; margin-bottom: 4px; }
.member__role {
  font-size: 0.85rem;
  color: var(--c-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 10px;
}
.member__topic { font-size: 0.92rem; color: var(--c-text-2); margin-bottom: 12px; }
.member__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  margin: 0 0 12px 0;
}
.member__tag {
  display: inline-block;
  padding: 2px 9px;
  font-family: var(--ff-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  border-radius: 999px;
  border: 1px solid var(--c-border);
  background: var(--c-bg);
  color: var(--c-text-2);
  white-space: nowrap;
}
.member__tag--program {
  border-color: rgba(0, 102, 204, 0.25);
  background: rgba(0, 102, 204, 0.06);
  color: var(--c-brand);
}
.member__tag--scholarship {
  border-color: rgba(16, 185, 129, 0.3);
  background: rgba(16, 185, 129, 0.07);
  color: #047857;
}
.member__degree {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  margin: 0 0 12px 0;
  padding: 8px 14px;
  border: 1px solid rgba(10, 37, 64, 0.18);
  background: rgba(10, 37, 64, 0.05);
  border-radius: 8px;
  font-family: var(--ff-mono);
  line-height: 1.2;
}
.member__degree-level {
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--c-ink);
}
.member__degree-area {
  font-size: 0.78rem;
  color: var(--c-text-2);
}
.member__degree-year {
  font-size: 0.72rem;
  color: var(--c-muted);
}
.member__links { display: flex; gap: 10px; }
.member__links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--c-bg-soft);
  color: var(--c-text-2);
  border: 1px solid var(--c-border);
  transition: all 0.2s var(--ease);
}
.member__links a:hover { background: var(--c-brand); color: #FFFFFF; border-color: var(--c-brand); }

/* ---------- Publications ---------- */
.pub-toolbar {
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
  margin-bottom: 18px;
}
.pub-search {
  position: relative;
  display: flex;
  align-items: center;
  width: min(640px, 100%);
  background: #FFFFFF;
  border: 1px solid var(--c-border);
  border-radius: 999px;
  padding: 0 14px;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.pub-search:focus-within {
  border-color: var(--c-brand);
  box-shadow: 0 0 0 4px rgba(0, 102, 204, 0.12);
}
.pub-search__icon { color: var(--c-muted); flex-shrink: 0; }
.pub-search input[type="search"] {
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  padding: 12px 8px;
  font: inherit;
  color: var(--c-text);
  min-width: 0;
}
.pub-search input[type="search"]::-webkit-search-decoration,
.pub-search input[type="search"]::-webkit-search-cancel-button { -webkit-appearance: none; }
.pub-search input[type="search"]::placeholder { color: var(--c-muted); opacity: 0.85; }
.pub-search__clear {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--c-muted);
  cursor: pointer;
  transition: background 0.15s var(--ease), color 0.15s var(--ease);
}
.pub-search__clear:hover { background: var(--c-border); color: var(--c-text); }
.pub-count {
  text-align: center;
  font-size: 0.85rem;
  color: var(--c-muted);
  margin-bottom: 18px;
  font-variant-numeric: tabular-nums;
}
.pub-empty {
  text-align: center;
  color: var(--c-muted);
  padding: 32px 0;
  font-size: 0.95rem;
}
.pub-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 0;
  justify-content: center;
}
.pub-filter button {
  padding: 8px 16px;
  background: transparent;
  border: 1px solid var(--c-border);
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--c-text-2);
  cursor: pointer;
  transition: all 0.2s var(--ease);
}
.pub-filter button:hover { border-color: var(--c-brand); color: var(--c-brand); }
.pub-filter button.active {
  background: var(--grad-brand);
  color: #FFFFFF;
  border-color: transparent;
}

.pub-list { display: flex; flex-direction: column; gap: 14px; }
.pub-item {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 24px;
  padding: 20px 24px;
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.pub-item:hover { border-color: rgba(0, 102, 204, 0.4); box-shadow: var(--shadow-sm); }
.pub-item__year {
  font-family: var(--ff-mono);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--c-brand);
  border-right: 1px solid var(--c-border);
  padding-right: 18px;
  align-self: start;
}
.pub-item__title {
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--c-text);
  margin-bottom: 6px;
}
.pub-item__authors {
  font-size: 0.88rem;
  color: var(--c-text-2);
  margin-bottom: 4px;
}
.pub-item__journal {
  font-size: 0.88rem;
  color: var(--c-muted);
  font-style: italic;
}
.pub-item__doi {
  display: inline-block;
  margin-top: 8px;
  font-size: 0.82rem;
  font-family: var(--ff-mono);
  color: var(--c-cyan);
}
@media (max-width: 600px) {
  .pub-item { grid-template-columns: 1fr; gap: 8px; }
  .pub-item__year { border-right: 0; padding-right: 0; }
}

/* ---------- News ---------- */
.news-list { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.news-item {
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: transform 0.2s var(--ease), box-shadow 0.25s var(--ease);
}
.news-item:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.news-item__date {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--c-cyan);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 10px;
}
.news-item h3 { font-size: 1.1rem; margin-bottom: 8px; }
.news-item p { font-size: 0.95rem; color: var(--c-text-2); margin: 0; }
.news-item__photo { margin: 0 0 16px; border-radius: var(--radius); overflow: hidden; }
.news-item__photo img { width: 100%; height: auto; display: block; border-radius: var(--radius); }
.news-item__photo figcaption { font-size: 0.78rem; color: var(--c-muted); margin-top: 8px; font-style: italic; line-height: 1.5; }
.news-item__links { list-style: none; padding: 0; margin: 16px 0 0; display: flex; flex-wrap: wrap; gap: 8px 14px; }
.news-item__links li { font-size: 0.86rem; }
.news-item__links a { color: var(--c-brand); font-weight: 500; }
.news-item__links a:hover { color: var(--c-cyan); text-decoration: underline; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--c-bg-darker);
  color: #94A3B8;
  padding: 64px 0 24px;
}
.site-footer a { color: #CBD5E1; }
.site-footer a:hover { color: var(--c-cyan); }
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 500px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-grid h4 {
  color: #FFFFFF;
  font-size: 0.86rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 14px;
}
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.footer-grid li a { font-size: 0.92rem; }
.footer-brand img { height: 42px; width: auto; margin-bottom: 14px; filter: brightness(0) invert(1); }
.footer-brand p { color: #94A3B8; font-size: 0.92rem; max-width: 38ch; text-align: justify; hyphens: auto; }
.footer-bottom {
  border-top: 1px solid rgba(148, 163, 184, 0.15);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.82rem;
  color: #64748B;
}

.footer-counter { font-family: var(--ff-mono); font-size: 0.78rem; color: #94A3B8; }
.footer-counter strong { color: #CBD5E1; font-weight: 600; }

/* ---------- Generic prose ---------- */
.prose {
  max-width: 70ch;
  margin: 0 auto;
}
.prose h2 { margin-top: 1.6em; }
.prose h3 { margin-top: 1.4em; }
.prose ul, .prose ol { padding-left: 1.4em; color: var(--c-text-2); }
.prose li { margin-bottom: 0.4em; }
.prose blockquote {
  border-left: 3px solid var(--c-cyan);
  padding-left: 1em;
  margin: 1.4em 0;
  color: var(--c-text-2);
  font-style: italic;
}

/* Two-column research topic */
.topic {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 40px;
  align-items: center;
  padding: clamp(40px, 6vw, 64px) 0;
  border-bottom: 1px solid var(--c-border);
}
.topic:last-child { border-bottom: 0; }
.topic--reverse .topic__visual { order: 2; }
.topic--reverse .topic__content { order: 1; }
@media (max-width: 800px) {
  .topic, .topic--reverse { grid-template-columns: 1fr; }
  .topic--reverse .topic__visual,
  .topic--reverse .topic__content { order: initial; }
}
.topic__visual {
  background: linear-gradient(135deg, rgba(0,102,204,0.06), rgba(16,185,129,0.08));
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 220px;
}
.topic__content h3 { font-size: 1.5rem; margin-bottom: 12px; }
.topic__tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.topic__tag {
  font-size: 0.78rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--c-bg-alt);
  color: var(--c-text-2);
}
.topic__sublist {
  list-style: none;
  padding: 0;
  margin: 16px 0 0 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.topic__sublist li {
  padding: 10px 14px;
  border-left: 3px solid var(--c-brand);
  background: var(--c-soft, rgba(0, 102, 204, 0.04));
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--c-text-2);
}
.topic__sublist li strong { color: var(--c-text); }
.topic__sublist li strong::after { content: ": "; color: var(--c-text); }
.topic__sublist li i { color: var(--c-muted); }

/* ---------- Projects ---------- */
.project__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.project__period {
  font-family: var(--ff-mono);
  font-size: 0.86rem;
  color: var(--c-muted);
  font-weight: 600;
}
.project__funders {
  font-size: 0.92rem;
  color: var(--c-text-2);
  margin-bottom: 12px;
}
.project__funders strong { color: var(--c-text); font-weight: 600; }
.project__desc {
  font-size: 0.92rem;
  color: var(--c-text-2);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-align: justify;
}
.project__desc.is-expanded {
  display: block;
  -webkit-line-clamp: unset;
  overflow: visible;
}
.project__more {
  appearance: none;
  background: none;
  border: 0;
  padding: 6px 0 0 0;
  margin: 0;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--c-brand);
  cursor: pointer;
  align-self: flex-start;
}
.project__more:hover { color: var(--c-cyan); }
.project__more::after {
  content: " ▾";
  font-size: 0.8em;
  display: inline-block;
  transition: transform 0.15s var(--ease);
}
.project__more.is-expanded::after { content: " ▴"; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.badge--ongoing {
  background: rgba(16, 185, 129, 0.12);
  color: #047857;
  border: 1px solid rgba(16, 185, 129, 0.3);
}
.badge--ongoing::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #10B981;
  box-shadow: 0 0 8px #10B981;
}
.badge--finished {
  background: rgba(100, 116, 139, 0.1);
  color: #475569;
  border: 1px solid rgba(100, 116, 139, 0.25);
}

/* ---------- Infrastructure / specs ---------- */
.specs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin: 24px 0;
}
.spec {
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 18px;
}
.spec__label {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-muted);
  margin-bottom: 6px;
}
.spec__value {
  font-family: var(--ff-mono);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--c-text);
}
.spec__note {
  margin-top: 6px;
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--c-muted);
}
/* Uso ao vivo do cluster (dados de data/cluster_status.json) */
.spec__usage {
  margin-top: 10px;
  font-size: 0.8rem;
  color: var(--c-muted);
}
.spec__usage-pct {
  font-family: var(--ff-mono);
  font-weight: 700;
  color: var(--c-brand);
  display: block;
}
.spec__slash {
  color: var(--c-muted);
  font-weight: 400;
  margin: 0 1px;
}
.spec__metric {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-top: 10px;
  font-size: 0.8rem;
  color: var(--c-muted);
}
.spec__metric-name {
  font-weight: 600;
}
.spec__cpu-bars {
  display: flex;
  gap: 14px;
}
.spec__cpu-col {
  flex: 1;
  min-width: 0;
}
.spec__cpu-col .spec__metric {
  margin-top: 8px;
}
.spec__bar {
  margin-top: 6px;
  height: 5px;
  border-radius: 999px;
  background: var(--c-border);
  overflow: hidden;
}
.spec__bar-fill {
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: var(--grad-brand);
  transition: width 0.6s ease;
}
/* CPU: uso total (barra horizontal, no slot do "Físico") + 11 mini-barras por nó (slot do "SMT") */
.spec__cpu {
  display: flex;
  align-items: flex-end;        /* pés das mini-barras na mesma altura da barra horizontal */
  justify-content: space-between;
  gap: 14px;
}
.spec__cpu-main {
  flex: 1;
  min-width: 0;
}
.spec__nodebars {
  display: flex;
  align-items: flex-end;        /* barras crescem de baixo p/ cima */
  gap: 3px;
  height: 52px;                 /* sobem até ficarem vizinhas do 352 */
}
.spec__nodebar {
  flex: 1 1 0;
  min-width: 0;
  height: 100%;
  border-radius: 999px;
  background: var(--c-border);
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}
.spec__nodebar-fill {
  width: 100%;
  border-radius: 999px;
  background: var(--grad-brand);
  transition: height 0.6s ease;
}
/* GPU: barra principal (partes) + 6 barras verticais secundárias — mesma largura (~5px) das 11 dos outros cards.
   Reaproveita .spec__nodebars/.spec__nodebar; só fixa a largura do grupo e distingue Mem/potência. */
.spec__gpubars {
  width: 53px;                   /* 6 barras de ~5px + gaps de 3px + respiro do grupo Mem/W */
}
.spec__gpubars .is-total {
  margin-left: 8px;              /* separa memória-total + potência das 4 partições */
}
.spec__gpubars .is-total .spec__nodebar-fill {
  background: var(--grad-brand);
  opacity: 0.65;
}
.spec__gpubars .is-power .spec__nodebar-fill {
  background: #e0932f;           /* potência: âmbar, distinta da memória */
}
.specs__updated {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 4px;
  font-size: 0.78rem;
  color: var(--c-muted);
}
.specs__updated .live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--c-emerald);
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5);
  animation: live-pulse 2s infinite;
}
@keyframes live-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5); }
  70%  { box-shadow: 0 0 0 7px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .specs__updated .live-dot { animation: none; }
}
.cluster-summary {
  margin: 12px 0 24px 0;
  padding: 14px 18px;
  border-left: 3px solid var(--c-brand);
  background: var(--c-soft, rgba(0, 102, 204, 0.04));
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--c-text-2);
  font-size: 0.95rem;
}
.cluster-summary code {
  font-family: var(--ff-mono);
  font-size: 0.88em;
  background: rgba(0, 102, 204, 0.08);
  padding: 1px 6px;
  color: var(--c-primary);
}

/* ---------- Teaching: turmas atuais ---------- */
.course-current {
  padding: 28px;
  background: linear-gradient(135deg, #0066CC 0%, #0B3D6E 70%);
  color: #FFFFFF;
  border-color: transparent;
}
.course-current h3,
.course-current h4 { color: #FFFFFF; }
.course-current p { color: #E2E8F0; }
.course-current a { color: #67E8F9; text-decoration: underline; text-decoration-color: rgba(103, 232, 249, 0.4); }
.course-current a:hover { color: #FFFFFF; text-decoration-color: #FFFFFF; }
.course-current .btn--primary {
  background: rgba(255, 255, 255, 0.95);
  color: var(--c-brand);
  border-color: transparent;
}
.course-current .btn--primary:hover { background: #FFFFFF; color: var(--c-primary); }
.course-current__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}
.course-current__head h3 { margin: 0 0 4px 0; font-size: 1.35rem; }
.course-current__sub { color: #BAE6FD; font-size: 0.92rem; }
.course-current__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  margin-top: 8px;
}
@media (max-width: 700px) { .course-current__grid { grid-template-columns: 1fr; } }
.course-current__grid h4 {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #67E8F9;
  margin: 0 0 8px 0;
  font-weight: 700;
}
.course-current__list {
  list-style: none;
  padding: 0;
  margin: 4px 0 0 0;
  font-size: 0.95rem;
  color: #E2E8F0;
}
.course-current__list li { padding: 4px 0; }

/* ---------- Teaching: historico ---------- */
.course-history {
  overflow-x: auto;
  margin-top: 12px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
}
.course-history table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.course-history th, .course-history td {
  padding: 8px 12px;
  text-align: left;
  border-bottom: 1px solid var(--c-border);
}
.course-history th {
  background: var(--c-bg-soft);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--c-muted);
  font-weight: 700;
}
.course-history tr:last-child td { border-bottom: 0; }
.course-history td:first-child { font-family: var(--ff-mono); color: var(--c-brand); font-weight: 600; }
.course-history td:nth-child(2) { font-family: var(--ff-mono); font-size: 0.82rem; color: var(--c-muted); }

/* ---------- Contact ---------- */
.contact-grid { display: grid; gap: 24px; align-items: stretch; }
.contact-grid--3col { grid-template-columns: 1fr 1.3fr 2.5fr; }
@media (max-width: 800px) {
  .contact-grid, .contact-grid--3col { grid-template-columns: 1fr; }
}
.contact-map {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--c-border);
  min-height: 260px;
  height: 100%;
}
.contact-map iframe { width: 100%; height: 100%; border: 0; min-height: 260px; }
.contact-grid--3col .contact-form-wrap { max-width: none; margin: 0; }
.contact-grid--3col .contact-form-head { text-align: left; margin-bottom: 16px; }
.contact-grid--3col .contact-form-head h2 { font-size: 1.4rem; }
.contact-grid--3col .contact-form { gap: 12px; }
.contact-grid--3col .form-field textarea { min-height: 110px; }

.topic__visual img { max-width: 100%; max-height: 260px; width: 100%; height: auto; object-fit: contain; }
.contact-grid .contact-map { min-height: 320px; }

/* ---------- Software list (Infraestrutura) ---------- */
.software-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  margin-top: 12px;
}
.software {
  display: flex;
  align-items: center;
  padding: 10px 14px;
  background: #FFFFFF;
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
.software:hover {
  border-color: var(--c-cyan);
  box-shadow: var(--shadow-sm);
}
.software__name {
  font-weight: 700;
  font-family: var(--ff-mono);
  font-size: 0.92rem;
  color: var(--c-primary);
  line-height: 1.25;
}
.software__role {
  font-size: 0.78rem;
  color: var(--c-muted);
  margin-top: 2px;
  line-height: 1.3;
}

/* ---------- Form fields (Contact) ---------- */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
@media (max-width: 640px) { .form-row { grid-template-columns: 1fr; } }

.form-field {
  display: flex;
  flex-direction: column;
}
.form-field label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--c-text-2);
  margin-bottom: 6px;
}
.form-field input,
.form-field textarea {
  font: inherit;
  font-size: 0.95rem;
  color: var(--c-text);
  background: #FFFFFF;
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 10px 12px;
  width: 100%;
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
  resize: vertical;
}
.form-field textarea { min-height: 140px; line-height: 1.5; }
.form-field input:focus,
.form-field textarea:focus {
  outline: 0;
  border-color: var(--c-brand);
  box-shadow: 0 0 0 4px rgba(0, 102, 204, 0.12);
}
.form-field input[aria-invalid="true"],
.form-field textarea[aria-invalid="true"] {
  border-color: #DC2626;
  box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.10);
}

.form-error {
  margin: 6px 0 0 0;
  font-size: 0.82rem;
  color: #DC2626;
  display: none;
}
.form-error.is-visible { display: block; }

.form-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 8px;
  flex-wrap: wrap;
}
.form-status {
  font-size: 0.92rem;
  color: var(--c-muted);
}
.form-status.is-busy    { color: var(--c-muted); }
.form-status.is-success { color: var(--c-emerald); font-weight: 600; }
.form-status.is-error   { color: #DC2626;        font-weight: 600; }

/* ---------- Fade-up animation (hero / on-scroll reveal) ---------- */
.fade-up {
  opacity: 0;
  transform: translateY(14px);
  animation: fadeUp 0.7s var(--ease) forwards;
}
.fade-up.delay-1 { animation-delay: 0.10s; }
.fade-up.delay-2 { animation-delay: 0.22s; }
.fade-up.delay-3 { animation-delay: 0.34s; }
@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .fade-up { animation: none; opacity: 1; transform: none; }
}
/* ── Infraestrutura: tutoriais de execução (módulos, SLURM) ───────────── */
.codeblock {
  background: var(--c-bg-darker);
  color: #E2E8F0;
  font-family: var(--ff-mono);
  font-size: 0.84rem;
  line-height: 1.7;
  padding: 1.1rem 1.3rem;
  border-radius: var(--radius);
  overflow-x: auto;
  margin: 0.9rem 0 1.6rem;
  box-shadow: var(--shadow-sm);
  tab-size: 2;
}
.callout {
  background: var(--c-bg-alt);
  border-left: 3px solid var(--c-brand);
  border-radius: var(--radius);
  padding: 0.9rem 1.2rem;
  margin: 0.9rem 0 1.6rem;
}
.callout p { margin: 0; color: var(--c-text-2); }
.callout code { background: rgba(255, 255, 255, 0.7); }
.run-table { overflow-x: auto; margin: 0.9rem 0 1.6rem; }
.run-table table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.run-table th, .run-table td {
  text-align: left;
  padding: 0.6rem 0.9rem;
  border-bottom: 1px solid var(--c-border);
  color: var(--c-text-2);
}
.run-table th {
  font-weight: 700;
  color: var(--c-primary);
  border-bottom: 2px solid var(--c-border);
}
.run-table tr:last-child td { border-bottom: 0; }
.run-table td:first-child { white-space: nowrap; }

/* Links de manual nos cards de software */
.software__name a { color: inherit; text-decoration: none; border-bottom: 1px dotted var(--c-border); transition: color .15s var(--ease), border-color .15s var(--ease); }
.software__name a:hover { color: var(--c-brand); border-bottom-color: var(--c-brand); }
.software__name a::after { content: " \2197"; font-size: .72em; color: var(--c-muted); vertical-align: super; }

/* Callout de alerta (multi-nó / banda) */
.callout--warn { border-left-color: #D97706; background: #FFFBEB; }
.callout--warn code { background: rgba(255,255,255,0.75); }

/* Link dentro de callout (ex.: download do exemplo) */
.callout a { color: var(--c-brand); font-weight: 600; text-decoration: none; border-bottom: 1px solid currentColor; }
.callout a:hover { color: var(--c-cyan); }

/* Botão de download (exemplo de referência) */
.callout a.dl-btn {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--c-brand);
  color: #fff;
  border-radius: var(--radius);
  font-weight: 600;
  border-bottom: 0;
  transition: background .15s var(--ease);
}
.callout a.dl-btn:hover { background: var(--c-cyan); color: #fff; }

/* Lista de downloads por código (exemplo de referência) */
.dl-list { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.8rem; }
a.dl-chip {
  display: inline-block;
  padding: 0.35rem 0.8rem;
  background: var(--c-bg);
  color: var(--c-brand);
  border: 1px solid var(--c-border);
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: border-color .15s var(--ease), color .15s var(--ease), background .15s var(--ease);
}
a.dl-chip::before { content: "↓ "; color: var(--c-muted); }
a.dl-chip:hover { border-color: var(--c-brand); color: var(--c-cyan); }
a.dl-chip--all { background: var(--c-brand); color: #fff; border-color: var(--c-brand); }
a.dl-chip--all::before { color: rgba(255,255,255,0.8); }
a.dl-chip--all:hover { background: var(--c-cyan); border-color: var(--c-cyan); color: #fff; }

/* Downloads de exemplo em linha */
.dl-inline { display: flex; flex-direction: column; gap: 0.45rem; align-items: flex-start; margin-top: 0.5rem; }
.dl-inline a { color: var(--c-brand); font-weight: 600; text-decoration: none; font-size: 0.92rem; }
.dl-inline a::before { content: "↓ "; color: var(--c-muted); font-weight: 400; }
.dl-inline a:hover { color: var(--c-cyan); text-decoration: underline; }
.dl-inline a.dl-all { color: var(--c-emerald); margin-top: 0.2rem; }
