body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: black;
    color: white;
}

.container {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

/* ナビゲーションの基本スタイル */
nav {
    width: 250px;
    min-width: 250px;
    background-color: rgba(0, 0, 0, 0.75);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    box-sizing: border-box;
}

nav > div:first-child {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 2rem;
    display: block;
    color: white;
    text-decoration: none;
}

nav ul {
    list-style-type: none;
    padding: 0;
    margin: 2rem 0;
}

nav ul li {
    margin-bottom: 1rem;
}

nav a {
    color: white;
    text-decoration: none;
}

nav a:hover {
    color: #cccccc;
}

.social-icons {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.social-icons a {
    color: white;
}

.social-icons a:hover {
    color: #cccccc;
}

.copyright {
    font-size: 0.875rem;
    margin-top: auto;
}

main {
    flex-grow: 1;
    padding: 2rem;
    overflow-y: auto;
}

.hero-image {
    height: 100%;
    width: 100%;
}

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

h1 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
}

/* ポートフォリオグリッド */
.portfolio-grid {
    width: 100%;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.portfolio-item {
    width: calc(33.333% - 7px);
    margin: 0;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.portfolio-item img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 0;
    transition: transform 0.3s ease;
    vertical-align: middle;
}

.portfolio-item:hover img {
    transform: scale(1.05);
}

/* モーダルウィンドウのスタイル */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 9999;
}

.modal.show {
    display: flex !important;
    justify-content: center;
    align-items: center;
}

.modal-content {
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
}

.modal-close {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    color: white;
    font-size: 30px;
    cursor: pointer;
    z-index: 10000;
}

.modal-caption {
    position: fixed;
    bottom: 20px;
    left: 0;
    width: 100%;
    text-align: center;
    color: white;
    background-color: rgba(0, 0, 0, 0.5);
    padding: 10px;
}

/* レスポンシブ対応 */
@media (max-width: 1024px) {
    .portfolio-grid {
        gap: 8px;
    }
    
    .portfolio-item {
        width: calc(50% - 4px);
    }
}

@media (max-width: 768px) {
    .container {
        flex-direction: column;
        min-height: 100vh;
        position: relative;
        padding-bottom: 60px;
    }

    nav {
        width: 100%;
        height: 60px;
        padding: 1rem;
        position: fixed;
        top: 0;
        left: 0;
        z-index: 999;
        background-color: rgba(0, 0, 0, 0.95);
    }

    nav > div:first-child {
        display: none;
        position: fixed;
        top: 60px;
        left: 0;
        width: 100%;
        height: calc(100vh - 120px);
        background-color: rgba(0, 0, 0, 0.95);
        padding: 2rem;
        box-sizing: border-box;
        overflow-y: auto;
    }

    nav.active > div:first-child {
        display: flex;
        flex-direction: column;
    }

    .logo {
        display: none;
    }

    nav.active .logo {
        display: block;
        text-align: center;
        margin: 0 0 2rem 0;
    }

    .copyright {
        display: block;
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        padding: 1rem;
        background-color: rgba(0, 0, 0, 0.95);
        text-align: center;
        z-index: 998;
        height: 60px;
        box-sizing: border-box;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .hamburger {
        display: block;
        position: fixed;
        top: 10px;
        right: 10px;
        z-index: 1000;
        background: none;
        border: none;
        cursor: pointer;
        padding: 10px;
        width: 40px;
        height: 40px;
    }

    .hamburger span {
        display: block;
        width: 25px;
        height: 2px;
        background-color: white;
        margin: 6px auto;
        transition: all 0.3s ease;
    }

    .hamburger.active span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    main {
        padding: 1rem;
        margin-top: 80px;
    }

    nav ul {
        display: none;
    }

    nav.active ul {
        display: block;
        margin: 2rem 0;
        text-align: center;
    }

    nav ul li {
        margin: 1rem 0;
    }

    nav ul li a {
        font-size: 1.2rem;
        padding: 0.5rem 0;
        display: inline-block;
    }

    .social-icons {
        display: none;
    }

    nav.active .social-icons {
        display: flex;
        justify-content: center;
        margin: 2rem 0;
    }

    .portfolio-grid {
        gap: 15px;
    }
    
    .portfolio-item {
        width: 100%;
        margin-bottom: 0;
    }
}

/* PCでは非表示にする */
.hamburger {
    display: none;
}

/* スマホ表示時のみ表示する */
@media (max-width: 768px) {
    .hamburger {
        display: block;
    }
}

.email-link {
    color: #4a90e2;
    text-decoration: none;
    transition: color 0.3s ease;
}

.email-link:hover {
    color: #357abd;
    text-decoration: underline;
}

