/* Main stylesheet for custom layout, motion, and utility overrides. */

/* Base document styles */
html,
body {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100%;
}

.site-root {
    background-color: #F9F8F6;
    color: #1C1B1A;
    overflow-x: hidden;
}

:root {
    --stable-vh: 100vh;
}

@supports (height: 100dvh) {
    :root {
        --stable-vh: 100dvh;
    }
}

body {
    background-color: #F9F8F6;
    cursor: auto;
}

.site-body {
    font-family: "Inter", "Noto Sans TC", sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

@media (min-width: 768px) {
    body {
        cursor: none;
    }
}

/* Base selection color */
::selection {
    background: #D4C5B3;
    color: #1C1B1A;
}

/* Keep scrolling behavior but hide native scrollbars. */
html,
body {
    -ms-overflow-style: none; /* IE and legacy Edge */
    scrollbar-width: none; /* Firefox */
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
}

/* Lenis Smooth Scroll CSS */
html.lenis { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }
.lenis.lenis-scrolling iframe { pointer-events: none; }

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 50;
    width: 100%;
    box-sizing: border-box;
    padding: calc(env(safe-area-inset-top, 0px) + 0.85rem) 2rem 1rem;
    color: #1C1B1A;
    background: #F9F8F6;
    border-bottom: 1px solid rgba(28, 27, 26, 0.08);
    box-shadow: 0 10px 24px rgba(28, 27, 26, 0.08);
    mix-blend-mode: normal;
    pointer-events: none;
    --menu-transition-duration: 0.2s;
    --menu-transition-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

@media (min-width: 768px) {
    .site-header {
        padding: 1.5rem 6rem;
    }
}

@media (max-width: 767px) {
    .site-header {
        padding: calc(env(safe-area-inset-top, 0px) + 0.75rem) 1rem 0.9rem;
    }
}

.site-header-container {
    position: relative;
    width: 100%;
    max-width: 80rem;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 2rem;
}

.site-brand,
.site-nav,
.site-menu-toggle {
    pointer-events: auto;
}

.site-brand {
    display: inline-flex;
    align-items: baseline;
    border: 0;
    padding: 0;
    background: transparent;
    color: inherit;
    font-family: "Cormorant Garamond", "Noto Sans TC", serif;
    font-size: 1.5rem;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.2, 1, 0.3, 1), opacity 0.3s;
}

.site-brand:hover {
    transform: translateY(-1px);
}

.site-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    pointer-events: auto;
}

@media (min-width: 768px) {
    .site-nav {
        position: static;
        top: auto;
        left: auto;
        transform: none;
        gap: 2.4rem;
        margin-left: auto;
        justify-content: flex-end;
    }
}

.site-nav-link {
    position: relative;
    color: inherit;
    font-family: "Cormorant Garamond", "Noto Sans TC", serif;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    transition: opacity 0.3s cubic-bezier(0.2, 1, 0.3, 1), transform 0.3s cubic-bezier(0.2, 1, 0.3, 1);
    white-space: nowrap;
    opacity: 0.8;
    padding: 0.25rem 0;
}

@media (min-width: 768px) {
    .site-nav-link {
        font-size: 1rem;
    }
}

@media (max-width: 767px) {
    .site-brand {
        font-size: 1.05rem;
        letter-spacing: 0.07em;
    }

    .site-nav-link {
        font-size: 0.82rem;
        letter-spacing: 0.1em;
    }
}

.site-nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background-color: currentColor;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.4s cubic-bezier(0.2, 1, 0.3, 1);
}

.site-nav-link:hover {
    opacity: 1;
    transform: translateY(-1px);
}

.site-nav-link:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

.site-menu-toggle {
    display: none;
    align-items: center;
    gap: 0.5rem;
    margin-left: auto;
    border: none;
    padding: 0.3rem 0;
    background: transparent;
    color: inherit;
    font-family: "Cormorant Garamond", "Noto Sans TC", serif;
    text-transform: uppercase;
    text-decoration: none;
    letter-spacing: 0.15em;
    font-size: 0.92rem;
    font-weight: 500;
    cursor: pointer;
    opacity: 0.82;
    transition: transform var(--menu-transition-duration) var(--menu-transition-ease), opacity var(--menu-transition-duration) ease;
}

