/* =========================================================
   DIANA DÁVILA GORDILLO — CUSTOM WEBSITE STYLING
   Palette:
   Navy:       #243A5E
   Berry:      #8A3F59
   Dusty rose: #D8A8B5
   Blush:      #F7ECEF
   Warm white: #FFFDFC
   Charcoal:   #2F3136
   ========================================================= */


/* ---------- General typography ---------- */

body {
  color: #2F3136;
  background-color: #FFFDFC;
}

p,
li {
  line-height: 1.65;
}

a {
  color: #243A5E;
  text-decoration-color: #D8A8B5;
  text-underline-offset: 0.15em;
}

a:hover,
a:focus {
  color: #8A3F59;
}


/* ---------- Navigation ---------- */

.navbar {
  background-color: #F7ECEF !important;
  box-shadow: 0 1px 8px rgba(36, 58, 94, 0.08);
}

.navbar-brand {
  color: #243A5E !important;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.navbar-nav .nav-link {
  color: #243A5E !important;
  font-weight: 500;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link:focus,
.navbar-nav .nav-item.active .nav-link {
  color: #8A3F59 !important;
}


/* ---------- Major section headings ---------- */

.home-section h1,
.home-section h2 {
  color: #243A5E;
}

.home-section .section-heading h1 {
  position: relative;
  display: inline-block;
  margin-bottom: 1.8rem;
}

.home-section .section-heading h1::after {
  content: "";
  display: block;
  width: 54px;
  height: 3px;
  margin-top: 0.55rem;
  background-color: #D8A8B5;
  border-radius: 2px;
}


/* ---------- About / profile section ---------- */

#profile {
  padding-top: 1rem;
}

#profile .avatar {
  width: 270px !important;
  height: 270px !important;
  max-width: 270px !important;
  object-fit: cover;
  object-position: center center;
  margin: 0 auto 1.25rem auto;
  opacity: 1 !important;
  filter: none !important;
}

#profile .portrait-title h2 {
  color: #243A5E;
  font-size: 2rem;
  line-height: 1.15;
  margin-bottom: 0.45rem;
}

#profile .portrait-title h3 {
  color: #565B66;
  font-size: 1.08rem;
  line-height: 1.4;
  margin-top: 0;
}

#profile .network-icon a {
  color: #243A5E;
}

#profile .network-icon a:hover {
  color: #8A3F59;
}


/* ---------- Research section ---------- */

#projects h3 {
  color: #243A5E;
  font-size: 1.38rem;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

#projects h3::after {
  content: "";
  display: block;
  width: 36px;
  height: 2px;
  margin-top: 0.45rem;
  background-color: #D8A8B5;
}

#projects p {
  line-height: 1.7;
}


/* ---------- Publications section ---------- */

#publications h3 {
  color: #243A5E;
  font-size: 1.35rem;
  margin-top: 2rem;
  margin-bottom: 0.9rem;
}

#publications ul {
  padding-left: 1.4rem;
}

#publications li {
  margin-bottom: 1rem;
  line-height: 1.6;
}

#publications hr {
  margin: 2rem 0;
  border: 0;
  border-top: 1px solid #E8D5DB;
}

#publications strong {
  color: #243A5E;
}

#publications a {
  color: #8A3F59;
  font-weight: 500;
}

#publications a:hover {
  color: #243A5E;
}


/* ---------- Teaching section ---------- */

#teaching h3 {
  color: #243A5E;
  margin-top: 2rem;
  margin-bottom: 0.9rem;
}

#teaching strong {
  color: #243A5E;
}


/* ---------- Buttons ---------- */

.btn-primary,
.btn-primary:visited {
  color: #FFFFFF !important;
  background-color: #243A5E !important;
  border-color: #243A5E !important;
}

.btn-primary:hover,
.btn-primary:focus {
  color: #FFFFFF !important;
  background-color: #8A3F59 !important;
  border-color: #8A3F59 !important;
}


/* ---------- Resource page ---------- */

.article-style h2,
.article-style h3 {
  color: #243A5E;
}

