/* -------------------------
   Theme + global defaults
-------------------------- */
:root {
	--bg: #0f172a;
	--bg-2: #0b1222;
	--text: #e2e8f0;
	--muted: #94a3b8;
	--accent: #3b82f6;
	--accent-2: #06b6d4;
	--glass: rgba(255, 255, 255, 0.1);
	--glass-strong: rgba(255, 255, 255, 0.14);
	--border: rgba(255, 255, 255, 0.2);
	--card-bg: rgba(255, 255, 255, 0.02);
	--card-border: rgba(255, 255, 255, 0.04);
	--shadow: 0 16px 40px rgba(2, 6, 23, 0.45);
	--shadow-soft: 0 10px 26px rgba(2, 6, 23, 0.32);
	--radius: 16px;
	--nav-height: 68px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 100%; }
body {
	margin: 0;
	font-family: "Plus Jakarta Sans", "Inter", sans-serif;
	background:
		radial-gradient(circle at 12% 8%, rgba(59, 130, 246, 0.2), transparent 34%),
		radial-gradient(circle at 86% 18%, rgba(6, 182, 212, 0.16), transparent 30%),
		linear-gradient(160deg, rgba(11, 18, 34, 0.94), rgba(15, 23, 42, 0.98));
	color: var(--text);
	line-height: 1.65;
	font-size: 16px;
	position: relative;
	overflow-x: hidden;
}
body::before,
body::after {
	content: "";
	position: fixed;
	inset: 0;
	pointer-events: none;
	z-index: -1;
}
body::before {
	background:
		linear-gradient(rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01)),
		url("assets/images/hero/hero-bg.svg");
	background-size: cover;
	background-position: center;
	opacity: 0.14;
}
body::after {
	background:
		radial-gradient(circle at 20% 82%, rgba(59, 130, 246, 0.16), transparent 40%),
		radial-gradient(circle at 82% 74%, rgba(6, 182, 212, 0.14), transparent 38%);
	opacity: 0.65;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
section { scroll-margin-top: calc(var(--nav-height) + 16px); }
h1, h2, h3 {
	line-height: 1.2;
	margin: 0 0 12px;
}
h1 { font-size: clamp(2.6rem, 4.8vw, 3.4rem); }
h2 { font-size: clamp(1.9rem, 3.4vw, 2.2rem); }
h3 { font-size: clamp(1.3rem, 2.6vw, 1.6rem); }
.section-intro { color: var(--muted); max-width: 560px; font-size: 1rem; }
.section-media { margin: 20px 0 28px; }
.section-media img {
	border-radius: 16px;
	border: 1px solid var(--border);
	box-shadow: var(--shadow);
}

/* -------------------------
   Accessibility helpers
-------------------------- */
.skip-link {
	position: absolute;
	left: -999px;
	top: 10px;
	background: #fff;
	color: #000;
	padding: 8px 12px;
	border-radius: 8px;
	z-index: 999;
}
.skip-link:focus { left: 12px; }

.container { width: min(1200px, 92%); margin: 0 auto; }
/* Section padding tuned for breathing room: 80px desktop, 60px mobile */
.section { padding: 80px 0; position: relative; }
.section::before {
	content: "";
	position: absolute;
	inset: 0;
	background:
		linear-gradient(165deg, rgba(2, 6, 23, 0.94), rgba(0, 0, 0, 0.9)),
		radial-gradient(circle at 18% 24%, rgba(59, 130, 246, 0.16), transparent 46%),
		radial-gradient(circle at 84% 70%, rgba(6, 182, 212, 0.14), transparent 42%),
		url("assets/images/hero/section-bg.svg");
	background-size: cover, cover, cover, cover;
	background-position: center;
	opacity: 0.62;
	pointer-events: none;
	z-index: 0;
}

#about.section::before {
	background: #0206179E;
	opacity: 1;
}

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

/* Keep paragraph readability consistent across sections */
.section p {
	line-height: 1.9;
}

