@charset "UTF-8";

/* ==========================================================================
   1. 全体設定 (Reset & Base)
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Serif JP', 'Times New Roman', serif;
    background: #f7f5f0; /* より暖かみのある洗練されたライトグレー */
    color: #2b2b2b;      /* 視認性を上げた深みのあるダークグレー */
    transition: background-color 0.4s cubic-bezier(0.16, 1, 0.3, 1), 
                color 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}


/* ==========================================================================
   2. ナビゲーションバー (Navbar)
   ========================================================================== */
.navbar {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
    width: min(90%, 860px);
    z-index: 1000;

    display: flex;
    justify-content: space-between;
    align-items: center;

    padding: 12px 28px;
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);

    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 999px;
    box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.05),
                0 2px 6px -1px rgba(0, 0, 0, 0.02);
    transition: all 0.3s ease;
}

/* ナビバー左側（戻るボタン ＋ ロゴ） */
.nav-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* ナビバー固定：戻るボタン */
.nav-back-btn {
    text-decoration: none;
    color: #2b2b2b;
    font-size: 1rem;
    font-weight: 300;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.25s ease, transform 0.25s ease;
}

.nav-back-btn:hover {
    background: rgba(0, 0, 0, 0.04);
    transform: translateX(-2px);
}

/* ロゴ */
.logo a {
    text-decoration: none;
    color: #2b2b2b;
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

/* ナビバー右側：ダークモード切り替えボタン */
.dark-mode-toggle {
    background: none;
    border: none;
    color: #2b2b2b;
    font-size: 1rem;
    cursor: pointer;
    border-radius: 50%;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.25s ease, transform 0.25s ease;
}

.dark-mode-toggle:hover {
    background: rgba(0, 0, 0, 0.04);
    transform: scale(1.05);
}


/* ==========================================================================
   3. フィルター & メインコンテンツ (Filter & Content)
   ========================================================================== */
/* 絞り込みフィルター */
.filter-container {
    max-width: 800px;
    margin: 150px auto 32px;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: #707070;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
}

.filter-container input[type="checkbox"] {
    accent-color: #2b2b2b;
    cursor: pointer;
    width: 15px;
    height: 15px;
}

/* 記事を囲むコンテナ */
.container {
    max-width: 800px;
    margin: 0 auto;
}

/* 記事カード */
.article {
    padding: 64px 60px;
    background: #ffffff;
    border-radius: 24px;
    box-shadow: 0 12px 32px -4px rgba(0, 0, 0, 0.04),
                0 4px 12px -2px rgba(0, 0, 0, 0.02);
    margin-bottom: 48px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.article:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 40px -4px rgba(0, 0, 0, 0.06),
                0 6px 16px -2px rgba(0, 0, 0, 0.03);
}

/* 記事内の各要素 */
.date {
    color: #8c8c8c;
    font-size: 0.85rem;
    margin-bottom: 18px;
    letter-spacing: 0.15em;
    font-variant-numeric: tabular-nums;
}

h1 {
    font-size: 1.85rem;
    font-weight: 400;
    line-height: 1.4;
    letter-spacing: 0.02em;
    margin-bottom: 28px;
    color: #1a1a1a;
}

img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 16px;
    margin-bottom: 36px;
}

.text {
    font-size: 0.98rem;
    line-height: 2.1;
    color: #4a4a4a;
    letter-spacing: 0.03em;
}


/* ==========================================================================
   4. 各種ボタン & フッター (Buttons & Footer)
   ========================================================================== */
/* ページトップへ戻るボタン */
.scroll-top-btn {
    position: fixed;
    bottom: 36px;
    right: 36px;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    color: #2b2b2b;
    font-size: 1rem;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 990;
}

.scroll-top-btn.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-top-btn:hover {
    background: #2b2b2b;
    color: #ffffff;
    border-color: #2b2b2b;
}

/* フッター */
footer {
    text-align: center;
    padding: 48px 20px 64px;
    color: #a0a0a0;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
}


/* ==========================================================================
   5. ダークモード設定 (Dark Mode)
   ========================================================================== */
body.dark-mode {
    background: #141416; /* 上質なミッドナイトブラック */
    color: #e4e4e6;
}

