@import url('https://fonts.googleapis.com/css2?family=EB+Garamond:wght@400;700;500&display=swap');
:root {
	--brown-900: #2e1603;
	--brown-800: #4d2a0d;
	--brown-600: #774a28;
	--cream: #f6efe9;
	--muted: #9a8b7f;
}
* { box-sizing: border-box; }
html, body {
	height: 100%;
	margin: 0;
	font-family: 'EB Garamond', serif;
	color: var(--brown-900);
}
body {
	background-image: url('../assets/hero.png');
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	background-attachment: fixed;
	position: relative;
}
.page-overlay {
	position: fixed;
	inset: 0;
	width: 100vw;
	height: 100vh;
	background: rgba(246, 239, 233, 0.85);
	z-index: 0;
	pointer-events: none;
}
.container {
	max-width: 1100px;
	margin-left: auto;
	margin-right: auto;
	padding-left: 3rem;
	padding-right: 3rem;
	padding-top: 1rem;
	padding-bottom: 1rem;
}
.main-title {
	font-size: 3.5rem;
	font-weight: 700;
	text-align: left;
	margin-top: 4rem;
	margin-bottom: 1.5rem;
	letter-spacing: 1px;
}
.home-grid {
	display: flex;
	flex-direction: row;
	gap: 2rem;
	padding: 2rem 0;
	align-items: flex-start;
}
.writing-section, .projects-section {
	background: transparent;
	border-radius: 12px;
	box-shadow: 0 6px 18px rgba(42,30,22,0.06);
	padding: 1.25rem;
	flex: 1;
}
.writing-section > h2, .projects-section > h2 {
	font-size: 1.9rem;
	font-weight: 700;
	margin-bottom: 1.2rem;
}
.writing-columns {
	display: flex;
	gap: 2rem;
}
.writing-sub {
	flex: 1;
}
.writing-sub > h3 {
	font-size: 1.5rem;
	font-weight: 700;
	margin-bottom: 1rem;
}
.writing-list, .projects-list {
	display: flex;
	flex-direction: column;
	gap: 0;
}
.writing-card, .project-card {
	padding: 1rem 0;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	border-bottom: 1px solid var(--brown-800);
	background: transparent;
}
.writing-title, .project-title {
	font-size: 1.1rem;
	font-weight: 600;
}
.writing-title a, .project-title a {
	color: var(--brown-900);
	text-decoration: none;
	transition: all 0.3s ease;
	border-bottom: 4px solid transparent;
	padding-bottom: 2px;
}
.writing-title a:hover, .project-title a:hover {
	color: var(--brown-600);
	border-bottom: 2px solid var(--brown-600);
}
.writing-date, .project-date {
	font-size: 1.0rem;
	color: var(--brown-800);
}
.project-desc {
	font-size: 1.0rem;
	color: var(--brown-500);
	margin-top: 0.3rem;
	margin-bottom: 0.5rem;
	line-height: 1.5;
}
.social-links a img {
	width: 28px;
	height: 28px;
	margin-right: 10px;
	vertical-align: middle;
	filter: grayscale(0) brightness(0.3) sepia(1) hue-rotate(-20deg) saturate(3);
}
.site-header, .home-grid, .site-footer {
	position: relative;
	z-index: 1;
}
main {
	position: relative;
	z-index: 1;
}
.site-footer {
	padding: 2rem 0;
	color: var(--brown-900);
}

