/* ============================================
   Pedro Munari - Start Bootstrap Resume Style
   Professional template-based design
   ============================================ */

:root {
  --color-primary: #343a40;
  --color-accent: #bd5d38;
  --color-accent-hover: #a04a2b;
  --color-text: #212529;
  --color-text-muted: #6c757d;
  --color-bg: #ffffff;
  --color-bg-alt: #f8f9fa;
  --color-border: #dee2e6;
}

/* Google Fonts - Saira + Open Sans (Resume-style) */
@import url('https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,400;0,600;0,700;1,400&family=Saira+Extra+Condensed:wght@500;600;700&display=swap');

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
}

h1, h2, h3, h4 {
  font-family: 'Saira Extra Condensed', sans-serif;
  font-weight: 600;
  color: var(--color-primary);
  text-transform: uppercase;
  letter-spacing: 0.05rem;
}
h1 { font-size: 2.25rem; margin: 0 0 0.5rem; }
h2 { font-size: 1.3rem; margin: 2rem 0 1rem; padding-bottom: 0.5rem; border-bottom: 3px solid var(--color-accent); }
h3 { font-size: 0.95rem; margin: 1.5rem 0 0.5rem; }
h4 { font-size: 0.9rem; margin: 1rem 0 0.25rem; }
p { margin: 0 0 1rem; }
a { color: var(--color-accent); text-decoration: none; }
a:hover { color: var(--color-accent-hover); text-decoration: underline; }

/* Layout: Sidebar + Main */
.resume-wrapper {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
}
@media (min-width: 992px) {
  .resume-wrapper { flex-direction: row; }
}

/* Sidebar */
.resume-sidebar {
  background: var(--color-primary);
  color: rgba(255,255,255,0.9);
  padding: 2rem;
  position: relative;
}
@media (min-width: 992px) {
  .resume-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    min-height: 100vh;
    flex-shrink: 0;
  }
}

.resume-sidebar a { color: rgba(255,255,255,0.8); }
.resume-sidebar a:hover { color: #fff; text-decoration: none; }

.sidebar-profile {
  text-align: center;
  margin-bottom: 2rem;
}
@media (min-width: 992px) {
  .sidebar-profile { text-align: left; }
}

.sidebar-photo {
  width: 180px;
  height: 180px;
  border-radius: 4px;
  object-fit: cover;
  border: 2px solid rgba(255,255,255,0.2);
  margin-bottom: 1rem;
}
.sidebar-name {
  font-family: 'Saira Extra Condensed', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05rem;
}
.sidebar-contact {
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
  line-height: 1.8;
}
.sidebar-contact .mb-1 { margin-bottom: 0.25rem; }

.sidebar-nav {
  list-style: none;
  padding: 0;
  margin: 0;
}
.sidebar-nav li { margin-bottom: 0.5rem; }
.sidebar-nav a {
  display: block;
  padding: 0.5rem 0;
  font-family: 'Saira Extra Condensed', sans-serif;
  font-size: 1.1rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05rem;
  border-left: 3px solid transparent;
  padding-left: 1rem;
  transition: all 0.2s;
}
.sidebar-nav a:hover,
.sidebar-nav a.active {
  color: var(--color-accent);
  border-left-color: var(--color-accent);
  padding-left: 1.25rem;
}

.lang-switch {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255,255,255,0.2);
  font-size: 0.9rem;
}
.lang-switch .active { color: var(--color-accent) !important; font-weight: 600; }

/* Main content */
.resume-main {
  flex: 1;
  padding: 2rem;
  padding-left: 2rem;
}
@media (min-width: 992px) {
  .resume-main {
    margin-left: 280px;
    padding: 3rem 4rem 4rem;
  }
}

/* Section spacing */
.resume-section { margin-bottom: 3rem; }
.resume-section:last-child { margin-bottom: 0; }

/* Experience/Education items */
.resume-item {
  margin-bottom: 2rem;
}
.resume-item:last-child { margin-bottom: 0; }
.resume-item-title {
  font-family: 'Saira Extra Condensed', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-primary);
  text-transform: uppercase;
  margin-bottom: 0.25rem;
}
.resume-item-subtitle {
  font-size: 1rem;
  color: var(--color-accent);
  font-weight: 600;
  margin-bottom: 0.5rem;
}
.resume-item-date {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-bottom: 0.75rem;
}
.resume-item-desc { font-size: 0.95rem; }

