/* ---------- Theme ---------- */
:root {
	--bg: #0b0c10;
	--card: #111218;
	--card-bg: #111218;
	--muted: #b3b7c0;
	--text: #e8ecf1;
	--brand: #7c5cff;
	--brand-2: #00d4ff;
	--accent: #7c5cff;
	--ring: rgba(124, 92, 255, 0.45);
	--shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
	--shadow-md: 0 8px 24px rgba(0, 0, 0, 0.3);
	--border-radius: 16px;
	--border-radius-sm: 8px;
}

* {
	box-sizing: border-box;
}

/* ---------- Skip Link ---------- */
.skip-link {
	position: absolute;
	top: -100%;
	left: 16px;
	z-index: 1000;
	padding: 8px 16px;
	background: var(--brand);
	color: #fff;
	border-radius: var(--border-radius-sm);
	font-weight: 600;
	text-decoration: none;
}
.skip-link:focus {
	top: 12px;
}
html {
	scroll-behavior: smooth;
}
body {
	margin: 0;
	color: var(--text);
	font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica,
		Arial, "Apple Color Emoji", "Segoe UI Emoji";
	background: radial-gradient(
			900px 520px at 70% -10%,
			rgba(124, 92, 255, 0.12),
			transparent 60%
		),
		radial-gradient(
			900px 520px at -10% 10%,
			rgba(0, 212, 255, 0.1),
			transparent 60%
		),
		var(--bg);
	line-height: 1.6;
}

/* ================= NAVBAR ================= */
.nav {
	position: fixed;
	inset: 0 0 auto 0;
	height: 72px;
	z-index: 1002;
	display: grid;
	grid-template-columns: auto 1fr auto auto;
	align-items: center;
	gap: 12px;
	padding: 0 20px;
	max-width: 1200px;
	margin-inline: auto;

	transition: background-color 0.3s ease, border-color 0.3s ease,
		backdrop-filter 0.3s ease;
}

.nav.is-scrolled {
	background: rgba(11, 12, 16, 0.75);
	-webkit-backdrop-filter: blur(8px) saturate(140%);
	backdrop-filter: blur(8px) saturate(140%);
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}

.nav-toggle {
	display: none;
	position: absolute;
	right: 4px;
	top: 50%;
	transform: translateY(-50%);
	width: 44px;
	height: 44px;
	cursor: pointer;
	background: transparent;
	border: none;
	padding: 10px;
	z-index: 10000;
}

.nav-toggle .bar {
	display: block;
	width: 100%;
	height: 3px;
	background-color: var(--text);
	border-radius: 2px;
	transition: all 0.3s ease;
}

.nav-toggle .bar:nth-child(2) {
	margin-top: 6px;
}

.nav-toggle .bar:nth-child(3) {
	margin-top: 6px;
}

.nav-toggle.active .bar:nth-child(1) {
	transform: translateY(9px) rotate(45deg);
}
.nav-toggle.active .bar:nth-child(2) {
	opacity: 0;
}
.nav-toggle.active .bar:nth-child(3) {
	transform: translateY(-9px) rotate(-45deg);
}
.nav-links {
	list-style: none;
	display: flex;
	justify-content: center;
	gap: 28px;
	margin: 0;
	padding: 0;
}
.nav-links a {
	color: var(--text);
	text-decoration: none;
	font-weight: 700;
	padding: 10px 12px;
	border-radius: 12px;
	transition: background 0.2s ease, transform 0.1s ease;
}
.nav-links a:hover {
	background: rgba(255, 255, 255, 0.08);
}
.nav-links a:active {
	transform: translateY(1px);
}
.nav-links a:focus-visible {
	outline: none;
	box-shadow: 0 0 0 4px var(--ring);
}
.nav-links a[aria-current="page"] {
	background: rgba(255, 255, 255, 0.12);
}

.brand {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	text-decoration: none;
	color: var(--text);
}

.brand-mark {
	width: 28px;
	height: 28px;
	border-radius: 999px;
	display: grid;
	place-items: center;
	background: #000;
	color: #fff;
	font-weight: 800;
	font-size: 14px;
	line-height: 1;
}

.resume-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: #0e0e0e;
	color: #fff;
	border: 1px solid rgba(255, 255, 255, 0.16);
	height: 44px;
	padding: 0 16px;
	border-radius: 12px;
	text-decoration: none;
	font-weight: 700;
	transition: all 0.3s ease;
}

