:root {
  /* root color variables */
  --bright-blue: #007bff;
  --brighter-blue: #62aaf7;
  --hlink-blue: #475461; 
  --nd-blue: #20364c;
  --body-background: #f6f7fb;
  --ghost-white: ghostwhite;
  --alice-blue: aliceblue;
  --footer-slate: #e6e8f1;
  --white: white;
  --body-font: #666666;
  --slate-gray: #444f5a;
  --silver: silver;
  --graphite: #475461;
  --trench-blue: #406885;
  --light-blue: #d0e9fe;
  --chocolate: rgb(210, 105, 30);
  --maroon: #990000;
  --lightest-gray: #e9ecef;
}

html {
  font-size: 18px;
}

body {
  box-sizing: border-box;
  font-family: 'Roboto', "Arial", sans-serif;
  color: var(--body-font);
  background: var(--body-background);
  font-size: 1rem;
}

p, ul, li, table, tr, td, dd, dt {
  color: var(--graphite);
  font-size: 1rem;
}

h1, h2, h3 {
  color: var(--maroon) !important;
}

h4, h5, h6 {
  color: var(--trench-blue) !important;
}

h4 {
  font-size: 1.35rem;
}

/* Lines after headers */
h3 {
  margin-bottom: 1.2rem;
  margin-top: 3rem;
}

h3 {
  position: relative;
}

h3 span {
  background-color: var(--body-background);
  padding-right: 10px;
}

h3:after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 0.5em;
  border-top: 2px solid var(--silver);
  z-index: -1;
}

.position-title {
  font-size: 1.1rem;
  color: var(--trench-blue) !important;
  font-weight: 600;
}

#contact-table a {
  word-wrap: break-word; /* Break long words onto the next line */
  word-break: break-all; /* Break inside words if necessary */
  overflow-wrap: anywhere; /* Allow breaks at any point */
}

#contact-table td {
  font-size: 1rem !important;
}

#contact-table td:first-of-type {
  color: var(--trench-blue);
}

#contact-table tr:first-child td {
  border: none !important;
}

.list-group-item a,
.list-group-item a i {
  color: var(--bright-blue);
}

/* Projects ---------------------------------------------------------------- */
#projects-div {
  margin-top: 3.5rem;
}

#projects-div .card {
  margin-bottom: 2rem;
  cursor: pointer;
}

#projects-div .card-body {
  padding: 3rem 2rem 2rem;
  text-align: left;
}

#projects-div .card-body h5 {
  text-align: left;
  color: var(--maroon) !important;
  margin-top: -1rem;
  z-index: 1000;
}

.card-action {
  background: transparent;
  margin-top: -4.05rem;
  margin-bottom: 3rem;
  z-index: 1;
}

.card-action span {
  color: var(--bright-blue);
  border: 1px solid rgba(0, 0, 0, .125);
  background: var(--white);
  padding: 2rem .8rem 1rem;
  border-radius: 90px;
}

/* Filter buttons */
#filter-buttons {
  margin-bottom: 2rem;
}

#filter-buttons button {
  margin-bottom: 1rem;
}

#filter-buttons button.active {
  background: var(--graphite);
  border: none;
}

/* Teaching section --------------------------------------------------------- */
#teaching-section .card {
  border: none;
  border-bottom: 1px dotted var(--silver) !important;
  background: none;
}

#teaching-section .card-header {
  background: transparent !important;
  padding: .3rem 0rem 0 .3rem;
  border-bottom: none !important;
}

#teaching-section .card-body {
  background: transparent !important;
  padding: .3rem 1rem 0 1rem;
  border-bottom: none !important;
}

#teaching-section button {
  text-align: left;
}

.fa-rotate-45 {
  -webkit-transform: rotate(45deg);
  -moz-transform: rotate(45deg);
  -ms-transform: rotate(45deg);
  -o-transform: rotate(45deg);
  transform: rotate(45deg);
  transition-property: all;
  transition-duration: .2s;
}

.fa-rotate-90 {
  -webkit-transform: rotate(45deg);
  -moz-transform: rotate(45deg);
  -ms-transform: rotate(45deg);
  -o-transform: rotate(45deg);
  transform: rotate(45deg);
  transition-property: all;
  transition-duration: .2s;
}

/* Research section --------------------------------------------------------- */
#reseach-bullets li {
  margin-bottom: .75rem;
}

#conference-presentations,
#invited-talks {
  margin-left: 1.25rem;
}

#conference-presentations dt {
  font-weight: 600;
}

#conference-presentations dd {
  margin-bottom: 1rem;
}

/* Vitae ----------------------------------------------------------------------*/
#vitae-iframe {
  box-shadow: 1px 1px 6px 0px var(--silver);
}

/* Format the social-professional network icons ------------------------------ */
.social-icons {
  list-style-type: none;
  padding: 0;
}

.social-icons li {
  padding: 0 .75rem;
  display: inline-block;
  text-align: center;
  cursor: pointer;
}

.social-icons li a {
  color: #1585cf;
}

/* Color --------------------------------------------- */
.bright-blue {
  color: var(--bright-blue);
}

.chocolate {
  color: var(--chocolate);
}

.trench-blue {
  color: var(--trench-blue) !important;
}

.ghost-white {
  color: var(--ghost-white);
}

.bright-blue {
  color: var(--bright-blue);
}

.light-blue {
  color: var(--light-blue);
}

.footer-slate {
  color: var(--footer-slate);
}

.white {
  color: var(--white);
}

.slate-gray {
  color: var(--slate-gray);
}

.silver {
  color: var(--silver);
}

.graphite {
  color: var(--graphite);
}

