/*
Theme Name: PhotoExplore
Theme URI: https://www.photoexplore.ro/
Author: Mihai Tim
Author URI: https://www.photoexplore.ro/
Description: A minimalist, dark, single-photo-per-post photoblog theme built for photoexplore.ro. Shows one large photo at a time with prev/next navigation, EXIF metadata, a lightbox for full-resolution viewing, category browsing, and a separate Blog section for text posts.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: LICENSE
Text Domain: photoexplore
*/

/* -------------------------------------------------- */
/* 0. Variables & reset                                */
/* -------------------------------------------------- */
:root {
	--bg: #0c0c0d;
	--bg-elevated: #16161a;
	--border: #2a2a2e;
	--text: #ececee;
	--text-dim: #9a9aa2;
	--accent: #d7a35c;
	--accent-dim: #8a6a3c;
	--mono: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
	--sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
	--maxw: 1180px;
	--radius: 3px;
}

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

html { background: var(--bg); }

body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font-family: var(--sans);
	font-size: 16px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--text); }

ul { list-style: none; margin: 0; padding: 0; }

h1, h2, h3, h4 { font-weight: 600; line-height: 1.3; margin: 0 0 .5em; }

.screen-reader-text {
	position: absolute !important;
	clip: rect(1px, 1px, 1px, 1px);
	width: 1px; height: 1px; overflow: hidden;
}

.container {
	max-width: var(--maxw);
	margin: 0 auto;
	padding: 0 24px;
}

/* -------------------------------------------------- */
/* 1. Header                                           */
/* -------------------------------------------------- */
.site-header {
	border-bottom: 1px solid var(--border);
	padding: 22px 0;
	position: relative;
}

.site-header .container {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
}

.site-branding { display: flex; align-items: center; gap: 12px; }

.site-title {
	font-size: 22px;
	letter-spacing: .04em;
	text-transform: uppercase;
	margin: 0;
}
.site-title a { color: var(--text); }
.site-title a:hover { color: var(--accent); }

.site-description {
	font-size: 12px;
	color: var(--text-dim);
	margin-top: 2px;
}

.custom-logo { max-height: 44px; width: auto; }

.menu-toggle {
	display: none;
	background: none;
	border: 1px solid var(--border);
	color: var(--text);
	padding: 8px 12px;
	border-radius: var(--radius);
	cursor: pointer;
}

.primary-navigation ul {
	display: flex;
	gap: 28px;
}

.primary-navigation a {
	color: var(--text-dim);
	font-size: 13px;
	letter-spacing: .12em;
	text-transform: uppercase;
	font-weight: 600;
}

.primary-navigation a:hover,
.primary-navigation .current-menu-item > a,
.primary-navigation .current_page_item > a {
	color: var(--accent);
}

/* -------------------------------------------------- */
/* 2. Layout                                           */
/* -------------------------------------------------- */
.site-main { padding: 40px 0 64px; min-height: 60vh; }

/* -------------------------------------------------- */
/* 3. Single photo display                            */
/* -------------------------------------------------- */
.photo-entry { position: relative; }

.photo-stage {
	position: relative;
	display: flex;
	justify-content: center;
	background: var(--bg-elevated);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 12px;
}

.photo-stage img {
	max-height: 78vh;
	width: auto;
	margin: 0 auto;
	cursor: zoom-in;
	border-radius: 2px;
}

.photo-nav-link {
	position: absolute;
	top: 0;
	bottom: 0;
	width: 15%;
	min-width: 56px;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--text);
	font-size: 28px;
	opacity: 0;
	transition: opacity .15s ease, background .15s ease;
	background: linear-gradient(to var(--fade-dir, right), rgba(0,0,0,.35), transparent);
}
.photo-stage:hover .photo-nav-link { opacity: .85; }
.photo-nav-link:hover { opacity: 1 !important; color: var(--accent); }
.photo-nav-prev { left: 0; --fade-dir: right; }
.photo-nav-next { right: 0; --fade-dir: left; justify-content: flex-end; }
.photo-nav-link .arrow { padding: 0 14px; }

.photo-meta-row {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
	margin-top: 22px;
	padding-bottom: 14px;
	border-bottom: 1px solid var(--border);
}

.photo-title { font-size: 26px; margin: 0; }
.photo-title a { color: var(--text); }

.photo-date-cat {
	font-size: 13px;
	color: var(--text-dim);
	white-space: nowrap;
}
.photo-date-cat a { color: var(--text-dim); }
.photo-date-cat a:hover { color: var(--accent); }

.photo-caption {
	margin-top: 18px;
	font-size: 16px;
	color: var(--text);
	max-width: 72ch;
}
.photo-caption p:first-child { margin-top: 0; }

/* EXIF strip */
.exif-strip {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 20px;
}
.exif-pill {
	font-family: var(--mono);
	font-size: 12px;
	color: var(--text-dim);
	background: var(--bg-elevated);
	border: 1px solid var(--border);
	border-radius: 999px;
	padding: 5px 12px;
}
.exif-pill strong { color: var(--accent); font-weight: 600; }

/* Prev/next below the fold (keyboard-accessible, non-hover fallback) */
.photo-pager {
	display: flex;
	justify-content: space-between;
	margin-top: 26px;
	font-size: 13px;
	text-transform: uppercase;
	letter-spacing: .08em;
}
.photo-pager span.disabled { color: var(--text-dim); opacity: .4; }

