:root{
  --bg: #ffffff;
  --panel: #f6f7f8;
  --brand: rgb(140,69,53);
  --pagename: rgb(140,69,53);
  --description: rgb(140,69,53);
  --heading: rgb(140,69,53);
  --accent: #000000;
  --pagepara: #000000;
  --menu: #aaa;
  --link: #00c;
  --muted: #aaa;
  --readonly: #eeeeee;
  --line: #d0d7de;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(0,0,0,.06);
  --maxw: 1100px;
  --space-1: .25rem;
  --space-2: .5rem;
  --space-3: .75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --font: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}
body {
    font-family: "Lato", sans-serif;
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
}
.sticky-footer {
 display:grid;min-height:100dvh;grid-template-rows:auto 1fr auto;"
}

.site-header {
    top: 0;
    z-index: 1000;
    background: #fff;
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas:
        "brand menu"
        "project project"
        "links links";
    gap: 0.4rem 0.4rem;
    padding: clamp(1rem, 2vw, 1.5rem);
}

.menu-toggle {
  border: 0;
  background: transparent;
  font-size: 26px;
  color: #aaa;
  line-height: 1;
  cursor: pointer;
  padding: 3px;
  grid-area: menu;
  justify-self: end;
}

.project-strip {
    grid-area: project;
}

/* tidy links */
.header-links {
    grid-area: links;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.4rem 1.25rem;
}

.header-links a {
    color: var(--link);
    text-decoration: none;
}

.header-links-child {
    margin-left: auto;
}

@media (max-width: 500px) {
    .header-links {
        display: flex;
    }

    .header-links-main,
    .header-links-child {
        margin-top: 0.2rem;
    }

    .header-links-child {
        flex: 0 0 100%;
        justify-content: flex-end;
        margin-left: 0;
        text-align: right;
    }
}
/* tidy end */



/*
.header-links {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.4rem 1.25rem;
}

.header-links a {
    color: var(--link);
    text-decoration: none;
}

.header-links-main,
.header-links-child {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 0.75rem;
}

.header-links-child {
    margin-left: auto;
}

@media (max-width: 700px) {
    .header-links {
        display: block;
    }

    .header-links-main,
    .header-links-child {
        margin-top: 0.2rem;
    }

    .header-links-child {
        margin-left: 0;
    }
}*/

/* ----------------------------------------*/
.site-header-name {
  color:var(--brand);
  text-decoration: none;
  font-family: "Archivo Black";
  font-size: clamp(24px, 3vw, 38px);
  font-weight:900;
  display: inline-block;
  width: fit-content;
}
.site-header-name:hover {
    opacity: 0.8;
}
.menu-subheader {
    position: sticky;
    top:67px;
    font-size: clamp(14px, 1.4vw, 30px);
    color:var(--brand);
    background-color: #fff;
    margin-left: .9em;
}
main {
 flex: 1;
}

/*small screen breathing ---------------*/
.panel {
  margin-left: 12px;
  margin-right: 12px;
}

.page-name {
    position: sticky;
    top:50px;
    background-color: #fff;
    color:var(--pagename);
    font-family: "Lato", sans-serif;
    font-size: clamp(18px, 1.4vw, 30px);
}

.page-description {
  color:var(--description);
  font-family: "Lato", sans-serif;
  font-size: clamp(14px, 1.2vw, 24px);
  margin-bottom: 1em;
}

.page-heading {
  color:var(--heading);
  text-decoration: none;
  font-family: "Lato", sans-serif;
  font-size: clamp(20px, 3vw, 34px);
  font-weight: 400;
  margin-bottom: 1em;
}
/* ----------- lightbox ------------*/
.lightbox[hidden] {
    display: none;
}
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgb(255 255 255 / 96%);
    display: grid;
    place-items: center;
    padding: 2rem;
    box-sizing: border-box;
}
.lightbox img {
    display: block;
    max-width: calc(100vw - 4rem);
    max-height: calc(100vh - 4rem);
}
.lightbox-close {
    position: fixed;
    top: 1rem;
    right: 1rem;
}

/* dynamic pages */
.page-panel {
    color: var(--brand);
    width: min(90vw, var(--maxw));
    margin: 1rem 2rem;
}
.page-para {
    font-size: clamp(16px, 20px, 30px);
    color: var(--pagepara);
}

/*=================*/

@keyframes fadein {
    from { opacity: 0; }
    to   { opacity: 1; }
}
.caption {
  margin-top: 0.4rem;
  font-size: clamp(12px, 0.9vw, 20px);
  color: var(--caption);
}
.controls {
  position: sticky;
  z-index: 1000;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.controls button {
  min-width: 44px;
  min-height: 44px;
  background: none;
    border: none;
    color: #f6f6f6;
    /*color: var(--muted);*/
    font-size: clamp(1rem, 1vw, 1.4rem);
    font-family: inherit;
}
.controls button:hover {color: var(--brand)}
.controls button:active {color: #000;}
.controls button:focus {outline: none;}

.site-menu {
  position: absolute;
  top: 60px;
  right: 24px;
  min-width: 180px;
  background: rgb(255 255 255 / 90%);
  /*box-shadow: 0 8px 24px rgb(0 0 0 / 25%);*/
  padding: 8px 0;
  display: none;
  z-index: 1001;
}

.site-menu.is-open {
  display: block;
}

.site-menu a {
  display: block;
  padding: 10px 18px;
  color: var(--menu);
  font-size:1.3em;
  text-decoration: none;
  white-space: nowrap;
}

.site-menu a:hover,
.site-menu a:focus {
    color: var(--brand);
  background: rgb(0 0 0 / 1%);
}

.copyright {
    text-align: center;
    color: var(--muted);
}

.go-top-btn{
  position:fixed;
  right:1rem;
  bottom:1rem;
  width:2.5rem;
  height:2.5rem;
  border:1px solid var(--line);
  border-radius:999px;
  background:#fff;
  box-shadow:0 4px 12px rgba(0,0,0,.08);
  color: var(--muted);
  cursor:pointer;
  z-index:50;
}

.go-top-btn[hidden]{
  display:none !important;
}

.switch-views{
  position:fixed;
  left: 1rem;
  bottom: 0.3rem;
  width: auto;
  z-index:50;
}
.switch-views-link {
  cursor:pointer;
  z-index:50;
  font-size: 2.2rem;
  color: #ebebeb;
  text-decoration: none;
  opacity: 0.6;
}
.switch-views-link:hover {color: var(--brand)}

@media (max-width: 600px) {
    .lightbox {
        padding: 1rem;
    }
    .lightbox img {
        max-width: calc(100vw - 2rem);
        max-height: calc(100vh - 2rem);
    }
}