.site-menu-toggle:hover {
    transform: translateY(-1px);
    opacity: 1;
}

.site-menu-icon {
    position: relative;
    width: 1rem;
    height: 1px;
    background: currentColor;
    border-radius: 999px;
    transition: background-color var(--menu-transition-duration) var(--menu-transition-ease);
}

.site-menu-icon::before,
.site-menu-icon::after {
    content: "";
    position: absolute;
    left: 0;
    width: 100%;
    height: 1px;
    background: currentColor;
    border-radius: inherit;
    transition: transform var(--menu-transition-duration) var(--menu-transition-ease), top var(--menu-transition-duration) var(--menu-transition-ease);
}

.site-menu-icon::before {
    top: -5px;
}

.site-menu-icon::after {
    top: 5px;
}

.site-menu-label {
    font-family: inherit;
    line-height: 1;
}

.site-header.site-header--menu .site-menu-toggle {
    display: inline-flex;
}

.site-header.site-header--menu .site-nav {
    position: absolute;
    top: calc(100% + 0.65rem);
    right: auto;
    left: 50%;
    transform: translate(-50%, -10px) scale(0.985);
    transform-origin: top center;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    width: 100vw;
    max-width: 100vw;
    margin: 0;
    padding: 1rem 0 1.15rem;
    gap: 0.9rem;
    border-bottom: 1px solid rgba(28, 27, 26, 0.12);
    background: #F2EFE9;
    color: #1C1B1A;
    box-shadow: 0 16px 34px rgba(28, 27, 26, 0.12);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    z-index: 60;
    transition: opacity var(--menu-transition-duration) var(--menu-transition-ease), transform var(--menu-transition-duration) var(--menu-transition-ease), visibility var(--menu-transition-duration) linear;
}

.site-header.site-header--menu .site-nav-link {
    display: block;
    font-size: 1rem;
    letter-spacing: 0.1em;
    opacity: 0.92;
    text-align: left;
    width: 100%;
    padding: 0.35rem 1.5rem;
}

