/* ================================================================
   1. COMPUTER MODERN UNICODE — Self-hosted
   ================================================================ */
@font-face {
  font-family: 'CMU Serif';
  src: url('../assets/fonts/cmunrm.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'CMU Serif';
  src: url('../assets/fonts/cmunbx.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'CMU Serif';
  src: url('../assets/fonts/cmunti.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'CMU Serif';
  src: url('../assets/fonts/cmunbi.woff2') format('woff2');
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'CMU Typewriter';
  src: url('../assets/fonts/cmuntt.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* Aplicar CMU Serif em todo o texto */
:root {
  --md-text-font:  'CMU Serif', 'Computer Modern', Georgia, serif;
  --md-code-font:  'CMU Typewriter', 'Courier New', monospace;
}

body,
.md-typeset,
.md-nav,
.md-header__title,
.md-tabs__link {
  font-family: 'CMU Serif', 'Computer Modern', Georgia, serif !important;
}

code, pre, kbd, .highlight {
  font-family: 'CMU Typewriter', 'Courier New', monospace !important;
}


/* ================================================================
   2. COR INSPER — Vermelho #C8102E
   ================================================================ */
:root,
[data-md-color-primary="custom"] {
  --md-primary-fg-color:        #C8102E;
  --md-primary-fg-color--light: #e8394f;
  --md-primary-fg-color--dark:  #9a0c23;
  --md-primary-bg-color:        #ffffff;
  --md-primary-bg-color--light: rgba(255,255,255,0.7);
  --md-accent-fg-color:         #C8102E;
}

/* Barra superior — desktop e mobile drawer */
.md-header,
.md-nav__title[for="__drawer"] {
  background-color: #C8102E !important;
}

/* Tabs de navegacao */
.md-tabs {
  background-color: #9a0c23 !important;
}
.md-tabs__link--active,
.md-tabs__link:hover {
  color: #ffffff !important;
  border-bottom: 2px solid #ffffff !important;
}

/* Links ativos no sidebar */
.md-nav__link--active {
  color: #C8102E !important;
  font-weight: 700;
}
.md-nav__link:hover {
  color: #C8102E !important;
}

/* Botoes e highlights */
.md-search__form { border-bottom: 2px solid #C8102E; }
.md-button--primary {
  background-color: #C8102E !important;
  border-color: #C8102E !important;
}

/* Progress bar */
.md-progress__bar { background-color: #C8102E !important; }


/* ================================================================
   3. PAGINA DE AUTORES
   ================================================================ */
.authors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2.5rem;
  margin: 2rem 0;
}

.author-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 2rem 1.5rem;
  border: 1px solid rgba(200,16,46,0.15);
  border-radius: 10px;
  transition: box-shadow 0.25s ease, transform 0.2s ease;
  background: var(--md-default-bg-color);
}

.author-card:hover {
  box-shadow: 0 6px 24px rgba(200,16,46,0.18);
  transform: translateY(-3px);
}

.author-photo {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  object-position: top center;
  border: 4px solid #C8102E;
  margin-bottom: 1.2rem;
}

.author-info h3 {
  margin: 0.4rem 0 0.2rem;
  font-size: 1.15rem;
  font-family: 'CMU Serif', serif;
  color: var(--md-default-fg-color);
}

.author-info .author-title {
  font-size: 0.88rem;
  color: var(--md-default-fg-color--light);
  margin-bottom: 0.8rem;
  line-height: 1.4;
}

.author-info .author-bio {
  font-size: 0.9rem;
  text-align: left;
  margin-bottom: 1rem;
  line-height: 1.6;
}

.author-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-top: 0.5rem;
}

.author-links a {
  font-size: 0.82rem;
  color: #C8102E !important;
  text-decoration: none;
  border: 1px solid #C8102E;
  border-radius: 4px;
  padding: 0.2rem 0.6rem;
  transition: background 0.2s, color 0.2s;
}

.author-links a:hover {
  background: #C8102E;
  color: #ffffff !important;
}


/* ================================================================
   4. HERO / KEY RESULT / QUICK LINKS (paper pages)
   ================================================================ */
.hero-section {
  text-align: center;
  padding: 2rem 0;
  margin-bottom: 2rem;
  border-bottom: 2px solid var(--md-primary-fg-color);
}

.hero-section h1 {
  font-size: 2.2rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 0.5rem;
}

.hero-section .subtitle {
  font-size: 1.3rem;
  color: var(--md-primary-fg-color);
  font-weight: 400;
  margin-bottom: 0.5rem;
}

.hero-section .authors {
  font-size: 1.05rem;
  color: var(--md-default-fg-color--light);
  margin-bottom: 0.3rem;
}

.hero-section .affiliation {
  font-size: 0.9rem;
  color: var(--md-default-fg-color--lighter);
  font-style: italic;
}

.key-result {
  text-align: center;
  padding: 1.5rem;
  margin: 1.5rem 0;
  background: linear-gradient(135deg, rgba(200, 16, 46, 0.08), rgba(154, 12, 35, 0.08));
  border-radius: 8px;
  border-left: 4px solid var(--md-primary-fg-color);
}

.key-result .number {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--md-primary-fg-color);
  display: block;
}

.key-result .label {
  font-size: 1rem;
  color: var(--md-default-fg-color--light);
}

.quick-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

.quick-links a {
  display: block;
  padding: 1rem 1.2rem;
  background: var(--md-code-bg-color);
  border-radius: 6px;
  text-decoration: none;
  color: var(--md-default-fg-color);
  border: 1px solid var(--md-default-fg-color--lightest);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.quick-links a:hover {
  border-color: var(--md-primary-fg-color);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.quick-links a strong {
  display: block;
  margin-bottom: 0.3rem;
  color: var(--md-primary-fg-color);
}

/* Figure captions */
figure {
  margin: 1.5rem 0;
}

figcaption {
  text-align: center;
  font-size: 0.9rem;
  color: var(--md-default-fg-color--light);
  margin-top: 0.5rem;
  font-style: italic;
}

/* Table styling */
.md-typeset table:not([class]) {
  font-size: 0.82rem;
}

.md-typeset table:not([class]) th {
  background-color: var(--md-primary-fg-color);
  color: var(--md-primary-bg-color);
  font-weight: 600;
}

/* JEL / Keywords badges */
.badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  margin: 0.15rem;
  background: var(--md-primary-fg-color--light);
  color: white;
  border-radius: 3px;
  font-size: 0.8rem;
  font-family: var(--md-code-font-family);
}

.badge-kw {
  background: var(--md-accent-fg-color);
}


/* ================================================================
   5. HOME PAGE — Profile card
   ================================================================ */
.profile-section {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  margin: 2rem 0;
}

.profile-photo {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid #C8102E;
  flex-shrink: 0;
}

.profile-info {
  flex: 1;
}

.social-links p {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin: 1rem 0 0;
}

.social-links a {
  color: #C8102E !important;
  text-decoration: none;
  font-size: 1.5rem;
  line-height: 1;
  transition: color 0.2s, transform 0.15s;
}

.social-links a:hover {
  color: #9a0c23 !important;
  transform: scale(1.15);
}

.social-links .twemoji svg {
  width: 1.5rem;
  height: 1.5rem;
}

@media (max-width: 768px) {
  .profile-section {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .social-links {
    justify-content: center;
  }
}
