@import url("https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css");
@import url('https://fonts.googleapis.com/css?family=Roboto:400,700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Open+Sans&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Pacifico&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Red+Hat+Mono:wght@400;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Lato:wght@700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Raleway:wght@700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Roboto+Condensed:wght@700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Roboto+Slab:wght@700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Nunito+Sans:wght@700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@700&display=swap');



/* ===== Layout: Sidebar & Main ===== */
.row::after {
  content: "";
  display: table;
  clear: both;
}

/* Remove old sidebar/main content styles */
.sidebar,
.main-content {
  float: none;
  width: auto;
  box-sizing: border-box;
}

.avatar {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  margin-bottom: 1em;
}

/* ===== Core ===== */
#navbar {
  margin: auto;
}

#navbar img {
  display: block;
  margin: auto;
}

section {
  overflow: visible;
  position: relative;
}

section>div {
  position: relative;
  z-index: 1;
}

textarea {
  resize: vertical;
}

.center {
  text-align: center;
}

th,
td {
  padding: 15px;
  vertical-align: top;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: 'Open Sans', Arial, sans-serif;
  font-weight: 500;
}

dd {
  font-size: 1em;
  letter-spacing: 1px;
  margin-bottom: 0;
  text-align: left;
}

dt {
  font-size: 1em;
  letter-spacing: -1px;
  margin-bottom: 0;
  text-align: left;
}

/* subtle custom bullet for any remaining lists */
ul:not(.nav) li::before {
  content: "• ";
  color: #777;
  margin-right: 0.25em;
}

ul:not(.nav) {
  padding-left: 0;
  list-style: none;
}


/* ===== Typography ===== */
h1 {
  font-size: 3em;
  letter-spacing: -2px;
  margin-bottom: 30px;
  text-align: center;
}

h2 {
  font-size: 1.2em;
  margin-bottom: 30px;
  text-align: center;
  font-weight: normal;
  color: #7c7c7c;
}

h3 {
  font-size: 1.5em;
  letter-spacing: -1px;
  text-align: center;
  font-weight: normal;
  color: #7c7c7c;
}

p {
  font-size: 0.8em;
  letter-spacing: 0;
  text-align: center;
  font-weight: normal;
  color: #7c7c7c;
}

/* ===== Logo ===== */
#logo_h2 {
  color: #f0e5d6;
  font-size: 1.25em;
  margin: 0;
  font-family:
    system-ui, -apple-system, BlinkMacSystemFont,
    'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell,
    'Open Sans', 'Helvetica Neue', sans-serif;
  float: left;
  padding-left: 25px;
  line-height: 50px;
  /* Match navbar height */
  display: flex;
  align-items: center;
  height: 50px;
  margin-right: 30px;
}

#logo_h2:hover {
  opacity: 0.8;
  text-decoration: none;
}

.navbar {
  min-height: 50px;
}

.navbar-nav {
  margin: 0;
}

.navbar-nav>li>a {
  line-height: 50px;
  /* Match navbar height */
  padding-top: 0;
  padding-bottom: 0;
}

.navbar-nav>.active>a {
  background-color: #222;
  color: #fff;

}

.site-logo {
  display: flex;
  align-items: center;
  font-family: 'Montserrat', Arial, sans-serif;
  font-size: 1.5em;
  font-weight: bold;
  color: #f0e5d6;
  height: 50px;
  margin-left: 18px; /* Adjust as needed for alignment */
}

.logo-icon {
  height: 2em;
  margin-right: 0.75em;
  /* vertical-align: middle; */
}

.gsg-logo {
  font-family: 'Times New Roman', 'Courier';
  letter-spacing: -0.05em;
}

.gsg-logo .inverted-g {
  font-family: 'Times New Roman', 'Arial', 'Courier';
  display: inline-block;
  margin: -0 -0em;  
  transform: scaleX(-1);
}


.eight-symbol {
  font-family: 'Red Hat Mono', monospace, 'Roboto', 'Arial', 'Courier';
  font-size: 1.1em;
  font-weight: normal;
  vertical-align: middle;
  color: #f0e5d6;
  display: inline-block;
  line-height: 0;
  letter-spacing: 0;
  margin: 0 -0.1em;
  margin-top: -0.2em;
}


