/* ===== base ===== */

:root {
	--bg: #e0e0e0;
	--text: #111;
	--subtext: #555;
	--accent: #4d5eb7;
	--border: #ccc;
	--max-width: 900px;
	/* New variable for code block background */
	--code-bg: #eeeeee;
}

html {
	scroll-behavior: smooth;
}

body {
	background: var(--bg);
	color: var(--text);
	/* Readability Improvement: Increased base font size */
	font-family: "JetBrains Mono", monospace;
	font-size: 1.05em; /* Slightly larger base font */
	max-width: var(--max-width);
	margin: 40px auto;
	padding: 0 20px;
	line-height: 1.6;
	box-shadow: 10px 0px 0px rgba(0, 0, 0, 0.05); /* Very light shadow */
}

/* Global Link Styles */
a {
	color: var(--accent);
	text-decoration: none;
}

a:hover {
	text-decoration: underline;
}
/* Styling for Automated Devlog List */
.devlog-title {
	/* Ensures the title takes up available space */
	display: inline-block;
}

.devlog-meta {
	/* Use flex or position to push date right, or float */
	float: right;
	color: var(--subtext);
	font-size: 0.9em; /* Smaller than title */
}

/* Clear the float after the list item */
ul li::after {
	content: "";
	display: table;
	clear: both;
}

/* Make sure the link itself is display: block for better hit area */
aside ul li a {
	display: block;
	padding: 2px 0; /* Add slight padding for separation */
}
/* General Content Spacing */
p,
ul,
ol,
pre,
blockquote,
hr {
	margin: 1.2em 0; /* Improved vertical rhythm */
}

/* Add this to your style.css */
.tech-stack {
	/* Use Grid to organize terms (dt) and descriptions (dd) */
	display: grid;
	grid-template-columns: 120px 1fr; /* Adjust the 120px width as needed */
	gap: 0.5em 1em; /* Vertical and horizontal spacing */
	margin: 1em 0;
}

.tech-stack dt {
	font-weight: bold;
	/* Optional: Ensure terms align nicely */
	text-align: right;
	padding-right: 1em;
}

.tech-stack dd {
	margin: 0; /* Remove default margin */
}
/* ===== header ===== */
.flex-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 20px;
}

.header-banner {
	width: 80px;
	height: auto;
	border: 1px solid var(--border);
	border-radius: 4px;
}

header {
	border-bottom: 1px solid var(--border);
	padding-bottom: 12px;
	margin-bottom: 32px;
}

header h1 {
	margin: 0;
	font-size: 1.8em;
}

header p {
	color: var(--subtext);
	margin: 6px 0 12px 0;
}

nav {
	margin-top: 8px;
}

nav a {
	color: var(--accent);
	text-decoration: none;
	margin-right: 14px;
}

nav a:hover {
	text-decoration: underline;
}

/* ===== main content ===== */
main {
	margin-bottom: 40px;
}

section {
	margin-bottom: 40px;
}

/* Main Article Heading (Used for Title) */
h2 {
	border-bottom: 1px solid var(--border);
	padding-bottom: 4px;
	font-size: 1.6em; /* Increased size for prominence */
	margin-top: 0;
	margin-bottom: 0.5em;
}

/* Sub-Heading (Used for Phases like "Phase 1: ...") */
h3 {
	font-size: 1.3em;
	color: var(--text);
	margin-top: 1.5em;
	margin-bottom: 0.5em;
	/* Visual separator is often done with <hr>, but we can style the header itself */
	/* Or if the MD is `---` we can ensure the <hr> is styled */
}

/* Additional Header Styling (H4, H5, H6) */
h4 {
	font-size: 1.1em;
	color: var(--subtext);
	margin-top: 1.2em;
}

h5,
h6 {
	font-size: 1em;
	color: var(--subtext);
	font-style: italic;
	margin-top: 1em;
}

/* Style for the <hr> generated by markdown */
hr {
	border: 0;
	border-top: 1px solid var(--border);
	margin: 1.5em 0;
}

/* Article Meta (Date) */
.meta {
	color: var(--subtext);
	font-size: 0.9em;
	margin-top: 0;
	margin-bottom: 1.5em;
}

/* List Styles (Used on index/project pages) */
ul {
	list-style: none;
	padding: 0;
	margin: 10px 0;
}

ul li {
	margin-bottom: 8px;
}

ul li a {
	color: var(--text);
	text-decoration: none;
}

ul li a:hover {
	color: var(--accent);
	text-decoration: underline;
}

/* Blockquote Styling */
blockquote {
	border-left: 4px solid var(--accent);
	padding-left: 15px;
	color: var(--subtext);
	margin-left: 0;
	font-style: italic;
}

/* ===== Code Block Styling (codehilite output) ===== */

/* Inline Code */
:not(pre) > code {
	background-color: var(--code-bg);
	padding: 2px 6px;
	border-radius: 3px;
	font-size: 0.9em;
	color: var(--text);
}

/* Block Code (<pre>) */
.codehilite {
	background-color: var(--code-bg);
	padding: 15px;
	border-radius: 6px;
	overflow-x: auto; /* Ensures code blocks are scrollable horizontally */
	font-size: 0.9em;
	line-height: 1.4;
}

.codehilite pre {
	margin: 0; /* Remove default margin for <pre> inside .codehilite */
}

/* Optional: Faint border around images */
main img {
	max-width: 100%;
	height: auto;
	display: block;
	margin: 1.5em auto;
	border: 1px solid var(--border);
	border-radius: 4px;
}

/* ===== layout grid (index use) ===== */
.grid {
	display: grid;
	gap: 40px;
}

@media (min-width: 800px) {
	.grid {
		grid-template-columns: 2fr 1fr;
	}
}

@media (max-width: 930px) {
	/* Adjust to max-width + padding */
	body {
		box-shadow: none; /* Hide shadow on smaller screens */
	}
}

/* ===== footer ===== */
footer {
	border-top: 1px solid var(--border);
	margin-top: 40px;
	margin-bottom: 40px;
	padding-top: 10px;
	padding-bottom: 20px;
	font-size: 0.9em;
	color: var(--subtext);
	text-align: center;
}

/* ===== optional watermark ===== */
body.watermark {
	background-image: url("data:image/svg+xml;utf8,\
  <svg xmlns='http://www.w3.org/2000/svg' width='400' height='200'>\
  <text x='50%' y='50%' dominant-baseline='middle' text-anchor='middle'\
  fill='rgba(0,0,0,0.04)' font-family='JetBrains Mono' font-size='42'>pytgion</text></svg>");
	background-repeat: no-repeat;
	background-position: center center;
	background-attachment: fixed;
}
