
/* =========================
   1. Global Settings
========================= */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: Arial, "Noto Sans TC", sans-serif;
    background-color: #101827;
    color: #F5F2EA;
}


/* =========================
   2. Navigation Bar
========================= */

.navbar {
    width: 100%;
    height: 85px;

    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 8%;

    border-bottom: 1px solid #293446;

    /* 固定導覽列 */
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
}

.logo {
    font-size: 30px;
    font-weight: 900;
    color: #F5F2EA;
    text-decoration: none;
    letter-spacing: -2px;
}

.logo span {
    color: #FF8A55;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 35px;
}

.nav-links a {
    color: #C6CEDA;
    text-decoration: none;
    font-size: 12px;
    font-weight: bold;
    letter-spacing: 1px;

    transition: 0.3s;
}

.nav-links a:hover {
    color: #FF8A55;
}

.nav-links .contact-btn {
    background-color: #FF8A55;
    color: #101827;

    padding: 13px 20px;
    border-radius: 30px;
}

.nav-links .contact-btn:hover {
    background-color: #F5F2EA;
    color: #101827;
}


/* =========================
   3. Hero Section
========================= */

.hero {
    min-height: calc(100vh - 85px);

    padding: 80px 8% 100px;

    display: grid;
    grid-template-columns: 1.2fr 0.8fr;

    align-items: center;

    position: relative;
    overflow: hidden;
}

.hero-content {
    position: relative;
    z-index: 2;
    padding-bottom: 45px;
}

.eyebrow {
    color: #FF8A55;
    font-size: 12px;
    font-weight: bold;
    letter-spacing: 3px;

    margin-bottom: 25px;
}

.hero h1 {
    font-size: clamp(48px, 7vw, 90px);
    font-weight: 900;
    line-height: 0.98;
    letter-spacing: -4px;

    margin-bottom: 25px;
}

.hero h1 span {
    color: #477BFF;
}

.hero h2 {
    font-size: 20px;
    font-weight: 500;
    color: #F5F2EA;

    margin-bottom: 20px;
}

.hero-description {
    max-width: 450px;

    color: #AAB5C5;
    font-size: 15px;
    line-height: 2;

    margin-bottom: 35px;
}


/* =========================
   4. Hero Buttons
========================= */

