* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #4a6b7c;
    --secondary-color: #5a7c8d;
    --accent-color: #3d5866;
    --text-color: #333333;
    --text-light: #666666;
    --text-lighter: #999999;
    --bg-color: #ffffff;
    --bg-light: #f5f5f5;
    --bg-beige: #e8e3dc;
    --bg-dark: #2c3e50;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-strong: 0 4px 16px rgba(0, 0, 0, 0.12);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Microsoft JhengHei", "微軟正黑體", "Noto Sans TC", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.8;
    color: var(--text-color);
    background-color: var(--bg-color);
    font-weight: 400;
    letter-spacing: 0.5px;
}

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

/* img-fluid class for responsive images */
.img-fluid {
    max-width: 100%;
    height: auto;
    display: block;
}

/* 導航欄 */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow);
    z-index: 1000;
    transition: all 0.3s ease;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
}

.logo {
    font-size: 1.4rem;
    font-weight: 400;
    color: var(--text-color);
    letter-spacing: 2px;
    transition: transform 0.3s ease;
    position: relative;
    font-style: italic;
    font-weight: 500;
}

.nav-buttons {
    display: flex;
    gap: 1rem;
}

.nav-btn {
    padding: 0.6rem 1.5rem;
    background: transparent;
    color: var(--text-color);
    text-decoration: none;
    border-radius: 0;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    font-weight: 400;
    font-size: 0.95rem;
    letter-spacing: 1px;
    border: 1px solid transparent;
}

.nav-btn:hover {
    color: var(--primary-color);
    border-bottom: 1px solid var(--primary-color);
}

/* 區塊標題 */
.section-title {
    font-size: 2rem;
    margin-bottom: 3rem;
    text-align: center;
    color: var(--text-color);
    font-weight: 400;
    letter-spacing: 3px;
    position: relative;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp both;
    animation-timeline: view();
    animation-range: entry 0% cover 30%;
}

/* 個人介紹區域 */
.about-section {
    min-height: 100vh;
    padding: 120px 0 80px;
    background: radial-gradient(
        circle at 60% 40%,
        rgba(255,255,255,0.8) 0%,
        rgba(255,255,255,0) 60%
      ),
      linear-gradient(
        90deg,
        #e6d6c8 0%,
        #f4ede6 40%,
        #ffffff 55%,
        #f2e9e1 75%,
        #e6d6c8 100%
      ),url(./images/image_1.jpg);
      /* background-blend-mode: overlay; */
    position: relative;
    overflow: hidden;
}

.about-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 30%, rgba(255, 250, 245, 0.4) 0%, transparent 35%),
        radial-gradient(circle at 80% 70%, rgba(210, 195, 180, 0.3) 0%, transparent 40%);
    opacity: 0.6;
    z-index: 0;
}

.about-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, 
        rgba(255, 255, 255, 0.15) 0%, 
        transparent 25%, 
        transparent 75%, 
        rgba(200, 185, 170, 0.15) 100%);
    z-index: 0;
}

.about-section .container {
    position: relative;
    z-index: 1;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    align-items: center;
    margin-bottom: 5rem;
    min-height: calc(100dvh - 120px);
}

.about-image-wrapper {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.star-decoration {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 60px;
    height: 60px;
    border: 3px solid var(--primary-color);
    border-radius: 50%;
    opacity: 0;
    animation: 
        slideInRight 0.6s ease-out 0.5s forwards,
        pulse 3s ease-in-out 1.5s infinite;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 0.6;
        transform: translateX(0);
    }
}

.square-decoration {
    position: absolute;
    top: 50%;
    left: -30px;
    width: 45px;
    height: 45px;
    border: 2.5px solid var(--secondary-color);
    opacity: 0;
    transform: rotate(15deg);
    animation: 
        slideInLeft 0.6s ease-out 0.7s forwards,
        float 4s ease-in-out 1.7s infinite;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: rotate(15deg) translateX(-50px);
    }
    to {
        opacity: 0.5;
        transform: rotate(15deg) translateX(0);
    }
}

.triangle-decoration {
    position: absolute;
    bottom: 20%;
    right: -20px;
    width: 60px;
    height: 60px;
    opacity: 0;
    transform: rotate(-25deg);
    animation: 
        fadeInRotate 0.6s ease-out 0.9s forwards,
        rotate 6s linear 1.9s infinite;
}