.bg-alice-blue {
  background: var(--alice-blue);
}

/* Navbar -------------------------------------------- */
.bg-navbar,
.bg-footer {
  background: var(--nd-blue);
  z-index: 9999;
}

#page-navbar {
  opacity: 0;
  transform: translateY(-100%);
  transition: opacity 0.3s ease, transform 0.3s ease;
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 9999;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

#page-navbar.visible {
  opacity: 1;
  transform: translateY(0);
}

.navbar-brand {
  font-size: 1.2rem !important;
}

#page-lead {
  margin-bottom: 2rem !important;
}

#acknowledge {
  margin-top: 75px;
}

blockquote,
cite {
  font-style: normal;
}

/* Back to top button  --------------------------------------- */
#back-to-top {
  display: none;
  position: fixed;
  bottom: 15%;
  right: 0;
  z-index: 99;
  border: none;
  outline: none;
  background-color: var(--body-font);
  color: var(--white) !important;
  padding: 8px 4px 10px 4px;
  border-radius: 15px 0 0 15px;
  font-size: 1rem;
  cursor: pointer !important;
}

#back-to-top:hover {
  background-color: var(--graphite);
  color: var(--white);
}

#page-navbar .active {
  border-bottom: 3px solid white;
}

/* Set cursor as pointer */
.pointer {
  cursor: pointer;
}

/* Education section ---------------------------------------- */
#education {
  border: none !important;
}

#education li {
  padding: .25rem 0;
  background: transparent;
  border: none !important;
}

/* wrapper -------------------------------------------------- */
#wrapper {
  display: flex;
  flex-wrap: wrap; /* Ensure elements wrap when necessary */
  padding-top: 2rem;
  /* margin-left: 0px; */
  height: 100vh; /* Make it span the full height of the viewport */
  width: 100%; /* Adjust the width as necessary, or keep it full width */
  flex-direction: row; /* Default horizontal layout */
}

#wrapper a {
  font-size: inherit;
  color: var(--hlink-blue);
}

/* Personal info section ---------------------------------------- */
.col-sm-4 {
  min-width: 380px; /* Fixed minimum width for personal info */
  max-width: 35%; /* Prevents it from growing beyond 35% */
  position: fixed; /* Fix the element to the viewport */
  display: flex;
  flex-direction: column;
  justify-content: center; /* Vertically centers the content */
  box-sizing: border-box; /* Ensures padding is included in width/height */
}

#personal-info {
  margin-top: 264px;
}

#name-and-title{
  padding-top: 2rem;
}

#content{
  padding-bottom: 4rem;
}

#picture {
  padding-top: 2rem;
  padding-bottom: 1rem;
}

#picture img#my-photo {
  max-height: 220px; /* Adjusted size for the image */
  width: auto; /* Maintain aspect ratio */
  display: block; /* Ensures no extra margins or paddings */
  margin: 0 auto; /* Centers the image */
}

/* Right-hand content section */
.col-sm-8 {
  flex-grow: 1; /* Take up remaining horizontal space */
  overflow-y: auto; /* Enables scrolling for the content */
  background-color: transparent;/* Optional: Different background */
  box-sizing: border-box; /* Includes padding in the total width */
}

/* Utilities */
.small-caps {
  font-variant: small-caps;
}

.badge {
  padding: .4rem .6rem;
}

.urls {
  overflow-wrap: break-word;
  word-wrap: break-word;
  word-break: break-word;
  -ms-hyphens: auto;
  -moz-hyphens: auto;
  -webkit-hyphens: auto;
  hyphens: auto;
}

input::placeholder {
  color: var(--slate-gray) !important;
  text-shadow: none;
}

.card-header button {
  font-size: 1.1rem !important;
}

/* Navbar visibility transitions */
#page-navbar {
  opacity: 0;
  transform: translateY(-100%);
  transition: opacity 0.3s ease, transform 0.3s ease;
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 9999;
  background: var(--nd-blue);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

#page-navbar.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Media queries ------------------------------------------- */
/* Mode 1: Default layout with two columns */
@media (min-width: 992px) {
  #picture, #personal-info {
    min-width: 380px; /* Left column width */
    max-width: 380px; /* Left column width */
  }

  .col-sm-8 {
    margin-left: 380px;
  }
}


/* Mode 3: Everything in one column */
@media (max-width: 991px) {

  html {
    font-size: var(--mobile-font-size);
  }
  
  #wrapper {
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }

  #picture {
    order: -1;
    position: relative; /* Removes sticky behavior */
    min-width: 100%; /* Takes full width */
    height: auto; /* Adjusts height automatically */
    align-items: center; /* Horizontally center items */
    flex-direction: column; 
  }

  #picture img#my-photo {
    max-height: 220px; /* Adjusted size for the image */
    width: auto; /* Maintain aspect ratio */
    display: block; /* Ensures no extra margins or paddings */
    margin: 0 auto; /* Centers the image */
  }

  #personal-info {
    position: relative; /* Removes sticky behavior */
    min-width: 100%; /* Takes full width */
    height: auto; /* Adjusts height automatically */
    align-items: center; /* Horizontally center items */
    flex-direction: column; 
  }

  #picture img#my-photo {
    max-height: 400px; /* Adjusted size for the image */
    margin: 0 auto; /* Centers the image */
  }

  .col-sm-8 {
    flex: none; /* Removes flex behavior */
    min-width: 100%; /* Takes full width */
    margin-left: 0;
  }

  #name-and-title {
    order: -0;
  }

  #personal-info {
    order: 1;
    margin-top: 0;
  }

  #content{
    order: 2;
  }
}