.hero-buttons {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.primary-btn,
.secondary-btn {
    display: inline-block;

    padding: 15px 22px;
    border-radius: 30px;

    text-decoration: none;
    font-size: 11px;
    font-weight: bold;
    letter-spacing: 1px;

    transition: 0.3s;
}

.primary-btn {
    background-color: #FF8A55;
    color: #101827;
}

.primary-btn:hover {
    background-color: #F5F2EA;
    transform: translateY(-3px);
}

.secondary-btn {
    border: 1px solid #657187;
    color: #F5F2EA;
}

.secondary-btn:hover {
    border-color: #FF8A55;
    color: #FF8A55;
}


/* =========================
   5. Hero Visual
========================= */

.hero-visual {
    min-height: 430px;

    position: relative;

    display: flex;
    justify-content: center;
    align-items: center;
}

.visual-circle {
    position: absolute;
    border-radius: 50%;
}

.circle-one {
    width: 310px;
    height: 310px;

    border: 2px solid #477BFF;
    transform: rotate(-25deg);
}

.circle-two {
    width: 220px;
    height: 220px;

    background: linear-gradient(
        135deg,
        #477BFF,
        #FF8A55
    );

    opacity: 0.9;
    border-radius: 45% 55% 60% 40%;
    transform: rotate(35deg);
}

.visual-text {
    position: relative;
    z-index: 2;

    display: flex;
    flex-direction: column;

    font-size: 35px;
    font-weight: 900;
    line-height: 1.3;

    color: #FFFFFF;
    letter-spacing: 4px;
}

.visual-caption {
    position: absolute;
    bottom: 15px;
    right: 0;

    color: #8996AA;
    font-size: 10px;
    letter-spacing: 2px;
}


/* =========================
   6. Hero Bottom
========================= */

.hero-bottom {
    position: absolute;
    bottom: 30px;
    left: 8%;
    right: 8%;

    display: flex;
    justify-content: space-between;

    color: #8996AA;
    font-size: 10px;
    letter-spacing: 2px;
}


/* =========================
   7. Responsive Design
========================= */

@media (max-width: 768px) {

    .navbar {
        height: auto;
        padding: 20px 5%;

        flex-wrap: wrap;
        gap: 20px;
    }

    .nav-links {
        gap: 15px;
        flex-wrap: wrap;
    }

    .nav-links a {
        font-size: 10px;
    }

    .hero {
        grid-template-columns: 1fr;
        padding: 60px 6% 80px;
    }

    .hero h1 {
        font-size: clamp(45px, 12vw, 65px);
        letter-spacing: -2px;
    }

    .hero h2 {
        font-size: 16px;
    }

    .hero-visual {
        min-height: 330px;
    }

    .circle-one {
        width: 230px;
        height: 230px;
    }

    .circle-two {
        width: 170px;
        height: 170px;
    }

    .visual-text {
        font-size: 28px;
    }

    .hero-bottom {
        left: 6%;
        right: 6%;
    }
}

/* =========================
   8. About Section
========================= */

.about {
    background-color: #F5F2EA;
    color: #101827;

    padding: 120px 8%;
}

.about-heading {
    margin-bottom: 60px;
}

.about-heading .eyebrow {
    margin-bottom: 25px;
}

.about-heading h2 {
    font-size: clamp(38px, 6vw, 72px);
    line-height: 1.1;
    letter-spacing: -3px;
    font-weight: 900;
}

.about-heading h2 span {
    color: #477BFF;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
}

.about-intro p {
    font-size: 17px;
    line-height: 2;
    color: #465064;

    margin-bottom: 25px;
    max-width: 450px;
}

.expertise-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 35px 20px;
}

.expertise-item {
    border-top: 1px solid #BFC3C9;
    padding-top: 18px;
}

.expertise-item h3 {
    font-size: 27px;
    color: #477BFF;
    margin-bottom: 10px;
}

.expertise-item p {
    font-size: 14px;
    color: #465064;
}


/* About Responsive */

@media (max-width: 768px) {

    .about {
        padding: 80px 6%;
    }

    .about-heading h2 {
        letter-spacing: -1px;
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: 45px;
    }

    .expertise-grid {
        gap: 25px 15px;
    }
}

/* =========================
   9. Projects Section
========================= */

.projects {
    background-color: #101827;
    padding: 120px 8%;
}

.projects-header {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 40px;

    margin-bottom: 60px;
}

.projects-header h2 {
    font-size: clamp(38px, 6vw, 72px);
    line-height: 1.1;
    letter-spacing: -3px;
}

.projects-header h2 span {
    color: #477BFF;
}

.projects-description {
    max-width: 300px;
    color: #AAB5C5;
    font-size: 14px;
    line-height: 2;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 35px;
}
/* 專案卡片連結設定 */
.project-card {
    display: block;
    text-decoration: none;
    color: inherit;
}

.project-card:first-child {
    grid-column: span 2;
}


.project-image {
    min-height: 270px;
    padding: 30px;

    position: relative;
    overflow: hidden;

    display: flex;
    flex-direction: column;
    justify-content: space-between;

    background-color: #172B48;

    transition: 0.3s;
}

/* YOLO 封面圖片 */
.project-cover {
    position: relative;

    width: 224px;
    height: 224px;

    max-width: 100%;

    object-fit: contain;
    object-position: center;

    justify-self: center;

    z-index: 1;
}

/* 圖片上方的文字區域 */
.project-overlay {
    position: relative;
    z-index: 2;

    width: 100%;
    min-height: 0;

    padding: 20px;

    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 25px;

    pointer-events: none;
}

.project-overlay h3 {
    font-size: clamp(32px, 4vw, 58px);
    line-height: 1.05;
    color: #FFFFFF;
    letter-spacing: -2px;
}

