/* Inverteum header and footer chrome for coding project pages. */
html {
  --header-h: 114px;
  --inv-lime: #d9fb99;
  --inv-max: 980px;
  --inv-font: "Wix Madefor Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --inv-display: "Familjen Grotesk", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

body {
  padding-top: var(--header-h);
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 200;
  background: #000;
  color: var(--inv-lime);
  padding: 0.5rem 0.85rem;
  text-decoration: none;
  font-family: var(--inv-font);
}
.skip:focus { top: 0.75rem; }

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  background: rgba(248, 246, 243, .96);
  backdrop-filter: blur(10px);
  transform: translate3d(0, 0, 0);
  transition: transform .35s cubic-bezier(.645, .045, .355, 1);
  will-change: transform;
  color: #000;
}
.site-header.is-hidden { transform: translate3d(0, -100%, 0); }

.site-header .wrap,
.site-footer .wrap {
  width: min(100% - 80px, var(--inv-max));
  margin: 0 auto;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 42px 0 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  font-family: var(--inv-display);
  font-weight: 700;
  font-size: 30px;
  line-height: 1.2;
  color: #000;
}
.brand img {
  width: 44px;
  height: 44px;
  border-radius: 4px;
  object-fit: cover;
  display: block;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  align-items: center;
  font-family: var(--inv-font);
  font-size: 20px;
  font-weight: 400;
  line-height: 1.2;
}
.nav a {
  text-decoration: none;
  color: #000;
}
.nav a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  margin-left: auto;
  background: none;
  border: none;
  cursor: pointer;
  color: #000;
  flex-shrink: 0;
}
.nav-toggle-bar {
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
  transition: transform .25s ease, opacity .2s ease;
}

.nav-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(0, 0, 0, .45);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .3s ease, visibility .3s ease;
}
.nav-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 100;
  width: min(86vw, 360px);
  height: 100%;
  height: 100dvh;
  background: #fff;
  color: #000;
  box-shadow: -8px 0 32px rgba(0, 0, 0, .12);
  transform: translate3d(100%, 0, 0);
  transition: transform .35s cubic-bezier(.645, .045, .355, 1);
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  font-family: var(--inv-font);
}
.nav-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 24px 18px;
  border-bottom: 1px solid rgba(0, 0, 0, .08);
}
.nav-drawer-title {
  font-family: var(--inv-display);
  font-size: 22px;
  font-weight: 600;
  line-height: 1.2;
}
.nav-drawer-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin: -8px -8px -8px 0;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 28px;
  line-height: 1;
  color: #000;
}
.nav-drawer-links {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 12px 8px 32px;
}
.nav-drawer-links a {
  display: block;
  padding: 16px 18px;
  font-family: var(--inv-font);
  font-size: 20px;
  font-weight: 400;
  line-height: 1.2;
  color: #000;
  text-decoration: none;
  border-radius: 8px;
}
.nav-drawer-links a:hover { background: rgba(0, 0, 0, .05); }

body.nav-open { overflow: hidden; }
body.nav-open .nav-backdrop {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
body.nav-open .nav-drawer { transform: translate3d(0, 0, 0); }
body.nav-open .site-header { transform: none; }

.site-footer {
  background: #111;
  color: #f5f5f5;
  padding: 56px 0 28px;
  font-family: var(--inv-font);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 40px;
  padding-bottom: 36px;
  border-bottom: 1px solid rgba(255, 255, 255, .12);
}
.footer-grid h2 {
  margin: 0 0 10px;
  font-family: var(--inv-display);
  font-size: 1.8rem;
  font-weight: 700;
}
.footer-grid a { color: #fff; }
.footer-keep a { color: inherit; text-decoration: none; }
.footer-keep a:hover,
.footer-keep a:active { color: var(--inv-lime); }
.footer-contact-label {
  margin: 0 0 8px;
  color: #ccc;
}
.footer-email {
  margin: 0;
  font-size: 1.15rem;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(3, max-content);
  gap: 8px 56px;
  align-items: start;
  justify-content: end;
}
.footer-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-col h3 {
  margin: 0 0 2px;
  font-family: var(--inv-display);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.3;
  color: #f5f5f5;
}
.site-footer .footer-links a {
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 400;
  line-height: 1.35;
  color: #c8c8c8;
}
.site-footer .footer-links a:hover { color: var(--inv-lime); }
.footer-note {
  padding-top: 22px;
  color: #aaa;
  font-size: .82rem;
  line-height: 1.5;
}
.footer-copy { margin-top: 18px; color: #888; font-size: .85rem; }

@media (max-width: 900px) {
  .site-header .wrap,
  .site-footer .wrap { width: min(100% - 40px, var(--inv-max)); }
  .page { width: min(920px, calc(100% - 40px)); }
  .brand { font-size: 22px; }
  .nav-toggle { display: inline-flex; }
  .nav { display: none; }
  .header-inner { flex-wrap: nowrap; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-links { justify-content: start; gap: 24px 40px; }
}

@media (prefers-reduced-motion: reduce) {
  .site-header, .nav-drawer, .nav-backdrop { transition: none; }
}

.breadcrumb {
  margin: 0 0 0.85rem;
  font-size: 0.85rem;
  line-height: 1.4;
  color: var(--ink-soft, #9a9386);
}
.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
}
.breadcrumb li {
  display: inline-flex;
  align-items: center;
}
.breadcrumb li:not(:last-child)::after {
  content: "/";
  margin: 0 0.5rem;
  color: var(--ink-soft, #9a9386);
  opacity: 0.7;
}
.breadcrumb a {
  color: var(--ink-soft, #9a9386);
  text-decoration: none;
}
.breadcrumb a:hover,
.breadcrumb a:focus-visible {
  color: var(--ink, #d8d2c6);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.breadcrumb [aria-current="page"] {
  color: var(--ink, #d8d2c6);
}

.view-code {
  margin: 0 0 1.5rem;
}
.view-code a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 1.15rem;
  border: 1px solid var(--ink, #111);
  border-radius: 40px;
  color: var(--ink, #111);
  background: transparent;
  text-decoration: none;
  font-family: var(--inv-display, "Familjen Grotesk", sans-serif);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.1;
  transition: background-color .4s ease, color .4s ease, border-color .4s ease;
}
.view-code a:hover,
.view-code a:focus-visible {
  background: #000;
  border-color: #000;
  color: var(--inv-lime, #d9fb99);
  outline: none;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