.resume-btn:hover {
	box-shadow: 0 0 0 6px var(--ring);
}

.lang-toggle {
	background: transparent;
	color: var(--text);
	border: 1px solid rgba(255, 255, 255, 0.16);
	padding: 8px 14px;
	min-height: 40px;
	display: inline-flex;
	align-items: center;
	border-radius: 8px;
	font-weight: 700;
	font-size: 13px;
	cursor: pointer;
	transition: all 0.3s ease;
}
.lang-toggle:hover {
	border-color: rgba(255, 255, 255, 0.32);
	box-shadow: 0 0 0 4px var(--ring);
}

.hide-desktop {
	display: none;
}

:target {
	scroll-margin-top: 90px;
}

/* ===== Breakpoints ===== */
@media (max-width: 900px) {
	.nav {
		grid-template-columns: auto 1fr auto;
		z-index: auto;
	}

	/* ---- Fullscreen overlay (Apple-style) ---- */
	.nav-links {
		position: fixed;
		top: 0;
		left: 0;
		right: 0;
		bottom: 0;
		z-index: 9999;
		background: #0b0c10;
		display: flex;
		flex-direction: column;
		justify-content: flex-start;
		padding: 80px 28px 40px;
		gap: 0;
		overflow-y: auto;
		-webkit-overflow-scrolling: touch;
		transform: translateY(-100%);
		transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
		pointer-events: none;
	}
	.nav-links.open {
		transform: translateY(0);
		pointer-events: auto;
	}
	.nav-links li {
		opacity: 0;
		transform: translateY(12px);
		transition: opacity 0.3s ease, transform 0.3s ease;
	}
	.nav-links.open li {
		opacity: 1;
		transform: translateY(0);
	}
	.nav-links.open li:nth-child(1) { transition-delay: 0.06s; }
	.nav-links.open li:nth-child(2) { transition-delay: 0.10s; }
	.nav-links.open li:nth-child(3) { transition-delay: 0.14s; }
	.nav-links.open li:nth-child(4) { transition-delay: 0.18s; }
	.nav-links.open li:nth-child(5) { transition-delay: 0.22s; }
	.nav-links.open li:nth-child(6) { transition-delay: 0.26s; }
	.nav-links.open li:nth-child(7) { transition-delay: 0.30s; }
	.nav-links.open li:nth-child(8) { transition-delay: 0.34s; }
	.nav-links.open li:nth-child(9) { transition-delay: 0.38s; }

	.nav-links a {
		display: block;
		padding: 12px 0;
		font-size: 1.5rem;
		font-weight: 700;
		letter-spacing: -0.02em;
		color: var(--text);
		border: none;
		border-radius: 0;
		background: none;
	}
	.nav-links a:hover {
		background: none;
		color: var(--brand);
	}
	.nav-links a[aria-current="page"] {
		background: none;
		color: var(--brand);
	}

	/* Utility links (lang, GitHub, Resume) */
	.nav-links .hide-desktop {
		border-top: none;
		margin-top: 0;
		padding-top: 0;
	}
	.nav-links .hide-desktop:first-of-type {
		margin-top: 20px;
		padding-top: 0;
	}
	.nav-links .hide-desktop a {
		font-size: 1rem;
		font-weight: 500;
		color: var(--muted);
		border: none;
	}


	/* Toggle button over overlay */
	.nav-toggle {
		display: block;
		position: fixed;
		top: 26px;
		right: 20px;
		transform: none;
		z-index: 10000;
	}
	.hide-desktop {
		display: list-item;
	}
	.hide-mobile {
		display: none !important;
	}
	.nav-links li:nth-child(3),
	.nav-links li:nth-child(4),
	.nav-links li:nth-child(5) {
		display: list-item;
	}

	/* Lock scroll when menu open */
	body.menu-open {
		overflow: hidden;
	}
}
@media (max-width: 600px) {
	.nav {
		padding: 0 12px;
	}
	.hero {
		padding-top: 120px;
	}
}

