/* ===================== Base Variables ===================== */

:root {
	--glass-bg: rgba(255, 255, 255, 0.08);
	--glass-border: rgba(255, 255, 255, 0.12);
	--text-primary: #e8ecf4;
	--text-secondary: #b4c0d8;
	--grad-soft: linear-gradient(135deg, #f8c8dc 0%, #c7d2fe 45%, #b8e1dc 100%);
}
* {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}
body {
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	line-height: 1.6;
	overflow-x: hidden;
	display: flex;
	flex-direction: column;
	min-height: 100vh;
	padding-top: 80px;
	transition: background 0.8s ease, color 0.8s ease;
}
/* ===================== 深淺模式 ===================== */

body.dark-mode {
	--glass-bg: rgba(255, 255, 255, 0.08);
	--glass-border: rgba(255, 255, 255, 0.12);
	--text-primary: #e8ecf4;
	--text-secondary: #b4c0d8;
	--grad-soft: linear-gradient(135deg, #8a8aff 0%, #5fc3ff 45%, #7effc2 100%);
	background: #0e1120;
	color: var(--text-primary);
}
body:not(.dark-mode) {
	--glass-bg: rgba(255, 255, 255, 0.5);
	--glass-border: rgba(179, 175, 175, 0.3);
	--text-primary: #252424;
	--text-secondary: #4a4a4a;
	--grad-soft: linear-gradient(135deg, #fce4ec 0%, #d0d4fe 45%, #d0f0eb 100%);
	background: #f1f1f1;
}
/* ===================== Background decoration ===================== */

.bg-decoration {
	position: fixed;
	inset: 0;
	pointer-events: none;
	z-index: -1;
}
.bg-decoration::before, .bg-decoration::after {
	content: "";
	position: absolute;
	border-radius: 50%;
	filter: blur(70px);
	transform: translate3d(0, 0, 0);
	animation: floatSlow 60s linear infinite;
}
.bg-decoration::before {
	width: 45vmax;
	height: 45vmax;
	top: -5%;
	left: -10%;
	opacity: 0.4;
	background: radial-gradient(circle at 30% 30%, rgba(255, 200, 180, 0.25), rgba(255, 200, 180, 0) 70%), radial-gradient(circle at 70% 70%, rgba(180, 240, 220, 0.2), rgba(180, 240, 220, 0) 70%), radial-gradient(circle at 50% 50%, rgba(200, 210, 255, 0.2), rgba(200, 210, 255, 0) 70%);
}
.bg-decoration::after {
	width: 55vmax;
	height: 55vmax;
	bottom: -10%;
	right: -5%;
	opacity: 0.35;
	background: radial-gradient(circle at 25% 25%, rgba(255, 220, 180, 0.2), rgba(255, 220, 180, 0) 70%), radial-gradient(circle at 75% 75%, rgba(180, 240, 230, 0.15), rgba(180, 240, 230, 0) 70%), radial-gradient(circle at 50% 50%, rgba(210, 220, 255, 0.15), rgba(210, 220, 255, 0) 70%);
}
@keyframes floatSlow {
	0% {
		transform: translate(0px, 0px);
	}
	25% {
		transform: translate(20px, -10px);
	}
	50% {
		transform: translate(0px, 20px);
	}
	75% {
		transform: translate(-20px, 10px);
	}
	100% {
		transform: translate(0px, 0px);
	}
}
/* ===================== Header ===================== */

.site-header {
	position: fixed;
	top: 0;
	width: 100%;
	backdrop-filter: blur(20px) saturate(120%);
	background: var(--glass-bg);
	border-bottom: 1px solid var(--glass-border);
	z-index: 1000;
	padding: 0.75rem 2rem;
	display: flex;
	justify-content: center;
}
.container.header-inner {
	width: 100%;
	max-width: 1200px;
	display: flex;
	align-items: center;
	justify-content: space-between;
}
.brand {
	display: flex;
	align-items: center;
	gap: 1rem;
}
.brand .logo img {
	width: 48px;
	height: 48px;
	border-radius: 50%;
}
.brand-text .title {
	font-size: 1.25rem;
	font-weight: 700;
	color: var(--text-primary);
}
.brand-text .subtitle {
	font-size: 0.875rem;
	color: var(--text-secondary);
}
.site-nav ul {
	list-style: none;
	display: flex;
	gap: 0.75rem;
	align-items: center;
}
.site-nav .btn {
	padding: 0.5rem 1rem;
	font-size: 0.875rem;
	border-radius: 12px;
}
.site-nav .btn:hover {
	transform: translateY(-1px);
	box-shadow: 0 8px 24px rgba(248, 200, 220, 0.25);
}
/* ===================== Glass Card / Badges / Buttons ===================== */

.glass-card, .about-card, .card, .chip, .btn-glass {
	background: var(--glass-bg);
	backdrop-filter: blur(20px) saturate(120%);
	border: 1px solid var(--glass-border);
	color: var(--text-primary);
}
.glass-card {
	border-radius: 24px;
	padding: 2rem;
	max-width: 420px;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}
.glass-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}
.badge {
	display: inline-flex;
	align-items: center;
	padding: 0.5rem 1rem;
	border-radius: 999px;
	margin-right: 0.5rem;
	margin-bottom: 0.5rem;
	font-size: 0.875rem;
}
.badge.neon {
	background: var(--grad-soft);
	color: #0f1329;
	box-shadow: 0 4px 16px rgba(248, 200, 220, 0.2);
}
.btn {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.875rem 1.5rem;
	border: none;
	border-radius: 16px;
	font-size: 1rem;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}
.btn-gradient {
	background: var(--grad-soft);
	color: #0f1329;
	box-shadow: 0 8px 24px rgba(248, 200, 220, 0.25);
}
.btn-gradient:hover {
	transform: translateY(-2px);
	box-shadow: 0 12px 36px rgba(248, 200, 220, 0.35);
}
/* ===================== 回到頂部按鈕 ===================== */

#backToTop {
	position: fixed;
	bottom: 2rem;
	right: 2rem;
	z-index: 1000;
	padding: 0.75rem 1rem;
	border-radius: 12px;
	background: var(--glass-bg);
	backdrop-filter: blur(20px);
	border: 1px solid var(--glass-border);
	color: var(--text-primary);
	cursor: pointer;
	transition: background 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}
#backToTop:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 24px rgba(248, 200, 220, 0.25);
}
/* ===================== Section ===================== */

