:root {
	color-scheme: light dark;
}

:root {
	--bg: #ffffff;
	--surface: #f8f9fa;
	--surface-2: rgba(0, 0, 0, 0.08);
	--text: #212529;
	--muted: #5b6472;
	--brand: #3b82f6;
	--brand-2: #8b5cf6;
	--edge-a: var(--brand);
	--edge-b: var(--brand-2);
	--radius: 14px;
}

html[data-theme="light"] {
	--bg: #fcfdff;
	--surface: #ffffff;
	--surface-2: #e8eef7;
	--text: #0f172a;
	--muted: #5b6472;
	--brand: #3b82f6;
	--brand-2: #8b5cf6;
	--edge-a: #3b82f6;
	--edge-b: #8b5cf6;
}

html[data-theme="dark"] {
	--bg: #0b0f14;
	--surface: #0f1720;
	--surface-2: rgba(255, 255, 255, 0.08);
	--text: #e2e8f0;
	--muted: #9aa4b2;
	--brand: #6ea8ff;
	--brand-2: #9b8cff;
	--edge-a: #6ea8ff;
	--edge-b: #9b8cff;
}

@media (prefers-color-scheme: light) {

	html[data-theme="auto"],
	html[data-theme=""] {
		--bg: #fcfdff;
		--surface: #ffffff;
		--surface-2: #e8eef7;
		--text: #0f172a;
		--muted: #5b6472;
		--brand: #3b82f6;
		--brand-2: #8b5cf6;
		--edge-a: #3b82f6;
		--edge-b: #8b5cf6;
	}
}

@media (prefers-color-scheme: dark) {

	html[data-theme="auto"],
	html[data-theme=""] {
		--bg: #0b0f14;
		--surface: #0f1720;
		--surface-2: rgba(255, 255, 255, 0.08);
		--text: #e2e8f0;
		--muted: #9aa4b2;
		--brand: #6ea8ff;
		--brand-2: #9b8cff;
		--edge-a: #6ea8ff;
		--edge-b: #9b8cff;
	}
}

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

html,
body {
	height: 100%;
}

body,
body.bg {
	margin: 0 auto;
	max-width: 1200px;
	padding: 80px 1rem 0;
	font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
	color: var(--text);
	background-color: var(--bg);
	text-align: center;
}

a:focus-visible,
button:focus-visible,
[role="button"]:focus-visible {
	outline: 2px solid var(--edge-a);
	outline-offset: 2px;
	border-radius: .25rem;
}

section {
	scroll-margin-top: 80px;
	margin-top: 4rem;
}

.navbar.bg-surface {
	background-color: var(--surface) !important;
}

.navbar.border-bottom {
	border-bottom: 1px solid var(--surface-2) !important;
}

.navbar .navbar-brand,
.navbar .nav-link {
	color: var(--text) !important;
}

.navbar .nav-link:hover,
.navbar .nav-link:focus {
	color: var(--brand) !important;
}

.navbar .navbar-toggler {
	border-color: color-mix(in oklab, var(--text) 35%, transparent);
}

.navbar .navbar-toggler-icon {
	background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(150,150,150,0.95)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

@media (max-width: 991.98px) {
	.navbar .theme-controls {
		border-top: 1px solid var(--surface-2);
		padding-top: .75rem;
		margin-top: .5rem;
	}

	.navbar .theme-controls .btn.small {
		width: 100%;
	}
}

html[data-theme="light"] .navbar .navbar-toggler-icon,
html[data-theme="auto"] .navbar .navbar-toggler-icon {
	background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(33,37,41,0.95)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.theme-controls {
	display: inline-flex;
	gap: 8px;
	align-items: center;
}

.btn-ghost {
	color: var(--text);
	background: transparent;
	border: 1px solid var(--surface-2) !important;
	border-radius: 12px;
}

.btn-ghost:hover {
	background: var(--surface);
}

.theme-controls .small {
	padding: 6px 10px;
	font-size: 12px;
}

.theme-controls select.btn {
	appearance: none;
	background: transparent;
	border: 1px solid var(--surface-2);
	border-radius: 12px;
	padding: 6px 10px;
	color: var(--text);
}

.theme-controls select.btn:focus {
	outline: 2px solid var(--edge-a);
	outline-offset: 2px;
}

#presentation {
	background-color: var(--surface);
}

#presentation img {
	max-width: 100%;
	height: auto;
}

#presentation h2 {
	margin: 1rem auto;
}

#presentation p {
	text-align: justify;
}

.vip-nfc.card {
	background: var(--surface);
	border: 1px solid var(--surface-2);
	color: var(--text);
}

.vip-nfc .card-title {
	letter-spacing: .2px;
}

.vip-nfc .btn {
	font-weight: 600;
}

.vip-nfc .compatibility {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: .9rem;
	flex-wrap: wrap;
	color: var(--muted);
}

.vip-nfc .compatibility .item {
	display: inline-flex;
	align-items: center;
	gap: .35rem;
	opacity: 1;
}

.vip-nfc .compatibility i {
	font-size: 1.1rem;
	line-height: 1;
}

.text-muted,
.text-body-secondary {
	color: var(--muted) !important;
}

.vip-nfc .compatibility i,
.vip-nfc .compatibility .bi {
	color: inherit;
	opacity: .95;
}

