* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    
    color: #1E1E1E;

    a {
        text-decoration: none;
    }

}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    background-color: #F0F1F3;
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow-x: hidden;
}

.grid {
    --gridGap: 24px;
    grid-gap: var(--gridGap);
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 2rem;
    grid-template-rows: auto;
    padding-left: 24px;
    padding-right: 24px;
    /*border: 1px solid rgb(0, 30, 255);*/
    row-gap: 40px;
}

.container.single-col {
    grid-column: 1 / -1;
}

/* Navbar scrolled to add bg color */
#navbar {
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    background-color: transparent;
    transition: background-color 0.3s ease;
    z-index: 100;
}
#navbar.scrolled {
    background-color:rgba(255, 255, 255, 0.9);
}

/* Navbar RWD 樣式*/
.navbar.scrolled {
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
}

.navbar-content {
    display: flex;
    justify-content: flex-end;
    width: 100%;
}

.menu-icon {
    display: none;
    flex-direction: column;
    cursor: pointer;
    position: relative;
    width: 20px;
    height: 16px;
}

.menu-icon .bar {
    position: absolute;
    width: 100%;
    height: 2px;
    background-color: #1E1E1E;
    transition: 0.4s;
}

.menu-icon .bar:nth-child(1) {
    top: 0;
}

.menu-icon .bar:nth-child(2) {
    top: 50%;
    transform: translateY(-50%);
}

.menu-icon .bar:nth-child(3) {
    bottom: 0;
}

.menu-icon.close .bar:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.menu-icon.close .bar:nth-child(2) {
    opacity: 0;
}

.menu-icon.close .bar:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

.close-icon {
    display: none;
    position: absolute;
    right: 24px;
    top:14px;
    height: 64px;
    cursor: pointer;
    width: 24px;
    height: 24px;
}

.close-icon .bar {
    position: absolute;
    width: 80%;
    height: 2px;
    background-color: #1E1E1E;
    transition: 0.4s;
}

.close-icon .bar:nth-child(1) {
    top: 0;
    transform: rotate(45deg) translate(11.5px, 2.5px);
}

.close-icon .bar:nth-child(2) {
    bottom: 0;
    transform: rotate(-45deg) translate(13px, -4.5px);
}

.modal.show .close-icon {
    display: block;
}


