/*
Theme Name: Lumos
Description: A responsive rebuild of the Fullscreen theme for Lumos Studio. Dark, edge-to-edge photo grid on the main site; readable post layout with sidebar on the blog. Works on PHP 8.
Version: 1.0.2
Requires at least: 5.5
Tested up to: 6.7
Requires PHP: 7.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: lumos
*/

/* ==========================================================================
   Tokens
   ========================================================================== */
:root {
	--bg: #0d0d0d;
	--band: #000;
	--surface: #161616;
	--line: #2a2a2a;
	--text: #b4b4b4;
	--muted: #808080;
	--heading: #fff;
	--link: #5a9cf0;
	--link-hover: #fff;

	--font: "Helvetica Neue", Helvetica, Arial, sans-serif;
	--measure: 42rem;
	--wide: 59.375rem; /* 950px, the old theme's large image width */
	--gutter: clamp(1rem, 3vw, 2rem);

	color-scheme: dark;
}

/* ==========================================================================
   Base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font-family: var(--font);
	font-size: 1.0625rem;
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
	color: var(--heading);
	font-weight: 700;
	line-height: 1.2;
	margin: 1.6em 0 .6em;
	text-wrap: balance;
}
h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); letter-spacing: -.01em; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.2rem; }
h4, h5, h6 { font-size: 1rem; }

p, ul, ol, dl, blockquote, pre, figure, table { margin: 0 0 1.2em; }

a { color: var(--link); text-decoration: underline; text-underline-offset: .15em; text-decoration-thickness: 1px; }
a:hover { color: var(--link-hover); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
	outline: 2px solid var(--link);
	outline-offset: 2px;
}

img, video, iframe, embed, object { max-width: 100%; }
img, video { height: auto; }
img { vertical-align: middle; }

blockquote { margin-left: 0; padding-left: 1.2em; border-left: 3px solid var(--line); color: var(--muted); font-style: italic; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }
pre, code { font-family: ui-monospace, Consolas, monospace; font-size: .9em; }
pre { background: var(--surface); padding: 1em; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { border-bottom: 1px solid var(--line); padding: .5em; text-align: left; }

input, textarea, select, button { font: inherit; color: inherit; }
input[type="text"], input[type="search"], input[type="email"], input[type="url"], input[type="tel"], input[type="password"], textarea, select {
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: 2px;
	padding: .55em .7em;
	width: 100%;
	max-width: 100%;
}
button, input[type="submit"], .wp-block-button__link {
	background: var(--heading);
	color: var(--band);
	border: 0;
	border-radius: 2px;
	padding: .6em 1.2em;
	font-weight: 700;
	cursor: pointer;
}
button:hover, input[type="submit"]:hover { background: var(--link); color: #fff; }

.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}
.skip-link:focus {
	clip: auto; width: auto; height: auto;
	z-index: 100; top: .5rem; left: .5rem;
	background: var(--heading); color: var(--band); padding: .6em 1em;
}

/* ==========================================================================
   Name-and-menu band
   ========================================================================== */
.band {
	background: var(--band);
	color: var(--text);
	position: relative;
	z-index: 20;
}
.masthead { border-bottom: 1px solid var(--line); }

.band-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem 2rem;
	padding: clamp(1.1rem, 2.5vw, 1.75rem) var(--gutter);
	padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
	padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
}

.brand { min-width: 0; }
.site-title {
	margin: 0;
	/* Thinnest face each system has: Helvetica Neue Thin (Mac/iPhone), Segoe UI Light (Windows), Roboto Thin (Android). */
	font-family: "Helvetica Neue", "Segoe UI", Roboto, Arial, sans-serif;
	font-size: clamp(1.4rem, 3.2vw, 2.4rem);
	font-weight: 100;
	text-transform: uppercase;
	letter-spacing: .06em;
	line-height: 1;
}
.site-title a { color: var(--heading); text-decoration: none; }
.site-description { margin: .45em 0 0; font-size: .8rem; color: var(--muted); letter-spacing: .02em; }

