/* Accent colors */
:root {
	--accent: #1abc9c; /* teal accent */
	--accent-hover: #16967f;

	--link-dark: #58a6ff;         /* accessible blue (dark mode) */
	--link-dark-visited: #9d77ff; /* accessible purple (dark mode) */
	--link-light: #0a58ca;        /* accessible blue (light mode) */
	--link-light-visited: #5a32a3;/* accessible purple (light mode) */

	--btn-dark: #0f766e;          /* dark mode button bg (AA with white) */
	--btn-dark-hover: #115e59;
	--btn-light: #0a58ca;         /* light mode button bg (AA with white) */
	--btn-light-hover: #084298;
	--btn-text: #ffffff;

	--bg-dark: #0d1117;
	--bg-light: #f5f7fa;
	--text-dark: #111;
	--text-light: #fefefe;
}

/* Base */
html {
	font-family: system-ui, -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif;
	font-size: 16px;
	line-height: 1.6;
	background-color: var(--bg-dark);
	color: var(--text-light);
}

body {
	margin: 0;
	padding: 0;
}

.container {
	max-width: 60rem;
	padding: 1.5rem;
	margin: 0 auto;
}

/* Headings with accent underline */
h1, h2 {
	line-height: 1.2;
	margin-top: 2rem;
	margin-bottom: 1rem;
	position: relative;
}
h1::after, h2::after {
	content: "";
	display: block;
	width: 3rem;
	height: 3px;
	background: var(--accent);
	margin-top: 0.5rem;
	border-radius: 2px;
}

h1 {
	font-size: clamp(1.75rem, 2.5vw, 2.5rem);
	font-weight: 700;
}
h2 {
	font-size: clamp(1.25rem, 2vw, 1.75rem);
	font-weight: 600;
}

/* Paragraphs & lists */
p, li {
	margin-bottom: 1rem;
	max-width: 65ch;
}

/* Navigation & links */
nav ul {
	list-style: none;
	padding: 0;
	margin: 0 0 2rem 0;
}
a {
	color: var(--link-dark);
}
a:visited {
	color: var(--link-dark-visited);
}
a:hover,
a:focus {
	color: var(--accent);
}

/* Forms */
form {
	display: flex;
	flex-direction: column;
	gap: 1rem;
	margin-top: 1.5rem;
	background-color: rgba(255,255,255,0.05);
	padding: 1.5rem;
	border-radius: 0.5rem;
}
fieldset {
	border: 1px solid #666;
	padding: 1rem;
	border-radius: 0.25rem;
}
legend {
	font-weight: bold;
	margin-bottom: 0.5rem;
}
label {
	margin-top: 0.5rem;
}

input, select, button {
	font: inherit;
	padding: 0.6rem 0.75rem;
	border-radius: 0.4rem;
	border: 1px solid #444;
	background-color: #111;
	color: var(--text-light);
}
input:focus, select:focus {
	outline: none;
	border-color: var(--accent);
	box-shadow: 0 0 0 2px var(--accent); /* visible focus ring */
}

/* Buttons */
button {
	background-color: var(--btn-dark);
	color: var(--btn-text);
	border: none;
	cursor: pointer;
	font-weight: 600;
	padding: 0.75rem 1.25rem;
	max-width: 20rem;
	margin-top: 1rem;
	border-radius: 0.4rem;
}
button:hover,
button:focus {
	background-color: var(--btn-dark-hover);
}

/* Footer */
footer {
	text-align: center;
	margin: 3rem 0 1rem 0;
	font-size: 0.875rem;
	color: #aaa;
}

/* Responsive */
@media (max-width: 768px) {
	.container {
		padding: 1rem;
	}
	button {
		width: 100%;
	}
}

/* Light mode */
@media (prefers-color-scheme: light) {
	html {
		background-color: var(--bg-light);
		color: var(--text-dark);
	}
	form {
		background-color: rgba(0,0,0,0.05);
	}
	a {
		color: var(--link-light);
	}
	a:visited {
		color: var(--link-light-visited);
	}
	input, select {
		background-color: #fff;
		color: var(--text-dark);
		border: 1px solid #666;
	}
	button {
		background-color: var(--btn-light);
		color: var(--btn-text);
	}
	button:hover,
	button:focus {
		background-color: var(--btn-light-hover);
	}
	footer {
		color: #555;
	}
}
