:root {
    --bg-color: #0a0a0a;
    --text-color: #f0f0f0;
    --accent-color: #fce4ec;
    --dim-color: #888888;
    --border-color: rgba(255, 255, 255, 0.1);
    --max-width: 900px;
    --link-color: #a0c0ff;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Noto Sans JP', sans-serif;
    line-height: 1.8;
    letter-spacing: 0.02rem;
    -webkit-font-smoothing: antialiased;
}

strong {
    color: #88d4c2;
    font-weight: 700;
}

em {
    color: #fff;
    font-size: 1em;
    font-style: italic;
}

.master-comment {
    color: #ffd080;
    font-style: italic;
}

/* Header & Logo */
header {
    padding: 0.8rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    background: rgba(10, 10, 10, 0.9);
    backdrop-filter: blur(10px);
    z-index: 1000;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    text-decoration: none;
}

.logo-area img {
    height: 44px;
    width: auto;
    display: block;
    opacity: 0.9;
    transition: opacity 0.3s ease;
}

.logo-img-link:hover img {
    opacity: 1;
}

.logo-area a {
    text-decoration: none;
    color: #fff;
    transition: color 0.3s;
}

.logo-area a:hover {
    color: var(--accent-color);
}

.logo-brand,
.logo-site {
    font-family: 'Inter', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.15rem;
    text-transform: uppercase;
    line-height: 1;
    color: #fff;
}

/* Header Navigation */
.header-nav {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.header-nav a {
    text-decoration: none;
    color: var(--text-color);
    font-size: 0.8rem;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    letter-spacing: 0.1rem;
    transition: color 0.3s;
}

.header-nav a:hover {
    color: var(--accent-color);
}

/* Language Switcher Dropdown */
.lang-switcher {
    position: relative;
    font-size: 0.75rem;
    font-family: 'Inter', 'Noto Sans JP', sans-serif;
    cursor: pointer;
    outline: none;
    width: 88px;
}

.lang-current {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    color: var(--text-color);
    padding: 0.5rem 0;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.02);
    transition: all 0.3s ease;
    font-weight: 500;
    line-height: 1;
    width: 100%;
}

.lang-current:hover,
.lang-switcher:focus-within .lang-current {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
}

.lang-current .arrow {
    font-size: 0.6rem;
    opacity: 0.7;
}

.lang-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    min-width: 140px;
    background: rgba(18, 18, 18, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    padding: 0.4rem 0;
    z-index: 1100;
}

.lang-dropdown::before {
    content: "";
    position: absolute;
    top: -0.6rem;
    left: 0;
    right: 0;
    height: 0.6rem;
    background: transparent;
}

.lang-switcher:hover .lang-dropdown,
.lang-switcher:focus-within .lang-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}


.lang-dropdown a {
    text-decoration: none;
    color: var(--dim-color);
    padding: 0.6rem 1rem;
    font-size: 0.75rem;
    transition: all 0.2s ease;
    text-align: left;
}

.lang-dropdown a:hover {
    color: var(--text-color);
    background: rgba(255, 255, 255, 0.05);
}

.lang-dropdown a.active {
    color: var(--accent-color);
    font-weight: 700;
}

/* Translation Notice Banner */
.translation-notice {
    padding: 1rem 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    border-left: 3px solid var(--accent-color);
    border-radius: 4px;
    margin-bottom: 2.5rem;
    font-size: 0.85rem;
    color: var(--dim-color);
}

/* Layout */
main {
    max-width: var(--max-width);
    margin: 4rem auto;
}