.site-header.site-header--menu.is-menu-open .site-nav {
    transform: translate(-50%, 0) scale(1);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.site-header.site-header--menu.is-menu-animating .site-menu-toggle {
    pointer-events: none;
}

.site-header.is-layout-switching .site-menu-toggle,
.site-header.is-layout-switching .site-menu-icon,
.site-header.is-layout-switching .site-menu-icon::before,
.site-header.is-layout-switching .site-menu-icon::after,
.site-header.is-layout-switching .site-nav {
    transition: none !important;
}

.site-header.is-layout-switching.site-header--menu .site-nav {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.site-header.site-header--menu.is-menu-open .site-menu-icon {
    background: transparent;
}

.site-header.site-header--menu.is-menu-open .site-menu-icon::before {
    top: 0;
    transform: rotate(45deg);
}

.site-header.site-header--menu.is-menu-open .site-menu-icon::after {
    top: 0;
    transform: rotate(-45deg);
}

@media (max-width: 767px) {
    .site-menu-toggle {
        font-size: 0.84rem;
        letter-spacing: 0.1em;
    }
}

@media (prefers-reduced-motion: reduce) {
    .site-menu-toggle,
    .site-menu-icon,
    .site-menu-icon::before,
    .site-menu-icon::after,
    .site-header.site-header--menu .site-nav {
        transition: none;
    }
}

.main-shell {
    position: relative;
    z-index: 10;
    overflow: hidden;
    background: #F9F8F6;
}

.bg-orbs-layer {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.orb-1 {
    position: absolute;
    top: -10vh;
    left: -10vw;
    width: 50vw;
    height: 50vw;
    border-radius: 9999px;
    background: rgba(212, 197, 179, 0.4);
    filter: blur(68px);
    mix-blend-mode: multiply;
    opacity: 0.58;
}

.orb-2 {
    position: absolute;
    top: 60vh;
    right: -10vw;
    width: 40vw;
    height: 40vw;
    border-radius: 9999px;
    background: rgba(232, 224, 213, 0.6);
    filter: blur(56px);
    mix-blend-mode: multiply;
    opacity: 0.52;
}

@media (max-width: 767px) {
    .orb-1,
    .orb-2 {
        filter: blur(34px);
        mix-blend-mode: normal;
        opacity: 0.45;
    }
}

.hero-section {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    min-height: var(--stable-vh);
    width: 100%;
    box-sizing: border-box;
    padding-top: calc(env(safe-area-inset-top, 0px) + 3.5rem);
    padding-bottom: 2.5rem;
    padding-inline: 2rem;
}

@media (min-width: 768px) {
    .hero-section {
        padding-top: 0;
        padding-bottom: 0;
        padding-inline: 6rem;
    }
}

.hero-section .section-container {
    width: 100%;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
}

.hero-content {
    z-index: 10;
    margin-top: clamp(0.5rem, 3vh, 1.5rem);
    width: 100%;
}

@media (min-width: 768px) {
    .hero-content {
        margin-top: 0;
    }
}

.hero-subtitle {
    margin: 0 0 calc(1.5rem - 0.2em);
    overflow: hidden;
    color: #4A4641;
    font-size: 1.2rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    font-family: "Inter", "Noto Sans TC", sans-serif;
}

@media (min-width: 768px) {
    .hero-subtitle {
        font-size: 1.5rem;
    }
}

.hero-subtitle > span {
    display: block;
    padding-bottom: 0.2em;
    transform: translateY(100%);
}

.hero-title {
    margin: 0;
    color: #1C1B1A;
    font-family: "Cormorant Garamond", "Noto Sans TC", serif;
    font-size: clamp(3rem, 13vw, 5.8rem);
    font-weight: 500;
    letter-spacing: -0.025em;
    line-height: 0.85;
}

@media (min-width: 768px) {
    .hero-title {
        font-size: clamp(5rem, 10vw, 10rem);
    }
}

.hero-title-line {
    overflow: hidden;
    margin-bottom: -0.2em;
}

.hero-title-line > span {
    display: block;
    padding-bottom: 0.2em;
    transform: translateY(100%);
}

@media (max-width: 767px) {
    .hero-title-line > span {
        line-height: 1.05;
    }
}

.hero-title-line--offset {
    margin-left: 5vw;
}

@media (min-width: 768px) {
    .hero-title-line--offset {
        margin-left: 10vw;
    }
}

.hero-title-accent {
    color: #B59B7D;
    font-style: italic;
}

.hero-desc {
    margin-top: clamp(1rem, 3vh, 2rem);
    margin-bottom: -0.2em;
    max-width: 650px;
    overflow: hidden;
    color: #3A3631;
}

@media (min-width: 768px) {
    .hero-desc {
        margin-top: 2rem;
        max-width: 750px;
    }
}

.hero-desc > span {
    display: block;
    padding-bottom: 0.2em;
    transform: translateY(100%);
    font-size: 1.15rem;
    font-weight: 400;
    line-height: 1.7;
    letter-spacing: 0.03em;
    font-family: "Inter", "Noto Sans TC", sans-serif;
}

@media (min-width: 768px) {
    .hero-desc > span {
        font-size: 1.45rem;
    }
}

.hero-scroll {
    position: absolute;
    bottom: 1.75rem;
    left: 1.25rem;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    opacity: 0;
}

@media (min-width: 768px) {
    .hero-scroll {
        left: 6rem;
    }
}

.hero-scroll-label {
    color: #8A8681;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    transform: rotate(-90deg) translateY(-20px);
}

.hero-scroll-track {
    position: relative;
    width: 1px;
    height: 4rem;
    overflow: hidden;
    background: rgba(138, 134, 129, 0.3);
}

.hero-scroll-fill {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #1C1B1A;
}

.about-section {
    position: relative;
    z-index: 10;
    padding: 8rem 2rem;
}

@media (min-width: 768px) {
    .about-section {
        padding: 10rem 6rem;
    }
}

.about-layout {
    display: flex;
    max-width: 72rem;
    margin: 0 auto;
    flex-direction: column;
    gap: 4rem;
}

@media (min-width: 768px) {
    .about-layout {
        flex-direction: row;
        gap: 6rem;
    }
}

.about-main,
.about-side {
    width: 100%;
}

@media (min-width: 768px) {
    .about-main {
        width: 66.666667%;
    }

    .about-side {
        width: 33.333333%;
    }
}

.about-tag-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.about-tag {
    color: #B59B7D;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.3em;
}

.about-text {
    margin: 0;
    color: #8A8681;
    font-family: "Cormorant Garamond", "Noto Sans TC", serif;
    font-size: 1.5rem;
    letter-spacing: -0.025em;
    line-height: 1.4;
}

@media (min-width: 768px) {
    .about-text {
        font-size: 1.875rem;
    }
}

@media (min-width: 1024px) {
    .about-text {
        font-size: 2.25rem;
    }
}

.about-side {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.about-side-stack {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.about-block-title {
    margin: 0 0 0.75rem;
    color: #1C1B1A;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1em;
}

.about-block-copy {
    margin: 0;
    color: #8A8681;
    font-size: 0.875rem;
    font-weight: 300;
    line-height: 1.625;
}

@media (min-width: 768px) {
    .about-block-copy {
        font-size: 1rem;
    }
}

.section-container {
    max-width: 80rem;
    margin: 0 auto;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 5rem;
}

.section-header--tight {
    margin-bottom: 4rem;
}

@media (min-width: 768px) {
    .section-header--tight {
        margin-bottom: 5rem;
    }
}

.section-divider {
    width: 3rem;
    height: 1px;
    background: #B59B7D;
}

.section-heading {
    margin: 0;
    color: #B59B7D;
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.2em;
}

.expertise-section {
    position: relative;
    z-index: 10;
    padding: 10rem 2rem; /* Increased padding */
    border-top-left-radius: 4rem; /* Adjusted slightly */
    border-top-right-radius: 4rem;
    background: #FFFFFF;
    box-shadow: 0 -30px 60px rgba(0, 0, 0, 0.03); /* Softer, deeper shadow */
    margin-top: 0;
}

@media (min-width: 768px) {
    .expertise-section {
        padding: 12rem 6rem;
        border-top-left-radius: 6rem;
        border-top-right-radius: 6rem;
        margin-top: -6rem;
    }
}

.expertise-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem; /* Increased gap */
}

@media (min-width: 768px) {
    .expertise-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 4rem;
    }
}

.exp-card {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(28, 27, 26, 0.03);
    border-radius: 1.5rem; /* Slightly less rounded */
    background: #FFFFFF;
    padding: 1.5rem;
    transition: transform 0.6s cubic-bezier(0.2, 1, 0.3, 1), box-shadow 0.6s cubic-bezier(0.2, 1, 0.3, 1);
}

@media (min-width: 768px) {
    .exp-card {
        padding: 2.5rem;
    }
}

.exp-card:hover {
    transform: translateY(-0.75rem);
    box-shadow: 0 20px 40px rgba(181, 155, 125, 0.08);
}

.exp-card--offset {
    margin-top: 0;
}

@media (min-width: 768px) {
    .exp-card--offset {
        margin-top: 4rem; /* Reduced offset for tighter flow */
    }
}

.exp-card-sheen {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(242, 239, 233, 0.5), rgba(255, 255, 255, 0));
    opacity: 0;
    transition: opacity 0.8s;
}

.exp-card:hover .exp-card-sheen {
    opacity: 1;
}

.exp-card-content {
    position: relative;
    z-index: 10;
}

.exp-icon-box {
    display: flex;
    width: 3.5rem;
    height: 3.5rem;
    align-items: center;
    justify-content: center;
    margin-bottom: 2.5rem;
    border: 1px solid rgba(181, 155, 125, 0.1);
    border-radius: 1.25rem;
    background: #F9F8F6;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
    transition: transform 0.6s cubic-bezier(0.2, 1, 0.3, 1), background-color 0.4s;
}

@media (min-width: 768px) {
    .exp-icon-box {
        width: 4.5rem;
        height: 4.5rem;
    }
}

.exp-card:hover .exp-icon-box {
    transform: scale(1.05) rotate(5deg);
    background-color: #FFFFFF;
}

.exp-icon {
    width: 1.5rem;
    height: 1.5rem;
    color: #B59B7D;
}

@media (min-width: 768px) {
    .exp-icon {
        width: 2.25rem;
        height: 2.25rem;
    }
}

.exp-card-title {
    margin: 0 0 1.25rem;
    color: #1C1B1A;
    font-family: "Cormorant Garamond", "Noto Sans TC", serif;
    font-size: 1.75rem;
    line-height: 1.2;
}

@media (min-width: 768px) {
    .exp-card-title {
        font-size: 2.25rem;
    }
}

.exp-card-copy {
    margin: 0 0 1.5rem;
    color: #8A8681;
    font-style: italic;
    font-weight: 300;
    line-height: 1.7;
    font-size: 1.125rem;
}

.exp-card-glow {
    position: absolute;
    right: -6rem;
    bottom: -6rem;
    width: 20rem;
    height: 20rem;
    border-radius: 9999px;
    background: rgba(212, 197, 179, 0.08);
    filter: blur(50px);
    pointer-events: none;
    transition: background-color 0.8s, transform 0.8s;
}

.exp-card:hover .exp-card-glow {
    background: rgba(181, 155, 125, 0.15);
    transform: scale(1.1);
}

.projects-section {
    position: relative;
    z-index: 10;
    padding: 10rem 2rem;
    background: #F2EFE9;
    margin-top: 0;
    border-top-left-radius: 4rem;
    border-top-right-radius: 4rem;
}

@media (min-width: 768px) {
    .projects-section {
        padding: 12rem 6rem;
        margin-top: -6rem;
        border-top-left-radius: 6rem;
        border-top-right-radius: 6rem;
    }
}

.projects-list {
    display: flex;
    flex-direction: column;
    gap: 4rem;
}

@media (min-width: 768px) {
    .projects-list {
        gap: 6rem;
    }
}

.project-item {
    display: flex;
    flex-direction: column;
    justify-content: center;
    border: 1px solid rgba(28, 27, 26, 0.03);
    border-radius: 2rem;
    background: #FFFFFF;
    padding: 2.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
    transition: transform 0.6s cubic-bezier(0.2, 1, 0.3, 1), box-shadow 0.6s cubic-bezier(0.2, 1, 0.3, 1), background-color 0.5s;
}

@media (min-width: 768px) {
    .project-item {
        padding: 5rem;
    }
}

.project-item:hover {
    transform: translateY(-0.5rem);
    background: #FFFFFF;
    box-shadow: 0 30px 60px rgba(181, 155, 125, 0.12);
}

.project-kicker {
    display: block;
    margin-bottom: 1.5rem;
    color: #B59B7D;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 0.875rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.project-title {
    margin: 0 0 2rem;
    color: #1C1B1A;
    font-family: "Cormorant Garamond", "Noto Sans TC", serif;
    font-size: 2rem;
    line-height: 1.1;
    transition: color 0.5s;
}

@media (min-width: 768px) {
    .project-title {
        font-size: 3.5rem;
    }
}

.project-item:hover .project-title {
    color: #B59B7D;
}

.project-copy {
    max-width: 50rem;
    margin: 0 0 2.5rem;
    color: #8A8681;
    font-size: 1.125rem;
    font-weight: 300;
    line-height: 1.7;
}

@media (min-width: 768px) {
    .project-copy {
        font-size: 1.25rem;
    }
}

.project-pill-group {
    margin-bottom: 3rem;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    width: fit-content;
    border-bottom: 1px solid rgba(138, 134, 129, 0.3);
    padding-bottom: 0.5rem;
    color: #1C1B1A;
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-decoration: none;
    text-transform: uppercase;
    transition: color 0.3s, border-color 0.3s, gap 0.3s;
}

.project-link:hover {
    color: #B59B7D;
    border-color: #B59B7D;
    gap: 1.25rem;
}

.experience-section {
    position: relative;
    z-index: 10;
    padding: 10rem 2rem;
    background: #FFFFFF;
    margin-top: 0;
    border-top-left-radius: 4rem;
    border-top-right-radius: 4rem;
}

@media (min-width: 768px) {
    .experience-section {
        padding: 12rem 6rem;
        margin-top: -6rem;
        border-top-left-radius: 6rem;
        border-top-right-radius: 6rem;
    }
}

.experience-intro {
    margin-bottom: 6rem;
    text-align: center;
}

.experience-heading {
    margin: 0 0 1.5rem;
    color: #1C1B1A;
    font-family: "Cormorant Garamond", "Noto Sans TC", serif;
    font-size: 2.25rem;
}

@media (min-width: 768px) {
    .experience-heading {
        font-size: 3rem;
    }
}

.experience-intro-line {
    width: 1px;
    height: 4rem;
    margin: 0 auto;
    background: #D4C5B3;
}

.experience-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4rem;
}

@media (min-width: 1024px) {
    .experience-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 6rem;
    }
}

