:root {
  --white: #FFFFFF;
  --cream: #F5EEDD;
  --faint-cream: #FBF7EE;
  --dark-cream: #E6DECC;

  --dark-gray: #2C2A29;
  --gray: #6B6663;
  --light-gray: #C9C5C1;
  --faint-gray: #F0EEEC;

  --miami-blue: #5BC2E7;
  --dark-miami: #2E8DB0;
  --light-miami: #A8E0F0;
  --faint-miami: #E8F7FB;
}

a {
  cursor: pointer;
  text-decoration: none;
}

a:visited {
  color: var(--dark-gray);
}

/* Inline links in the intro paragraphs and advisor lines: keep the surrounding
   text color, underline in Miami blue. Higher specificity + !important to
   override browser defaults and the global a:visited rule above. */
.header_body_text a,
.header_body_text a:link,
.header_body_text a:visited,
.experience_advisor a,
.experience_advisor a:link,
.experience_advisor a:visited {
  color: inherit !important;
  text-decoration: underline;
  text-decoration-color: var(--miami-blue);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.header_body_text a:hover,
.experience_advisor a:hover {
  text-decoration-color: var(--dark-miami);
}

a.fill_div {
  display: block;
  height: 100%;
  width: 100%;
  text-decoration: none;
}

html {
  margin: 0px;
  padding: 0px;
  scroll-behavior: smooth;
  background: var(--faint-cream);
}

body {
  margin: 0px;
  padding: 0px;
  background: var(--faint-cream);
}

.no_margins {
  margin: 0px;
}

.small_bottom_margin {
  margin: 0px 0px 10px 0px;
}

h1 {
  font-family: Montserrat;
  font-weight: 800;
  font-size: 2.5em;
  color: var(--dark-gray);
  margin: 0px;
}

h2 {
  font-family: Montserrat;
  font-weight: 600;
  font-size: 30px;
  color: var(--dark-gray);
}

h3 {
  color: var(--dark-gray);
  font-family: Lato;
  font-weight: 600;
  font-size: 21px;
}

h4 {
  color: var(--dark-gray);
  font-family: Lato;
  font-weight: bold;
  font-size: 16px;
  margin: 10px 5px;
}

h5 {
  color: var(--dark-gray);
  font-family: Lato;
  font-weight: normal;
  font-size: 16px;
}

h6 {
  color: var(--gray);
  font-family: Lato;
  font-weight: normal;
  font-size: 12px;
}

p, li {
  font-family: Lato;
  font-weight: normal;
  font-size: 18px;
  color: var(--dark-gray);
}

em {
  color: var(--gray);
}

.outline_shadow {
  border: 2px solid var(--dark-gray);
  border-radius: 8px;
  box-shadow: 7px 7px 0px var(--dark-gray);
}

/* =========================== */
/*       Section styling       */
/* =========================== */
.header_section {
  padding: 22px 50px 28px 50px;
  border: 4px solid var(--dark-gray);
  margin-top: 0;
  margin-left: auto;
  margin-right: auto;
  width: calc(100% - 40px);
  max-width: 1050px;
  box-sizing: border-box;
}

.section {
  padding: 28px 50px 40px 50px;
  border-bottom: 4px solid var(--dark-gray);
  border-left: 4px solid var(--dark-gray);
  border-right: 4px solid var(--dark-gray);
  margin-left: auto;
  margin-right: auto;
  width: calc(100% - 40px);
  max-width: 1050px;
  box-sizing: border-box;
}

main {
  padding-bottom: 50px;
}

content {
  width: 100%;
}

img {
  width: 90%;
  height: auto;
  margin: 40px auto;
  display: block;
  border: 2px solid var(--dark-gray);
  border-radius: 12px;
  box-shadow: 7px 7px 0px var(--dark-gray);
}

.center {
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  display: flex;
  flex-direction: column;
  row-gap: 18px;
}

/* =========================== */
/*     Intro section styling   */
/* =========================== */
.header_container {
  display: flex;
  flex-direction: column;
  row-gap: 10px;
}

/* tighten intro paragraphs so the email and the body text aren't far apart */
.header_body_text p {
  margin: 0;
}
.header_body_text p + p {
  margin-top: 10px;
}

.header_bar {
  display: flex;
  flex-direction: row;
  align-items: center;
  column-gap: 20px;
}

/* Top nav: dark-gray bar holding pill buttons, sits above each page's content */
.nav_section {
  width: calc(100% - 40px);
  max-width: 1050px;
  margin: 20px auto 8px auto;
  background: var(--dark-gray);
  border: 3px solid var(--dark-gray);
  border-radius: 12px;
  box-shadow: 4px 4px 0px var(--dark-gray);
  padding: 6px 14px;
  box-sizing: border-box;
}

.page_nav {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  column-gap: 10px;
  row-gap: 8px;
}

.nav_pill {
  display: inline-flex;
  align-items: center;
  padding: 5px 13px;
  background: var(--white);
  border: 2px solid var(--dark-gray);
  border-radius: 12px;
  box-shadow: 2px 2px 0px var(--dark-gray);
  font-family: Lato;
  font-weight: bold;
  font-size: 13px;
  color: var(--dark-gray);
  text-decoration: none;
  user-select: none;
}

.nav_pill:hover {
  background: var(--faint-miami);
  box-shadow: 3px 3px 0px var(--miami-blue);
}

.nav_pill:active {
  background: var(--light-miami);
  box-shadow: 2px 2px 0px var(--dark-miami);
}

.nav_pill.active {
  background: var(--miami-blue);
  color: var(--white);
  box-shadow: 3px 3px 0px var(--dark-miami);
}

.header_title {
  display: flex;
  flex-direction: column;
  row-gap: 4px;
  flex-grow: 1;
}

.header_body {
  display: flex;
  flex-direction: row;
  column-gap: 70px;
  align-items: center;
}

/* Two-column layout: text stack on left, headshot top-aligned on right */
.header_split {
  display: flex;
  flex-direction: row;
  column-gap: 50px;
  align-items: flex-start;
}

.header_split_left {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  row-gap: 14px;
}

.headshot_img {
  flex-basis: 340px;
  flex-grow: 0;
  flex-shrink: 0;
  width: 340px;
  height: 440px;
  object-fit: cover;
  object-position: center;
  border: 2px solid var(--dark-gray);
  border-radius: 8px;
  box-shadow: 7px 7px 0px var(--dark-gray);
  /* override the global img rules from earlier in the stylesheet */
  margin: 0;
  display: block;
  image-rendering: auto;
}

/* =========================== */
/*  Research section styling   */
/* =========================== */
.research_container {
  display: flex;
  flex-direction: column;
  row-gap: 18px;
}

.research_img {
  min-height: 200px;
  align-self: stretch;
  flex-basis: 180px;
  flex-grow: 0;
  flex-shrink: 0;
  background-color: var(--dark-gray);
  background-size: cover !important;
  background-repeat: no-repeat !important;
  border-right: 3px solid var(--dark-gray);
  /* HTML/CSS text overlay (consistent size regardless of card height) */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px 6px;
  box-sizing: border-box;
  text-align: center;
  color: var(--white);
  overflow: hidden;
}

.research_img_title {
  font-family: "Arial Black", Helvetica, sans-serif;
  font-weight: 900;
  font-size: 19px;
  line-height: 1.1;
  color: var(--white);
  display: block;
  word-break: break-word;
}

.research_img_subtitle {
  font-family: Lato, sans-serif;
  font-style: italic;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.85);
  margin-top: 4px;
  display: block;
}

