/* リセットCSS */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans JP', sans-serif;
    background-color: #1a1a1a;
    color: #ffffff;
    line-height: 1.6;
}

/* レスポンシブ改行のための補助クラス */
/* デフォルトは非表示（PCなど広い画面では改行しない） */
.br-md {
    display: none;
}

/* 段落の自動バランス調整（対応ブラウザで自然な改行） */
.profile-details p {
    text-wrap: balance;
}

/* ローディング画面 */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #1a1a1a;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease-out;
}

.loading-screen.fade-out {
    opacity: 0;
    pointer-events: none;
}

.loading-text {
    font-size: 3rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.2em;
    display: flex;
}

.letter {
    opacity: 0;
    transform: translateY(-100px);
    animation: dropLetter 0.8s ease-out forwards;
}

.letter:nth-child(1) { animation-delay: 0.1s; }
.letter:nth-child(2) { animation-delay: 0.2s; }
.letter:nth-child(3) { animation-delay: 0.3s; }
.letter:nth-child(4) { animation-delay: 0.4s; }
.letter:nth-child(5) { animation-delay: 0.5s; }
.letter:nth-child(6) { animation-delay: 0.6s; }
.letter:nth-child(7) { animation-delay: 0.7s; }
.letter:nth-child(8) { animation-delay: 0.8s; }
.letter:nth-child(9) { animation-delay: 0.9s; }
.letter:nth-child(10) { animation-delay: 1.0s; }

@keyframes dropLetter {
    0% {
        opacity: 0;
        transform: translateY(-100px);
    }
    60% {
        opacity: 1;
        transform: translateY(10px);
    }
    80% {
        transform: translateY(-5px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ヘッダー */
header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background-color: rgba(26, 26, 26, 0.9);
    backdrop-filter: blur(10px);
    transition: background-color 0.3s ease;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
    min-height: 60px;
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
}

.logo h1 a {
    color: #ffffff;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.logo h1 a:hover {
    opacity: 0.8;
}

.language {
    font-size: 0.9rem;
    color: #cccccc;
}

/* ヒーローセクション */
.hero {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-image {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.hero-image img.active {
    opacity: 1;
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    color: #ffffff;
    font-size: 0.8rem;
    letter-spacing: 2px;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-10px);
    }
    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

/* プロフィールセクション */
.profile {
    padding: 4rem 2rem;
    background-color: #2a2a2a;
}

.profile-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 4rem;
    align-items: center;
}

.profile-image img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 10px;
}

.profile-info h2 {
    font-size: 3rem;
    margin-bottom: 2rem;
    font-weight: 700;
}

.profile-details {
    margin-bottom: 2rem;
}

.profile-details p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    color: #cccccc;
    line-height: 1.7;
}

.profile-details p:first-child,
.profile-details p:nth-child(2) {
    margin-bottom: 0.5rem;
}

.social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    position: relative;
}

.click-indicator {
    color: #66ccff;
    width: auto;
    font-size: 1.2rem;
    font-weight: 500;
    margin: 0.5rem auto 0 auto;
    text-align: left;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
        transform: rotate(-15deg) scale(1.05);
    }
}

.social-link {
    color: #ffffff;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border: 1px solid #555555;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.social-link:hover {
    background-color: #555555;
    transform: translateY(-2px);
}

/* その他の活動セクション */
.other-activities {
    padding: 4rem 2rem;
    background-color: #1a1a1a;
}

.activities-container {
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    font-weight: 700;
    color: #ffffff;
}

.activity-item {
    margin-bottom: 4rem;
}

.activity-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.activity-content.reverse {
    direction: rtl;
}

.activity-content.reverse > * {
    direction: ltr;
}

.activity-image img {
    width: 100%;
    height: 300px;
    width: 300px;
    object-fit: cover;
    border-radius: 10px;
    margin: 0 auto;
    display: block;
}

.activity-info h3 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: #ffffff;
    font-weight: 600;
}

.activity-info p {
    color: #cccccc;
    line-height: 1.7;
    font-size: 1.1rem;
}

/* フッター */
footer {
    background-color: #1a1a1a;
    padding: 2rem;
    text-align: center;
    border-top: 1px solid #555555;
}

.footer-content p {
    margin-bottom: 0.5rem;
    color: #888888;
}

.footer-content a {
    color: #cccccc;
    text-decoration: none;
}

.footer-content a:hover {
    color: #ffffff;
}