/* ナビバー */
body.dark-mode .navbar {
    background: rgba(26, 26, 30, 0.7);
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

body.dark-mode .logo a,
body.dark-mode .nav-back-btn,
body.dark-mode .dark-mode-toggle,
body.dark-mode .filter-container {
    color: #e4e4e6;
}

body.dark-mode .nav-back-btn:hover,
body.dark-mode .dark-mode-toggle:hover {
    background: rgba(255, 255, 255, 0.08);
}

body.dark-mode .filter-container input[type="checkbox"] {
    accent-color: #e4e4e6;
}

/* 記事カード・コンテンツ */
body.dark-mode .article {
    background: #1e1e22;
    box-shadow: 0 12px 32px -4px rgba(0, 0, 0, 0.3);
}

body.dark-mode h1 {
    color: #f0f0f2;
}

body.dark-mode .date {
    color: #787880;
}

body.dark-mode .text {
    color: #b0b0b8;
}

/* 各種ボタン */
body.dark-mode .scroll-top-btn {
    background: rgba(30, 30, 35, 0.75);
    color: #e4e4e6;
    border-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .scroll-top-btn:hover {
    background: #f0f0f2;
    color: #141416;
}


/* ==========================================================================
   6. レスポンシブ対応 (Responsive)
   ========================================================================== */
@media (max-width: 768px) {
    .navbar {
        top: 16px;
        padding: 10px 20px;
    }

    .filter-container {
        margin: 120px auto 24px;
    }

    .container {
        padding: 0 16px;
    }

    .article {
        padding: 36px 28px;
        border-radius: 20px;
        margin-bottom: 32px;
    }

    h1 {
        font-size: 1.5rem;
        margin-bottom: 20px;
    }

    img {
        border-radius: 12px;
        margin-bottom: 28px;
    }

    .text {
        font-size: 0.92rem;
        line-height: 1.95;
    }

    .scroll-top-btn {
        bottom: 24px;
        right: 24px;
    }
}

/* ==========================================================================
   7. フローティングキャラクターアイコン
   ========================================================================== */
body::after {
    content: "";
    position: fixed;
    bottom: 32px;
    left: 32px;
    width: 52px;
    height: 52px;
    z-index: 990;
    pointer-events: none; /* 下の要素のクリックを邪魔しない */

    /* キャラクターのベースデザイン（ミニマルなゴースト風） */
    background: 
        /* 目（左・右） */
        radial-gradient(circle at 35% 42%, #2b2b2b 3px, transparent 3.5px),
        radial-gradient(circle at 65% 42%, #2b2b2b 3px, transparent 3.5px),
        /* 口 */
        radial-gradient(circle at 50% 60%, #2b2b2b 2px, transparent 2.5px),
        /* 頬のチーク（ほんのりピンク） */
        radial-gradient(circle at 25% 54%, rgba(230, 150, 150, 0.4) 4px, transparent 4.5px),
        radial-gradient(circle at 75% 54%, rgba(230, 150, 150, 0.4) 4px, transparent 4.5px),
        /* キャラクターのボディカラー */
        #ffffff;

    border-radius: 50% 50% 45% 45%;
    box-shadow: 0 10px 25px -4px rgba(0, 0, 0, 0.12),
                0 4px 10px -2px rgba(0, 0, 0, 0.06);

    /* プカプカ浮かぶアニメーション */
    animation: floatCharacter 3.5s ease-in-out infinite;
}

/* ダークモード時のキャラクター調整 */
body.dark-mode::after {
    background: 
        radial-gradient(circle at 35% 42%, #141416 3px, transparent 3.5px),
        radial-gradient(circle at 65% 42%, #141416 3px, transparent 3.5px),
        radial-gradient(circle at 50% 60%, #141416 2px, transparent 2.5px),
        radial-gradient(circle at 25% 54%, rgba(255, 170, 170, 0.4) 4px, transparent 4.5px),
        radial-gradient(circle at 75% 54%, rgba(255, 170, 170, 0.4) 4px, transparent 4.5px),
        #e4e4e6;
    box-shadow: 0 10px 25px -4px rgba(0, 0, 0, 0.4);
}

/* 上下に浮遊する動きの定義 */
@keyframes floatCharacter {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-12px) rotate(3deg); /* 上に移動しながら少しだけ傾く */
    }
}

/* モバイル表示時のサイズ調整 */
@media (max-width: 768px) {
    body::after {
        bottom: 24px;
        left: 20px;
        width: 44px;
        height: 44px;
    }
}