#about,
#skills,
#work,
#contact {
    scroll-margin-top: 76px;
}


/* ==========================================================================
   Trust bar — icon cards
   ========================================================================== */

.trust-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-4);
}

.trust-card {
    background: var(--color-surface-alt);
    border-radius: var(--radius-lg);
    padding: var(--space-4);
}

.trust-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: var(--radius-full);
    background: var(--color-accent-soft);
    color: var(--color-accent-dark);
    margin-bottom: var(--space-3);
}

.trust-icon svg {
    width: 16px;
    height: 16px;
}

.trust-icon-text {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 0.8rem;
}

.trust-card h3 {
    font-size: var(--fs-base);
    margin-bottom: var(--space-1);
}

.trust-card p {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    line-height: 1.5;
}

/* ==========================================================================
   Section 共用
   ========================================================================== */

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: var(--space-5);
    margin-bottom: var(--space-6);
}

.hero-curtain-wrap {
    position: relative;
}

.hero-curtain {
    position: sticky;
    top: 76px;
    z-index: 0;
    overflow: hidden;
    min-height: calc(100vh - 76px);
    display: flex;
    align-items: center;
}

.hero-curtain>.wrap {
    width: 100%;
}

.hero-curtain-next {
    position: relative;
    z-index: 1;
    background: var(--color-bg);
}

.hero-curtain-spacer {
    height: 13vh;
    position: relative;
    z-index: 1;
    background: var(--color-bg);
}

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

.hero-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    pointer-events: none;
    z-index: 0;
}

.hero-glow--a {
    width: 620px;
    height: 620px;
    left: -180px;
    top: 5%;
    background: radial-gradient(circle, rgba(181, 138, 82, 0.42) 0%, rgba(181, 138, 82, 0.22) 45%, transparent 70%);
    /* 原本 0.30 / 0.13，改成 0.42 / 0.22 */
    animation: hero-drift-a 3.6s ease-in-out infinite;
}

.hero-glow--b {
    width: 560px;
    height: 560px;
    right: -160px;
    bottom: 8%;
    left: auto;
    top: auto;
    background: radial-gradient(circle, rgba(63, 75, 56, 0.34) 0%, transparent 70%);
    /* 原本 0.22，改成 0.34 */
    animation: hero-drift-b 4.2s ease-in-out infinite;
}

.hero-glow--c {
    width: 480px;
    height: 480px;
    left: 40%;
    bottom: -8%;
    background: radial-gradient(circle, rgba(181, 138, 82, 0.30) 0%, transparent 70%);
    /* 原本 0.20，改成 0.30 */
    animation: hero-drift-c 3s ease-in-out infinite;
    transform: translate(-50%, 0);
}

.hero-glow--d {
    width: 640px;
    height: 640px;
    left: 55%;
    top: 50%;
    background: radial-gradient(circle, rgba(63, 75, 56, 0.26) 0%, transparent 70%);
    /* 原本 0.16，改成 0.26 */
    animation: hero-drift-d 4.8s ease-in-out infinite;
    transform: translate(-50%, -50%);
}

@keyframes hero-drift-a {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    50% {
        transform: translate(190px, 140px) scale(1.25);
    }

    /* 原本 translate(70px, 50px) scale(1.15) */
}

@keyframes hero-drift-b {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    50% {
        transform: translate(-175px, -140px) scale(0.82);
    }

    /* 原本 translate(-60px, -50px) scale(0.9) */
}

@keyframes hero-drift-c {

    0%,
    100% {
        transform: translate(-50%, 0) scale(1);
    }

    50% {
        transform: translate(-50%, -130px) scale(1.22);
    }

    /* 原本 translate(-50%, -40px) scale(1.12) */
}

@keyframes hero-drift-d {

    0%,
    100% {
        transform: translate(-50%, -50%) scale(1);
    }

    50% {
        transform: translate(calc(-50% + 145px), calc(-50% + 115px)) scale(1.2);
    }

    /* 原本 calc(-50% + 40px)／calc(-50% + 30px) scale(1.1) */
}

@media (prefers-reduced-motion: reduce) {

    .hero-glow--a,
    .hero-glow--b,
    .hero-glow--c,
    .hero-glow--d {
        animation: none;
    }

    .hero-curtain {
        position: relative;
        top: auto;
    }
}

@media (max-width: 640px) {

    /* 手機螢幕比光暈本身還窄，四顆光暈先縮小，移動距離才真的能把它們拉開，不然一直都會覆蓋全螢幕自己重疊自己 */
    .hero-glow--a {
        width: 340px;
        height: 340px;
    }

    .hero-glow--b {
        width: 300px;
        height: 300px;
    }

    .hero-glow--c {
        width: 260px;
        height: 260px;
    }

    .hero-glow--d {
        width: 360px;
        height: 360px;
    }
}

.section#about {
    background: var(--color-surface-alt);
}

/* ==========================================================================
   縮圖 placeholder（無 thumbnail_url 時）
   ========================================================================== */

.thumb-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: var(--color-primary);
    color: rgba(255, 255, 255, 0.55);
}

.thumb-placeholder svg {
    width: 32%;
    height: 32%;
}

/* ==========================================================================
   狀態指示 — 滿版色塊 banner（僅精選大卡片使用）
   ========================================================================== */

.status-banner {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: var(--space-2) var(--space-4);
    color: #fff;
}