/* ===== Icon Sprites ===== */
.resume_icon_css,
.cv_icon_css,
.googlescholar_icon_css,
.researchgate_icon_css,
.semanticscholar_icon_css,
.linkedin_icon_css,
.github_icon_css,
.twitter_icon_css,
.instagram_icon_css,
.rarible_icon_css,
.soundcloud_icon_css {
  width: 40px !important;
  height: 40px !important;
  background-size: contain !important;
  margin: 0 !important;
}
.resume_icon_css {
  background-image: url("../images/icons/resume.png");
  width: 110px !important;
  height: 72px !important;
  background-size: contain !important;
  background-repeat: no-repeat !important;
  display: inline-block !important;
  position: relative !important;
}
.resume_icon_css:hover {
  background-image: url("../images/icons/resume_black.png");
}

.cv_icon_css {
  background-image: url("../images/icons/cv.png");
  width: 58px !important;
  height: 68px !important;
  background-size: contain !important;
  background-repeat: no-repeat !important;
  display: inline-block !important;
  position: relative !important;
}
.cv_icon_css:hover {
  background-image: url("../images/icons/cv_black.png");
}

.googlescholar_icon_css {
  width: 40px;
  height: 40px;
  background-image: url("../images/icons/googlescholar.png");
}

.googlescholar_icon_css:hover {
  background-image: url("../images/icons/googlescholar_black.png");
}

.researchgate_icon_css {
  width: 40px;
  height: 40px;
  background-image: url("../images/icons/researchgate.png");
}

.researchgate_icon_css:hover {
  background-image: url("../images/icons/researchgate_black.png");
}

.semanticscholar_icon_css {
  width: 40px;
  height: 40px;
  background-image: url("../images/icons/semanticscholar.png");
}

.semanticscholar_icon_css:hover {
  background-image: url("../images/icons/semanticscholar_black.png");
}

.linkedin_icon_css {
  width: 40px;
  height: 40px;
  background-image: url("../images/icons/linkedin.png");
}

.linkedin_icon_css:hover {
  background-image: url("../images/icons/linkedin_black.png");
}

.github_icon_css {
  width: 40px;
  height: 40px;
  background-image: url("../images/icons/github.png");
}

.github_icon_css:hover {
  background-image: url("../images/icons/github_black.png");
}

.twitter_icon_css {
  width: 40px;
  height: 40px;
  background-image: url("../images/icons/twitter.png");
}

.twitter_icon_css:hover {
  background-image: url("../images/icons/twitter_black.png");
}

.instagram_icon_css {
  width: 40px;
  height: 40px;
  background-image: url("../images/icons/instagram.png");
}

.instagram_icon_css:hover {
  background-image: url("../images/icons/instagram_black.png");
}

.rarible_icon_css {
  width: 40px;
  height: 40px;
  background-image: url("../images/icons/rarible.png");
}

.rarible_icon_css:hover {
  background-image: url("../images/icons/rarible_black.png");
}

.soundcloud_icon_css {
  width: 40px;
  height: 40px;
  background-image: url("../images/icons/soundcloud.png");
}

.soundcloud_icon_css:hover {
  background-image: url("../images/icons/soundcloud_black.png");
}

/* ===== Font utilities ===== */
#spcl-fnt {
  font-family: 'Open Sans', Arial, sans-serif;
  font-weight: 700;
  letter-spacing: 0.04em; /* Adjust as needed */
}

#monospaced {
  font-family: 'Courier New', Courier, monospace;
}

/* ===== Bio & Sections ===== */
.bio-text {
  text-align: justify;
  font-size: 1em;
  line-height: 1.5;
  margin-bottom: 1.5em;
  color: #333;
}

.section-title {
  text-align: left;
  font-size: 1.5em;
  margin-top: 1.5em;
  margin-bottom: 0.75em;
  color: #444;
}

.section-text p,
.section-text ul {
  text-align: left;
}

.section-text h4 {
  font-size: 1.1em;
  color: #555;
  margin: 0.75em 0;
}

button.collapsible {
  background: none;
  cursor: pointer;
  padding: 0.25em;
  width: 100%;
  border: none;
  text-align: left;
  outline: none;
  font-size: 1em;
}

.active,
.collapsible:hover {
  color: #999;
}

.content,
.content_ref {
  padding: 0 18px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  background-color: #f1f1f1;
  position: relative;
  margin-bottom: 0;
  display: block;
  opacity: 1 !important;
  filter: none !important;
}

