/*
Theme Name: Miosync Terminal
Theme URI: https://www.miosync.link/
Author: Tamaki & Mamichi Iizumi
Author URI: https://www.miosync.link/
Description: AIと人の共生を表現するターミナル風カスタムテーマ
Version: 1.0.0
License: GPL v2 or later
Text Domain: miosync-terminal
*/

/* ========================================
   リセットとベース設定
======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* カラー変数 */
    --primary-green: #00ff00;
    --matrix-green: #0F0;
    --terminal-gray: #c0c0c0;
    --text-white: #ffffff;  /* 追加：白文字用 */
    --bg-black: #000000;
    --bg-terminal: rgba(0, 0, 0, 0.95);
    
    /* フォント設定 - シンプルにシステムフォント */
    --font-system: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-mono: monospace;  /* モノスペースはシンプルに */
    
    /* アニメーション */
    --typing-speed: 50ms;
    --blink-speed: 1s;
}

/* ========================================
   ベーススタイル
======================================== */
body {
    font-family: var(--font-system);
    background-color: var(--bg-black);
    color: var(--text-white);  /* 白文字に変更！ */
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

/* Matrix背景用キャンバス */
#matrix-rain {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.7;
}

/* ========================================
   レスポンシブコンテナ
======================================== */
.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
}

/* ========================================
   ヘッダー
======================================== */
.site-header {
    background: var(--bg-terminal);
    padding: 20px 0;
    position: relative;
    z-index: 1000;
    border-bottom: 2px solid var(--primary-green);
}

.site-logo {
    display: inline-block;
}

.site-logo img {
    height: 50px;
    width: auto;
}

.main-navigation {
    margin-top: 20px;
}

.main-navigation ul {
    list-style: none;
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}

.main-navigation a {
    color: var(--primary-green);
    text-decoration: none;
    position: relative;
    transition: all 0.3s ease;
}

.main-navigation a:hover {
    text-shadow: 0 0 10px var(--primary-green);
}

.main-navigation a::before {
    content: '> ';
    opacity: 0;
    transition: opacity 0.3s ease;
}

.main-navigation a:hover::before {
    opacity: 1;
}

/* ========================================
   ターミナル風エフェクト
======================================== */
.terminal-window {
    background: var(--bg-terminal);
    border: 1px solid var(--primary-green);
    border-radius: 5px;
    padding: 20px;
    margin: 20px 0;
    position: relative;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.3);
}

.terminal-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #333;
}

.terminal-buttons {
    display: flex;
    gap: 8px;
}

.terminal-button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.terminal-button.red { background: #ff5f56; }
.terminal-button.yellow { background: #ffbd2e; }
.terminal-button.green { background: #27c93f; }

.terminal-title {
    margin-left: auto;
    font-size: 14px;
    color: var(--terminal-gray);
}

.terminal-content {
    font-family: var(--font-mono);
    color: var(--text-white);  /* ターミナル内も白文字に */
}

/* カーソル点滅 */
.cursor {
    display: inline-block;
    width: 10px;
    height: 20px;
    background: var(--primary-green);
    animation: blink var(--blink-speed) step-end infinite;
    vertical-align: text-bottom;
    margin-left: 3px;
}

@keyframes blink {
    50% { opacity: 0; }
}

/* タイピングアニメーション */
.typing-text {
    overflow: hidden;
    white-space: nowrap;
    animation: typing 3s steps(40, end);
}

@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

/* ========================================
   メインコンテンツエリア
======================================== */
.main-content {
    padding: 40px 0;
    min-height: calc(100vh - 200px);
    color: var(--text-white);  /* メインコンテンツも白文字 */
}

/* ヒーローセクション */
.hero-section {
    padding: 80px 0;
    text-align: center;
}

.hero-title {
    font-size: clamp(2rem, 5vw, 4rem);
    color: var(--primary-green);
    margin-bottom: 20px;
    text-shadow: 0 0 20px rgba(0, 255, 0, 0.5);
}

.hero-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.5rem);
    color: var(--text-white);  /* サブタイトルも白に */
}

/* セクション共通 */
.content-section {
    margin: 60px 0;
}

.section-title {
    color: var(--primary-green);
    font-size: 1.5rem;  /* 2rem→1.5remに縮小 */
    margin-bottom: 30px;
    position: relative;
    padding-left: 20px;
}

.section-title::before {
    content: '>';
    position: absolute;
    left: 0;
    animation: blink 1s infinite;
}

/* グリッドレイアウト */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

/* カード */
.info-card {
    background: var(--bg-terminal);
    border: 1px solid var(--primary-green);
    padding: 20px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    color: var(--text-white);  /* カード内も白文字 */
}

.info-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 255, 0, 0.3);
}

.info-card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, transparent, var(--primary-green), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.info-card:hover::before {
    opacity: 0.3;
}

/* ========================================
   記事一覧
======================================== */
.post-list {
    list-style: none;
}

.post-item {
    margin-bottom: 30px;
    padding: 20px;
    background: var(--bg-terminal);
    border-left: 3px solid var(--primary-green);
    transition: all 0.3s ease;
}

.post-item:hover {
    padding-left: 30px;
    border-left-width: 5px;
}

.post-title {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.post-title a {
    color: var(--primary-green);
    text-decoration: none;
}

.post-meta {
    color: var(--text-white);  /* メタ情報も白に */
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.post-excerpt {
    color: var(--text-white);  /* 抜粋も白に */
}

/* ========================================
   フッター
======================================== */
.site-footer {
    background: var(--bg-terminal);
    padding: 40px 0 20px;
    border-top: 2px solid var(--primary-green);
    text-align: center;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
}

.copyright {
    color: var(--terminal-gray);
    font-size: 0.9rem;
}

/* ========================================
   レスポンシブ対応
======================================== */
@media (max-width: 768px) {
    .main-navigation ul {
        flex-direction: column;
        gap: 15px;
    }
    
    .hero-section {
        padding: 40px 0;
    }
    
    .grid-container {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
}

/* ========================================
   ユーティリティクラス
======================================== */
.text-green {
    color: var(--primary-green);
}

.text-center {
    text-align: center;
}

.mt-20 { margin-top: 20px; }
.mt-30 { margin-top: 30px; }
.mt-40 { margin-top: 40px; }
.mb-20 { margin-bottom: 20px; }
.mb-30 { margin-bottom: 30px; }
.mb-40 { margin-bottom: 40px; }

/* ========================================
   アニメーション
======================================== */
.fade-in {
    opacity: 0;
    animation: fadeIn 1s forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

.slide-in-left {
    transform: translateX(-50px);
    opacity: 0;
    animation: slideInLeft 0.8s forwards;
}

@keyframes slideInLeft {
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ========================================
   アクセシビリティ
======================================== */
.screen-reader-text {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* フォーカス時のアウトライン */
a:focus,
button:focus,
input:focus,
textarea:focus {
    outline: 2px solid var(--primary-green);
    outline-offset: 2px;
}

/* 投稿メタ情報を非表示 */
.entry-meta {
    display: none;
}

/* または特定の要素だけ非表示 */
.meta-date,
.meta-author,
.meta-category {
    display: none;
}