/* ============================================================
   NB Hub — personal portal theme
   Palette: navy #0A2540 · gold #C9A227 · off-white #F7F9FC · ink #1A2332
   ============================================================ */

:root {
	--navy: #0A2540;
	--navy-deep: #071A30;
	--gold: #C9A227;
	--gold-light: #E3C766;
	--off-white: #F7F9FC;
	--ink: #1A2332;
	--muted: #5A6B82;
	--border: #E2E8F2;
	--white: #FFFFFF;
	--radius: 14px;
	--shadow: 0 10px 30px rgba(10, 37, 64, 0.10);
	--font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

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

body {
	margin: 0;
	font-family: var(--font);
	color: var(--ink);
	background: var(--white);
	line-height: 1.6;
	font-size: 1rem;
}

h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 0.6em; color: var(--navy); }
p { margin: 0 0 1em; }
img, svg { max-width: 100%; height: auto; }
a { color: var(--navy); }

.container {
	width: 100%;
	max-width: 1120px;
	margin: 0 auto;
	padding-left: 20px;
	padding-right: 20px;
}
.container.narrow { max-width: 760px; }

/* ---------- Skip link & focus ---------- */
.skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	background: var(--gold);
	color: var(--navy-deep);
	padding: 10px 18px;
	font-weight: 700;
	border-radius: 0 0 8px 0;
	z-index: 200;
}
.skip-link:focus { left: 0; }

a:focus-visible, button:focus-visible {
	outline: 3px solid var(--gold);
	outline-offset: 3px;
	border-radius: 4px;
}

/* ---------- Header ---------- */
.site-header {
	position: sticky;
	top: 0;
	z-index: 100;
	background: rgba(10, 37, 64, 0.97);
	backdrop-filter: blur(6px);
	border-bottom: 1px solid rgba(201, 162, 39, 0.25);
}
.header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	min-height: 64px;
	gap: 16px;
}
.site-logo { text-decoration: none; }
.site-logo .custom-logo { max-height: 40px; width: auto; }
.logo-text {
	color: var(--white);
	font-weight: 800;
	font-size: 1.15rem;
	letter-spacing: 0.2px;
	white-space: nowrap;
}
.logo-dot { color: var(--gold); }

.site-nav { display: none; }
.site-nav.open { display: block; }
.nav-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 4px;
}
.site-nav.open .nav-list {
	position: absolute;
	top: 64px;
	left: 0;
	right: 0;
	background: var(--navy-deep);
	padding: 12px 20px 20px;
	border-bottom: 2px solid var(--gold);
}
.nav-list a {
	display: block;
	padding: 10px 4px;
	color: var(--white);
	text-decoration: none;
	font-weight: 600;
	font-size: 0.98rem;
}
.nav-list a:hover { color: var(--gold-light); }

.menu-toggle {
	display: inline-flex;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	background: none;
	border: 1px solid rgba(255, 255, 255, 0.25);
	border-radius: 8px;
	padding: 10px 12px;
	cursor: pointer;
}
.menu-toggle-bar {
	display: block;
	width: 22px;
	height: 2px;
	background: var(--white);
	border-radius: 2px;
	transition: transform 0.25s ease, opacity 0.25s ease;
}
.menu-toggle[aria-expanded="true"] .menu-toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-toggle-bar:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] .menu-toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
	position: relative;
	background: var(--navy);
	color: var(--white);
	overflow: hidden;
}
.hero-pattern {
	position: absolute;
	inset: 0;
	pointer-events: none;
	opacity: 0.35;
	background-image: radial-gradient(circle at 85% 20%, rgba(201, 162, 39, 0.35) 0, transparent 45%),
		radial-gradient(circle at 10% 90%, rgba(201, 162, 39, 0.18) 0, transparent 40%);
}
.hero-inner {
	position: relative;
	z-index: 1;
	padding-top: 72px;
	padding-bottom: 80px;
	max-width: 720px;
}
.hero-kicker {
	color: var(--gold-light);
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 3px;
	font-size: 0.8rem;
	margin-bottom: 12px;
}
.hero-title {
	color: var(--white);
	font-size: 2.6rem;
	font-weight: 800;
	letter-spacing: -0.5px;
	margin-bottom: 8px;
}
.gold-dot { color: var(--gold); }
.hero-tagline {
	color: var(--gold-light);
	font-size: 1.25rem;
	font-weight: 600;
	margin-bottom: 14px;
}
.hero-sub {
	color: rgba(255, 255, 255, 0.82);
	font-size: 1.05rem;
	max-width: 560px;
	margin-bottom: 28px;
}
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Buttons ---------- */
.btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 13px 26px;
	border-radius: 999px;
	font-weight: 700;
	font-size: 0.98rem;
	text-decoration: none;
	border: 2px solid transparent;
	cursor: pointer;
	transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.btn-gold {
	background: var(--gold);
	color: var(--navy-deep);
}
.btn-gold:hover {
	background: var(--gold-light);
	transform: translateY(-2px);
	box-shadow: 0 8px 20px rgba(201, 162, 39, 0.35);
}
.btn-outline {
	border-color: rgba(255, 255, 255, 0.5);
	color: var(--white);
	background: transparent;
}
.btn-outline:hover {
	border-color: var(--gold);
	color: var(--gold-light);
}
.btn-card {
	background: var(--navy);
	color: var(--white);
	padding: 11px 22px;
	font-size: 0.92rem;
}
.btn-card:hover { background: var(--accent, var(--gold)); color: var(--navy-deep); }

