@font-face {
	font-family: 'Pixelon';
	src: url('fonts/Pixelon-OGALo.ttf') format('truetype');
	font-weight: normal;
	font-style: normal;
}
:root {
	--main-border: 0.25em solid #397a96;
	--main-radius: 1.5em;
	--main-padding: 0.25em;
	--main-bg: #cceeff;
	--btn-gradient: linear-gradient(
		0deg,
		rgba(158, 199, 227, 1) 0%,
		rgba(158, 204, 233, 1) 20%,
		rgba(192, 231, 246, 1) 100%
	);
	--btn-solid: rgb(151, 181, 209);
}

body {
	color: #416478;
	background-image: url(img/flowers.webp);
	background-repeat: repeat;
	background-size: 300px;
	background-color: #708363;
	padding: 0;
	margin: 0;
	font-family: 'Pixelon';
	font-weight: 300;
	font-size: 1.20em;
}

strong {
	font-family: 'Pixelon';
	color: #2c4a5c;
	font-weight: 1000;
	font-size: 22px;
	text-decoration: 0.1em underline dashed #7da0a8;
	text-underline-offset: 0.15em;
}

mark {
	font-family: 'Pixelon';
	background-color: transparent;
	font-size: 0.9em;
	color: white;
	border-radius: 5em;
}

.download-button {
	display: inline-block;
	padding: 10px 15px;
	color: #4b6779;
	border-bottom: 0.1em solid #77a8b9;
	background: var(--btn-gradient);
	text-decoration: none;
	border-radius: 8px;
}

