.hamburger {
    display: none;
    margin-right: -0.5em;
}

@media (max-width: 828px) and (orientation: portrait) {
    :root {
        font-size: clamp(14px, 2vw + 10px, 17px);
    }

    #last-update.text {
        font-size: 1em !important;
        color: #333 !important;
        text-align: right !important;
        margin-top: -1em !important;
        padding-left: 1em !important;
        padding-right: 1em !important;

    }

    header {
        display: flex;
        flex-wrap: wrap;
        line-height: 1.8em;
        padding: 30px 30px;
        background-color: #ffffff;
        border-bottom: 1px solid #e6e8ee;
        position: relative;
    }

    #index {
        position: relative;
        min-height: 100vh;
        background-image: url('/image/paris/par-12.jpeg');
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        text-align: center;
        color: white;
    }

    #index::before {
        content: "";
        position: absolute;
        inset: 0;
        background: rgba(0, 0, 0, 0.35);
        z-index: 1;
    }

    #index .title {
        max-width: 90%;
        text-align: center;
        font-size: clamp(2.6rem, 4.8vw + 1.6rem, 3.4rem);
        font-weight: normal;
        margin-top: -1em;
        margin-bottom: 0.3em;
        text-shadow: 4px 4px 10px rgba(0, 0, 0, 1);
        z-index: 2;
    }

    #index .text {
        text-align: center;
        justify-content: center;
        margin-bottom: 1.7em;
        font-size: clamp(1rem, 0.8vw + 0.9rem, 1.25rem);
        line-height: 1.8;
        color: white;
        text-shadow: 3px 3px 10px rgba(0, 0, 0, 1);
        z-index: 2;
    }

    .hamburger {
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        position: absolute;
        right: 1.6em;
        top: 50%;
        transform: translateY(-50%);
        z-index: 1001;
        width: 48px;
        height: 48px;
        border-radius: 14px;
        background: rgba(15, 23, 42, 0.06);
        border: 1px solid rgba(15, 23, 42, 0.2);
        box-shadow: 0 12px 24px rgba(15, 23, 42, 0.12);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
    }

    .hamburger-line {
        position: absolute;
        left: 14px;
        right: 14px;
        height: 2px;
        background: #111;
        border-radius: 2px;
        transition: transform 0.3s ease, top 0.3s ease, opacity 0.2s ease, background 0.3s ease;
    }

    .hamburger-line:nth-child(1) {
        top: 17px;
    }

    .hamburger-line:nth-child(2) {
        top: 23px;
    }

    .hamburger-line:nth-child(3) {
        top: 29px;
    }

    /* 菜单展开时切换为深色以适配浅色背景 */
    .hamburger.open {
        background: rgba(15, 23, 42, 0.1);
        box-shadow: 0 18px 28px rgba(15, 23, 42, 0.2);
        transform: scale(1.02);
    }

    .hamburger.open .hamburger-line:nth-child(1) {
        top: 23px;
        transform: rotate(45deg);
    }

    .hamburger.open .hamburger-line:nth-child(2) {
        opacity: 0;
    }

    .hamburger.open .hamburger-line:nth-child(3) {
        top: 23px;
        transform: rotate(-45deg);
    }

    .nav-liquid {
        --menu-top-spacer: clamp(72px, 10vh, 108px);
        display: none;
        font-size: 1.6em;
        flex-direction: column;
        background-color: rgba(255, 255, 255, 0.85);
        position: fixed;
        inset: 0;
        width: 100vw;
        height: 100dvh;
        min-height: 100dvh;
        box-sizing: border-box;

        opacity: 0;
        transform: translateY(-100%);
        transition:
            transform 1s cubic-bezier(0.4, 0, 0.2, 1),
            opacity 1s ease,
            background-color 1s ease;
        z-index: 1000;
        align-items: center;
        justify-content: flex-start;
        backdrop-filter: blur(18px);
        -webkit-backdrop-filter: blur(18px);
        padding: calc(env(safe-area-inset-top) + var(--menu-top-spacer)) 16px calc(22px + env(safe-area-inset-bottom)) 16px;
        gap: 1em;

    }

    .nav-liquid.show {
        display: flex;
        transform: translateY(0);
        opacity: 1;
        background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(245, 247, 252, 0.98));
        overflow: auto;
        scroll-behavior: smooth;
    }

    .nav-liquid .nav-link {
        line-height: 1.1em;
        margin: 0;
        font-size: 1.1em;
        text-align: center;
        opacity: 0;
        transform: translateY(20px);
        animation: fadeInUp 0.8s ease forwards;
        animation-delay: calc(var(--i) * 0.1s);
        text-decoration: none;
        color: rgba(15, 23, 42, 0.82);
        cursor: pointer;
        padding: 10px 22px;
        border-radius: 999px;
        background: linear-gradient(135deg, rgba(255, 255, 255, 0.88), rgba(244, 247, 252, 0.72));
        border: 1px solid rgba(255, 255, 255, 0.7);
        box-shadow:
            0 10px 24px rgba(15, 23, 42, 0.12),
            inset 0 1px 0 rgba(255, 255, 255, 0.8);
        text-shadow: 0 1px 0 rgba(255, 255, 255, 0.35);
    }

    .nav-liquid .nav-link.active {
        color: #082746;
        background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(222, 231, 243, 0.94));
        border-color: rgba(130, 148, 172, 0.22);
        box-shadow:
            0 14px 28px rgba(15, 23, 42, 0.18),
            inset 0 1px 0 rgba(255, 255, 255, 0.9);
    }

    .lang-dropdown {
        font-size: 1em;
        margin-top: 0;
        padding: 10px 32px 10px 16px;
        border: 1px solid rgba(15, 23, 42, 0.18);
        border-radius: 999px;
        background-color: rgba(255, 255, 255, 0.9);
        color: #111;
        cursor: pointer;
        box-shadow:
            0 12px 24px rgba(15, 23, 42, 0.12),
            inset 0 1px 0 rgba(255, 255, 255, 0.7);
        backdrop-filter: blur(14px);
        -webkit-backdrop-filter: blur(14px);
        appearance: none;
        background-image: linear-gradient(45deg, transparent 50%, rgba(17, 17, 17, 0.6) 50%),
            linear-gradient(135deg, rgba(17, 17, 17, 0.6) 50%, transparent 50%);
        background-position: calc(100% - 14px) 50%, calc(100% - 8px) 50%;
        background-size: 6px 6px;
        background-repeat: no-repeat;
    }

    .lang-dropdown:focus-visible {
        outline: none;
        border-color: rgba(15, 23, 42, 0.35);
        box-shadow:
            inset 0 1px 0 rgba(255, 255, 255, 0.7),
            0 0 0 3px rgba(255, 255, 255, 0.25);
    }

    .nav-liquid.show .lang-dropdown {
        opacity: 0;
        transform: translateY(20px);
        animation: fadeInUp 0.8s ease forwards;
        animation-delay: calc(var(--i) * 0.1s);
    }

    .nav-liquid .liquid-indicator {
        display: none;
    }

    .lang-dropdown {
        --i: 4;
    }

    .log {
        --i: 7;
    }

    .logo {
        font-size: 1.2em;
        text-align: flex-start;
        font-weight: bold;
        color: #111;
        position: absolute;
        left: 2.7em;
        top: 17px;
    }

    :not(#index)>.title {
        max-width: 90%;
        text-align: center;
        font-size: 3em;
        font-weight: normal;
        margin: auto;
        margin-top: 2.5em;
        margin-bottom: 2.5em;
    }

    .subtitle {
        width: 90%;
        text-align: center;
        font-size: 2.7em;
        font-weight: normal;
        margin: auto;
        margin-top: 0.5em;
        margin-bottom: 0.5em;
        color: #111;
        overflow-wrap: anywhere;
        word-break: break-word;
        hyphens: auto;
    }

    .toggle-container {
        padding-left: 0;
        padding-right: 0;
    }

    #toggle-about:checked~.content-about,
    #toggle-site:checked~.content-site {
        padding: 1.5rem 0 0;
    }

    :not(#index)>.text {
        text-align: center;
        margin: auto;
        margin-bottom: 1em;
        font-size: clamp(1.05rem, 1vw + 0.95rem, 1.3rem);
        line-height: 2;
        color: #333;
        max-width: 90%;
        padding-left: 1em;
        padding-right: 1em;
    }

    #about-me .text,
    #about-site .text {
        text-align: left;
        margin: 0 auto 1em;
        font-size: clamp(1.05rem, 1vw + 0.95rem, 1.3rem);
        line-height: 2;
        color: #333;
        max-width: 90%;
        padding-left: 1em;
        padding-right: 1em;
    }

    .contact-points {
        grid-template-columns: 1fr;
        width: min(92%, 32rem);
        gap: 14px;
        margin-bottom: 2.4rem;
    }

    .contact-point {
        padding: 1rem 1rem 1.05rem;
        border-radius: 20px;
    }

    .contact-point-value {
        font-size: 1.05rem;
    }

    .gallery-cover {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
        gap: 18px;
        padding: 20px;
    }

    .gallery-cover-item {
        background: rgba(255, 255, 255, 0.78);
        border-radius: 20px;
        overflow: hidden;
        border: 1px solid rgba(15, 23, 42, 0.1);
        box-shadow: 0 16px 32px rgba(15, 23, 42, 0.12);
        backdrop-filter: blur(14px);
    }

    .gallery-cover img {
        width: 100%;
        height: auto;
        display: block;
        aspect-ratio: 3 / 2;
        object-fit: cover;
        border-radius: 0;
        transition: transform 0.3s ease;
    }

    .gallery-cover img:hover {
        transform: scale(1.02);
    }

    .cat {
        font-size: 1.1em;
        padding: 14px 16px;
        color: #111;
        background: rgba(255, 255, 255, 0.8);
        text-align: left;
        border-top: 1px solid rgba(15, 23, 42, 0.06);
    }

    .gallery-carousel {
        margin: 0 auto;
        padding: 16px 0 24px;
        width: min(960px, 100%);
    }

    .carousel-viewport {
        overflow: hidden;
        padding: 12px 16px;
    }

    .carousel-container {
        display: flex;
        gap: 16px;
        align-items: stretch;
        touch-action: pan-y;
    }

    .carousel-slide {
        flex: 0 0 auto;
        width: clamp(240px, 70vw, 360px);
        aspect-ratio: 3 / 4;
        border-radius: 18px;
        overflow: hidden;
        border: none;
        background: transparent;
        box-shadow: 0 16px 30px rgba(15, 23, 42, 0.16);
        padding: 0;
    }

    .carousel-slide.is-active {
        box-shadow:
            0 18px 34px rgba(15, 23, 42, 0.2),
            0 0 0 2px rgba(255, 255, 255, 0.55);
    }

    .carousel-slide img {
        width: 100%;
        height: 100%;
        display: block;
        object-fit: cover;
        background: transparent;
    }

    .carousel-controls {
        display: flex;
        justify-content: center;
        gap: 10px;
        margin-top: 10px;
    }

    .carousel-arrow {
        width: 38px;
        height: 38px;
        border-radius: 50%;
        border: 1px solid rgba(15, 23, 42, 0.2);
        background: rgba(255, 255, 255, 0.9);
        color: #111;
        cursor: pointer;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 10px 22px rgba(15, 23, 42, 0.12);
        backdrop-filter: blur(10px);
    }

    .carousel-arrow:disabled {
        opacity: 0.4;
        cursor: not-allowed;
        box-shadow: none;
    }

    .carousel-progress {
        height: 4px;
        margin: 14px auto 0;
        background: rgba(15, 23, 42, 0.08);
        border-radius: 999px;
        overflow: hidden;
        width: min(240px, 60%);
    }

    .carousel-progress span {
        display: block;
        height: 100%;
        background: linear-gradient(90deg, rgba(71, 168, 242, 0.9), rgba(33, 115, 198, 0.9));
        width: 0%;
    }

    .gallery-shell {
        display: none;
    }

    @keyframes fadeInUp {
        from {
            opacity: 0;
            transform: translateY(0px);
        }

        to {
            opacity: 1;
            transform: translateY(20px);
        }
    }
}
