/* ============================================
   CSS Reset & Base Styles
   ============================================ */

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

/* Minimalist reset */
* {
	padding: 0;
	margin: 0;
	font-size: 1rem;
}

/* ============================================
   Typography
   ============================================ */

body {
	font-family: ui-monospace, Menlo, Monaco, "Cascadia Mono", "Segoe UI Mono",
		Consolas, "Liberation Mono", "Roboto Mono", "Oxygen Mono",
		"Ubuntu Monospace", "Source Code Pro", "Droid Sans Mono",
		"Lucida Console", "Courier New", monospace;
	line-height: 1.5;
	background-color: #2b2b2b;
	color: #d4d4d4;
	padding: 2rem;
	margin: 0 auto;
	max-width: 50rem;
}

/* Prevent text overflow */
p,
h1,
h2,
h3,
h4,
h5,
h6 {
	overflow-wrap: break-word;
}

h1 {
	font-size: 1.5rem;
}

h2 {
	border-top: solid 0.1rem;
	padding-top: 2rem;
}

h2 a {
	font-size: 1.5rem;
	text-decoration: none;
}

h3 {
	font-style: italic;
	padding-top: 2rem;
}

/* ============================================
   Links
   ============================================ */

a {
	color: inherit;
}

a:hover,
a:focus {
	color: #2b2b2b;
	background-color: #d4d4d4;
}

/* ============================================
   Media Elements
   ============================================ */

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

p,
img {
	padding-top: 1rem;
}

/* ============================================
   Lists
   ============================================ */

li {
	list-style-type: square;
	margin-left: 1rem;
}

/* ============================================
   Tables
   ============================================ */

table {
	border-collapse: collapse;
	margin: 1rem 0;
	line-height: 1.2;
}

table,
th,
td {
	border: 0.1rem solid;
	padding: 0.1rem 0.5rem;
}

th {
	vertical-align: bottom;
}

/* ============================================
   Layout
   ============================================ */

section {
	padding-bottom: 2rem;
}

footer {
	padding-top: 5rem;
	text-align: right;
	color: #999999;
}

footer a:hover,
footer a:focus {
	background-color: white;
}

/* ============================================
   Responsive Design
   ============================================ */

@media (max-width: 600px) {
	body {
		padding: 0.5rem;
	}
}

/* ============================================
   Color Modules (Section Themes)
   Using CSS custom properties for maintainability
   ============================================ */

/* Define theme colors */
.module-a { --theme-color: rgb(216, 212, 178); }  /* Warm Beige */
.module-b { --theme-color: rgb(150, 173, 252); }  /* Light Blue */
.module-c { --theme-color: rgb(168, 242, 154); }  /* Light Green */
.module-d { --theme-color: rgb(217, 163, 71); }   /* Golden Orange */
.module-e { --theme-color: rgb(185, 135, 220); }  /* Purple */

/* Apply theme color to all modules */
[class^="module-"] {
	color: var(--theme-color);
}

[class^="module-"] a:hover,
[class^="module-"] a:focus {
	background-color: var(--theme-color);
}

/* ============================================
   Utility Classes
   ============================================ */

.faded {
	opacity: 0.5;
}

/* Inline faded text without extra padding */
.faded-inline {
	opacity: 0.5;
	display: inline;
	padding-top: 0;
}

.text-right {
	text-align: right;
}

.text-center {
	text-align: center;
}

.rotate-text {
	transform: rotate(180deg);
	writing-mode: vertical-rl;
	text-align: left;
}

.image-filter {
	filter: sepia(100%) hue-rotate(190deg) saturate(300%);
}