/* レスポンシブデザイン */
@media (max-width: 768px) {
    /* 768px以下では任意改行を有効化 */
    .br-md { display: inline; }
    header {
        height: auto;
        min-height: 60px;
        display: flex;
        align-items: center;
    }

    nav {
        width: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
        padding: 1rem;
        min-height: 60px;
    }

    .logo h1 {
        font-size: 1.2rem;
    }

    .profile-container {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .profile-info h2 {
        font-size: 2rem;
    }
    
    .profile-details p {
        font-size: 1rem;
        margin-bottom: 1rem;
    }
    
    .activity-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .activity-content.reverse {
        direction: ltr;
    }
    
    .activity-image img {
        height: 250px;
        width: 250px;
    }
    
    .activity-info h3 {
        font-size: 1.8rem;
        margin-bottom: 1rem;
    }
    
    .activity-info p {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .other-activities {
        padding: 3rem 1rem;
    }
    
    nav {
        padding: 1rem;
    }
    
    .logo h1 {
        font-size: 1.2rem;
    }
    
    .hero-image img {
        object-position: left center;
        object-fit: cover;
        width: 100%;
        height: 100%;
        position: absolute;
        top: 0;
        left: 0;
        opacity: 0;
        transition: opacity 1s ease-in-out;
    }
    
    .hero-image img.active {
        opacity: 1;
    }
    
    .scroll-indicator {
        font-size: 0.7rem;
        bottom: 1rem;
    }
    
    .loading-text {
        font-size: 2rem;
        letter-spacing: 0.1em;
    }
    
    .letter {
        animation: dropLetterMobile 0.8s ease-out forwards;
    }
    
    @keyframes dropLetterMobile {
        0% {
            opacity: 0;
            transform: translateY(-80px);
        }
        60% {
            opacity: 1;
            transform: translateY(8px);
        }
        80% {
            transform: translateY(-4px);
        }
        100% {
            opacity: 1;
            transform: translateY(0);
        }
    }
}

@media (max-width: 480px) {
    .profile-info h2 {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }
    
    .profile-details p {
        font-size: 0.9rem;
        line-height: 1.7;
    }
    
    .social-links {
        justify-content: center;
        margin-top: 1.5rem;
        display: flex;
        align-items: center;
        flex-wrap: nowrap;
    }
    
    .click-indicator {
        font-size: 1.2rem;
        margin-left: 8rem;
        flex-shrink: 0;
    }
    
    .social-link {
        padding: 0.7rem 1.5rem;
        font-size: 0.9rem;
    }
    
    .other-activities {
        padding: 2rem 1rem;
    }
    
    .activity-item {
        margin-bottom: 2rem;
    }
    
    .activity-content {
        gap: 1.5rem;
    }
    
    .activity-image img {
        height: 200px;
        width: 200px;
    }
    
    .activity-info h3 {
        font-size: 1.5rem;
        margin-bottom: 0.8rem;
    }
    
    .activity-info p {
        font-size: 0.9rem;
        line-height: 1.6;
    }
    
    .section-title {
        font-size: 1.5rem;
        margin-bottom: 2rem;
    }
    
    .profile {
        padding: 2rem 1rem;
    }
    
    .profile-image img {
        height: 300px;
    }
    
    .hero {
        height: 80vh;
    }
    
    .hero-image img {
        object-position: left center;
        object-fit: cover;
        width: 100%;
        height: 100%;
        position: absolute;
        top: 0;
        left: 0;
        opacity: 0;
        transition: opacity 1s ease-in-out;
    }
    
    .hero-image img.active {
        opacity: 1;
    }
    
    .scroll-indicator {
        font-size: 0.7rem;
        bottom: 1rem;
    }
    
    .loading-text {
        font-size: 1.5rem;
        letter-spacing: 0.05em;
    }
    
    .letter {
        animation: dropLetterSmall 0.8s ease-out forwards;
    }
    
    @keyframes dropLetterSmall {
        0% {
            opacity: 0;
            transform: translateY(-60px);
        }
        60% {
            opacity: 1;
            transform: translateY(6px);
        }
        80% {
            transform: translateY(-3px);
        }
        100% {
            opacity: 1;
            transform: translateY(0);
        }
    }
}

/* 超小画面用 */
@media (max-width: 320px) {
    .hero-image img {
        object-position: left center;
        object-fit: cover;
        width: 100%;
        height: 100%;
        position: absolute;
        top: 0;
        left: 0;
        opacity: 0;
        transition: opacity 1s ease-in-out;
    }
    
    .hero-image img.active {
        opacity: 1;
    }
    
    .profile-info h2 {
        font-size: 1.3rem;
    }
    
    .profile-details p {
        font-size: 0.8rem;
    }
    
    .activity-image img {
        height: 180px;
        width: 180px;
    }
    
    .activity-info h3 {
        font-size: 1.3rem;
    }
    
    .activity-info p {
        font-size: 0.8rem;
    }
    
    .section-title {
        font-size: 1.3rem;
    }
    
    .social-link {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
        flex-shrink: 0;
    }
    
    .click-indicator {
        font-size: 0.7rem;
        margin-left: 0.2rem;
        flex-shrink: 0;
    }
    
    .loading-text {
        font-size: 1.2rem;
        letter-spacing: 0.05em;
    }
    
    .letter {
        animation: dropLetterXSmall 0.8s ease-out forwards;
    }
    
    @keyframes dropLetterXSmall {
        0% {
            opacity: 0;
            transform: translateY(-50px);
        }
        60% {
            opacity: 1;
            transform: translateY(5px);
        }
        80% {
            transform: translateY(-2px);
        }
        100% {
            opacity: 1;
            transform: translateY(0);
        }
    }
}

/* タッチデバイス用の調整 */
@media (hover: none) and (pointer: coarse) {
    .information-item:hover {
        transform: none;
        box-shadow: none;
    }
    
    .social-link:hover {
        transform: none;
    }
    
    .information-item:active {
        transform: translateY(-3px);
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    }
}

/* 横向き画面での調整 */
@media (max-width: 768px) and (orientation: landscape) {
    .hero {
        height: 100vh;
    }
    
    .profile {
        padding: 2rem 1rem;
    }
    
    .profile-container {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
        text-align: left;
    }
    
    .profile-image img {
        height: 250px;
    }
}

/* パソコン画面（幅769px以上）ではclick-indicatorを非表示に */
@media (min-width: 769px) {
    .click-indicator {
        display: none !important;
    }
}
