/* Reset & Base Variables */
:root {
    --bg-main: #ffffff;
    --bg-sub: #f8fafc;
    --bg-card: #ffffff;
    --text-primary: #0f172a;
    --text-secondary: #334155;
    --text-muted: #64748b;
    
    /* Brand Colors */
    --blue-primary: #0284c7;
    --blue-hover: #0369a1;
    --blue-dark: #1e3a8a;
    --blue-light: #e0f2fe;
    
    --orange-primary: #f97316;
    --orange-hover: #ea580c;
    --orange-light: #ffedd5;
    
    --linkedin-blue: #0a66c2;
    --linkedin-hover: #004182;

    --border-color: #e2e8f0;
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 12px 32px rgba(15, 23, 42, 0.12);

    --font-family: 'Plus Jakarta Sans', 'Noto Sans JP', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

/* Navbar */
.navbar {
    position: sticky;
    top: 0;
    background: var(--blue-primary);
    border-bottom: 3px solid var(--orange-primary);
    z-index: 100;
    box-shadow: var(--shadow-md);
}

.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 1rem 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    text-decoration: none;
    display: flex;
    flex-direction: column;
}

.logo-name {
    font-weight: 850;
    font-size: 1.3rem;
    letter-spacing: -0.5px;
    color: #ffffff;
}

.logo-sub-name {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--blue-light);
    margin-top: 0.1rem;
}