/* When content is active/expanded */
.content.active,
.content_ref.active {
  /* max-height will be set inline by JS for animation, then set to none after transition */
  overflow: visible;
  margin-bottom: 0.3em;
  background-color: #f8f8f8;
  border-radius: 0 0 4px 4px;
  display: block;
  opacity: 1 !important;
  filter: none !important;
}

/* Nested content specific styles */
.content .content {
  background-color: #f8f8f8;
  margin: 0.2em 0;
  border-radius: 4px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  display: block;
}

.content .content.active {
  margin-bottom: 0.5em;
  overflow: visible;
  display: block;
}

/* move table closer to its heading */
.content_ref table {
  margin-top: 0.5em;
}

/* collapse headers */
.content_ref>button.collapsible {
  padding: 0.3em 1.5em;
  background: #eaeaea;
  margin-top: 0.3em;
  border-radius: 4px;
  position: relative;
  width: 100%;
  display: block;
  transition: background-color 0.2s ease;
}

.content_ref>button.collapsible:hover {
  background: #e0e0e0;
}

.content_ref>button.collapsible h4 {
  margin: 0;
  font-size: 1.2em;
  font-weight: 600;
}

.content_ref>button.collapsible p {
  margin: 0.2em 0 0;
}

/* Nested collapsible buttons */
.content .collapsible {
  z-index: 2;
}

/* Ensure content sections are block elements */
.content>div,
.content_ref>div {
  display: block;
  width: 100%;
}

.content ul {
  list-style: disc inside;
  /* put the bullet inside the box */
  margin: 0.5em 0 1em 1.5em;
  /* space above/below and indent from left */
  padding: 0;
  /* kill any default padding */
}

.content li {
  margin-bottom: 0.3em;
  /* tighten spacing between items */
  line-height: 1.4;
  /* improve readability */
}

/* smaller font for inside‐the-content lists */
.content ul li {
  font-size: 0.9em;
}

/* duties as a single, well-spaced sentence */
.duties-paragraph {
  font-size: 1em;
  line-height: 1.6;
  margin: 0.2em 0 0.5em;
  color: #333;
  text-align: left;
  padding: 0.5em 0;
}

/* ===== News ===== */
.news-list {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.news-list li {
  position: relative;
  padding-left: 7em;
  /* Adjust if you want more/less spacing from date */
  text-indent: -7em;
  line-height: 1.6;
  font-size: 0.8em;
  margin-bottom: 0.7em;
}

.news-date {
  width: 7em;
  font-weight: bold;
}

/* ===== Tables ===== */
table {
  border-collapse: collapse;
  margin-top: 0px;
}

table th,
table td {
  text-align: left;
}

/* ===== Footer ===== */
footer {
  text-align: center;
  margin-top: 45px;
  padding-top: 5px;
  border-top: 1px solid #eaeaea;
  color: #7c7c7c;
}

/* Teaching Experience Layout */
.teaching-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.teaching-header h4 {
  margin: 0;
  font-size: 1.2em;
  font-weight: 600;
  flex: 1;
}

.teaching-header .instructor {
  font-size: 0.9em;
  color: #666;
  margin-left: 1em;
  white-space: nowrap;
}

/* Ensure proper stacking context for all sections */
section>div,
.content>div,
.content_ref>div {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
}

/* Container and layout styles */
@media (min-width: 1200px) {

  .site-logo {
    position: fixed;
    left: calc((100vw - 1200px) / 2 + 110px);
  }

  #sidebar,
  .col-md-3 {
    position: fixed;
    top: 60px;
    left: calc((100vw - 1200px) / 2 + 50px);
    width: 50%;
    min-width: 220px;
    max-width: 220px;
    z-index: 2;
    padding-left: 10px;
    padding-right: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: auto;
  }

  #main-content {
    margin-left: 25%;
    width: 75%;
    max-width: none;
    padding-left: 32px;
    position: relative;
  }

  #profile-header {
    position: static;
    width: 100%;
    max-width: none;
    margin-left: 0;
    margin-right: 0;
    background: #fff;
    z-index: 1001;
    text-align: center;
    box-shadow: none;
    border: none;
    padding: 8px 0 4px 0;
    display: block;
  }

  #main-content,
  .col-md-9 {
    left: calc((100vw - 1200px +250px));
    margin-left: 15%;
    margin-right: 5%;
    width: 80%;
    max-width: 1000px;
    padding-left: 0;
    position: relative;
  }

  .container {
    max-width: 1200px;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    width: auto !important;
  }
}

