/* ---------------------------------------------------- */
/* 1. グローバル設定 (変更なし) */
/* ---------------------------------------------------- */
* {
    margin: 0; padding: 0; box-sizing: border-box;
}
body {
    font-family: 'Montserrat', sans-serif; 
    background: white;
    color: #333;
}
.container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
a {
    text-decoration: none;
    color: inherit;
}

/* ---------------------------------------------------- */
/* 2. サイドバー設定 (元のデザイン 120px を維持) */
/* ---------------------------------------------------- */
.sidebar {
    position: fixed; 
    left: 0;
    top: 0;
    width: 120px;
    height: 100vh;
    background: white;
    padding: 24px 8px;
    display: flex;
    flex-direction: column; 
    align-items: center; 
    z-index: 100;
}
.logo {
    width: 47px;
    height: 47px;
    margin-bottom: 34px;
    display: block;
    cursor: pointer;
    object-fit: cover;
}
.name {
    color: #EE3300;
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 24px;
    text-align: center;
}
.nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}
.nav a {
    color: #313131;
    font-size: 14px;
    text-align: center;
    padding: 8px 0;
}
.nav a.active {
    font-weight: 700; 
    color: #EE3300;
}
.social-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    margin-top: 20px;
}
.social-links a {
    font-size: 14px;
    color: #313131;
    text-align: center;
}

/* ---------------------------------------------------- */
/* 3. メインコンテンツ (上部の余白を削減) */
/* ---------------------------------------------------- */
.main-content {
    flex: 1; 
    margin-left: 120px; 
    padding: 0px 20px 20px 20px; /* 上パディングを0に設定 */
}

.gallery-wrapper, 
.profile-container {
    max-width: 1400px; 
    width: 100%; 
    margin-left: 0; 
    margin-right: auto; 
}

/* 見出しの上の余白を 40px から 10px に短縮 */
.section-heading {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.8em;
    font-weight: 700;
    color: #333;
    margin-top: 10px; 
    margin-bottom: 20px;
}

/* ---------------------------------------------------- */
/* 4. 作品グリッド (元のデザインを維持) */
/* ---------------------------------------------------- */
.gallery {
    display: grid; 
    grid-template-columns: repeat(3, 1fr); 
    gap: 30px; 
    padding-top: 10px;
}
.gallery a {
    position: relative; display: block; 
    border-radius: 18px; overflow: hidden;
    box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25);
    transition: transform 0.3s ease;
}
.gallery a:hover {
    transform: translateY(-8px);
}
.gallery img {
    width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block;
}
.work-title-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.65); display: flex; justify-content: center; align-items: center; opacity: 0; transition: opacity 0.3s ease;
}
.gallery a:hover .work-title-overlay {
    opacity: 1;
}
.title-text {
    font-family: 'Orbit', sans-serif; color: white; font-size: 1.5em; font-weight: bold;
}

/* ---------------------------------------------------- */
/* 5. PROFILE 専用スタイル (余白短縮) */
/* ---------------------------------------------------- */
.profile-container {
    display: flex;
    flex-direction: column;
    padding: 10px 20px; /* 40pxから10pxに短縮 */
}
.profile-text-block {
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 12px; line-height: 15px; white-space: pre-line; margin-bottom: 20px;
}
.profile-heading-red {
    color: #EE3300; font-size: 12px; margin-bottom: 5px;
}

/* ---------------------------------------------------- */
/* 6. スマートフォン対応 (480px 以下) */
/* ---------------------------------------------------- */
@media (max-width: 480px) {
    .gallery { grid-template-columns: 1fr; }
    .main-content { 
        margin-left: 0; 
        padding-top: 50px; /* ヘッダーの高さに合わせて余白を最適化 */
    }
    .sidebar { 
        position: fixed; width: 100%; height: auto; 
        flex-direction: row; justify-content: space-between; 
        padding: 5px 20px; border-bottom: 1px solid #eee; background: white;
    }
    .nav { flex-direction: row; gap: 15px; width: auto; }
    .name, .social-links { display: none; }
    .logo { width: 40px; height: 40px; margin: 0; }
    .section-heading { margin-top: 10px; font-size: 1.5em; }
}

/* ---------------------------------------------------- */
/* 7. 4K/超大型ディスプレイ対応 (変更なし) */
/* ---------------------------------------------------- */
@media (min-width: 1920px) {
    .sidebar { width: 180px; padding: 40px 20px; }
    .main-content { margin-left: 180px; padding-top: 0px; }
    .gallery-wrapper, .profile-container { max-width: 1700px; }
    .logo { width: 64px; height: 64px; }
    .section-heading { font-size: 2.2em; margin-top: 30px; }
}