/* --- RESET & BASE --- */
* {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

body {
	font-family: Arial, sans-serif;
	background-color: #F4F1EA;
	color: #1A1A1B;
	line-height: 1.5;
	font-size: 15px;
	-webkit-font-smoothing: antialiased;
	transition: background-color 0.3s, color 0.3s;
	user-select: none;
	/* Image protection */
}

img {
	-webkit-user-drag: none;
}

a {
	color: inherit;
	text-decoration: none !important;
	transition: opacity 0.2s;
}

a:hover {
	opacity: 0.7;
	text-decoration: none !important;
}

strong {
	font-weight: bold;
}

em {
	font-style: italic;
}

/* --- GLOBAL LAYOUT --- */
#app {
	display: flex;
	flex-direction: column;
	align-items: center;
	min-height: 100vh;
	padding: 2rem 1rem;
}

.site-main {
	width: 100%;
	max-width: 60rem;
	display: flex;
	flex-direction: column;
	align-items: center;
}

/* --- HEADER & NAVIGATION --- */
.site-header {
	width: 100%;
	max-width: 60rem;
	margin-bottom: 0.5rem;
}

.top-nav {
	display: flex;
	justify-content: space-between;
	align-items: center;
	/* Forces the text and icon to align horizontally */
	width: 100%;
	font-size: 0.875em;
}

.header-right {
	display: flex;
	align-items: center;
	gap: 1rem;
	/* Creates exact spacing between the toggle and the About link */
}

.theme-wrapper {
    display: flex;
    align-items: center;
    gap: 0.4rem; /* Keeps the bulb and switch visually grouped */
}

/* --- SECTIONS (ROUTING LOGIC) --- */
.site-main section {
	display: none;
	/* Hidden by default */
	width: 100%;
	opacity: 0;
	animation: fadeIn 0.4s ease forwards;
}

.site-main section.active {
	display: flex;
	flex-direction: column;
	align-items: center;
}

@keyframes fadeIn {
	from {
		opacity: 0;
		transform: translateY(5px);
	}

	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.section-desc {
	text-align: center;
	font-size: 0.875em;
	margin-bottom: 1rem;
}

.bottom-nav {
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	gap: 2rem;
	margin-top: 0.5rem;
	font-size: 0.875em;
}

/* --- GALLERY --- */
.gallery-container {
	width: 100%;
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.gallery-main {
	display: flex;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
}

.gallery-main::-webkit-scrollbar {
	display: none;
}

.gallery-main .slide {
	flex: 0 0 100%;
	width: 100%;
	height: 40rem;
	object-fit: contain;
	scroll-snap-align: start;
}

.gallery-thumbs {
	display: flex;
	justify-content: center;
	gap: 10px;
}

.gallery-thumbs .thumb {
	width: 45px;
	height: 45px;
	object-fit: cover;
	cursor: pointer;
	opacity: 0.6;
	filter: grayscale(100%);
	transition: 0.2s ease;
}

.gallery-thumbs .thumb.active,
.gallery-thumbs .thumb:hover {
	opacity: 1;
	filter: grayscale(0%);
}

/* --- INFO SECTION --- */
.about-container {
	width: 100%;
	display: flex;
	flex-direction: column;
	align-items: center;
}

.about-image {
	width: 100%;
	max-height: 40rem;
	object-fit: cover;
	margin-bottom: 0.5rem;
}

.about-text {
	width: 100%;
	max-width: 40rem;
	text-align: center;
	font-size: 0.875em;
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

/* --- FOOTER --- */
.site-footer {
	width: 100%;
	max-width: 60rem;
	display: flex;
	align-items: center;
	justify-content: center;
	/* Snaps copyright text to the absolute center */
	margin-top: 3rem;
	font-size: 0.875em;
	text-align: center;
}

#theme-toggle {
	background: transparent;
	border: none;
	color: inherit;
	cursor: pointer;
	opacity: 0.6;
	display: flex;
	align-items: center;
}

#theme-toggle:hover {
	opacity: 1;
}

#theme-toggle .icon-sun {
	display: none;
}

/* --- DARK MODE --- */
body.dark-mode {
	background-color: #1A1A1B;
	color: #F4F1EA;
}

body.dark-mode #theme-toggle .icon-sun {
	display: block;
}

body.dark-mode #theme-toggle .icon-moon {
	display: none;
}

/* --- MOBILE TWEAKS --- */
@media (max-width: 736px) {
	.gallery-main .slide {
		height: 30rem;
	}

	.about-image {
		height: 30rem;
	}

	.site-footer {
		flex-direction: column;
		gap: 1.5rem;
		font-size: 0.7em;
		align-items: center;
		text-align: center;
	}
}

/* --- THEME SWITCH TOGGLE --- */
/* The surrounding container */
.theme-switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 24px;
}

/* Hide default HTML checkbox */
.theme-switch input {
	opacity: 0;
	width: 0;
	height: 0;
}

/* The slider container background */
.slider {
	position: absolute;
	cursor: pointer;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background-color: #ccc;
	/* "Off" state color (Dark Mode background) */
	transition: .4s;
	border-radius: 24px;
}

/* The circle thumb */
.slider:before {
	position: absolute;
	content: "";
	height: 18px;
	width: 18px;
	left: 3px;
	bottom: 3px;
	background-color: white;
	transition: .4s;
	border-radius: 50%;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* "On" state colors (Light Mode background - using a neutral dark grey for contrast) */
input:checked+.slider {
	background-color: #1A1A1B;
}

/* Move the thumb when checked */
input:checked+.slider:before {
	transform: translateX(24px);
}

/* Dark Mode Adjustments:
   When in Dark Mode, the "Off" state (unchecked) background needs to differ
   from the main body background so it's visible. */
body.dark-mode .slider {
	background-color: #555;
	/* Slightly lighter grey than dark mode bg */
}