.triangle-decoration::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 3px;
    background: var(--accent-color);
    top: 33%;
    left: 0;
}

.triangle-decoration::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 3px;
    background: var(--accent-color);
    top: 66%;
    left: 0;
}

.triangle-decoration .hash-line-1,
.triangle-decoration .hash-line-2 {
    position: absolute;
    width: 3px;
    height: 100%;
    background: var(--accent-color);
    top: 0;
}

.triangle-decoration .hash-line-1 {
    left: 33%;
}

.triangle-decoration .hash-line-2 {
    left: 66%;
}

@keyframes fadeInRotate {
    from {
        opacity: 0;
        transform: rotate(-25deg) scale(0.5);
    }
    to {
        opacity: 0.4;
        transform: rotate(-25deg) scale(1);
    }
}

@keyframes pulse {
    0%, 100% { 
        opacity: 0.6; 
        transform: scale(1);
    }
    50% { 
        opacity: 0.9; 
        transform: scale(1.1);
    }
}

@keyframes float {
    0%, 100% { 
        opacity: 0.5; 
        transform: rotate(15deg) translateY(0);
    }
    50% { 
        opacity: 0.7; 
        transform: rotate(15deg) translateY(-10px);
    }
}

@keyframes rotate {
    0% { 
        transform: rotate(-25deg);
        opacity: 0.4;
    }
    50% { 
        transform: rotate(-35deg);
        opacity: 0.6;
    }
    100% { 
        transform: rotate(-25deg);
        opacity: 0.4;
    }
}

.about-image {
    position: relative;
    z-index: 1;
    opacity: 0;
    animation: fadeInScale 0.8s ease-out 0.3s forwards;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.about-image img {
    width: 100%;
    max-width: 400px;
    height: 400px;
    object-fit: cover;
    border-radius: 50%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    transition: transform 0.5s ease;
    border: none;
    background: var(--primary-color);
}

.about-image img:hover {
    transform: scale(1.02);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

.circle-decoration {
    position: absolute;
    bottom: 50px;
    left: 50px;
    width: 150px;
    height: 150px;
    background: var(--primary-color);
    border-radius: 50%;
    opacity: 0;
    animation: 
        fadeInCircle 0.8s ease-out 0.4s forwards,
        pulse 4s ease-in-out 1.4s infinite;
}

@keyframes fadeInCircle {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 0.8;
        transform: scale(1);
    }
}

.about-text {
    position: relative;
    padding-left: 2rem;
}

.dots-decoration {
    display: flex;
    gap: 15px;
    margin-bottom: 2rem;
    opacity: 0;
    animation: fadeInUp 0.6s ease-out 0.2s forwards;
}

.dots-decoration span {
    width: 15px;
    height: 15px;
    background: var(--primary-color);
    border-radius: 50%;
    display: block;
}

.portfolio-label {
    font-family: 'Georgia', 'Times New Roman', serif;
    font-size: 2rem;
    color: var(--text-light);
    margin-bottom: 1rem;
    font-weight: 300;
    letter-spacing: 1px;
    opacity: 0;
    animation: fadeInUp 0.6s ease-out 0.4s forwards;
}

.about-title {
    font-family: "Microsoft JhengHei", "微軟正黑體", sans-serif;
    font-size: 2.8rem;
    line-height: 1.5;
    color: var(--text-color);
    font-weight: 400;
    margin-bottom: 2rem;
    letter-spacing: 2px;
    opacity: 0;
    animation: fadeInUp 0.6s ease-out 0.6s forwards;
}

.about-name {
    font-family: "Microsoft JhengHei", "微軟正黑體", sans-serif;
    font-size: 1.3rem;
    color: var(--text-light);
    margin-bottom: 1.5rem;
    font-weight: 300;
    letter-spacing: 3px;
    opacity: 0;
    animation: fadeInUp 0.6s ease-out 0.8s forwards;
}

.contact-info {
    font-size: 1.1rem;
    margin-top: 2rem;
    opacity: 0;
    animation: fadeInUp 0.6s ease-out 1s forwards;
}

.contact-info a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 400;
    transition: color 0.3s ease;
    letter-spacing: 0.5px;
}

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