/* ---------- Hero (100vh) ---------- */
.hero {
	min-height: 100vh;
	padding: 120px 20px 32px;
	display: grid;
	place-items: center;
	position: relative;
	overflow: hidden;
}
.hero-inner {
	max-width: 980px;
	text-align: center;
}
.hero h1 {
	font-size: clamp(32px, 5vw, 56px);
	margin: 0 0 10px;
	letter-spacing: 0.2px;
}
.lead {
	color: var(--muted);
	margin: 0 0 24px;
	font-size: clamp(16px, 2.2vw, 20px);
}
.bg-shape {
	position: absolute;
	inset: -40% -20% auto auto;
	width: 70vmax;
	height: 70vmax;
	background: conic-gradient(
		from 180deg at 50% 50%,
		rgba(124, 92, 255, 0.25),
		rgba(0, 212, 255, 0.25),
		transparent 60%
	);
	filter: blur(40px);
	opacity: 0.7;
	pointer-events: none;
}

/* ---------- Sections ---------- */
.section {
	padding: clamp(56px, 9vw, 80px) 20px;
	max-width: 1100px;
	margin: 0 auto;
}

.section-title {
	font-size: clamp(24px, 3vw, 36px);
	margin: 0 0 24px;
}

/* About */
#about p {
	font-size: clamp(1rem, 2vw, 1.15rem);
	line-height: 1.8;
	color: var(--muted);
	max-width: 680px;
	text-align: center;
	margin-inline: auto;
}
@media (max-width: 600px) {
	#about p {
		text-align: left;
		line-height: 1.75;
		font-size: 0.95rem;
	}
}

/* Cards */
.grid {
	display: grid;
	grid-template-columns: repeat(12, 1fr);
	gap: 16px;
}
.card {
	grid-column: span 12;
	background: var(--card);
	border: 1px solid rgba(255, 255, 255, 0.06);
	border-radius: 16px;
	overflow: hidden;
	transition: transform 0.3s ease, box-shadow 0.3s ease;

	/* ▼▼▼ เพิ่ม 3 บรรทัดนี้ (Symmetry Part 1) ▼▼▼ */
	display: flex;
	flex-direction: column;
}
.card:hover {
	transform: translateY(-4px); /* แก้ไข: ขยับมากขึ้น */
	box-shadow: 0 12px 30px rgba(0, 0, 0, 0.28);
}

.card-body {
	padding: 20px;
	/* ▼▼▼ [ปรับปรุง] Card Symmetry (Part 2) ▼▼▼ */
	display: flex;
	flex-direction: column;
	flex-grow: 1; /* ทำให้ card-body ยืดเต็ม Card */
	/* ▲▲▲ [สิ้นสุด] ▲▲▲ */
}
.card-title {
	margin: 0 0 8px;
	font-size: 20px;
}
.card-text {
	color: var(--muted);
	margin: 0 0 16px;
}
.card-actions {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;

	/* ▼▼▼ เพิ่มบรรทัดนี้ (Symmetry Part 3) ▼▼▼ */
	margin-top: auto; /* ◀◀◀ นี่คือตัวที่ดันปุ่มไปอยู่ล่างสุด */
}
.btn {
	display: inline-block;
	padding: 10px 14px;
	border-radius: 12px;
	text-decoration: none;
	color: var(--text);
	border: 1px solid rgba(255, 255, 255, 0.16);
	transition: all 0.3s ease; /* [เพิ่ม] Transition */
}
.btn:hover {
	border-color: rgba(255, 255, 255, 0.32);
	box-shadow: 0 0 0 6px var(--ring);
}
.btn.primary {
	background: linear-gradient(90deg, var(--brand), var(--brand-2));
	border: none;
}
.btn.ghost {
	background: transparent;
}
.card-actions .btn {
	min-height: 40px;
}

/* --- Card Image --- */
.card-img {
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background: rgba(255, 255, 255, 0.04);
	flex-shrink: 0;
}
.card-img img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.3s ease;
}
.card-img img.img-bottom {
	object-position: bottom;
}
.card:hover .card-img img {
	transform: scale(1.03);
}

/* --- Exp Divider --- */
.exp-divider {
	border: none;
	border-top: 1px solid rgba(136, 146, 176, 0.2);
	margin: 1.2rem 0;
}