/* -------------------------
   Navigation
-------------------------- */
.navbar {
	position: fixed;
	top: 0; left: 0; right: 0;
	z-index: 1000;
	background: rgba(15, 23, 42, 0.7);
	backdrop-filter: blur(10px);
	border-bottom: 1px solid transparent;
	transition: background 0.3s, border-color 0.3s;
}
.navbar.scrolled {
	background: rgba(15, 23, 42, 0.92);
	border-bottom: 1px solid var(--border);
}
.nav-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: var(--nav-height);
}
.logo {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	color: var(--text);
	text-decoration: none;
	font-weight: 700;
	letter-spacing: 0.4px;
}
.logo-mark {
	width: 34px;
	height: 34px;
	border-radius: 50%;
	background: rgba(59, 130, 246, 0.2);
	border: 1px solid rgba(59, 130, 246, 0.6);
	display: grid;
	place-items: center;
	font-size: 0.85rem;
	font-weight: 700;
	color: var(--accent-2);
}
.logo-text { font-size: 1rem; }
.nav-menu { display: flex; gap: 18px; }
.nav-link {
	color: var(--muted);
	text-decoration: none;
	transition: color 0.3s;
	position: relative;
	font-size: 0.98rem;
}
.nav-link::after {
	content: "";
	position: absolute;
	left: 0; bottom: -6px;
	width: 0;
	height: 2px;
	background: var(--accent);
	transition: width 0.3s;
}
.nav-link.active, .nav-link:hover { color: var(--accent); }
.nav-link.active::after, .nav-link:hover::after { width: 100%; }