.status-banner--outline {
    background: var(--color-text-muted);
}

.status-banner--locked {
    background: var(--color-accent-dark);
}

.status-banner--live {
    background: var(--color-primary);
}



/* ==========================================================================
   Experience timeline
   ========================================================================== */

.timeline {
    position: relative;
    max-width: 640px;
}

.timeline-item {
    position: relative;
    display: flex;
    gap: var(--space-4);
    padding-bottom: var(--space-6);
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-item::before {
    content: "";
    position: absolute;
    left: 5px;
    top: 18px;
    bottom: -4px;
    width: 1.5px;
    background: var(--color-line);
}

.timeline-item:last-child::before {
    display: none;
}

.timeline-marker {
    flex-shrink: 0;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: var(--color-accent);
    margin-top: 6px;
    z-index: 1;
}

.timeline-body {
    flex: 1;
    min-width: 0;
}

.timeline-period {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--color-text-muted);
    margin-bottom: 2px;
}

.timeline-body h3 {
    font-size: var(--fs-base);
    margin-bottom: 2px;
}

.timeline-org {
    font-size: var(--fs-sm);
    color: var(--color-accent-dark);
    font-weight: 600;
    margin-bottom: var(--space-2);
}

.timeline-desc {
    font-size: var(--fs-sm);
    color: var(--color-text-muted);
    line-height: 1.6;
}

/* ==========================================================================
   精選大卡片（featured = true）
   ========================================================================== */

.featured-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-5);
    margin-bottom: var(--space-7);
}

.project-card-featured {
    display: block;
    background: var(--color-surface);
    border: 1px solid var(--color-line);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: border-color 160ms var(--ease-out), box-shadow 160ms var(--ease-out), transform 160ms var(--ease-out);
}

.project-card-featured:hover {
    border-color: var(--color-line-strong);
    box-shadow: var(--shadow-pop);
    transform: translateY(-4px);
}

.project-card-featured.is-static {
    cursor: default;
    pointer-events: none;
}

.project-thumb {
    position: relative;
    aspect-ratio: 4 / 3;
    background: var(--color-surface-alt);
}

.project-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-body {
    padding: var(--space-4) var(--space-4) var(--space-5);
}

.project-body h3 {
    margin-bottom: var(--space-2);
}

.project-tagline {
    font-size: var(--fs-sm);
    color: var(--color-text-muted);
    margin-bottom: var(--space-3);
}


/* ==========================================================================
   緊湊清單列（featured = false）
   ========================================================================== */

.compact-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.project-list-item {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    padding: var(--space-3);
    background: var(--color-surface);
    border: 1px solid var(--color-line);
    border-radius: var(--radius-md);
    transition: border-color 160ms var(--ease-out);
}

.project-list-item:hover {
    border-color: var(--color-line-strong);
}

.project-list-item.is-static {
    cursor: default;
    pointer-events: none;
}

.project-list-thumb {
    position: relative;
    flex-shrink: 0;
    width: 64px;
    height: 64px;
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.project-list-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-list-thumb .thumb-placeholder svg {
    width: 40%;
    height: 40%;
}

.project-list-body {
    flex: 1;
    min-width: 0;
}

.project-list-body h3 {
    font-size: var(--fs-base);
    margin-bottom: 2px;
}

.project-list-body p {
    font-size: var(--fs-sm);
    color: var(--color-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.project-list-arrow {
    flex-shrink: 0;
    color: var(--color-text-muted);
}

/* ==========================================================================
   Contact CTA
   ========================================================================== */

.contact-card {
    background: var(--color-primary);
    border-radius: var(--radius-lg);
    padding: var(--space-7) var(--space-6);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-6);
    flex-wrap: wrap;
}

.contact-copy {
    max-width: 440px;
}

.contact-copy .eyebrow {
    color: var(--color-accent-soft);
}

.contact-copy h2 {
    color: #fff;
    margin-bottom: var(--space-3);
}

.contact-copy p {
    font-size: var(--fs-sm);
    color: rgba(255, 255, 255, 0.65);
    line-height: 1.6;
}

.contact-actions {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    min-width: 240px;
}

.contact-email {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
}

.contact-secondary {
    display: flex;
    gap: var(--space-3);
}

.contact-secondary .btn-ghost {
    flex: 1;
    border-color: rgba(255, 255, 255, 0.25);
    color: #fff;
}

.contact-secondary .btn-ghost:hover {
    background: rgba(255, 255, 255, 0.08);
}

.contact-cv {
    border-color: rgba(255, 255, 255, 0.25);
    color: #fff;
}

.contact-cv:hover {
    background: rgba(255, 255, 255, 0.08);
}

@media (max-width: 640px) {
    .contact-card {
        padding: var(--space-5);
    }

    .contact-actions {
        width: 100%;
    }
}


/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1100px) {
    .featured-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 860px) {
    .trust-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .featured-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .featured-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .project-list-item {
        gap: var(--space-3);
        flex-wrap: wrap;
        row-gap: var(--space-2);
    }

    .project-list-thumb {
        width: 48px;
        height: 48px;
    }

    .project-list-body {
        flex-basis: calc(100% - 60px);
    }

    .project-list-body p {
        white-space: normal;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .project-list-item .status-badge {
        order: 3;
    }

    .project-list-arrow {
        order: 4;
        margin-left: auto;
    }
}