/* ===== benschrader.com: the shared styles =====
   Loaded first by every page (inc/head.php). Holds what every page shares: the colours, the base, the header
   (inc/header.php) and the footer (inc/footer.php). Each page's own styles follow it in that page.
   --soft is the one setting for every hover and focus fade on the site. */
:root{--soft:450ms ease;--bg:#0a0b0c;--line:#1c2227;--text:#e8ecef;--blue:#2b7fff;--pink:#ff1f8f;--yellow:#ffe01f;--tri:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40' preserveAspectRatio='none'%3E%3Cpath d='M1 3h38L20 37z'/%3E%3C/svg%3E");--text-2:#bec6cc;--muted:#919da7;--mono:"IBM Plex Mono",ui-monospace,monospace}
@property --lit{syntax:'<number>';inherits:false;initial-value:0}
body{margin:0;background:var(--bg)}
a{color:#d8dcdf;text-decoration:none;transition:color var(--soft)}
a:focus-visible,button:focus-visible{outline:1px solid var(--text);outline-offset:4px}

/* Timeline and About pages: their shared base (the home page sets its own in its page styles) */
/* :where() keeps these as weak as plain element rules, so each page's own rules always win */
:where(.inner) *{box-sizing:border-box}
.inner{color:#d8dcdf;font-family:"IBM Plex Sans",system-ui,sans-serif;font-weight:300;font-size:16px;line-height:1.5}
:where(.inner) p{margin:0}
:where(.inner) button{font:inherit;color:inherit;cursor:pointer}
:where(.inner) :is(a,button):focus-visible{outline-offset:3px}

/* ===== Header: the band behind it (.head-band), the logo, the menu =====
   On the home page the logo and menu start large in the middle and dock to the top corners on scroll (home page
   styles). On every other page they sit docked from the start (.inner, below). */
.head-band{position:fixed;top:0;left:0;right:0;height:112px;background:var(--bg);z-index:2}
.dock-logo{z-index:3}
.dock-logo svg{display:block;width:100%;height:auto;overflow:visible}
.dock-nav{z-index:3;display:flex;white-space:nowrap}

/* The logo: four shapes, each a link, grey until lit. --f is the shape's own colour. */
.dock-logo .shape{fill:#68747c;stroke:#68747c;stroke-width:0;transition:fill var(--soft);cursor:pointer}
.s1,.s2{--f:var(--blue)}.s3{--f:var(--pink)}.s4{--f:var(--yellow)}
/* A coloured copy of each shape sits on top, hidden until its section or page is current */
.here{fill:var(--blue);opacity:0;pointer-events:none;transition:opacity var(--soft)}
.h3{fill:var(--pink)}.h4{fill:var(--yellow)}

/* The menu: each word in its section's colour (--c), grey until lit. --lit is driven by the home page's scroll. */
.nav{--c:var(--blue);padding:8px 0;color:color-mix(in srgb,var(--c) calc(var(--lit)*100%),#d8dcdf);transition:color var(--soft)}
.nav-a{--c:var(--pink)}.nav-c{--c:var(--yellow)}

/* Pointing at a shape or a menu word lights the pair, and so do a page's own links to that section
   (.tl, .more and .send on the home page). */
@media (hover:hover){
.dock-logo a:hover>.shape,.dock-logo a:focus-visible>.shape{fill:var(--f)}
.nav:hover,.nav:focus-visible{color:var(--c)}
body:has(:is(.go-timeline,.nav-t,.tl):is(:hover,:focus-visible)) :is(.s1,.s2),
body:has(:is(.go-about,.nav-a,.more):is(:hover,:focus-visible)) .s3,
body:has(:is(.go-contact,.nav-c,.send):is(:hover,:focus-visible)) .s4{fill:var(--f)}
body:has(:is(.go-timeline,.nav-t,.tl):is(:hover,:focus-visible)) .nav-t,
body:has(:is(.go-about,.nav-a,.more):is(:hover,:focus-visible)) .nav-a,
body:has(:is(.go-contact,.nav-c,.send):is(:hover,:focus-visible)) .nav-c{color:var(--c)}
}

/* Timeline and About pages: the header docked in the top corners, with the page's own shape and word lit */
.inner .head-band{z-index:5}
.inner .dock-logo,.inner .dock-nav{z-index:6}
.inner .dock-logo{position:fixed;top:14px;left:32px;width:116px}
.inner .dock-nav{position:fixed;top:36px;right:32px;gap:40px;font-size:17px;font-weight:400}
.inner[data-page="timeline"] :is(.h1,.h2),.inner[data-page="about"] .h3{opacity:1}
.nav[aria-current="page"]{color:var(--c)}

/* ===== Footer ===== */
.site-foot{border-top:1px solid var(--line)}
.site-foot div{max-width:1920px;margin:0 auto;padding:22px 32px;box-sizing:border-box;display:flex;flex-wrap:wrap;justify-content:space-between;gap:10px 32px;color:#7f8b94;font:400 12px/1.6 "IBM Plex Sans",system-ui,sans-serif}
.site-foot .l{display:flex;flex-wrap:wrap;gap:8px 28px}
.site-foot a{color:#94a0a8}
@media (hover:hover){.site-foot a:hover,.site-foot a:focus-visible{color:var(--text)}}

/* ===== Phones and narrow windows ===== */
@media (max-width:899px){
.head-band{height:94px}
.inner .dock-logo{top:12px;left:20px;width:96px}
.inner .dock-nav{top:30px;right:20px;gap:20px;font-size:15px}
.site-foot div{padding:22px 20px}
}
@media (prefers-reduced-motion:reduce){.dock-logo .shape,.here,.nav,a{transition:none}}
