/*

Theme Name: Sediment Theme
Theme URI: https://sediment.blog
Author: Anonymous
Description: A minimalist Wordpress theme.
Version 1.0

*/

/* ==========================================================================
   1. CSS Reset / Base
   ========================================================================== */

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

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
}

body,
h1, h2, h3, h4, h5, h6,
p, figure, blockquote, dl, dd {
	margin: 0;
}

ul[class],
ol[class] {
	margin: 0;
	padding: 0;
	list-style: none;
}

img,
picture {
	max-width: 100%;
	display: block;
}

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

a {
	text-decoration: none;
}

/* ==========================================================================
   2. Variables
   ========================================================================== */

:root {
	/* Colors: dark grey on white, minimal accent */
	--color-bg: #ffffff;
	--color-text: #333333;
	--color-text-light: #5a5a5a;
	--color-heading: #222222;
	--color-border: #e0e0e0;
	--color-link: #333333;
	--color-link-hover: #000000;
	--color-accent: #666666;

	/* Typography */
	--font-body: "Merriweather", Georgia, serif;
	--font-heading: "Merriweather", Georgia, serif;
	--font-mono: "Roboto Mono", monospace;
	--font-size-base: 1.125rem;
	--line-height-base: 1.7;

	/* Layout */
	--content-width: 80%;
	--content-max-width: 1100px;
	--wide-width: 80%;
	--wide-max-width: 1300px;
	--spacing-unit: 1.5rem;
}

/* ==========================================================================
   3. Base / Typography
   ========================================================================== */

html {
	font-size: 16px;
}

body {
	background-color: var(--color-bg);
	color: var(--color-text);
	font-family: var(--font-body);
	font-size: var(--font-size-base);
	line-height: var(--line-height-base);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
	font-family: var(--font-heading);
	color: var(--color-heading);
	line-height: 1.3;
	font-weight: 600;
	margin-bottom: 0.75em;
}

h1 { font-size: 2.25rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.4rem; }
h4 { font-size: 1.15rem; }
h5, h6 { font-size: 1rem; }

p {
	margin-bottom: var(--spacing-unit);
}

a {
	color: var(--color-link);
	border-bottom: 1px solid var(--color-border);
	transition: color 0.15s ease, border-color 0.15s ease;
}

a:hover,
a:focus {
	color: var(--color-link-hover);
	border-bottom-color: var(--color-link-hover);
}

blockquote {
	border-left: 3px solid var(--color-border);
	padding-left: var(--spacing-unit);
	margin: var(--spacing-unit) 0;
	color: var(--color-text-light);
	font-style: italic;
}

code, pre {
	font-family: "SFMono-Regular", Consolas, Menlo, monospace;
	font-size: 0.9em;
	background-color: #f5f5f5;
	border-radius: 4px;
}

code {
	padding: 0.15em 0.4em;
}

pre {
	padding: 1em;
	overflow-x: auto;
	margin-bottom: var(--spacing-unit);
}

pre code {
	background: none;
	padding: 0;
}

hr {
	border: none;
	border-top: 1px solid var(--color-border);
	margin: 2rem 0;
}

/* ==========================================================================
   4. Layout
   ========================================================================== */

.site {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
}

.site-content {
	flex: 1 0 auto;
	width: var(--content-width);
	max-width: var(--content-max-width);
	margin: 0 auto;
	padding: 2rem 0;
}

.wide-content {
	width: var(--wide-width);
	max-width: var(--wide-max-width);
}

/* ==========================================================================
   5. Header
   ========================================================================== */

.site-header {
	border-bottom: 1px solid var(--color-border);
	padding: 1.5rem 0;
}

.site-header-inner {
	width: var(--content-width);
	max-width: var(--content-max-width);
	margin: 0 auto;
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 1.5rem;
}

.site-branding {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	border-bottom: none;
	color: var(--color-heading);
	line-height: 1.3;
}

.site-icon {
	width: 36px;
	height: 36px;
	object-fit: contain;
	flex-shrink: 0;
}

.site-branding-text {
	display: flex;
	flex-direction: column;
}

.site-branding:hover,
.site-branding:focus {
	color: var(--color-heading);
	border-bottom: none;
}

.site-title {
	font-size: 1.5rem;
	font-weight: 600;
}

.site-title,
.site-description {
	font-family: var(--font-mono);
}

.site-branding:hover .site-title {
	color: var(--color-link-hover);
}

.site-description {
	color: var(--color-text-light);
	font-size: 0.95rem;
	font-weight: 400;
}

.main-navigation {
	flex: 1;
}

.main-navigation ul {
	display: flex;
	justify-content: flex-end;
	align-items: center;
	gap: 2rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.main-navigation li {
	list-style: none;
}

.main-navigation a {
	border-bottom: none;
	color: var(--color-heading);
	font-size: 1rem;
	font-weight: 600;
	letter-spacing: 0.02em;
	position: relative;
	padding-bottom: 2px;
}

.main-navigation a::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: -2px;
	height: 2px;
	background-color: var(--color-heading);
	transform: scaleX(0);
	transform-origin: left;
	transition: transform 0.15s ease;
}

