/* CSS Variables */
:root {
    --bg-color: #F5F5F7;
    /* Apple light gray background */
    --text-primary: #1D1D1F;
    /* Apple almost black */
    --text-secondary: #86868B;
    --accent-color: #0071E3;
    /* Apple Blue */
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.5);
    --glass-blur: 20px;
    --card-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
    --font-stack: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang TC", "Helvetica Neue", sans-serif;
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-stack);
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

/* Typography */
h1,
h2,
h3 {
    font-weight: 600;
    letter-spacing: -0.02em;
}

.section-title {
    font-size: 48px;
    /* Large, bold titles */
    margin-bottom: 60px;
    text-align: center;
}

/* Navigation - Glassmorphism */
.glass-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-content {
    width: 90%;
    max-width: 1200px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-weight: 700;
    font-size: 20px;
    color: var(--text-primary);
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    font-size: 14px;
    color: var(--text-secondary);
}

.nav-links a:hover {
    color: var(--accent-color);
}

.lang-btn {
    background: transparent;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 20px;
    padding: 4px 12px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
    margin-left: 10px;
}

.lang-btn:hover {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.2);
}

/* Hero Section */
.hero-section {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 20px;
}

.hero-title {
    font-size: 80px;
    line-height: 1.1;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #1D1D1F 0%, #424245 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 24px;
    color: var(--text-secondary);
    font-weight: 400;
    max-width: 600px;
}

/* Animations */
.fade-in-up {
    animation: fadeInUp 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
    transform: translateY(30px);
}

.fade-in-delay {
    animation: fadeIn 1s ease forwards 1s;
    /* 1s delay */
    opacity: 0;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
}

.mouse {
    width: 26px;
    height: 42px;
    border: 2px solid var(--text-secondary);
    border-radius: 20px;
    display: flex;
    justify-content: center;
    padding-top: 8px;
}

.wheel {
    width: 4px;
    height: 8px;
    background-color: var(--text-secondary);
    border-radius: 2px;
    animation: scroll 1.5s infinite;
}

@keyframes scroll {
    0% {
        transform: translateY(0);
        opacity: 1;
    }

    100% {
        transform: translateY(10px);
        opacity: 0;
    }
}

/* Layout Containers */
.section-container {
    padding: 120px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Glass Card */
.glass-card {
    background: #FFFFFF;
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 24px;
    /* Apple-like rounded corners */
    box-shadow: var(--card-shadow);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease;
    overflow: hidden;
}

.glass-card:hover {
    transform: scale(1.02);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
}

/* About Grid */
.about-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-text p {
    font-size: 20px;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.about-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.stat-item {
    padding: 40px 20px;
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 48px;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-label {
    font-size: 16px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Portfolio Grid */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 40px;
}

.project-card {
    display: block;
    height: 100%;
}

.placeholder-image {
    width: 100%;
    height: 240px;
    background: linear-gradient(45deg, #F2F2F7, #E5E5EA);
}

.card-content {
    padding: 32px;
}

.project-title {
    font-size: 24px;
    margin-bottom: 12px;
}

.project-desc {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.project-tag {
    font-size: 14px;
    color: var(--accent-color);
    font-weight: 600;
}

/* Footer */
.footer-section {
    padding: 100px 20px;
    text-align: center;
    background: #F5F5F7;
    border-top: 1px solid var(--border-color);
}

.footer-title {
    font-size: 48px;
    margin-bottom: 16px;
}

.social-links {
    margin: 40px 0;
    display: flex;
    justify-content: center;
    gap: 40px;
}

.social-link {
    font-size: 18px;
    color: var(--text-secondary);
}

.social-link:hover {
    color: var(--accent-color);
}

.copyright {
    font-size: 12px;
    color: #C7C7CC;
}

/* Reveal Animation Class (JS triggered) */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.delay-100 {
    transition-delay: 0.1s;
}

.delay-200 {
    transition-delay: 0.2s;
}

/* Responsive */
@media (max-width: 768px) {
    .header-title {
        font-size: 56px;
    }

    .about-grid {
        grid-template-columns: 1fr;
    }

    .section-title {
        font-size: 36px;
    }
}

/* Mobile Responsive Adjustments */
@media (max-width: 768px) {
    .hero-title {
        /* 1. 縮小字體 (原本可能很大，試試看 2.5rem 或 3rem) */
        font-size: 2.8rem !important;

        /* 2. 強制不換行 (這行是關鍵) */
        white-space: nowrap;

        /* 3. 如果字還是太長，允許縮小字距一點點 */
        letter-spacing: -1px;
    }
}