:root {
    --primary-color: #2d3436;
    --secondary-color: #636e72;
    --accent-color: #00b894;
    --bg-color: #ffffff;
    --text-color: #2d3436;
    --light-gray: #f5f6fa;
    --code-font: 'Fira Code', monospace;
}

* {
    font-family: 'Noto Sans TC', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    line-height: 1.8;
    color: var(--text-color);
    background-color: var(--bg-color);
    font-weight: 400;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Hero Section */
.hero-section {
    min-height: 100vh;
    background-color: var(--light-gray);
    padding: 80px 0;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(0, 184, 148, 0.05) 0%, transparent 20%),
        radial-gradient(circle at 90% 80%, rgba(0, 184, 148, 0.05) 0%, transparent 20%),
        linear-gradient(135deg, rgba(45, 52, 54, 0.03) 0%, rgba(0, 184, 148, 0.03) 100%);
}

#particles-js {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

.hero-subtitle {
    font-size: 1.1rem;
    font-weight: 300;
    color: var(--secondary-color);
    max-width: 800px;
    margin: 0 auto 2rem;
    line-height: 1.8;
}

.code-text {
    font-family: var(--code-font);
    background: rgba(45, 52, 54, 0.05);
    padding: 0.2em 0.4em;
    border-radius: 3px;
    color: var(--accent-color);
}

.tech-icon {
    font-size: 2rem;
    margin: 0 12px;
    color: var(--secondary-color);
    transition: all 0.3s ease;
}

.tech-icon:hover {
    color: var(--accent-color);
    transform: translateY(-5px);
}

/* Skills Section */
.skill-card {
    background: var(--bg-color);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

.skill-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--accent-color);
    transform: scaleY(0);
    transition: transform 0.3s ease;
    transform-origin: bottom;
}

.skill-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

.skill-card:hover::before {
    transform: scaleY(1);
}

.skill-icon {
    font-size: 2rem;
    color: var(--accent-color);
    margin-bottom: 1.5rem;
}

.skill-title {
    font-size: 1.25rem;
    font-weight: 500;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.skill-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.skill-list li {
    margin-bottom: 0.5rem;
    color: var(--secondary-color);
    display: flex;
    align-items: center;
}

.skill-list li::before {
    content: '•';
    color: var(--accent-color);
    font-weight: bold;
    margin-right: 0.5rem;
}

/* Section Styles */
.section {
    padding: 100px 0;
    position: relative;
    overflow: hidden;
}

.section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDAiIGhlaWdodD0iNDAiIHZpZXdCb3g9IjAgMCA0MCA0MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNMCAwaDQwdjQwSDB6IiBmaWxsPSJub25lIi8+PGNpcmNsZSBjeD0iMiIgY3k9IjIiIHI9IjEiIGZpbGw9InJnYmEoMCwgMTg0LCAxNDgsIDAuMSkiLz48L3N2Zz4=');
    opacity: 0.5;
    z-index: -1;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 3rem;
    color: var(--primary-color);
    text-align: center;
}

/* Floating Shapes */
.floating-shapes {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
}

.shape {
    position: absolute;
    border-radius: 50%;
    background: rgba(0, 184, 148, 0.1);
    animation: float 20s infinite linear;
}

.shape:nth-child(1) {
    width: 100px;
    height: 100px;
    left: 10%;
    top: 20%;
    animation-delay: 0s;
}

.shape:nth-child(2) {
    width: 150px;
    height: 150px;
    right: 15%;
    bottom: 25%;
    animation-delay: -5s;
}

.shape:nth-child(3) {
    width: 80px;
    height: 80px;
    left: 50%;
    top: 50%;
    animation-delay: -10s;
}

@keyframes float {
    0% {
        transform: translate(0, 0) rotate(0deg);
    }
    33% {
        transform: translate(30px, -50px) rotate(120deg);
    }
    66% {
        transform: translate(-20px, 20px) rotate(240deg);
    }
    100% {
        transform: translate(0, 0) rotate(360deg);
    }
}

