/*
Theme Name: mosha-minimal
Author: mosha
Description: Vitalik-inspired minimal theme
Version: 2.6
*/

/* =========================================
   1. リセット & 基本設定
   ========================================= */
* {
    box-sizing: border-box;
}

body {
    background-color: #FFFFFF; /* 背景は白 */
    color: #333333;            /* 文字は真っ黒すぎないグレー */
    font-family: "Times New Roman", "YuMincho", "Hiragino Mincho ProN", serif; /* セリフ体 */
    line-height: 1.6;
    font-size: 18px;           /* 少し大きめで読みやすく */
    margin: 0;
    padding: 0;
}

/* =========================================
   2. レイアウト（中央寄せ 1カラム）
   ========================================= */
#page {
    max-width: 800px;  /* 幅を制限 */
    margin: 0 auto;    /* 中央寄せ */
    padding: 40px 20px;
}

/* =========================================
   3. ヘッダー
   ========================================= */
.site-header {
    margin-bottom: 60px;
    border-bottom: none;
    text-align: center; /* ブログ名と説明を中央寄せ */
}

.site-branding {
    margin-bottom: 30px; /* メニューとの間隔 */
}

.site-title {
    font-size: 2.2rem;
    font-weight: bold;
    margin: 0;
    letter-spacing: -0.02em; /* 文字間を少し詰めて引き締める */
    color: #000000;          /* リンク削除後も黒色を維持 */
}

.site-title a {
    text-decoration: none;
    color: #000;
}

.site-description {
    color: #666;
    font-size: 1rem;
    margin-top: 10px;
    font-style: italic;
}

/* =========================================
   4. ナビゲーション（Vitalik風の線とメニュー）
   ========================================= */
/* 不要な「Primary Menu」ボタンを消す */
.menu-toggle {
    display: none !important;
}

/* メニュー全体を囲むコンテナ */
.main-navigation {
    width: 100%;
    margin-bottom: 40px;
    
    border-top: 2px solid #ccc;    /* 上の線 */
    border-bottom: 2px solid #ccc; /* 下の線 */
    
    padding: 10px 0;               /* 線と文字の間の余白 */
    position: relative;            /* Aboutリンクの基準点 */
}

/* メニューリスト（横並び＆中央寄せ） */
.main-navigation ul {
    list-style: none;        /* ・を消す */
    padding: 0;
    margin: 0;
    display: flex;           /* 横並び */
    justify-content: center; /* 中央寄せ */
    flex-wrap: wrap;         /* スマホで折り返す */
    gap: 20px;               /* メニュー同士の間隔 */
}

/* メニューのリンク装飾 */
.main-navigation a {
    text-decoration: none;   /* 下線を消す */
    color: #5c90d2;          /* 淡い水色 */
    font-size: 1rem;
    font-family: sans-serif; /* メニューだけゴシック（視認性重視） */
    font-weight: 500;
}

.main-navigation a:hover {
    color: #3a70b2;          /* ホバー時は少し濃く */
    text-decoration: underline;
}

/* Aboutリンクのスタイル */
.main-navigation .about-link {
    position: absolute; /* 右上に固定 */
    right: 0;           /* 右端に配置 */
    top: -30px;         /* 上の線より少し上に配置 */
    font-size: 1rem;
    font-weight: 500;
    color: #999 !important; /* 薄いグレー */
    text-decoration: none;
}
.main-navigation .about-link:hover {
    text-decoration: underline;
    color: #666 !important;
}

/* =========================================
   5. コンテンツ（記事）
   ========================================= */
article {
    margin-bottom: 40px; /* 記事同士の間隔 */
}

/* 記事タイトル */
h1.entry-title {
    font-size: 2.0rem;   /* 大きすぎない適度なサイズ */
    font-weight: 700;
    line-height: 1.3;    /* 複数行時の行間 */
    margin-bottom: 15px; /* タイトルと線（日付）の間隔 */
}

h2.entry-title {
    font-size: 1.3rem; /* 一覧ページのタイトルを小さく */
    font-weight: 700;
    line-height: 1.4;
    margin: 5px 0 0 0; /* 日付とのバランス調整 */
}

h2.entry-title a {
    text-decoration: none;
    /* リンク色は下の共通設定 */
}

h2.entry-title a:hover {
    text-decoration: underline;
}

/* 日付などのメタ情報 */
.entry-meta {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 5px;
    font-family: monospace;
}

/* Vitalik風 記事詳細メタデータ（日付 + See all posts） */
.vitalik-meta-container {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #ccc;     
    border-bottom: none;            
    padding-top: 10px;
    padding-bottom: 0;
    margin-bottom: 50px;
    font-size: 1rem;
    color: #666;
}

.vitalik-meta-container .entry-meta {
    margin-bottom: 0;
}

.all-posts-link a {
    text-decoration: none;
    color: #5c90d2;
}
.all-posts-link a:hover {
    text-decoration: underline;
}

/* preタグ（整形済みテキスト）のはみ出し防止 */
pre {
    white-space: pre-wrap;
    word-wrap: break-word;
    max-width: 100%;
    overflow-x: auto;
    background-color: #f7f7f7;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
}

/* =========================================
   6. リンク全般のデザイン
   ========================================= */
a {
    color: #5c90d2;
    text-decoration: underline;
    transition: color 0.2s ease;
}

a:visited {
    color: #5c90d2;
}

a:hover {
    color: #3a70b2;
    background-color: transparent;
    text-decoration: none;
}

/* 不要な要素を隠す */
.screen-reader-text {
    display: none;
}

/* =========================================
   7. フッター（Vitalik風ミニマル設定）
   ========================================= */
.site-footer {
    background-color: #FFFFFF;
    color: #999999;
    text-align: center;
    padding: 60px 0;
    font-size: 0.85rem;
}

/* Flexboxで縦並びのアイテムの行間を一括管理 */
.footer-content-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px; /* 行間 */
}

.site-footer a {
    color: #999999;
    text-decoration: none;
}

.site-footer a:hover {
    color: #666666;
    text-decoration: underline;
}

/* =========================================
   8. モバイル・タブレット用レスポンシブ調整
   ========================================= */
@media screen and (max-width: 768px) {
    /* --- 全体の調整 --- */
    body {
        font-size: 16px; /* スマホでは本文を少し小さくして表示量を増やす */
    }

    #page {
        padding: 20px 15px; /* 画面端の余白を少し狭める */
    }

    /* --- ヘッダー周り --- */
    .site-header {
        margin-bottom: 40px; /* ヘッダー下の余白を詰める */
    }

    .site-title {
        font-size: 1.8rem; /* ブログタイトルを少し小さく */
    }

    /* メニューの行間を少し広げてタップしやすく */
    .main-navigation ul {
        gap: 15px 15px; 
    }
    
    /* Aboutリンクの位置微調整（スマホでもズレないように） */
    .main-navigation .about-link {
        top: -28px;       
        font-size: 0.9rem;
    }

    /* --- 記事周り --- */
    h1.entry-title {
        font-size: 1.6rem; /* 記事タイトルが巨大になりすぎないように */
        line-height: 1.3;
    }

    .vitalik-meta-container {
        /* スマホでも横並びを維持する設定（崩れる場合は column に変更可） */
        flex-direction: row; 
        font-size: 0.85rem;
        margin-bottom: 30px;
    }

    /* --- フッター --- */
    .site-footer {
        padding: 40px 0;
    }
}