.horizontal_card {
  display: flex;
  flex-direction: row;
  column-gap: 30px;
  overflow: hidden;
  background: var(--white);
  box-shadow: 7px 7px 0px var(--dark-gray);
  border: 3px solid var(--dark-gray);
  border-radius: 12px;
  align-items: stretch;
  padding-right: 30px;
  cursor: pointer;
}

.horizontal_card.static_card {
  cursor: default;
}

.small_vertical_card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--white);
  box-shadow: 7px 7px 0px var(--dark-gray);
  border: 3px solid var(--dark-gray);
  border-radius: 12px;
}

.research_entry:hover {
  box-shadow: 7px 7px 0px var(--miami-blue);
}

.research_entry:active {
  box-shadow: 7px 7px 0px var(--dark-miami);
}

.card_buttons {
  display: flex;
  flex-direction: row;
  column-gap: 50px;
  margin-left: auto;
}

.card_description {
  display: flex;
  flex-direction: column;
  row-gap: 12px;
  flex: 1;
  padding: 14px 0;
}

/* Project cards: tighter than publication cards */
.project_entry .card_description {
  row-gap: 6px;
  padding: 10px 0;
}

.project_entry .card_description h3 {
  font-size: 17px;
}

.project_entry .card_description h5 {
  font-size: 14.5px;
  line-height: 1.4;
}

