/*
Theme Name: Fauzi Profile
Theme URI: https://fauzi.ams-group.com.my
Author: Mohamed Fauzi Bin Abdul Malik
Description: One-page portfolio & resume theme for Mohamed Fauzi Bin Abdul Malik, Software Engineer / Head of R&D.
Version: 1.0
Requires at least: 6.4
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: fauzi-profile
*/

/* ---------- Tokens ---------- */
:root {
	--bg-dark: #0b1220;
	--bg-dark-alt: #101a30;
	--surface: #ffffff;
	--surface-alt: #f4f6fb;
	--border: #e6e9f2;
	--text: #1a2233;
	--text-soft: #5b6478;
	--text-invert: #f5f7fb;
	--text-invert-soft: #aab3c9;
	--accent: #4f8cff;
	--accent-2: #7c5cff;
	--accent-soft: #eaf0ff;
	--radius-lg: 20px;
	--radius-md: 14px;
	--radius-sm: 10px;
	--shadow: 0 20px 40px -12px rgba(15, 23, 42, 0.18);
	--maxw: 1140px;
	--gap: clamp(1.25rem, 3vw, 2.5rem);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
	margin: 0;
	font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	color: var(--text);
	background: var(--surface);
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 { font-family: "Poppins", "Inter", sans-serif; line-height: 1.2; margin: 0; }
p { margin: 0; }
.container {
	max-width: var(--maxw);
	margin: 0 auto;
	padding: 0 1.5rem;
}
.visually-hidden {
	position: absolute; width: 1px; height: 1px; overflow: hidden;
	clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- Section scaffolding ---------- */
.section { padding: clamp(3.5rem, 8vw, 6.5rem) 0; }
.section-dark { background: var(--bg-dark); color: var(--text-invert); }
.section-alt { background: var(--surface-alt); }
.section-head { max-width: 640px; margin: 0 auto clamp(2rem, 5vw, 3.25rem); text-align: center; }
.eyebrow {
	display: inline-block;
	font-size: 0.78rem;
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--accent);
	margin-bottom: 0.75rem;
}
.section-dark .eyebrow { color: #9ec1ff; }
.section-title { font-size: clamp(1.6rem, 3vw, 2.25rem); font-weight: 700; }
.section-sub { margin-top: 0.85rem; color: var(--text-soft); font-size: 1.02rem; }
.section-dark .section-sub { color: var(--text-invert-soft); }

/* ---------- Buttons ---------- */
.btn {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.85rem 1.6rem;
	border-radius: 999px;
	font-weight: 600;
	font-size: 0.95rem;
	border: 1px solid transparent;
	cursor: pointer;
	transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease;
	white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
	background: linear-gradient(135deg, var(--accent), var(--accent-2));
	color: #fff;
	box-shadow: 0 12px 24px -8px rgba(79, 140, 255, 0.55);
}
.btn-primary:hover { box-shadow: 0 16px 30px -8px rgba(79, 140, 255, 0.65); transform: translateY(-1px); }
.btn-ghost {
	background: rgba(255, 255, 255, 0.06);
	color: var(--text-invert);
	border-color: rgba(255, 255, 255, 0.25);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.14); }
.btn-outline {
	background: transparent;
	border-color: var(--border);
	color: var(--text);
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.btn svg { width: 18px; height: 18px; flex-shrink: 0; }

/* ---------- Nav ---------- */
.site-nav {
	position: fixed;
	inset: 0 0 auto 0;
	z-index: 100;
	padding: 0.9rem 0;
	background: rgba(11, 18, 32, 0.55);
	backdrop-filter: saturate(160%) blur(14px);
	-webkit-backdrop-filter: saturate(160%) blur(14px);
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
	transition: background 0.25s ease, padding 0.25s ease;
}
.site-nav.is-scrolled { padding: 0.55rem 0; background: rgba(11, 18, 32, 0.88); }
.nav-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: flex; align-items: center; gap: 0.6rem; color: var(--text-invert); font-weight: 700; letter-spacing: 0.01em; }
.brand-mark {
	width: 38px; height: 38px; border-radius: 11px;
	background: linear-gradient(135deg, var(--accent), var(--accent-2));
	display: flex; align-items: center; justify-content: center;
	color: #fff; font-family: "Poppins", sans-serif; font-weight: 700; font-size: 1rem;
}
.nav-links {
	display: flex;
	align-items: center;
	gap: 2rem;
}
.nav-links a {
	color: var(--text-invert-soft);
	font-size: 0.92rem;
	font-weight: 500;
	transition: color 0.15s ease;
}
.nav-links a:hover { color: #fff; }
.nav-cta { display: flex; align-items: center; gap: 0.75rem; }
.nav-toggle {
	display: none;
	width: 42px; height: 42px;
	border-radius: 10px;
	border: 1px solid rgba(255, 255, 255, 0.25);
	background: rgba(255, 255, 255, 0.06);
	color: #fff;
	align-items: center;
	justify-content: center;
	cursor: pointer;
}
.nav-toggle svg { width: 20px; height: 20px; }

@media (max-width: 860px) {
	.nav-links { display: none; }
	.nav-cta .btn-primary { display: none; }
	.nav-toggle { display: inline-flex; }
	.mobile-menu {
		position: fixed;
		inset: 0;
		background: rgba(9, 14, 26, 0.98);
		z-index: 150;
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		gap: 1.75rem;
		transform: translateY(-8px);
		opacity: 0;
		pointer-events: none;
		transition: opacity 0.2s ease, transform 0.2s ease;
	}
	.mobile-menu.is-open { opacity: 1; transform: translateY(0); pointer-events: auto; }
	.mobile-menu a { font-size: 1.35rem; font-weight: 600; color: #fff; }
	.mobile-menu .btn { margin-top: 0.5rem; }
	.mobile-close {
		position: absolute; top: 1.3rem; right: 1.3rem;
		width: 42px; height: 42px; border-radius: 10px;
		border: 1px solid rgba(255, 255, 255, 0.25);
		background: rgba(255, 255, 255, 0.06); color: #fff;
		display: flex; align-items: center; justify-content: center; cursor: pointer;
	}
	.mobile-close svg { width: 20px; height: 20px; }
}

/* ---------- Hero ---------- */
.hero {
	position: relative;
	background:
		radial-gradient(60% 60% at 85% 10%, rgba(124, 92, 255, 0.35), transparent),
		radial-gradient(50% 50% at 10% 0%, rgba(79, 140, 255, 0.3), transparent),
		linear-gradient(180deg, var(--bg-dark) 0%, var(--bg-dark-alt) 100%);
	color: var(--text-invert);
	padding: clamp(7.5rem, 14vw, 10rem) 0 clamp(4rem, 8vw, 6rem);
	overflow: hidden;
}
.hero-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: clamp(2.5rem, 6vw, 3.5rem);
	align-items: center;
}
.hero-photo-wrap { order: -1; display: flex; justify-content: center; padding: 1.5rem 1rem; }
.hero-photo {
	position: relative;
	width: min(280px, 70vw);
	aspect-ratio: 4 / 5;
	border-radius: var(--radius-lg);
	padding: 6px;
	background: linear-gradient(135deg, var(--accent), var(--accent-2));
	transform: rotate(6deg);
	box-shadow: 0 25px 45px -12px rgba(0, 0, 0, 0.5), 0 8px 20px -6px rgba(79, 140, 255, 0.35);
	transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.45s ease;
}
.hero-photo:hover {
	transform: rotate(0deg) translateY(-8px) scale(1.04);
	box-shadow: 0 35px 60px -12px rgba(0, 0, 0, 0.55), 0 14px 30px -8px rgba(79, 140, 255, 0.45);
}
.hero-photo img {
	width: 100%; height: 100%; object-fit: cover; border-radius: calc(var(--radius-lg) - 4px);
	border: 4px solid var(--bg-dark);
	display: block;
}

@media (prefers-reduced-motion: reduce) {
	.hero-photo { transition: none; }
}
.hero-copy { text-align: center; }
.hero-eyebrow {
	display: inline-flex; align-items: center; gap: 0.5rem;
	background: rgba(255, 255, 255, 0.08);
	border: 1px solid rgba(255, 255, 255, 0.15);
	padding: 0.45rem 1rem; border-radius: 999px;
	font-size: 0.82rem; font-weight: 600; color: #cfe0ff;
	margin-bottom: 1.25rem;
}
.hero-eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 0 4px rgba(74, 222, 128, 0.2); }
.hero-title { font-size: clamp(2.1rem, 6vw, 3.4rem); font-weight: 700; letter-spacing: -0.01em; }
.hero-title span { background: linear-gradient(135deg, #9ec1ff, #c9b8ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-role { margin-top: 0.9rem; font-size: clamp(1.05rem, 2.4vw, 1.3rem); color: #cdd8f2; font-weight: 500; }
.hero-desc { margin-top: 1.25rem; color: var(--text-invert-soft); font-size: 1.02rem; max-width: 46ch; margin-left: auto; margin-right: auto; }
.hero-actions { margin-top: 2rem; display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.hero-meta { margin-top: 2.5rem; display: flex; gap: 0.6rem; flex-wrap: wrap; justify-content: center; }
.hero-meta a, .hero-meta span {
	display: inline-flex; align-items: center; gap: 0.45rem;
	font-size: 0.86rem; color: var(--text-invert-soft);
	background: rgba(255, 255, 255, 0.05);
	border: 1px solid rgba(255, 255, 255, 0.1);
	padding: 0.45rem 0.85rem; border-radius: 999px;
}
.hero-meta a:hover { color: #fff; border-color: rgba(255, 255, 255, 0.3); }
.hero-meta svg { width: 15px; height: 15px; }

.stat-row {
	margin-top: clamp(3rem, 6vw, 4rem);
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 1rem;
	max-width: 720px;
	margin-left: auto;
	margin-right: auto;
}
.stat-card {
	background: rgba(255, 255, 255, 0.06);
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: var(--radius-md);
	padding: 1.1rem 0.75rem;
	text-align: center;
}
.stat-num { font-family: "Poppins", sans-serif; font-size: clamp(1.4rem, 3vw, 1.9rem); font-weight: 700; color: #fff; }
.stat-label { margin-top: 0.25rem; font-size: 0.8rem; color: var(--text-invert-soft); }

@media (min-width: 720px) {
	.stat-row { grid-template-columns: repeat(4, 1fr); }
}

@media (min-width: 960px) {
	.hero-grid { grid-template-columns: 1.15fr 0.85fr; text-align: left; }
	.hero-photo-wrap { order: 2; }
	.hero-copy { text-align: left; }
	.hero-desc { margin-left: 0; margin-right: 0; }
	.hero-actions { justify-content: flex-start; }
	.hero-meta { justify-content: flex-start; }
	.hero-photo { width: min(320px, 30vw); }
}

/* ---------- About ---------- */
.about-grid { display: grid; gap: var(--gap); grid-template-columns: 1fr; }
.about-lede { font-size: 1.08rem; color: var(--text-soft); }
.fact-list { margin-top: 1.75rem; display: grid; gap: 0.85rem; }
.fact-item {
	display: flex; align-items: flex-start; gap: 0.8rem;
	padding: 0.9rem 1rem;
	background: var(--surface); border: 1px solid var(--border);
	border-radius: var(--radius-sm);
}
.fact-item .ic {
	flex-shrink: 0; width: 38px; height: 38px; border-radius: 10px;
	background: var(--accent-soft); color: var(--accent);
	display: flex; align-items: center; justify-content: center;
}
.fact-item .ic svg { width: 19px; height: 19px; }
.fact-title { font-weight: 600; font-size: 0.92rem; }
.fact-value { font-size: 0.88rem; color: var(--text-soft); margin-top: 0.1rem; }

@media (min-width: 860px) {
	.about-grid { grid-template-columns: 1.1fr 0.9fr; align-items: start; }
}

/* ---------- Skills ---------- */
.skills-grid { display: grid; gap: 1.25rem; grid-template-columns: 1fr; }
.skill-card {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius-md);
	padding: 1.5rem;
	box-shadow: var(--shadow);
}
.skill-card-section.has-divider { margin-top: 1.35rem; padding-top: 1.35rem; border-top: 1px dashed var(--border); }
.skill-card-head { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1.1rem; }
.skill-card-head .ic {
	width: 42px; height: 42px; border-radius: 12px;
	background: linear-gradient(135deg, var(--accent), var(--accent-2));
	color: #fff; display: flex; align-items: center; justify-content: center;
}
.skill-card-head .ic svg { width: 21px; height: 21px; }
.skill-card-head h3 { font-size: 1.02rem; font-weight: 700; }
.pill-row { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.pill {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	font-size: 0.82rem; font-weight: 500;
	padding: 0.4rem 0.8rem;
	background: var(--surface-alt);
	border: 1px solid var(--border);
	border-radius: 999px;
	color: var(--text);
}
.pill-learning {
	background: transparent;
	border-style: dashed;
	color: var(--text-soft);
}
.pill-tag {
	font-size: 0.62rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--accent-2);
}
.skills-legend {
	margin-top: 1.1rem;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.6rem;
	flex-wrap: wrap;
	font-size: 0.85rem;
	color: var(--text-soft);
}

@media (min-width: 700px) {
	.skills-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1080px) {
	.skills-grid { grid-template-columns: repeat(3, 1fr); }
	.skill-card:nth-child(4), .skill-card:nth-child(5) { grid-column: span 1; }
}

/* ---------- Experience timeline ---------- */
.timeline { position: relative; max-width: 820px; margin: 0 auto; }
.timeline::before {
	content: "";
	position: absolute; left: 19px; top: 6px; bottom: 6px;
	width: 2px; background: linear-gradient(180deg, var(--accent), var(--accent-2));
	opacity: 0.35;
}
.timeline-item { position: relative; padding-left: 3.25rem; margin-bottom: 2.25rem; }
.timeline-item:last-child { margin-bottom: 0; }
.timeline-dot {
	position: absolute; left: 0; top: 0.15rem;
	width: 40px; height: 40px; border-radius: 50%;
	background: var(--surface); border: 2px solid var(--accent);
	display: flex; align-items: center; justify-content: center;
	color: var(--accent);
}
.timeline-dot svg { width: 18px; height: 18px; }
.timeline-card {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius-md);
	padding: 1.4rem 1.5rem;
	box-shadow: var(--shadow);
}
.timeline-badge {
	display: inline-block; font-size: 0.76rem; font-weight: 700;
	letter-spacing: 0.04em; text-transform: uppercase;
	color: var(--accent); background: var(--accent-soft);
	padding: 0.28rem 0.7rem; border-radius: 999px; margin-bottom: 0.65rem;
}
.timeline-role { font-size: 1.15rem; font-weight: 700; }
.timeline-org { margin-top: 0.15rem; font-size: 0.92rem; color: var(--text-soft); font-weight: 500; }
.timeline-list { margin-top: 0.9rem; display: grid; gap: 0.5rem; }
.timeline-list li { position: relative; padding-left: 1.15rem; font-size: 0.93rem; color: var(--text-soft); }
.timeline-list li::before {
	content: ""; position: absolute; left: 0; top: 0.55em;
	width: 6px; height: 6px; border-radius: 50%; background: var(--accent-2);
}
.timeline-summary { margin-top: 0.9rem; font-size: 0.95rem; color: var(--text-soft); }
.timeline-details { display: none; }
.timeline-item.is-open .timeline-details { display: block; }
.timeline-toggle {
	margin-top: 1.1rem;
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	background: none;
	border: none;
	padding: 0;
	color: var(--accent);
	font-weight: 600;
	font-size: 0.88rem;
	font-family: inherit;
	cursor: pointer;
}
.timeline-toggle svg { width: 16px; height: 16px; transition: transform 0.2s ease; }
.timeline-item.is-open .timeline-toggle svg { transform: rotate(180deg); }
.timeline-toggle .show-less-text { display: none; }
.timeline-item.is-open .timeline-toggle .show-more-text { display: none; }
.timeline-item.is-open .timeline-toggle .show-less-text { display: inline; }
.timeline-highlights {
	margin-top: 1.1rem; padding: 1rem 1.1rem;
	background: var(--surface-alt); border-radius: var(--radius-sm);
	border: 1px dashed var(--border);
}
.timeline-highlights h4 { font-size: 0.86rem; font-weight: 700; margin-bottom: 0.6rem; color: var(--text); }

/* ---------- Education & certs ---------- */
.edu-grid { display: grid; gap: var(--gap); grid-template-columns: 1fr; }
.edu-col h3 {
	font-size: 1.05rem; font-weight: 700; margin-bottom: 1.25rem;
	display: flex; align-items: center; gap: 0.6rem;
}
.edu-col h3 svg { width: 20px; height: 20px; color: var(--accent); }
.edu-entry {
	display: flex; gap: 1rem;
	padding: 1.1rem 0;
	border-bottom: 1px solid var(--border);
}
.edu-entry:last-child { border-bottom: none; }
.edu-year {
	flex-shrink: 0; width: 64px;
	font-weight: 700; color: var(--accent); font-size: 0.92rem;
}
.edu-name { font-weight: 600; font-size: 0.96rem; }
.edu-org { margin-top: 0.15rem; font-size: 0.86rem; color: var(--text-soft); }

@media (min-width: 860px) {
	.edu-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Contact ---------- */
.contact-wrap { display: grid; gap: 1.5rem; grid-template-columns: 1fr; max-width: 920px; margin: 0 auto; }
.contact-card {
	background: rgba(255, 255, 255, 0.05);
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: var(--radius-md);
	padding: 1.4rem;
	display: flex; align-items: center; gap: 1rem;
	transition: background 0.15s ease, border-color 0.15s ease;
}
a.contact-card:hover { background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.3); }
.contact-card .ic {
	width: 46px; height: 46px; border-radius: 12px; flex-shrink: 0;
	background: linear-gradient(135deg, var(--accent), var(--accent-2));
	display: flex; align-items: center; justify-content: center; color: #fff;
}
.contact-card .ic svg { width: 22px; height: 22px; }
.contact-label { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-invert-soft); }
.contact-value { font-weight: 600; font-size: 1rem; margin-top: 0.15rem; word-break: break-word; }
.contact-cta { text-align: center; margin-top: 2.5rem; }

@media (min-width: 720px) {
	.contact-wrap { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- Footer ---------- */
.site-footer {
	background: #070c17; color: var(--text-invert-soft);
	padding: 1.75rem 0; font-size: 0.85rem;
	text-align: center;
	border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.site-footer strong { color: #fff; }

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	.reveal { opacity: 1; transform: none; transition: none; }
}
