/* ============================================================
   BRUNO ADRIANO — Shared Stylesheet
   brunoadriano.com
   ============================================================ */

/* ── Google Fonts are loaded per-page via <link> ── */

/* ============================================================
   DESIGN TOKENS
   ============================================================ */
:root {
  /* Brand — IRIDeS purple */
  --purple:        #51308e;
  --purple-dark:   #3b206e;
  --purple-mid:    #7a52b8;
  --purple-light:  #f3f0f9;
  --purple-border: #ddd4ee;

  /* Text */
  --text:          #1c1c28;
  --text-mid:      #44445a;
  --text-light:    #7a7a8c;

  /* Surfaces */
  --bg:            #ffffff;
  --bg-alt:        #f8f7fc;
  --border:        #e6e3f0;

  /* Shadows */
  --shadow-sm:     0 1px 4px rgba(81,48,142,0.06);
  --shadow:        0 2px 12px rgba(81,48,142,0.09);
  --shadow-md:     0 6px 28px rgba(81,48,142,0.13);

  /* Misc */
  --radius:        10px;
  --nav-h:         62px;
  --max-w:         1080px;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.72;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a           { color: var(--purple); text-decoration: none; }
a:hover     { text-decoration: underline; }
img         { max-width: 100%; display: block; }
ul, ol      { padding-left: 1.4em; }
strong      { font-weight: 600; }

/* ============================================================
   LAYOUT
   ============================================================ */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 2rem;
}

.page-body {
  padding-top: var(--nav-h);   /* offset for fixed nav */
}

/* Standard page section */
.page-section {
  padding: 72px 0;
}
.page-section--alt {
  background: var(--bg-alt);
}

/* Section heading */
.section-label {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text);
  padding-bottom: 0.55rem;
  border-bottom: 2.5px solid var(--purple);
  margin-bottom: 2rem;
}
.section-label i { color: var(--purple); font-size: 1rem; }

.section-sub {
  margin-top: -1.3rem;
  margin-bottom: 2rem;
  font-size: 0.88rem;
  color: var(--text-light);
}
.section-sub a { color: var(--purple); }

/* ============================================================
   NAVIGATION
   ============================================================ */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
}

.nav-brand {
  font-weight: 700;
  font-size: 0.98rem;
  color: var(--purple);
  letter-spacing: -0.01em;
  white-space: nowrap;
  text-decoration: none;
}
.nav-brand:hover { text-decoration: none; }

.nav-links {
  display: flex;
  gap: 0.1rem;
  align-items: center;
}
.nav-links a {
  color: var(--text-mid);
  font-size: 0.85rem;
  font-weight: 500;
  padding: 6px 13px;
  border-radius: 6px;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
  text-decoration: none;
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--purple);
  background: var(--purple-light);
}

/* Hamburger */
.nav-hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--text-mid);
  font-size: 1.15rem;
  line-height: 1;
}

/* Mobile drawer */
#mobile-nav {
  display: none;
  flex-direction: column;
  position: fixed;
  top: var(--nav-h);
  left: 0; right: 0;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 0.6rem 1rem 1rem;
  z-index: 999;
  gap: 2px;
  box-shadow: var(--shadow-md);
}
#mobile-nav.open { display: flex; }
#mobile-nav a {
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-mid);
  text-decoration: none;
}
#mobile-nav a:hover,
#mobile-nav a.active { background: var(--purple-light); color: var(--purple); }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.16s;
  white-space: nowrap;
  border: 1.5px solid transparent;
  cursor: pointer;
}
.btn:hover { text-decoration: none; }

.btn-primary {
  background: var(--purple);
  color: #fff;
  border-color: var(--purple);
}
.btn-primary:hover {
  background: var(--purple-dark);
  border-color: var(--purple-dark);
  color: #fff;
}

.btn-outline {
  background: transparent;
  color: var(--purple);
  border-color: var(--purple-border);
}
.btn-outline:hover {
  border-color: var(--purple);
  background: var(--purple-light);
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 1.5rem;
}

/* ============================================================
   SOCIAL / ICON BADGES
   ============================================================ */