/* Menu */
.site-nav { position: relative; }
.nav-toggle { display: none; }

.menu, .sub-menu { list-style: none; margin: 0; padding: 0; }
.menu { display: flex; flex-wrap: wrap; gap: .25rem 1.6rem; align-items: center; }
.menu > li { position: relative; }

.menu > li > a,
.menu-parent {
	display: inline-block;
	background: none;
	border: 0;
	padding: .35em 0;
	color: var(--text);
	font-size: .72rem;
	font-weight: 700;
	letter-spacing: .14em;
	text-transform: uppercase;
	text-decoration: none;
	cursor: pointer;
	border-radius: 0;
}
.menu-parent::after {
	content: "";
	display: inline-block;
	width: .35em; height: .35em;
	margin-left: .45em;
	border-right: 1.5px solid currentColor;
	border-bottom: 1.5px solid currentColor;
	transform: translateY(-.2em) rotate(45deg);
}
.menu > li > a:hover, .menu-parent:hover,
.menu > .current-menu-item > a, .menu > li.is-open > .menu-parent { color: var(--heading); background: none; }

.submenu-toggle {
	background: none; color: var(--text); padding: .3em .4em; margin-left: .1em;
	width: 1.4em; height: 1.4em; vertical-align: middle; position: relative;
}
.submenu-toggle::before {
	content: ""; position: absolute; left: 50%; top: 40%;
	width: .35em; height: .35em;
	border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
	transform: translate(-50%, -50%) rotate(45deg);
}
.submenu-toggle:hover { background: none; color: var(--heading); }

.sub-menu {
	display: none;
	position: absolute;
	top: 100%;
	right: 0;
	min-width: 15rem;
	max-width: 80vw;
	padding: .5rem 0;
	background: var(--surface);
	border: 1px solid var(--line);
	box-shadow: 0 12px 30px rgba(0, 0, 0, .5);
	z-index: 30;
}
.sub-menu li { display: block; }
.sub-menu a { display: block; padding: .45rem 1.1rem; color: var(--text); text-decoration: none; font-size: .9rem; }
.sub-menu a:hover { background: var(--line); color: var(--heading); }
.sub-menu .children { list-style: none; padding-left: 1rem; }
.menu-search { padding: .4rem 1rem; }

@media (hover: hover) and (min-width: 801px) {
	.menu > li:hover > .sub-menu { display: block; }
}
.menu > li:focus-within > .sub-menu,
.menu > li.is-open > .sub-menu { display: block; }

/* Phone menu */
@media (max-width: 800px) {
	.band-inner { flex-wrap: wrap; }
	/* Let the toggle sit beside the name and the open menu drop to its own full-width row. */
	.site-nav { display: contents; }
	.nav-toggle {
		display: inline-flex; align-items: center; gap: .6em;
		background: none; color: var(--heading); padding: .4em 0;
		font-size: .72rem; letter-spacing: .14em; text-transform: uppercase;
	}
	.nav-toggle:hover { background: none; color: var(--heading); }
	.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after {
		display: block; width: 18px; height: 2px; background: currentColor; position: relative;
		transition: transform .2s;
	}
	.nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
	.nav-toggle-bars::before { top: -6px; }
	.nav-toggle-bars::after { top: 6px; }
	.nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
	.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: translateY(6px) rotate(45deg); }
	.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { transform: translateY(-6px) rotate(-45deg); }

	.nav-panel { display: none; flex-basis: 100%; width: 100%; }
	.nav-panel.is-open { display: block; }
	.menu { flex-direction: column; align-items: stretch; gap: 0; border-top: 1px solid var(--line); margin-top: .75rem; }
	.menu > li { border-bottom: 1px solid var(--line); }
	.menu > li > a, .menu-parent { padding: .9rem 0; width: auto; text-align: left; }
	.menu-parent { width: 100%; display: flex; justify-content: space-between; align-items: center; }
	.sub-menu {
		position: static; box-shadow: none; border: 0; min-width: 0; max-width: none;
		background: none; padding: 0 0 .8rem;
	}
	.sub-menu a { padding: .5rem 0 .5rem 1rem; }
	.menu > li:focus-within > .sub-menu { display: none; }
	.menu > li.is-open > .sub-menu { display: block; }
	.submenu-toggle { float: right; margin-top: .55rem; }
}

