/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@100;300;400;700&family=Roboto:wght@100;300;400;700&display=swap');

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Roboto', 'Helvetica Neue', Arial, 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', Meiryo, sans-serif;
    background-color: #fff;
    color: #333;
    line-height: 1.6;
    font-weight: 300;
    overflow-x: hidden;
}

a {
    color: #555;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Page Wrapper */
.page-wrapper {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 250px;
    padding: 40px 20px;
    border-right: 1px solid #eee;
    display: flex;
    flex-direction: column;
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    background-color: #fff;
    z-index: 1000;
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
}

.sidebar.active {
    transform: translateX(0);
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
}

.artist-name {
    margin-bottom: 60px;
}

.artist-name a {
    font-family: 'Montserrat', sans-serif;
    font-weight: 100;
    font-size: 1.9em;
    line-height: 1.3;
    letter-spacing: 3px;
    color: #000;
    text-decoration: none;
    text-transform: uppercase;
}

.artist-name a:hover {
    color: #555;
}

.artist-name span {
    display: block;
}

.main-nav ul {
    list-style: none;
}

.main-nav ul li a {
    display: block;
    padding: 10px 0;
    color: #333;
    font-family: 'Montserrat', sans-serif;
    font-size: 1em;
    font-weight: 300;
    text-decoration: none;
    letter-spacing: 0.5px;
}

.main-nav ul li a:hover {
    color: #000;
}

.main-nav ul li.active a {
    font-weight: 700;
    color: #000;
}

/* Main Content Area */
.main-content {
    flex-grow: 1;
    padding: 20px 40px;
}

/* Top Controls */
.top-controls {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    height: 40px;
    margin-bottom: 30px;
}

.lang-switch {
    font-size: 0.9em;
    color: #777;
    margin-right: 15px;
    text-transform: uppercase;
    padding: 5px 8px;
}

.menu-button {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    z-index: 1001;
}

.menu-button span {
    display: block;
    width: 22px;
    height: 2px;
    background-color: #333;
    margin: 4px 0;
    transition: background-color 0.3s;
}
.menu-button:hover span {
    background-color: #000;
}

/* Content Sections (general styling) */
.content-section {
    padding-bottom: 40px;
}
.content-section h2 {
    font-size: 2rem;
    margin-bottom: 30px;
    font-weight: 400;
    color: #000;
    font-family: 'Montserrat', sans-serif;
}

/* === Biography Page Specific Styles - Layout Updated === */
.biography-top-layout {
    /* display: flex; を削除し、要素が縦に並ぶようにする */
    margin-bottom: 40px; 
}

.artist-image-container {
    /* flex プロパティを削除 */
    max-width: 480px; /* 画像の最大幅を少し広げる (お好みで320pxのままでもOK) */
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background-color: #e0e0e0; 
    margin-bottom: 25px; /* 画像と下のテキストとの間隔 */
    /* margin-left: 0; margin-right: 0; (デフォルトで左寄せ) */
    /* もし中央寄せにしたい場合: margin-left: auto; margin-right: auto; */
}

.artist-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover; 
}

.artist-intro-text {
    /* flex プロパティを削除 */
    /* width は親要素に依存 (block要素のため) */
}

.artist-intro-text .artist-name-main {
    font-size: 1.4em; 
    font-weight: bold;
    margin-bottom: 15px;
    font-family: 'Montserrat', sans-serif;
}

.artist-intro-text p {
    margin-bottom: 10px;
    line-height: 1.7; 
    font-family: 'Roboto', sans-serif; 
}

.artist-intro-text p strong {
    font-weight: bold; 
}

.chronological-history {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid #eee; 
}

.chronological-history h3 {
    font-size: 1.5rem; 
    font-family: 'Montserrat', sans-serif;
    font-weight: 400; 
    margin-bottom: 20px;
    color: #333;
}

.chronological-history p {
    margin-bottom: 8px;
    line-height: 1.7;
    font-size: 0.95em;
    font-family: 'Roboto', sans-serif; 
}
/* === Biography Page Specific Styles - End === */


