/*
Theme Name: Blake Tech
Theme URI: https://www.blaketech.co.uk
Author: Blake Tech
Description: Dark techy portfolio theme. Hub pages render child pages as tiles; any page can carry a gallery via the _bt_gallery meta field. Built for remote maintenance.
Version: 1.0.0
License: GPLv2 or later
*/

:root {
	--bg: #06080e;
	--bg-2: #0a0e17;
	--surface: #0d1320;
	--line: #1b2436;
	--text: #d8e2f2;
	--muted: #75839c;
	--accent: #23e7d6;
	--accent-2: #ff2e6f;
	--glow: 0 0 18px rgba(35, 231, 214, .28);
	--mono: "JetBrains Mono", "Cascadia Mono", Consolas, monospace;
	--sans: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
	--wrap: 1100px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font-family: var(--sans);
	font-size: 17px;
	line-height: 1.65;
	background-image:
		radial-gradient(1200px 600px at 72% -10%, rgba(35, 231, 214, .07), transparent 60%),
		radial-gradient(900px 500px at 8% 110%, rgba(255, 46, 111, .05), transparent 60%);
	background-attachment: fixed;
}

/* faint blueprint grid, fades with scroll position feel */
body::before {
	content: "";
	position: fixed;
	inset: 0;
	z-index: 0;
	pointer-events: none;
	background-image:
		linear-gradient(rgba(140, 160, 200, .045) 1px, transparent 1px),
		linear-gradient(90deg, rgba(140, 160, 200, .045) 1px, transparent 1px);
	background-size: 44px 44px;
	mask-image: radial-gradient(ellipse at 50% 0%, #000 25%, transparent 78%);
	-webkit-mask-image: radial-gradient(ellipse at 50% 0%, #000 25%, transparent 78%);
}

body > * { position: relative; z-index: 1; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 22px; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-shadow: 0 0 10px rgba(35, 231, 214, .6); }
img { max-width: 100%; height: auto; display: block; }

::selection { background: rgba(35, 231, 214, .25); }

/* ---------- header ---------- */

.site-header { border-bottom: 1px solid var(--line); }

.masthead {
	text-align: center;
	padding: 34px 22px 22px;
}

.brand {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	font-family: var(--mono);
	font-weight: 700;
	font-size: 22px;
	letter-spacing: .06em;
	color: var(--text);
	text-transform: lowercase;
}
.brand .custom-logo-link { display: inline-block; }
.brand .custom-logo {
	display: block;
	max-width: 300px;
	height: auto;
	margin: 0 auto;
}
.brand .acc { color: var(--accent); }
.brand:hover { text-shadow: var(--glow); }

.masthead .tagline {
	margin-top: 12px;
	font-size: 12px;
	letter-spacing: .16em;
	text-transform: uppercase;
	color: var(--muted);
}
.masthead .motto {
	margin-top: 7px;
	font-family: var(--mono);
	font-size: 11px;
	letter-spacing: .28em;
	text-transform: uppercase;
	color: var(--accent);
	text-shadow: 0 0 12px rgba(35, 231, 214, .4);
}

.navbar {
	position: sticky;
	top: 0;
	z-index: 50;
	background: rgba(6, 8, 14, .85);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	border-top: 1px solid var(--line);
}

.head-inner {
	display: flex;
	align-items: center;
	justify-content: center;
	position: relative;
	min-height: 52px;
}

.site-nav ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	justify-content: center;
	gap: 26px;
}
.site-nav a {
	font-family: var(--mono);
	font-size: 12px;
	font-weight: 400;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--muted);
	padding: 6px 2px;
	border-bottom: 1px solid transparent;
	transition: color .15s, border-color .15s, text-shadow .15s;
}
.site-nav a:hover,
.site-nav .current-menu-item > a,
.site-nav .current_page_item > a {
	color: var(--accent);
	border-bottom-color: var(--accent);
	text-shadow: 0 0 8px rgba(35, 231, 214, .5);
}

#bt-nav-toggle {
	display: none;
	background: none;
	border: 1px solid var(--line);
	color: var(--accent);
	font-size: 20px;
	line-height: 1;
	padding: 6px 10px;
	cursor: pointer;
	font-family: var(--mono);
}

