/*
  Shared website styles.
  The original fonts, colors, keyboard header, simple white background,
  and side-by-side desktop layouts are intentionally preserved.
*/

/* ---------- Global page styles ---------- */
body {
  width: 100%;
  min-height: 80%;
  margin-bottom: 0;
  padding-top: 0;
  padding-bottom: 0;
  background-color: #ffffff;
  font-family: Comic Sans, Verdana, Arial, Helvetica, Tahoma, sans-serif;
  font-size: 22px;
  line-height: 1;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

/* Hide the scrollbar while retaining normal page scrolling. */
body::-webkit-scrollbar {
  display: none;
}

/* Research and Data & Insights pages scroll normally without a visible edge bar. */
html.no-scrollbar,
html.no-scrollbar body {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

html.no-scrollbar::-webkit-scrollbar,
html.no-scrollbar body::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

a {
  text-decoration: none;
}

a:hover {
  color: #5dade2;
  text-decoration: underline;
}

p {
  margin-bottom: 0;
  padding-bottom: 0;
}

img {
  max-width: 100%;
  height: auto;
}

/* ---------- Header and navigation ---------- */
header {
  position: sticky;
  top: 0;
  margin-top: -40px;
  margin-right: -10px;
  margin-left: -10px;
  min-height: 130px;
  padding-top: 80px;
  color: #000000;
  background-color: #caf0f8;
  background-image: url("keyboard.jpg");
  background-size: cover;
  border-bottom: 1.1px solid #ebedef;
}

header h1 {
  margin: 0;
  color: #123456;
  font-family: "Times New Roman", Georgia, "Trebuchet MS", serif;
  font-size: 55px;
  font-stretch: ultra-condensed;
  font-variant: small-caps;
  font-weight: 200;
  letter-spacing: 0.015em;
  text-align: center;
  transform: scale(1, 1);
}

header h2 {
  margin: 0;
  color: #808080;
  font-family: "Brush Script MT", Didot, "Times New Roman", Arial, "Trebuchet MS", Georgia, serif;
  font-size: 20px;
  font-weight: lighter;
  text-align: center;
  transform: scale(1, 1.3);
}

header nav {
  margin-top: 0;
  margin-bottom: 0;
  float: none;
  font-family: "Times New Roman", Georgia, serif, sans-serif;
  font-variant: small-caps;
  text-align: center;
}

header li {
  display: inline;
  padding: 0 14px;
  text-align: center;
}

header a {
  color: #4682b4;
  font-family: "Times New Roman", Georgia, serif, sans-serif;
  font-size: 24px;
  font-weight: bolder;
  transform: scale(0.9, 1);
}

header .current a,
header a:hover {
  color: #5f9ea0;
}

header .current a {
  font-weight: bolder;
}

/* Utility used after floated content when a hard clear is needed. */
.clr {
  clear: both;
}

/* ---------- Home-page portrait and biography ---------- */
.box {
  box-sizing: border-box;
  width: 50%;
  margin: auto;
  float: left;
}

/* The desktop home layout keeps the original portrait/text proportions and spacing. */
.home-layout {
  display: flex;
  width: 80%;
  max-width: 1120px;
  margin: 0 auto;
  padding-top: 68px;
  align-items: flex-start;
  gap: 50px;
}

.home-layout .box {
  width: auto;
  margin: 0;
  float: none;
}

.home-layout .box:first-child {
  flex: 0 0 350px;
}

.home-layout .box:last-child {
  flex: 1 1 auto;
}

#image {
  margin: 0;
  padding: 0;
  float: none;
}

#sidebar {
  width: 515px;
  max-width: 100%;
  height: auto;
  margin-top: 45px;
  font-family: Arial, "Times New Roman", Tahoma, sans-serif;
  font-size: 18.5px;
  font-weight: 500;
  text-align: left;
  text-decoration: none;
}

/* Social links retain the original large, icon-only presentation. */
.social-icons a i {
  margin: 10px;
  font-size: 50px;
  transition: 0.3s;
}

.social-icons .linkedin i,
.social-icons .email i {
  color: #0a66c2;
}

.social-icons .linkedin i:hover {
  color: #004182;
}

.social-icons .email i:hover {
  color: #000000;
}

/* ---------- Research, data, and article text ---------- */
.research-title,
.work-in-progress {
  color: #000080;
  font-family: Arial, "Times New Roman", Georgia, Tahoma, sans-serif;
  font-size: 18.5px;
}

.abstract {
  display: inline;
  margin-right: 5px;
  font-family: Arial, "Times New Roman", Georgia, Tahoma, sans-serif;
  font-size: 16.5px;
  font-style: italic;
  font-weight: bold;
}

h4 {
  overflow: hidden;
  padding-top: 10px;
  padding-bottom: 10px;
  font-family: Arial, "Times New Roman", Tahoma, sans-serif;
  font-size: 18.5px;
  font-weight: 600;
}

