/*
Theme Name: Stillwater
Theme URI: https://www.inger.us
Author: Michael Inger
Description: A calm, uncluttered block theme for the Sydney Inger, LMSW site at inger.us. Soft warm paper background, deep indigo type, lavender accents drawn from the original chrysanthemum header, Newsreader headings and Inter body text. Includes patterns for the Home, About Me and Publications pages.
Requires at least: 6.5
Tested up to: 6.8
Requires PHP: 7.4
Version: 1.3.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: stillwater
Tags: one-column, block-patterns, full-site-editing, custom-colors, editor-style, accessibility-ready
*/

/* Most styling lives in theme.json. These are the few touches it can't express. */

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

::selection { background: var(--wp--preset--color--accent-soft); color: var(--wp--preset--color--contrast); }

a { text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

:where(a, button, input, .wp-element-button):focus-visible {
	outline: 2px solid var(--wp--preset--color--accent);
	outline-offset: 3px;
	border-radius: 2px;
}

/* Sticky, quiet header */
.sw-header {
	position: sticky;
	top: 0;
	z-index: 20;
	backdrop-filter: saturate(140%) blur(8px);
	-webkit-backdrop-filter: saturate(140%) blur(8px);
	background: color-mix(in srgb, var(--wp--preset--color--base) 88%, transparent);
	border-bottom: 1px solid var(--wp--preset--color--line);
}
.admin-bar .sw-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .sw-header { top: 46px; } }

.sw-header .wp-block-site-title a { text-decoration: none; }
.sw-header .wp-block-navigation a { text-decoration: none; }
.sw-header .wp-block-navigation .current-menu-item > a,
.sw-header .wp-block-navigation a[aria-current="page"] {
	text-decoration: underline;
	text-decoration-color: var(--wp--preset--color--accent);
	text-decoration-thickness: 2px;
	text-underline-offset: 0.5em;
}

/* Hero: soft indigo-to-lavender wash with a faint petal ring */
.sw-hero { position: relative; overflow: hidden; }
.sw-hero::after {
	content: "";
	position: absolute;
	right: -12vw;
	top: 50%;
	width: min(60vw, 640px);
	aspect-ratio: 1;
	transform: translateY(-50%);
	border-radius: 50%;
	background:
		repeating-conic-gradient(from 0deg, rgba(255,255,255,0.035) 0deg 6deg, transparent 6deg 18deg),
		radial-gradient(circle, rgba(255,255,255,0.08) 0 16%, transparent 19% 100%);
	mask-image: radial-gradient(circle, #000 55%, transparent 72%);
	-webkit-mask-image: radial-gradient(circle, #000 55%, transparent 72%);
	pointer-events: none;
}
.sw-hero > * { position: relative; z-index: 1; }

/* Publication list */
.sw-pub { border-top: 1px solid var(--wp--preset--color--line); }
.sw-pub:last-child { border-bottom: 1px solid var(--wp--preset--color--line); }
.sw-pub .sw-pub-meta { letter-spacing: 0.04em; }
.sw-cite { font-family: var(--wp--preset--font-family--body); }

/* Cards */
.sw-card { transition: transform .2s ease, box-shadow .2s ease; }
.sw-card:hover { transform: translateY(-2px); box-shadow: 0 10px 30px -18px rgba(31, 42, 68, 0.45); }
@media (prefers-reduced-motion: reduce) { .sw-card, .sw-card:hover { transition: none; transform: none; } }

/* Home banner with the chrysanthemum illustration */
.sw-hero-cover { background: var(--wp--preset--color--contrast); }
@media (max-width: 782px) {
	.sw-hero-cover .wp-block-cover__image-background { opacity: 0.3; object-position: 85% 50% !important; }
}

/* Quote banners: full image on the home page, thin strip elsewhere */
.wp-site-blocks > .sw-banner, .sw-banner { margin-top: 0 !important; margin-bottom: 0 !important; }
.sw-banner img { display: block; width: 100%; height: auto; }
.sw-banner-home img { height: clamp(140px, 20vw, 480px); object-fit: cover; object-position: 50% 53%; }
.sw-banner-thin img { height: clamp(140px, 18vw, 320px); object-fit: cover; object-position: 50% 53%; }

/* Headshot beside the name */
.sw-avatar { margin: 0; flex-shrink: 0; }
.sw-avatar img { display: block; width: 56px; height: 56px; border-radius: 999px; object-fit: cover; box-shadow: 0 0 0 2px var(--wp--preset--color--base), 0 0 0 3px var(--wp--preset--color--accent-soft); }
@media (max-width: 600px) { .sw-avatar img { width: 44px !important; height: 44px !important; } }