.nav-toggle {
	display: none;
	background: none;
	border: none;
	cursor: pointer;
	width: 30px;
	height: 25px;
	align-items: center;
	justify-content: center;
	flex-direction: column;
	gap: 5px;
	position: relative;
	z-index: 1200;
}
.nav-toggle span {
	display: block;
	width: 24px;
	height: 2px;
	background: var(--text);
	transition: transform 0.3s, opacity 0.3s;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* -------------------------
   Hero
-------------------------- */
.hero {
	min-height: 100vh;
	display: flex;
	align-items: center;
	padding-top: var(--nav-height);
	overflow: hidden;
}
.hero-bg {
	position: absolute;
	inset: 0;
	background:
		linear-gradient(165deg, rgba(2, 6, 23, 0.94), rgba(0, 0, 0, 0.9)),
		radial-gradient(circle at 18% 24%, rgba(59, 130, 246, 0.16), transparent 46%),
		radial-gradient(circle at 84% 70%, rgba(6, 182, 212, 0.14), transparent 42%),
		url("assets/images/hero/section-bg.svg");
	background-size: cover, cover, cover, cover;
	background-position: center;
	animation: none;
	pointer-events: none;
}
.hero-content {
	position: relative;
	display: grid;
	grid-template-columns: 1.2fr 0.8fr;
	gap: 40px;
	align-items: center;
}
.eyebrow {
	text-transform: uppercase;
	letter-spacing: 3px;
	font-size: 0.82rem;
	color: var(--accent-2);
	margin-bottom: 12px;
}
.hero-text h1 { font-size: clamp(2.8rem, 5.2vw, 3.8rem); margin: 0 0 12px; }
.subtitle { color: var(--muted); font-size: 1.2rem; margin: 0 0 8px; max-width: 44ch; }
.typing { color: var(--accent-2); min-height: 32px; font-weight: 500; font-size: 1rem; }
.typing::after { content: "|"; margin-left: 4px; animation: blink 0.9s step-start infinite; }
.hero-meta {
	margin: 16px 0 22px;
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	color: var(--muted);
	font-size: 0.95rem;
}
.hero-meta span {
	background: rgba(255, 255, 255, 0.06);
	border: 1px solid var(--border);
	border-radius: 999px;
	padding: 4px 12px;
}
.cta-group { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
.btn {
	padding: 12px 22px;
	border-radius: 999px;
	text-decoration: none;
	border: 1px solid transparent;
	transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
	font-weight: 600;
	font-size: 0.98rem;
}
.btn.primary { background: var(--accent); color: #fff; }
.btn.secondary { background: var(--accent-2); color: #06212c; }
.btn.ghost { border-color: var(--border); color: var(--text); background: transparent; }
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow); }

.hero-visual { position: relative; height: 320px; }
@media (max-width: 768px) {
	.hero-visual { display: none; }
}
.orb {
	position: absolute;
	width: 220px; height: 220px;
	background: radial-gradient(circle, var(--accent), transparent 70%);
	border-radius: 50%;
	filter: blur(2px);
	animation: float 6s ease-in-out infinite;
}
.orb.small {
	width: 120px; height: 120px;
	top: 140px; left: 160px;
	background: radial-gradient(circle, var(--accent-2), transparent 70%);
	animation-delay: 1.5s;
}
.grid-shine {
	position: absolute;
	inset: 20px;
	border-radius: 20px;
	background: linear-gradient(transparent 60%, rgba(255, 255, 255, 0.05)),
		linear-gradient(90deg, rgba(255,255,255,0.08) 1px, transparent 1px),
		linear-gradient(rgba(255,255,255,0.08) 1px, transparent 1px);
	background-size: 100% 100%, 34px 34px, 34px 34px;
	opacity: 0.4;
}

@media (max-width: 768px) {
	.grid-shine { display: none; }
}

/* -------------------------
   Reusable glass cards
-------------------------- */
/* Card padding uses 28px vertical + 24px horizontal for balanced spacing */
.glass {
	background: var(--card-bg);
	border: 1px solid rgba(255, 255, 255, 0.03);
	backdrop-filter: blur(16px);
	border-radius: var(--radius);
	box-shadow: var(--shadow-soft);
	padding: 28px 24px;
}
.glass h3 { margin-bottom: 12px; }
.glass p {
	margin: 0 0 12px;
	font-size: 1rem;
	line-height: 1.6;
}

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }

/* -------------------------
   About
-------------------------- */
.about-layout {
	display: grid;
	grid-template-columns: 1.1fr 0.9fr;
	gap: 28px;
}
.about-summary,
.about-card,
.education-card {
	background: #0206179E;
}
.about-summary .lead { font-size: 1.05rem; max-width: 52ch; }
.about-summary p,
.about-summary li,
.about-side p,
.about-side li {
	line-height: 2.05;
}
.about-summary a {
	color: var(--accent-2);
	text-decoration: none;
}
.about-summary a:hover { text-decoration: underline; }
.about-values {
	list-style: disc;
	padding-left: 18px;
	margin: 16px 0;
	color: var(--muted);
	font-size: 1rem;
	line-height: 1.6;
}
.about-values li { margin-bottom: 8px; }
.about-tags {
	list-style: none;
	padding: 0;
	margin: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}
.about-tags li {
	background: rgba(59,130,246,0.2);
	border: 1px solid rgba(59,130,246,0.25);
	border-radius: 999px;
	padding: 4px 12px;
	font-size: 0.9rem;
	color: var(--accent);
}
.about-card { display: flex; gap: 20px; align-items: center; margin-bottom: 16px; }
.about-card img { width: 120px; height: 120px; border-radius: 50%; border: 2px solid var(--border); box-shadow: var(--shadow); }
.education-card { display: grid; gap: 16px; }
.education-item h4 { margin-bottom: 8px; }

.pill-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.pill-list li { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 0.95rem; }

.progress-list .bar {
	height: 8px; background: rgba(255,255,255,0.08); border-radius: 999px; overflow: hidden;
}
.progress-list .bar span {
	display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2));
	width: var(--value);
	transition: width 1s ease;
}

.timeline { display: grid; gap: 16px; }
.timeline-item {
	transition: transform 0.3s, border-color 0.3s;
	border-left: 2px solid transparent;
}
.timeline-item:hover { transform: translateY(-4px); border-left-color: var(--accent-2); }
.time { color: var(--accent-2); font-weight: 600; font-size: 0.9rem; }

/* -------------------------
   Skills
-------------------------- */
.skill-card, .project-card, .cert-card, .achievement, .blog-card {
	transition: transform 0.3s, box-shadow 0.3s;
}
.skill-card:hover, .project-card:hover, .cert-card:hover, .achievement:hover, .blog-card:hover {
	transform: translateY(-6px);
	box-shadow: 0 18px 44px rgba(0,0,0,0.45);
}
.skill-card { padding: 20px 20px; }
.skill-card h3 { font-size: 1.05rem; margin-bottom: 12px; }
.skill-list {
	list-style: none;
	padding: 0;
	margin: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}
.skill-list li {
	background: rgba(255, 255, 255, 0.08);
	border: 1px solid var(--border);
	border-radius: 999px;
	padding: 4px 12px;
	font-size: 0.9rem;
	color: var(--muted);
}