/* Mobile/Tablet Responsive */
@media (max-width: 1200px) and (min-width: 600px) {
  .container > .row {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
  }
  #sidebar, .col-md-3 {
    flex: 0 1 100px !important;
    min-width: 60px !important;
    max-width: 120px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  #main-content, .col-md-9 {
    flex: 1 1 0 !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 0 0 16px !important;
  }
  #sidebar .handles-row {
    flex-direction: column !important;
    align-items: center !important;
    gap: 8px !important;
  }
  #sidebar .handles-row a {
    max-width: 36px !important;
    min-width: 24px !important;
  }
  .resume_icon_css {
    background-image: url("../images/icons/resume_40.png");
    width: 40px !important;
    height: 40px !important;
    background-size: contain !important;
    background-repeat: no-repeat !important;
    display: inline-block !important;
    position: relative !important;
  }
  .resume_icon_css:hover {
    background-image: url("../images/icons/resume_40_black.png");
  }
  .cv_icon_css {
    background-image: url("../images/icons/cv_40.png");
    width: 40px !important;
    height: 40px !important;
    background-size: contain !important;
    background-repeat: no-repeat !important;
    display: inline-block !important;
    position: relative !important;
  }
  .cv_icon_css:hover {
    background-image: url("../images/icons/cv_40_black.png");
  }
  .googlescholar_icon_css,
  .researchgate_icon_css,
  .semanticscholar_icon_css,
  .linkedin_icon_css,
  .github_icon_css,
  .twitter_icon_css,
  .instagram_icon_css,
  .rarible_icon_css,
  .soundcloud_icon_css {
    width: 32px !important;
    height: 32px !important;
    background-size: contain !important;
    margin: 0 !important;
  }
}

@media (max-width: 600px) {
  .container > .row {
    display: block;
  }
  #sidebar, .col-md-3, #main-content, .col-md-9 {
    top: -20px;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    flex: none !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  #sidebar .handles-row {
    flex-direction: row !important;
    gap: 2px !important;
  }
  #sidebar .handles-row a {
    min-height: 22px !important;
    max-height: 22px !important;
    max-width: 52px !important;
    min-width: 24px !important;
  }
  #sidebar img {
    max-width: 148px !important;
    max-height: 148px !important;
    margin-bottom: 4px !important;
    margin-top: 2px !important;
  }
  .resume_icon_css {
    background-image: url("../images/icons/resume_40.png");
    width: 40px !important;
    height: 40px !important;
    background-size: contain !important;
    background-repeat: no-repeat !important;
    display: inline-block !important;
    position: relative !important;
  }
  .resume_icon_css:hover {
    background-image: url("../images/icons/resume_40_black.png");
  }
  .cv_icon_css {
    background-image: url("../images/icons/cv_40.png");
    width: 40px !important;
    height: 40px !important;
    background-size: contain !important;
    background-repeat: no-repeat !important;
    display: inline-block !important;
    position: relative !important;
  }
  .cv_icon_css:hover {
    background-image: url("../images/icons/cv_40_black.png");
  }
}

.content:empty {
  display: none !important;
}

body,
section,
.content_ref,
.main-content,
.sidebar,
.col-md-12,
.col-md-4,
.col-md-8 {
  background: #fff !important;
}

body {
  padding-top: 75px;
  /* Adjust this value based on your actual navbar height. */
}

/* Do NOT set .navbar or .navbar-inverse background here! */

.navbar-inverse {
  /* position: fixed; */
  /* top: 0; */
  /* width: 100%; */
  /* z-index: 1030; Use a high z-index to ensure it's on top. Bootstrap's navbar-fixed-top uses 1030. */
  /* These are already there, but confirm background and border-color */
  background-color: #222 !important;
  border-color: #080808 !important;
  /* Also ensure no default margin-bottom is pushing it down */
  margin-bottom: 0 !important;
}

.navbar-inverse .navbar-nav>li>a,
.navbar-inverse .navbar-brand,
#logo_h2 {
  color: #f0e5d6 !important;
  background: transparent !important;
  opacity: 1 !important;
}

.navbar-inverse .navbar-nav>li>a {
  background-color: transparent !important;
  color: #f0e5d6 !important;
}

.navbar-inverse .navbar-nav>li>a:hover,
.navbar-inverse .navbar-nav>li>a:focus {
  background-color: #111 !important;
  color: #fff !important;
}