/* ---------- hero ---------- */

.hero {
	padding: 64px 0 32px;
}
.eyebrow, .sec-title span, .subtitle, .crumbs, .site-footer, .tile .idx {
	font-family: var(--mono);
}
.eyebrow {
	display: inline-block;
	font-size: 12px;
	letter-spacing: .22em;
	text-transform: uppercase;
	color: var(--accent);
	border: 1px solid rgba(35, 231, 214, .35);
	padding: 6px 14px;
	margin-bottom: 26px;
	background: rgba(35, 231, 214, .05);
}
.hero h1 {
	font-size: clamp(24px, 3.6vw, 38px);
	line-height: 1.05;
	margin: 0 0 18px;
	font-weight: 700;
	letter-spacing: -.02em;
	text-transform: uppercase;
	text-shadow: 0 0 30px rgba(35, 231, 214, .18);
}
.hero .tagline {
	font-size: clamp(15px, 2vw, 18px);
	color: var(--muted);
	max-width: 640px;
	margin: 0 0 10px;
}
.hero .content { max-width: 700px; color: var(--muted); }

/* ---------- section titles ---------- */

.sec-title {
	font-size: 13px;
	font-weight: 400;
	letter-spacing: .2em;
	text-transform: uppercase;
	margin: 54px 0 22px;
	padding-bottom: 12px;
	border-bottom: 1px solid var(--line);
}
.sec-title span { color: var(--accent); }

/* ---------- page ---------- */

.page { padding: 60px 0 20px; }
.page h1 {
	font-size: clamp(30px, 4.6vw, 46px);
	text-transform: uppercase;
	letter-spacing: -.01em;
	margin: 14px 0 8px;
}
.subtitle {
	color: var(--muted);
	font-size: 14px;
	letter-spacing: .04em;
	margin: 0 0 26px;
}
.content { max-width: 760px; color: var(--text); }
.content a { border-bottom: 1px dashed rgba(35, 231, 214, .4); }
.content img { border: 1px solid var(--line); }

/* breadcrumb */
.crumbs {
	font-size: 12px;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: var(--muted);
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
}
.crumb-back { color: var(--accent); }
.crumbs-path a { color: var(--muted); }
.crumbs-path a:hover { color: var(--accent); }
.crumbs-path .sep { color: var(--line); margin: 0 4px; }

/* ---------- tiles ---------- */

