/* ==========================================================================
   CSS Tokens & Variable Definitions
   ========================================================================== */
:root {
    --bg-color: #edebe6; /* 灰泥暖紙色 */
    --card-bg: #ffffff; /* 卡片白 */
    --text-color: #000000; /* 極黑 */
    --text-muted: #555555; /* 灰字 */
    --border-color: #000000; /* 邊框黑 */
    --accent-color: #ff4500; /* 橘紅點綴色 */
    --font-display: "Outfit", "Noto Sans TC", sans-serif;
    --font-mono: "Space Mono", monospace;
    --border-width: 1px;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-display);
    font-size: 16px;
    line-height: 1.5;
    overflow-x: hidden;
    scrollbar-width: none; /* 隱藏 Firefox 滾動條 */
    -ms-overflow-style: none; /* 隱藏 IE 和 Edge 滾動條 */
}

/* ==========================================================================
   噪點質感疊加層 (Noise & Texture Overlay)
   ========================================================================== */
.noise-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    opacity: 0.5;
    z-index: 9999;
    pointer-events: none;
    filter: url(#noise-filter);
}

/* 隱藏 Chrome, Safari 和 Opera 的滾動條 */
::-webkit-scrollbar {
    display: none;
}

/* ==========================================================================
   Layout Containers
   ========================================================================== */
.site-container {
    max-width: 1440px;
    margin: 0 auto;
    border-left: var(--border-width) solid var(--border-color);
    border-right: var(--border-width) solid var(--border-color);
    background-color: var(--bg-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.main-content {
    flex-grow: 1;
}

/* ==========================================================================
   Header Styles
   ========================================================================== */
.site-header {
    border-bottom: var(--border-width) solid var(--border-color);
}

.header-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2.5rem 2rem;
    border-bottom: var(--border-width) solid var(--border-color);
}

.header-brand h1 {
    font-size: 3rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: -0.04em;
    line-height: 0.9;
}

.header-brand h1 span {
    font-family: var(--font-mono);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--accent-color);
    vertical-align: super;
    margin-left: 0.2rem;
}

.brand-sub {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--text-color);
    margin-top: 0.5rem;
}

.meta-date {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    font-weight: 700;
    text-align: right;
    border: var(--border-width) solid var(--border-color);
    padding: 0.6rem 1.2rem;
    background-color: var(--bg-color);
}

.nav-bar-sub {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 2rem;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    background-color: rgba(0, 0, 0, 0.03);
}

.nav-links {
    display: flex;
    gap: 1.5rem;
}

.header-nav {
    font-family: var(--font-mono);
    font-size: 1.05rem; /* 字稍微大一點 */
    letter-spacing: -0.02em;
}

.sub-nav-link {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 700;
    border-bottom: 2px solid transparent;
    transition: border-color 0.2s ease;
}

.sub-nav-link:hover {
    border-color: var(--border-color);
}

/* ==========================================================================
   Intro Section
   ========================================================================== */
.intro-section {
    border-bottom: var(--border-width) solid var(--border-color);
}

.intro-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 400px;
}

.intro-text {
    padding: 4rem 2rem;
    border-right: var(--border-width) solid var(--border-color);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.section-tag {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: 1rem;
    letter-spacing: 0.1em;
}

.title-large {
    font-size: 3.5rem;
    font-weight: 900;
    letter-spacing: -0.03em;
    line-height: 1;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
}

.lead-text {
    font-size: 1.2rem;
    color: var(--text-muted);
    font-weight: 400;
    max-width: 540px;
}

.intro-image-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-color);
    overflow: hidden;
    position: relative;
}

.intro-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.96) contrast(1.05);
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ==========================================================================
   Common Section Title Bar
   ========================================================================== */
.section-title-bar {
    border-bottom: var(--border-width) solid var(--border-color);
    padding: 1.5rem 2rem;
    background-color: var(--border-color);
    color: var(--bg-color);
}

.section-title-bar h2 {
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 900;
    letter-spacing: 0.05em;
}

/* ==========================================================================
   Profiles Section
   ========================================================================== */
.profiles-section {
    margin-top: 0; /* 緊貼上方 Intro Section，無縫對接 */
    border-top: none; /* 移除重複邊框，防止格線變粗 */
    border-bottom: var(--border-width) solid var(--border-color);
}

.profiles-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.profile-card {
    padding: 4rem 2rem;
    position: relative;
    background-color: var(--bg-color);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.human-card {
    border-right: var(--border-width) solid var(--border-color);
}



.card-num {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: 1.5rem;
}

.card-name {
    font-size: 2.2rem;
    font-weight: 900;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
}

.card-role {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-color);
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.8rem;
    margin-bottom: 1.5rem;
    display: inline-block;
}

.card-description {
    font-size: 1.05rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    min-height: 100px;
}

.card-skills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.skill-tag {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 700;
    border: 1px solid var(--border-color);
    padding: 0.3rem 0.8rem;
    background-color: var(--bg-color);
    transition: all 0.2s ease;
}



/* ==========================================================================
   Pipeline Section
   ========================================================================== */
.pipeline-section {
    border-top: var(--border-width) solid var(--border-color);
    border-bottom: var(--border-width) solid var(--border-color);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.1s ease-out, transform 0.1s ease-out;
}

