/* Quotes on Dev - dark theme, green accent */

:root {
	--bg: #0b0f0c;
	--bg-card: #121814;
	--border: #1f2a22;
	--text: #d6e2d8;
	--muted: #7d8f81;
	--accent: #39d353;
	--accent-dim: #1f7a30;
	--mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
	--sans: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

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

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

body.qod {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font-family: var(--sans);
	font-size: 1.0625rem;
	line-height: 1.6;
}

a { color: var(--accent); text-decoration: none; }
a:hover, a:focus { text-decoration: underline; }

/* Header */
.site-header {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	max-width: 62rem;
	margin: 0 auto;
	padding: 1.5rem 1.25rem;
	border-bottom: 1px solid var(--border);
}

.logo {
	font-family: var(--mono);
	font-size: 1.6rem;
	font-weight: 700;
	color: var(--accent);
	letter-spacing: -0.02em;
}
.logo:hover, .logo:focus { text-decoration: none; }

.cursor { animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .cursor { animation: none; } }

.logo em { font-style: italic; font-weight: 400; color: var(--text); }

/* Home page: one big quote */
.is-home .site-header { justify-content: center; padding-top: 3rem; border-bottom: 0; }
.is-home .logo { font-size: clamp(2rem, 7vw, 3.75rem); }

.hero {
	display: grid;
	grid-template-columns: clamp(2.5rem, 10vw, 8rem) minmax(0, 1fr) clamp(2.5rem, 10vw, 8rem);
	align-items: start;
	gap: clamp(0.75rem, 2.5vw, 1.5rem);
	padding: 2rem 0 1rem;
}
.qmark { display: block; }
.qmark svg { display: block; width: 100%; height: auto; fill: var(--accent); }
.qmark-open svg { transform: rotate(180deg); }
.hero-quote { margin: 0; }
.hero-quote p {
	margin: 0;
	font-size: clamp(1.4rem, 3.2vw, 2.25rem);
	line-height: 1.4;
	font-weight: 300;
	color: #fff;
}
.hero-quote footer {
	margin-top: 1.75rem;
	font-size: 1.1rem;
	color: var(--muted);
}
.hero-btn {
	grid-column: 1 / -1;
	justify-self: center;
	margin: 0 0 1.5rem;
	background: transparent;
	color: var(--accent);
	border: 1px solid var(--accent);
	border-radius: 0;
	padding: 0.85rem 2rem;
	font-family: var(--sans);
	font-size: 1.1rem;
	font-weight: 400;
}
.hero-btn:hover, .hero-btn:focus { background: var(--accent); color: var(--bg); filter: none; }
.hero-btn:disabled { opacity: 0.5; cursor: progress; }

@media (max-width: 36rem) {
	.hero {
		grid-template-columns: minmax(0, 1fr) 3.5rem;
		grid-template-areas: "btn btn" "open open" "quote close";
		gap: 0.5rem 0.75rem;
	}
	.hero-btn { grid-area: btn; }
	.qmark-open { grid-area: open; width: 4.5rem; }
	.hero-quote { grid-area: quote; }
	.qmark-close { grid-area: close; width: 3.5rem; align-self: end; justify-self: end; margin: 0; }
	.is-home .site-header { padding: 1.5rem 1.25rem 0; }
	.hero { padding-top: 1rem; }
}

.footer-nav {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0 1rem;
}
.footer-home { margin: 0 0 1rem; }
.footer-nav ul {
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem 1rem;
	margin: 0 0 1rem;
	padding: 0;
	list-style: none;
}
.is-home .site-footer { border-top: 0; text-align: center; }
.is-home .footer-nav { justify-content: center; }
.is-home .footer-nav ul { justify-content: center; }

/* Archives */
.archive-heading {
	font-family: var(--mono);
	font-size: 1rem;
	color: var(--accent);
	margin: 2rem 0 0.75rem;
	padding-bottom: 0.4rem;
	border-bottom: 1px solid var(--border);
}
.archive-list {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem 1.25rem;
	list-style: none;
	margin: 0;
	padding: 0;
}
.archive-list li { white-space: nowrap; }
.archive-back { font-family: var(--mono); font-size: 0.9rem; }

.filter-quote {
	margin: 1.5rem 0;
	padding: 1.75rem 0;
	border-top: 1px solid var(--border);
	border-bottom: 1px solid var(--border);
}
.filter-quote p {
	margin: 0;
	font-size: clamp(1.4rem, 3vw, 2rem);
	line-height: 1.4;
	font-weight: 300;
	color: #fff;
}
.filter-quote footer { margin-top: 1.25rem; color: var(--muted); }

.qod-pager {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1rem;
	font-family: var(--mono);
}
.qod-pager .current { color: var(--text); }

/* Navigation (menu module output) */
.site-nav ul {
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem 1.25rem;
	margin: 0;
	padding: 0;
	list-style: none;
}
.site-nav a {
	font-family: var(--mono);
	font-size: 0.95rem;
	color: var(--muted);
}
.site-nav a:hover,
.site-nav .active > a,
.site-nav .current > a { color: var(--accent); text-decoration: none; }

/* Layout */
.site-body {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 2rem;
	max-width: 62rem;
	margin: 0 auto;
	padding: 2rem 1.25rem;
}
.site-body.has-sidebar { grid-template-columns: minmax(0, 1fr) 16rem; }
@media (max-width: 48rem) {
	.site-body.has-sidebar { grid-template-columns: minmax(0, 1fr); }
}

/* Page headings */
h1, h2, h3 { line-height: 1.25; }
.page-header h1,
.page-header h2 {
	font-family: var(--mono);
	font-size: 1.1rem;
	font-weight: 600;
	color: var(--accent);
	margin: 0 0 0.75rem;
}
.page-header h1::before,
.page-header h2::before { content: "// "; color: var(--accent-dim); }
.page-header h2 a { color: inherit; }

/* Article / quote cards.
   Joomla outputs title (the author) first, then the text (the quote). */
.com-content-article,
.blog-item,
.com-content-category__article,
.item {
	background: var(--bg-card);
	border: 1px solid var(--border);
	border-left: 3px solid var(--accent);
	border-radius: 4px;
	padding: 1.25rem 1.5rem;
	margin: 0 0 1.5rem;
}

.com-content-article__body,
.item-content {
	font-size: 1.35rem;
	line-height: 1.5;
}
.com-content-article__body p,
.item-content p { margin: 0.5rem 0 0; }

.article-info,
.article-info-term { color: var(--muted); font-size: 0.85rem; }
.article-info { font-family: var(--mono); margin: 0.75rem 0 0; }

/* Quote first, author underneath; hide the default metadata block */
.article-info,
.article-info-term { display: none; }

.item-content,
.com-content-article__body {
	display: flex;
	flex-direction: column;
}
.item-content > p,
.item-content > div:not(.page-header):not(.fields-container),
.com-content-article__body > p { order: 1; }
.item-content > .page-header,
.item-content > .item-title,
.com-content-article > .page-header { order: 2; }

.item-title {
	font-family: var(--mono);
	font-size: 1rem;
	font-weight: 600;
	margin: 1rem 0 0;
}
.item-title a { color: var(--accent); }
.item-title::before { content: "\2014  "; color: var(--accent-dim); }
.item-content > .tags,
.item-content > .fields-container { order: 3; }

.page-header h2 {
	font-size: 1rem;
	margin: 1rem 0 0;
}
.page-header h2::before { content: "\2014  "; color: var(--accent-dim); }

/* Tags */
.tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.75rem 0 0; padding: 0; list-style: none; }
.tags a,
.tags .tag-body {
	background: transparent;
	display: inline-block;
	font-family: var(--mono);
	font-size: 0.8rem;
	color: var(--accent);
	border: 1px solid var(--accent-dim);
	border-radius: 3px;
	padding: 0.05rem 0.5rem;
}
.tags a:hover { background: var(--accent); color: var(--bg); text-decoration: none; }

