header {
  /* Header design tokens (used by nav and dropdowns) */
  --header-bg: #fff;
  --header-fg: #030303;
  --header-border: #d9d9d9;
  width: 100%;
  position: relative;
  background-color: var(--header-bg);
  border-bottom: 1px solid var(--header-border);
  box-sizing: border-box;
  /* Allow dropdowns to overflow header */
  overflow: visible;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  align-content: center;
  padding: 32px 67px;
  gap: 0px 24px;
  text-align: left;
  font-size: 16px;
  color: var(--header-fg);
  font-family: Inter;
  z-index: 1000; /* ensure header (and dropdown) sit above main */
}
.avatar-block {
  width: 139px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.avatar {
  width: 40px;
  position: relative;
  border-radius: 9999px;
  height: 40px;
  overflow: hidden;
  flex-shrink: 0;
}
.shape-icon {
  position: absolute;
  top: calc(50% - 20px);
  left: calc(50% - 20px);
  width: 40px;
  height: 40px;
  object-fit: cover;
  object-position: center 1%;
}
.info {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  width: 150px;
}
.title {
  position: relative;
  line-height: 140%;
  font-weight: 600;
}

.title:hover {
  color: #4a90e2;
}
.description {
  position: relative;
  line-height: 140%;
  color: #4e4e4e;
}
.navigation-pill-list {
  flex: 1;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 8px;
  /* Keep nav visually consistent with header */
  color: var(--header-fg);
  background-color: var(--header-bg);
  border: none;
  box-shadow: none;
}

/* Portfolio dropdown (minimal, no JS) */
.header-navigation-pill.dropdown {
  position: relative;
}
.dropdown-details {
  position: relative;
}
.dropdown-details > summary {
  list-style: none;
  cursor: pointer;
}
.dropdown-details > summary::-webkit-details-marker {
  display: none;
}
/* Chevron indicator for dropdown summary */
.dropdown-details > summary.header-title::after {
  content: "▾"; /* closed state */
  display: inline-block;
  margin-left: 6px;
  font-size: 0.9em;
  line-height: 1;
  vertical-align: middle;
  color: inherit; /* match link color */
}
.dropdown-details[open] > summary.header-title::after {
  content: "▴"; /* open state */
}
.dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  /* Depend on header theme */
  background: var(--header-bg);
  color: var(--header-fg);
  border: none;
  border-radius: 10px;
  padding: 8px;
  display: grid;
  gap: 6px;
  min-width: 220px;
  box-shadow: none;
  z-index: 10000;
}
.dropdown-details:not([open]) .dropdown-menu {
  display: none;
}
.dropdown-menu a {
  text-decoration: none;
  color: #1e1e1e;
  padding: 8px 10px;
  border-radius: 8px;
}
.dropdown-menu a:hover {
  background: #f3f7ff;
  color: #4a90e2;
}

/* Smooth theme transitions for header, footer, and nav to match body/main */
header,
footer,
header .navigation-pill-list,
header .dropdown-menu,
header .dropdown-details > summary,
header .header-navigation-pill,
header .header-title {
  transition: background-color 0.3s ease, color 0.3s ease,
    border-color 0.3s ease;
}

/* Keep header/nav colors in sync in dark mode via variables */
body.dark-mode header {
  --header-bg: #2d2d2d;
  --header-fg: #e0e0e0;
  --header-border: #404040;
}

.header-title {
  text-decoration: none;
  position: relative;
  color: inherit;
  line-height: 100%;
  cursor: pointer;
}

.header-title:hover {
  color: #4a90e2;
}
.header-navigation-pill {
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
}

footer {
  width: 100%;
  position: relative;
  background-color: #fff;
  border-top: 1px solid #d9d9d9;
  box-sizing: border-box;
  height: 108px;
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  text-align: left;
  font-size: 16px;
  color: #000;
  font-family: Inter;
}
.all-rights-reserved {
  position: relative;
  line-height: 120%;
}
.button-list {
  display: flex;
  align-items: center;
  gap: 16px;
}
.x-logo-icon {
  width: 24px;
  position: relative;
  height: 24px;
}

body {
  margin: 0;
  line-height: normal;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.main-content,
.certification-main {
  flex-grow: 1;
}

.hamburger {
  display: none;
  background: none;
  border: none;
  font-size: 32px;
  cursor: pointer;
  margin-left: auto;
  z-index: 10000;
}

@media (max-width: 920px) {
  .navigation-pill-list {
    display: none;
    position: fixed;
    top: 80px;
    right: 20px;
    /* Follow header colors on mobile as well */
    background: var(--header-bg);
    color: var(--header-fg);
    flex-direction: column;
    gap: 12px;
    box-shadow: none;
    padding: 16px 24px;
    border-radius: 12px;
    border: none;
    z-index: 9999;
  }
  .navigation-pill-list.active {
    display: flex;
    z-index: 9999;
  }
  /* Make dropdown flow in menu for mobile */
  .navigation-pill-list .dropdown-menu {
    position: static;
    min-width: unset;
    width: 100%;
    box-shadow: none;
    border-radius: 8px;
    border: none;
    background: inherit;
    color: inherit;
    padding: 8px;
  }
  .hamburger {
    display: block;
    z-index: 10000;
  }
  header {
    flex-wrap: nowrap;
    padding-right: 24px;
  }
}