.intro {
    font-size: 1.15rem;
    color: var(--text-light);
    margin-bottom: 3rem;
    line-height: 2;
    font-weight: 400;
}

.experience {
    margin-top: 4rem;
}

.experience h2 {
    font-size: 2rem;
    margin-bottom: 4rem;
    color: var(--text-color);
    font-weight: 400;
    letter-spacing: 3px;
    text-align: center;
}

/* Timeline */
.timeline {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, 
        var(--primary-color) 0%, 
        var(--secondary-color) 50%, 
        var(--accent-color) 100%);
    transform: translateX(-50%);
}

.timeline-item {
    display: flex;
    align-items: center;
    margin-bottom: 4rem;
    position: relative;
    opacity: 0;
    transform: scale(1.2);
    animation: scaleDown 0.6s ease-out both;
    animation-timeline: view();
    animation-range: entry 0% entry 100%;
}

.timeline-item:nth-child(odd) {
    flex-direction: row-reverse;
}

.timeline-year {
    width: 120px;
    text-align: center;
    font-size: 2rem;
    font-weight: 500;
    letter-spacing: 2px;
    flex-shrink: 0;
}

.timeline-item:nth-child(1) .timeline-year {
    color: #e67e22;
}

.timeline-item:nth-child(2) .timeline-year {
    color: #e74c3c;
}

.timeline-item:nth-child(3) .timeline-year {
    color: #95a5a6;
}

.timeline-item:nth-child(4) .timeline-year {
    color: #27ae60;
}

.timeline-icon {
    width: 100px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
    z-index: 2;
}

.icon-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 4px solid;
    background: white;
    position: relative;
}

.timeline-item:nth-child(1) .icon-circle {
    border-color: #e67e22;
}

.timeline-item:nth-child(2) .icon-circle {
    border-color: #e74c3c;
}

.timeline-item:nth-child(3) .icon-circle {
    border-color: #95a5a6;
}

.timeline-item:nth-child(4) .icon-circle {
    border-color: #27ae60;
}

.timeline-content {
    flex: 1;
    padding: 2rem;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.95) 0%, 
        rgba(250, 250, 250, 0.9) 100%);
    box-shadow: 
        0 4px 20px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.5);
    transition: all 0.3s ease;
}

.timeline-item:nth-child(odd) .timeline-content {
    margin-right: 2rem;
}

.timeline-item:nth-child(even) .timeline-content {
    margin-left: 2rem;
}

.timeline-item:nth-child(1) .timeline-content {
    border-left: 10px solid #e67e22;
}

.timeline-item:nth-child(2) .timeline-content {
    border-left: 10px solid #e74c3c;
}

.timeline-item:nth-child(3) .timeline-content {
    border-left: 10px solid #95a5a6;
}

.timeline-item:nth-child(4) .timeline-content {
    border-left: 10px solid #27ae60;
}

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

.timeline-content h3 {
    font-size: 1.3rem;
    margin-bottom: 0.8rem;
    color: var(--text-color);
    font-weight: 500;
    letter-spacing: 1px;
}

.timeline-content .exp-company {
    display: inline-block;
    font-weight: 400;
    color: var(--primary-color);
    margin-bottom: 0.8rem;
    font-size: 1rem;
    letter-spacing: 0.5px;
    margin-right: 1.5rem;
}

.timeline-content .exp-period {
    display: inline-block;
    font-size: 0.9rem;
    color: var(--text-lighter);
    margin-bottom: 0.8rem;
    letter-spacing: 0.5px;
}

.exp-desc {
    color: var(--text-light);
    line-height: 1.8;
    letter-spacing: 0.5px;
}