/* =========================== */
/*  Experience section styling */
/* =========================== */
.experience_container {
  display: flex;
  flex-direction: column;
  row-gap: 12px;
}

.experience_entry {
  background: var(--white);
  box-shadow: 5px 5px 0px var(--dark-gray);
  border: 3px solid var(--dark-gray);
  border-radius: 10px;
  padding: 12px 22px 14px 22px;
  display: flex;
  flex-direction: column;
  row-gap: 2px;
}

.experience_header {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: baseline;
  column-gap: 16px;
}

.experience_entry h3 {
  font-size: 18px;
}

.experience_org {
  font-family: Lato;
  font-weight: 600;
  font-size: 14px;
  color: var(--dark-miami);
  margin: 0;
}

.experience_advisor {
  font-style: italic;
  color: var(--gray);
}

.experience_entry ul {
  margin: 4px 0 0 0;
  padding-left: 20px;
}

.experience_entry li {
  font-size: 14.5px;
  line-height: 1.35;
  margin-bottom: 2px;
}

/* Project cards reuse .experience_entry styling. Blurb paragraph
   matches the bullet font size/line-height. */
.project_blurb {
  font-size: 14.5px;
  line-height: 1.4;
  margin: 4px 0 0 0;
}

/* =========================== */
/*  Projects section styling   */
/* =========================== */
.project_container {
  display: flex;
  flex-direction: column;
  row-gap: 12px;
}

.project_img {
  height: 130px;
  flex-basis: 150px;
  flex-grow: 0;
  flex-shrink: 0;
  background-size: cover !important;
  background-repeat: no-repeat !important;
  border-right: 3px solid var(--dark-gray);
}

.small_project_img {
  height: 200px;
  width: 100%;
  background-size: cover !important;
  border-bottom: 3px solid var(--dark-gray);
}

.project_entry:hover {
  box-shadow: 7px 7px 0px var(--miami-blue);
}

.project_entry:active {
  box-shadow: 7px 7px 0px var(--dark-miami);
}

/* Static cards: not clickable, no pointer cursor or hover lift */
.static_card {
  cursor: default;
}

.static_card:hover,
.static_card:active {
  box-shadow: 7px 7px 0px var(--dark-gray);
}

.under_construction {
  font-style: italic;
  color: var(--gray);
  font-size: 14px;
  margin: 0 0 6px 0;
}

.project_grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 32px;
  margin-top: 50px;
  margin-bottom: 50px;
}

/* =========================== */
/*  Awards section styling     */
/* =========================== */
.awards_container {
  display: flex;
  flex-direction: column;
  row-gap: 14px;
}

.award_entry {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: baseline;
  column-gap: 16px;
  background: var(--white);
  border: 2px solid var(--dark-gray);
  border-radius: 10px;
  box-shadow: 5px 5px 0px var(--dark-gray);
  padding: 14px 20px;
}

.award_text {
  display: flex;
  flex-direction: column;
  row-gap: 2px;
  flex: 1;
}

.award_org {
  color: var(--dark-miami);
  font-weight: 600;
  font-size: 14px;
}

