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

html {
	min-width: 320px;
	scroll-behavior: smooth;
	scroll-padding-top: calc(var(--apj-header-height) + 1rem);
}

body {
	min-width: 320px;
	margin: 0;
	overflow-wrap: break-word;
	background:
		radial-gradient(circle at 10% 4%, var(--apj-color-accent-soft), transparent 34rem),
		radial-gradient(circle at 92% 28%, rgba(145, 120, 170, 0.09), transparent 30rem),
		var(--apj-color-bg);
	color: var(--apj-color-text);
	font-family: var(--apj-font-sans);
	font-size: clamp(1rem, 0.96rem + 0.12vw, 1.075rem);
	line-height: 1.8;
	transition: background-color var(--apj-motion-normal) ease, color var(--apj-motion-normal) ease;
}

body::before {
	position: fixed;
	z-index: -1;
	inset: 0;
	background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.055'/%3E%3C/svg%3E");
	content: "";
	opacity: 0.23;
	pointer-events: none;
}

body.is-menu-open {
	overflow: hidden;
}

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

figure {
	margin: 0;
}

a {
	color: inherit;
	text-decoration-color: color-mix(in srgb, var(--apj-color-accent) 55%, transparent);
	text-underline-offset: 0.22em;
}

a:hover {
	color: var(--apj-color-accent);
}

button,
input,
textarea,
select {
	color: inherit;
	font: inherit;
}

button,
[type="button"],
[type="submit"] {
	cursor: pointer;
}

h1,
h2,
h3,
h4,
h5,
h6 {
	margin-block: 0 0.75em;
	font-family: var(--apj-font-mono);
	font-weight: 600;
	letter-spacing: -0.035em;
	line-height: 1.18;
	text-wrap: balance;
}

p {
	margin-block: 0 1.2em;
}

::selection {
	background: var(--apj-color-accent);
	color: var(--apj-color-bg);
}

:focus-visible {
	border-radius: 4px;
	outline: 2px solid var(--apj-color-accent);
	outline-offset: 4px;
}

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	border: 0;
	white-space: nowrap;
}

.screen-reader-text:focus {
	z-index: 100000;
	top: 0.75rem;
	left: 0.75rem;
	width: auto;
	height: auto;
	padding: 0.75rem 1rem;
	clip: auto;
	background: var(--apj-color-surface-solid);
	color: var(--apj-color-text);
}

.skip-link {
	position: fixed !important;
}

.eyebrow,
.entry-meta {
	color: var(--apj-color-muted);
	font-family: var(--apj-font-mono);
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.11em;
	line-height: 1.4;
	text-transform: uppercase;
}

.button,
button.button {
	display: inline-flex;
	min-height: 44px;
	align-items: center;
	justify-content: center;
	padding: 0.65rem 1.1rem;
	border: 1px solid var(--apj-color-border);
	border-radius: 999px;
	background: var(--apj-color-accent);
	color: var(--apj-color-bg);
	font-family: var(--apj-font-mono);
	font-size: 0.82rem;
	font-weight: 600;
	text-decoration: none;
	transition: transform var(--apj-motion-fast) var(--apj-ease), filter var(--apj-motion-fast) ease;
}

.button:hover {
	color: var(--apj-color-bg);
	filter: brightness(1.06);
	transform: translateY(-2px);
}

.has-reveal [data-reveal] {
	opacity: 0;
	transform: translateY(22px) scale(0.96);
	transition:
		opacity var(--apj-motion-normal) var(--apj-ease),
		transform var(--apj-motion-normal) var(--apj-ease);
	transition-delay: var(--apj-reveal-delay, 0ms);
}

.has-reveal [data-reveal].is-revealed {
	opacity: 1;
	transform: none;
}

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

	*,
	*::before,
	*::after {
		scroll-behavior: auto !important;
		transition-duration: 0.01ms !important;
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
	}

	.has-reveal [data-reveal] {
		opacity: 1;
		transform: none;
	}

	.button:hover {
		transform: none;
	}
}

html.apj-motion-disabled {
	scroll-behavior: auto;
}

html.apj-motion-disabled *,
html.apj-motion-disabled *::before,
html.apj-motion-disabled *::after {
	scroll-behavior: auto !important;
	transition-duration: 0.01ms !important;
	animation-duration: 0.01ms !important;
	animation-iteration-count: 1 !important;
}

html.apj-motion-disabled .hero__scroll-arrow,
html.apj-motion-disabled .hero-reveal,
html.apj-motion-disabled.has-reveal [data-reveal] {
	animation: none;
	opacity: 1;
	transform: none;
}

html.apj-motion-disabled .hero.is-leaving .hero__inner,
html.apj-motion-disabled .button:hover,
html.apj-motion-disabled .bento-card:hover .bento-card__media img,
html.apj-motion-disabled .profile-card__avatar-link:hover :is(.profile-card__avatar, .profile-card__avatar-placeholder),
html.apj-motion-disabled .icon-button:hover,
html.apj-motion-disabled .blog-feature:hover .blog-feature__media img,
html.apj-motion-disabled .blog-card:hover .blog-card__media img,
html.apj-motion-disabled .search-result:hover .search-result__media img,
html.apj-motion-disabled .essay-card:hover .essay-card__media img,
html.apj-motion-disabled .blog-feature:hover .card-read-time i,
html.apj-motion-disabled .blog-card:hover .card-read-time i,
html.apj-motion-disabled .essay-card:hover .essay-card__continue i,
html.apj-motion-disabled .blog-card:hover,
html.apj-motion-disabled .search-result:hover {
	transform: none;
}

html.apj-motion-disabled .bento-card:hover {
	transform: var(--apj-bento-idle-transform, none);
}

html.apj-motion-disabled .search-dialog[open] {
	animation: none;
}
