/* ==========================================
   ヘッダー全体の設定（画面追従・固定）
========================================== */
.site-header {
    width: 100%;
    position: fixed;
    /* 画面上部に固定 */
    top: 0;
    left: 0;
    z-index: 1000;
    /* 最前面に表示 */
    background-color: rgba(30, 41, 59, 0.85);
    /* 透過性を持たせたカード背景色 */
    backdrop-filter: blur(12px);
    /* すりガラス風のブラー効果 */
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.site-header .header-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-sizing: border-box;
}

/* ==========================================
   コンテンツのかぶり防止設定
========================================== */
/* fixed指定でヘッダーが浮くため、bodyの上部にヘッダー分の余白を作る */
body {
    padding-top: 70px;
}

/* ==========================================
   左側：ロゴ (karunalab)
========================================== */
.site-logo {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}

.site-logo .logo-text {
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: 1px;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: linear-gradient(135deg, #38bdf8 0%, #818cf8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    transition: filter 0.3s ease, transform 0.3s ease;
}

.site-logo:hover .logo-text {
    filter: drop-shadow(0 0 8px rgba(56, 189, 248, 0.5));
    transform: translateY(-1px);
}

/* ==========================================
   右側：ナビゲーションメニュー
========================================== */
.site-nav .nav-list {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-link {
    position: relative;
    display: inline-block;
    padding: 8px 16px;
    color: var(--text-muted, #94a3b8);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: 8px;
    transition: color 0.25s ease, background-color 0.25s ease;
}

/* ホバー時の背景と文字色 */
.nav-link:hover {
    color: #f8fafc;
    background-color: rgba(255, 255, 255, 0.05);
}

/* ホバー時＆アクティブ時の下線アニメーション（インジケーター） */
.nav-link::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #38bdf8, #818cf8);
    border-radius: 2px;
    transform: translateX(-50%);
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-link:hover::after {
    width: 60%;
}


/* ==========================================
   レスポンシブ対応（スマホ表示時）
========================================== */
@media (max-width: 640px) {

    /* スマホ表示ではヘッダーの高さが増すため上部余白を調整 */
    body {
        padding-top: 100px;
    }

    .site-header .header-inner {
        flex-direction: column;
        gap: 12px;
        padding: 12px 16px;
    }

    .site-nav .nav-list {
        gap: 4px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .nav-link {
        padding: 6px 10px;
        font-size: 0.85rem;
    }
}