body {
    font-family: 'Noto Sans JP', 'Inter', sans-serif;
    background-color: #fffbf7;
    /* Warm Cream */
    color: #5d4e46;
    /* Warm Dark Brown */
    min-height: 100vh;
    transition: background-color 0.4s ease, color 0.4s ease;
}

.dark body {
    background-color: #594f4b;
    /* Pale Dark Brown */
    color: #f3e9e4;
    /* Pale Warm White */
}

#particle-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    background-color: #fffbf7;
    transition: background-color 0.4s ease;
}

.dark #particle-canvas {
    background-color: #594f4b;
}

#cursor-particle-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 101;
    pointer-events: none;
}

/* Header & Nav */
header.scrolled {
    background-color: rgba(255, 251, 247, 0.85);
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    transition: background-color 0.3s ease;
    transition: all 0.3s ease;
}

.dark header.scrolled {
    background-color: rgba(89, 79, 75, 0.85);
    box-shadow: 0 4px 20px -5px rgba(0, 0, 0, 0.2);
}

.nav-link {
    position: relative;
    transition: color 0.3s ease;
    font-weight: 500;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 100%;
    height: 3px;
    background-color: rgba(58, 48, 45, 0.85);
    /* Rose 400 */
    border-radius: 99px;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.nav-link:hover {
    color: rgba(58, 48, 45, 0.85);
}

.nav-link:hover::after,
.nav-link.active::after {
    transform: translateX(-50%) scaleX(0.8);
}

.nav-link.active {
    color: #fb7185;
}

.dark .nav-link:hover {
    color: #f3e9e4;
}

.dark .nav-link::after {
    background-color: #f3e9e4;
}


.theme-toggle {
    position: relative;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-icon-wrapper {
    position: relative;
    width: 20px;
    height: 20px;
}

.theme-toggle .icon-moon,
.theme-toggle .icon-sun {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1),
        opacity 0.3s ease;
}

.theme-toggle .icon-moon {
    transform: rotate(0deg) scale(1);
    opacity: 1;
}

.theme-toggle .icon-sun {
    transform: rotate(180deg) scale(0);
    opacity: 0;
}

.dark .theme-toggle .icon-moon {
    transform: rotate(-180deg) scale(0);
    opacity: 0;
}

.dark .theme-toggle .icon-sun {
    transform: rotate(0deg) scale(1);
    opacity: 1;
}



.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    filter: blur(3px);
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
        transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
        filter 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.fade-in-up.is-visible {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0px);
}

.fade-in-right {
    opacity: 0;
    transform: translateX(50px);
    filter: blur(3px);
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
        transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
        filter 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.fade-in-right.is-visible {
    opacity: 1;
    transform: translateX(0);
    filter: blur(0px);
}




.hamburger-line {
    transition: all 0.3s ease-in-out;
}

#menu-btn.open .line-1 {
    transform: translateY(8px) rotate(45deg);
}

#menu-btn.open .line-2 {
    opacity: 0;
}

#menu-btn.open .line-3 {
    transform: translateY(-8px) rotate(-45deg);
}

#mobile-menu {
    transform: translateX(100%);
    transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1), background-color 0.3s ease;
}

#mobile-menu.open {
    transform: translateX(0);
}

#mobile-menu .menu-link {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.4s ease, transform 0.4s ease, color 0.3s ease;
}

#mobile-menu.open .menu-link {
    opacity: 1;
    transform: translateY(0);
}

#mobile-menu.open .menu-link:nth-child(1) {
    transition-delay: 0.1s;
}

#mobile-menu.open .menu-link:nth-child(2) {
    transition-delay: 0.2s;
}

#mobile-menu.open .menu-link:nth-child(3) {
    transition-delay: 0.3s;
}

#mobile-menu.open .menu-link:nth-child(4) {
    transition-delay: 0.4s;
}

#mobile-menu.open .menu-link:nth-child(5) {
    transition-delay: 0.5s;
}


body.menu-open-blur main {
    filter: blur(3px);
    transition: filter 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    pointer-events: none;
    user-select: none;
}

body.menu-open-blur header {
    filter: none;
}

/* Hero */
.hero-bg {
    /* Fallback image - ensure you have a warm image or color */
    background-image: url('https://api.vrchat.cloud/api/1/image/file_729042b8-155a-48f4-9ed7-aed6615613f4/1/1024');
    background-size: cover;
    background-position: center 20%;
}

.hero-gradient {
    /* 0%〜70%までは同じ薄さに固定し、70%から変化を開始させる */
    background: linear-gradient(180deg,
            rgba(255, 251, 247, 0) 0%,
            rgba(255, 251, 247, 0) 50%,
            rgba(255, 251, 247, 0.9) 90%,
            rgba(255, 251, 247, 1) 100%);
}

/* ダークモード */
.dark .hero-gradient {
    background: linear-gradient(180deg,
            rgba(89, 79, 75, 0) 0%,
            rgba(89, 79, 75, 0) 50%,
            rgba(89, 79, 75, 0.9) 90%,
            rgba(89, 79, 75, 1) 100%);
}