/* Works Grid & Portfolio Item Styles (Portfolio Page) */
.works-grid {
    display: grid;
    gap: 60px;
}

.work-item {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
    position: relative;
}

.work-item.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.work-item .work-title-main {
    font-size: 1.1em;
    font-weight: 400;
    margin-bottom: 15px;
    color: #000;
    font-family: 'Montserrat', sans-serif;
}

.work-item .work-content {
    display: grid;
    grid-template-columns: auto 1fr auto;
    grid-template-rows: auto;
    gap: 20px;
    align-items: start;
}

.work-item .work-media {
    position: relative; 
    width: 100%;
    max-width: 400px;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background-color: #f0f0f0;
}

.work-item:not(:has(.slider-container)) .work-media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    border: none;
}

.work-item .work-description h4 {
    font-size: 1em;
    font-weight: 400;
    margin-bottom: 10px;
    color: #000;
    font-family: 'Montserrat', sans-serif;
}

.work-item .work-description p {
    font-size: 0.9em;
    margin-bottom: 5px;
    color: #555;
    font-family: 'Roboto', sans-serif;
}

.work-item .work-meta {
    font-size: 0.9em;
    color: #555;
    font-family: 'Roboto', sans-serif;
}

.work-item .work-meta span { 
    display: block;
}

.work-item .work-meta .work-category {
    margin-bottom: 5px;
}

.work-item .work-meta .work-year {
    position: absolute;
    bottom: 10px;
    right: 10px;
    font-size: 0.8em;
    color: #777;
    display: block;
}

/* Slider Styles */
.slider-container {
    /* Inherits from .work-media */
}

.slider-wrapper {
    display: flex;
    height: 100%;
    transition: transform 0.5s ease-in-out;
}

.slider-slide {
    min-width: 100%;
    height: 100%;
    box-sizing: border-box;
}

.slider-slide img {
    width: 100%;
    height: 100%;
    object-fit: contain; 
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.3);
    color: white;
    border: none;
    padding: 10px;
    cursor: pointer;
    z-index: 10;
    font-size: 18px;
    border-radius: 3px;
}

.slider-btn:hover {
    background-color: rgba(0, 0, 0, 0.6);
}

.slider-prev {
    left: 10px;
}

.slider-next {
    right: 10px;
}

.slider-dots {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    z-index: 10;
}

.slider-dots .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    margin: 0 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.slider-dots .dot.active {
    background-color: rgba(255, 255, 255, 0.9);
}


/* Responsive adjustments */
@media (min-width: 769px) { /* Desktop */
    .sidebar {
        transform: translateX(0);
    }
    .main-content {
        margin-left: 250px;
    }
    .menu-button {
        display: none !important;
    }
    .top-controls {
        position: relative; 
        margin-right: 0;
    }
}

@media (max-width: 768px) { /* Mobile & Tablet */
    .main-content {
        margin-left: 0;
        padding: 20px;
        padding-top: 70px; 
    }

    .menu-button {
        display: inline-block;
    }
    
    .top-controls {
        position: fixed;
        top: 0;
        right: 0;
        width: 100%;
        background-color: rgba(255, 255, 255, 0.95);
        padding: 10px 20px;
        box-shadow: 0 1px 3px rgba(0,0,0,0.1);
        z-index: 999;
        margin-bottom: 0; 
    }

    /* Biography page on mobile - image and text are already stacked by default now */
    .artist-image-container {
        max-width: 100%; /* On smaller screens, allow image container to be full width */
        margin-bottom: 20px;
    }
    .artist-intro-text .artist-name-main {
        font-size: 1.3em;
    }


    /* Portfolio items on mobile */
    .work-item .work-content {
        grid-template-columns: 1fr; 
    }
    .work-item .work-media { 
        margin-left: auto; 
        margin-right: auto;
    }
    .work-item .work-description,
    .work-item .work-meta {
        grid-column: 1 / -1; 
    }
    .work-item .work-meta {
        text-align: left; 
        margin-top: 15px;
    }
    .work-item .work-meta .work-year {
        position: static; 
        text-align: right; 
        margin-top: 5px; 
        font-size: 0.9em; 
    }
}