.study-brand {
  --study-forest: #0d4f45;
  --study-amber: #f9b023;
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: #172c2c;
  font-size: 0.96rem;
  font-weight: 750;
  line-height: 1.2;
  text-decoration: none;
}
.study-brand-mark {
  position: relative;
  display: inline-block;
  width: 38px;
  height: 34px;
  flex: 0 0 38px;
}
.study-brand-bars {
  position: absolute;
  top: 1px;
  left: 1px;
  display: flex;
  align-items: end;
  gap: 3px;
  height: 26px;
  transform: skewY(-14deg);
}
.study-brand-bars i {
  display: block;
  width: 6px;
  height: 10px;
  border-radius: 1px;
  background: var(--study-forest);
}
.study-brand-bars i:nth-child(2) { height: 17px; }
.study-brand-bars i:nth-child(3) { height: 24px; }
.study-brand-glasses {
  position: absolute;
  right: 0;
  bottom: 1px;
  display: flex;
  gap: 4px;
  align-items: center;
  color: #172c2c;
}
.study-brand-glasses::before {
  position: absolute;
  left: 12px;
  width: 5px;
  height: 2px;
  background: currentColor;
  content: "";
}
.study-brand-glasses i {
  box-sizing: border-box;
  width: 13px;
  height: 11px;
  border: 2px solid currentColor;
  border-radius: 5px 5px 6px 6px;
  background: var(--study-amber);
}
html {
  scroll-padding-top: var(--study-header-offset, 6.75rem);
}

header.study-header {
  --study-paper: #faf9f4;
  --study-ink: #172c2c;
  --study-forest: #0d4f45;
  --study-line: #d0d8cd;
  --study-top-height: 54px;
  --study-section-height: 37px;
  position: sticky;
  inset-block-start: 0;
  z-index: 10;
  border-bottom: 1px solid var(--study-line);
  background: var(--study-paper);
  overflow-anchor: none;
}

header.study-header.is-compact {
  --study-top-height: 42px;
  --study-section-height: 32px;
}

.study-header-inner {
  width: min(1190px, calc(100% - 44px));
  margin-inline: auto;
}

.study-header-top {
  display: grid;
  grid-template-columns: minmax(0, max-content) minmax(0, 1fr) max-content;
  grid-template-areas: "brand primary portfolio";
  align-items: center;
  gap: .3rem clamp(.7rem, 2vw, 1.65rem);
  min-height: var(--study-top-height);
}

.study-header-top .study-brand {
  grid-area: brand;
  min-width: 0;
  justify-self: start;
  white-space: normal;
}

.study-header-top .study-brand-mark {
  transform-origin: left center;
}

.study-header.is-compact .study-brand-mark {
  transform: scale(.85);
}

.study-header nav.study-primary-nav,
.study-header nav.study-section-nav {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: clamp(.65rem, 1.7vw, 1.35rem);
  justify-content: flex-start;
  min-width: 0;
  padding: 2px 4px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.study-header nav.study-primary-nav {
  grid-area: primary;
  justify-self: end;
  max-width: 100%;
}

.study-header nav.study-section-nav {
  min-height: var(--study-section-height);
  border-top: 1px solid var(--study-line);
}

.study-header nav.study-primary-nav a,
.study-header nav.study-section-nav a {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  min-height: 27px;
  padding: 1px 0;
  color: #495e58;
  font-size: .82rem;
  font-weight: 650;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
}

.study-header nav a[aria-current],
.study-header nav a:hover {
  color: var(--study-forest);
  text-decoration: underline;
  text-underline-offset: .3em;
}

.study-header a.study-portfolio {
  grid-area: portfolio;
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  min-height: 32px;
  padding: 2px 9px 2px 3px;
  border: 1px solid #e5c47b;
  border-radius: 999px;
  background: #faf4e6;
  color: #1c1b19;
  font-size: .8rem;
  font-weight: 650;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
}

.study-header a.study-portfolio:hover { background: #fff1d6; }

.study-header a:focus-visible {
  outline: 2px solid #895006;
  outline-offset: 1px;
}

.study-portfolio img {
  display: block;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
}

.study-header.is-compact a.study-portfolio { min-height: 28px; }
.study-header.is-compact .study-portfolio img { width: 20px; height: 20px; }

@media (max-width: 760px) {
  .study-header-inner { width: calc(100% - 32px); }
  .study-header-top {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    grid-template-areas: "brand portfolio" "primary primary";
    padding-block-start: 6px;
    gap: 1px .5rem;
  }
  .study-header.is-compact .study-header-top { padding-block-start: 2px; }
  .study-header nav.study-primary-nav { justify-self: stretch; }
  .study-header.is-compact .study-header-top .study-brand-mark { height: 29px; }
}

@media (max-width: 480px) {
  .study-header-top .study-brand { font-size: .86rem; }
  .study-portfolio-owner { display: none; }
}

h1.study-page-title {
  font-size: clamp(2.25rem, 4.65vw, 4.5rem);
  line-height: 1.02;
  letter-spacing: -.05em;
  text-wrap: balance;
}