.timeline-column-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 3rem;
}

.timeline-icon {
    width: 1.5rem;
    height: 1.5rem;
    color: #B59B7D;
}

.timeline-column-title {
    margin: 0;
    color: #1C1B1A;
    font-family: "Cormorant Garamond", "Noto Sans TC", serif;
    font-size: 1.5rem;
}

.timeline-rail {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 4rem;
    margin-left: 0.75rem;
    border-left: 1px solid rgba(212, 197, 179, 0.5);
}

@media (min-width: 768px) {
    .timeline-rail {
        margin-left: 1rem;
    }
}

.timeline-item {
    position: relative;
    display: block;
    padding-left: 2.5rem;
    color: inherit;
    text-decoration: none;
}

@media (min-width: 768px) {
    .timeline-item {
        padding-left: 3rem;
    }
}

.timeline-dot {
    position: absolute;
    top: 0.5rem;
    border-radius: 9999px;
    transition: background-color 0.3s;
}

.timeline-dot--gold {
    left: -6px;
    width: 11px;
    height: 11px;
    border: 2px solid #B59B7D;
    background: #FFFFFF;
}

.timeline-item:hover .timeline-dot--gold {
    background: #B59B7D;
}

.timeline-dot--accent {
    left: -5px;
    width: 9px;
    height: 9px;
    background: #D4C5B3;
}

