/* Header */
.site-header{
  position:sticky;
  top:0;
  z-index:10;
  backdrop-filter:none;
  background:rgba(var(--chrome-tint-rgb), var(--chrome-header-alpha));
  border-bottom:1px solid var(--panel-border);
  box-shadow:var(--header-shadow);
  view-transition-name:site-header;
}

body.header-scroll .site-header{
  position:relative;
  top:auto;
}

body.page{
  scroll-padding-top:96px;
}

body.header-scroll.page{
  scroll-padding-top:0;
}

.wrap{
  max-width:none;
  width:100%;
  margin:0 auto;
  padding:clamp(10px,1.5vw,14px) 0;
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:12px 18px;
  flex-wrap:wrap;
}

.header-banner{
  width:99%;
  margin:0 auto;
  border-radius:var(--radius);
  border:1px solid var(--panel-border);
  background:var(--ui-card);
  padding:8px;
}

body.banner-snap .header-banner{
  padding:0;
  background:transparent;
  border-color:transparent;
}

.header-banner picture{
  display:block;
  width:100%;
}

.header-banner img{
  width:100%;
  height:auto;
  max-height:180px;
  display:block;
  border-radius:calc(var(--radius) - 6px);
}

/* Side Navigation */
:root{
  --side-nav-width:220px;
}

.side-nav{
  position:fixed;
  top:0;
  left:0;
  width:var(--side-nav-width);
  height:100vh;
  padding:clamp(16px,2vw,24px) clamp(12px,2vw,20px);
  background:rgba(var(--chrome-tint-rgb), var(--chrome-menu-alpha));
  border-right:none;
  z-index:9;
  display:flex;
  flex-direction:column;
  align-items:flex-start;
}

.side-nav ul{
  list-style:none;
  margin:0;
  padding:0;
  display:flex;
  flex-direction:column;
  gap:16px;
}

.side-nav a{
  display:inline-block;
  color:var(--muted);
  text-decoration:none;
  font-size:clamp(12px,1.2vw,14px);
  letter-spacing:.08em;
  text-transform:uppercase;
}

.side-nav a:hover,
.side-nav a:focus-visible{
  color:var(--accent);
}

/* Footer */
footer{
  position:relative;
  z-index:2;
  padding:24px 20px;
  background:rgba(var(--chrome-tint-rgb), var(--chrome-footer-alpha));
  border-top:1px solid var(--panel-border);
}

.footer-content{
  max-width:1200px;
  margin:0 auto;
  display:flex;
  flex-wrap:wrap;
  gap:16px;
  align-items:center;
  color:var(--muted);
  font-size:12px;
}

.footer-info{
  flex:1 1 100%;
  text-align:center;
}

.footer-credit{
  display:block;
  margin-top:6px;
  color:var(--muted);
}

.footer-credit a,
.footer-credit a:visited{
  color:#12b9a5;
}

.footer-credit a:hover,
.footer-credit a:focus-visible{
  color:#12b9a5;
  text-decoration:underline;
}

.footer-links{
  width:100%;
  text-align:center;
}

.footer-links a{
  color:var(--accent);
  text-decoration:none;
  font-weight:600;
}

.footer-sep{
  color:var(--muted);
  margin:0 8px;
}

.footer-links a:hover{
  text-decoration:underline;
}

/* Screen-reader-only text */
.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;
}

/* UI Controls */
.skip-link{
  position:absolute;
  left:-999px;
  top:-999px;
  background:var(--accent);
  color:var(--skip-text);
  padding:10px 14px;
  border-radius:8px;
  border:1px solid var(--skip-border);
  font-weight:600;
  text-decoration:none;
  z-index:100;
}

.skip-link:focus-visible{
  left:20px;
  top:20px;
}

.theme-toggle{
  background:transparent;
  color:var(--accent);
  border:0;
  border-radius:0;
  padding:0;
  font-size:12px;
  font-weight:600;
  letter-spacing:0;
  text-transform:none;
  cursor:pointer;
  box-shadow:none;
  transition:color .2s ease, text-decoration-color .2s ease;
  text-decoration:none;
  text-underline-offset:2px;
}

.theme-toggle:hover{
  text-decoration:underline;
}

.theme-toggle[data-on="true"]{
  color:var(--accent);
  box-shadow:var(--theme-toggle-active-shadow);
  animation:theme-toggle-pulse 2.8s ease-in-out infinite;
}

@keyframes theme-toggle-pulse{
  0%,100%{color:var(--accent);}
  50%{color:var(--muted);}
}

/* Lightbox */
.lightbox{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.86);
  display:none;
  align-items:center;
  justify-content:center;
  z-index:9999;
  padding:clamp(10px,2.5vw,24px);
}

.lightbox.is-open{
  display:flex;
}

.lightbox-backdrop{
  position:absolute;
  inset:0;
}

.lightbox-content{
  position:relative;
  width:min(960px, 92vw);
  max-height:min(90vh, 90dvh);
  display:flex;
  align-items:center;
  justify-content:center;
  gap:16px;
}

.lightbox-media{
  display:flex;
  align-items:center;
  justify-content:center;
  width:100%;
  max-height:min(82vh, 82dvh);
}

.lightbox-media img,
.lightbox-media video{
  width:auto;
  max-width:min(960px, calc(100vw - 64px));
  height:auto;
  max-height:min(calc(100vh - 140px), calc(100dvh - 140px));
  object-fit:contain;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.2);
  box-shadow:0 20px 60px rgba(0,0,0,.45);
  background:#0b0b0b;
}

.lightbox-close{
  position:absolute;
  top:-6px;
  right:-6px;
  width:36px;
  height:36px;
  border-radius:50%;
  border:1px solid rgba(255,255,255,.35);
  background:rgba(0,0,0,.7);
  color:#fff;
  font-size:22px;
  line-height:1;
  cursor:pointer;
}

.lightbox-nav{
  position:absolute;
  top:50%;
  transform:translateY(-50%);
  width:40px;
  height:40px;
  border-radius:50%;
  border:1px solid rgba(255,255,255,.35);
  background:rgba(0,0,0,.7);
  color:#fff;
  font-size:22px;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
}

.lightbox-prev{
  left:-56px;
}

.lightbox-next{
  right:-56px;
}

.lightbox-caption{
  position:absolute;
  bottom:-26px;
  left:0;
  right:0;
  text-align:center;
  color:#fff;
  font-size:13px;
}

body.lightbox-open{
  overflow:hidden;
}
