:root {
	--bg: #f6efe1;
	--bg-elev: #fbf6ea;
	--ink: #2a2118;
	--ink-soft: #5a4a3a;
	--accent: #7a1f2b;
	--accent-hover: #5c1620;
	--gold: #a07b2c;
	--rule: rgba(160, 123, 44, 0.35);
	--serif: "EB Garamond", "Iowan Old Style", "Palatino", "Palatino Linotype", Georgia, serif;
	--hebrew: "SBL Hebrew", "Frank Ruhl Libre", "David Libre", "Times New Roman", var(--serif);
	--measure: 48rem;
	--measure-wide: 56rem;
}

* {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
}

body {
	margin: 0;
	background: var(--bg);
	color: var(--ink);
	font-family: var(--serif);
	font-size: 19px;
	line-height: 1.7;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

a {
	color: var(--accent);
	text-decoration: underline;
	text-underline-offset: 2px;
	text-decoration-thickness: 1px;
}

a:hover,
a:focus {
	color: var(--accent-hover);
	text-decoration-thickness: 2px;
}

h1, h2, h3 {
	font-family: var(--serif);
	font-weight: 600;
	color: var(--ink);
	line-height: 1.25;
	margin: 0 0 0.5em;
	letter-spacing: 0.005em;
}

h1 {
	font-size: 2.4rem;
	font-style: italic;
	color: var(--accent);
}

h2 {
	font-size: 1.85rem;
	border-bottom: 1px solid var(--rule);
	padding-bottom: 0.4em;
	margin-bottom: 1em;
}

h3 {
	font-size: 1.3rem;
}

p {
	margin: 0 0 1em;
}

/* Header */
.site-header {
	max-width: var(--measure-wide);
	margin: 0 auto;
	padding: 2.5rem 1.5rem 1.5rem;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 1.5rem;
	text-align: center;
	border-bottom: 1px solid var(--rule);
}

.brand-link {
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	gap: 0.75rem;
	color: var(--ink);
	text-decoration: none;
}

.brand-link:hover .brand-name,
.brand-link:focus .brand-name {
	color: var(--accent);
}

.brand-logo {
	width: 5.5rem;
	height: 5.5rem;
	border-radius: 50%;
	object-fit: cover;
	border: 1px solid var(--rule);
	background: var(--bg-elev);
}

.brand-name {
	font-size: 1.6rem;
	font-weight: 600;
	font-style: italic;
}

.site-nav {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.4rem 1.6rem;
	font-size: 1rem;
}

.site-nav a {
	color: var(--ink-soft);
	text-decoration: none;
	padding: 0.2em 0;
	border-bottom: 1px solid transparent;
}

.site-nav a:hover,
.site-nav a:focus {
	color: var(--accent);
	border-bottom-color: var(--accent);
}

/* Main */
main {
	max-width: var(--measure);
	margin: 0 auto;
	padding: 2rem 1.5rem 4rem;
}

.hero {
	text-align: center;
	padding: 2.5rem 0 1.5rem;
}

.hero-figure {
	margin: 0 0 2rem;
	border: 1px solid var(--rule);
	background: var(--bg-elev);
	overflow: hidden;
}

.hero-figure img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 9;
	object-fit: cover;
}

.hero h1 {
	margin-bottom: 0.4em;
}

.tagline {
	font-size: 1.2rem;
	color: var(--ink-soft);
	font-style: italic;
	max-width: 32rem;
	margin: 0 auto;
}

.section {
	padding: 2.5rem 0;
}

.section-intro {
	color: var(--ink-soft);
	font-style: italic;
	margin-bottom: 1.5em;
}

.empty {
	color: var(--ink-soft);
	font-style: italic;
}

/* Class & teaching lists */
.class-list,
.teaching-list {
	list-style: none;
	padding: 0;
	margin: 0;
}

.class-item,
.teaching-item {
	padding: 1.5rem 0;
	border-bottom: 1px solid var(--rule);
}

.class-item:last-child,
.teaching-item:last-child {
	border-bottom: none;
}

.meta {
	color: var(--ink-soft);
	font-size: 0.95rem;
	margin: 0.2em 0 0.6em;
}

.meta .sep {
	margin: 0 0.5em;
	color: var(--gold);
}

.instructor {
	color: var(--ink-soft);
	font-style: italic;
	margin: 0 0 0.8em;
	font-size: 0.95rem;
}

.class-body p:last-child,
.teaching-body p:last-child {
	margin-bottom: 0;
}

.class-list.past .class-item h3 {
	color: var(--ink-soft);
}

/* Contact form */
.contact-form {
	display: flex;
	flex-direction: column;
	gap: 1rem;
	margin-top: 1.5rem;
}

.contact-form label {
	display: flex;
	flex-direction: column;
	gap: 0.3rem;
	font-size: 0.95rem;
	color: var(--ink-soft);
}

.contact-form input,
.contact-form textarea {
	font-family: var(--serif);
	font-size: 1rem;
	padding: 0.6rem 0.8rem;
	background: var(--bg-elev);
	border: 1px solid var(--rule);
	border-radius: 2px;
	color: var(--ink);
}

.contact-form input:focus,
.contact-form textarea:focus {
	outline: 2px solid var(--accent);
	outline-offset: 1px;
	border-color: var(--accent);
}

.contact-form button {
	align-self: flex-start;
	font-family: var(--serif);
	font-size: 1.05rem;
	font-style: italic;
	padding: 0.6rem 1.6rem;
	background: var(--accent);
	color: var(--bg);
	border: none;
	border-radius: 2px;
	cursor: pointer;
}

.contact-form button:hover,
.contact-form button:focus {
	background: var(--accent-hover);
}