.article-style h2 {
  margin-top: 2.2rem;
}

.article-style a {
  color: #8A3F59;
}

.article-style a:hover {
  color: #243A5E;
}


/* ---------- Mobile adjustments ---------- */

@media (max-width: 768px) {
  #profile .avatar {
    width: 220px !important;
    height: 220px !important;
    max-width: 220px !important;
  }

  #profile .portrait-title h2 {
    font-size: 1.7rem;
  }

  .home-section .section-heading h1 {
    font-size: 2rem;
  }
}

/* =========================================================
   FINAL POLISH
   ========================================================= */


/* Give sections a little more breathing room */

.home-section {
  padding-top: 4.5rem;
  padding-bottom: 4.5rem;
}


/* Subtle transition between homepage sections */

/* Explicit alternating homepage backgrounds */
#about {
  background-color: #FFFDFC !important;
}

#projects {
  background-color: #F8F3F4 !important;
}

#publications {
  background-color: #FFFDFC !important;
}

#teaching {
  background-color: #F8F3F4 !important;
}

#diplomatic {
  background-color: #FFFDFC !important;
}

/* Refine the profile photograph */

#profile .avatar {
  border: 5px solid #FFFFFF;
  box-shadow:
    0 0 0 2px #D8A8B5,
    0 10px 28px rgba(36, 58, 94, 0.16);
}


/* Make the profile name slightly more distinctive */

#profile .portrait-title h2 {
  letter-spacing: -0.02em;
  font-weight: 500;
}


/* Elegant link movement */

a {
  transition:
    color 0.2s ease,
    border-color 0.2s ease,
    opacity 0.2s ease;
}


/* Navigation hover underline */

.navbar-nav .nav-link {
  position: relative;
}

.navbar-nav .nav-link::after {
  content: "";
  position: absolute;
  left: 0.5rem;
  right: 0.5rem;
  bottom: 0.25rem;
  height: 2px;
  background-color: #D8A8B5;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.2s ease;
}

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-item.active .nav-link::after {
  transform: scaleX(1);
}


/* Slightly soften major headings */

.home-section .section-heading h1 {
  font-weight: 500;
  letter-spacing: -0.025em;
}


/* Make research headings feel more deliberate */

#projects h3 {
  padding-left: 0.85rem;
  border-left: 4px solid #D8A8B5;
}

#projects h3::after {
  display: none;
}


/* Cleaner publication bullets */

#publications ul {
  list-style: none;
  padding-left: 0;
}

#publications li {
  position: relative;
  padding-left: 1.35rem;
}

#publications li::before {
  content: "◆";
  position: absolute;
  left: 0;
  top: 0.18rem;
  color: #D8A8B5;
  font-size: 0.62rem;
}


/* Add a soft card effect to teaching subsections */

#teaching h3 {
  padding-bottom: 0.4rem;
  border-bottom: 2px solid #E8D5DB;
}


/* Refine the footer */

footer {
  background-color: #243A5E;
  color: #F7ECEF;
  padding-top: 1.4rem;
  padding-bottom: 1.4rem;
}

footer a {
  color: #FFFFFF;
}

footer a:hover {
  color: #D8A8B5;
}


/* Keep mobile layout comfortable */

@media (max-width: 768px) {
  .home-section {
    padding-top: 3rem;
    padding-bottom: 3rem;
  }

  .navbar-nav .nav-link::after {
    display: none;
  }
}

/* =========================================================
   HIGH-VISIBILITY POLISH
   ========================================================= */

/* 1. Stronger navigation bar */
nav.navbar {
  background: #243A5E !important;
  box-shadow: 0 3px 14px rgba(36, 58, 94, 0.22) !important;
}

nav.navbar .navbar-brand,
nav.navbar .nav-link {
  color: #FFFFFF !important;
}

nav.navbar .nav-link:hover,
nav.navbar .nav-item.active .nav-link {
  color: #F2C8D3 !important;
}