/* -------------------------
   Projects
-------------------------- */
.section-header { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.project-grid { position: relative; }
.project-card { overflow: hidden; }
.project-card-featured {
	grid-column: 1 / -1;
	display: grid;
	grid-template-columns: 1fr;
	gap: 20px;
	align-items: start;
	padding: 24px;
	background: rgba(2, 6, 23, 0.62);
	border: 1px solid rgba(255, 255, 255, 0.04);
}
.featured-top {
	display: grid;
	grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.35fr);
	gap: 20px;
	align-items: start;
}
.featured-left-stack {
	display: grid;
	gap: 14px;
}
.featured-box {
	border: none;
	border-radius: 14px;
	padding: 16px;
	background: inherit;
	box-shadow: none;
}
.featured-box h4 {
	margin: 0 0 10px;
	font-size: 0.98rem;
	color: var(--accent-2);
}
.project-media { position: relative; border-radius: 12px; overflow: hidden; aspect-ratio: 16 / 9; }
.project-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.project-card .project-media {
	padding: 0;
	display: flex;
	align-items: center;
	justify-content: center;
}
.project-card .project-media img {
	width: 100%;
	max-width: 100%;
	display: block;
}
.featured-media {
	height: auto;
	aspect-ratio: 16 / 9;
}
.featured-media a {
	display: block;
	height: auto;
}
.featured-media img {
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 9;
	object-fit: contain;
}
.media-box {
	padding-bottom: 14px;
	display: flex;
	flex-direction: column;
	gap: 10px;
}
.media-box h4 {
	margin: 0;
}
.thumbnail-media {
	border-radius: 8px;
	overflow: hidden;
}
.thumbnail-media,
#projects .thumbnail-media {
	aspect-ratio: auto !important;
	max-height: none !important;
}
#projects .thumbnail-media a {
	display: block;
	line-height: 0;
}
.thumbnail-media img {
	border-radius: 0;
	object-fit: contain;
	object-position: top center;
	height: auto;
}
#projects .thumbnail-media img {
	width: 100%;
	height: auto !important;
	max-height: none !important;
	object-fit: contain !important;
	object-position: top center !important;
	display: block;
}
.wearable-media {
	overflow: hidden;
}
.wearable-media img {
	object-fit: contain;
}
.project-info { padding: 16px 0 0; }
.project-card-featured .project-info,
.featured-description-box {
	padding: 16px;
}
.project-meta {
	display: inline-block;
	font-size: 0.85rem;
	letter-spacing: 0.6px;
	text-transform: uppercase;
	color: var(--accent-2);
	margin-bottom: 8px;
}
.project-info h3 { font-size: 1.45rem; margin: 0 0 12px; }
.project-info p {
	margin: 0 0 12px;
	font-size: 1rem;
	line-height: 1.9;
	max-width: 36ch;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.project-card-featured .project-info p {
	max-width: none;
	display: block;
	-webkit-line-clamp: unset;
	line-clamp: unset;
	overflow: visible;
	line-height: 1.9;
}
.sdgp-points {
	margin: 0 0 14px;
	padding-left: 20px;
	display: grid;
	gap: 8px;
	color: var(--text);
	line-height: 1.85;
}
.tags {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 10px;
}
.tags span {
	display: inline-block;
	background: rgba(59,130,246,0.2);
	color: var(--accent);
	padding: 4px 12px;
	border-radius: 999px;
	margin-right: 0;
	font-size: 0.85rem;
}
.links { display: flex; gap: 12px; flex-wrap: wrap; }
.links a {
	color: var(--accent-2);
	text-decoration: none;
	font-size: 0.95rem;
}
.featured-actions {
	display: flex;
	flex-direction: column;
	justify-content: flex-start;
	grid-column: 1 / -1;
}
.featured-actions h4 {
	margin: 0 0 12px;
	font-size: 1rem;
}
.featured-links {
	display: grid;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	gap: 10px;
}
.featured-links a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 42px;
	border: 1px solid rgba(255, 255, 255, 0.03);
	border-radius: 10px;
	background: rgba(255,255,255,0.02);
	padding: 8px 12px;
	color: var(--text);
	white-space: nowrap;
	width: 100%;
}
.featured-links a i {
	font-size: 0.95rem;
}
.featured-links a:hover {
	border-color: var(--accent);
	color: var(--accent);
}
.featured-gallery {
	grid-column: 1 / -1;
}
.featured-gallery h4 {
	margin: 0 0 12px;
	font-size: 1rem;
}