.modal {
    display: none;
    position: fixed;
    width: 100%;
    height: 100vh;
    top: 0;
    left: 0;
    background-color: rgb(240, 241, 243);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.modal.show {
    opacity: 1;
    visibility: visible; /* 显示 modal */
}

.modal-content {
    list-style: none;
    padding: 0;
    text-align: center;
}

.modal-content li {
    margin: 20px 0;
}

/* end */

.navbar {
    padding-left: 24px;
    padding-right: 24px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}
.navbar-item {
    width: 120px;
}

.navbar-item-container {
    display: flex;
    flex-direction: row;
}

.navbar-item a {
    /* margin-left: 60px; */
    text-decoration: none;
    font-size: 1rem;
}

.navbar-item.selected {
    font-weight: 800;
}

.hero-bio {
    min-height: 640px;
    display: flex;
    align-items: center;
    padding-bottom: 40px;
}

.hero-bio h1 {
    font-weight: 400 !important;
    font-size: 64px;
}

.projects {
    /*padding-top: 100px;*/
    padding-bottom: 120px;
}

.thumbnail-container {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 1 / 1; /* 設置圖片為正方形 */
    overflow: hidden;
}

.project-card .thumbnail-container img {
    display: inline-block;
    width: 100%;
    object-fit: cover; /* 確保圖片內容充滿整個框 */
}

.project-card:hover img {
    cursor: pointer;
    transition: .6s ease-out;
    transform: scale(1.08);
}

.project-info {
    padding-top: 1.5rem;
}

.project-info .category {
    margin-bottom: 1rem;
    color: #acb02d;
}

.project-info .project-name {
    font-size: 1.5rem;
    font-weight: 600;
}

/* About Page */
.about {
    margin-top: 120px;
    height: auto;
    display: grid;
    align-items: center;
}
.about .profile{
    width: 100%;
    height: 520px;
    overflow: hidden;
    padding-right: 32px;
}
.profile-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.about .content-wrapper {
    padding: 16px 0;
}
.about .name {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 2rem;
}
.about .title {
    font-size: 20px;
    font-weight: 500;
    margin-bottom: 1.2rem;
}
.about .content-wrapper .paragraph {
    padding-bottom: 12px;
}

.contact {
    text-align: right;
}

.contact .contact-info {
    margin: 20px 0 80px 0;
}

@media (min-width: 1440px) {
    .grid {
        margin: 0 auto;
        max-width: 1440px;
    }
    .navbar {
        margin: 0 auto;
        max-width: 1440px;
    }
}

@media (min-width: 1024px) {
    .grid {
        --gridGap: 48px;
        padding-left: 126px;
        padding-right: 126px;
    }
    .navbar {
        padding-left: 126px;
        padding-right: 126px;
    }
}

@media (min-width: 768px) {
    .grid {
        grid-template-columns: repeat(12, minmax(0, 1fr));
        row-gap: 60px; /* 大於 768px 時行間距為40px */
    }
    .project-card {
        grid-column: span 6; /* 大於 768px 時每個產品卡片佔 6 欄 */
    }
    .about .profile {
        grid-column: span 5; /* 大於 768px 時佔 5 欄 */
    }
    .about .about-content {
        grid-column: span 7; /* 大於 768px 時佔 7 欄 */
    }
}

@media (max-width: 767px) {
    .navbar {
        height: 48px;
    }
    .nav-links {
        display: none;
    }
    .menu-icon {
        display: flex;
    }

    .hero-bio h1 {
        font-size: 40px;
    }
    .project-card {
        grid-column: 1 / -1; /* 小於 768px 時每個產品卡片佔滿整行 */
    }
    .project-info {
        padding-top: 1rem;
    }
    .project-info .project-name {
        font-size: 20px;
    }
    .project-info .category {
        margin-bottom: 0.25rem;   
    }

    .about {
        height: auto;
        margin-bottom: 40px;
    }
    .about .profile {
        grid-column: 1 / -1; /* 小於 768px 佔滿整行 */
        padding-right: 0;
        height: 320px;
    }
    .about .about-content {
        grid-column: 1 / -1; /* 小於 768px 佔滿整行 */
    }
    .about .content-wrapper {
        padding: 0;
    }
    .about .name {
        font-size: 2rem;
        font-weight: 800;
        margin-bottom: 1rem;
    }
}

/* 專案分類 tab */
.tab-container {
    display: flex;
    justify-content: center;
    margin-bottom: 60px;
    position: relative;  /* 添加這行 */
    width: 100%;  /* 確保容器寬度為100% */
    padding-left: 24px;  /* 與 .grid 的左內邊距一致 */
    padding-right: 24px;  /* 與 .grid 的右內邊距一致 */
}

.tab-container::after {
    content: '';
    position: absolute;
    bottom: -20px;  /* 調整此值以改變分隔線與按鈕的距離 */
    left: 24px;  /* 與左內邊距一致 */
    right: 24px;  /* 與右內邊距一致 */
    height: 1px;
    background-color: rgb(172, 176, 45);
}

/* 移除之前的 margin-left */
.tab-button:first-child {
    margin-left: 0;
}

.tab-button {
    width: 100px; /* 固定寬度 */
    padding: 10px;
    border: none;
    background-color: transparent;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.1s ease;
    position: relative;
    text-align: left;
    letter-spacing: 1px;
}

.tab-button::before {
    content: "✹";
    position: absolute;
    left: -10px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.tab-button span {
    display: inline-block;
    width: 80px; /* 調整此值以適應您的文字長度 */
    text-align: left;
    transition: all 0.1s ease;
}

.tab-button.active {
    font-weight: bold;
    color: rgb(172, 176, 45);
    letter-spacing: 0.6px;
}

.tab-button.active::before {
    opacity: 1;
    transition: opacity 0.3s ease;
}

/* 響應式調整 */
@media (min-width: 1024px) {
    .tab-container {
        padding-left: 126px;
        padding-right: 126px;
    }
    .tab-container::after {
        left: 126px;
        right: 126px;
    }
}

@media (min-width: 1440px) {
    .tab-container {
        margin: 0 auto;
        max-width: 1440px;
    }
}

/* .tab-button.active span {
    transform: translateX(10px); /* 移動文字以為符號騰出空間 /
}*/