.bt-tiles {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(255px, 1fr));
	gap: 18px;
}
.tile {
	position: relative;
	aspect-ratio: 4 / 3;
	background: var(--surface);
	border: 1px solid var(--line);
	overflow: hidden;
	transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.tile:hover {
	transform: translateY(-3px);
	border-color: rgba(35, 231, 214, .6);
	box-shadow: var(--glow), 0 14px 30px rgba(0, 0, 0, .45);
}
.tile a {
	display: block;
	position: relative;
	height: 100%;
	color: var(--text);
}
.tile .thumb {
	display: block;
	position: absolute;
	inset: 0;
	background: var(--bg-2);
	overflow: hidden;
}
.tile .thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	filter: saturate(.82) brightness(.92);
	transition: transform .3s ease, filter .3s ease;
}
.tile:hover .thumb img {
	transform: scale(1.045);
	filter: saturate(1.05) brightness(1);
}
.tile .no-thumb {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	font-family: var(--mono);
	font-size: 34px;
	color: var(--accent);
	background:
		repeating-linear-gradient(135deg, rgba(35, 231, 214, .06) 0 2px, transparent 2px 14px),
		var(--bg-2);
}
.tile .body {
	display: block;
	position: absolute;
	left: 0; right: 0; bottom: 0;
	padding: 34px 16px 14px;
	background: linear-gradient(transparent, rgba(4, 6, 11, .92) 42%);
}
.tile .idx {
	position: absolute;
	top: 10px;
	left: 12px;
	font-size: 11px;
	color: var(--accent);
	background: rgba(6, 8, 14, .72);
	padding: 2px 7px;
	border: 1px solid rgba(35, 231, 214, .3);
}
.tile h3 {
	margin: 0 0 4px;
	font-family: var(--mono);
	font-size: 14px;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
}
.tile p {
	margin: 0;
	font-size: 12px;
	color: var(--muted);
	line-height: 1.45;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.tile .go {
	position: absolute;
	right: 14px;
	top: 10px;
	font-family: var(--mono);
	font-size: 12px;
	color: var(--accent);
	background: rgba(6, 8, 14, .72);
	padding: 2px 7px;
	border: 1px solid rgba(35, 231, 214, .3);
	opacity: 0;
	transition: opacity .18s;
}
.tile:hover .go { opacity: 1; }

/* link tiles carrying wide card images — letterbox instead of cropping */
.tile.fit-card .thumb img {
	object-fit: contain;
}
.tile.fit-card:hover .thumb img { transform: none; }

/* ---------- gallery ---------- */

.bt-gallery {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
	gap: 14px;
}
.bt-gallery figure {
	margin: 0;
	position: relative;
	border: 1px solid var(--line);
	background: var(--surface);
	overflow: hidden;
}
.bt-gallery a { display: block; }
.bt-gallery img {
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	filter: brightness(.9);
	transition: transform .25s ease, filter .25s ease;
}
.bt-gallery figure:hover img {
	transform: scale(1.05);
	filter: brightness(1);
}
.bt-gallery figcaption {
	position: absolute;
	left: 0; right: 0; bottom: 0;
	padding: 8px 10px;
	font-family: var(--mono);
	font-size: 11px;
	letter-spacing: .04em;
	color: var(--text);
	background: linear-gradient(transparent, rgba(4, 6, 11, .88));
	opacity: 0;
	transition: opacity .2s;
	pointer-events: none;
}
.bt-gallery figure:hover figcaption { opacity: 1; }

/* ---------- contact cards ---------- */

.bt-contact-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 16px;
	margin-top: 26px;
}
.bt-card {
	display: block;
	background: var(--surface);
	border: 1px solid var(--line);
	padding: 22px;
	color: var(--text);
	transition: border-color .18s, box-shadow .18s, transform .18s;
}
a.bt-card:hover {
	border-color: rgba(35, 231, 214, .6);
	box-shadow: var(--glow);
	transform: translateY(-3px);
}
.bt-card .ico {
	display: block;
	font-family: var(--mono);
	font-size: 20px;
	color: var(--accent);
	margin-bottom: 10px;
}
.bt-card h3 {
	margin: 0 0 6px;
	font-family: var(--mono);
	font-size: 13px;
	letter-spacing: .1em;
	text-transform: uppercase;
}
.bt-card p { margin: 0; font-size: 13px; color: var(--muted); }

/* ---------- contact form ---------- */

.contact-wrap {
	display: grid;
	grid-template-columns: 2fr 1fr;
	gap: 22px;
	align-items: start;
}
.bt-form {
	background: var(--surface);
	border: 1px solid var(--line);
	padding: 26px;
}
.bt-form label {
	display: block;
	font-family: var(--mono);
	font-size: 11px;
	letter-spacing: .18em;
	text-transform: uppercase;
	color: var(--accent);
	margin: 18px 0 7px;
}
.bt-form label:first-of-type { margin-top: 0; }
.bt-form input[type="text"],
.bt-form input[type="email"],
.bt-form textarea {
	width: 100%;
	background: var(--bg-2);
	border: 1px solid var(--line);
	color: var(--text);
	font-family: var(--sans);
	font-size: 15px;
	padding: 11px 13px;
	transition: border-color .15s, box-shadow .15s;
}
.bt-form input:focus, .bt-form textarea:focus {
	outline: none;
	border-color: var(--accent);
	box-shadow: 0 0 0 1px rgba(35, 231, 214, .35), var(--glow);
}
.bt-form textarea { resize: vertical; }
.bt-hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }
.bt-send {
	margin-top: 22px;
	font-family: var(--mono);
	font-size: 12px;
	letter-spacing: .2em;
	text-transform: uppercase;
	color: var(--accent);
	background: rgba(35, 231, 214, .07);
	border: 1px solid rgba(35, 231, 214, .45);
	padding: 13px 26px;
	cursor: pointer;
	transition: background .15s, box-shadow .15s, color .15s;
}
.bt-send:hover {
	background: rgba(35, 231, 214, .16);
	box-shadow: var(--glow);
	color: #fff;
}
.bt-notice {
	font-family: var(--mono);
	font-size: 12px;
	letter-spacing: .1em;
	padding: 14px 18px;
	margin: 0 0 22px;
	border: 1px solid;
}
.bt-notice.ok {
	color: var(--accent);
	border-color: rgba(35, 231, 214, .5);
	background: rgba(35, 231, 214, .07);
}
.bt-notice.err {
	color: var(--accent-2);
	border-color: rgba(255, 46, 111, .5);
	background: rgba(255, 46, 111, .07);
}
.contact-side {
	display: grid;
	gap: 14px;
}
.contact-side .bt-card { padding: 18px 20px; }
.contact-side .bt-card .ico { font-size: 17px; margin-bottom: 6px; }

