@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap');

/* MiSansフォントの定義 */
@font-face {
    font-family: 'MiSans';
    src: url('../font/MiSans-Normal.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
}

:root {
    --dark-bg: #121212;
    --dark-surface: #1E1E1E;
    --matcha-green: #5F7354;
    --text-primary: #E8E8E8;
    --text-secondary: #A0A0A0;
    --primary-color: var(--matcha-green);
    --font-family: 'Roboto', sans-serif;
    --shadow: 0 1px 3px rgba(0,0,0,0.2), 0 1px 2px rgba(0,0,0,0.24);
}

body {
    background-color: var(--dark-bg);
    color: var(--text-primary);
    font-family: 'MiSans', var(--font-family), sans-serif;
    margin: 0;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    scroll-behavior: smooth;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 24px;
}

header {
    background-color: var(--dark-surface);
    padding: 16px 0;
    border-bottom: 1px solid #333;
    position: sticky;
    top: 0;
    z-index: 1000;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}
.logo a:hover {
    color: var(--matcha-green);
}

.main-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 24px;
}

.main-nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    position: relative;
    transition: color 0.3s ease;
}
.main-nav a:hover {
    color: var(--text-primary);
}
.main-nav a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--matcha-green);
    transition: width 0.3s ease;
}
.main-nav a:hover::after {
    width: 100%;
}

.lang-switcher button {
    background: none;
    border: 1px solid var(--text-secondary);
    color: var(--text-secondary);
    padding: 4px 8px;
    margin-left: 8px;
    font-size: 0.8rem;
    font-weight: 500;
    border-radius: 32px;
    cursor: pointer;
    transition: all 0.3s ease;
}
.lang-switcher button:hover {
    background-color: rgba(95, 115, 84, 0.2);
    color: var(--matcha-green);
}
.lang-switcher button.active {
    background-color: var(--matcha-green);
    color: var(--dark-bg);
    border-color: var(--matcha-green);
}

main {
    background-color: var(--dark-surface);
    padding: 0;
}

section {
    margin-bottom: 80px;
}
h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}
h3 {
    font-size: 1.8rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 24px;
    border-bottom: 1px solid #333;
    padding-bottom: 8px;
}
.section-title {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.section-title.is-visible {
    opacity: 1;
    transform: translateY(0);
}
h4 {
    font-size: 1.2rem;
    font-weight: 500;
    margin: 0 0 8px 0;
}

/* Hero Section */
#hero {
    padding: 80px 0;
    margin-bottom: 0;
    background-image: linear-gradient(rgba(18, 18, 18, 0.8), rgba(18, 18, 18, 0.8)), url('../images/bg_main.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}
.hero-content-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 48px;
}
#hero .hero-content {
    flex: 1;
}
#hero .subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-top: 8px;
}
#hero .profile-image {
    width: 250px;
    height: 250px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}
#hero .profile-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
#hero .profile-image img:hover {
    transform: rotate(360deg);
}

/* About Section */
#about {
    background-color: var(--dark-surface);
    padding: 48px 0;
    margin-bottom: 80px;
}
.grid-layout {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}
.card {
    padding: 24px;
    border-radius: 8px;
    background-color: var(--dark-bg);
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
}
.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}
.card i {
    font-size: 2rem;
    color: var(--matcha-green);
    margin-bottom: 12px;
}
.card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
}
.team-button {
    display: inline-block;
    margin-top: 16px;
    background-color: var(--matcha-green);
    color: var(--dark-bg);
    padding: 8px 16px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: opacity 0.3s ease;
}
.team-button:hover {
    opacity: 0.8;
}

/* Projects Section */
#projects {
    padding: 48px 0;
    background-color: var(--dark-surface);
}
.project-card {
    display: flex;
    gap: 32px;
    margin-bottom: 40px;
    background-color: var(--dark-bg);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
}
.project-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}
.project-card img {
    width: 40%;
    height: auto;
    object-fit: cover;
}
.project-info {
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.project-info h4 {
    color: var(--matcha-green);
}
.project-info p {
    font-size: 0.9rem;
    color: var(--text-secondary);
}
.project-button {
    display: inline-block;
    margin-top: 16px;
    background-color: var(--matcha-green);
    color: var(--dark-bg);
    padding: 8px 16px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: opacity 0.3s ease;
}
.project-button:hover {
    opacity: 0.8;
}

/* Gallery Section (Carousel) */
#gallery {
    padding: 48px 0;
    background-color: var(--dark-surface);
}
.carousel {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    overflow: hidden; /* この領域からはみ出る部分を隠す */
    border-radius: 8px;
    box-shadow: var(--shadow);
}
.carousel-inner {
    display: flex; /* 子要素を横並びにする */
    transition: transform 0.5s ease-in-out; /* スライドアニメーション */
}
.carousel-item {
    min-width: 100%; /* 各アイテムがカルーセルの幅いっぱいに広がるようにする */
    flex-shrink: 0; /* アイテムが縮まないようにする */
}
.carousel-item img {
    width: 100%;
    display: block;
    object-fit: cover;
}
.carousel-control-prev,
.carousel-control-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    z-index: 10;
    font-size: 24px;
    transition: background 0.3s ease;
    border-radius: 50%;
}
.carousel-control-prev:hover,
.carousel-control-next:hover {
    background: rgba(0, 0, 0, 0.8);
}
.carousel-control-prev {
    left: 10px;
}
.carousel-control-next {
    right: 10px;
}

/* Contact Section */
#contact {
    text-align: center;
    padding: 48px 0;
    background-color: var(--dark-surface);
    margin-bottom: 0;
}
#contact p {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 32px;
}
.cta-button {
    display: inline-block;
    background-color: var(--matcha-green);
    color: var(--dark-bg);
    padding: 12px 24px;
    border-radius: 32px;
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.3s ease;
}
.cta-button:hover {
    opacity: 0.8;
}

/* Footer */
footer {
    background-color: #181818;
    padding: 24px 0;
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-secondary);
    border-top: 1px solid #333;
}

/* Back to Top Button */
.back-to-top-button {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: var(--matcha-green);
    color: var(--dark-bg);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.4);
    z-index: 999;
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
    opacity: 0;
    visibility: hidden;
}
.back-to-top-button.show {
    opacity: 1;
    visibility: visible;
}
.back-to-top-button:hover {
    transform: translateY(-2px);
}
.back-to-top-button i {
    font-size: 1.5rem;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    header .container {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
    .logo {
        display: none; /* モバイル表示時にロゴを非表示 */
    }
    .main-nav {
        margin-top: 0;
    }
    .lang-switcher {
        margin-top: 0;
    }

    .hero-content-container {
        flex-direction: column-reverse;
        text-align: center;
    }
    #hero .hero-content {
        order: 2;
    }
    #hero .profile-image {
        order: 1;
        margin-bottom: 32px;
    }
    .project-card {
        flex-direction: column;
    }
    .project-card img {
        width: 100%;
        height: 200px;
    }
    #projects .container {
        padding: 0 16px;
    }
    .project-card {
        margin: 0 auto 40px;
        max-width: 400px;
    }
    .carousel-control-prev,
    .carousel-control-next {
        font-size: 18px;
        padding: 5px 10px;
    }
}

        a {
            color: var(--primary-color);
            text-decoration: none;
            font-weight: bold;
            transition: opacity 0.2s;
        }

        a:hover {
            opacity: 0.8;
        }
