/* ========================================
   リセット & 基本設定
   ======================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', Meiryo, sans-serif;
    color: #2a2a2a;
    line-height: 1.8;
    font-weight: 300;
    overflow-x: hidden;
}

/* ========================================
   背景画像システム
   ======================================== */

.background-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: -1;
}

.background-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1.2s ease-in-out;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.background-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.85);
}

.background-image.active {
    opacity: 1;
}

/* 各セクションの背景色（画像が用意されるまでの仮設定） */
.background-image[data-section="hero"] {
    background: linear-gradient(135deg, #f5f7fa 0%, #ffffff 100%);
}

.background-image[data-section="about"] {
    background: linear-gradient(135deg, #e0f2f7 0%, #b3e5fc 100%);
}

.background-image[data-section="career-1"] {
    background-image: url('../assets/images/bg-shipyard.jpg');
}

.background-image[data-section="career-2"] {
    background-image: url('../assets/images/bg-sales.jpg');
}

.background-image[data-section="career-3"] {
    background-image: url('../assets/images/bg-jr-construction.jpg');
}

.background-image[data-section="career-4"] {
    background-image: url('../assets/images/bg-streaming.jpg');
}

.background-image[data-section="skills"] {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
}

.background-image[data-section="works"] {
    background: linear-gradient(135deg, #f1f8e9 0%, #dcedc8 100%);
}

.background-image[data-section="contact"] {
    background: linear-gradient(135deg, #fafafa 0%, #eeeeee 100%);
}

/* ========================================
   メインコンテンツ
   ======================================== */

.main-content {
    position: relative;
    z-index: 1;
}

/* ========================================
   共通セクションスタイル
   ======================================== */

.section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 120px 40px;
}

.container {
    max-width: 900px;
    width: 100%;
    margin: 0 auto;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 300;
    letter-spacing: 0.15em;
    margin-bottom: 80px;
    text-align: center;
    color: #2a2a2a;
}

/* ========================================
   1. ヒーローセクション
   ======================================== */

.hero-section {
    text-align: center;
}

.hero-title {
    font-size: 2rem;
    font-weight: 300;
    line-height: 1.8;
    margin-bottom: 40px;
    color: #2a2a2a;
    letter-spacing: 0.05em;
}

.hero-subtitle {
    font-size: 1.2rem;
    font-weight: 300;
    color: #666;
    margin-bottom: 80px;
    letter-spacing: 0.1em;
}

.scroll-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    opacity: 0.6;
    animation: fadeInOut 2s ease-in-out infinite;
}

.scroll-text {
    font-size: 0.875rem;
    letter-spacing: 0.2em;
    color: #666;
}

.scroll-arrow {
    width: 1px;
    height: 40px;
    background: #666;
    position: relative;
}

.scroll-arrow::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 8px;
    height: 8px;
    border-right: 1px solid #666;
    border-bottom: 1px solid #666;
    transform: translateX(-50%) rotate(45deg);
}

@keyframes fadeInOut {
    0%, 100% {
        opacity: 0.3;
    }
    50% {
        opacity: 0.8;
    }
}

/* ========================================
   2. ABOUTセクション
   ======================================== */

.about-section {
    align-items: center;
}

.about-content {
    text-align: center;
}

.profile-image {
    margin-bottom: 60px;
    display: flex;
    justify-content: center;
}

.profile-photo {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.about-text {
    max-width: 700px;
    margin: 0 auto;
}

.philosophy {
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: 40px;
    color: #2a2a2a;
    line-height: 1.6;
}

.about-text p {
    margin-bottom: 30px;
    font-size: 1rem;
    line-height: 1.9;
}

.about-text .closing {
    font-weight: 400;
    margin-top: 50px;
}

/* ========================================
   3. CAREERセクション
   ======================================== */

.career-wrapper {
    /* キャリアセクションのラッパー */
}

.career-section {
    min-height: 100vh;
}

.career-section .container {
    max-width: 800px;
}

.career-section .section-title {
    margin-bottom: 60px;
}

.career-item {
    text-align: center;
}

.career-title {
    font-size: 2rem;
    font-weight: 300;
    margin-bottom: 40px;
    letter-spacing: 0.1em;
    color: #2a2a2a;
}

.career-content p {
    margin-bottom: 30px;
    font-size: 1rem;
    line-height: 1.9;
}

.career-content .highlight {
    font-weight: 400;
    margin-top: 40px;
}

/* 最初のキャリアセクション以降はタイトルを非表示 */
.career-section:not(:first-child) .section-title {
    display: none;
}

/* ========================================
   4. SKILLSセクション
   ======================================== */

.skills-section .container {
    max-width: 1000px;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 60px;
}

.skill-category {
    text-align: center;
}

.skill-category-title {
    font-size: 1.3rem;
    font-weight: 400;
    margin-bottom: 30px;
    letter-spacing: 0.1em;
    color: #2a2a2a;
}

.skill-list {
    list-style: none;
    text-align: left;
}

.skill-list li {
    padding: 12px 0;
    font-size: 0.95rem;
    line-height: 1.6;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.skill-list li:last-child {
    border-bottom: none;
}

/* ========================================
   5. WORKSセクション
   ======================================== */

.works-section .container {
    max-width: 1100px;
}

.works-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 80px;
}

.work-item {
    text-align: center;
}

.work-media {
    margin-bottom: 30px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
}

.video-placeholder,
.code-placeholder {
    aspect-ratio: 16 / 9;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 300;
}

.video-placeholder p,
.code-placeholder p {
    font-size: 1.2rem;
    margin-bottom: 8px;
}

.video-placeholder small,
.code-placeholder small {
    font-size: 0.875rem;
    opacity: 0.9;
}

.work-description {
    text-align: center;
}

.work-title {
    font-size: 1.3rem;
    font-weight: 400;
    margin-bottom: 20px;
    letter-spacing: 0.05em;
}

.work-description p {
    font-size: 0.95rem;
    line-height: 1.8;
}

.work-screenshot {
    width: 100%;
    height: auto;
    display: block;
}

.work-video {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
}

/* ========================================
   6. CONTACTセクション
   ======================================== */

.contact-section {
    text-align: center;
}

.contact-content {
    max-width: 600px;
    margin: 0 auto;
}

.contact-intro {
    font-size: 1.1rem;
    margin-bottom: 50px;
    line-height: 1.8;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.contact-item {
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.contact-label {
    font-weight: 400;
    color: #666;
}

.contact-link {
    color: #2a2a2a;
    text-decoration: none;
    border-bottom: 1px solid #2a2a2a;
    transition: opacity 0.3s ease;
}

.contact-link:hover {
    opacity: 0.6;
}

/* ========================================
   フッター
   ======================================== */

.footer {
    padding: 40px;
    text-align: center;
    background: transparent;
}

.footer p {
    font-size: 0.875rem;
    color: #999;
    letter-spacing: 0.05em;
}

/* ========================================
   レスポンシブ対応
   ======================================== */

@media (max-width: 768px) {
    .section {
        padding: 80px 24px;
    }

    .section-title {
        font-size: 2rem;
        margin-bottom: 60px;
    }

    .hero-title {
        font-size: 1.5rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .philosophy {
        font-size: 1.2rem;
    }

    .career-title {
        font-size: 1.5rem;
    }

    .skills-grid {
        grid-template-columns: 1fr;
        gap: 50px;
    }

    .works-grid {
        grid-template-columns: 1fr;
        gap: 60px;
    }

    .contact-item {
        flex-direction: column;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .section {
        padding: 60px 20px;
    }

    .section-title {
        font-size: 1.75rem;
        margin-bottom: 50px;
    }

    .hero-title {
        font-size: 1.3rem;
    }

    .about-text p,
    .career-content p {
        font-size: 0.95rem;
    }
}
