:root {
  --primary: #0e76bb;
  --primary-dark: #081b37;
  --secondary: #464646;
  --accent: #0ecad4;
  --surface: #f5f8fc;
  --surface-deep: #eef5fb;
  --text: #101828;
  --muted: #5d6b82;
  --border: rgba(15, 34, 65, 0.1);
  --shadow-sm: 0 12px 28px rgba(8, 27, 55, 0.08);
  --shadow-md: 0 20px 48px rgba(8, 27, 55, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Roboto", sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.7;
  color: var(--text);
  background: #fff;
}

p {
  font-size: 16px;
  font-weight: 400;
  line-height: 1.75;
}

h1, h2, h3, h4, h5, h6 {
  font-family: "Roboto", sans-serif;
  font-weight: 700;
  line-height: 1.25;
}

.site-header .container-xxl,
.home-reference .home-ticker .container-xxl {
  width: min(calc(100% - 32px), 1768px);
  max-width: none;
  padding-left: 0;
  padding-right: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

.btn {
  border-radius: 999px;
  font-weight: 700;
}

.btn-primary {
  background: var(--primary);
  border-color: var(--primary);
}

.btn-primary:hover,
.btn-primary:focus {
  background: #0a66a1;
  border-color: #0a66a1;
}

.btn-outline-primary {
  color: var(--primary);
  border-color: rgba(14, 118, 187, 0.35);
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
  background: var(--primary);
  border-color: var(--primary);
}

.section-title {
  position: relative;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  color: var(--primary);
  font-family: "Roboto", sans-serif;
  font-size: clamp(1.9rem, 2vw, 2.5rem);
  font-weight: 800;
}

.section-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 70px;
  height: 4px;
  border-radius: 999px;
  background: var(--accent);
}

.section-title.text-center::after {
  left: 50%;
  transform: translateX(-50%);
}

.card {
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: var(--shadow-sm);
}

.site-header {
  position: relative;
  z-index: 100;
}

.utility-bar {
  background: #000;
  color: #fff;
  font-size: 0.82rem;
}

.utility-bar__inner {
  min-height: 46px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0;
}

.utility-bar__email,
.utility-links,
.utility-meta {
  display: flex;
  align-items: center;
}

.utility-bar__email {
  min-height: 46px;
  padding: 0 28px 0 30px;
  gap: 0.55rem;
  background: var(--primary);
  border-radius: 0 999px 999px 0;
  font-size: 0.85rem;
  font-weight: 500;
}

.utility-bar__email i {
  font-size: 1.15rem;
  line-height: 1;
}

.utility-links {
  justify-content: center;
  gap: 0;
  min-height: 46px;
  padding: 0 8px;
}

.utility-links a,
.utility-bar__email a {
  color: inherit;
  transition: color 0.2s ease;
}

.utility-links a {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 22px;
  border-right: 1px solid rgba(255, 255, 255, 0.45);
  font-size: 0.82rem;
  font-weight: 500;
  line-height: 1.1;
}

.utility-links a:last-child {
  border-right: 0;
}

.utility-links a:hover,
.utility-bar__email a:hover {
  color: #fff;
}

.utility-meta {
  min-height: 46px;
  justify-self: end;
  gap: 8px;
}

.utility-social-shell {
  min-height: 46px;
  display: flex;
  align-items: center;
  padding: 0 18px 0 22px;
  background: var(--primary);
  border-radius: 999px 0 0 999px;
}

.utility-bar .social-links--small {
  gap: 14px;
}

.utility-bar .social-links--small a {
  width: auto;
  height: auto;
  background: transparent;
  color: #fff;
  font-size: 1.05rem;
}

.utility-bar .social-links--small a:hover {
  transform: none;
  background: transparent;
  color: #d9efff;
}

.utility-language {
  position: relative;
  display: flex;
  align-items: center;
}

.utility-language::after {
  content: "";
  position: absolute;
  top: 48%;
  right: 15px;
  width: 8px;
  height: 8px;
  border-right: 1.5px solid rgba(255, 255, 255, 0.9);
  border-bottom: 1.5px solid rgba(255, 255, 255, 0.9);
  transform: translateY(-50%) rotate(45deg);
  pointer-events: none;
}

.utility-language select {
  min-width: 150px;
  height: 36px;
  padding: 0 38px 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 0;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 500;
  appearance: none;
  outline: none;
}

.utility-language select:focus {
  border-color: rgba(255, 255, 255, 0.6);
}

.utility-language select option {
  color: #111;
}

.google-translate-shell {
  position: fixed;
  left: -9999px;
  bottom: 0;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.goog-te-gadget,
.goog-te-gadget-simple,
.goog-te-banner-frame,
.goog-te-banner-frame.skiptranslate,
.skiptranslate,
body > .skiptranslate,
iframe.skiptranslate,
.goog-te-menu-frame,
.goog-te-balloon-frame,
#goog-gt-tt,
.goog-te-spinner-pos,
.goog-tooltip {
  display: none !important;
}

body {
  top: 0 !important;
}

.goog-text-highlight {
  background-color: transparent !important;
  box-shadow: none !important;
}

.branding-strip {
  background: #fff;
}

.branding-strip__inner {
  min-height: 122px;
  display: grid;
  grid-template-columns: minmax(250px, 430px) minmax(0, 1fr) auto;
  align-items: center;
  gap: 1.5rem;
}

.brand-lockup img {
  width: min(100%, 360px);
}

.brand-badge {
  justify-content: center;
}

.brand-badge img {
  max-height: 70px;
}

.brand-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1rem;
}

.search-trigger {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 0;
  color: #000;
  background: transparent;
  box-shadow: none;
  font-size: 1.35rem;
  transition: color 0.2s ease;
}

.search-trigger:hover {
  color: var(--primary);
}

.admission-pill {
  padding: 17px 25px;
  border-radius: 0;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.02em;
  line-height: 1;
  text-transform: uppercase;
  transition: background 0.2s ease;
}

.admission-pill:hover {
  background: #0b5e96;
}

.nav-shell {
  background: #e6e6e6;
  border-top: 0;
  border-bottom: 0;
  box-shadow: none;
}

.nav-brand-mobile {
  font-family: "Roboto", sans-serif;
  font-weight: 800;
  color: var(--primary-dark);
}

.navbar-toggler {
  border: none;
  font-size: 1.85rem;
  color: var(--primary-dark);
}

.navbar-toggler:focus {
  box-shadow: none;
}

.nav-shell .navbar-nav {
  gap: 0.2rem;
}

.nav-shell .nav-link {
  padding: 0.4rem 0.9rem;
  color: #2f2f2f;
  font-size: 0.96rem;
  font-weight: 600;
}

.nav-shell .nav-link:hover,
.nav-shell .nav-link:focus,
.nav-shell .nav-link.show,
.nav-shell .nav-link.active {
  color: var(--primary);
}

.dropdown-menu {
  min-width: 250px;
  margin-top: 0;
  padding: 0.4rem 0.7rem;
  border: 0;
  border-radius: 0;
  box-shadow: var(--shadow-md);
}

/* Bridge the gap between nav-link and dropdown so hover is not lost */
@media (min-width: 1200px) {
  .nav-shell .dropdown-menu::before {
    content: '';
    position: absolute;
    top: -15px;
    left: 0;
    right: 0;
    height: 15px;
  }
}

.dropdown-menu--wide {
  min-width: 320px;
}

.dropdown-item {
  padding: 15px 17px;
  border-radius: 0;
  color: var(--text);
  font-family: "Roboto", sans-serif;
  font-size: 14px;
  font-weight: 500;
  border-bottom: 1px solid #c4c4c4;
  line-height: 1.2;
  white-space: normal;
}

.dropdown-item:hover,
.dropdown-item:focus {
  background: #fff;
  color: var(--primary);
}

.dropdown-menu--academics {
  min-width: 360px;
  padding: 0;
  background: #fff;
}

.dropdown-menu--news {
  min-width: 330px;
  padding: 0;
  background: #fff;
}

.dropdown-menu--compact {
  min-width: 230px;
  padding: 0;
  background: #fff;
}

.dropdown-menu--research {
  min-width: 285px;
  padding: 0;
  background: #fff;
}

.dropdown-menu--academics .dropdown-item {
  min-height: unset;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 17px;
  font-family: "Roboto", sans-serif;
  font-size: 14px;
  font-weight: 500;
}

.dropdown-menu--news .dropdown-item {
  min-height: unset;
  display: flex;
  align-items: center;
  padding: 15px 17px;
  font-family: "Roboto", sans-serif;
  font-size: 14px;
  font-weight: 500;
}

.dropdown-menu--compact .dropdown-item,
.dropdown-menu--research .dropdown-item {
  min-height: unset;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 17px;
  font-family: "Roboto", sans-serif;
  font-size: 14px;
  font-weight: 500;
}

.dropdown-item--branch i {
  font-size: 0.84rem;
}

.dropdown-submenu {
  position: relative;
}

.dropdown-menu--nested {
  top: 0;
  left: calc(100% - 1px);
  min-width: 190px;
  padding: 0;
}

/* For sub-menus that would overflow the right edge, open leftward */
.dropdown-submenu--left > .dropdown-menu--nested {
  left: auto;
  right: calc(100% - 1px);
}

.dropdown-menu--nested-compact {
  min-width: 165px;
}

.dropdown-menu li:last-child .dropdown-item {
  border-bottom: 0;
}

.nav-mobile-contact {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.92rem;
  font-weight: 600;
}

.flash-stack {
  padding-top: 1rem;
}

.alert {
  border: none;
  border-radius: 18px;
  box-shadow: var(--shadow-sm);
}

.page-header {
  background:
    linear-gradient(125deg, rgba(8, 27, 55, 0.92), rgba(14, 118, 187, 0.88)),
    url("/static/images/gdchjam/hero-bg.png") center/cover;
  color: #fff;
  padding: 4.5rem 0 3.5rem;
}

.page-header h1 {
  margin: 0;
  font-family: "Roboto", sans-serif;
  font-size: clamp(2rem, 3vw, 3rem);
  font-weight: 800;
}

.breadcrumb {
  margin-top: 0.85rem;
}

.breadcrumb-item,
.breadcrumb-item a {
  color: rgba(255, 255, 255, 0.82);
}

.breadcrumb-item.active {
  color: #fff;
}

.breadcrumb-item + .breadcrumb-item::before {
  color: rgba(255, 255, 255, 0.55);
}

.site-footer {
  margin-top: 5rem;
  padding: 4.5rem 0 1.5rem;
  background: #0b203d;
  color: rgba(255, 255, 255, 0.84);
}

.footer-grid {
  align-items: start;
}

.footer-brand img {
  width: min(100%, 240px);
}

.footer-copy {
  margin: 1.4rem 0 1.2rem;
  line-height: 1.85;
  color: rgba(255, 255, 255, 0.72);
}

.footer-title {
  margin-bottom: 1rem;
  color: #fff;
  font-family: "Roboto", sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
}

.footer-contact-list,
.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-contact-list a,
.footer-contact-list span,
.footer-links a {
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.7;
  transition: color 0.2s ease;
}

.footer-contact-list a:hover,
.footer-links a:hover {
  color: #fff;
}

.footer-contact-list i {
  margin-right: 0.55rem;
  color: var(--accent);
}

.footer-links {
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-map {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
}

.footer-map iframe {
  width: 100%;
  min-height: 220px;
  border: 0;
}

.footer-opd {
  margin-top: 1.3rem;
  padding: 1.3rem 1.45rem;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.06);
}

.footer-opd p {
  margin: 0.3rem 0;
  color: rgba(255, 255, 255, 0.78);
}

.site-footer__bottom {
  margin-top: 2.4rem;
  padding-top: 1.4rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.site-footer__bottom p {
  margin: 0;
  color: rgba(255, 255, 255, 0.7);
}

.social-links {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.social-links a {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  transition: transform 0.2s ease, background 0.2s ease;
}

.social-links a:hover {
  transform: translateY(-2px);
  background: var(--accent);
  color: var(--primary-dark);
}

.social-links--small a {
  width: 22px;
  height: 22px;
  font-size: 0.9rem;
  background: var(--accent);
  color: #fff;
}

.social-links--small a:hover {
  color: #fff;
}

@media (min-width: 1200px) {
  .nav-shell .nav-item.dropdown:hover > .dropdown-menu {
    display: block;
    transform: translateY(15px);
  }

  .dropdown-submenu:hover > .dropdown-menu,
  .dropdown-submenu:focus-within > .dropdown-menu {
    display: block;
  }
}

@media (max-width: 1399.98px) {
  .utility-bar__email {
    padding: 0 22px 0 24px;
  }

  .utility-links a {
    padding: 0 16px;
    font-size: 0.78rem;
  }

  .utility-social-shell {
    padding: 0 16px 0 18px;
  }

  .utility-language select {
    min-width: 136px;
  }
}

@media (max-width: 1199.98px) {
  .branding-strip__inner {
    grid-template-columns: 1fr auto;
  }

  .nav-shell .navbar-collapse {
    padding: 1rem 0 1.4rem;
  }

  .nav-shell .nav-link {
    padding: 0.85rem 0;
  }

  .nav-shell .nav-item.dropdown > .dropdown-menu {
    display: none;
    position: static;
    float: none;
    transform: none;
    opacity: 1;
    visibility: visible;
  }

  .nav-shell .nav-item.dropdown.is-open > .dropdown-menu {
    display: block;
  }

  .nav-shell .dropdown-submenu > .dropdown-menu {
    display: none;
  }

  .nav-shell .dropdown-submenu.is-open > .dropdown-menu {
    display: block;
  }

  .nav-shell .nav-item.dropdown > .dropdown-toggle::after {
    display: inline-block;
    margin-left: 0.5rem;
    transition: transform 0.2s ease;
  }

  .nav-shell .nav-item.dropdown.is-open > .dropdown-toggle::after {
    transform: rotate(180deg);
  }

  .dropdown-menu {
    margin-left: 0.75rem;
    border: none;
    box-shadow: none;
    padding: 0.35rem 0 0.75rem;
  }

  .dropdown-menu--academics,
  .dropdown-menu--news,
  .dropdown-menu--compact,
  .dropdown-menu--research,
  .dropdown-menu--nested,
  .dropdown-menu--nested-compact {
    min-width: 100%;
  }

  .dropdown-menu--compact .dropdown-item,
  .dropdown-menu--research .dropdown-item,
  .dropdown-menu--news .dropdown-item,
  .dropdown-menu--academics .dropdown-item,
  .dropdown-menu--nested .dropdown-item {
    min-height: unset;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
  }

  .dropdown-submenu > .dropdown-menu {
    display: block;
    position: static;
    margin-left: 1rem;
    padding-top: 0;
  }
}

@media (max-width: 767.98px) {
  .branding-strip__inner {
    min-height: 92px;
    grid-template-columns: 1fr;
    justify-items: start;
  }

  .brand-actions {
    width: 100%;
    justify-content: space-between;
  }

  .page-header {
    padding: 3.5rem 0 2.8rem;
  }

  .site-footer {
    margin-top: 4rem;
    padding-top: 3.5rem;
  }

  .site-footer__bottom {
    flex-direction: column;
    align-items: flex-start;
  }

  /* Global mobile font scaling */
  body {
    font-size: 14px;
    line-height: 1.6;
  }

  p {
    font-size: 14px;
    line-height: 1.65;
  }

  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.45rem; }
  h3 { font-size: 1.2rem; }
  h4 { font-size: 1.05rem; }
  h5 { font-size: 0.95rem; }
  h6 { font-size: 0.88rem; }

  .section-title,
  .page-header h1 {
    font-size: 1.5rem;
  }

  .nav-shell .nav-link {
    font-size: 0.95rem;
  }

  .dropdown-item {
    font-size: 0.85rem;
  }

  .btn {
    font-size: 0.85rem;
  }

  .card-title,
  .card h3,
  .card h4 {
    font-size: 1rem;
  }

  .about-reference-heading h1,
  .dept-heading h1 {
    font-size: clamp(1.5rem, 6vw, 1.9rem);
  }

  .about-reference-copy p,
  .about-reference-copy li,
  .about-page-intro p,
  .about-richtext,
  .about-richtext p,
  .about-richtext li {
    font-size: 13.5px;
    line-height: 1.65;
  }

  .about-page-intro h2,
  .dept-page-intro h2 {
    font-size: 1.4rem;
  }

  .footer-copy,
  .footer-contact-list a,
  .site-footer p {
    font-size: 13px;
  }
}