/* Custom fields */
.fields-container { margin: 0.75rem 0 0; padding: 0; list-style: none; color: var(--muted); font-size: 0.9rem; }

/* Forms */
input[type="text"],
input[type="email"],
input[type="url"],
input[type="search"],
textarea,
select {
	width: 100%;
	max-width: 100%;
	background: var(--bg);
	color: var(--text);
	border: 1px solid var(--border);
	border-radius: 3px;
	padding: 0.6rem 0.75rem;
	font: inherit;
}
input:focus, textarea:focus, select:focus {
	outline: 2px solid var(--accent);
	outline-offset: 1px;
}
label { display: block; margin: 1rem 0 0.25rem; color: var(--muted); font-size: 0.9rem; }

button,
.btn,
input[type="submit"] {
	display: inline-block;
	background: var(--accent);
	color: var(--bg);
	border: 0;
	border-radius: 3px;
	padding: 0.6rem 1.25rem;
	font-family: var(--mono);
	font-size: 0.95rem;
	font-weight: 700;
	cursor: pointer;
}
button:hover, .btn:hover, input[type="submit"]:hover { filter: brightness(1.1); text-decoration: none; }

/* System messages */
joomla-alert, .alert {
	display: block;
	margin: 0 0 1.5rem;
	padding: 0.75rem 1rem;
	background: var(--bg-card);
	border: 1px solid var(--accent-dim);
	border-radius: 3px;
	color: var(--text);
}

/* Lists, pagination */
.pagination ul { display: flex; gap: 0.5rem; list-style: none; padding: 0; }
.pagination a, .pagination span { font-family: var(--mono); }

/* Sidebar */
.site-sidebar { font-size: 0.95rem; }
.site-sidebar ul { list-style: none; margin: 0; padding: 0; }
.site-sidebar li { margin: 0 0 0.35rem; }

/* Footer */
.site-footer {
	max-width: 62rem;
	margin: 2rem auto 0;
	padding: 1.5rem 1.25rem 3rem;
	border-top: 1px solid var(--border);
	color: var(--muted);
	font-family: var(--mono);
	font-size: 0.85rem;
}
.site-footer p { margin: 0; }

.error-code { font-family: var(--mono); font-size: 4rem; color: var(--accent); margin: 0; }
