/* Sidebar: wider for desktop only */
.sidebar {
  min-width: 148px !important;
  width: 148px !important;
  max-width: 155px !important;
}

/* Sidebar tabs: bigger, thicker border, full width, closer together */
.sidebar-navigation .sidebar-link {
  display: block !important;
  width: 98% !important;
  margin: 0.35em auto !important;
  padding: 0.7em 0.2em !important;
  font-size: 1.08em !important;
  font-weight: bold !important;
  text-align: center !important;
  border: 2.2px solid #111 !important;
  border-radius: 12px !important;
  background: #fff !important;
  color: #222 !important;
  box-shadow: 0 1px 4px rgba(0,0,0,0.03) !important;
  transition: background 0.2s, color 0.2s, border 0.2s;
}

.sidebar-navigation .sidebar-link:hover,
.sidebar-navigation .sidebar-link.active {
  background: #f5f5f5 !important;
  color: #0072B2 !important;
  border: 2.7px solid #0072B2 !important;
}

/* Centered profile image, rounded corners (not circle 180px-> 300px) */ 
.profile-pic {
  display: block;
  margin-left: auto;
  margin-right: auto;
  border-radius: 20px;
  box-shadow: 0 0 10px #aaa;
  width: 300px;
  margin-top: 1.5em;
  margin-bottom: 1em;
}

/* Center name and subtitle */
h1, .subtitle {
  text-align: center;
}

.subtitle {
  font-size: 1.1em;
  color: #444;
  margin-bottom: 1em;
}

/* Social icons row */
.social-icons {
  text-align: center;
  margin-top: 1.2em;
  margin-bottom: 1.2em;
}

.social-icons a {
  font-size: 2em;
  margin: 0 2px;
  text-decoration: none;
  vertical-align: middle;
  border: 1px solid #111;
  border-radius: 10px;
  padding: 0.08em 0.13em;
  background: #fff;
  display: inline-block;
  transition: color 0.2s, border 0.2s, background 0.2s;
}

.social-icons a.email { color: #0072B2; }
.social-icons a.linkedin { color: #0A66C2; font-weight: bold; }
.social-icons a.facebook { color: #1877F3; font-weight: bold; }
.social-icons a.twitter { color: #000; font-weight: bold; }
.social-icons a.scholar { color: #333; }
.social-icons a:hover { color: #e67e22; border-color: #e67e22; background: #f5f5f5; }

/* Section headings */
h2, h3 {
  color: #2c3e50;
  margin-top: 2em;
}

/* Responsive sidebar: on small screens, let Quarto handle sidebar, make tabs smaller */
@media (max-width: 900px) {
  .sidebar {
    min-width: 0 !important;
    width: auto !important;
    max-width: 100vw !important;
  }
  .sidebar-navigation .sidebar-link {
    font-size: 0.95em !important;
    padding: 0.3em 0.1em !important;
    width: 95% !important;
    margin: 0.15em auto !important;
    border-width: 1.2px !important;
  }
  .profile-pic {
    width: 120px !important;
  }
  .social-icons a {
    font-size: 1.3em !important;
    border-width: 0.7px !important;
    padding: 0.05em 0.08em !important;
  }
}

#my-journey-in-science-exploring-data-and-complexity p {
  text-align: justify;
}

div.social-icons p {
  text-align: center !important;
}

div.social-icons > p > a {
  display: inline-block;
  float: none;
}

/* CV top navigation tabs: smaller, always visible, wrap on mobile */
.cv-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6em;
  margin: 1.2em 0 1.5em 0;
}

.cv-nav a {
  font-size: 0.77em;           /* 5% larger than before (was 0.55em) */
  font-weight: 600;
  color: #0072B2;
  background: #f5f5f5;
  border: 1.5px solid #0072B2;
  border-radius: 8px;
  padding: 0.28em 0.85em;      /* 5% more than before */
  text-decoration: none;
  transition: background 0.2s, color 0.2s, border 0.2s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
  margin-bottom: 0.3em;
  white-space: nowrap;
}

.cv-nav a:hover, .cv-nav a:focus {
  background: #0072B2;
  color: #fff;
  border-color: #005580;
}

@media (max-width: 700px) {
  .cv-nav a {
    font-size: 0.68em;         /* 5% more than before (was 0.48em) */
    padding: 0.157em 0.42em;
    margin-bottom: 0.2em;
  }
}

/* Justify all main text except headings */
main p, main ul, main ol, main li, main blockquote, main table, main dl, main dd {
  text-align: justify;
}

/* But keep headings left-aligned */
main h1, main h2, main h3, main h4, main h5, main h6 {
  text-align: left;
}

/* Project navigation tabs: styled exactly like .cv-nav */
.project-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6em;               /* same as .cv-nav */
  margin: 1.2em 0 1.5em 0;  /* same as .cv-nav */
}

.project-nav a {
  font-size: 0.77em;           /* match .cv-nav */
  font-weight: 600;
  color: #0072B2;
  background: #f5f5f5;
  border: 1.5px solid #0072B2;
  border-radius: 8px;
  padding: 0.28em 0.85em;      /* match .cv-nav */
  text-decoration: none;
  transition: background 0.2s, color 0.2s, border 0.2s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
  margin-bottom: 0.3em;
  white-space: nowrap;
}

.project-nav a:hover, .project-nav a:focus {
  background: #0072B2;
  color: #fff;
  border-color: #005580;
}

/* Publications page styles */

.pub-year {
  font-weight: 700;
  font-size: 1.5em;
  margin-top: 2em;
  margin-bottom: 0.5em;
  color: #555;
  border-bottom: 1px solid #ddd;
  padding-bottom: 0.2em;
}

.publication {
  margin-bottom: 1.2em;
  font-size: 1em;
  line-height: 1.4;
}

.publication p {
  margin: 0;
}

.publication a {
  color: #0072B2;
  text-decoration: none;
}

.publication a:hover,
.publication a:focus {
  text-decoration: underline;
  outline: none;
}

/* === FST app box: wider to the RIGHT, slightly shorter === */
.app-container {
  /* Push the right boundary out by ~35% while keeping the left edge fixed */
  max-width: 135%;
  margin-left: 0;       /* keep original left margin */
  margin-right: -35%;   /* expand only to the right */
}


/* Teaching Resources tabset styling (match CV tabs) */

.tabset > .tabset-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6em;
  margin: 1.2em 0 1.5em 0;
  border-bottom: none; /* remove default underline if any */
}

.tabset > .tabset-tabs > button {
  font-size: 0.77em;
  font-weight: 600;
  color: #0072B2;
  background: #f5f5f5;
  border: 1.5px solid #0072B2;
  border-radius: 8px;
  padding: 0.28em 0.85em;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
  white-space: nowrap;
  transition: background 0.2s, color 0.2s, border 0.2s;
}

.tabset > .tabset-tabs > button:hover,
.tabset > .tabset-tabs > button:focus {
  background: #0072B2;
  color: #fff;
  border-color: #005580;
  outline: none;
}

.tabset > .tabset-tabs > button[aria-selected="true"] {
  background: #0072B2;
  color: #fff;
  border-color: #005580;
  cursor: default;
  box-shadow: none;
}

.tabset > .tabset-panels {
  margin-top: 1em;
}