/* Featured Section */
.featured-section {
    background: linear-gradient(135deg, #f0f9ff 0%, #fff7ed 100%);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.featured-header h3 {
    font-size: 0.95rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.featured-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.featured-card {
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    padding: 0.85rem;
    border: 1px solid var(--border-color);
    display: flex;
    gap: 0.85rem;
    align-items: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.featured-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.featured-img {
    width: 80px;
    height: 60px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
}

.featured-info {
    overflow: hidden;
}

.featured-tag {
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--orange-primary);
    text-transform: uppercase;
}

.featured-title {
    font-size: 0.88rem;
    font-weight: 700;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.featured-date {
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* Main Layout Grid */
.section-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 1.5rem 3rem 3rem;
}

.main-page-title {
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.section-desc {
    color: var(--text-muted);
    font-size: 0.88rem;
    margin-top: 0.1rem;
}

/* Layout Wrapper */
.layout-wrapper {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 2rem;
    align-items: start;
}

.main-column {
    min-width: 0;
}

/* Right Sidebar Column */
.right-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    position: sticky;
    top: 5.5rem;
}

.sidebar-widget {
    background: var(--bg-sub);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.1rem;
    box-shadow: var(--shadow-sm);
}

.widget-title {
    font-size: 0.95rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--text-primary);
}

.widget-desc {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

/* PB & Records Widget */
.pb-list {
    list-style: none;
    font-size: 0.82rem;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.pb-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 0.35rem;
    border-bottom: 1px dashed var(--border-color);
}

.pb-list li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.pb-label {
    color: var(--text-secondary);
    font-weight: 600;
}

.pb-value {
    font-weight: 700;
    font-size: 0.75rem;
    padding: 0.15rem 0.45rem;
    border-radius: 4px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
}

/* Tag Cloud (Hashtags) */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    max-height: 220px;
    overflow-y: auto;
    padding-right: 0.2rem;
}

.tag-btn {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 0.25rem 0.55rem;
    border-radius: 99px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
}

.tag-btn:hover {
    border-color: var(--blue-primary);
    color: var(--blue-primary);
    background: var(--blue-light);
}

.tag-btn.active {
    background: var(--blue-primary);
    color: #ffffff;
    border-color: var(--blue-primary);
}

/* Year List */
.year-list {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    max-height: 200px;
    overflow-y: auto;
}

.year-btn {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 0.4rem 0.7rem;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
}

.year-btn:hover {
    border-color: var(--blue-primary);
    color: var(--blue-primary);
}

.year-btn.active {
    background: var(--blue-primary);
    color: #ffffff;
    border-color: var(--blue-primary);
}

.year-count {
    font-size: 0.7rem;
    opacity: 0.8;
}

/* Filter Group */
.filter-group {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.filter-btn {
    background: var(--bg-sub);
    border: 1px solid var(--border-color);
    padding: 0.35rem 0.75rem;
    border-radius: 99px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-btn:hover {
    background: #e2e8f0;
}

.filter-btn.active {
    background: var(--blue-primary);
    color: #ffffff;
    border-color: var(--blue-primary);
}

/* Log Cards Grid */
.log-cards-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.log-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    cursor: pointer;
}

.log-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.card-img-wrapper {
    position: relative;
    height: 170px;
}

.card-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-category {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 700;
    color: #ffffff;
}

.race-category { background: var(--blue-primary); }
.coffee-category { background: #78350f; }
.vvaren-category { background: var(--orange-primary); }

.card-content {
    padding: 1.25rem;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-bottom: 0.35rem;
}

.card-title {
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 0.4rem;
    color: var(--text-primary);
}

.card-excerpt {
    font-size: 0.82rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-tags-row {
    display: flex;
    gap: 0.3rem;
    flex-wrap: wrap;
    margin-top: 0.4rem;
}

.card-tag-pill {
    background: var(--bg-sub);
    color: var(--blue-primary);
    font-size: 0.68rem;
    font-weight: 600;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
}

/* 
   ==========================================================================
   Premium Article Detail View Layout (詳細ページの統一感とリッチデザイン)
   ==========================================================================
*/
#detail-view-area {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2rem 2.5rem;
    box-shadow: var(--shadow-sm);
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    text-decoration: none;
    color: var(--blue-primary);
    font-weight: 700;
    font-size: 0.88rem;
    margin-bottom: 1.5rem;
    transition: color 0.2s ease;
}

.back-btn:hover {
    color: var(--blue-hover);
}

.article-hero-img {
    width: 100%;
    height: 360px;
    object-fit: cover;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.article-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.category-badge {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 800;
    color: #ffffff;
    background: var(--blue-primary);
    margin-bottom: 1rem;
}

.article-title {
    font-size: 1.85rem;
    font-weight: 900;
    line-height: 1.35;
    margin: 0.5rem 0 1rem;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.article-tags {
    display: flex;
    gap: 0.35rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

/* 過去記事本文のプレミアムデザイン・タイポグラフィ */
.actual-content {
    font-size: 1.05rem;
    line-height: 1.85;
    color: #334155;
    word-break: break-word;
}

.actual-content p {
    margin-bottom: 1.5rem;
}

.actual-content h2 {
    font-size: 1.35rem;
    font-weight: 800;
    margin: 2.25rem 0 1rem;
    color: var(--text-primary);
    border-left: 4px solid var(--blue-primary);
    padding-left: 0.75rem;
    line-height: 1.35;
}

.actual-content h3 {
    font-size: 1.15rem;
    font-weight: 800;
    margin: 1.75rem 0 0.8rem;
    color: var(--text-primary);
}

.actual-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    margin: 1.5rem 0;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.actual-content ul, .actual-content ol {
    padding-left: 1.5rem;
    margin-bottom: 1.5rem;
}

.actual-content li {
    margin-bottom: 0.5rem;
}

.actual-content blockquote {
    border-left: 4px solid var(--border-color);
    padding-left: 1rem;
    margin-left: 0;
    color: var(--text-muted);
    font-style: italic;
    margin-bottom: 1.5rem;
}

/* 記事本文中のリンク用プレミアムデザイン */
.actual-content a {
    color: var(--blue-primary);
    text-decoration: underline;
    font-weight: 600;
    transition: color 0.15s ease;
}

.actual-content a:hover {
    color: var(--blue-hover);
}

/* ========================================================================== */

/* Quick Post Demo Section */
.quick-demo-section {
    background: linear-gradient(180deg, var(--bg-sub) 0%, var(--bg-main) 100%);
    padding: 3rem 0;
}

.demo-box {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 2.5rem 3rem;
    border: 2px solid var(--orange-light);
    box-shadow: var(--shadow-lg);
}

.demo-header {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 2rem;
}

.demo-interactive-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.demo-input-card {
    background: #fafafa;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.card-header-bar {
    background: #e2e8f0;
    padding: 0.6rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}
.dot.red { background: #ef4444; }
.dot.yellow { background: #f59e0b; }
.dot.green { background: #10b981; }

.bar-title {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    margin-left: 0.5rem;
}

.demo-form {
    padding: 1.25rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
    color: var(--text-secondary);
}

.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 0.6rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-family: var(--font-family);
    font-size: 0.9rem;
}

.btn-primary {
    width: 100%;
    background: var(--orange-primary);
    color: #ffffff;
    border: none;
    padding: 0.8rem;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background 0.2s ease;
}

.btn-primary:hover {
    background: var(--orange-hover);
}

.demo-preview-card {
    background: var(--bg-sub);
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
}

.preview-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 1rem;
    text-transform: uppercase;
}

/* Footer */
.footer {
    border-top: 3px solid var(--orange-primary);
    padding: 3rem 3rem;
    background: var(--blue-primary);
    color: #ffffff;
}

.footer-container {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.footer-brand p {
    color: var(--blue-light);
    font-size: 0.85rem;
}

.linkedin-footer-btn {
    background: #ffffff;
    color: var(--linkedin-blue);
    padding: 0.5rem 1.2rem;
    border-radius: 99px;
    font-size: 0.88rem;
    font-weight: 800;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: all 0.2s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.linkedin-footer-btn:hover {
    background: var(--orange-light);
    color: var(--orange-primary);
    transform: translateY(-1px);
}

.footer-copy {
    font-size: 0.8rem;
    color: var(--blue-light);
    width: 100%;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 1rem;
    margin-top: 1rem;
}

/* Responsive Rules */
@media (max-width: 992px) {
    .nav-container, .section-container, .footer {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }

    .layout-wrapper {
        grid-template-columns: 1fr;
    }

    .featured-grid {
        grid-template-columns: 1fr;
    }

    .right-sidebar {
        position: static;
        order: 2;
    }

    .tag-cloud, .year-list {
        max-height: none;
    }

    .year-list {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .log-cards-grid, .demo-interactive-grid {
        grid-template-columns: 1fr;
    }
}