.pipeline-grid {
    display: flex;
    flex-direction: column;
}

.pipeline-step {
    padding: 3rem 2rem;
    border-bottom: var(--border-width) solid var(--border-color);
    transition: all 0.3s ease;
}

.pipeline-step:last-child {
    border-bottom: none;
}

.pipeline-step:hover {
    background-color: rgba(255, 69, 0, 0.05); /* 微弱橘色背景 */
}

.step-num {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: 1.2rem;
}

.step-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.8rem;
}

.step-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* ==========================================================================
   Footer Styles
   ========================================================================== */
.site-footer {
    padding: 2.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: transparent;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    border-top: var(--border-width) solid var(--border-color);
}

.home-btn {
    color: var(--text-color);
    text-decoration: none;
    border: 1px solid var(--border-color);
    padding: 0.4rem 1.2rem;
    font-weight: 700;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    transition: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    background-color: transparent;
    display: inline-block;
    letter-spacing: 0.05em;
}

.home-btn:hover {
    background-color: var(--border-color);
    color: var(--bg-color);
}

/* ==========================================================================
   Animations
   ========================================================================== */
.site-container {
    opacity: 0;
    animation: fade-in 0.8s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

@keyframes fade-in {
    to {
        opacity: 1;
    }
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */
@media (max-width: 992px) {
    .intro-grid {
        grid-template-columns: 1fr;
    }
    .intro-text {
        border-right: none;
        border-bottom: var(--border-width) solid var(--border-color);
        padding: 3rem 2rem;
    }
    .intro-image-wrapper {
        height: 350px;
    }
    .profiles-grid {
        grid-template-columns: 1fr;
    }
    .human-card {
        border-right: none;
        border-bottom: var(--border-width) solid var(--border-color);
    }
    .pipeline-grid {
        grid-template-columns: 1fr 1fr;
    }
    .pipeline-step {
        border-bottom: var(--border-width) solid var(--border-color);
    }
    .pipeline-step:nth-child(2n) {
        border-right: none;
    }
    .pipeline-step:nth-child(3), .pipeline-step:nth-child(4) {
        border-bottom: none;
    }
}

@media (max-width: 768px) {
    .header-main {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
        padding: 1.5rem 1.2rem;
    }
    .meta-date {
        text-align: left;
        width: 100%;
    }
    .nav-bar-sub {
        padding: 0.8rem 1.2rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    .intro-text {
        padding: 2.5rem 1.2rem;
    }
    .title-large {
        font-size: 2.5rem;
    }
    .profile-card {
        padding: 2.5rem 1.2rem;
    }
    .card-name {
        font-size: 1.8rem;
    }
    .pipeline-grid {
        grid-template-columns: 1fr;
    }
    .pipeline-step {
        border-right: none !important;
        border-bottom: var(--border-width) solid var(--border-color);
        padding: 2rem 1.2rem;
    }
    .pipeline-step:last-child {
        border-bottom: none;
    }
    .site-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
        padding: 2rem 1.2rem;
    }
}

.author-link {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: all 0.2s ease;
}

.author-link:hover {
    color: var(--accent-color);
    border-bottom-color: var(--accent-color);
}



/* ==========================================================================
   過渡區與漸變探索 (Transition & Gradient Explorer)
   ========================================================================== */
.pipeline-section {
    margin-top: 1600px; /* 撐開 1600px 的滾動黑暗漸變探索區，對接 PROCESS */
    border-top: var(--border-width) solid var(--border-color);
    border-bottom: var(--border-width) solid var(--border-color);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.1s ease-out, transform 0.1s ease-out;
}

/* ==========================================================================
   Q&A Section Styles
   ========================================================================== */
.qa-section {
    border-bottom: var(--border-width) solid var(--border-color);
    background-color: var(--bg-color);
}

.qa-content {
    padding: 4rem 2rem;
}

.qa-block {
    max-width: 900px;
    margin: 0 auto;
}

.qa-question {
    font-size: 2rem;
    font-weight: 900;
    line-height: 1.3;
    margin-bottom: 2rem;
    letter-spacing: -0.01em;
    border-left: 4px solid var(--accent-color);
    padding-left: 1.5rem;
}

.qa-answer {
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--text-color);
}

.qa-intro-text {
    margin-bottom: 2rem;
    font-weight: 700;
}

.qa-list {
    list-style: none;
    padding: 0;
}

.qa-list li {
    margin-bottom: 2rem;
    border-bottom: var(--border-width) dashed rgba(0, 0, 0, 0.1);
    padding-bottom: 1.5rem;
}

.qa-list li:last-child {
    margin-bottom: 0;
    border-bottom: none;
    padding-bottom: 0;
}

.qa-list li strong {
    display: block;
    font-size: 1.2rem;
    font-family: var(--font-display);
    color: var(--accent-color);
    margin-bottom: 0.5rem;
}

.qa-list li p {
    color: var(--text-muted);
}

@media (max-width: 768px) {
    .qa-content {
        padding: 2.5rem 1.2rem;
    }
    .qa-question {
        font-size: 1.5rem;
        padding-left: 1rem;
    }
}

.concept-link {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 4px;
    transition: all 0.2s ease;
}

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