.system-carousel {
	overflow: hidden;
	border: none;
	border-radius: 12px;
	padding: 10px;
	background: inherit;
}
.system-carousel-track {
	display: flex;
	gap: 12px;
	transform: translateX(0);
	transition: transform 0.5s ease;
	will-change: transform;
	background: inherit;
}
.system-shot {
	flex: 0 0 calc((100% - 24px) / 3);
	margin: 0;
	background: inherit;
	border: 1px solid rgba(255, 255, 255, 0.02);
	border-radius: 10px;
	padding: 8px;
}
.system-shot img,
.placeholder-tile {
	width: 100%;
	aspect-ratio: 16 / 9;
	border-radius: 8px;
	border: 1px solid var(--border);
}
.system-shot img {
	object-fit: cover;
}
.placeholder-tile {
	display: grid;
	place-items: center;
	background: repeating-linear-gradient(
		-45deg,
		rgba(148, 163, 184, 0.18),
		rgba(148, 163, 184, 0.18) 12px,
		rgba(148, 163, 184, 0.08) 12px,
		rgba(148, 163, 184, 0.08) 24px
	);
	color: var(--muted);
	font-size: 0.9rem;
}
.system-shot figcaption {
	font-size: 0.82rem;
	color: var(--muted);
	margin-top: 8px;
}

.filters { display: flex; gap: 10px; flex-wrap: wrap; }
.filter {
	background: transparent;
	border: 1px solid var(--border);
	color: var(--text);
	padding: 6px 12px;
	border-radius: 999px;
	cursor: pointer;
	transition: background 0.3s, border-color 0.3s, color 0.3s;
}
.filter.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.project-card.hidden {
	display: none;
}

/* -------------------------
   Certifications + achievements
-------------------------- */
.cert-card,
.achievement {
	position: relative;
}
.achievement img {
	width: 100%;
	border-radius: 12px;
	margin: 10px 0 12px;
	object-fit: cover;
}
.cert-card img {
	width: 100%;
	border-radius: 12px;
	margin: 10px 0 12px;
	object-fit: cover;
}
.cert-meta,
.achievement-meta {
	display: inline-block;
	margin-top: 6px;
	font-size: 0.9rem;
	color: var(--accent-2);
}
.muted { color: var(--muted); font-size: 1rem; }
.icon-list {
	list-style: none;
	padding: 0;
	margin: 12px 0 0;
	display: grid;
	gap: 8px;
}
.icon-list li { display: flex; gap: 10px; align-items: flex-start; color: var(--muted); }
.icon-list i { font-size: 15px; opacity: 0.7; }

.experience-card h3 { font-size: 1.25rem; }
.experience-meta {
	display: inline-block;
	color: var(--accent-2);
	font-size: 0.9rem;
	text-transform: uppercase;
	letter-spacing: 0.6px;
	margin-bottom: 8px;
}
.experience-card p {
	margin: 0 0 12px;
	font-size: 1rem;
	line-height: 1.6;
	max-width: 36ch;
}

