@font-face {
  font-family: "Barlow";
  src: url("./assets/barlow-400.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Barlow";
  src: url("./assets/barlow-500.ttf") format("truetype");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}

/* Match the homepage navigation's 450 treatment without synthesizing a weight. */
@font-face {
  font-family: "Barlow Nav 450";
  src: url("./assets/barlow-400.ttf") format("truetype");
  font-style: normal;
  font-weight: 450;
  font-display: swap;
}

:root {
  --header-surface: rgba(254, 254, 254, 0.5);
  --header-surface-dark: color-mix(in srgb, var(--dark, #000) 50%, transparent);
  --header-border: rgba(0, 0, 0, 0.05);
  --header-control-hover: rgba(0, 0, 0, 0.04);
  --header-focus-ring: rgba(0, 0, 0, 0.35);
  --header-logo-filter: none;
  --portfolio-site-frame-content-width: min(calc(100vw - 48px), 1608px);
  --portfolio-site-header-content-width: min(calc(100vw - 48px), 1440px);
  --portfolio-site-frame-header-height: 54px;
  --portfolio-site-nav-button-height: 30px;
  --portfolio-site-frame-side-gutter: max(
    24px,
    calc((100vw - var(--portfolio-site-header-content-width)) / 2)
  );
}

:root[data-theme="dark"] {
  --header-surface: var(--header-surface-dark);
  --header-border: rgba(255, 255, 255, 0.08);
  --header-control-hover: rgba(255, 255, 255, 0.08);
  --header-focus-ring: rgba(255, 255, 255, 0.48);
  --header-logo-filter: invert(1);
}

:root[data-theme="dark"] .portfolio-site-header,
.portfolio-site-header.is-dark {
  --text1: #f6f6f6;
  --header-surface: var(--header-surface-dark);
  --header-border: rgba(255, 255, 255, 0.08);
  --header-control-hover: rgba(255, 255, 255, 0.08);
  --header-focus-ring: rgba(255, 255, 255, 0.48);
  --header-logo-filter: invert(1);
}

.portfolio-site-header {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 60;
  display: flex;
  box-sizing: border-box;
  width: 100%;
  height: var(--portfolio-site-frame-header-height);
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid transparent;
  color: var(--text1, #000);
  background: var(--header-surface);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-family: "Barlow", Arial, sans-serif;
  font-synthesis: none;
  opacity: 1;
  transition: opacity 180ms ease, border-color 180ms ease;
}

.portfolio-site-header.is-scrolled {
  border-bottom-color: var(--header-border);
}

body.is-loading .portfolio-site-header {
  opacity: 0;
  pointer-events: none;
}

.portfolio-site-brand {
  display: flex;
  box-sizing: border-box;
  height: var(--portfolio-site-frame-header-height);
  margin-left: var(--portfolio-site-frame-side-gutter);
  padding: 11px 12px 13px;
  align-items: flex-end;
  gap: 8px;
  color: inherit;
  text-decoration: none;
}

.portfolio-site-brand-mark {
  display: block;
  width: auto;
  height: 28px;
  object-fit: contain;
  filter: var(--header-logo-filter);
}

.portfolio-site-brand-name {
  font-size: 20px;
  font-weight: 400;
  line-height: 28px;
  white-space: nowrap;
}

.portfolio-site-nav {
  display: flex;
  margin-right: var(--portfolio-site-frame-side-gutter);
  padding: 0 12px;
  align-items: center;
  justify-content: flex-end;
}

.portfolio-site-nav a {
  display: inline-flex;
  box-sizing: border-box;
  height: var(--portfolio-site-nav-button-height);
  padding: 0 20px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: inherit;
  font-family: "Barlow Nav 450", "Barlow", Arial, sans-serif;
  font-size: 16px;
  font-weight: 450;
  line-height: 22px;
  font-synthesis: none;
  -webkit-text-stroke: 0.24px currentColor;
  letter-spacing: 0;
  text-decoration: none;
  white-space: nowrap;
}

.portfolio-site-nav a:hover,
.portfolio-site-nav a:focus-visible {
  background: var(--header-control-hover);
}

.portfolio-site-brand:focus-visible {
  outline: 2px solid var(--text1, #000);
  outline-offset: -2px;
}

.portfolio-site-nav a:focus-visible {
  outline: 1px solid var(--header-focus-ring);
  outline-offset: 2px;
}

@media (max-width: 760px) {
  .portfolio-site-header {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .portfolio-site-header {
    transition: none;
  }
}