.award_year {
  font-family: Lato;
  font-size: 13px;
  color: var(--gray);
  white-space: nowrap;
}

/* =========================== */
/*  Generic content pages      */
/* =========================== */
.content_section {
  background: var(--faint-cream);
  padding: 40px 50px 60px 50px;
}

.content_section h2 {
  margin-top: 24px;
}

.content_section p,
.content_section li {
  font-size: 17px;
  line-height: 1.6;
}

.post_snippet {
  background: var(--white);
  border: 3px solid var(--dark-gray);
  border-radius: 12px;
  box-shadow: 7px 7px 0px var(--dark-gray);
  padding: 20px 28px;
  margin-bottom: 24px;
}

.post_snippet h3 {
  margin: 0 0 6px 0;
}

.post_snippet time {
  font-family: Lato;
  font-size: 13px;
  color: var(--gray);
}

.post_empty {
  font-style: italic;
  color: var(--gray);
}

/* ========================================================================================= */
/*                          ICONS & BUTTONS                                                  */
/* ========================================================================================= */

.header_buttons_container {
  display: flex;
  flex-direction: row;
  width: 100%;
  column-gap: 40px;
}

.accent_bounded_button {
  height: auto;
  width: auto;
  max-width: 50%;
  padding: 10px 20px;
  flex-basis: auto;
  flex-grow: 0;
  flex-shrink: 0;
  display: flex;
  flex-direction: row;
  align-items: center;
  column-gap: 8px;
  background: var(--white);
  box-shadow: 4px 4px 0px var(--dark-gray);
  border: 2px solid var(--dark-gray);
  border-radius: 15px;
  font-family: Lato;
  font-weight: bold;
  color: var(--dark-gray);
  font-size: 15px;
  text-align: center;
  text-decoration: none;
}

.accent_bounded_button:hover {
  background: var(--faint-miami);
  box-shadow: 4px 4px 0px var(--miami-blue);
}

.accent_bounded_button:active {
  background: var(--light-miami);
  box-shadow: 2px 2px 0px var(--dark-miami);
}

.accent_arrow_icon {
  fill: var(--light-miami);
}

.accent_bounded_button:hover .accent_arrow_icon {
  fill: var(--miami-blue);
}

.accent_bounded_button:active .accent_arrow_icon {
  fill: var(--dark-miami);
}

.accent_text_button {
  height: auto;
  width: auto;
  background: transparent;
  border: 0px;
  flex-basis: auto;
  flex-grow: 0;
  flex-shrink: 0;
  display: flex;
  flex-direction: row;
  align-items: center;
  column-gap: 8px;
  font-family: Lato;
  font-weight: bold;
  color: var(--dark-gray);
  font-size: 15px;
  text-align: center;
  text-decoration: none;
  user-select: none;
}

.accent_text_button:hover {
  color: var(--miami-blue);
}

.accent_text_button:active {
  color: var(--dark-miami);
}

.accent_text_button:hover .accent_arrow_icon {
  fill: var(--miami-blue);
}

.accent_text_button:active .accent_arrow_icon {
  fill: var(--dark-miami);
}

.circle_arrow_circle,
.circle_arrow_arrow {
  stroke: var(--dark-gray);
}

/* =========================== */
/*  Footer                     */
/* =========================== */
footer.site_footer {
  width: calc(100% - 40px);
  max-width: 1050px;
  margin: 30px auto 50px auto;
  text-align: center;
  font-family: Lato;
  color: var(--gray);
  font-size: 13px;
}

footer.site_footer a {
  color: var(--dark-miami);
  text-decoration: underline;
}

.footer_credit {
  margin: 4px 0 0 0;
  font-size: 12px;
}

/* ========================================================================================= */
/*                          RESPONSIVE  (tablet & mobile)                                    */
/* ========================================================================================= */

/* Tablet & smaller: keep horizontal layout but tighten paddings and let the
   1050px-fixed sections shrink with the viewport. */
