/* ===== リセット & 基本設定 ===== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
    line-height: 1.6;
    color: #1c2340;
    background-color: #eef2ff;
    overflow-x: hidden;
}

/* ===== Three.js キャンバス（背景） ===== */
#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    display: block;
    cursor: pointer;
}

/* ===== ページ全体ラッパー ===== */
#page-wrapper {
    position: relative;
    z-index: 1;
    transition: opacity 0.5s ease;
}

/* ゲームモード時はpage-wrapperのみ非表示、navは常に表示 */
body.game-mode #page-wrapper {
    opacity: 0;
    pointer-events: none;
}

/* ===== ヘッダー ===== */
header {
    scroll-margin-top: 4.5rem;
    padding: 5rem 1rem 3rem;
    text-align: center;
}

.header-inner {
    display: inline-block;
    padding: 2rem 3rem;
    background: rgba(255, 255, 255, 0.60);
    border: 1px solid rgba(100, 140, 255, 0.25);
    border-radius: 16px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow:
        0 4px 32px rgba(80, 120, 255, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    animation: header-fade-in 1.2s ease both;
}

@keyframes header-fade-in {
    from { opacity: 0; transform: translateY(-20px); }
    to   { opacity: 1; transform: translateY(0); }
}

header h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    letter-spacing: 0.04em;
    background: linear-gradient(135deg, #2c4aad 0%, #5272e8 50%, #7f5af0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tagline {
    margin-top: 0.5rem;
    font-size: 1rem;
    font-weight: 300;
    color: rgba(44, 74, 173, 0.65);
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

/* ===== ナビゲーション ===== */
nav {
    display: flex;
    justify-content: center;
    gap: 0.25rem;
    padding: 0.75rem 1rem;
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(238, 242, 255, 0.7);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(80, 120, 255, 0.18);
}

nav a {
    color: #2c5282;
    padding: 0.5rem 1.25rem;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 8px;
    letter-spacing: 0.05em;
    transition: background 0.25s, color 0.25s, box-shadow 0.25s;
}

nav a:hover {
    background: rgba(82, 114, 232, 0.12);
    color: #2c4aad;
    box-shadow: 0 0 16px rgba(82, 114, 232, 0.15);
}

/* ===== メインコンテンツ ===== */
.container {
    max-width: 860px;
    margin: 2.5rem auto;
    padding: 0 1.25rem 3rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* ===== セクション（ライトグラスモーフィズム） ===== */
section {
    scroll-margin-top: 4.5rem;
    padding: 2rem 2.25rem;
    background: rgba(255, 255, 255, 0.58);
    border: 1px solid rgba(80, 120, 255, 0.18);
    border-radius: 16px;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow:
        0 4px 24px rgba(80, 100, 200, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

section:hover {
    transform: translateY(-4px);
    box-shadow:
        0 8px 36px rgba(80, 100, 200, 0.14),
        0 0 24px rgba(82, 114, 232, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

h2 {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 0.9rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid rgba(82, 114, 232, 0.25);
    color: #2c4aad;
    letter-spacing: 0.03em;
}

p {
    color: #374151;
    font-size: 0.95rem;
}

/* Profile List Alignment */
.profile-list {
    display: grid;
    grid-template-columns: 100px auto;
    gap: 0.8rem 0.5rem;
    margin-top: 1rem;
}

.profile-list dt {
    font-weight: 600;
    color: #438ee3;
    position: relative;
    padding-right: 1rem;
}

.profile-list dt::after {
    content: ":";
    position: absolute;
    right: 0;
}

.profile-list dd {
    margin: 0;
    color: #374151;
    font-size: 0.95rem;
    padding-left: 0.5rem;
}

/* ===== Experience Timeline ===== */
.timeline {
    list-style: none;
    padding: 0.5rem 0 0;
    margin: 1rem 0 0;
    position: relative;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 72px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, #5272e8 0%, rgba(82, 114, 232, 0.1) 100%);
    border-radius: 2px;
}

.timeline-item {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    margin-bottom: 1.8rem;
    position: relative;
    transition: transform 0.2s ease;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-item:hover {
    transform: translateX(4px);
}

.timeline-date {
    min-width: 60px;
    text-align: right;
    font-size: 0.78rem;
    font-weight: 700;
    color: #438ee3;
    letter-spacing: 0.03em;
    padding-top: 0.2rem;
    flex-shrink: 0;
}

.timeline-item::after {
    content: '';
    position: absolute;
    left: 66px;
    top: 0.4rem;
    width: 12px;
    height: 12px;
    background: #fff;
    border: 2.5px solid #438ee3;
    border-radius: 50%;
    box-shadow: 0 0 0 3px rgba(82, 114, 232, 0.15);
    transition: background 0.2s, box-shadow 0.2s;
}

.timeline-item:hover::after {
    background: #438ee3;
    box-shadow: 0 0 0 5px rgba(82, 114, 232, 0.2);
}

.timeline-content {
    padding: 0.5rem 0.75rem;
    background: rgba(82, 114, 232, 0.05);
    border-left: 2px solid rgba(82, 114, 232, 0.25);
    border-radius: 0 8px 8px 0;
    transition: background 0.2s, border-color 0.2s;
    flex: 1;
}

.timeline-item:hover .timeline-content {
    background: rgba(82, 114, 232, 0.1);
    border-left-color: #438ee3;
}

.timeline-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #1c2340;
    margin: 0 0 0.15rem;
}

.timeline-sub {
    font-size: 0.82rem;
    color: #6b7280;
    margin: 0;
}

section a {
    color: #4f68e8;
    text-decoration: none;
    border-bottom: 1px solid rgba(79, 104, 232, 0.35);
    transition: color 0.2s, border-color 0.2s;
}

section a:hover {
    color: #2c4aad;
    border-color: rgba(44, 74, 173, 0.5);
}

ul {
    padding-left: 1.5rem;
    color: #374151;
    font-size: 0.95rem;
}

ul li {
    margin-bottom: 0.4rem;
}

ul li::marker {
    color: #5272e8;
}

/* Contact List */
.contact-list {
    list-style: none;
    padding: 0;
    margin-top: 1rem;
}

.contact-list li {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.8rem;
    padding: 0.75rem 1.25rem;
    background: rgba(82, 114, 232, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(82, 114, 232, 0.1);
    transition: all 0.3s ease;
}

.contact-list li:hover {
    transform: translateX(6px);
    background: rgba(82, 114, 232, 0.08);
    border-color: rgba(82, 114, 232, 0.2);
    box-shadow: 0 4px 12px rgba(82, 114, 232, 0.08);
}

.contact-list i {
    width: 24px;
    color: #438ee3;
    font-size: 1.2rem;
    text-align: center;
}

.contact-list .label {
    font-weight: 600;
    color: #1c2340;
    min-width: 85px;
    font-size: 0.9rem;
    border-right: 1px solid rgba(82, 114, 232, 0.2);
    margin-right: 0.5rem;
    padding-right: 0.5rem;
}

.contact-list span, .contact-list a {
    font-size: 0.95rem;
    color: #374151;
}

.contact-list a {
    color: #438ee3;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s;
}

.contact-list a:hover {
    border-bottom-color: #438ee3;
}

/* ===== フッター ===== */
footer {
    text-align: center;
    padding: 2rem 1rem;
    font-size: 0.8rem;
    color: rgba(44, 74, 173, 0.5);
    border-top: 1px solid rgba(80, 120, 255, 0.12);
}

footer a {
    color: #2c4aad;
    font-size: 1.8rem;
    text-decoration: none;
    transition: color 0.2s, transform 0.2s;
    display: inline-block;
    margin-bottom: 0.8rem;
}

footer a:hover {
    color: #4f68e8;
    transform: scale(1.15);
}

/* ===== トップへ戻るボタン ===== */
#back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 3.5rem;
    height: 3.5rem;
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid rgba(80, 120, 255, 0.3);
    border-radius: 50%;
    color: #2c4aad;
    cursor: pointer;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 4px 16px rgba(80, 120, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(15px);
    transition: all 0.3s ease;
    z-index: 90;
}

#back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

#back-to-top:hover {
    background: rgba(255, 255, 255, 0.95);
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(80, 120, 255, 0.25);
    color: #4f68e8;
}

/* ===== Hobby セクション ===== */
.hobby-block {
    margin-bottom: 1.5rem;
}

.hobby-subtitle {
    font-size: 1.05rem;
    font-weight: 600;
    color: #438ee3;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.hobby-desc {
    color: #374151;
    font-size: 0.92rem;
    margin-bottom: 0.85rem;
}

/* 旅行サムネイルグリッド */
.hobby-travel-preview {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-bottom: 0.85rem;
}

.travel-thumb-link {
    display: block;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(82, 114, 232, 0.18);
    box-shadow: 0 2px 10px rgba(80, 100, 200, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.travel-thumb-link:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 6px 20px rgba(80, 100, 200, 0.18);
}

.travel-thumb {
    width: 100%;
    aspect-ratio: 3/4;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.travel-thumb-link:hover .travel-thumb {
    transform: scale(1.06);
}

/* もっと見るボタン */
.travel-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.5rem 1.2rem;
    background: linear-gradient(135deg, #5272e8 0%, #7f5af0 100%);
    color: #fff !important;
    border: none;
    border-bottom: none !important;
    border-radius: 999px;
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
    letter-spacing: 0.03em;
    transition: opacity 0.2s, transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 3px 12px rgba(82, 114, 232, 0.3);
}

.travel-more-btn:hover {
    opacity: 0.88;
    transform: translateX(3px);
    box-shadow: 0 5px 18px rgba(82, 114, 232, 0.4);
    color: #fff !important;
    border-color: transparent !important;
}

/* ホビー区切り線 */
.hobby-divider {
    border: none;
    border-top: 1px solid rgba(82, 114, 232, 0.15);
    margin: 1.25rem 0;
}

/* ゲームリスト */
.game-list {
    padding-left: 0;
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.game-list li {
    padding: 0.35rem 0.9rem;
    background: rgba(82, 114, 232, 0.07);
    border: 1px solid rgba(82, 114, 232, 0.18);
    border-radius: 999px;
    font-size: 0.88rem;
    color: #1c2340;
    transition: background 0.2s, border-color 0.2s, transform 0.2s;
    margin-bottom: 0;
}

.game-list li:hover {
    background: rgba(82, 114, 232, 0.14);
    border-color: rgba(82, 114, 232, 0.35);
    transform: translateY(-2px);
}

.game-list li::marker {
    content: none;
}

/* ===== スマホ向け ===== */
@media (max-width: 600px) {
    nav { flex-wrap: wrap; gap: 0.2rem; }
    nav a { padding: 0.45rem 0.85rem; font-size: 0.85rem; }
    .header-inner { padding: 1.5rem 1.5rem; }
    section { padding: 1.5rem 1.25rem; }
    .hobby-travel-preview { grid-template-columns: repeat(2, 1fr); }
}