.download-button:hover {
	color: #2E4A5C;
	background: linear-gradient(0deg, #9bd0eb 0%, #86bde0 20%, #a5d3f3 100%);
}

.hehe {
	text-decoration: none;
	font-size: 20px;
}

::-webkit-scrollbar { width: 7px; }
::-webkit-scrollbar-track { border-radius: 4em; background: transparent; }
::-webkit-scrollbar-thumb { border-radius: 8em; background: #8fbad3; }
::-webkit-scrollbar-thumb:hover { background: #437183; }

.social-icons {
	display: flex;
	justify-content: center;
	gap: 1rem;
	align-items: center;
	flex-wrap: wrap;
	margin-bottom: 2rem;
}
.social-icon {
	width: 50px;
	height: 50px;
	background-color: #333;
	color: white;
	border-radius: 50%;
	font-size: 1.5rem;
	text-decoration: none;
	display: flex;
	justify-content: center;
	align-items: center;
	position: relative;
	transition: transform 0.2s ease;
}
.social-icon:hover { transform: scale(1.1); }
.tooltip {
	position: absolute;
	top: 0;
	left: 50%;
	transform: translate(-50%, -100%);
	background: inherit;
	color: #fff;
	padding: 0.5rem 1rem;
	border-radius: 40px;
	font-size: 0.75rem;
	font-weight: bold;
	text-transform: uppercase;
	pointer-events: none;
	opacity: 0;
	transition: all 0.3s ease;
	z-index: 1;
}
.social-icon:hover .tooltip { visibility: visible; opacity: 1; transform: translate(-50%, -150%); }
.social-icon:active { box-shadow: 0 1px 3px rgba(0,0,0,0.5) inset; }
.social-icon--codepen   { background: #000;    color: #fff; }
.social-icon--github    { background: #4284c0; color: #fff; }
.social-icon--twitter   { background: #2b97f1; color: #fff; }
.social-icon--dribbble  { background: #ef5a92; color: #fff; }
.social-icon--instagram { background: #527fa6; color: #fff; }
.social-icon--linkedin  { background: #006599; color: #fff; }
.social-icon--facebook  { background: #3b5a9b; color: #fff; }
.social-icon--artstation i { color: #13AFF0; }
.social-icon--kofi i       { color: #29abe0; }

/* ── Main wrapper ── */
.main {
	width: 98vw;
	margin: auto;
}

/* ── Default container grid (gallery, library, projects, contact) ── */
.container {
	padding: 0.5em;
	line-height: 1.2em;
	width: 67vw;
	margin: 1em auto 0 auto;
	display: grid;
	grid-template-columns: 0.75fr 3fr;
	grid-template-rows: repeat(4, auto);
	grid-gap: 0.5em;
	grid-template-areas:
		"banner  banner"
		"side1   main"
		"side1   main"
		"side1   footer";
}

/* ── Labeled header bar ── */
.labeled {
	font-family: 'Pixelon';
	height: 1.5em;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0.25em;
	border-radius: 1.3em 1.3em 0 0;
	object-fit: contain;
	background: linear-gradient(
		165deg,
		rgba(122, 169, 195, 1) 0%,
		rgba(122, 169, 195, 1) 20%,
		rgba(154, 188, 217, 1) 50%,
		rgba(122, 169, 195, 1) 80%,
		rgba(122, 169, 195, 1) 100%
	);
	border-bottom: 1px solid #397a96;
}

.labeled p {
	font-size: 1.2em;
	font-family: 'Pixelon';
	filter: drop-shadow(0px 1px #00364a) drop-shadow(0 -1px #00364a)
		drop-shadow(1px 0 #00364a) drop-shadow(-1px 0 #00364a);
	font-weight: 1000;
	color: white;
	text-align: center;
	margin: 0;
}

/* ── details/summary (used in gallery, projects) ── */
details {
	margin-bottom: 1.5rem;
	padding: 0.5rem;
}
summary {
	cursor: pointer;
	list-style: none;
}
summary::-webkit-details-marker { display: none; }
summary::before {
	content: "▶ ";
	display: inline-block;
	margin-right: 0.5rem;
	transition: transform 0.2s ease;
}
details[open] summary::before { transform: rotate(90deg); }

/* ── Nav ── */
nav {
	display: flex;
	flex-direction: column;
	gap: 0.55em;
	margin-bottom: 0.5em;
	border: none;
	border-radius: 0;
}
nav .nav-panel {
	position: relative;
	overflow: hidden;
	border: var(--main-border);
	border-radius: var(--main-radius);
	background: var(--main-bg);
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.16);
}
nav .nav-panel::after {
	content: "✕";
	position: absolute;
	top: 0.5rem;
	right: .9rem;
	font-size: 0.72rem;
	font-weight: 700;
	line-height: 1;
	font-family: Arial, sans-serif;
	color: #6a90a1;
	text-shadow: 0 0 1px rgba(255,255,255,0.7);
	border: 1px solid rgba(47, 74, 85, 0.45);
	border-radius: 0.18rem;
	padding: 0.05rem 0.16rem;
	background: linear-gradient(145deg, rgba(255,255,255,0.8), rgba(210,225,232,0.45));
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
	pointer-events: none;
}
nav .nav-links {
	display: flex;
	flex-direction: column;
}
nav a {
	font-family: 'Pixelon';
	font-size: 1em;
	font-weight: 1000;
	display: block;
	color: #4b6779;
	border-bottom: 0.1em solid #77a8b9;
	background: var(--btn-gradient);
	text-decoration: none;
}
nav a, .last {
	filter: none;
	border-right: none;
	border-left: none;
	border-top: none;
	text-align: left;
	padding: 0.7em 0 0.7em 0.5em;
}
nav a:hover {
	color: #2E4A5C;
	font-size: 1.05em;
	background: linear-gradient(0deg, #9bd0eb 0%, #86bde0 20%, #a5d3f3 100%);
}
.last {
	border-bottom: none;
}
.last:hover { border-radius: 0; }

/* ── Grid areas ── */
.banner {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0;
	grid-area: banner;
	padding-bottom: 1rem;
}
.banimg { margin: 0 auto; width: 90%; }
.side1  { grid-area: side1; }
.side2  { max-width: 100%; grid-area: side2; }
.stuff  { grid-area: stuff; }

/* ── maininfo: used by gallery, projects, library, contact ── */
.maininfo {
	background-color: var(--main-bg);
	border: var(--main-border);
	border-radius: var(--main-radius);
	grid-area: main;
	overflow: hidden;
}

/* ── contenty boxes ── */
.contenty {
	border-radius: var(--main-radius);
	border: var(--main-border);
	background-color: var(--main-bg);
	margin-bottom: 10px;
}
.contenty p {
	padding: 0.75em;
	text-align: left;
}

.maininfo,
.contenty,
.sidebarcont,
.likes,
.dislikes,
.interests {
	position: relative;
	overflow: visible;
}

.maininfo::after,
.contenty::after,
.sidebarcont::after,
.likes::after,
.dislikes::after,
.interests::after {
	content: "✕";
	position: absolute;
	top: 0.5rem;
	right: .9rem;
	font-size: 0.72rem;
	font-weight: 700;
	line-height: 1;
	font-family: Arial, sans-serif;
	color: #6a90a1;
	text-shadow: 0 0 1px rgba(255,255,255,0.7);
	pointer-events: none;
	border: 1px solid rgba(47, 74, 85, 0.45);
	border-radius: 0.18rem;
	padding: 0.05rem 0.16rem;
	background: linear-gradient(145deg, rgba(255,255,255,0.8), rgba(210,225,232,0.45));
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
}

/* ── Misc ── */
.jobname { font-family: 'Pixelon'; font-weight: 700; font-size: 1.25rem; }
.time    {  font-family: 'Pixelon';font-weight: 300; }

.giffy {
	margin: 0 1em 0 0;
	height: 8em;
	float: right;
}

.gallery-item img, .project-item img { height: 200px; margin: 10px; }
.project-item img { margin: auto; display: flex; justify-content: center; align-items: center; }
.project-item { text-align: center; }

.toast {
	margin: auto;
	height: 10em;
	display: flex;
	justify-content: center;
	align-items: center;
}

p { padding: 0 0.5em; text-align: center; }

.footer {
	text-align: center;
	width: 100%;
	margin: 0;
	grid-area: footer;
	margin-bottom: 1rem;
	font-family: 'Pixelon';
}
.footer p { padding: 0.5em; margin: 0; }

::selection { color: white; background-color: rgb(133, 174, 192); }

.sidebarcont {
	margin: 0 0 0.5em 0;
	border-radius: var(--main-radius);
	border: var(--main-border);
	background: var(--main-bg);
}
.sidebarcont p { text-align: center; }

.gb { max-width: 100%; margin: 0; }
.gb a { text-decoration: none; filter: none; }
.gb img { display: block; border-radius: 1.3em; max-width: 100%; }

.rat { display: block; border-radius: 1.3em; max-width: 200px; }
.cat { display: block; border-radius: 1.3em; max-width: 250px; }

.image-row { display: flex; gap: 1em; }

.textbox {
	overflow-x: hidden;
	overflow-y: auto;
	height: 28em;
	scrollbar-width: thin;
	scrollbar-color: #8fbad3 transparent;
}

/* ── Responsive ── */
@media only screen and (max-width: 850px) {
	body { font-size: 0.8em; }

	.container {
		width: 95% !important;
		grid-template-columns: 0.5fr 1fr;
		grid-template-areas:
			"banner banner"
			"side1  main"
			"side1  main"
			"footer footer";
	}

	.banimg  { width: 100%; }
	.giffy   { height: 4em !important; }
	.toast   { height: 6em !important; }
	.rat     { width: 45%; height: auto; }
	.cat     { width: 50%; height: auto; }
	.footer  { justify-content: center; }
}

/* ══════════════════════════════════════════
   Dark mode
   Toggled by adding/removing .dark-mode on <body>
   (see darkmode.js)
   ══════════════════════════════════════════ */

body.dark-mode {
	--main-bg: #1b2b33;
	--main-border: 0.25em solid #4f93ad;
	--btn-gradient: linear-gradient(
		0deg,
		rgba(45, 74, 92, 1) 0%,
		rgba(52, 84, 102, 1) 20%,
		rgba(63, 100, 120, 1) 100%
	);
	--btn-solid: rgb(58, 92, 110);
	background-color: #2d4047;
	background-blend-mode: multiply;
	color: #cfe8f5;
}

body.dark-mode strong {
	color: #a8dcf0;
	text-decoration-color: #4f93ad;
}

body.dark-mode .labeled {
	background: linear-gradient(
		165deg,
		rgba(45, 74, 92, 1) 0%,
		rgba(45, 74, 92, 1) 20%,
		rgba(58, 92, 110, 1) 50%,
		rgba(45, 74, 92, 1) 80%,
		rgba(45, 74, 92, 1) 100%
	);
	border-bottom: 1px solid #4f93ad;
}

body.dark-mode .card-note,
body.dark-mode .lb-status,
body.dark-mode .lb-caption,
body.dark-mode .lb-loading {
	color: #9fc3d6;
}

body.dark-mode .link,
body.dark-mode .download-button,
body.dark-mode .filter-btn,
body.dark-mode .lb-controls button {
	color: #cfe8f5;
}

body.dark-mode .download-button:hover,
body.dark-mode .filter-btn:hover,
body.dark-mode .filter-btn.active,
body.dark-mode .lb-controls button:hover,
body.dark-mode nav a:hover {
	color: #eaf7ff;
	background: linear-gradient(0deg, #3f6478 0%, #365670 20%, #4a7690 100%);
}

body.dark-mode .lb-box,
body.dark-mode .img-grid figure {
	background: #1b2b33;
	border-color: #4f93ad;
}

body.dark-mode input,
body.dark-mode textarea {
	background-color: #16232a;
	color: #cfe8f5;
	border-color: #4f93ad;
}

body.dark-mode #contact-form button[type="submit"] {
	background-color: #3a5c6e;
	color: #eaf7ff;
}

body.dark-mode #contact-form button[type="submit"]:hover {
	background-color: #4a7690;
}

/* ── Theme toggle button ── */
#theme-toggle {
	position: fixed;
	top: 1em;
	right: 1em;
	z-index: 1000;
	width: 2.75em;
	height: 2.75em;
	border-radius: 50%;
	border: var(--main-border);
	background: var(--btn-gradient);
	font-size: 1.2em;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
	transition: transform 0.2s ease, background 0.2s ease;
}

#theme-toggle:hover {
	transform: scale(1.1);
}

@media only screen and (max-width: 850px) {
	#theme-toggle {
		top: 0.5em;
		right: 0.5em;
		width: 2.4em;
		height: 2.4em;
		font-size: 1em;
	}
}