@media (max-width: 1100px) {
  .header_section,
  .section,
  footer.site_footer {
    width: auto;
    margin-left: 20px;
    margin-right: 20px;
  }

  .header_section,
  .section {
    padding-left: 28px;
    padding-right: 28px;
  }

  .project_grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* Tablet portrait: stack the header bar (title above nav) and the intro body
   (text above headshot). Cards still horizontal. */
@media (max-width: 820px) {
  .header_bar {
    flex-direction: column;
    align-items: flex-start;
    row-gap: 12px;
  }

  .header_menu {
    column-gap: 16px;
    row-gap: 8px;
  }

  .header_body {
    flex-direction: column-reverse;
    column-gap: 0;
    row-gap: 24px;
    align-items: flex-start;
  }

  /* Stack the two-column header on narrow screens; headshot floats above text */
  .header_split {
    flex-direction: column-reverse;
    column-gap: 0;
    row-gap: 18px;
    align-items: flex-start;
  }

  .header_split .headshot_img {
    align-self: center;
  }

  .headshot_img {
    flex-basis: auto;
    width: 280px;
    height: 360px;
    object-fit: cover;
  }

  .header_section {
    padding-top: 40px;
    padding-bottom: 40px;
  }

  .section {
    padding-top: 30px;
    padding-bottom: 40px;
  }
}

/* Mobile: stack horizontal cards (image above text), shrink fonts, tighten
   paddings, single-column project grid. */
@media (max-width: 640px) {
  h1 {
    font-size: 2em;
  }

  h2 {
    font-size: 24px;
  }

  h3 {
    font-size: 18px;
  }

  p, li {
    font-size: 16px;
  }

  .header_section,
  .section,
  footer.site_footer {
    margin-left: 12px;
    margin-right: 12px;
  }

  .center {
    padding-left: 16px;
    padding-right: 16px;
    row-gap: 22px;
  }

  /* horizontal_card stacks vertically; image becomes a top banner */
  .horizontal_card {
    flex-direction: column;
    column-gap: 0;
    padding-right: 0;
    align-items: stretch;
  }

  .research_img,
  .project_img {
    height: 180px;
    flex-basis: auto;
    width: 100%;
    border-right: 0;
    border-bottom: 3px solid var(--dark-gray);
  }

  .card_description {
    padding: 16px 18px 20px 18px;
    row-gap: 12px;
  }

  .card_buttons {
    column-gap: 24px;
    margin-left: 0;
    flex-wrap: wrap;
  }

  /* Experience cards: stack role/date if cramped */
  .experience_header {
    flex-direction: column;
    align-items: flex-start;
    row-gap: 4px;
  }

  .experience_entry {
    padding: 18px 20px;
  }

  /* Award entries: stack year below text */
  .award_entry {
    flex-direction: column;
    align-items: flex-start;
    row-gap: 6px;
    padding: 14px 16px;
  }

  /* Project grid collapses to one column */
  .project_grid {
    grid-template-columns: 1fr;
    gap: 24px;
    margin-top: 30px;
    margin-bottom: 30px;
  }

  /* Header buttons wrap and shrink */
  .header_buttons_container {
    column-gap: 16px;
    row-gap: 12px;
    flex-wrap: wrap;
  }

  .accent_bounded_button {
    max-width: none;
    padding: 8px 16px;
  }

  /* CV button & menu stay inline */
  .header_menu_text {
    font-size: 15px;
  }
}

/* Very small phones */
@media (max-width: 380px) {
  h1 {
    font-size: 1.75em;
  }

  .header_section,
  .section,
  footer.site_footer {
    margin-left: 8px;
    margin-right: 8px;
    border-left-width: 3px;
    border-right-width: 3px;
  }

  .header_section {
    border-width: 3px;
  }

  .center {
    padding-left: 14px;
    padding-right: 14px;
  }

  .horizontal_card,
  .experience_entry {
    box-shadow: 5px 5px 0px var(--dark-gray);
  }

  .horizontal_card:hover,
  .experience_entry:hover,
  .research_entry:hover {
    box-shadow: 5px 5px 0px var(--miami-blue);
  }
}
