/*
Theme Name: Making Scores
Theme URI: https://github.com/
Author: James Saunders
Description: A quiet, image-first theme with a left-hand menu column and no header bar, so content fills the screen. Designed for the Score Library plugin but works for ordinary pages and posts too.
Version: 1.2.0
Requires at least: 6.2
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: making-scores
Tags: two-columns, left-sidebar, custom-menu, custom-logo, featured-images, minimal
*/

:root {
	--bg: #ffffff;
	--fg: #111111;
	--muted: #6e6e6e;
	--line: #e7e5e1;
	--tile: #f4f2ee;
	--accent: #111111;
	--side-w: 15.5rem;
	--pad: clamp(1.25rem, 3vw, 2.75rem);
	--font: "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
	--font-size: 17px;
}

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

html { font-size: var(--font-size); -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	background: var(--bg);
	color: var(--fg);
	font-family: var(--font);
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
	letter-spacing: .005em;
}

img { max-width: 100%; height: auto; }

a { color: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .2em; text-decoration-color: color-mix(in srgb, currentColor 45%, transparent); }
a:hover { text-decoration-color: currentColor; }

h1, h2, h3, h4 { font-weight: 500; line-height: 1.2; letter-spacing: -.005em; }
h1 { font-size: 1.9rem; margin: 0 0 1rem; }
h2 { font-size: 1.4rem; margin: 2.25rem 0 .75rem; }
h3 { font-size: 1.1rem; margin: 1.75rem 0 .5rem; }

p, ul, ol, blockquote { margin: 0 0 1em; }
blockquote { border-left: 2px solid var(--fg); padding-left: 1.25rem; margin-left: 0; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2.5rem 0; }

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

/* ---------- Frame: left column + content ---------- */

.site {
	display: grid;
	grid-template-columns: var(--side-w) minmax(0, 1fr);
	min-height: 100vh;
}

.site-side {
	position: sticky;
	top: 0;
	height: 100vh;
	overflow-y: auto;
	display: flex;
	flex-direction: column;
	padding: var(--pad) 1.5rem var(--pad) var(--pad);
}

.site-title { font-weight: 600; font-size: 1.05rem; line-height: 1.25; margin: 0; }
.site-title a { text-decoration: none; }
.site-description { color: var(--muted); font-size: .85rem; line-height: 1.4; margin: .4rem 0 0; }
.custom-logo-link img { display: block; max-width: 9rem; height: auto; margin-bottom: .75rem; }

.menu-toggle { display: none; }

.site-nav { margin-top: 2.25rem; }
.site-nav ul { list-style: none; margin: 0; padding: 0; }
.site-nav li { margin: 0 0 .35rem; }
.site-nav a { text-decoration: none; }
.site-nav a:hover,
.site-nav .current-menu-item > a,
.site-nav .current_page_item > a,
.site-nav .current-menu-ancestor > a,
.site-nav .current_page_parent > a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .25em; }
.site-nav .sub-menu, .site-nav .children { margin: .35rem 0 .6rem .9rem; font-size: .92em; }

.side-search { margin-top: 1.75rem; }
.side-search input {
	width: 100%; font: inherit; font-size: .9rem; padding: .45em .6em;
	border: 1px solid var(--line); background: transparent; color: inherit; border-radius: 0;
}
.side-search input:focus { outline: none; border-color: var(--fg); }

.site-side-foot { margin-top: auto; padding-top: 2.5rem; font-size: .78rem; line-height: 1.45; color: var(--muted); }
.site-side-foot .widget { margin-bottom: 1rem; }
.site-side-foot .widget-title { font-size: inherit; font-weight: 600; margin: 0 0 .25rem; color: var(--fg); }
.site-side-foot p { margin: 0 0 .5em; }

.site-main {
	padding: var(--pad) var(--pad) 5rem calc(var(--pad) * .75);
	max-width: 92rem;
	min-width: 0;
}

/* ---------- Pages and posts ---------- */

.entry { max-width: 42rem; }
.entry--wide { max-width: none; }
.entry-title { margin-bottom: 1.5rem; }
.entry-meta { color: var(--muted); font-size: .85rem; margin: -1rem 0 1.5rem; }
.entry-content > * { max-width: 42rem; }
.entry-content > .alignwide { max-width: 64rem; }
.entry-content > .alignfull { max-width: none; }
.entry-content figure { margin: 2rem 0; }
.entry-content figcaption { font-size: .8rem; color: var(--muted); margin-top: .5rem; }
.entry-thumb { margin: 0 0 2rem; }