/* --- Card Tags --- */
.card-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-bottom: 12px;
}
.card-tag {
	display: inline-block;
	padding: 3px 10px;
	border-radius: 50px;
	font-size: 0.75em;
	font-weight: 500;
	white-space: nowrap;
	background: rgba(124, 92, 255, 0.1);
	color: #a78bfa;
	border: 1px solid rgba(124, 92, 255, 0.2);
}
.card-tag.tag-green {
	background: rgba(16, 185, 129, 0.1);
	color: #34d399;
	border-color: rgba(16, 185, 129, 0.25);
}
.card-tag.tag-blue {
	background: rgba(59, 130, 246, 0.1);
	color: #60a5fa;
	border-color: rgba(59, 130, 246, 0.25);
}
.card-tag.tag-cyan {
	background: rgba(6, 182, 212, 0.1);
	color: #22d3ee;
	border-color: rgba(6, 182, 212, 0.25);
}
.card-tag.tag-amber {
	background: rgba(245, 158, 11, 0.1);
	color: #fbbf24;
	border-color: rgba(245, 158, 11, 0.25);
}
.card-tag.tag-pink {
	background: rgba(236, 72, 153, 0.1);
	color: #f472b6;
	border-color: rgba(236, 72, 153, 0.25);
}
.card-tag.tag-red {
	background: rgba(239, 68, 68, 0.1);
	color: #f87171;
	border-color: rgba(239, 68, 68, 0.25);
}
.card-tag.tag-purple {
	background: rgba(124, 92, 255, 0.1);
	color: #a78bfa;
	border-color: rgba(124, 92, 255, 0.2);
}

/* --- Projects Toggle --- */
.project-extra {
	display: none;
}
#projects.show-all .project-extra {
	display: flex;
}
.projects-toggle-wrap {
	text-align: center;
	margin-top: 24px;
}
.projects-toggle {
	cursor: pointer;
	font-size: 15px;
	font-weight: 600;
	background: transparent;
	color: var(--accent);
	border: 1px solid var(--accent);
	padding: 12px 24px;
	border-radius: 12px;
	transition: all 0.3s ease;
}
.projects-toggle:hover {
	background: rgba(124, 92, 255, 0.1);
	box-shadow: 0 0 0 4px var(--ring);
}

/* --- Skill Tags Styles (ปรับปรุง) --- */
.skill-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem; /* ระยะห่างระหว่าง tags */
	justify-content: center; /* จัดกลาง */
	margin-top: 2rem;
}

.skill-tag {
	background-color: var(--card-bg);
	color: var(--accent); /* สีข้อความ */
	padding: 0.8rem 1.5rem; /* ปรับขนาด padding ให้ใหญ่ขึ้น */
	border-radius: 50px; /* ทำให้โค้งมน */
	font-size: 1.1em; /* ปรับขนาด font ให้ใหญ่ขึ้น */
	font-weight: 500;
	box-shadow: var(--shadow-sm);
	transition: transform 0.2s ease, box-shadow 0.2s ease,
		background-color 0.2s ease;
	border: 1px solid rgba(255, 255, 255, 0.1); /* เพิ่มขอบ */
}

.skill-tag:hover {
	transform: translateY(-3px) scale(1.05); /* เลื่อนขึ้นและขยายเล็กน้อย */
	box-shadow: var(--shadow-md);
	background-color: rgba(255, 255, 255, 0.05); /* เปลี่ยนสีพื้นหลังเล็กน้อย */
}

.contact-list {
	list-style: none;
	padding: 0;
	margin: 10px 0 0;
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
}
.contact-list a {
	color: var(--text);
	text-decoration: none;
	border-bottom: 1px dashed rgba(255, 255, 255, 0.35);
}
.contact-list a:hover {
	border-bottom-style: solid;
}

/* Footer */
.footer {
	padding: 40px 20px 80px;
	text-align: center;
	color: var(--muted);
}

/* Back to Top */
.back-to-top {
	position: fixed;
	bottom: 2rem;
	right: 2rem;
	width: 48px;
	height: 48px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--brand);
	color: #fff;
	font-size: 1.4rem;
	border-radius: 50%;
	text-decoration: none;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.3s, transform 0.3s;
	transform: translateY(10px);
	box-shadow: var(--shadow-md);
	z-index: 90;
}
.back-to-top.visible {
	opacity: 1;
	pointer-events: auto;
	transform: translateY(0);
}
.back-to-top:hover {
	background: var(--brand-2);
	transform: translateY(-2px);
}