h5 {
  width: 40%;
  margin: -10px auto 0;
  overflow: hidden;
  padding-bottom: 10px;
  font-family: Arial, "Times New Roman", Tahoma, sans-serif;
  font-size: 12.5px;
  font-weight: 200;
  text-align: justify;
}

article.research {
  width: 45%;
  margin: 20px auto 0;
  overflow: hidden;
  font-family: Arial, "Times New Roman", Georgia, Tahoma, sans-serif;
  font-size: 17.5px;
  text-align: left;
}

/* The Data & Insights landing page now matches the Research page width. */
article.research.data-list {
  width: 45%;
}

.data-entry {
  padding-top: 20px;
}

.first-data-entry {
  padding-top: 0;
}

/* Keep Read More and return links on a separate, lightly spaced line. */
.post-action-link {
  display: inline-block;
  margin-top: 8px;
}

.wrapper {
  width: 100%;
}

img.center {
  display: block;
  margin-right: auto;
  margin-left: auto;
}

/* ---------- Legacy CV and teaching selectors retained for compatibility ---------- */
#resume {
  width: 57%;
  margin: auto;
  overflow: hidden;
}

article#cv-pdf {
  text-align: center;
}

p#email {
  display: inline;
  margin-top: 0;
  margin-left: 0;
  padding-top: 0;
  padding-left: 0;
  color: #4682b4;
  font-weight: 550;
}

p#contains-email {
  display: inline;
}

article.teaching {
  width: 40%;
  margin: 50px auto 0;
  overflow: hidden;
  font-size: 14.5px;
  text-align: left;
}

ul.teaching-list {
  list-style: none;
  font-family: Arial, "Times New Roman", Tahoma, sans-serif;
  font-size: 15px;
}

article li {
  padding-top: 15px;
  font-style: italic;
}

/* ---------- Footer ---------- */
footer {
  right: 0;
  bottom: 0;
  left: 0;
  margin-top: 600px;
  margin-bottom: 40px;
  padding-bottom: 20px;
  overflow: hidden;
  color: #006d6f;
  text-align: center;
}

footer p {
  margin: 0;
  padding-top: 20px;
  border-top: 1.1px solid #ebedef;
  font-size: 14px;
  font-variant: small-caps;
}

/* The home page uses natural content height instead of the old floated-content hack. */
.home-page footer {
  margin-top: 165px;
}

/* These offsets preserve the original footer placement on content-heavy pages. */
.footer-dummy-research,
.footer-dummy-insight,
.footer-dummy-data {
  margin-bottom: -500px;
}

/* ---------- Responsive layout ---------- */
@media (max-width: 800px) {
  .box {
    width: 100%;
    float: none;
  }

  .home-layout {
    display: block;
    width: 88%;
    padding-top: 20px;
  }

  .home-layout .box:first-child,
  .home-layout .box:last-child {
    width: 100%;
  }

  #image {
    width: 100%;
    margin: 0;
    text-align: center;
  }

  #sidebar {
    width: 100%;
    height: auto;
    margin: 30px 0 0;
    overflow: hidden;
  }

  .home-page footer {
    margin-top: 100px;
  }

  header h1 {
    margin: 0;
    color: #004c54;
    font-family: "Times New Roman", Georgia, "Trebuchet MS", serif;
    font-size: 33px;
    font-stretch: ultra-condensed;
    font-variant: small-caps;
    font-weight: 100;
    letter-spacing: 0.05em;
    text-align: center;
    transform: scale(1, 1);
  }

  header h2 {
    margin: 0;
    color: #808080;
    font-family: "Brush Script MT", Didot, "Times New Roman", Arial, "Trebuchet MS", Georgia, serif;
    font-size: 9px;
    font-weight: lighter;
    text-align: center;
    transform: scale(1, 1.3);
  }

  header a {
    color: #006d6f;
    font-family: "Times New Roman", Georgia, serif, sans-serif;
    font-size: 14px;
    font-weight: 900;
    transform: scale(0.9, 1);
  }

  header li {
    padding: 0 9px;
  }

  article.teaching,
  article.research,
  article.research.data-list {
    width: 80%;
    margin: 30px auto 0;
    overflow: hidden;
    text-align: left;
  }

  article.teaching {
    font-size: 14.5px;
  }

  article.research {
    font-family: Arial, "Times New Roman", Georgia, Tahoma, sans-serif;
    font-size: 14px;
  }

  article.footnote {
    width: 40%;
    margin: 30px auto 0;
    overflow: hidden;
    font-family: Arial, "Times New Roman", Georgia, Tahoma, sans-serif;
    font-size: 6px;
    text-align: left;
  }

  #resume {
    width: 90%;
    margin: auto;
    overflow: hidden;
  }
}