.timeline-item:hover .timeline-dot--accent {
    background: #1C1B1A;
}

.timeline-dot--accent-soft {
    left: -5px;
    width: 9px;
    height: 9px;
    background: rgba(212, 197, 179, 0.5);
}

.timeline-item:hover .timeline-dot--accent-soft {
    background: #1C1B1A;
}

.timeline-date {
    display: block;
    margin-bottom: 0.5rem;
    color: #B59B7D;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
}

.timeline-date--muted {
    color: #8A8681;
}

.timeline-company {
    margin: 0 0 0.5rem;
    color: #1C1B1A;
    font-family: "Cormorant Garamond", "Noto Sans TC", serif;
    transition: color 0.3s;
}

.timeline-company--lg {
    font-size: 1.5rem;
}

@media (min-width: 768px) {
    .timeline-company--lg {
        font-size: 1.875rem;
    }
}

.timeline-company--md {
    font-size: 1.25rem;
}

@media (min-width: 768px) {
    .timeline-company--md {
        font-size: 1.5rem;
    }
}

.timeline-item:hover .timeline-company {
    color: #B59B7D;
}

.timeline-role {
    margin: 0 0 1rem;
    color: #8A8681;
    font-size: 1.125rem;
    font-weight: 500;
}

.timeline-role--sm {
    font-size: 1rem;
}