/* Blog List (Index Specific) */
.section-title {
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 0.85rem;
    color: var(--dim-color);
    letter-spacing: 0.2rem;
    margin-bottom: 4rem;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.section-title::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

/* Index Page Lead Text */
.page-lead {
    font-size: 0.95rem;
    color: var(--dim-color);
    line-height: 1.8;
    margin-bottom: 2.5rem;
    letter-spacing: 0.02rem;
}

.post-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.post-item {
    margin-bottom: 0;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    position: relative;
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 2rem;
    padding: 1.2rem;
    transition: background 0.3s ease, border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.post-link-title {
    text-decoration: none;
    color: inherit;
    border-bottom: none;
}

.post-link-title::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

.post-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: #1a1a1a;
    overflow: hidden;
    border-radius: 4px;
}

.post-list .post-image img {
    display: block;
    width: 100%;
    height: 100%;
    max-height: none;
    object-fit: cover;
    margin: 0;
    opacity: 0.8;
    transition: opacity 0.3s;
}

.post-item:hover .post-image img {
    opacity: 1;
}

.post-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.post-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.post-category {
    font-size: 0.65rem;
    color: var(--accent-color);
    letter-spacing: 0.1rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.post-date {
    font-size: 0.75rem;
    color: var(--dim-color);
}

.post-item h2 {
    font-size: 1.35rem;
    margin: 0 0 0.5rem 0;
    font-family: 'Shippori Antique', serif;
    font-weight: 500;
    line-height: 1.4;
    color: #fff;
    transition: color 0.3s ease;
}

.post-item:hover h2 {
    color: var(--accent-color);
}

.post-item .post-excerpt {
    font-size: 0.8rem;
    color: var(--dim-color);
    line-height: 1.5;
    margin: 0.5rem 0 0 0;
}

/* Article Styles (20260515_ai_agent_cms logic) */
.article-header {
    display: flex;
    gap: 3.5rem;
    align-items: flex-start;
    margin-bottom: 3.5rem;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.06);
    border-bottom: 1px solid var(--border-color);
}

.article-header img.post-eyecatch {
    width: 180px;
    height: 180px;
    object-fit: cover;
    border-radius: 4px;
    background: #1a1a1a;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    order: 2;
    align-self: center;
}

.post-meta {
    flex: 1;
}

.post-meta a.category,
a.category {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1rem;
    text-decoration: none;
    border: 1px solid transparent;
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
    line-height: 1.2;
    border-bottom: 1px solid transparent !important;
}

/* 2. 各カテゴリの個別定義（バッジ） */
a.category-ai { background-color: rgba(0, 188, 212, 0.12) !important; color: #00e5ff !important; border-color: rgba(0, 188, 212, 0.35) !important; }
a.category-news { background-color: rgba(255, 193, 7, 0.12) !important; color: #ffd740 !important; border-color: rgba(255, 193, 7, 0.35) !important; }
a.category-dev { background-color: rgba(46, 204, 113, 0.12) !important; color: #2ecc71 !important; border-color: rgba(46, 204, 113, 0.35) !important; }
a.category-columns { background-color: rgba(230, 184, 194, 0.12) !important; color: #ffb7c5 !important; border-color: rgba(230, 184, 194, 0.35) !important; }
a.category-other { background-color: rgba(113, 105, 122, 0.12) !important; color: #e0e0e0 !important; border-color: rgba(113, 105, 122, 0.35) !important; }

/* ホバー時の透過度調整（バッジ） */
a.category-ai:hover { background-color: rgba(0, 188, 212, 0.25) !important; color: #fff !important; border-color: rgba(0, 188, 212, 0.6) !important; }
a.category-news:hover { background-color: rgba(255, 193, 7, 0.25) !important; color: #fff !important; border-color: rgba(255, 193, 7, 0.6) !important; }
a.category-dev:hover { background-color: rgba(46, 204, 113, 0.25) !important; color: #fff !important; border-color: rgba(46, 204, 113, 0.6) !important; }
a.category-columns:hover { background-color: rgba(230, 184, 194, 0.25) !important; color: #fff !important; border-color: rgba(230, 184, 194, 0.6) !important; }
a.category-other:hover { background-color: rgba(113, 105, 122, 0.25) !important; color: #fff !important; border-color: rgba(113, 105, 122, 0.6) !important; }

/* 3. 記事ヘッダーカードのボーダー（プランA: フルフレーム） */
.article-header {
    border: 1px solid rgba(255, 255, 255, 0.1); /* デフォルト */
    border-radius: 8px; /* 角丸追加でモダンに */
}
.article-header.header-ai { border-color: rgba(0, 188, 212, 0.25); }
.article-header.header-news { border-color: rgba(255, 193, 7, 0.25); }
.article-header.header-dev { border-color: rgba(46, 204, 113, 0.25); }
.article-header.header-columns { border-color: rgba(230, 184, 194, 0.25); }
.article-header.header-other { border-color: rgba(113, 105, 122, 0.25); }

/* 4. 一覧ページのカード（.post-item）のボーダー */
/* 通常時は少し控えめに、ホバー時に鮮やかに光る設計 */
.post-item.card-ai { border-color: rgba(0, 188, 212, 0.15); }
.post-item.card-ai:hover { border-color: rgba(0, 188, 212, 0.5); box-shadow: 0 10px 30px rgba(0, 188, 212, 0.1); }

.post-item.card-news { border-color: rgba(255, 193, 7, 0.15); }
.post-item.card-news:hover { border-color: rgba(255, 193, 7, 0.5); box-shadow: 0 10px 30px rgba(255, 193, 7, 0.1); }

.post-item.card-dev { border-color: rgba(46, 204, 113, 0.15); }
.post-item.card-dev:hover { border-color: rgba(46, 204, 113, 0.5); box-shadow: 0 10px 30px rgba(46, 204, 113, 0.1); }

.post-item.card-columns { border-color: rgba(230, 184, 194, 0.15); }
.post-item.card-columns:hover { border-color: rgba(230, 184, 194, 0.5); box-shadow: 0 10px 30px rgba(230, 184, 194, 0.1); }

.post-item.card-other { border-color: rgba(113, 105, 122, 0.15); }
.post-item.card-other:hover { border-color: rgba(113, 105, 122, 0.5); box-shadow: 0 10px 30px rgba(113, 105, 122, 0.1); }

.meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.2rem;
    margin-bottom: 0.8rem;
}

.post-item .meta-row {
    margin-bottom: 0.35rem;
}

/* Breadcrumbs */
.breadcrumbs {
    font-size: 0.7rem;
    color: var(--dim-color);
    margin-bottom: 1.5rem;
    display: flex;
    gap: 0.1rem;
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.05rem;
    align-items: center;
    padding: 0 2rem;
}

.breadcrumbs a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s;
    border-bottom: 1px solid transparent;
}

.breadcrumbs a:hover {
    color: var(--accent-color);
    border-bottom-color: var(--accent-color);
}

.breadcrumbs span.separator {
    color: var(--accent-color);
    opacity: 0.8;
    font-size: 0.6rem;
    margin: 0 0.5rem;
    font-weight: 700;
}

.breadcrumbs span.current {
    color: var(--text-color);
    font-weight: 700;
}

/* Footer Section */
footer {
    margin-top: 5rem;
    padding: 8rem 2rem;
    border-top: 1px solid var(--border-color);
    text-align: center;
    width: 100%;
}

footer .footer-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4rem;
    margin-bottom: 3rem;
    list-style: none;
}

footer .footer-nav a {
    color: var(--dim-color);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.2s;
    letter-spacing: 0.15rem;
    text-transform: uppercase;
}

footer .footer-nav a:hover {
    color: #fff;
}

footer .copyright {
    font-size: 0.75rem;
    color: var(--dim-color);
    letter-spacing: 0.05rem;
    opacity: 0.5;
}

.post-meta h1,
h1 {
    font-family: 'Shippori Antique', serif;
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.35;
    color: #fff;
    letter-spacing: 0.05rem;
}

.author-info {
    display: flex;
    gap: 2rem;
    font-size: 0.85rem;
    color: var(--dim-color);
    align-items: center;
}

.content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.8);
    padding: 0 2rem;
}

.content p {
    margin-bottom: 3rem;
    text-align: justify;
}

.content ul {
    margin: 1.5rem 0 3rem 2rem;
    padding: 0;
}

.content li {
    margin-bottom: 0.8rem;
    line-height: 1.8;
}

.content li:last-child {
    margin-bottom: 0;
}

.content>h2 {
    font-family: 'Shippori Mincho', serif;
    font-size: 1.5rem;
    margin: 5.5rem 0 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
    color: #fff;
    scroll-margin-top: 80px;
}

.content h3 {
    font-size: 1.2rem;
    margin: 2.5rem 0 1.7rem;
    color: #c2d18c;
    scroll-margin-top: 100px;
}

.content p.image-caption {
    text-align: center;
    font-size: 0.85rem;
    color: var(--dim-color);
    margin-bottom: 0.75rem !important;
}

.content img {
    max-height: 240px;
    width: auto;
    display: block;
    margin: 0.5rem auto;
    border-radius: 4px;
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    transform-origin: center center;
}

.content a.image-zoom {
    display: block;
    border-bottom: none !important;
    position: relative;
    z-index: 1;
}

.content a {
    color: var(--link-color);
    text-decoration: none;
    border-bottom: 1px solid rgba(160, 192, 255, 0.3);
    transition: all 0.3s;
}

.content a:hover {
    color: #fff;
    border-bottom-color: #fff;
}

.lead {
    font-size: 1.2rem;
    color: #fff;
    line-height: 2.1;
    margin-bottom: 5rem;
    font-family: 'Shippori Mincho', serif;
    font-weight: 400;
    opacity: 0.95;
}

.quote-box {
    margin: 4rem 0;
    padding: 2rem 2.5rem;
    border-left: 4px solid var(--accent-color);
    background: rgba(255, 255, 255, 0.03);
    font-family: 'Shippori Mincho', serif;
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text-color);
    font-style: italic;
}

/* About & Profile */
.info-section {
    max-width: var(--max-width);
    margin: 2rem auto 0;
    padding: 2rem 2rem 0;
    border-top: 1px solid var(--border-color);
}

.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4.5rem;
}

.info-box h3 {
    font-size: 0.85rem;
    color: var(--accent-color);
    letter-spacing: 0.2rem;
    margin-bottom: 0.4rem;
}

.info-box h3 span {
    color: var(--dim-color);
    letter-spacing: 0.05rem;
    font-weight: 500;
    margin-left: 0.2rem;
}

.info-box p {
    font-size: 0.95rem;
    color: var(--dim-color);
    line-height: 1.9;
}

.x-icon {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 20px;
    height: 20px;
    background: rgba(255, 255, 255, 0.12);
    color: #c7c7c7;
    border-radius: 4px;
    font-weight: bold;
    text-decoration: none;
    font-family: Arial, sans-serif;
    font-size: 0.8rem;
    line-height: 0;
    /* 行高をゼロにして文字の中心を合わせやすくします */
    margin-left: 0.5rem;
    vertical-align: middle;
    transition: background 0.2s;
}

.x-icon:hover {
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
}

/* Share & Navigation */
.share-section {
    margin: 4rem auto 0;
    padding-top: 1rem;
    border-top: 1px dashed rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.share-section .share-label {
    display: block;
    font-size: 0.75rem;
    color: var(--dim-color);
    letter-spacing: 0.15rem;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.share-button {
    display: inline-block;
    background-color: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-color);
    padding: 0.6rem 2rem;
    border-radius: 2rem;
    text-decoration: none;
    font-size: 0.8rem;
    letter-spacing: 0.1rem;
    transition: all 0.3s;
}

.share-button:hover {
    border-color: var(--link-color);
    color: var(--link-color);
    background: rgba(160, 192, 255, 0.05);
}

/* Table of Contents */
.minimal-toc {
    margin: 0.5rem 0 2rem;
    padding: 0 0 0 3rem;
}

.minimal-toc-title {
    display: block;
    font-size: 0.7rem;
    color: var(--dim-color);
    margin-bottom: 0.3rem;
    letter-spacing: 0.15rem;
    text-transform: uppercase;
}

.minimal-toc ul {
    list-style: disc;
    padding-left: 1.2rem;
    margin: 0;
}

.content .minimal-toc li {
    margin-bottom: 0.2rem;
    line-height: 1.4;
}

.minimal-toc a {
    color: #8da6cc;
    ;
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.3s;
}

.minimal-toc a:hover {
    color: var(--link-color);
}

.post-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 2.5rem;
    padding: 2rem 2rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-item {
    flex: 1;
}

.nav-item.next {
    text-align: right;
}

.nav-label {
    display: block;
    font-size: 0.6rem;
    color: var(--dim-color);
    letter-spacing: 0.1rem;
    margin-bottom: 0.5rem;
}

.nav-title {
    font-size: 0.9rem;
    color: var(--text-color);
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s;
}

.nav-title:hover {
    color: var(--accent-color);
    border-bottom-color: var(--accent-color);
}

/* Page Header (Index & Categories) */
.page-header {
    max-width: var(--max-width);
    margin: 0 auto 3rem;
    padding: 0 2rem;
}

.page-header h1 {
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    color: #fff;
    letter-spacing: 0.05rem;
    margin: 0;
}

/* Responsive */
@media (max-width: 800px) {
    .post-item {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .info-grid {
        grid-template-columns: 1fr;
        gap: 4rem;
    }

    .article-header {
        flex-direction: column;
        gap: 2rem;
    }

    .post-meta h1,
    h1 {
        font-size: 2rem;
    }
}

/* Footer RSS (Subtle, low-contrast, minimal layout) */
.footer-rss {
    text-align: center;
    margin: 1.2rem 0 0.8rem 0;
    font-size: 0.7rem;
    font-family: 'Inter', sans-serif;
    letter-spacing: 0.05rem;
}

.footer-rss a {
    color: var(--dim-color);
    opacity: 0.25;
    /* Blends quietly with the dark background */
    text-decoration: none;
    transition: opacity 0.3s, color 0.3s;
}

.footer-rss a:hover {
    opacity: 0.75;
    color: var(--link-color);
}

/* Responsive Enhancements for Blog Header */
@media (max-width: 1024px) {

    /* Tablet / iPad Adjustments to prevent multi-line wrapping */
    header {
        padding: 0.8rem 5%;
    }

    .logo-area img {
        height: 48px;
    }

    .logo-brand,
    .logo-site {
        font-size: 1.1rem;
    }

    .header-nav {
        gap: 1rem;
    }

    .header-nav a {
        font-size: 0.7rem;
    }
}

@media (max-width: 767px) {

    /* Mobile Adjustments - hide navigation links for simplicity */
    header {
        padding: 0.6rem 5%;
    }

    .logo-area img {
        height: 40px;
    }

    .header-nav {
        display: none !important;
    }

    .logo-brand,
    .logo-site {
        font-size: 1rem;
    }
}