/* -------------------------------------------------- */
/* 4. Lightbox                                         */
/* -------------------------------------------------- */
.pe-lightbox {
	position: fixed;
	inset: 0;
	background: rgba(6,6,7,.94);
	display: none;
	align-items: center;
	justify-content: center;
	z-index: 999;
	padding: 32px;
}
.pe-lightbox.is-open { display: flex; }
.pe-lightbox img {
	max-width: 100%;
	max-height: 100%;
	box-shadow: 0 10px 50px rgba(0,0,0,.6);
}
.pe-lightbox-close {
	position: absolute;
	top: 20px;
	right: 28px;
	color: var(--text);
	font-size: 32px;
	line-height: 1;
	background: none;
	border: none;
	cursor: pointer;
}
.pe-lightbox-close:hover { color: var(--accent); }
.pe-lightbox-hint {
	position: absolute;
	bottom: 20px;
	left: 0; right: 0;
	text-align: center;
	font-size: 12px;
	color: var(--text-dim);
}

/* -------------------------------------------------- */
/* 5. Category / archive grid                          */
/* -------------------------------------------------- */
.archive-header { margin-bottom: 28px; }
.archive-header h1 { font-size: 22px; text-transform: uppercase; letter-spacing: .06em; }
.archive-description { color: var(--text-dim); font-size: 14px; }

.photo-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 14px;
}
.photo-grid-item {
	position: relative;
	display: block;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	border-radius: var(--radius);
	background: var(--bg-elevated);
	border: 1px solid var(--border);
}
.photo-grid-item img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .3s ease;
}
.photo-grid-item:hover img { transform: scale(1.05); }
.photo-grid-item .grid-item-title {
	position: absolute;
	left: 0; right: 0; bottom: 0;
	padding: 10px 12px;
	font-size: 12px;
	color: #fff;
	background: linear-gradient(to top, rgba(0,0,0,.75), transparent);
	opacity: 0;
	transition: opacity .2s ease;
}
.photo-grid-item:hover .grid-item-title { opacity: 1; }

/* -------------------------------------------------- */
/* 6. Blog list                                        */
/* -------------------------------------------------- */
.blog-list { max-width: 76ch; }
.blog-entry {
	padding: 26px 0;
	border-bottom: 1px solid var(--border);
}
.blog-entry:first-child { padding-top: 0; }
.blog-entry-title { font-size: 22px; }
.blog-entry-title a { color: var(--text); }
.blog-entry-meta { font-size: 12px; color: var(--text-dim); margin: 4px 0 12px; }
.blog-entry-excerpt { color: var(--text); }
.blog-read-more { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; }

/* Standard page/single content (About, Gear, Contact) */
.page-content, .single-content {
	max-width: 76ch;
}
.page-content img, .single-content img { border-radius: var(--radius); }

/* -------------------------------------------------- */
/* 7. Pagination                                       */
/* -------------------------------------------------- */
.pagination {
	display: flex;
	justify-content: space-between;
	margin-top: 32px;
	font-size: 13px;
	text-transform: uppercase;
	letter-spacing: .06em;
}

/* -------------------------------------------------- */
/* 8. Comments                                         */
/* -------------------------------------------------- */
.comments-area { margin-top: 48px; max-width: 76ch; }
.comments-title { font-size: 18px; text-transform: uppercase; letter-spacing: .06em; }
.comment-list { margin-top: 20px; }
.comment-body {
	border-bottom: 1px solid var(--border);
	padding: 18px 0;
}
.comment-author { font-size: 14px; font-weight: 600; }
.comment-metadata { font-size: 12px; color: var(--text-dim); margin-bottom: 8px; }
.comment-metadata a { color: var(--text-dim); }
.comment-respond { margin-top: 30px; }
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
	width: 100%;
	background: var(--bg-elevated);
	border: 1px solid var(--border);
	color: var(--text);
	padding: 10px 12px;
	border-radius: var(--radius);
	font-family: var(--sans);
	margin-bottom: 14px;
}
.comment-form textarea { min-height: 120px; }
.comment-form .form-submit input {
	width: auto;
	background: var(--accent);
	color: #0c0c0d;
	border: none;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .06em;
	cursor: pointer;
	padding: 10px 22px;
}
.comment-form .form-submit input:hover { background: var(--text); }
.comment-reply-title { font-size: 16px; }

/* -------------------------------------------------- */
/* 9. Footer                                           */
/* -------------------------------------------------- */
.site-footer {
	border-top: 1px solid var(--border);
	padding: 36px 0;
	margin-top: 40px;
}
.footer-widgets {
	display: flex;
	flex-wrap: wrap;
	gap: 32px;
	margin-bottom: 24px;
}
.footer-widgets .widget { flex: 1 1 220px; }
.footer-widgets .widget-title {
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: .1em;
	color: var(--text-dim);
	margin-bottom: 12px;
}
.footer-widgets ul li { margin-bottom: 8px; font-size: 14px; }
.footer-widgets img { max-height: 32px; width: auto; display: inline-block; }

.site-info {
	font-size: 12px;
	color: var(--text-dim);
	border-top: 1px solid var(--border);
	padding-top: 18px;
}
.site-info a { color: var(--text-dim); }
.site-info a:hover { color: var(--accent); }

/* -------------------------------------------------- */
/* 10. Responsive                                      */
/* -------------------------------------------------- */
@media (max-width: 760px) {
	.menu-toggle { display: inline-block; }
	.primary-navigation {
		display: none;
		position: absolute;
		top: 100%; left: 0; right: 0;
		background: var(--bg);
		border-bottom: 1px solid var(--border);
		z-index: 50;
	}
	.primary-navigation.is-open { display: block; }
	.primary-navigation ul { flex-direction: column; gap: 0; }
	.primary-navigation li { border-bottom: 1px solid var(--border); }
	.primary-navigation a { display: block; padding: 14px 24px; }

	.photo-stage img { max-height: 60vh; }
	.photo-nav-link { opacity: .55; }
	.photo-title { font-size: 20px; }
}