.timeline-copy {
    margin: 0;
    color: rgba(138, 134, 129, 0.8);
    font-weight: 300;
    line-height: 1.625;
}

@media (min-width: 768px) and (max-width: 1023px) {
    .about-section {
        padding: 9rem 4rem;
    }

    .about-layout {
        gap: 4.5rem;
    }

    .about-main {
        width: 62%;
    }

    .about-side {
        width: 38%;
    }

    .about-text {
        font-size: 1.7rem;
        line-height: 1.36;
    }

    .about-block-copy {
        font-size: 0.95rem;
        line-height: 1.58;
    }

    .expertise-section {
        padding: 11rem 4rem;
        border-top-left-radius: 5rem;
        border-top-right-radius: 5rem;
        margin-top: -5rem;
    }

    .expertise-grid {
        gap: 2rem;
    }

    .exp-card {
        padding: 2rem;
    }

    .exp-card--offset {
        margin-top: 2.5rem;
    }

    .exp-card-title {
        font-size: 1.7rem;
    }

    .projects-section {
        padding: 11rem 4rem;
        margin-top: -5rem;
        border-top-left-radius: 5rem;
        border-top-right-radius: 5rem;
    }

    .projects-list {
        gap: 4.85rem;
    }

    .project-item {
        padding: 3.9rem;
    }

    .project-kicker {
        font-size: 0.8rem;
        letter-spacing: 0.16em;
    }

    .project-title {
        font-size: 2.75rem;
    }

    .project-copy {
        font-size: 1.08rem;
        line-height: 1.66;
    }

    .experience-section {
        padding: 11rem 4rem;
        margin-top: -5rem;
        border-top-left-radius: 5rem;
        border-top-right-radius: 5rem;
    }

    .experience-intro {
        margin-bottom: 4.5rem;
    }

    .experience-grid {
        grid-template-columns: 1fr;
        gap: 3.6rem;
        max-width: 54rem;
        margin: 0 auto;
    }

    .timeline-column-header {
        margin-bottom: 2.35rem;
    }

    .timeline-column-title {
        font-size: 1.35rem;
    }

    .timeline-rail {
        margin-left: 0.85rem;
        gap: 3.35rem;
    }

    .timeline-item {
        padding-left: 2.65rem;
    }

    .timeline-company--lg {
        font-size: 1.65rem;
    }

    .timeline-role {
        font-size: 1rem;
        line-height: 1.42;
    }

    .timeline-copy {
        font-size: 0.98rem;
        line-height: 1.68;
    }
}

