/* Sets the maximum width so that the text boxes don't snap to the screen width on mobile */
*, *::before, *::after {
    box-sizing: border-box;
}

:root {
	--bg-color: #282828;
	--amber: #ffb000;
	--amber-link: #ffcc00;
	--amber-glow: rgba(255, 176, 0, 0.3);
}

header, footer {
    display: flex;
    flex-direction: column; /* Stacks items vertically */
    align-items: center;    /* Centers them horizontally */
}

body {
	background-color: var(--bg-color);
	color: var(--amber);
	/*text-shadow: 0 0 5px var(--amber-glow);*/
	font-family: 'Courier New', monospace;
	margin: 0;
	padding: 20px;
}

img {
	max-width: 100%;
	height: auto;
	display: block;
	margin: 15px auto; /* For image centering. */
}

.project-dithered-image {
	width: 100%;
	max-width: 420px;
	height: auto;
	/*image-rendering: pixelated;
	image-rendering: crisp-edges;*/
}

pre {
	background-color: rgba(0, 0, 0, 0.3); /* Dark terminal background */
	border: 1px solid var(--amber);
	padding: 15px;
	overflow-x: auto; /* Adds a clean scrollbar only when code is too wide */
	max-width: 100%;
	white-space: pre; /* Keeps code formatting intact */
	
	/* --- ADD THESE LINES TO CUSTOMIZE THE SCROLLBAR --- */
	scrollbar-width: thin; /* Makes it slim in Firefox */
	scrollbar-color: var(--amber) rgba(0, 0, 0, 0.5); /* Thumb color, track color in Firefox */
}

/* For Chrome, Edge, and Safari */
pre::-webkit-scrollbar {
    height: 6px; /* Slim height for horizontal scrollbar */
}

pre::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.5); /* Dark background for the track */
}

pre::-webkit-scrollbar-thumb {
    background: var(--amber); /* Amber thumb */
    border-radius: 0px; /* Keeps it blocky and terminal-like */
}

pre::-webkit-scrollbar-thumb:hover {
    background: #ffcc00; /* Slightly brighter amber on hover */
}

code {
	font-family: 'Courier New', monospace;
	color: var(--amber);
}

/* Flexbox Layout */
.layout-container {
	display: flex;
	gap: 20px;
	margin-top: 20px;
	align-items: flex-start; /* Prevents the sidebar from stretching to match the main height */
}

.sidebar {
	flex: 1 0 auto; /* Stop it from growing relative to the main */
	border: 2px solid var(--amber);
	padding: 15px;
}

.content {
	flex: 3; /* Main content takes 3 parts */
	min-width: 0;
	border: 2px solid var(--amber);
	padding: 15px;
}

/*.sidebar, .content {
	border: 2px solid var(--amber);
	padding: 15px;
	box-shadow: 
        	inset 0 0 5px var(--amber-glow), 
		0 0 10px var(--amber-glow);
}
*/

/* Retro styling */
header h1 {
	border-bottom: 2px solid var(--amber);
	padding-bottom: 10px;
	/*text-shadow: 0 0 5px var(--amber-glow);*/
}

a {
	color: var(--amber);
	/*text-decoration: none;*/
	padding: 2px 4px;
	transition: all 0.3s ease;
}

main a:visited {
	color: var(--amber-link);
}

nav a {
	display: block;
	color: var(--amber);
	text-decoration: none;
	margin-bottom: 10px;
	text-transform: uppercase;
}


a:hover {
	background-color: var(--amber) !important;
	color: var(--bg-color) !important;
}

/* Mobile View: Screens narrower than 768px */
@media (max-width: 768px) {
    .layout-container {
        flex-direction: column; /* This stacks the sidebar and content */
    }

    .sidebar, .content {
        width: 100%; /* Make them full width */
        margin-bottom: 20px; /* Add some breathing room between the two */
    }
}