/* -------------------------
   Blog
-------------------------- */
.blog-card img { width: 100%; border-radius: 12px; margin-top: 8px; margin-bottom: 14px; }
.badge {
	display: inline-block;
	background: var(--accent-2);
	color: #06212c;
	padding: 4px 10px;
	border-radius: 8px;
	margin-bottom: 8px;
	font-size: 0.85rem;
}
.meta { color: var(--muted); font-size: 0.95rem; margin-top: 8px; }
.cert-card p,
.achievement p,
.blog-card p {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* -------------------------
   Contact
-------------------------- */
.contact-layout {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 28px;
}
.contact-card { display: flex; flex-direction: column; gap: 8px; }
.contact-card p { margin-bottom: 16px; }
.contact-card p a { text-decoration: none; color: var(--accent-2); }
.contact-card p a:hover { text-decoration: underline; }
.contact-group {
	display: grid;
	gap: 12px;
	padding: 16px;
	border: 1px solid rgba(255, 255, 255, 0.03);
	border-radius: 14px;
	background: var(--card-bg);
}
.contact-group h3 { margin: 0; font-size: 1rem; }
.contact-details {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 16px;
	margin-bottom: 16px;
}
.contact-details .label {
	font-size: 0.8rem;
	text-transform: uppercase;
	letter-spacing: 0.8px;
	color: var(--muted);
}
.contact-details p { margin: 6px 0 0; font-size: 1rem; }
.contact-details a { color: var(--accent); text-decoration: none; }
.profile-list {
	list-style: none;
	padding: 0;
	margin: 0;
	display: grid;
	gap: 10px;
}
.profile-list li { width: 100%; }
.profile-list a {
	display: flex;
	align-items: center;
	gap: 10px;
	width: 100%;
	min-height: 44px;
	color: var(--text);
	text-decoration: none;
	font-size: 1rem;
	background: var(--card-bg);
	border: 1px solid rgba(255, 255, 255, 0.04);
	border-radius: 12px;
	padding: 8px 12px;
}
.profile-list a:hover { border-color: var(--accent); color: var(--accent); }
.profile-list i {
	width: 28px;
	height: 28px;
	border-radius: 50%;
	display: grid;
	place-items: center;
	background: rgba(255,255,255,0.08);
}
.share-buttons { display: flex; flex-wrap: wrap; gap: 10px; }
.share-buttons a {
	text-decoration: none;
	font-size: 0.95rem;
	color: var(--text);
	border: 1px solid rgba(255, 255, 255, 0.04);
	background: var(--card-bg);
	padding: 6px 12px;
	border-radius: 999px;
}
.share-buttons a:hover { border-color: var(--accent); color: var(--accent); }
.last-updated { margin-top: 14px; color: var(--muted); font-size: 0.9rem; }
form label { display: grid; gap: 6px; margin-bottom: 12px; }
input, textarea {
	background: rgba(255,255,255,0.05);
	border: 1px solid var(--border);
	border-radius: 10px;
	color: var(--text);
	padding: 10px;
	font-family: inherit;
}
input:focus, textarea:focus {
	outline: 2px solid rgba(59, 130, 246, 0.6);
	border-color: transparent;
}
.form-status { margin-top: 10px; color: var(--accent-2); min-height: 20px; }

/* -------------------------
   Footer
-------------------------- */
/* Footer spacing uses 60px vertical + 40px horizontal for clean rhythm */
.footer {
	border-top: 1px solid rgba(255,255,255,0.1);
	padding: 60px 40px;
	background: #0a0f1e;
	text-align: center;
}
.footer-inner {
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	gap: 16px;
}
.footer p {
	font-size: 0.9rem;
	opacity: 0.7;
	margin: 0;
}
.footer-links {
	display: inline-flex;
	align-items: center;
	gap: 0;
	font-size: 0.92rem;
	opacity: 0.7;
}
.footer-links a { text-decoration: none; }
.footer-links a + a::before {
	content: "|";
	margin-right: 16px;
	color: rgba(255,255,255,0.5);
}
.footer-links a + a { margin-left: 16px; }
.footer-socials {
	display: inline-flex;
	gap: 24px;
	font-size: 1rem;
}
.footer-socials a { text-decoration: none; opacity: 0.7; }
.footer-socials a:hover { opacity: 1; }
.back-to-top {
	position: fixed;
	right: 24px;
	bottom: 24px;
	background: var(--accent);
	color: #fff;
	border: none;
	border-radius: 999px;
	width: 40px; height: 40px;
	cursor: pointer;
	transition: transform 0.3s;
	box-shadow: var(--shadow);
}
.back-to-top:hover { transform: translateY(-2px); }

/* -------------------------
   Scroll animations
-------------------------- */
.reveal { opacity: 1; transform: translateY(0); }
[data-animate] { opacity: 1; transform: translateY(0); }
[data-stagger] > * { opacity: 1; transform: translateY(0); }

body.js .reveal {
	opacity: 0;
	transform: translateY(24px);
	transition: opacity 0.8s, transform 0.8s;
}
body.js .reveal.visible { opacity: 1; transform: translateY(0); }

/* Keep section backgrounds visually stable while scrolling */
body.js section.reveal,
body.js section.reveal.visible {
	opacity: 1;
	transform: none;
	transition: none;
}

body.js section.reveal::before,
body.js section.reveal.visible::before {
	opacity: 0.62;
}
body.js [data-animate] {
	opacity: 0;
	transform: translateY(18px);
	transition: opacity 0.8s, transform 0.8s;
}
body.js [data-animate].visible { opacity: 1; transform: translateY(0); }
body.js [data-stagger] > * {
	opacity: 0;
	transform: translateY(18px);
	transition: opacity 0.8s, transform 0.8s;
}
body.js [data-stagger] > *.visible { opacity: 1; transform: translateY(0); }

@keyframes float {
	0%, 100% { transform: translateY(0); }
	50% { transform: translateY(-12px); }
}
@keyframes pulse {
	0%, 100% { opacity: 0.8; }
	50% { opacity: 1; }
}
@keyframes blink {
	50% { opacity: 0; }
}

/* -------------------------
   Responsive tweaks
-------------------------- */
@media (max-width: 1024px) {
	.grid-4 { grid-template-columns: repeat(2, 1fr); }
	.grid-3 { grid-template-columns: repeat(2, 1fr); }
	#projects .project-grid { grid-template-columns: 1fr; }
	.featured-top { grid-template-columns: 1fr; }
	.featured-links { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.system-shot { flex-basis: calc((100% - 12px) / 2); }
	.hero-content { grid-template-columns: 1fr; }
	.about-layout { grid-template-columns: 1fr; }
	.contact-layout { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
	.nav-toggle { display: flex; }
	.nav-menu {
		position: fixed;
		top: var(--nav-height);
		right: 0;
		width: 70%;
		max-width: 300px;
		height: calc(100vh - var(--nav-height));
		background: rgba(15, 23, 42, 0.96);
		backdrop-filter: blur(12px);
		padding: 20px;
		flex-direction: column;
		gap: 12px;
		display: none;
		transform: translateX(110%);
		transition: transform 0.3s ease;
		z-index: 1100;
	}
	.nav-menu.open {
		display: flex;
		transform: translateX(0);
	}
	#projects .project-card,
	#projects .project-card-featured,
	#projects .featured-top,
	#projects .featured-left-stack,
	#projects .featured-box,
	#projects .featured-description-box,
	#projects .featured-actions,
	#projects .featured-gallery,
	#projects .system-carousel,
	#projects .system-carousel-track,
	#projects .system-shot {
		min-width: 0;
		max-width: 100%;
		box-sizing: border-box;
	}
	#projects .project-card-featured {
		overflow: hidden;
	}
	.project-grid { gap: 18px; }
	.project-card { padding: 16px 14px; }
	.project-media { aspect-ratio: 16 / 9; max-height: none; }
	#projects .featured-media,
	#projects .project-card-featured .project-media {
		max-height: 190px;
	}
	#projects .wearable-media,
	#projects .thumbnail-media {
		max-height: none;
		width: 100%;
		aspect-ratio: 4 / 3;
	}
	#projects .thumbnail-media {
		aspect-ratio: auto;
	}
	#projects .wearable-media img,
	#projects .thumbnail-media img {
		width: 100%;
		height: auto;
		max-width: 100%;
		object-fit: contain;
		object-position: top center;
	}
	.project-card .links {
		display: grid;
		grid-template-columns: 1fr 1fr;
		gap: 8px;
	}
	.project-card .links a {
		min-width: 0;
		white-space: normal;
		word-break: break-word;
	}
	.project-info { padding-top: 12px; }
	.project-info h3 { font-size: 1.2rem; }
	.project-info p {
		font-size: 0.96rem;
		line-height: 1.75;
		max-width: 100%;
	}
	.featured-top { gap: 14px; }
	#projects .featured-description-box { order: 1; }
	#projects .featured-left-stack { order: 2; }
	#projects .featured-actions { order: 3; }
	.featured-media { aspect-ratio: 4 / 3; }
	.featured-links { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.featured-links a {
		white-space: normal;
		word-break: break-word;
		font-size: 0.9rem;
		padding: 8px 10px;
	}
	#projects .featured-description-box h3 {
		font-size: 1.08rem;
		line-height: 1.35;
	}
	#projects .sdgp-points {
		padding-left: 16px;
		gap: 6px;
		line-height: 1.65;
	}
	#projects .system-carousel { padding: 6px; }
	#projects .system-carousel-track { gap: 8px; }
	.system-shot {
		flex: 0 0 100%;
		max-width: 100%;
		padding: 6px;
	}
	#projects .system-shot img {
		max-height: 180px;
		object-fit: cover;
	}
}
@media (max-width: 700px) {
	.section { padding: 60px 0; }
	.grid-3, .grid-2 { grid-template-columns: 1fr; }
	.project-card-featured { padding: 16px; }
	.featured-links { grid-template-columns: 1fr; }
	.system-shot { flex-basis: 100%; }
	.project-card .links { grid-template-columns: 1fr; }
	#projects .featured-media,
	#projects .project-card-featured .project-media { max-height: 170px; }
	#projects .wearable-media,
	#projects .thumbnail-media {
		max-height: none;
		width: 100%;
		aspect-ratio: 4 / 3;
	}
	#projects .thumbnail-media {
		aspect-ratio: auto;
	}
	#projects .wearable-media img,
	#projects .thumbnail-media img { object-fit: contain; }
	.filters { margin-bottom: 16px; }
	.hero { min-height: auto; padding-top: calc(var(--nav-height) + 20px); }
	.hero-text h1 { font-size: clamp(2rem, 8vw, 2.6rem); }
	.subtitle { font-size: 1rem; }
	.eyebrow { letter-spacing: 1.8px; }
	.hero-meta { gap: 8px; }
	.hero-meta span { font-size: 0.9rem; }
	.cta-group { flex-direction: column; align-items: stretch; }
	.cta-group .btn { width: 100%; text-align: center; }
	.section-header { align-items: flex-start; }
	.section-intro { max-width: 100%; }
	.about-card { flex-direction: column; align-items: flex-start; }
	.about-card img { width: 96px; height: 96px; }
	.contact-details { grid-template-columns: 1fr; }
	.profile-list a { width: 100%; }
	.share-buttons { flex-direction: column; align-items: stretch; }
	.share-buttons a { width: 100%; text-align: center; }
	.footer-inner { flex-direction: column; }
	.footer-links { flex-wrap: wrap; justify-content: center; }
	.footer-links a + a::before { display: none; }
	.footer-links a + a { margin-left: 0; }
}

