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

/* 基本スタイル */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

h1 {
    font-size: 2rem;
    margin: 0 0 0.5rem 0;
}

h2 {
    font-size: 1.75rem;
    margin: 0 0 1.5rem 0;
    color: #2c3e50;
    border-bottom: 3px solid #3498db;
    padding-bottom: 0.5rem;
}

h3 {
    font-size: 1.25rem;
    margin: 0 0 0.5rem 0;
    color: #34495e;
}

a {
    color: #3498db;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* プロフィールセクションスタイル */
.profile-section {
    padding: 3rem 1.5rem;
    background-color: #ffffff;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.profile-container {
    display: flex;
    align-items: center;
    max-width: 900px;
    margin: 0 auto;
    flex-direction: column;
}

.profile-photo {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    margin-bottom: 1.5rem;
}

.profile-info {
    margin-left: 0;
    text-align: center;
}

.profile-name {
    font-size: 2rem;
    font-weight: 700;
    color: #2c3e50;
}

.profile-handle {
    color: #3498db;
    font-size: 1rem;
    margin: 0.25rem 0 0.75rem 0;
    font-weight: 500;
}

.profile-affiliation {
    color: #7f8c8d;
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.profile-bio {
    line-height: 1.8;
    margin: 1rem 0;
    color: #555;
}

.profile-social-links {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1.5rem;
}

/* ヘッダースタイル */
header {
    text-align: center;
    padding: 1.5rem;
    background-color: #34495e;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

header nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.5rem;
}

header nav ul li a {
    color: #ecf0f1;
    font-weight: 500;
    transition: color 0.3s;
}

header nav ul li a:hover {
    color: #3498db;
    text-decoration: none;
}

/* セクションスタイル */
.section {
    margin: 2rem auto;
    padding: 2rem 1.5rem;
    max-width: 900px;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.career-item,
.speaking-item,
.certification-item,
.blog-item {
    border: 1px solid #e0e0e0;
    padding: 1.5rem;
    margin: 0 0 1.5rem 0;
    border-radius: 6px;
    background-color: #fafafa;
    transition: box-shadow 0.3s;
}

/* ブログアイテムのレイアウト */
.blog-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.blog-type-icon {
    width: 40px;
    height: 40px;
    object-fit: contain;
    flex-shrink: 0;
    margin-top: 0.25rem;
}

.blog-content {
    flex: 1;
}

.blog-content {
    flex: 1;
}

.career-item:hover,
.speaking-item:hover,
.certification-item:hover,
.blog-item:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.career-item .description {
    line-height: 1.7;
    margin: 1rem 0 0 0;
    color: #555;
}

.career-item .description ul {
    margin: 0.5rem 0 0 1.5rem;
    list-style-type: disc;
}

.career-item .description ul li {
    margin: 0.3rem 0;
}

.period,
.date,
.acquired-date,
.expiry-date,
.publish-date {
    color: #7f8c8d;
    font-size: 0.9rem;
    margin: 0.3rem 0;
}

.cert-code {
    color: #95a5a6;
    font-size: 0.85rem;
    margin: 0.2rem 0 0.5rem 0;
    font-weight: 500;
}

/* ギャラリーセクション - 横幅いっぱい */
.gallery-section {
    margin: 2rem 0;
    padding: 2rem 0;
    max-width: 100%;
    background-color: #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.gallery-container {
    max-width: 100%;
    padding: 0 2rem;
}

.gallery-container h2 {
    text-align: center;
    font-size: 1.75rem;
    margin: 0 0 2rem 0;
    color: #2c3e50;
    border-bottom: 3px solid #3498db;
    padding-bottom: 0.5rem;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

/* カルーセルラッパー */
.carousel-wrapper {
    position: relative;
    max-width: 100%;
    margin: 0 auto;
    padding: 0 60px;
}

.carousel-track-container {
    overflow: hidden;
}

.carousel-track {
    display: flex;
    gap: 2rem;
    transition: transform 0.5s ease-in-out;
}

.carousel-slide {
    min-width: calc(25% - 1.5rem);
    background-color: #fafafa;
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-slide:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.carousel-slide img {
    width: 100%;
    height: 180px;
    object-fit: contain;
}

/* カルーセルボタン */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(52, 152, 219, 0.9);
    color: #ffffff;
    border: none;
    font-size: 2rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-btn:hover {
    background-color: rgba(52, 152, 219, 1);
    transform: translateY(-50%) scale(1.1);
}

.prev-carousel-btn {
    left: 10px;
}

.next-carousel-btn {
    right: 10px;
}

/* カルーセルドットインジケーター */
.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 2rem;
}

.carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #bdc3c7;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.carousel-dot:hover {
    background-color: #7f8c8d;
    transform: scale(1.2);
}

.carousel-dot.active {
    background-color: #3498db;
    transform: scale(1.3);
}

.title {
    font-style: italic;
    color: #555;
    margin: 0.5rem 0;
}

.link {
    display: inline-block;
    margin-top: 0.5rem;
    color: #3498db;
    font-weight: 500;
}

/* 資格セクションのグリッドレイアウト */
.certifications-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 2rem;
    justify-items: center;
}

/* 資格アイテムのレイアウト */
.certification-item {
    position: relative;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.certification-item:hover {
    transform: scale(1.05);
    z-index: 1001;
}

.certification-item.active {
    z-index: 1001;
}

/* 資格アイコンスタイル */
.cert-icon {
    width: 120px;
    height: 120px;
    object-fit: contain;
    display: block;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease;
}

.certification-item:hover .cert-icon {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* 資格情報カード（デフォルトは非表示） */
.cert-card {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(255, 255, 255, 0.98);
    border: 2px solid #3498db;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    min-width: 280px;
    max-width: 350px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    pointer-events: none;
}

/* ホバー時にカードを表示（デスクトップ） */
.certification-item:hover .cert-card {
    opacity: 1;
    visibility: visible;
}

/* タップ時にカードを表示（モバイル） */
.certification-item.active .cert-card {
    opacity: 1;
    visibility: visible;
}

.cert-card h3 {
    font-size: 1.1rem;
    margin: 0 0 0.5rem 0;
    color: #2c3e50;
    line-height: 1.4;
}

.cert-content {
    flex: 1;
}

/* SNS・外部リンクスタイル */
.social-links {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.social-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    padding: 0.75rem 1.25rem;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    background-color: #fafafa;
    transition: all 0.3s;
}

.social-link:hover {
    background-color: #3498db;
    color: #ffffff;
    text-decoration: none;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.social-link:hover .social-icon {
    filter: brightness(0) invert(1);
}

.social-icon {
    width: 32px;
    height: 32px;
    margin-right: 0.5rem;
}

/* フッタースタイル */
footer {
    text-align: center;
    padding: 2rem 1.5rem;
    background-color: #34495e;
    color: #ecf0f1;
    margin-top: 2rem;
}

footer p {
    margin: 0.5rem 0;
}

footer a {
    color: #3498db;
}

footer a:hover {
    color: #5dade2;
}

/* レスポンシブデザイン - モバイル */
@media (max-width: 768px) {
    body {
        font-size: 14px;
    }

    h1 {
        font-size: 1.5rem;
    }

    h2 {
        font-size: 1.4rem;
    }

    h3 {
        font-size: 1.1rem;
    }

    .profile-section {
        padding: 2rem 1rem;
    }

    .profile-container {
        flex-direction: column;
    }

    .profile-photo {
        width: 150px;
        height: 150px;
        margin-bottom: 1rem;
    }

    .profile-info {
        margin-left: 0;
        text-align: center;
    }

    .profile-name {
        font-size: 1.5rem;
    }

    .profile-handle {
        font-size: 0.9rem;
    }

    .profile-affiliation {
        font-size: 1rem;
    }

    header {
        padding: 1rem;
    }

    header nav ul {
        gap: 0.75rem;
    }

    .section {
        margin: 1rem;
        padding: 1.5rem 1rem;
    }

    .career-item,
    .speaking-item,
    .certification-item,
    .blog-item {
        padding: 1rem;
    }

    .certifications-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 1.5rem;
    }

    .cert-icon {
        width: 100px;
        height: 100px;
    }

    .cert-card {
        min-width: 240px;
        padding: 1.25rem;
    }

    .cert-card h3 {
        font-size: 1rem;
    }

    .blog-type-icon {
        width: 32px;
        height: 32px;
    }

    .carousel-slide {
        min-width: calc(50% - 1rem);
    }

    .carousel-slide img {
        height: 150px;
    }

    .carousel-btn {
        font-size: 1.5rem;
        width: 40px;
        height: 40px;
    }

    .prev-carousel-btn {
        left: 5px;
    }

    .next-carousel-btn {
        right: 5px;
    }

    .carousel-wrapper {
        padding: 0 50px;
    }

    .carousel-dot {
        width: 10px;
        height: 10px;
    }

    .social-links {
        gap: 1rem;
    }

    .social-link {
        padding: 0.5rem 1rem;
    }

    .social-icon {
        width: 24px;
        height: 24px;
    }
}

/* レスポンシブデザイン - デスクトップ */
@media (min-width: 769px) {
    .profile-container {
        flex-direction: row;
        text-align: left;
    }

    .profile-info {
        margin-left: 2rem;
        text-align: left;
    }

    .profile-social-links {
        justify-content: flex-start;
    }

    .section {
        max-width: 900px;
        margin: 2rem auto;
    }
}