/* ---------- Mobile Responsive ---------- */
@media (max-width: 768px) {
	/* 1. Touch targets — min 44px */
	.btn {
		min-height: 44px;
		display: inline-flex;
		align-items: center;
		justify-content: center;
	}
	.card-actions .btn {
		min-height: 44px;
	}

	/* 2. Contact links stack vertically */
	.contact-list {
		flex-direction: column;
		gap: 14px;
	}

	/* 3. Skills tag spacing */
	.skill-tags {
		gap: 0.75rem;
	}
	.skill-tag {
		padding: 0.65rem 1.2rem;
		font-size: 1rem;
	}
}

@media (max-width: 480px) {
	/* 4. Back-to-top smaller on very small screens */
	.back-to-top {
		bottom: 1rem;
		right: 1rem;
		width: 42px;
		height: 42px;
		font-size: 1.2rem;
	}

	/* 5. Footer clearance for back-to-top */
	.footer {
		padding-bottom: 100px;
	}

	/* 6. Hero tighter on small phones */
	.hero {
		padding-top: 100px;
		padding-bottom: 20px;
	}
}

/* Responsive */
@media (min-width: 769px) {
	.card {
		grid-column: span 4;
	}
}

/* ใช้ breakpoint ที่ 768px หรือต่ำกว่า */
@media (max-width: 768px) {
	/* 1. เปลี่ยน container ของ project ให้เป็น Flexbox */
	#projects .grid {
		display: flex; /* เปลี่ยนจาก Grid เป็น Flex */
		overflow-x: auto; /* ◀ นี่คือพระเอก: ทำให้ scroll แนวนอนได้ */

		/* (Optional) ทำให้การ scroll "snap" เข้าที่ */
		-webkit-scroll-snap-type: x mandatory;
		scroll-snap-type: x mandatory;

		/* (Optional) เพิ่ม padding ด้านล่างเผื่อแถบ scrollbar */
		padding-bottom: 24px;
	}

	/* 2. กำหนดขนาดให้ Card แต่ละใบ */
	#projects .card {
		/* ยกเลิกการ span 12 (เพราะไม่ใช่ grid แล้ว) */
		grid-column: unset;

		/* * กำหนดความกว้างการ์ด (เช่น 85% ของจอ)
		 * เพื่อให้ผู้ใช้ "แอบเห็น" การ์ดใบถัดไปทางขวา 
		*/
		flex: 0 0 85%;

		/* (Optional) คู่กับ scroll-snap-type */
		scroll-snap-align: start;
	}
}

@media (prefers-color-scheme: light) {
	:root {
		--bg: #f7f8fb;
		--card: #ffffff;
		--card-bg: #ffffff;
		--text: #0f172a;
		--muted: #475569;
		--brand: #6d28d9;
		--brand-2: #0ea5e9;
		--accent: #6d28d9;
		--ring: rgba(59, 130, 246, 0.35);
		--shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
		--shadow-md: 0 8px 24px rgba(0, 0, 0, 0.12);
		--border-radius: 16px;
		--border-radius-sm: 8px;
	}
	.nav.is-scrolled {
		background: rgba(255, 255, 255, 0.85);
		border-bottom-color: rgba(15, 23, 42, 0.06);
	}
	body {
		background: radial-gradient(
				900px 520px at 70% -10%,
				rgba(109, 40, 217, 0.1),
				transparent 60%
			),
			radial-gradient(
				900px 520px at -10% 10%,
				rgba(14, 165, 233, 0.1),
				transparent 60%
			),
			var(--bg);
	}
	.skill-tags li {
		background: rgba(15, 23, 42, 0.04);
		border-color: rgba(15, 23, 42, 0.08);
	}
	.skill-tags li img {
		filter: invert(1);
	}
	.card-img {
		background: rgba(15, 23, 42, 0.04);
	}
	.card-tag {
		background: rgba(109, 40, 217, 0.08);
		color: #7c3aed;
		border-color: rgba(109, 40, 217, 0.2);
	}
	.card-tag.tag-green {
		background: rgba(5, 150, 105, 0.08);
		color: #059669;
		border-color: rgba(5, 150, 105, 0.2);
	}
	.card-tag.tag-blue {
		background: rgba(37, 99, 235, 0.08);
		color: #2563eb;
		border-color: rgba(37, 99, 235, 0.2);
	}
	.card-tag.tag-cyan {
		background: rgba(8, 145, 178, 0.08);
		color: #0891b2;
		border-color: rgba(8, 145, 178, 0.2);
	}
	.card-tag.tag-amber {
		background: rgba(217, 119, 6, 0.08);
		color: #b45309;
		border-color: rgba(217, 119, 6, 0.2);
	}
	.card-tag.tag-pink {
		background: rgba(219, 39, 119, 0.08);
		color: #db2777;
		border-color: rgba(219, 39, 119, 0.2);
	}
	.card-tag.tag-red {
		background: rgba(220, 38, 38, 0.08);
		color: #dc2626;
		border-color: rgba(220, 38, 38, 0.2);
	}
	.card-tag.tag-purple {
		background: rgba(109, 40, 217, 0.08);
		color: #7c3aed;
		border-color: rgba(109, 40, 217, 0.2);
	}
	.lang-toggle {
		border-color: rgba(15, 23, 42, 0.16);
	}
	.lang-toggle:hover {
		border-color: rgba(15, 23, 42, 0.32);
	}
	.nav-links {
		background: #f7f8fb;
	}
}