.main-navigation a:hover {
	color: var(--color-link-hover);
}

.main-navigation a:hover::after,
.main-navigation a:focus::after {
	transform: scaleX(1);
}

/* ==========================================================================
   5b. Search
   ========================================================================== */

.site-search {
	position: relative;
	margin-left: 2rem;
}

.search-form {
	display: flex;
	align-items: center;
	border: 1px solid var(--color-border);
	border-radius: 999px;
	padding: 0.35rem 0.5rem 0.35rem 1rem;
	transition: border-color 0.15s ease;
}

.search-form:focus-within {
	border-color: var(--color-accent);
}

.search-field {
	border: none;
	outline: none;
	font-size: 0.9rem;
	width: 160px;
	max-width: 40vw;
	background: transparent;
	color: var(--color-text);
}

.search-field::placeholder {
	color: #999999;
}

.search-submit {
	display: flex;
	align-items: center;
	justify-content: center;
	background: none;
	border: none;
	padding: 0.35rem;
	margin: 0;
	color: var(--color-text-light);
	cursor: pointer;
	border-radius: 50%;
	transition: color 0.15s ease, background-color 0.15s ease;
}

.search-submit:hover {
	color: var(--color-heading);
	background-color: #f2f2f2;
}

.search-results-dropdown {
	position: absolute;
	top: calc(100% + 0.5rem);
	right: 0;
	width: 340px;
	max-width: min(90vw, 400px);
	background-color: var(--color-bg);
	border: 1px solid var(--color-border);
	border-radius: 8px;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
	z-index: 50;
	overflow: hidden;
}

.search-results-list {
	list-style: none;
	margin: 0;
	padding: 0;
	max-height: 360px;
	overflow-y: auto;
}

.search-result-item {
	border-bottom: 1px solid var(--color-border);
}

.search-result-item:last-child {
	border-bottom: none;
}

.search-result-item a {
	display: flex;
	flex-direction: column;
	gap: 0.15rem;
	padding: 0.75rem 1rem;
	border-bottom: none;
	color: var(--color-text);
}

.search-result-item a:hover {
	background-color: #fafafa;
}

.search-result-type {
	font-size: 0.7rem;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--color-text-light);
}

.search-result-title {
	font-size: 0.95rem;
	font-weight: 600;
	color: var(--color-heading);
}

.search-result-excerpt {
	font-size: 0.82rem;
	color: var(--color-text-light);
	line-height: 1.4;
}

.search-no-results {
	padding: 1rem;
	margin: 0;
	font-size: 0.9rem;
	color: var(--color-text-light);
}

.search-see-all {
	display: block;
	text-align: center;
	padding: 0.65rem;
	font-size: 0.85rem;
	font-weight: 600;
	border-bottom: none;
	border-top: 1px solid var(--color-border);
	color: var(--color-heading);
}

.search-see-all:hover {
	background-color: #fafafa;
	border-bottom: none;
}

/* Full search results page */
.search-results-page .search-result-type {
	margin-bottom: 0.25rem;
}

.page-header.archive-title span {
	font-weight: 600;
	color: var(--color-heading);
}

/* ==========================================================================
   6. Posts / Articles
   ========================================================================== */

.post,
article {
	margin-bottom: 3rem;
	padding-bottom: 3rem;
	border-bottom: 1px solid var(--color-border);
}

.post:last-child,
article:last-child {
	border-bottom: none;
}

.entry-title {
	font-size: 1.75rem;
	margin-bottom: 0.5rem;
}

.entry-title a {
	border-bottom: none;
	color: var(--color-heading);
}

.post-header {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 1rem;
	margin-bottom: 1.5rem;
}

.single .entry-title {
	font-size: 2.25rem;
	margin-bottom: 0;
}

.post-date {
	font-size: 0.9rem;
	font-weight: 400;
	color: var(--color-text-light);
	white-space: nowrap;
}

.entry-meta {
	color: var(--color-text-light);
	font-size: 0.9rem;
	margin-bottom: 1.25rem;
}

.entry-meta a {
	color: var(--color-text-light);
}

.entry-content {
	font-size: var(--font-size-base);
}

.entry-content img {
	margin: 1.5rem 0;
	border-radius: 4px;
}

.entry-footer {
	margin-top: 1.5rem;
	font-size: 0.9rem;
	color: var(--color-text-light);
}

/* Archive listing */
.archive-title,
.page-title {
	font-size: 1.5rem;
	margin-bottom: 2rem;
	padding-bottom: 1rem;
	border-bottom: 1px solid var(--color-border);
}

.recent-posts {
	margin-top: 3rem;
}

.recent-posts.grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 2rem;
}