/* ==========================================================================
   Contact sheet (portfolio homepage and grids)
   ========================================================================== */
.sheet { display: flex; flex-direction: column; }

.grid {
	--cols: 5;
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
}
.grid-small { --cols: 10; }
.grid-archive { --cols: 6; }

.tile { position: relative; aspect-ratio: 1; overflow: hidden; background: var(--surface); }
.tile a { display: block; width: 100%; height: 100%; color: var(--heading); text-decoration: none; }
.tile img, .tile-empty {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .5s ease, opacity .3s ease;
}
.tile-empty { background: linear-gradient(135deg, #222, #111); }
.tile-title {
	position: absolute;
	inset: auto 0 0 0;
	padding: 2.5rem .8rem .7rem;
	background: linear-gradient(transparent, rgba(0, 0, 0, .85));
	font-size: .8rem;
	font-weight: 700;
	line-height: 1.3;
	opacity: 0;
	transform: translateY(.4rem);
	transition: opacity .25s ease, transform .25s ease;
}
/* Titles appear only on mouse hover or keyboard focus, never on phones and tablets (a tap would flash them). */
@media (hover: hover) and (pointer: fine) {
	.tile a:hover img { transform: scale(1.04); }
	.tile a:hover .tile-title { opacity: 1; transform: none; }
	.grid:hover .tile img { opacity: .75; }
	.grid .tile a:hover img { opacity: 1; }
}
.tile a:focus-visible img { transform: scale(1.04); }
.tile a:focus-visible .tile-title { opacity: 1; transform: none; }
.tile a:focus-visible { outline-offset: -3px; }
.grid-small .tile-title { display: none; }

.sheet-band { border-block: 1px solid var(--line); }
.sheet-band .band-inner { padding-block: clamp(1.5rem, 3.5vw, 2.6rem); }

.empty-note { padding: 3rem var(--gutter); text-align: center; }

@media (max-width: 1100px) {
	.grid-small { --cols: 5; }
	.grid-archive { --cols: 4; }
}
@media (max-width: 700px) {
	/* Name and menu first on phones, then one big photo and a 2x2 block. */
	.sheet-band { order: -1; border-top: 0; }
	.grid-feature { --cols: 2; }
	.grid-feature .tile:first-child { grid-column: span 2; aspect-ratio: 4 / 3; }
	.grid-small { --cols: 4; }
	.grid-wide, .grid-archive { --cols: 2; }
}

/* ==========================================================================
   Pages, posts, blog
   ========================================================================== */
.list-header, .layout, .pager, .nothing {
	padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
	padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
}
.list-header { padding-top: 2rem; padding-bottom: 1.5rem; }
.list-title { margin: 0; font-size: clamp(1.3rem, 3vw, 1.8rem); }
.list-header + .grid { border-top: 1px solid var(--line); }

.layout {
	display: grid;
	gap: 3rem;
	max-width: calc(var(--measure) + 2 * var(--gutter));
	margin: 0 auto;
	padding-top: clamp(2rem, 5vw, 3.5rem);
	padding-bottom: 4rem;
}
.layout.is-wide { max-width: calc(var(--wide) + 2 * var(--gutter)); }
.layout.has-sidebar { max-width: calc(var(--measure) + 17rem + 3rem + 2 * var(--gutter)); }
@media (min-width: 960px) {
	.layout.has-sidebar { grid-template-columns: minmax(0, 1fr) 17rem; }
}
.content-col { min-width: 0; }

.entry + .entry { margin-top: 4rem; padding-top: 3rem; border-top: 1px solid var(--line); }
.entry-header { margin-bottom: 1.6rem; }
.entry-title { margin: 0 0 .35em; }
.entry-title a { color: var(--heading); text-decoration: none; }
.entry-title a:hover { color: var(--link); }
.entry-meta { margin: 0; font-size: .8rem; color: var(--muted); letter-spacing: .04em; text-transform: uppercase; }
.entry-meta a { color: var(--muted); text-decoration: none; }
.entry-meta a:hover { color: var(--heading); }
.entry-meta .sep { margin: 0 .5em; }

.entry-content::after { content: ""; display: table; clear: both; }
.entry-content > :first-child { margin-top: 0; }
.entry-content img { max-width: 100%; height: auto; }
.entry-footer { margin-top: 2rem; font-size: .85rem; color: var(--muted); }
.entry-tags a {
	display: inline-block; margin: 0 .35em .35em 0; padding: .2em .6em;
	border: 1px solid var(--line); border-radius: 2px; color: var(--text); text-decoration: none;
}
.entry-tags a:hover { border-color: var(--text); color: var(--heading); }
.entry-comments-link { font-size: .9rem; }
.edit-link { font-size: .8rem; }

/* Classic editor alignment and captions */
.alignleft { float: left; margin: .3em 1.5em 1em 0; }
.alignright { float: right; margin: .3em 0 1em 1.5em; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.wp-caption { max-width: 100%; }
.wp-caption-text, figcaption { font-size: .8rem; color: var(--muted); margin-top: .5em; }
@media (max-width: 600px) {
	.alignleft, .alignright { float: none; margin: 0 0 1em; }
}

/* Old [gallery] shortcode */
.gallery { display: grid; gap: .5rem; grid-template-columns: repeat(var(--gcols, 3), minmax(0, 1fr)); }
.gallery-columns-1 { --gcols: 1; } .gallery-columns-2 { --gcols: 2; } .gallery-columns-4 { --gcols: 4; }
.gallery-columns-5 { --gcols: 5; } .gallery-columns-6 { --gcols: 6; }
.gallery-item { margin: 0; }
.gallery-item img { width: 100%; aspect-ratio: 1; object-fit: cover; }
@media (max-width: 600px) { .gallery { --gcols: 2 !important; } }

/* Video and audio */
.post-video, .post-media { margin: 0 0 2rem; }
.post-video iframe, .post-video video, .post-media video, .post-media iframe {
	display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; border: 0; background: #000;
}
.post-media audio, .post-video audio { width: 100%; }
.podpress-item { margin: 0 0 1.2rem; }
.media-download {
	display: inline-block; padding: .7em 1em; border: 1px solid var(--line);
	background: var(--surface); text-decoration: none; font-size: .9rem;
}

/* Previous / next */
.post-navigation { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.post-navigation .nav-links { display: flex; justify-content: space-between; gap: 2rem; }
.post-navigation a { display: flex; flex-direction: column; text-decoration: none; color: var(--heading); max-width: 20rem; }
.post-navigation .nav-next { margin-left: auto; text-align: right; }
.post-navigation .nav-label { font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.post-navigation .nav-title { font-weight: 700; }
.post-navigation a:hover .nav-title { color: var(--link); }

.pager { display: flex; justify-content: space-between; gap: 1rem; padding-top: 2rem; padding-bottom: 3rem; font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; }
.pager a { text-decoration: none; color: var(--heading); }
.pager a:hover { color: var(--link); }
.pager-older { margin-left: auto; }
.layout .pager { padding-left: 0; padding-right: 0; }

/* Sidebar */
.sidebar { font-size: .95rem; min-width: 0; }
.widget { margin-bottom: 2.2rem; }
.widget-title {
	margin: 0 0 .8rem;
	font-size: .72rem;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--heading);
}
.widget ul { list-style: none; padding: 0; margin: 0; }
.widget li { padding: .25em 0; }
.widget li .children { padding-left: 1em; }
.widget a { color: var(--text); text-decoration: none; }
.widget a:hover { color: var(--heading); text-decoration: underline; }
.tagcloud a { display: inline-block; margin: 0 .6em .3em 0; }
.sidebar-feed { font-size: .85rem; }

.search-form { display: flex; gap: .4rem; }
.search-form label { flex: 1; min-width: 0; }
.search-form .search-submit { flex: none; }

/* Comments */
.comments { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--line); }
.comment-list { list-style: none; padding: 0; }
.comment-list .children { list-style: none; padding-left: 1.5rem; }
.comment-body { padding: 1rem 0; border-bottom: 1px solid var(--line); }
.comment-author { display: flex; align-items: center; gap: .6rem; font-weight: 700; color: var(--heading); }
.comment-author img { border-radius: 50%; }
.comment-author .says { display: none; }
.comment-metadata { font-size: .75rem; margin-bottom: .5rem; }
.comment-metadata a { color: var(--muted); text-decoration: none; }
.comment-form p { margin-bottom: 1rem; }
.comment-form label { display: block; font-size: .85rem; margin-bottom: .25rem; }
.comment-form .comment-form-cookies-consent label { display: inline; }

/* Nothing found */
.nothing { max-width: 36rem; margin: 0 auto; padding-top: 4rem; padding-bottom: 4rem; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
	border-top: 1px solid var(--line);
	background: var(--band);
	font-size: .85rem;
	color: var(--muted);
	padding: 2.5rem max(var(--gutter), env(safe-area-inset-right, 0px)) calc(2rem + env(safe-area-inset-bottom, 0px)) max(var(--gutter), env(safe-area-inset-left, 0px));
}
.footer-widgets { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); margin-bottom: 2rem; }
.footer-widgets .widget { margin-bottom: 1rem; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 2rem; }
.footer-bottom p { margin: 0; }
.site-footer a { color: var(--text); text-decoration: none; }
.site-footer a:hover { color: var(--heading); }
.footer-links { display: flex; gap: 1.5rem; }

/* ==========================================================================
   Lightbox
   ========================================================================== */
.lightbox {
	width: 100vw; height: 100vh; max-width: none; max-height: none;
	margin: 0; padding: 0; border: 0;
	background: rgba(0, 0, 0, .94);
	color: var(--text);
}
.lightbox::backdrop { background: rgba(0, 0, 0, .94); }
.lightbox-figure {
	margin: 0; height: 100%;
	display: flex; flex-direction: column; align-items: center; justify-content: center;
	padding: 3.5rem 4rem;
}
.lightbox-figure img { max-width: 100%; max-height: calc(100vh - 8rem); width: auto; height: auto; object-fit: contain; }
.lightbox-figure figcaption { text-align: center; }
.lightbox-btn {
	position: fixed; background: none; color: #fff; font-size: 2.4rem; line-height: 1;
	width: 3rem; height: 3rem; padding: 0; font-weight: 300; opacity: .75;
}
.lightbox-btn:hover { background: none; color: #fff; opacity: 1; }
.lightbox-prev { left: max(.5rem, env(safe-area-inset-left, 0px)); top: 50%; transform: translateY(-50%); }
.lightbox-next { right: max(.5rem, env(safe-area-inset-right, 0px)); top: 50%; transform: translateY(-50%); }
.lightbox-close { right: max(.5rem, env(safe-area-inset-right, 0px)); top: calc(.5rem + env(safe-area-inset-top, 0px)); }
.lightbox.is-single .lightbox-prev, .lightbox.is-single .lightbox-next { display: none; }
@media (max-width: 600px) {
	.lightbox-figure { padding: 3.5rem .5rem; }
	.lightbox-prev, .lightbox-next { top: auto; bottom: 1rem; transform: none; }
}

.protect-images img { -webkit-user-drag: none; -webkit-touch-callout: none; }

/* ==========================================================================
   Motion
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