.post-list { list-style: none; padding: 0; margin: 0; max-width: 42rem; }
.post-list li { padding: 1.25rem 0; border-top: 1px solid var(--line); }
.post-list h2 { margin: 0 0 .25rem; font-size: 1.2rem; }
.post-list h2 a { text-decoration: none; }
.post-list .entry-meta { margin: 0 0 .5rem; }

.page-header { margin-bottom: 2rem; }
.posts-navigation { display: flex; gap: 1.5rem; margin-top: 2.5rem; }

/* Front page intro, in the spirit of a large quiet statement */
.home-intro { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 2rem 3rem; margin-bottom: 3.5rem; }
.home-intro .entry-content > * { max-width: 38rem; }
.home-intro h1 { font-size: 1.35rem; font-weight: 600; margin-bottom: .35rem; }
.home-intro .entry-content { font-size: 1.35rem; line-height: 1.45; }
.home-intro .entry-content p { margin-bottom: .6em; }
.home-links { font-size: .95rem; padding-top: .3rem; }
.home-links ul { list-style: none; padding: 0; margin: 0; }
.home-links li { margin-bottom: .3rem; }
.section-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin: 0 0 1.25rem; }
.section-heading h2 { margin: 0; font-size: 1.4rem; }
.section-heading a { font-size: .9rem; }

/* ---------- Score Library: theme styling on top of the plugin's base ---------- */

.ms-listing, .ms-score {
	--ms-gap: 2.5rem;
	--ms-tile-bg: var(--tile);
	--ms-muted: var(--muted);
	--ms-line: var(--line);
	--ms-chip-on-bg: var(--fg);
	--ms-chip-on-fg: var(--bg);
}
.ms-listing__title { font-size: 1.9rem; }
.ms-listing__intro { font-size: 1.2rem; line-height: 1.45; color: var(--fg); }
.ms-filters__search input { border-color: var(--line); font-size: .95rem; }
.ms-filters__search input:focus { outline: none; border-color: var(--fg); }
.ms-filters__search button { background: var(--fg); color: var(--bg); border-color: var(--fg); font-size: .95rem; }
.ms-filter summary { font-size: .95rem; }
.ms-card__title { font-size: 1rem; margin-top: .8rem; }
.ms-card__meta { font-size: .875rem; }
.ms-card__image img { padding: 7%; mix-blend-mode: multiply; }
.ms-score__title { font-size: 2rem; font-weight: 500; }
.ms-score__byline { font-size: 1.15rem; }
.ms-score__note { font-size: 1.1rem; line-height: 1.5; }
.ms-score__links a { font-size: .92rem; }
.ms-score__links a:hover { background: var(--fg); color: var(--bg); }

.ms-listing--projects, .ms-project, .ms-project__scores { --ms-gap: 2.5rem; --ms-tile-bg: var(--tile); --ms-muted: var(--muted); --ms-line: var(--line); --ms-number-bg: var(--fg); --ms-number-fg: var(--bg); }
.ms-projects-section__title { font-size: 1.4rem; }
.ms-card--project .ms-card__image img,
.ms-card__image--cover img { mix-blend-mode: normal; padding: 0; }
.ms-project__title { font-size: 2rem; font-weight: 500; }
.ms-project__summary { font-size: 1.2rem; }
.ms-project__content { font-size: 1.02rem; }
.ms-project__content > * { max-width: 40rem; }
.ms-project__button a:hover { background: var(--fg); color: var(--bg); }
.home-section + .home-section { margin-top: 4rem; }

/* ---------- Small screens: the column becomes a top bar ---------- */

@media (max-width: 860px) {
	.site { grid-template-columns: 1fr; }
	.site-side {
		position: sticky; top: 0; z-index: 20; height: auto; overflow: visible;
		background: var(--bg); padding: .9rem 1.25rem; border-bottom: 1px solid var(--line);
	}
	.site-brand { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
	.site-description { display: none; }
	.custom-logo-link img { max-height: 2rem; width: auto; margin: 0; }
	.menu-toggle {
		display: block; font: inherit; font-size: .9rem; background: none; border: 0; color: inherit;
		padding: .25rem 0; cursor: pointer; text-decoration: underline; text-underline-offset: .2em;
	}
	.site-menu { display: none; padding: 1rem 0 .5rem; }
	.site-side.is-open .site-menu { display: block; }
	.site-nav { margin-top: 0; }
	.site-nav li { margin-bottom: .55rem; font-size: 1.1rem; }
	.site-side-foot { display: none; }
	.site-main { padding: 1.5rem 1.25rem 4rem; }
	.home-intro { grid-template-columns: 1fr; }
	.home-intro .entry-content { font-size: 1.15rem; }
	.ms-listing, .ms-score, .ms-listing--projects, .ms-project { --ms-gap: 1.5rem; }
	.ms-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
	.ms-card__image img { transition: none; }
}