/* --- Experience & Education inline-style replacements --- */
.exp-title {
	font-weight: 700;
	color: var(--text);
}
.exp-subtitle {
	font-weight: 400;
	color: var(--muted);
	display: block;
}
.exp-detail {
	font-weight: 400;
	color: var(--muted);
	display: block;
	font-size: 14px;
	margin-top: 4px;
}
.exp-heading {
	font-weight: 600;
	margin-top: 16px;
}

.details-list {
	list-style: disc; /* ใช้ bullet points */
	padding-left: 20px; /* เพิ่มระยะห่างด้านซ้าย */
	margin: 10px 0 0;
	color: var(--muted);
	font-size: 15px;
}
.details-list li {
	margin-bottom: 8px; /* ระยะห่างระหว่างข้อ */
}

/* ทำให้ Card Education ใช้ 2 ส่วน และ Experience 1 ส่วน ในจอใหญ่ */
@media (min-width: 769px) {
	#experience .grid .card:nth-child(1) {
		grid-column: span 4; /* Experience */
	}
	#experience .grid .card:nth-child(2) {
		grid-column: span 8; /* Education */
	}
}

/* ในจอขนาดกลาง ให้ทั้งคู่กว้างเท่ากัน (6) */
@media (min-width: 769px) and (max-width: 1024px) {
	#experience .grid .card:nth-child(1),
	#experience .grid .card:nth-child(2) {
		grid-column: span 6;
	}
}

/* --- Certifications Section Styles --- */
.certifications-grid {
	display: grid;
	grid-template-columns: repeat(
		auto-fit,
		minmax(280px, 1fr)
	); /* ปรับขนาดขั้นต่ำของแต่ละใบ */
	gap: 2rem;
	margin-top: 2rem;
	justify-items: center; /* จัดกลางใน grid */
}

.certification-item {
	background-color: var(--card-bg); /* ใช้สีพื้นหลังเดียวกับ card */
	border-radius: var(--border-radius);
	padding: 1rem;
	text-align: center;
	box-shadow: var(--shadow-sm);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
	max-width: 400px; /* จำกัดความกว้างสูงสุดของแต่ละใบ */
	width: 100%;
}

.certification-item:hover {
	transform: translateY(-5px); /* เลื่อนขึ้นเล็กน้อยเมื่อ hover */
	box-shadow: var(--shadow-md);
}

.certification-item a {
	text-decoration: none;
	color: inherit;
	display: block; /* ทำให้ลิงก์ครอบคลุมทั้ง div */
}

.certification-item img {
	max-width: 100%;
	height: auto;
	border-radius: var(--border-radius-sm);
	margin-bottom: 1rem;
	border: 1px solid rgba(255, 255, 255, 0.1); /* ขอบบางๆ */
}

.certification-item .certification-title {
	font-weight: 600;
	font-size: 1.1em;
	margin-bottom: 0.5rem;
	color: var(--text);
}

.certification-item .certification-date {
	font-size: 0.9em;
	color: var(--muted);
}

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