@media (hover: hover) {
	.vip-nfc .btn {
		transition: transform .15s ease, box-shadow .15s ease;
	}

	.vip-nfc .btn:hover,
	.vip-nfc .btn:focus-visible {
		transform: translateY(-1px);
		box-shadow: 0 6px 18px rgba(0, 0, 0, .16);
	}
}

#projects {
	background-color: var(--bg);
}

#projects h2 {
	margin-bottom: 1.5rem;
}

#projects .card-text {
	text-align: justify;
}

#projects .card {
	transition: transform 0.3s ease, box-shadow 0.3s ease;
	background-color: var(--surface);
	color: var(--text);
	border-color: var(--surface-2);
}

@media (hover: hover) {
	#projects .card:hover {
		transform: translateY(-2px);
		box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
	}
}

#projects .card-img-top {
	background-color: color-mix(in oklab, var(--surface) 92%, transparent);
	object-fit: contain;
	height: 200px;
}

#projects .card-footer {
	border-top: unset;
	background-color: unset;
}

#projects .fade-in {
	opacity: 0;
	transform: translateY(20px);
	transition: opacity 0.5s ease, transform 0.5s ease;
}

#projects button[disabled] {
	color: color-mix(in oklab, var(--text) 50%, transparent);
	border-color: var(--surface-2);
}

#projects button[disabled]:hover {
	cursor: not-allowed;
}

.card-meta {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: .5rem;
}

.badge-chip {
	--chip-bg: color-mix(in oklab, var(--surface) 85%, transparent);
	--chip-fg: var(--text);
	--chip-bd: var(--surface-2);
	display: inline-flex;
	align-items: center;
	gap: .4ch;
	padding: .25rem .6rem;
	font-size: .75rem;
	font-weight: 600;
	border-radius: 999px;
	background-color: var(--chip-bg);
	color: var(--chip-fg);
	border: 1px solid var(--chip-bd);
	line-height: 1;
	white-space: nowrap;
}

.badge-chip--alt {
	opacity: .9;
}

@media (hover: hover) {
	.badge-chip {
		transition: background-color .15s ease, box-shadow .15s ease;
	}

	.badge-chip:hover {
		box-shadow: 0 4px 12px rgba(0, 0, 0, .08);
	}
}

#projects .tech-stack {
	text-align: center;
	font-size: .9rem;
	font-weight: 600;
	color: var(--muted);
	margin-top: .5rem;
}

.site-footer {
	background-color: var(--surface);
}

.site-footer a {
	color: var(--brand);
}

.site-footer .text-muted {
	color: var(--muted) !important;
}

.social-links .social-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: .5rem;
	color: inherit;
	text-decoration: none;
	width: 24px;
	height: 24px;
}

@media (pointer: coarse) {
	.social-links .social-link {
		width: 44px;
		height: 44px;
	}
}

.social-links .bi {
	font-size: 1.25rem;
	line-height: 1;
}

@media (hover: hover) {
	.social-links .social-link {
		transition: transform .15s ease, background-color .15s ease, color .15s ease, box-shadow .15s ease;
	}

	.social-links .social-link:hover,
	.social-links .social-link:focus-visible {
		transform: translateY(-1px);
		background-color: color-mix(in oklab, var(--brand) 15%, transparent);
		box-shadow: 0 4px 14px rgba(0, 0, 0, .08);
	}
}

.footer-badges img {
	display: block;
	height: 46px;
	width: auto;
	border-radius: .25rem;
}

#badge-abuseip {
	border-radius: 5px;
	border-top: 5px solid #058403;
	border-right: 5px solid #111;
	border-bottom: 5px solid #111;
	border-left: 5px solid #058403;
	background: #35c246 linear-gradient(rgba(255, 255, 255, 0), rgba(255, 255, 255, .3) 50%, rgba(0, 0, 0, .2) 51%, rgba(0, 0, 0, 0));
}

#badge-cssvalidator {
	width: 88px;
	height: 31px;
}

@media (hover: hover) {
	.footer-badges a:hover img {
		transform: translateY(-1px);
		box-shadow: 0 6px 18px rgba(0, 0, 0, .12);
	}

	.footer-badges img {
		transition: transform .2s ease, box-shadow .2s ease;
	}
}

.btn-outline-primary {
	color: var(--brand);
	border-color: var(--brand);
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
	background-color: var(--brand);
	border-color: var(--brand);
	color: #0b0f14;
}

.btn-outline-secondary {
	color: var(--text);
	border-color: var(--surface-2);
}

.btn-outline-secondary.disabled,
.btn-outline-secondary:disabled {
	color: color-mix(in oklab, var(--text) 60%, transparent);
	border-color: var(--surface-2);
}

@media (prefers-reduced-motion: reduce) {
	* {
		animation: none !important;
		transition: none !important;
	}

	#projects .fade-in {
		opacity: 1;
		transform: none;
	}
}

html[data-theme="dark"] .theme-controls select.btn {
	background-color: color-mix(in oklab, var(--surface) 96%, transparent);
	color: var(--text);
}

html[data-theme="dark"] .theme-controls select.btn option,
html[data-theme="dark"] .theme-controls select.btn optgroup {
	background-color: var(--surface) !important;
	color: var(--text) !important;
}

html[data-theme="dark"] .theme-controls select.btn:focus {
	background-color: color-mix(in oklab, var(--surface) 96%, transparent);
	color: var(--text);
	outline: 2px solid var(--edge-a);
	outline-offset: 2px;
}

html[data-theme="dark"] .theme-controls select.btn {
	color-scheme: dark;
}