/* ---------- Sections ---------- */
section { scroll-margin-top: 80px; }
.section-title {
	font-size: 1.9rem;
	font-weight: 800;
	letter-spacing: -0.3px;
	margin-bottom: 8px;
}
.section-sub {
	color: var(--muted);
	font-size: 1.05rem;
	margin-bottom: 36px;
}

/* ---------- Projects ---------- */
.projects {
	background: var(--off-white);
	padding: 72px 0;
}
.project-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 22px;
}
.project-card {
	background: var(--white);
	border-radius: var(--radius);
	border: 1px solid var(--border);
	border-top: 5px solid var(--accent, var(--gold));
	box-shadow: var(--shadow);
	padding: 30px 26px;
	display: flex;
	flex-direction: column;
	gap: 12px;
	transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.project-card:hover {
	transform: translateY(-5px);
	box-shadow: 0 18px 40px rgba(10, 37, 64, 0.16);
}
.project-icon {
	width: 54px;
	height: 54px;
	border-radius: 14px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: rgba(201, 162, 39, 0.14); /* fallback for browsers without color-mix */
	background: color-mix(in srgb, var(--accent, var(--gold)) 14%, white);
	color: var(--accent, var(--gold));
}
.project-name { font-size: 1.35rem; font-weight: 800; margin: 0; }
.project-desc { color: var(--muted); flex: 1; margin: 0; }
.project-card .btn-card { align-self: flex-start; margin-top: 8px; }

/* ---------- About ---------- */
.about { padding: 72px 0; background: var(--white); }
.about-card {
	background: var(--off-white);
	border: 1px solid var(--border);
	border-left: 5px solid var(--gold);
	border-radius: var(--radius);
	padding: 30px 28px;
	font-size: 1.12rem;
	max-width: 820px;
}
.about-card p { margin: 0; }

/* ---------- Contact ---------- */
.contact {
	background: var(--navy);
	padding: 72px 0;
}
.contact .section-title { color: var(--white); }
.contact .section-sub { color: rgba(255, 255, 255, 0.72); }
.contact-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 18px;
}
.contact-card {
	display: flex;
	flex-direction: column;
	gap: 6px;
	background: rgba(255, 255, 255, 0.06);
	border: 1px solid rgba(255, 255, 255, 0.14);
	border-radius: var(--radius);
	padding: 24px 22px;
	text-decoration: none;
	transition: border-color 0.15s ease, transform 0.15s ease, background 0.15s ease;
}
a.contact-card:hover {
	border-color: var(--gold);
	transform: translateY(-3px);
	background: rgba(255, 255, 255, 0.09);
}
.contact-icon { color: var(--gold); }
.contact-label {
	color: rgba(255, 255, 255, 0.6);
	font-size: 0.82rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 1.5px;
}
.contact-value {
	color: var(--white);
	font-weight: 700;
	font-size: 1.05rem;
	word-break: break-all;
}

/* ---------- Footer ---------- */
.site-footer {
	background: var(--navy-deep);
	border-top: 1px solid rgba(201, 162, 39, 0.25);
	padding: 26px 0;
}
.footer-inner {
	display: flex;
	flex-direction: column;
	gap: 12px;
	align-items: flex-start;
}
.footer-copy { color: rgba(255, 255, 255, 0.75); margin: 0; font-size: 0.92rem; }
.footer-nav { display: flex; gap: 20px; }
.footer-nav a {
	color: rgba(255, 255, 255, 0.75);
	text-decoration: none;
	font-size: 0.92rem;
	font-weight: 600;
}
.footer-nav a:hover { color: var(--gold-light); }

/* ---------- Page fallback / 404 ---------- */
.page-wrap { padding: 64px 0 80px; }
.page-title { font-size: 2rem; font-weight: 800; }
.page-content { color: var(--ink); }
.post-summary { margin-bottom: 40px; }
.post-summary .page-title a { text-decoration: none; color: var(--navy); }
.error-404 { text-align: left; }
.error-code {
	font-size: 4.5rem;
	font-weight: 800;
	color: var(--gold);
	margin: 0 0 8px;
	line-height: 1;
}

/* ---------- Reveal on scroll ---------- */
.reveal {
	opacity: 0;
	transform: translateY(22px);
	transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible {
	opacity: 1;
	transform: none;
}

/* ---------- Responsive ---------- */
@media (min-width: 640px) {
	.hero-title { font-size: 3.4rem; }
	.contact-grid { grid-template-columns: repeat(2, 1fr); }
	.contact-grid .contact-card:last-child { grid-column: 1 / -1; }
}

@media (min-width: 860px) {
	.menu-toggle { display: none; }
	.site-nav { display: block; }
	.nav-list { flex-direction: row; gap: 28px; }
	.nav-list a { padding: 6px 0; }
	.project-grid { grid-template-columns: repeat(3, 1fr); }
	.footer-inner {
		flex-direction: row;
		justify-content: space-between;
		align-items: center;
	}
}

@media (min-width: 1024px) {
	.hero-inner { padding-top: 110px; padding-bottom: 120px; }
	.hero-title { font-size: 4rem; }
	.contact-grid { grid-template-columns: repeat(3, 1fr); }
	.contact-grid .contact-card:last-child { grid-column: auto; }
	.section-title { font-size: 2.2rem; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	.reveal { opacity: 1; transform: none; transition: none; }
	*, *::before, *::after { transition: none !important; }
}