/* Footer */
.site-footer {
	max-width: var(--measure-wide);
	margin: 0 auto;
	padding: 2rem 1.5rem 3rem;
	border-top: 1px solid var(--rule);
	text-align: center;
	color: var(--ink-soft);
	font-size: 0.9rem;
}

.social {
	list-style: none;
	padding: 0;
	margin: 0 0 1rem;
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.4rem 1.6rem;
}

.social a {
	color: var(--ink-soft);
	text-decoration: none;
	border-bottom: 1px solid transparent;
}

.social a:hover,
.social a:focus {
	color: var(--accent);
	border-bottom-color: var(--accent);
}

.copyright {
	max-width: 36rem;
	margin: 0 auto;
	line-height: 1.5;
}

/* Blog index */
.post-list {
	list-style: none;
	padding: 0;
	margin: 0;
}

.post-list-item {
	padding: 1.5rem 0;
	border-bottom: 1px solid var(--rule);
}

.post-list-item:last-child {
	border-bottom: none;
}

.post-list-item h2 {
	font-size: 1.4rem;
	border-bottom: none;
	padding: 0;
	margin: 0 0 0.3em;
}

.post-list-item h2 a {
	text-decoration: none;
	color: var(--ink);
}

.post-list-item h2 a:hover,
.post-list-item h2 a:focus {
	color: var(--accent);
	text-decoration: underline;
}

.post-excerpt {
	color: var(--ink-soft);
	margin: 0;
}

/* Blog post */
.post {
	padding: 1rem 0 0;
}

.post-header {
	text-align: center;
	margin-bottom: 2rem;
	padding-bottom: 1.5rem;
	border-bottom: 1px solid var(--rule);
}

.post-meta {
	color: var(--ink-soft);
	font-size: 0.95rem;
	font-style: italic;
	margin: 0 0 1em;
}

.post-meta a {
	color: var(--ink-soft);
	text-decoration: none;
	border-bottom: 1px solid transparent;
}

.post-meta a:hover,
.post-meta a:focus {
	color: var(--accent);
	border-bottom-color: var(--accent);
}

.post-meta .sep {
	margin: 0 0.5em;
	color: var(--gold);
}

.post-title {
	font-size: 2.2rem;
	margin: 0 0 0.4em;
}

.post-byline {
	color: var(--ink-soft);
	font-style: italic;
	margin: 0;
}

.post-pdf {
	margin: 1em 0 0;
}

.pdf-download {
	display: inline-block;
	padding: 0.45em 1em;
	border: 1px solid var(--accent);
	border-radius: 2px;
	color: var(--accent);
	text-decoration: none;
	font-size: 0.95rem;
	background: var(--bg-elev);
}

.pdf-download::before {
	content: "";
	display: inline-block;
	width: 1.4em;
	height: 1.4em;
	margin-inline-end: 0.5em;
	vertical-align: -0.35em;
	background-color: currentColor;
	-webkit-mask: url(/images/download.svg) center / contain no-repeat;
	mask: url(/images/download.svg) center / contain no-repeat;
}

.pdf-download:hover,
.pdf-download:focus {
	background: var(--accent);
	color: var(--bg);
}

.post-banner {
	margin: 0 0 2.5rem;
	border: 1px solid var(--rule);
	background: var(--bg-elev);
	overflow: hidden;
}

.post-banner img {
	display: block;
	width: 100%;
	height: auto;
}

.post-banner figcaption {
	padding: 0.6rem 0.9rem;
	background: var(--bg-elev);
	border-top: 1px solid var(--rule);
	font-size: 0.85rem;
	color: var(--ink-soft);
	font-style: italic;
}

.post-body h2 {
	font-size: 1.6rem;
	margin-top: 2em;
}

.post-body h3 {
	font-size: 1.25rem;
	margin-top: 1.6em;
	color: var(--ink-soft);
}

.post-body h4 {
	font-size: 1.1rem;
	margin-top: 1.4em;
	color: var(--ink-soft);
	font-style: italic;
}

.post-body blockquote {
	margin: 1em 0;
	padding: 0.4em 1.2em;
	border-inline-start: 3px solid var(--gold);
	background: var(--bg-elev);
	color: var(--ink);
	font-style: italic;
}

.post-body [lang="he"] blockquote,
.post-body blockquote[lang="he"] {
	direction: rtl;
	font-style: normal;
	font-size: 1.1em;
}

.post-body table {
	width: 100%;
	border-collapse: collapse;
	margin: 1.5em 0;
	font-size: 0.95rem;
}

.post-body th,
.post-body td {
	padding: 0.5em 0.75em;
	border-bottom: 1px solid var(--rule);
	text-align: left;
	vertical-align: top;
}

.post-body th {
	background: var(--bg-elev);
	font-weight: 600;
}

.post-body code {
	font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
	font-size: 0.9em;
	background: var(--bg-elev);
	padding: 0.1em 0.35em;
	border-radius: 2px;
}

/* Credits page */
.credits-list {
	margin: 0;
}

.credits-list dt {
	font-weight: 600;
	margin-top: 1.2em;
}

.credits-list dd {
	margin: 0.3em 0 0;
	color: var(--ink-soft);
}

/* Hebrew text helper */
[lang="he"] {
	font-family: var(--hebrew);
}

/* Smaller screens */
@media (max-width: 480px) {
	body {
		font-size: 17px;
	}

	h1 {
		font-size: 2rem;
	}

	h2 {
		font-size: 1.5rem;
	}

	main {
		padding: 1rem 1.2rem 3rem;
	}

	.site-header {
		padding: 1.75rem 1.2rem 1.25rem;
	}
}