/* 作品集區域 */
#works  {
    padding-block: 80px;
    background-color: #fffaf7;
}
.works-section {
    min-height: 100vh;
    padding: 80px 0;
    background: 
        radial-gradient(circle at 50% 0%, rgba(245, 245, 245, 1) 0%, transparent 50%),
        linear-gradient(180deg, 
            #ffffff 0%, 
            #fafafa 50%, 
            #ffffff 100%);
    position: relative;
}

.works-section .container {
    position: relative;
    z-index: 1;
}

.works-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.work-card {
    background: 
        linear-gradient(135deg, 
            rgba(255, 255, 255, 1) 0%, 
            rgba(252, 252, 252, 0.98) 100%);
    overflow: hidden;
    box-shadow: 
        0 4px 20px rgba(0, 0, 0, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    transition: all 0.4s ease;
    opacity: 0;
    transform: scale(1.2);
    animation: scaleDown 0.6s ease-out both;
    animation-timeline: view();
    animation-range: entry 0% entry 50%;
    border: 1px solid rgba(245, 245, 245, 0.6);
}

.work-card:hover {
    transform: translateY(-8px) scale(1);
    box-shadow: 
        0 8px 30px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.work-cover {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.work-card:hover .work-cover {
    transform: scale(1.1);
}

.work-info {
    padding: 1.5rem;
}

.work-title {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--text-color);
    transition: color 0.3s ease;
    font-weight: 500;
    letter-spacing: 1px;
}

.work-card:hover .work-title {
    color: var(--primary-color);
}

.work-desc {
    color: var(--text-light);
    margin-bottom: 1.2rem;
    line-height: 1.8;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    line-clamp: 3;
    overflow: hidden;
    letter-spacing: 0.5px;
}

.work-btn {
    display: inline-block;
    padding: 0.7rem 2rem;
    background: transparent;
    color: var(--primary-color);
    text-decoration: none;
    border-radius: 0;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid var(--primary-color);
    font-size: 0.9rem;
    font-weight: 400;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
}

.work-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--primary-color);
    transition: left 0.3s ease;
    z-index: 0;
}

.work-btn:hover::before {
    left: 0;
}

.work-btn span {
    position: relative;
    z-index: 1;
}

.work-btn:hover {
    color: white;
}

/* Footer */
.footer {
    background: var(--bg-dark);
    color: white;
    text-align: center;
    padding: 2.5rem 0;
    font-weight: 400;
    letter-spacing: 1px;
}

.footer p {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleDown {
    from {
        opacity: 0;
        transform: scale(1.2);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* 響應式設計 */
@media (max-width: 768px) {
    .about-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 3rem;
    }

    .about-image-wrapper {
        margin: 0 auto;
    }

    .about-image img {
        margin: 0 auto;
        max-width: 300px;
        height: 300px;
    }

    .about-image-wrapper {
        position: relative;
        width: 100%;
        max-width: 400px;
        margin: 0 auto;
    }

    .circle-decoration {
        width: 70px;
        height: 70px;
        left: -10px;
        bottom: -10px;
        z-index: 0;
    }

    .star-decoration {
        width: 40px;
        height: 40px;
        right: -10px;
        top: -10px;
        z-index: 3;
    }

    .square-decoration {
        left: -15px;
        top: 35%;
        width: 30px;
        height: 30px;
        z-index: 3;
    }

    .triangle-decoration {
        right: -15px;
        bottom: 30%;
        width: 40px;
        height: 40px;
        z-index: 3;
    }

    .triangle-decoration::before {
        height: 2px;
    }

    .triangle-decoration::after {
        height: 2px;
    }

    .triangle-decoration .hash-line-1,
    .triangle-decoration .hash-line-2 {
        width: 2px;
    }

    .about-text {
        padding-left: 0;
    }

    .dots-decoration {
        justify-content: center;
    }

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

    .portfolio-label {
        font-size: 1.5rem;
    }

    .about-name {
        font-size: 1.1rem;
    }

    .timeline::before {
        left: 30px;
    }

    .timeline-item {
        flex-direction: row !important;
        margin-bottom: 3rem;
    }

    .timeline-item:nth-child(odd) {
        flex-direction: row !important;
    }

    .timeline-year {
        position: absolute;
        left: 0;
        top: -30px;
        width: auto;
        font-size: 1.3rem;
    }

    .timeline-icon {
        width: 60px;
        position: absolute;
        left: 0;
    }

    .icon-circle {
        width: 40px;
        height: 40px;
        border-width: 3px;
    }

    .timeline-content {
        margin-left: 80px !important;
        margin-right: 0 !important;
        padding: 1.5rem;
    }

    .works-grid {
        grid-template-columns: 1fr;
        max-width: 80%;
        margin: 3rem auto 0;
    }

    .section-title {
        font-size: 1.8rem;
        text-align: center;
    }

    .nav-buttons {
        gap: 0.5rem;
    }

    .nav-btn {
        padding: 0.4rem 1rem;
        font-size: 0.9rem;
    }
}