/* 2. Clearer section titles */
.home-section h1 {
  color: #243A5E !important;
  font-weight: 600 !important;
  padding-bottom: 0.55rem;
  border-bottom: 4px solid #D8A8B5;
  display: inline-block;
}


/* 3. More visible research blocks */
#projects h3 {
  color: #243A5E !important;
  background: #F7ECEF;
  padding: 0.8rem 1rem;
  border-left: 5px solid #8A3F59;
  border-radius: 4px;
}


/* 4. Publication categories as distinct bands */
#publications h3 {
  color: #FFFFFF !important;
  background: #243A5E;
  padding: 0.65rem 1rem;
  border-radius: 4px;
  margin-top: 2.5rem;
}


/* 5. Teaching headings */
#teaching h3 {
  color: #243A5E !important;
  padding-left: 0.8rem;
  border-left: 4px solid #D8A8B5;
}


/* 6. Portrait frame */
#profile .avatar {
  border: 6px solid #FFFFFF !important;
  box-shadow:
    0 0 0 3px #D8A8B5,
    0 12px 30px rgba(36, 58, 94, 0.22) !important;
}

/* Resources page */

.resources-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
  margin: 2.5rem 0 3rem;
}

.resource-card {
  position: relative;
  padding: 1.75rem 1.75rem 1.75rem 2rem;
  background: #fff;
  border: 1px solid rgba(90, 60, 80, 0.13);
  border-radius: 18px;
  box-shadow: 0 8px 24px rgba(70, 45, 60, 0.08);
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.resource-card::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 7px;
}

.resource-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 32px rgba(70, 45, 60, 0.14);
}

.resource-card-1::before {
  background: #b04f7a;
}

.resource-card-2::before {
  background: #d17d63;
}

.resource-card-3::before {
  background: #6d9a90;
}

.resource-card-4::before {
  background: #8b74b4;
}

.resource-card h3 {
  margin-top: 0;
  margin-bottom: 0.85rem;
  font-size: 1.35rem;
}

.resource-card p,
.resource-card li {
  line-height: 1.7;
}

.resource-card li {
  margin-bottom: 0.8rem;
}

.resource-card-1 a {
  color: #b04f7a;
}

.resource-card-2 a {
  color: #d17d63;
}

.resource-card-3 a {
  color: #6d9a90;
}

.resource-card-4 a {
  color: #8b74b4;
}

.resource-card a {
  font-weight: 600;
}

@media screen and (max-width: 760px) {
  .resources-grid {
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   TEACHING MATERIALS
   ========================================================= */

.teaching-materials {
  width: 100%;
  margin: 1.5rem auto 0;
}

.teaching-intro {
  max-width: 820px;
  margin: 0 auto 2.5rem;
  text-align: center;
  font-size: 1.02rem;
  line-height: 1.75;
}

.teaching-intro a {
  font-weight: 600;
  text-decoration: none;
}

.teaching-intro a:hover {
  text-decoration: underline;
}

.teaching-institution {
  margin: 3rem 0 1.4rem;
  text-align: center;
  font-size: 1.65rem;
  font-weight: 700;
}

.course-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.6rem;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
}

.course-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 330px;
  padding: 1.8rem;
  background: #ffffff;
  border-top: 6px solid;
  border-radius: 12px;
  box-shadow: 0 5px 18px rgba(30, 30, 30, 0.09);
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
}

.course-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 28px rgba(30, 30, 30, 0.14);
}

.course-card h3 {
  margin: 0.3rem 0 0.9rem;
  font-size: 1.35rem;
  line-height: 1.3;
}

.course-card p {
  line-height: 1.65;
}

.course-meta {
  margin: 0;
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.035em;
  text-transform: uppercase;
  opacity: 0.72;
}

.course-topics {
  margin-top: 1rem;
  font-size: 0.91rem;
  font-weight: 600;
  opacity: 0.78;
}

.syllabus-button {
  display: inline-block;
  align-self: flex-start;
  margin-top: 1.4rem;
  padding: 0.65rem 1.15rem;
  color: #ffffff !important;
  background: #333333;
  border-radius: 6px;
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none !important;
  transition:
    transform 0.2s ease,
    opacity 0.2s ease;
}