@media (max-width: 480px) {
	.container { width: min(1200px, 94%); }
	.nav-menu {
		width: 100%;
		max-width: none;
	}
	.project-card-featured { padding: 12px; }
	.featured-box { padding: 12px; }
	.glass,
	.about-summary,
	.about-card,
	.education-card,
	.project-card,
	.cert-card,
	.achievement,
	.blog-card,
	.contact-group {
		padding: 16px 14px;
	}
	.featured-links {
		grid-template-columns: 1fr;
		gap: 8px;
	}
	.featured-links a {
		white-space: normal;
		text-align: center;
	}
	.system-carousel { padding: 8px; }
	.system-shot { padding: 6px; }
	#projects .featured-media,
	#projects .project-card-featured .project-media { max-height: 150px; }
	#projects .wearable-media,
	#projects .thumbnail-media {
		max-height: none;
		width: 100%;
		aspect-ratio: 4 / 3;
	}
	#projects .thumbnail-media {
		aspect-ratio: auto;
	}
	#projects .wearable-media img,
	#projects .thumbnail-media img {
		width: 100%;
		height: auto;
		object-fit: contain;
		object-position: top center;
	}
	#projects .system-shot img { max-height: 150px; }
	.project-info h3 { font-size: 1.2rem; }
	h2 { font-size: clamp(1.45rem, 6.2vw, 1.8rem); }
	h3 { font-size: clamp(1.05rem, 5vw, 1.25rem); }
	.about-summary .lead { font-size: 1rem; }
}

/* Unified section child color */
.section .glass,
.section .about-summary,
.section .about-card,
.section .education-card,
.section .project-card,
.section .project-card-featured,
.section .featured-box,
.section .system-carousel,
.section .system-shot,
.section .contact-group,
.section .profile-list a,
.section .share-buttons a,
.section .hero-meta span,
.section .featured-links a {
	background: #0206179E;
}

@media (prefers-reduced-motion: reduce) {
	* { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
	html { scroll-behavior: auto; }
}