.soc-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border: 1.5px solid var(--purple-border);
  border-radius: 6px;
  font-size: 0.74rem;
  font-weight: 500;
  color: var(--purple);
  background: #fff;
  text-decoration: none;
  transition: all 0.16s;
}
.soc-btn:hover {
  background: var(--purple);
  color: #fff;
  border-color: var(--purple);
  text-decoration: none;
}
.soc-btn i { font-size: 0.8rem; }

.soc-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

/* ============================================================
   TAGS / PILLS
   ============================================================ */
.tag {
  background: var(--purple-light);
  color: var(--purple-dark);
  padding: 3px 11px;
  border-radius: 20px;
  font-size: 0.76rem;
  font-weight: 500;
}
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 1.4rem;
}

/* ============================================================
   CARDS (generic)
   ============================================================ */
.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem;
  transition: box-shadow 0.18s, border-color 0.18s, transform 0.18s;
}
.card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--purple-border);
  transform: translateY(-2px);
}
.card-icon {
  width: 42px; height: 42px;
  background: var(--purple-light);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.85rem;
}
.card-icon i { color: var(--purple); font-size: 1.05rem; }
.card h3 {
  font-size: 0.94rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--text);
}
.card p {
  font-size: 0.83rem;
  color: var(--text-mid);
  line-height: 1.62;
}

/* ============================================================
   GRID HELPERS
   ============================================================ */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
}
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3.5rem;
  align-items: start;
}

/* ============================================================
   TIMELINE (CV)
   ============================================================ */
.tl-col-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 1.4rem;
}
.tl-col-title i { color: var(--purple); }

.timeline {
  position: relative;
  padding-left: 1.5rem;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 5px; top: 10px; bottom: 0;
  width: 2px;
  background: var(--purple-border);
}
.tl-item {
  position: relative;
  padding-bottom: 1.4rem;
}
.tl-item::before {
  content: '';
  position: absolute;
  left: -1.5rem; top: 7px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: #fff;
  border: 2.5px solid var(--purple);
}
.tl-item.current::before { background: var(--purple); }
.tl-period {
  font-size: 0.73rem;
  font-weight: 600;
  color: var(--purple);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.12rem;
}
.tl-role  { font-size: 0.9rem; font-weight: 600; color: var(--text); margin-bottom: 0.1rem; }
.tl-place { font-size: 0.83rem; color: var(--text-mid); }
.tl-note  { font-size: 0.78rem; color: var(--text-light); font-style: italic; margin-top: 0.1rem; }

/* ============================================================
   PUBLICATIONS
   ============================================================ */
.pub-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}
.pub-tab {
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  border: 1.5px solid var(--border);
  background: #fff;
  color: var(--text-mid);
  transition: all 0.14s;
}
.pub-tab.active,
.pub-tab:hover {
  background: var(--purple);
  color: #fff;
  border-color: var(--purple);
}

.pub-section { display: none; }
.pub-section.active { display: block; }

.pub-year-group { margin-bottom: 2.1rem; }
.pub-year-label {
  font-size: 0.93rem;
  font-weight: 700;
  color: var(--purple);
  margin-bottom: 0.7rem;
  display: flex;
  align-items: center;
  gap: 12px;
}
.pub-year-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.pub-list { list-style: none; display: flex; flex-direction: column; gap: 0.65rem; }
.pub-item {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.95rem 1.15rem;
  transition: border-color 0.14s;
}
.pub-item:hover { border-color: var(--purple-border); }

.pub-authors {
  display: inline;
  font-size: 0.88rem;
  color: var(--text-mid);
}
.pub-authors::after { content: ', '; }
.pub-authors strong { color: var(--text); font-weight: 600; }

.pub-title {
  display: inline;
  font-size: 0.88rem;
  font-weight: 400;
  color: var(--purple-mid);
  line-height: 1.5;
}
.pub-title::after { content: ', '; }
.pub-title a { color: inherit; }
.pub-title a:hover { color: var(--purple); text-decoration: none; }

.pub-venue {
  display: inline;
  font-size: 0.88rem;
  color: var(--text-light);
}
.pub-venue .vname { color: var(--text-mid); font-weight: 500; font-style: italic; }