@media (max-width: 760px) {
	.contact-wrap { grid-template-columns: 1fr; }
}

/* ---------- lightbox ---------- */

#bt-lightbox {
	position: fixed;
	inset: 0;
	z-index: 200;
	display: none;
	align-items: center;
	justify-content: center;
	background: rgba(3, 5, 9, .94);
	backdrop-filter: blur(6px);
}
#bt-lightbox.open { display: flex; }
#bt-lightbox figure { margin: 0; max-width: 90vw; text-align: center; }
#bt-lightbox img {
	max-width: 90vw;
	max-height: 82vh;
	border: 1px solid var(--line);
	box-shadow: 0 0 60px rgba(35, 231, 214, .15), 0 30px 80px rgba(0, 0, 0, .6);
	margin: 0 auto;
}
#bt-lightbox figcaption {
	margin-top: 12px;
	font-family: var(--mono);
	font-size: 12px;
	color: var(--muted);
	letter-spacing: .05em;
}
#bt-lightbox button {
	position: absolute;
	background: none;
	border: 1px solid var(--line);
	color: var(--accent);
	font-family: var(--mono);
	font-size: 26px;
	line-height: 1;
	width: 48px;
	height: 48px;
	cursor: pointer;
	transition: border-color .15s, box-shadow .15s;
}
#bt-lightbox button:hover { border-color: var(--accent); box-shadow: var(--glow); }
.bt-lb-close { top: 20px; right: 22px; }
.bt-lb-prev { left: 18px; top: 50%; transform: translateY(-50%); }
.bt-lb-next { right: 18px; top: 50%; transform: translateY(-50%); }

/* ---------- posts / fallback ---------- */

.post-list article {
	padding: 26px 0;
	border-bottom: 1px solid var(--line);
}
.post-list h2 { margin: 0 0 6px; font-size: 22px; }
.post-list h2 a { color: var(--text); }
.post-list h2 a:hover { color: var(--accent); }
.post-list .meta { font-family: var(--mono); font-size: 11px; color: var(--muted); letter-spacing: .1em; text-transform: uppercase; }

/* ---------- footer ---------- */

.site-footer {
	margin-top: 90px;
	border-top: 1px solid var(--line);
	padding: 26px 0 40px;
	font-size: 11px;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--muted);
	display: block;
}
.site-footer .wrap {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	flex-wrap: wrap;
}
.site-footer .sig { color: var(--accent); }

/* ---------- responsive ---------- */

@media (max-width: 640px) {
	#bt-nav-toggle {
		display: block;
		position: absolute;
		right: 0;
	}
	.site-nav {
		display: none;
		position: absolute;
		top: 100%;
		left: -22px; right: -22px;
		background: rgba(6, 8, 14, .97);
		border-bottom: 1px solid var(--line);
		padding: 14px 22px 18px;
	}
	body.nav-open .site-nav { display: block; }
	.site-nav ul { flex-direction: column; gap: 4px; }
	.site-nav a { display: block; padding: 10px 2px; font-size: 13px; }
	.hero { padding: 60px 0 30px; }
}