/* Publications */
.pub-list { list-style: none; padding: 0; margin: 0; }
.pub-item {
  padding: 1rem 0;
  border-bottom: 1px solid var(--color-border);
  font-size: 0.95rem;
}
.pub-item:last-child { border-bottom: none; }
.pub-item .authors { color: var(--color-text-muted); font-size: 0.9rem; }
.pub-item .title { font-weight: 600; color: var(--color-text); margin: 0.25rem 0; }
.pub-item .venue { color: var(--color-text-muted); font-size: 0.9rem; }
.pub-item .links { margin-top: 0.25rem; font-size: 0.85rem; }
.pub-item .links a { margin-right: 1rem; }

/* Course schedule */
.course-schedule { margin: 1rem 0; }
.course-week {
  display: grid;
  gap: 1rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--color-border);
}
.course-week:last-child { border-bottom: none; }
@media (min-width: 600px) {
  .course-week { grid-template-columns: 170px 1fr; }
}
.course-week-date {
  font-weight: 600;
  color: var(--color-primary);
}
.course-week-content p { margin-bottom: 0.5rem; }

/* Project paper blocks */
.project-paper {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--color-border);
}
.project-paper:last-child { border-bottom: none; }
.project-paper p { margin-bottom: 0.75rem; }
.project-paper p:last-child { margin-bottom: 0; }

/* Links page list */
.links-page-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0;
}
.links-page-list li {
  margin-bottom: 0.5rem;
}
.links-page-list a {
  font-weight: 500;
}

/* Lists */
ul:not(.sidebar-nav):not(.pub-list):not(.links-page-list) {
  padding-left: 1.25rem;
  margin: 0 0 1rem;
}

/* Grant / Award items */
.grant-item, .award-item {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--color-border);
}
.grant-item:last-child, .award-item:last-child { border-bottom: none; }
.grant-item strong, .award-item strong { display: block; margin-bottom: 0.25rem; }

/* Link grid */
.link-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.75rem;
  margin: 1rem 0;
}
.link-card {
  display: block;
  padding: 1rem;
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: 4px;
  font-size: 0.9rem;
  text-align: center;
  color: var(--color-text);
  transition: all 0.2s;
}
.link-card:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
  background: #fff;
  text-decoration: none;
}

/* Visual link cards with logo and username */
.link-visual-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin: 1rem 0;
}
.link-visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1.25rem 1rem;
  min-width: 140px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  color: var(--color-text);
  text-decoration: none;
  transition: all 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.link-visual:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
  box-shadow: 0 4px 12px rgba(189,93,56,0.15);
  transform: translateY(-2px);
  text-decoration: none;
}
.link-visual-icon {
  width: 36px;
  height: 36px;
  object-fit: contain;
}
.link-visual-name {
  font-weight: 600;
  font-size: 0.9rem;
}
.link-visual-user {
  font-size: 0.8rem;
  color: var(--color-text-muted);
}
.link-visual:hover .link-visual-user {
  color: var(--color-accent);
}

/* Reviewer list */
.reviewer-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0;
}
.reviewer-list span {
  padding: 0.3rem 0.6rem;
  background: var(--color-bg-alt);
  border-radius: 4px;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
}
/* Reviewer funding agencies — cards mais destacados */
.reviewer-funding {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}
@media (max-width: 480px) {
  .reviewer-funding { grid-template-columns: 1fr; }
  .link-visual { min-width: 120px; padding: 1rem 0.75rem; }
  .resume-main { padding: 1rem; }
  .resume-sidebar { padding: 1.5rem; }
  .pub-tabs .tab-labels label { padding: 0.5rem 0.75rem; font-size: 0.9rem; }
}
.reviewer-funding span {
  padding: 1rem 1.25rem;
  font-size: 0.95rem;
  color: var(--color-text);
  background: var(--color-bg);
  border-left: 4px solid var(--color-accent);
  line-height: 1.5;
}

/* Video embed */
.video-embed-wrapper {
  display: flex;
  justify-content: center;
  margin: 1.5rem auto;
  width: 100%;
  max-width: 600px;
}
.video-embed-wrapper > div {
  width: 100%;
  max-width: 100%;
}
.video-embed-wrapper iframe {
  max-width: 100%;
  width: 100%;
  height: auto;
  aspect-ratio: 600 / 470;
  display: block;
}
.video-thumbnail-link {
  display: block;
  max-width: 560px;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  transition: box-shadow 0.2s, transform 0.2s;
}
.video-thumbnail-link:hover {
  box-shadow: 0 6px 16px rgba(0,0,0,0.15);
  transform: scale(1.02);
  text-decoration: none;
}
.video-thumbnail-link img {
  display: block;
  width: 100%;
  height: auto;
}