.navbar-inverse .navbar-toggle {
  border-color: #f0e5d6;
  background: transparent !important;
}

.navbar-inverse .navbar-toggle .icon-bar {
  background-color: #f0e0e5d6;
}

/* Section and collapsible items: white background by default */
section,
.content_ref>button.collapsible,
.content_ref>.content {
  background: #fff !important;
}

/* Teaching Experience collapsible buttons: left-aligned, same width as section title */
.content_ref>button.collapsible {
  text-align: left;
  width: 100%;
  margin-left: 0;
  margin-right: 0;
  border-radius: 4px;
  box-sizing: border-box;
  padding-left: 0.5em;
  padding-right: 0.5em;
}

/* Highlight on hover */
.content_ref>button.collapsible:hover,
.content_ref>button.collapsible:focus {
  background: #f0e5d6 !important;
}


@media (max-width: 1200px) {

  #sidebar,
  .col-md-3 {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  #sidebar-profile-header {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    height: auto !important;
    min-height: 48px;
    width: 100%;
    margin-bottom: 8px;
  }

  #main-content,
  .col-md-9 {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  #profile-header {
    position: static !important;
    width: 100% !important;
    left: 0 !important;
    top: 0 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
    background: #fff;
    z-index: 1001;
    text-align: center;
    padding: 12px 0 4px 0;
    display: block !important;
  }

  #sidebar img {
    max-width: 28% !important;
    /* 20% larger than 40% */
    margin-bottom: 12px !important;
    margin-top: 4px !important;
    display: block;
  }

  #sidebar>div,
  #sidebar>hr,
  #sidebar>a,
  #sidebar>p {
    margin-bottom: 8px !important;
  }

  #sidebar {
    padding: 0 !important;
  }

  #sidebar p,
  #sidebar span {
    font-size: 0.9em !important;
  }

  .handles-row {
    display: flex;
    flex-wrap: wrap;
    /* allows wrapping if needed */
    justify-content: center;
    width: calc(100% - 48px);
    margin-left: 24px;
    margin-right: 24px;
    gap: 6px;
  }

  .handles-row a {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 !important;
  }

  .handles-row .googlescholar_icon_css,
  .handles-row .researchgate_icon_css,
  .handles-row .semanticscholar_icon_css,
  .handles-row .linkedin_icon_css,
  .handles-row .github_icon_css,
  .handles-row .twitter_icon_css {
    margin: 0 !important;
  }

  /* This will force the handles to align horizontally */
  /* This ensures icons wrap properly inside the sidebar when height is low */
  .handles-row.handles-horizontal {
    flex-direction: row !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 8px !important;
    max-width: 100% !important;
    padding: 0 8px !important;
    box-sizing: border-box;
  }

  .handles-row.handles-horizontal a {
    flex: 0 1 40px !important;
    max-width: 50px !important;
    display: flex !important;
    justify-content: center;
    align-items: center;
  }

  .handles-row.handles-horizontal .resume_icon_css,
  .handles-row.handles-horizontal .cv_icon_css,
  .handles-row.handles-horizontal .googlescholar_icon_css,
  .handles-row.handles-horizontal .researchgate_icon_css,
  .handles-row.handles-horizontal .semanticscholar_icon_css,
  .handles-row.handles-horizontal .linkedin_icon_css,
  .handles-row.handles-horizontal .github_icon_css,
  .handles-row.handles-horizontal .twitter_icon_css {
    width: 36px !important;
    height: 36px !important;
    background-size: contain !important;
    margin: 0 !important;
  }


  /* Add bottom margin between headshot and email icons */
  /* #sidebar img {
    margin-bottom: 12px !important;
  } */
}

/* Remove any mobile-name-ribbon or duplicate name ribbon CSS */
.mobile-name-ribbon {
  display: none !important;
}

#sidebar-profile-header {
  height: 60px;
  /* or whatever fits your compact ribbon */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  overflow: hidden;
}

#sidebar-profile-header h1,
#sidebar-profile-header h2 {
  margin: 0;
  padding: 0;
}


.handles-row {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin: 8px 0;
}

.handles-row a {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 !important;
}

@media (max-width: 1200px) {
  .handles-row {
    flex-direction: row;
    justify-content: center;
    gap: 0;
  }

  .handles-row a {
    flex: 1 1 0;
    min-width: 0;
  }
}