.hero-text-custom {
    text-shadow: 2px 2px 0px rgba(255, 255, 255, 0.8);
    -webkit-text-stroke: 2px #7d6a5f;
    color: transparent;
    font-family: 'Inter', sans-serif;
}

.dark .hero-text-custom {
    text-shadow: 2px 2px 0px rgba(89, 79, 75, 0.6);
    -webkit-text-stroke: 1px #fff5ea;
}

.icon-link {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.8);
    color: #7d6a5f;
    box-shadow: 0 8px 20px rgba(125, 106, 95, 0.15);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid transparent;
}

.icon-link:hover {
    transform: translateY(-5px) scale(1.1);
    background-color: #fff;
    color: #fbaf71;
    box-shadow: 0 12px 25px rgba(251, 219, 113, 0.25);
    border-color: #fedccd;
}

.dark .icon-link {
    background-color: rgba(110, 99, 94, 0.8);
    color: #f3e9e4;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.dark .icon-link:hover {
    background-color: #6e635e;
    color: #fbaf71;
    border-color: #fedccd;
}

/* Floating Particles (Hero) - Warmer Colors */
@keyframes float-soft {

    0%,
    100% {
        transform: translateY(0) scale(1);
        opacity: 0.3;
    }

    50% {
        transform: translateY(-20px) scale(1.1);
        opacity: 0.6;
    }
}

.hero-particle-new {
    position: absolute;
    background: rgba(255, 209, 220, 0.4);
    /* Soft Pink */
    box-shadow: 0 0 15px 5px rgba(255, 182, 193, 0.3);
    border-radius: 50%;
    animation: float-soft 10s ease-in-out infinite;
    z-index: 5;
}

.dark .hero-particle-new {
    background: rgba(214, 200, 190, 0.25) !important;
    /* Pale Warm Grey/Brown */
    box-shadow: 0 0 15px 5px rgba(214, 200, 190, 0.15) !important;
}

.avatar-hover-effect {
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.avatar-hover-effect:hover {
    transform: rotate(10deg) scale(1.1);
}


/* History Section (Simplified & Cute) */
.history-bg {
    background-color: transparent;
}

/* History Dark Mode Overrides */
.dark .timeline-card {
    background-color: #6e635e !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
}

.dark .timeline-card h3 {
    color: #f3e9e4 !important;
}

.dark .timeline-card p {
    color: #e5e0dc !important;
}

.dark .timeline-dot {
    border-color: #594f4b !important;
    box-shadow: 0 0 0 4px rgba(89, 79, 75, 0.5);
}

.dark .timeline-card:hover {
    background-color: #7d716b !important;
}



/* PC View Arrow logic (Alternating) */
@media (min-width: 768px) {
    .timeline-row {
        margin-bottom: -50px !important;
    }

    /* Right side items (Arrow on Left) */


    /* Left side items (Arrow on Right) */

}




/* Gallery */
.gallery-scroller {
    overflow: hidden;
    padding: 1rem 0;
}

.gallery-track {
    display: flex;
    width: max-content;
    gap: 1.5rem;
    animation: scroll-linear 45s linear infinite;
}

@keyframes scroll-linear {
    to {
        transform: translateX(-50%);
    }
}

.gallery-scroller[data-direction="right"] .gallery-track {
    animation-direction: reverse;
}

.gallery-scroller-item {
    border-radius: 1.5rem;
    overflow: hidden;
    position: relative;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.4s ease;
    height: 320px;
    width: 450px;
    flex-shrink: 0;
}

.gallery-scroller-item.is-portrait {
    width: 260px;
}

.gallery-scroller-item:hover {
    transform: scale(1.05) rotate(1deg);
    box-shadow: 0 15px 30px rgba(251, 196, 113, 0.2);
    z-index: 10;
}

.gallery-scroller-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}


/* Illustrations */
.illustration-card {
    border-radius: 1.5rem;
    overflow: hidden;
    background-color: #fff;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.dark .illustration-card {
    background-color: #6e635e;
}

.illustration-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(251, 113, 133, 0.15);
}

.ill-overlay {
    background: linear-gradient(to top, rgba(69, 57, 53, 0.8) 0%, rgba(69, 57, 53, 0) 50%);
}

.dark .ill-overlay {
    background: linear-gradient(to top, rgba(110, 99, 94, 0.8) 0%, rgba(110, 99, 94, 0) 50%);
}


/* Lightbox */
.lightbox-overlay {
    background-color: rgba(255, 251, 247, 0.95);
    backdrop-filter: blur(10px);
}

.dark .lightbox-overlay {
    background-color: rgba(89, 79, 75, 0.95);
}

.lightbox-close-btn {
    color: #7d6a5f;
}

.dark .lightbox-close-btn {
    color: #fbad7e;
}

/* Headings */
.heading-animate-line {
    display: inline-block;
    position: relative;
    padding: 0 1.5rem;
}

.heading-animate-line::before,
.heading-animate-line::after {
    content: '';
    position: absolute;
    top: 50%;
    height: 3px;
    width: 0;
    background-color: #fb7185;
    border-radius: 99px;
    transition: width 1s ease 0.3s;
}

.heading-animate-line::before {
    left: 0;
    transform: translate(-100%, -50%);
}