/* Blog post styling */
.nav {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 1rem 0;
}
.brand {
	font-weight: 700;
	color: var(--brown-900);
	text-decoration: none;
	font-size: 1.2rem;
}
.brand:hover {
	color: var(--brown-600);
}
.card {
	background: transparent;
	border-radius: 12px;
	box-shadow: 0 6px 18px rgba(42,30,22,0.06);
	padding: 1.25rem;
}
article {
	max-width: 800px;
}
article h1 {
	font-size: 2.5rem;
	font-weight: 700;
	margin-bottom: 0.5rem;
	line-height: 1.2;
}
.post-date {
	font-size: 1rem;
	color: var(--brown-800);
	margin-bottom: 1.5rem;
	font-style: italic;
}
.post-body {
	font-size: 1.1rem;
	line-height: 1.8;
	color: var(--brown-900);
	font-family: ui-sans-serif, system-ui, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
}
.post-body p {
	margin-bottom: 1.5rem;
}
.post-body h2 {
	font-size: 1.8rem;
	font-weight: 700;
	margin-top: 2rem;
	margin-bottom: 1rem;
}
.post-body h3 {
	font-size: 1.4rem;
	font-weight: 700;
	margin-top: 1.5rem;
	margin-bottom: 0.8rem;
}
.post-body code {
	background: rgba(235, 203, 179, 0.5);
	padding: 2px 6px;
	border-radius: 3px;
	font-family: 'Courier New', monospace;
	font-size: 0.95rem;
}
.post-body pre {
	background: #ffffff;
	color: var(--brown-900);
	padding: 1.5rem;
	border-radius: 8px;
	border: 1px solid #e0d5c8;
	overflow-x: auto;
	margin: 1.5rem 0;
	font-family: 'Courier New', monospace;
	font-size: 0.95rem;
	line-height: 1.5;
}
.post-body pre code {
	background: transparent;
	padding: 0;
	color: var(--brown-900);
}
.post-body img {
	max-width: 100%;
	height: auto;
	border-radius: 8px;
	margin: 1.5rem auto;
	display: block;
	max-height: 500px;
	object-fit: cover;
}
.post-body figure {
	margin: 1.5rem 0;
	padding: 0;
}
.post-body figcaption {
	font-size: 0.95rem;
	color: var(--brown-800);
	font-style: italic;
	text-align: center;
	margin-top: 0.8rem;
	padding: 0 1rem;
	line-height: 1.6;
}
.post-body a {
	color: var(--brown-600);
	text-decoration: underline;
	transition: color 0.3s ease;
}
.post-body a:hover {
	color: var(--brown-900);
}
.post-body blockquote {
	border-left: 4px solid var(--brown-600);
	padding-left: 1.5rem;
	margin: 1.5rem 0;
	color: var(--brown-800);
	font-style: italic;
}
.post-body ul, .post-body ol {
	margin-bottom: 1.5rem;
	padding-left: 2rem;
}
.post-body li {
	margin-bottom: 0.5rem;
}
@media (max-width: 900px) {
	article h1 {
		font-size: 2rem;
	}
	.post-body {
		font-size: 1rem;
	}
}
@media (max-width: 900px) {
	.home-grid {
		flex-direction: column;
		gap: 1.5rem;
	}
	.writing-section, .projects-section {
		background: rgba(235, 203, 179, 0.95);
		border-radius: 12px;
		box-shadow: 0 6px 18px rgba(42,30,22,0.06);
		padding: 1.25rem;
		margin-bottom: 1rem;
		cursor: pointer;
	}
	.writing-section > h2, .projects-section > h2 {
		display: flex;
		align-items: center;
		cursor: pointer;
		user-select: none;
		margin: 0;
	}
	.writing-section > h2::after, .projects-section > h2::after {
		content: "\25BC";
		font-size: 1.5rem;
		margin-left: 0.5rem;
		transition: transform 0.3s;
	}
	.writing-section.active > h2::after, .projects-section.active > h2::after {
		transform: rotate(180deg);
	}
	.writing-columns, .projects-list {
		max-height: 0;
		overflow: hidden;
		transition: max-height 0.3s ease;
	}
	.writing-section.active .writing-columns,
	.projects-section.active .projects-list {
		max-height: 2000px;
		transition: max-height 0.5s ease;
	}
	.writing-columns {
		flex-direction: column;
		gap: 1rem;
	}
	.writing-sub > h3 {
		display: flex;
		align-items: center;
		cursor: pointer;
		user-select: none;
		margin: 0;
		font-size: 1.4rem;
		font-weight: 700;
		margin-bottom: 1rem;
	}
	.writing-sub > h3::after {
		content: "\25BC";
		font-size: 1.2rem;
		margin-left: 0.5rem;
		transition: transform 0.3s;
	}
	.writing-sub.active > h3::after {
		transform: rotate(180deg);
	}
	.writing-list {
		max-height: 0;
		overflow: hidden;
		transition: max-height 0.3s ease;
	}
	.writing-sub.active .writing-list {
		max-height: 1500px;
		transition: max-height 0.5s ease;
	}
	.writing-card, .project-card {
		text-align: left;
	}
}