.section {
	padding: 4rem 2rem;
	display: flex;
	justify-content: center;
	color: var(--text-primary);
}
.section.alt {
	background: rgba(255, 255, 255, 0.05);
}
/* Container */

.container {
	max-width: 1200px;
	width: 100%;
}
/* 關於我 */

.about-card {
	display: flex;
	flex-wrap: wrap;
	gap: 2rem;
	border-radius: 24px;
	padding: 2rem;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}
.about-image img {
	width: 300px;
	max-width: 100%;
	border-radius: 16px;
}
.about-text h2 {
	font-size: 2rem;
	margin-bottom: 1rem;
}
.about-text p {
	margin-bottom: 1rem;
}
.highlights {
	list-style: disc;
	margin-left: 1.5rem;
}
/* 技能 Chips */

.chips {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}
.chip {
	padding: 0.5rem 1rem;
	border-radius: 999px;
	font-size: 0.875rem;
}
/* 作品 Cards */

/* 卡片容器改為上下排列 */

.cards {
	display: flex;
	flex-direction: column;
	/* 上下堆疊 */
	gap: 1.5rem;
	/* 卡片間距 */
}
/* 卡片本身 */

.card {
	background: var(--glass-bg);
	backdrop-filter: blur(20px) saturate(120%);
	border: 1px solid var(--glass-border);
	border-radius: 24px;
	padding: 1.5rem;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}