.footer-spacer {
    position: relative;
    z-index: 0;
    width: 100%;
    height: var(--stable-vh);
    background: transparent;
    pointer-events: none;
}

.site-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    z-index: 1;
    display: flex;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    height: var(--stable-vh);
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    background: #1C1B1A;
    color: #FFFFFF;
    padding: 2rem
        max(2rem, env(safe-area-inset-right, 0px))
        calc(2rem + env(safe-area-inset-bottom, 0px))
        max(2rem, env(safe-area-inset-left, 0px));
}

@media (min-width: 768px) {
    .site-footer {
        padding: 6rem
            max(6rem, env(safe-area-inset-right, 0px))
            calc(6rem + env(safe-area-inset-bottom, 0px))
            max(6rem, env(safe-area-inset-left, 0px));
    }
}

.footer-noise {
    position: absolute;
    inset: 0;
    opacity: 0.1;
    pointer-events: none;
}

.footer-glow {
    position: absolute;
    top: 0;
    right: 0;
    width: 80vw;
    height: 80vw;
    border-radius: 9999px;
    background: rgba(181, 155, 125, 0.05);
    filter: blur(150px);
    pointer-events: none;
    transform: translateX(50%) translateY(-50%);
}

.footer-content {
    position: relative;
    z-index: 10;
    display: flex;
    height: 100%;
    margin-top: auto;
    flex-direction: column;
    justify-content: flex-end;
}

.footer-title {
    margin: 0 0 3rem;
    color: #FFFFFF;
    font-family: "Cormorant Garamond", "Noto Sans TC", serif;
    font-size: clamp(2.75rem, 11.5vw, 4.8rem);
    letter-spacing: -0.05em;
    line-height: 0.9;
}

@media (min-width: 768px) {
    .footer-title {
        font-size: 8vw;
    }
}

.footer-title-accent {
    color: #B59B7D;
    font-style: italic;
}

.footer-bottom-row {
    display: flex;
    margin-top: 2rem;
    width: 100%;
    max-width: 100%;
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;
    gap: 3rem;
}

@media (min-width: 768px) {
    .footer-bottom-row {
        margin-top: 4rem;
        flex-direction: row;
        align-items: flex-end;
    }
}

.footer-cta {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: inherit;
    text-decoration: none;
}

@media (min-width: 768px) {
    .footer-cta {
        gap: 1.5rem;
    }
}

.footer-cta-icon {
    display: flex;
    width: 3rem;
    height: 3rem;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 9999px;
    transition: all 0.5s;
}

@media (min-width: 768px) {
    .footer-cta-icon {
        width: 4rem;
        height: 4rem;
    }
}

.footer-cta:hover .footer-cta-icon {
    background: #FFFFFF;
    color: #1C1B1A;
}

.footer-cta-icon-mark {
    width: 1.25rem;
    height: 1.25rem;
}

@media (min-width: 768px) {
    .footer-cta-icon-mark {
        width: 1.5rem;
        height: 1.5rem;
    }
}

.footer-cta-label {
    border-bottom: 1px solid transparent;
    color: inherit;
    font-size: 1.25rem;
    font-weight: 300;
    letter-spacing: 0.025em;
    transition: border-color 0.2s;
}