/* Terminal Style */
.terminal-style {
    background: #2d3436;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 2rem 0;
    position: relative;
    font-family: var(--code-font);
    color: #fff;
}

.terminal-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    background: #636e72;
    padding: 0.5rem 1rem;
    border-radius: 8px 8px 0 0;
    font-size: 0.9rem;
}

.terminal-dots {
    display: flex;
    gap: 6px;
}

.terminal-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.terminal-dot.red { background: #ff5f56; }
.terminal-dot.yellow { background: #ffbd2e; }
.terminal-dot.green { background: #27c93f; }

.terminal-content {
    margin-top: 2rem;
    line-height: 1.6;
}

.code-line {
    display: block;
    margin: 0.5rem 0;
    color: #fff;
}

.code-comment { color: #6c757d; }
.code-keyword { color: #ff79c6; }
.code-string { color: #50fa7b; }
.code-function { color: #8be9fd; }

/* About Section */
.about-content {
    background: var(--bg-color);
    border-radius: 16px;
    padding: 3rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.about-content::before {
    content: '/* About Me */';
    font-family: var(--code-font);
    position: absolute;
    top: 1rem;
    right: 1rem;
    color: var(--accent-color);
    opacity: 0.1;
    font-size: 1.2rem;
}

.about-skills {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 2rem;
}

/* Skill Tags Style */
.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-top: 1rem;
}

.skill-tag {
    background: rgba(0, 184, 148, 0.1);
    color: var(--accent-color);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    cursor: default;
}

.skill-tag:hover {
    background: var(--accent-color);
    color: white;
    transform: translateY(-2px);
}

/* Education Section */
.education-section {
    background-color: var(--light-gray);
}

.education-card {
    background: var(--bg-color);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.education-card .card-title {
    color: var(--primary-color);
    font-size: 1.25rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.education-card .card-subtitle {
    color: var(--accent-color);
    font-size: 1rem;
    margin-bottom: 1rem;
}

.education-card .card-text {
    color: var(--secondary-color);
}

/* Contact Section */
.contact-button {
    background-color: var(--accent-color);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 30px;
    font-weight: 500;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
    display: inline-block;
    margin-bottom: 0;
}

.contact-button:hover {
    background-color: var(--accent-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 184, 148, 0.3);
}

.contact-info {
    background-color: var(--bg-color);
}

.contact-info .lead {
    color: var(--secondary-color);
}

.contact-info a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-info a:hover {
    color: var(--primary-color);
}

/* Footer */
footer {
    background-color: var(--primary-color);
    color: white;
    padding: 2rem 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        padding: 60px 0;
    }

    .hero-title {
        font-size: 1.8rem;
    }

    .hero-subtitle {
        font-size: 1rem;
        padding: 0 20px;
    }

    .hero-content .terminal-style {
        margin: 0 15px 2rem;
        font-size: 0.9rem;
    }

    .tech-icon {
        font-size: 1.8rem;
        margin: 0 8px;
    }

    .section-title {
        font-size: 2rem;
    }

    .about-skills {
        justify-content: center;
    }

    .skill-tags {
        gap: 0.5rem;
    }

    .skill-tag {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }

    .contact-button {
        margin-bottom: 0;
    }
    
    .scroll-hint {
        /* 不要 bottom 屬性 */
    }
}

/* 新增打字機效果 */
.typewriter {
    position: relative;
    display: inline-block;
    white-space: nowrap;
    margin: 0 auto;
}

.typewriter::after {
    content: '|';
    position: absolute;
    right: -1px;
    top: 50%;
    transform: translateY(-55%);
    color: var(--accent-color);
    font-weight: normal;
    font-size: 1.2em;
    animation: blink-caret 0.8s step-end infinite;
    z-index: 1;
}

@media (min-width: 769px) {
    .typewriter {
        overflow: hidden;
        animation: typing 4s steps(40, end) forwards;
        width: 0;
        padding-right: 2px;
    }
}

@keyframes typing {
    from { 
        width: 0;
        padding-right: 2px;
    }
    to { 
        width: 55%;
        padding-right: 2px;
    }
}

@keyframes blink-caret {
    from, to { opacity: 0 }
    50% { opacity: 1 }
}

/* 移除舊的進度條樣式 */
.skill-progress,
.progress-bar {
    display: none;
}

/* 新增項目卡片樣式 */
.project-card {
    background: var(--bg-color);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.project-card::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 50px 50px 0;
    border-color: transparent var(--accent-color) transparent transparent;
    transition: all 0.3s ease;
}

.project-card:hover::after {
    border-width: 0 100px 100px 0;
}

.project-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.project-description {
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 1rem;
}

.project-tag {
    background: rgba(0, 184, 148, 0.1);
    color: var(--accent-color);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

.project-tag:hover {
    background: var(--accent-color);
    color: white;
}

/* Timeline Style */
.timeline {
    position: relative;
    padding: 2rem 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 100%;
    background: linear-gradient(to bottom, transparent, var(--accent-color), transparent);
}

.timeline-item {
    margin-bottom: 3rem;
    position: relative;
    width: 50%;
    padding: 0 2rem;
}

.timeline-item:nth-child(odd) {
    left: 0;
    text-align: right;
}

.timeline-item:nth-child(even) {
    left: 50%;
    text-align: left;
}

.timeline-dot {
    position: absolute;
    width: 20px;
    height: 20px;
    background: var(--accent-color);
    border-radius: 50%;
    top: 0;
    border: 4px solid var(--bg-color);
    box-shadow: 0 0 0 3px var(--accent-color);
    transition: all 0.3s ease;
}

.timeline-item:hover .timeline-dot {
    transform: scale(1.2);
    box-shadow: 0 0 0 4px var(--accent-color);
}

.timeline-item:nth-child(odd) .timeline-dot {
    right: -10px;
}

.timeline-item:nth-child(even) .timeline-dot {
    left: -10px;
}

.timeline-content {
    background: var(--bg-color);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
    border: 1px solid rgba(0, 184, 148, 0.1);
}

.timeline-content:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.timeline-date {
    color: var(--accent-color);
    font-weight: 600;
    margin-bottom: 0.8rem;
    font-size: 1.1rem;
}

.timeline-content h4 {
    color: var(--primary-color);
    font-size: 1.2rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.timeline-list {
    list-style: none;
    padding-left: 0;
    margin: 1rem 0 0;
}

.timeline-list li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.8rem;
    color: var(--secondary-color);
    font-size: 0.95rem;
    line-height: 1.6;
}

.timeline-list li::before {
    content: '▹';
    position: absolute;
    left: 0;
    color: var(--accent-color);
    font-size: 1.2rem;
}

.timeline-list li:hover {
    color: var(--primary-color);
    transform: translateX(5px);
    transition: all 0.3s ease;
}

@media (max-width: 768px) {
    .timeline::before {
        left: 30px;
    }
    
    .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 1rem;
        text-align: left;
    }
    
    .timeline-item:nth-child(odd),
    .timeline-item:nth-child(even) {
        left: 0;
    }
    
    .timeline-item:nth-child(odd) .timeline-dot,
    .timeline-item:nth-child(even) .timeline-dot {
        left: 20px;
    }
}

/* Scroll Hint Style */
.scroll-hint {
    display: flex;
    justify-content: center;
    align-self: center;
    width: 100%;
    animation: bounce 2s infinite;
    z-index: 10;
    margin-top: 60px;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-20px);
    }
    60% {
        transform: translateY(-10px);
    }
}

@media (max-width: 768px) {
    .scroll-hint {
        /* 不要 bottom 屬性 */
    }
    .contact-button {
        margin-bottom: 0;
    }
}

/* Project Features Style */
.project-features {
    margin: 1.5rem 0;
    padding: 1rem;
    background: rgba(0, 184, 148, 0.05);
    border-radius: 8px;
}

.project-features h6 {
    color: var(--primary-color);
    margin-bottom: 0.8rem;
    font-weight: 500;
}

.project-features ul {
    list-style: none;
    padding-left: 0;
    margin-bottom: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.project-features li {
    background: rgba(0, 184, 148, 0.1);
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.9rem;
    color: var(--accent-color);
}

/* Company List Style */
.company-list {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

.company-item {
    background: var(--light-gray);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    color: var(--secondary-color);
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    margin: 0.5rem;
}

.company-item:hover {
    background: var(--accent-color);
    color: white;
    transform: translateY(-2px);
    text-decoration: none;
}

a.company-item {
    color: var(--secondary-color);
}

a.company-item:hover {
    color: white;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .timeline-item {
        width: 100%;
        padding: 0 1rem;
        text-align: left;
    }

    .timeline-item:nth-child(even) {
        left: 0;
    }

    .timeline-item:nth-child(odd) .timeline-dot,
    .timeline-item:nth-child(even) .timeline-dot {
        left: -10px;
    }

    .timeline::before {
        left: 0;
        transform: none;
    }

    .project-features ul {
        flex-direction: column;
    }

    .company-item {
        font-size: 0.8rem;
    }
}

/* 右側浮動導航 */
.floating-nav {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
    background: rgba(255, 255, 255, 0.9);
    padding: 10px;
    border-radius: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(5px);
}

.floating-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.floating-nav li {
    margin: 10px 0;
}

.floating-nav a {
    display: flex;
    align-items: center;
    color: var(--secondary-color);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    padding: 5px 15px;
    border-radius: 15px;
    min-width: 120px;
}

.floating-nav a:hover {
    color: var(--accent-color);
    background: rgba(0, 184, 148, 0.1);
}

.floating-nav .nav-dot {
    width: 8px;
    height: 8px;
    background: var(--secondary-color);
    border-radius: 50%;
    margin-right: 8px;
    transition: all 0.3s ease;
}

.floating-nav a:hover .nav-dot,
.floating-nav a.active .nav-dot {
    background: var(--accent-color);
    transform: scale(1.2);
}

.floating-nav a.active {
    color: var(--accent-color);
    background: rgba(0, 184, 148, 0.1);
    font-weight: 500;
}

.floating-nav .nav-text {
    opacity: 1;
    transform: none;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.floating-nav:hover .nav-text {
    opacity: 1;
    transform: none;
}

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

/* 調整終端機風格在首頁的樣式 */
.hero-content .terminal-style {
    max-width: 600px;
    margin: 0 auto 2rem;
    background: rgba(45, 52, 54, 0.95);
    backdrop-filter: blur(5px);
}

.hero-content .about-skills {
    justify-content: center;
    margin-bottom: 2rem;
}

.tech-stack {
    margin-bottom: 2rem;
}

.profile-photo {
    position: relative;
    display: inline-block;
    margin-bottom: 2rem;
}

.profile-photo img {
    border: 4px solid rgba(255, 255, 255, 0.9);
    transition: all 0.3s ease;
}

.profile-photo img:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2) !important;
}

@media (max-width: 768px) {
    .profile-photo img {
        width: 120px !important;
        height: 120px !important;
    }
}

.small-profile-photo {
    position: relative;
    display: inline-block;
}

.small-profile-photo img {
    border: 3px solid var(--accent-color);
    transition: all 0.3s ease;
}

.small-profile-photo img:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 184, 148, 0.2) !important;
}

@media (max-width: 768px) {
    .small-profile-photo img {
        width: 100px !important;
        height: 100px !important;
    }
}

/* Language Switcher */
.language-switcher {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.9);
    padding: 8px 16px;
    border-radius: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(5px);
}

.lang-link {
    color: var(--secondary-color);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

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

.lang-link.active {
    color: var(--accent-color);
}

@media (max-width: 768px) {
    .language-switcher {
        top: 10px;
        right: 10px;
        padding: 6px 12px;
    }
}

.hero-bottom-content {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

@media (max-width: 768px) {
    .hero-bottom-content {
        gap: 30px;
    }
} 