.recent-posts.list {
	display: block;
}

.recent-posts.grid article {
	border-bottom: none;
	padding-bottom: 0;
	margin-bottom: 0;
}


@media (max-width: 900px) {

	.recent-posts.grid {
		grid-template-columns: 1fr;
	}

}

/* ==========================================================================
   7. Pagination
   ========================================================================== */

.pagination,
.nav-links {
	display: flex;
	justify-content: space-between;
	margin: 2rem 0;
	font-size: 0.95rem;
}

.pagination a,
.nav-links a {
	border-bottom: none;
	color: var(--color-text);
}

.pagination a:hover,
.nav-links a:hover {
	color: var(--color-link-hover);
}

.pagination,
.nav-links {
	display: flex;
	justify-content: space-between;
	margin: 2rem 0;
	font-size: 0.95rem;
}

/* ==========================================================================
   8. Comments
   ========================================================================== */

.comments-area {
	margin-top: 3rem;
	padding-top: 2rem;
	border-top: 1px solid var(--color-border);
}

.comment-list {
	margin-bottom: 2rem;
}

.comment {
	margin-bottom: 1.5rem;
	padding-bottom: 1.5rem;
	border-bottom: 1px solid var(--color-border);
}

.comment-author {
	font-weight: 600;
	font-size: 0.95rem;
}

.comment-metadata {
	font-size: 0.85rem;
	color: var(--color-text-light);
	margin-bottom: 0.5rem;
}

/* ==========================================================================
   9. Forms / Buttons
   ========================================================================== */

input[type="text"],
input[type="email"],
input[type="url"],
input[type="search"]:not(.search-field),
textarea {
	width: 100%;
	padding: 0.6rem 0.8rem;
	border: 1px solid var(--color-border);
	border-radius: 4px;
	background-color: var(--color-bg);
	color: var(--color-text);
}

input:focus,
textarea:focus {
	outline: none;
	border-color: var(--color-accent);
}

button,
input[type="submit"] {
	display: inline-block;
	padding: 0.6rem 1.25rem;
	background-color: var(--color-heading);
	color: var(--color-bg);
	border: none;
	border-radius: 4px;
	cursor: pointer;
	font-size: 0.95rem;
	transition: background-color 0.15s ease;
}

button:hover,
input[type="submit"]:hover {
	background-color: #000000;
}

/* ==========================================================================
   10. Footer
   ========================================================================== */

.site-footer {
	border-top: 1px solid var(--color-border);
	padding: 1.5rem 0;
	color: var(--color-text-light);
	font-size: 0.9rem;
}

.site-footer-inner {
	width: var(--content-width);
	max-width: var(--content-max-width);
	margin: 0 auto;
	text-align: center;
}

.footer-navigation {
	display: flex;
	justify-content: center;
	gap: 1.5rem;
	flex-wrap: wrap;
}

.footer-navigation a {
	border-bottom: none;
	color: var(--color-text-light);
	font-size: 0.9rem;
}

.footer-navigation a:hover {
	color: var(--color-heading);
}

/* ==========================================================================
   11. Utilities
   ========================================================================== */

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

/* ==========================================================================
   12. Responsive
   ========================================================================== */

/* Tablet */
@media (max-width: 768px) {
	html {
		font-size: 15px;
	}

	h1 { font-size: 1.85rem; }
	h2 { font-size: 1.5rem; }
	h3 { font-size: 1.25rem; }

    .site-header-inner {
        display: flex;
        justify-content: space-between;
    }

	.main-navigation ul {
		gap: 1rem;
        margin-left: auto;
	}

	.site-search {
		margin-left: auto;
		width: 100%;
	}

	.search-form {
		width: 100%;
	}

    .search-field {
        -webkit-appearance: none;
        appearance: none;

        border: none;
        outline: none;
        box-shadow: none;
        border-radius: 0;

        width: 160px;
        max-width: 40vw;
        background: transparent;
        color: var(--color-text);
    }
    .search-field::-webkit-search-decoration,
    .search-field::-webkit-search-cancel-button,
    .search-field::-webkit-search-results-button,
    .search-field::-webkit-search-results-decoration {
        -webkit-appearance: none;
    }

    .search-form .search-field {
        border: none;
        border-radius: 0;
    }

	.search-results-dropdown {
		right: 0;
		left: 0;
		width: 100%;
		max-width: none;
	}
}

/* Mobile */
@media (max-width: 480px) {
	html {
		font-size: 14px;
	}

	.post-header {
		flex-direction: column;
		gap: 0.25rem;
	}

	.site-content,
	.site-header-inner,
	.site-footer-inner {
		width: 90%;
	}

	.site-content {
		padding: 1.5rem 0;
	}

	h1 { font-size: 1.6rem; }
	h2 { font-size: 1.35rem; }

	.pagination,
	.nav-links {
		flex-direction: column;
		gap: 0.75rem;
	}
}