/* Section with image */
.section-with-image {
  display: grid;
  gap: 2rem;
  align-items: start;
}
@media (min-width: 768px) {
  .section-with-image { grid-template-columns: 320px 1fr; }
}
.section-image {
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
}

/* Bio grid */
.bio-grid { display: grid; gap: 2rem; }
@media (min-width: 768px) { .bio-grid { grid-template-columns: 1fr 1fr; } }

/* Expertise cards */
.expertise {
  display: grid;
  gap: 1.5rem;
  margin: 1.5rem 0;
}
@media (min-width: 600px) {
  .expertise { grid-template-columns: 1fr 1fr; }
}
.expertise-col {
  padding: 1.5rem;
  background: var(--color-bg-alt);
  border-radius: 4px;
  border-left: 4px solid var(--color-accent);
}
.expertise-col h3 { font-size: 1.1rem; margin-top: 0; }
.expertise-col ul { margin: 0; padding-left: 1.2rem; }

/* Highlights */
.highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: center;
  margin: 2rem 0;
  padding: 2rem;
  background: var(--color-bg-alt);
  border-radius: 4px;
}
.highlight-item { text-align: center; }
.highlight-item .number {
  font-family: 'Saira Extra Condensed', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-accent);
  display: block;
}
.highlight-item .label { color: var(--color-text-muted); font-size: 0.9rem; }

/* Year groups in publications */
.pub-year { font-size: 1.1rem; font-weight: 600; margin: 1.5rem 0 0.75rem; color: var(--color-primary); }
.pub-year:first-child { margin-top: 0; }

/* Publication tabs */
.pub-tabs input { display: none; }
.pub-tabs .tab-labels {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 2px solid var(--color-border);
}
.pub-tabs .tab-labels label {
  padding: 0.75rem 1.25rem;
  font-family: 'Saira Extra Condensed', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  cursor: pointer;
  color: var(--color-text-muted);
  background: transparent;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: color 0.2s, border-color 0.2s;
}
.pub-tabs .tab-labels label:hover { color: var(--color-primary); }
.pub-tabs input:nth-of-type(1):checked ~ .tab-labels label:nth-of-type(1),
.pub-tabs input:nth-of-type(2):checked ~ .tab-labels label:nth-of-type(2),
.pub-tabs input:nth-of-type(3):checked ~ .tab-labels label:nth-of-type(3),
.pub-tabs input:nth-of-type(4):checked ~ .tab-labels label:nth-of-type(4),
.pub-tabs input:nth-of-type(5):checked ~ .tab-labels label:nth-of-type(5),
.pub-tabs input:nth-of-type(6):checked ~ .tab-labels label:nth-of-type(6),
.pub-tabs input:nth-of-type(7):checked ~ .tab-labels label:nth-of-type(7),
.pub-tabs input:nth-of-type(8):checked ~ .tab-labels label:nth-of-type(8),
.pub-tabs input:nth-of-type(9):checked ~ .tab-labels label:nth-of-type(9),
.pub-tabs input:nth-of-type(10):checked ~ .tab-labels label:nth-of-type(10),
.pub-tabs input:nth-of-type(11):checked ~ .tab-labels label:nth-of-type(11) {
  color: var(--color-accent);
  border-bottom-color: var(--color-accent);
}
.pub-tabs .tab-panel { display: none; }
/* tab-labels is 1st div, panels are 2nd–12th div */
.pub-tabs input:nth-of-type(1):checked ~ .tab-panel:nth-of-type(2),
.pub-tabs input:nth-of-type(2):checked ~ .tab-panel:nth-of-type(3),
.pub-tabs input:nth-of-type(3):checked ~ .tab-panel:nth-of-type(4),
.pub-tabs input:nth-of-type(4):checked ~ .tab-panel:nth-of-type(5),
.pub-tabs input:nth-of-type(5):checked ~ .tab-panel:nth-of-type(6),
.pub-tabs input:nth-of-type(6):checked ~ .tab-panel:nth-of-type(7),
.pub-tabs input:nth-of-type(7):checked ~ .tab-panel:nth-of-type(8),
.pub-tabs input:nth-of-type(8):checked ~ .tab-panel:nth-of-type(9),
.pub-tabs input:nth-of-type(9):checked ~ .tab-panel:nth-of-type(10),
.pub-tabs input:nth-of-type(10):checked ~ .tab-panel:nth-of-type(11),
.pub-tabs input:nth-of-type(11):checked ~ .tab-panel:nth-of-type(12) { display: block; }

@media print {
  .resume-sidebar { position: static; width: auto; }
  .resume-main { margin-left: 0; }
}