@media (min-width: 768px) {
    .footer-cta-label {
        font-size: 1.5rem;
    }
}

.footer-cta:hover .footer-cta-label {
    border-bottom-color: #FFFFFF;
}

.footer-links {
    display: flex;
    flex-direction: column;
    max-width: 100%;
    gap: 1rem;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.75rem;
    font-weight: 300;
    letter-spacing: 0.1em;
}

@media (min-width: 768px) {
    .footer-links {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: flex-end;
        gap: 2rem;
        font-size: 0.875rem;
    }
}

.footer-link {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-link:hover {
    color: #B59B7D;
}

.footer-copyright {
    color: rgba(255, 255, 255, 0.3);
}

/* Custom Cursor (Only Outline) */
.cursor-outline {
    position: fixed;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    z-index: 9999;
    pointer-events: none;
    display: none;
    mix-blend-mode: difference;
    background-color: transparent;
}

@media (min-width: 768px) {
    .cursor-outline {
        display: block;
    }
}

.cursor-outline {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    transition: width 0.3s, height 0.3s, border-color 0.3s, background-color 0.3s, transform 0.1s ease-out;
}

/* Hover States for Cursor */
.cursor-hover .cursor-outline {
    width: 60px;
    height: 60px;
    background-color: transparent;
    border-color: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(2px);
}

.cursor-view .cursor-outline {
    width: 80px;
    height: 80px;
    background-color: transparent;
    border-color: rgba(255, 255, 255, 0.8);
    mix-blend-mode: difference;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.8);
}

.cursor-view .cursor-outline::after {
    content: 'VIEW';
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 2px;
}

/* Noise Background */
.bg-noise {
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: 0.04;
}

/* Animations */
@keyframes scrollLine {
    0% { transform: scaleY(0); transform-origin: top; }
    50% { transform: scaleY(1); transform-origin: top; }
    50.1% { transform: scaleY(1); transform-origin: bottom; }
    100% { transform: scaleY(0); transform-origin: bottom; }
}

.scroll-line-anim {
    animation: scrollLine 2s cubic-bezier(0.77, 0, 0.175, 1) infinite;
}

/* About Text Highlight Effect */
.about-text span {
    transition: color 0.2s ease-out;
}

.hoverable {
    user-select: none;
}

.pill-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.tech-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 9999px;
    color: #1C1B1A;
    font-size: 10px;
    font-weight: 400;
    letter-spacing: 0.2em;
    line-height: 1;
    text-transform: none;
    white-space: nowrap;
}

.tech-pill--accent {
    background: #F9F8F6;
    border: 1px solid rgba(212, 197, 179, 0.3);
    padding: 0.375rem 0.75rem;
}

@media (min-width: 768px) {
    .tech-pill--accent {
        padding: 0.5rem 1rem;
    }
}

.tech-pill--dark {
    background: #F9F8F6;
    border: 1px solid rgba(28, 27, 26, 0.1);
    padding: 0.5rem 1rem;
}

/* Small utility set for icon sizing usage in inline links. */
.w-4 {
    width: 1rem;
}

.h-4 {
    height: 1rem;
}

.detail-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin: 0 0 2rem;
    padding: 0;
    list-style: none;
    color: rgba(138, 134, 129, 0.8);
    font-size: 0.875rem;
    font-weight: 300;
    line-height: 1.75;
}

.detail-list-item {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.detail-list-bullet {
    width: 0.25rem;
    height: 0.25rem;
    margin-top: 0.375rem;
    border-radius: 9999px;
    background: #B59B7D;
    flex: none;
}

/* Preserve authored casing and prevent style-driven uppercase transforms */
.site-brand,
.hero-title,
.about-text,
.exp-card-title,
.project-title,
.timeline-column-title,
.timeline-company,
.experience-heading,
.footer-title {
    text-transform: none !important;
    font-variant-caps: normal;
}

.footer-contact-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-contact-hint {
    margin: 0;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.875rem;
    font-weight: 300;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

@media (min-width: 768px) {
    .footer-contact-hint {
        font-size: 1rem;
    }
}

@media (max-width: 767px) {
    .footer-cta-label {
        font-size: 1rem;
        word-break: break-all;
    }
}