.pub-links { display: flex; gap: 6px; margin-top: 0.4rem; flex-wrap: wrap; }
.pub-link {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--purple);
  padding: 2px 8px;
  border: 1px solid var(--purple-border);
  border-radius: 4px;
  text-decoration: none;
  transition: all 0.13s;
}
.pub-link:hover {
  background: var(--purple);
  color: #fff;
  border-color: var(--purple);
  text-decoration: none;
}

.pub-footer {
  text-align: center;
  margin-top: 2rem;
}

/* ============================================================
   NEWS LIST
   ============================================================ */
.news-list { list-style: none; }
.news-item {
  display: flex;
  gap: 1.4rem;
  align-items: center;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}
.news-item:last-child { border-bottom: none; }
.news-date {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-light);
  white-space: nowrap;
  min-width: 70px;
  align-self: flex-start;
  padding-top: 0.15rem;
}
.news-body { font-size: 0.87rem; color: var(--text-mid); line-height: 1.6; flex: 1; min-width: 0; }
.news-body a { color: var(--purple); font-weight: 500; }

/* ── News thumbnail (right side) ── */
.news-thumb-link {
  flex-shrink: 0;
  display: block;
  text-decoration: none;
}
/* Real image (user-supplied) */
.news-thumb {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--border);
  display: block;
  transition: opacity 0.15s, transform 0.15s;
}
.news-thumb-link:hover .news-thumb {
  opacity: 0.82;
  transform: scale(1.04);
}
/* Placeholder shown until a real image is provided */
.news-thumb-ph {
  width: 80px;
  height: 80px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  text-decoration: none;
  transition: opacity 0.15s, transform 0.15s;
  /* default: paper (blue tint) */
  background: #e8f2fd;
  border: 1px solid #bcd9f5;
}
.news-thumb-ph:hover { opacity: 0.82; transform: scale(1.04); }
.news-thumb-ph i { font-size: 1.5rem; color: #1664a4; }
/* Grant variant */
.news-thumb-ph.ph-grant { background: #e7f9ee; border-color: #a8dfc0; }
.news-thumb-ph.ph-grant i { color: #197345; }
/* Position variant */
.news-thumb-ph.ph-pos { background: var(--purple-light); border-color: var(--purple-border); }
.news-thumb-ph.ph-pos i { color: var(--purple); }

.badge {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  margin-right: 5px;
  vertical-align: middle;
}
.b-pub   { background: #e8f2fd; color: #1664a4; }
.b-grant { background: #e7f9ee; color: #197345; }
.b-pos   { background: var(--purple-light); color: var(--purple-dark); }
.b-award { background: #fef8e6; color: #9a6c0a; }

/* ============================================================
   AWARDS / GRANTS LIST
   ============================================================ */
.award-list { list-style: none; display: flex; flex-direction: column; gap: 0.9rem; }
.award-item { display: flex; gap: 0.9rem; align-items: flex-start; }
.award-ico {
  width: 36px; height: 36px;
  border-radius: 8px;
  background: var(--purple-light);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.award-ico i { color: var(--purple); font-size: 0.85rem; }
.award-body h4 { font-size: 0.88rem; font-weight: 600; color: var(--text); margin-bottom: 0.1rem; }
.award-body p  { font-size: 0.81rem; color: var(--text-mid); }

/* ============================================================
   AFFILIATION STRIP (home)
   ============================================================ */
.affil-strip {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 16px 2rem;
}
.affil-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px 32px;
}
.affil-item {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.82rem;
  color: var(--text-mid);
}
.affil-item i { color: var(--purple); }

/* ============================================================
   PAGE HERO (inner pages)
   ============================================================ */
.page-hero {
  background: linear-gradient(135deg, var(--purple-light) 0%, #fff 60%);
  border-bottom: 1px solid var(--border);
  padding: 52px 0 44px;
}
.page-hero h1 {
  font-size: 2.1rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
  margin-bottom: 0.4rem;
}
.page-hero p {
  font-size: 0.96rem;
  color: var(--text-mid);
  max-width: 600px;
}

/* ============================================================
   CONTACT
   ============================================================ */
.contact-line {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  font-size: 0.88rem;
  color: var(--text-mid);
  margin-bottom: 0.8rem;
}
.contact-line i { color: var(--purple); margin-top: 3px; min-width: 16px; text-align: center; }
.contact-line a { color: var(--purple); }

/* ============================================================
   SUBPAGE PROFILE STRIP + PAGE HEADING (inner pages)
   ============================================================ */

/* Full-width profile strip at top of every subpage */
.subpage-profile {
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
  padding: 32px 0;
}

/* Use .container inside, plus flex layout */
.subpage-profile-inner {
  display: flex;
  gap: 1.8rem;
  align-items: center;
}

.subpage-profile-photo {
  width: 110px;
  height: 110px;
  object-fit: cover;
  object-position: center top;
  border-radius: 50%;
  flex-shrink: 0;
  display: block;
  box-shadow: var(--shadow-md);
}

.subpage-profile-info {
  flex: 1;
  min-width: 0;
}

.sidebar-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
  margin-bottom: 0.2rem;
}

.sidebar-role {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--purple);
  margin-bottom: 0.15rem;
}

.sidebar-affil {
  font-size: 0.8rem;
  color: var(--text-light);
  line-height: 1.5;
}

.sidebar-divider {
  height: 1px;
  background: var(--border);
  margin: 0.75rem 0;
}

.sidebar-soc {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.sidebar-soc a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 4px 10px 4px 8px;
  border-radius: 6px;
  background: var(--purple-light);
  color: var(--purple);
  font-size: 0.76rem;
  font-weight: 500;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
  text-decoration: none;
}
.sidebar-soc a i { font-size: 0.82rem; }
.sidebar-soc a:hover {
  background: var(--purple);
  color: #fff;
  text-decoration: none;
}

/* Page title block below the profile strip */
.subpage-heading {
  padding: 44px 0 36px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(135deg, var(--purple-light) 0%, #fff 60%);
}
.subpage-heading h1 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
  margin-bottom: 0.4rem;
}
.subpage-heading p {
  font-size: 0.93rem;
  color: var(--text-mid);
  max-width: 600px;
  line-height: 1.7;
}

/* ============================================================
   FOOTER
   ============================================================ */
footer {
  background: #1a1a28;
  color: rgba(255,255,255,0.5);
  padding: 1.6rem 2rem;
  text-align: center;
  font-size: 0.81rem;
}
footer a { color: rgba(255,255,255,0.75); }
footer a:hover { color: #fff; }

/* ============================================================
   RESPONSIVE — Tablet  (≤ 880px)
   ============================================================ */
@media (max-width: 880px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-2 { grid-template-columns: 1fr; gap: 2.5rem; }
  .page-section { padding: 56px 0; }
  .page-hero h1 { font-size: 1.7rem; }

  .subpage-profile { padding: 24px 0; }
  .subpage-profile-photo { width: 86px; height: 86px; }
  .subpage-heading { padding: 36px 0 28px; }
}

/* ============================================================
   RESPONSIVE — Mobile  (≤ 600px)
   ============================================================ */
@media (max-width: 600px) {
  :root { --nav-h: 58px; }
  .container { padding: 0 1.1rem; }
  .nav-links { display: none; }
  .nav-hamburger { display: block; }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; gap: 2rem; }
  .page-section { padding: 44px 0; }
  .page-hero { padding: 36px 0 30px; }
  .page-hero h1 { font-size: 1.45rem; }
  .section-label { font-size: 1.15rem; }
  .btn { padding: 8px 14px; font-size: 0.83rem; }
  .news-item { flex-direction: column; gap: 0.3rem; }
  .news-date { min-width: unset; }
  .affil-inner { gap: 14px 20px; justify-content: flex-start; }
  #navbar { padding: 0 1.1rem; }

  .subpage-profile { padding: 18px 0; }
  .subpage-profile-photo { width: 66px; height: 66px; }
  .subpage-profile-inner { gap: 1rem; }
  .sidebar-name { font-size: 0.97rem; }
  .subpage-heading { padding: 26px 0 22px; }
  .subpage-heading h1 { font-size: 1.5rem; }
}