/* 卡片內部左右分區 */

.card-inner {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 1rem;
}
/* 左側文字區 */

.card-info {
	flex: 1;
	padding: 1rem;
	border: 1px solid var(--glass-border);
	border-radius: 16px;
	background: rgba(255, 255, 255, 0.05);
}
/* 右側按鈕區 */

.card-action {
	flex-shrink: 0;
	padding: 1rem;
	border: 1px solid var(--glass-border);
	border-radius: 16px;
	background: rgba(255, 255, 255, 0.05);
	display: flex;
	align-items: center;
}
/* 手機響應式 */

@media (max-width: 768px) {
	.card-inner {
		flex-direction: column;
		align-items: stretch;
	}
	.card-action {
		margin-top: 1rem;
		justify-content: flex-start;
	}
}
/* Footer */

.site-footer {
	padding: 2rem;
	color: var(--text-secondary);
	background: rgba(255, 255, 255, 0.05);
	backdrop-filter: blur(20px);
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	text-align: center;
}
/* 大框 */

.card-large {
	background: var(--glass-bg);
	backdrop-filter: blur(20px) saturate(120%);
	border: 1px solid var(--glass-border);
	border-radius: 24px;
	padding: 2rem;
	display: flex;
	flex-direction: column;
	gap: 1rem;
}
/* 大框標題 */

.card-large h3 {
	margin-bottom: 0.5rem;
	color: var(--text-primary);
}
/* 每個作品 */

.project {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 1rem;
	border-radius: 16px;
	background: rgba(255, 255, 255, 0.05);
	gap: 1rem;
}
/* 左側文字區 */

.project-info {
	flex: 1;
}
/* 前往按鈕 */

.project-action .btn {
	background: var(--glass-bg);
	color: var(--text-primary);
	border-radius: 12px;
	padding: 0.75rem 1rem;
	cursor: pointer;
	transition: background 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
	text-decoration: none;
	/* a 標籤去掉下劃線 */
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-shadow: none;
	/* 預設沒有陰影 */
}
/* hover 效果 */

.project-action .btn:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 24px rgba(248, 200, 220, 0.25);
}
/* 響應式：手機改上下排列 */

@media (max-width: 768px) {
	.project {
		flex-direction: column;
		align-items: stretch;
	}
	.project-action {
		margin-top: 1rem;
		justify-content: flex-start;
	}
}
/* 聯繫我表單 */

#contact form {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}
.form-group {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}
.form-group label {
	font-weight: 600;
	color: var(--text-primary);
}
.form-group input, .form-group textarea {
	padding: 0.75rem 1rem;
	border: 1px solid var(--glass-border);
	border-radius: 12px;
	background: rgba(255, 255, 255, 0.05);
	color: var(--text-primary);
	font-size: 1rem;
	outline: none;
}
.form-group input:focus, .form-group textarea:focus {
	border-color: #a5b4fc;
	box-shadow: 0 0 8px rgba(165, 180, 252, 0.4);
}
#contact button.btn {
	align-self: flex-start;
	background: var(--glass-bg);
	color: var(--text-primary);
}
#contact button.btn:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 24px rgba(248, 200, 220, 0.25);
}
/* 包住 textarea 的容器 */

.textarea-wrapper {
	position: relative;
	width: 100%;
}
/* 文字框 */

.textarea-wrapper textarea {
	width: 100%;
	padding: 1rem;
	padding-bottom: 2rem;
	/* 預留空間給字數計數器 */
	border-radius: 12px;
	border: 1px solid var(--glass-border);
	background: var(--glass-bg);
	color: var(--text-primary);
	resize: none;
	font-size: 1rem;
	line-height: 1.5;
}
/* 字數顯示在框內右下角 */

#charCount {
	position: absolute;
	bottom: 8px;
	right: 12px;
	font-size: 0.8rem;
	color: var(--text-secondary);
	pointer-events: none;
	/* 不影響輸入 */
}