.project-overlay span {
    font-size: 12px;
    letter-spacing: 2px;
    color: #FFFFFF;
}

.project-overlay h3 {
    font-size: clamp(35px, 5vw, 65px);
    line-height: 1;
    color: #FFFFFF;
    letter-spacing: -2px;
}


.project-card:first-child .project-image {
    min-height: 400px;
}

.project-image-one {
    background: #172B48;

    display: grid;
    grid-template-columns: 1.3fr 0.7fr;

    align-items: center;
    gap: 20px;

    padding: 25px;
    min-height: 360px;
}

.project-image-two {
    background: linear-gradient(135deg, #F08A5D, #6E405B);
}

.project-image-three {
    background: linear-gradient(135deg, #2C827D, #101827);
}

.project-image span {
    font-size: 12px;
    letter-spacing: 2px;
    color: #FFFFFF;
}

.project-image h3 {
    font-size: clamp(35px, 5vw, 65px);
    line-height: 1;
    color: #FFFFFF;
    letter-spacing: -2px;
}

.project-card:hover .project-image {
    transform: translateY(-5px);
}

.project-info {
    display: flex;
    justify-content: space-between;
    align-items: center;

    padding: 20px 0;
}

.project-info h3 {
    font-size: 17px;
    margin-bottom: 8px;
}

.project-info p {
    font-size: 12px;
    color: #8996AA;
}

.project-info .project-arrow {
    font-size: 24px;
    color: #FF8A55;
}


/* Projects Responsive */

@media (max-width: 768px) {

    /* Projects 整體 */
    .projects {
        padding: 80px 6%;
    }

    .projects-header {
        flex-direction: column;
        align-items: start;
    }

    .projects-header h2 {
        letter-spacing: -1px;
    }

    /* 專案卡片改為單欄 */
    .project-grid {
        grid-template-columns: 1fr;
    }

    .project-card:first-child {
        grid-column: span 1;
    }

    .project-card:first-child .project-image {
        min-height: 270px;
    }

    /* Jellyfish 手機版圖片與標題 */
    .project-image-one {
        display: grid;
        grid-template-columns: 1fr;
        grid-template-rows: 190px auto;

        gap: 10px;
        min-height: auto;
        padding: 20px;
    }

    .project-image-one .project-cover {
        display: block;
        width: 100%;
        max-width: 100%;
        height: 190px;

        object-fit: contain;
        object-position: center;
    }

    .project-image-one .project-overlay {
        width: 100%;
        padding: 10px 0;
        gap: 12px;
    }

    .project-image-one .project-overlay h3 {
        font-size: 32px;
        line-height: 1.05;
        letter-spacing: -1px;
    }

}

/* =========================
   KMeans Project Cover
========================= */

.project-image-two {
    background: #172B48;

    display: grid;
    grid-template-columns: 1fr 1.1fr;

    align-items: stretch;

    padding: 0;
    min-height: 270px;
}

/* KMeans 專案文字 */
.project-overlay-kmeans {
    position: relative;
    z-index: 2;

    padding: 25px;

    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* KMeans 分群圖片 */
.project-cover-kmeans {
    display: block;

    width: 100%;
    height: 100%;
    min-height: 270px;

    object-fit: contain;
    object-position: center;

    background-color: #FFFFFF;
}


/* KMeans Responsive */
@media (max-width: 768px) {

    .project-image-two {
        grid-template-columns: 1fr;
    }

    .project-cover-kmeans {
        min-height: 220px;
    }

}

/* =========================
   Apriori Project Cover
========================= */

.project-image-three {
    background: #172B48;

    display: grid;
    grid-template-columns: 0.8fr 1.2fr;

    align-items: center;
    gap: 20px;

    padding: 25px;
    min-height: 300px;
}

/* Apriori 專案文字 */
.project-overlay-apriori {
    position: relative;
    z-index: 2;

    display: flex;
    flex-direction: column;
    justify-content: center;

    gap: 20px;
}

.project-overlay-apriori span {
    color: #FF8A55;
    font-size: 12px;
    letter-spacing: 2px;
}

.project-overlay-apriori h3 {
    color: #FFFFFF;
    font-size: clamp(25px, 3vw, 42px);
    line-height: 1.1;
    letter-spacing: -1px;
}

.project-overlay-apriori p {
    color: #AAB5C5;
    font-size: 11px;
    letter-spacing: 1px;
}

/* Apriori 分析圖片 */
.project-cover-apriori {
    display: block;

    width: 100%;
    height: 100%;
    min-height: 220px;

    object-fit: contain;
    object-position: center;

    background-color: #FFFFFF;
}


/* Apriori Responsive */
@media (max-width: 768px) {

    .project-image-three {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .project-cover-apriori {
        min-height: 180px;
    }

}

/* =========================
   Resume Section
========================= */

.resume {
    background-color: #F5F2EA;
    color: #101827;

    padding: 120px 8%;
}

.resume-header {
    margin-bottom: 70px;
}

.resume-header h2 {
    font-size: clamp(40px, 6vw, 72px);
    line-height: 1.1;
    letter-spacing: -3px;
}

.resume-header h2 span {
    color: #477BFF;
}

.resume-description {
    color: #657187;
    margin-top: 25px;
    font-size: 14px;
}

.resume-content {
    max-width: 1100px;
}

.resume-block {
    display: grid;
    grid-template-columns: 1fr 2fr;

    gap: 50px;

    padding: 35px 0;

    border-top: 1px solid #C8C8C8;
}

.resume-label {
    display: flex;
    align-items: center;
    gap: 15px;
}

.resume-label span {
    color: #FF8A55;
    font-weight: bold;
}

.resume-label h3 {
    font-size: 15px;
    letter-spacing: 1px;
}

.resume-detail h4 {
    font-size: 19px;
    margin-bottom: 8px;
    margin-top: 15px;
}

.resume-detail h4:first-child {
    margin-top: 0;
}

.resume-detail p {
    color: #657187;
    font-size: 14px;
    margin-bottom: 15px;
}

.skill-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.skill-list span {
    border: 1px solid #AEB5C0;
    border-radius: 30px;

    padding: 10px 18px;

    font-size: 13px;
    font-weight: bold;

    transition: 0.3s;
}

.skill-list span:hover {
    background-color: #477BFF;
    color: #FFFFFF;
    border-color: #477BFF;
}

.resume-download {
    border-top: 1px solid #C8C8C8;

    padding-top: 40px;
    margin-top: 30px;

    display: flex;
    justify-content: space-between;
    align-items: center;

    gap: 25px;
}

.resume-download h3 {
    font-size: 22px;
    margin-bottom: 10px;
}

.resume-download p {
    color: #657187;
    font-size: 13px;
}


/* Resume Responsive */

@media (max-width: 768px) {

    .resume {
        padding: 80px 6%;
    }

    .resume-header h2 {
        letter-spacing: -1px;
    }

    .resume-block {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .resume-download {
        flex-direction: column;
        align-items: flex-start;
    }

}

/* =========================
   Contact Section
========================= */

.contact {
    background: #101827;
    color: #F5F2EA;

    padding: 120px 8%;
}

.contact-content {
    max-width: 1100px;
}

.contact-content h2 {
    font-size: clamp(40px, 7vw, 85px);
    line-height: 1.1;
    letter-spacing: -3px;
    margin-top: 30px;
}

.contact-content h2 span {
    color: #477BFF;
}

.contact-description {
    color: #AAB5C5;
    margin-top: 25px;
    font-size: 15px;
}

.contact-links {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;

    margin-top: 50px;
}

.contact-links a {
    color: #F5F2EA;

    border: 1px solid #536075;
    border-radius: 30px;

    padding: 15px 25px;

    text-decoration: none;

    transition: 0.3s;
}

.contact-links a:hover {
    background: #FF8A55;
    color: #101827;
    border-color: #FF8A55;
}

@media (max-width: 768px) {

    .contact {
        padding: 80px 6%;
    }

    .contact-content h2 {
        letter-spacing: -1px;
    }

}

/* =========================
   Footer
========================= */

.site-footer {
    background: #172B48;
    color: #F5F2EA;

    padding: 45px 8% 25px;
}

.footer-top {
    display: flex;
    justify-content: space-between;
    align-items: center;

    padding-bottom: 30px;

    border-bottom: 1px solid #536075;
}

.footer-logo {
    color: #FFFFFF;
    font-size: 32px;
    font-weight: 900;
    text-decoration: none;
}

.footer-top p {
    color: #AAB5C5;
    font-size: 12px;
    letter-spacing: 2px;
}

.footer-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;

    padding: 30px 0;
}

.footer-nav a {
    color: #FFFFFF;
    text-decoration: none;
    font-size: 12px;
    font-weight: bold;

    transition: 0.3s;
}

.footer-nav a:hover {
    color: #FF8A55;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    gap: 15px;

    border-top: 1px solid #536075;
    padding-top: 25px;
}

.footer-bottom p {
    color: #AAB5C5;
    font-size: 11px;
    letter-spacing: 1px;
}


/* Footer Responsive */

@media (max-width: 768px) {

    .footer-nav {
        gap: 18px;
    }

    .footer-bottom {
        flex-direction: column;
    }

}

/* =================================
   CERTIFICATES
================================= */

.certificate-section {
    width: 100%;
}

.certificate-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    width: 100%;
}

.certificate-card {
    display: block;
    width: 100%;
    min-width: 0;
    padding: 18px;
    box-sizing: border-box;

    color: inherit;
    text-decoration: none;

    background: #ffffff;
    border: 1px solid #e5e5e5;
    border-radius: 12px;

    transition: 0.3s ease;
}

.certificate-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}

.certificate-card img {
    display: block;
    width: 100%;
    height: 190px;
    object-fit: contain;

    background: #f7f7f7;
    border-radius: 8px;
    margin-bottom: 16px;
}

.certificate-card h4 {
    color: #222222;
    font-size: 16px;
    margin: 0 0 8px;
}

.certificate-card p {
    color: #777777;
    font-size: 13px;
    margin: 0 0 10px;
}

.certificate-card span {
    display: block;
    color: #999999;
    font-size: 12px;
}

/* 手機版 */
@media (max-width: 600px) {
    .certificate-grid {
        grid-template-columns: 1fr;
    }
}

/* =================================
   RWD 修正：Mobile Navbar & Hero
   ================================= */

@media (max-width: 768px) {

    /* 手機版導覽列 */
    .navbar {
        height: auto;
        min-height: 0;
        padding: 14px 6%;

        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 12px;

        background-color: #101827;
    }

    /* Logo */
    .logo {
        font-size: 26px;
        align-self: flex-start;
    }

    /* 導覽連結 */
    .nav-links {
        display: flex;
        align-items: center;
        justify-content: space-between;
        flex-wrap: wrap;
        gap: 10px;
        width: 100%;
    }

    .nav-links a {
        font-size: 10px;
        white-space: nowrap;
    }

    /* Contact 按鈕 */
    .nav-links .contact-btn {
        padding: 10px 13px;
        font-size: 9px;
    }

    /* Hero 首頁區塊 */
    .hero {
        min-height: auto;

        grid-template-columns: 1fr;

        /* 預留固定 Navbar 的空間 */
        padding: 165px 6% 70px;

        gap: 25px;
    }

    .hero-content {
        padding-bottom: 0;
    }

    /* 主標題 */
    .hero h1 {
        font-size: clamp(40px, 11vw, 55px);
        line-height: 1.05;
        letter-spacing: -2px;
        overflow-wrap: break-word;
    }

    .hero h2 {
        font-size: 16px;
    }

    /* Hero 視覺 */
    .hero-visual {
        min-height: 300px;
    }

    .circle-one {
        width: 230px;
        height: 230px;
    }

    .circle-two {
        width: 170px;
        height: 170px;
    }

    .visual-text {
        font-size: 28px;
    }

    /* 手機版底部文字 */
    .hero-bottom {
        display: none;
    }

}