.syllabus-button:hover {
  color: #ffffff !important;
  opacity: 0.88;
  transform: translateY(-1px);
}

/* Alternating accent colors */

.course-card-rose {
  border-top-color: #c77782;
}

.course-card-gold {
  border-top-color: #d4a84f;
}

.course-card-blue {
  border-top-color: #6e91ad;
}

.course-card-green {
  border-top-color: #789b83;
}

/* Dark mode */

.dark .course-card,
body.dark .course-card {
  background: #252525;
  box-shadow: 0 5px 18px rgba(0, 0, 0, 0.28);
}

.dark .course-card:hover,
body.dark .course-card:hover {
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.38);
}

/* Mobile layout */

@media screen and (max-width: 768px) {
  .course-card-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .course-card {
    min-height: auto;
    padding: 1.5rem;
  }

  .teaching-institution {
    margin-top: 2.5rem;
    font-size: 1.45rem;
  }
}

/* Teaching resources page width */

body .article-container {
  max-width: 1180px;
}

.teaching-intro {
  max-width: 850px;
  margin: 0 auto 3rem;
  text-align: center;
}

.course-card-grid {
  grid-template-columns: repeat(2, minmax(320px, 1fr));
}

.course-card h3 {
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
}

.resource-link-button {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.65rem 1rem;
  background: #263f68;
  color: #fff !important;
  border-radius: 6px;
  font-weight: 600;
  text-decoration: none !important;
}

.resource-link-button:hover {
  opacity: 0.88;
}

@media screen and (max-width: 800px) {
  .course-card-grid {
    grid-template-columns: 1fr;
  }
}

/* Improve mobile navigation visibility */

@media (max-width: 991.98px) {

  .navbar-collapse {
    background: #ffffff !important;
    padding: 1rem 1.25rem;
    margin-top: 0.5rem;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16);
    position: relative;
    z-index: 9999;
  }

  .navbar-collapse .nav-link,
  .navbar-collapse .navbar-nav .nav-link {
    color: #223a5e !important;
    font-weight: 600;
    padding: 0.7rem 0 !important;
  }

  .navbar-collapse .nav-link:hover,
  .navbar-collapse .nav-link:focus {
    color: #b45f72 !important;
  }

  .navbar-collapse .dropdown-menu {
    background: #f7f7f7 !important;
    border: none;
    box-shadow: none;
    padding: 0.4rem 0.75rem;
  }

  .navbar-collapse .dropdown-item {
    color: #223a5e !important;
    white-space: normal;
    padding: 0.55rem 0.75rem;
  }

  .navbar-collapse .dropdown-item:hover,
  .navbar-collapse .dropdown-item:focus {
    background: #eeeeee !important;
    color: #b45f72 !important;
  }

  .navbar-toggler {
    border-color: rgba(34, 58, 94, 0.35) !important;
  }

  .navbar-toggler-icon {
    filter: none !important;
  }
}


/* Make the mobile hamburger menu clearly visible */

@media (max-width: 991.98px) {

  .navbar-toggler {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 42px;
    padding: 8px;
    margin-left: 0;
    border: 2px solid #223a5e !important;
    border-radius: 6px;
    background: #ffffff !important;
    opacity: 1 !important;
    visibility: visible !important;
  }

  .navbar-toggler-icon {
    display: block !important;
    width: 26px !important;
    height: 22px !important;
    background-image: none !important;
    position: relative;
  }

  .navbar-toggler-icon::before,
  .navbar-toggler-icon::after,
  .navbar-toggler-icon {
    border-top: 3px solid #223a5e;
  }

  .navbar-toggler-icon::before,
  .navbar-toggler-icon::after {
    content: "";
    position: absolute;
    left: 0;
    width: 26px;
  }

  .navbar-toggler-icon::before {
    top: 6px;
  }

  .navbar-toggler-icon::after {
    top: 15px;
  }

}