.heading-animate-line::after {
    right: 0;
    transform: translate(100%, -50%);
}

.fade-in-up.is-visible .heading-animate-line::before,
.fade-in-up.is-visible .heading-animate-line::after {
    width: 60px;
}

/* Hamburger */
.hamburger-line {
    background-color: #7d6a5f;
    border-radius: 9px;
    height: 3px;
}

.dark .hamburger-line {
    background-color: #e5ccb8;
}

/* Mobile Menu */
#mobile-menu {
    background-color: rgba(255, 251, 247, 0.95);
}

.dark #mobile-menu {
    background-color: rgba(89, 79, 75, 0.98);
}

/* Footer */
.footer-bg {
    background-color: #fff1f2;
    border-top: 1px solid #fecdd3;
}

.dark .footer-bg {
    background-color: #4a403c;
    border-top: 1px solid #6e635e;
}


.lightbox-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 100;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    cursor: pointer;
}

.dark .lightbox-overlay {
    background-color: rgba(0, 0, 0, 0.85);
}


.lightbox-overlay.show {
    display: flex;
    opacity: 1;
}

.lightbox-content {
    position: relative;
    width: 90%;
    height: 90%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 0.5rem;
    box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.2), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

.lightbox-close-btn {
    position: absolute;
    top: 2rem;
    right: 2rem;
    font-size: 3rem;
    font-weight: 300;
    color: white;
    background: none;
    border: none;
    cursor: pointer;
    line-height: 1;
    z-index: 101;
    transition: transform 0.2s ease, opacity 0.2s ease;
    opacity: 0.7;
}

.lightbox-close-btn:hover {
    transform: scale(1.1);
    opacity: 1;
}

body.lightbox-open {
    overflow: hidden;
}


footer {
    position: relative;
    z-index: 1;
}

.footer-bg {
    background-color: white;
    border: 1px solid #525252;
    transition: background-color 0.3s ease, border-color 0.3s ease;
    z-index: 1;
}

.dark .footer-bg {
    background-color: #6e635e;
    border: 1px solid #888;
}

.heading-animate-line {
    position: relative;
    display: inline-block;
    padding-left: 1rem;
    padding-right: 1rem;
    transition: color 0.3s ease;
}

.heading-animate-line::before,
.heading-animate-line::after {
    content: '';
    position: absolute;
    top: 50%;
    height: 2px;
    width: 0;
    background-color: #404040;
    transition: background-color 0.3s ease;
}

.dark .heading-animate-line::before,
.dark .heading-animate-line::after {
    background-color: #b1b1b1;
}

.heading-animate-line::before {
    left: 0.2rem;
    transform: translateY(-50%) translateX(-100%);
}

.heading-animate-line::after {
    right: 0.2rem;
    transform: translateY(-50%) translateX(100%);
}

.fade-in-up.is-visible .heading-animate-line::before {
    width: 80px;
    transform: translateY(-50%) translateX(-100%);

    transition: width 1.2s cubic-bezier(0.23, 1, 0.32, 1) 0.4s,
        background-color 0.3s ease;
}

.fade-in-up.is-visible .heading-animate-line::after {
    width: 80px;
    transform: translateY(-50%) translateX(100%);

    transition: width 1.2s cubic-bezier(0.23, 1, 0.32, 1) 0.4s,
        background-color 0.3s ease;
}

@media (max-width: 640px) {

    .fade-in-up.is-visible .heading-animate-line::before,
    .fade-in-up.is-visible .heading-animate-line::after {
        width: 50px;

        transition: width 1.2s cubic-bezier(0.23, 1, 0.32, 1) 0.4s,
            background-color 0.3s ease;
    }
}


.about-card-container {
    position: relative;
    border-radius: 2rem;
    z-index: 1;
    backdrop-filter: blur(10px);
    box-shadow: 0 20px 40px -10px rgba(255, 154, 158, 0.2);

    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
        transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
        filter 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
        box-shadow 0.3s ease;
}

.about-card-content {
    background-color: rgba(255, 255, 255, 0.6);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 3rem;
    transition: background-color 0.3s ease;
    border-radius: 2rem;
}

.about-card-container::before {
    content: '';
    position: absolute;
    inset: -4px;
    background: linear-gradient(45deg, #ff9a9e, #fad0c4, #ffecd2);
    border-radius: 2.2rem;
    z-index: -1;
    filter: blur(10px);
    opacity: 0.7;
}

@media (min-width: 768px) {
    .about-card-content {
        flex-direction: row;
        align-items: center;
        /* Center vertically */
        column-gap: 3rem;
    }
}


.dark .about-card-content {
    background-color: rgba(98, 77, 72, 0.8);
}

.dark .about-card-container {
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.4);
}


/* Animations */
@keyframes blob {
    0% {
        transform: translate(0px, 0px) scale(1);
    }

    33% {
        transform: translate(30px, -50px) scale(1.1);
    }

    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }

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

.animate-blob {
    animation: blob 10s infinite;
}

.animation-delay-2000 {
    animation-delay: 2s;
}

.animation-delay-4000 {
    animation-delay: 4s;
}