/* 
 * Pattern 13: Pop Brutalist
 * Concept: Brutalist Shapes (12) + Pop Colors (11) + Modern Fonts
 * The "Balanced" Version
 */

:root {
    --color-bg: #ffffff;
    --color-text: #1a1a1a;
    --color-border: #000000;

    /* Pop Colors from Pattern 11 */
    --color-self: #ff9f1c;
    /* Orange */
    --color-biz: #2ec4b6;
    /* Teal */
    --color-life: #ff6b6b;
    /* Salmon */
    --color-accent: #ffbf69;

    --border-thick: 3px solid #000;

    --shadow-hard: 6px 6px 0px #000000;
    --shadow-hover: 3px 3px 0px #000000;

    /* Modern Fonts */
    --font-display: 'Outfit', sans-serif;
    --font-body: 'Noto Sans JP', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-body);
    line-height: 1.6;
    font-size: 16px;
    overflow-x: hidden;
    /* Prevent horizontal scroll */
}

a {
    text-decoration: none;
    color: inherit;
}

/* Layout */
.layout-wrapper {
    /* display: flex; REMOVED: Block layout handles fixed sidebar + margin better */
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 300px;
    background: #fff;
    border-right: var(--border-thick);
    padding: 30px;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 100;
    overflow-y: auto;
}

.sidebar-header {
    margin-bottom: 40px;
}

.logo {
    font-family: var(--font-display);
    font-weight: 900;
    line-height: 1;
    text-transform: uppercase;
}

.logo a {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    width: 100%;
}

.logo-sub {
    font-size: 1.5rem;
    line-height: 1.2;
    display: block;
    width: 100%;
    text-align: justify;
    text-align-last: justify;
}

.logo-main {
    font-size: 2.8rem;
    line-height: 1;
    display: block;
    color: var(--color-text);
    width: 100%;
    text-align: justify;
    text-align-last: justify;
    /* Impact styling */
    text-shadow: 2px 2px 0 var(--color-accent);
}

.user-id {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1rem;
    margin-top: 5px;
    color: var(--color-text);
}

.nav-links {
    list-style: none;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.nav-item {
    display: block;
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 1.8rem;
    text-transform: uppercase;
    border: var(--border-thick);
    padding: 10px 15px;
    background: #fff;
    transition: 0.1s;
}

.nav-item:hover,
.nav-item.active {
    background: var(--color-text);
    color: #fff;
    transform: translate(-3px, -3px);
    box-shadow: 3px 3px 0 var(--color-accent);
}

.search-box {
    margin-top: 20px;
    padding-top: 20px;
    border-top: var(--border-thick);
}

.search-form {
    display: flex;
    gap: 5px;
}

.search-input {
    flex: 1;
    padding: 10px;
    border: var(--border-thick);
    font-family: var(--font-body);
    font-size: 1rem;
    outline: none;
    transition: 0.1s;
}

.search-input:focus {
    box-shadow: var(--shadow-hover);
    transform: translate(-2px, -2px);
}

.search-btn {
    background: var(--color-text);
    color: #fff;
    border: var(--border-thick);
    cursor: pointer;
    padding: 10px 20px;
    font-weight: 900;
    font-family: var(--font-display);
    font-size: 1rem;
    transition: 0.1s;
    white-space: nowrap;
}

.search-btn:hover {
    background: var(--color-accent);
    color: var(--color-text);
    transform: translate(-2px, -2px);
    box-shadow: var(--shadow-hover);
}

.sidebar-footer {
    font-family: var(--font-display);
    font-weight: 900;
    border-top: var(--border-thick);
    padding-top: 20px;
    font-size: 1rem;
}

.sidebar-footer > div {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.2);
    font-size: 0.85rem;
    font-weight: 400;
}

.sidebar-footer > div p {
    margin-bottom: 10px;
}

.sidebar-footer > div a {
    color: var(--color-text);
    text-decoration: none;
    transition: 0.1s;
}

.sidebar-footer > div a:hover {
    color: var(--color-biz);
    text-decoration: underline;
}

.sidebar-footer > div p:last-child {
    color: #666;
    font-size: 0.8rem;
    line-height: 1.5;
    margin-bottom: 0;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 300px;
    padding: 30px;
}

/* Breadcrumb */
.breadcrumb {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 30px;
    padding: 10px 15px;
    background: #f5f5f5;
    border: var(--border-thick);
}

.breadcrumb a {
    color: var(--color-biz);
    text-decoration: underline;
}

.breadcrumb a:hover {
    background: var(--color-biz);
    color: #fff;
}

.breadcrumb-separator {
    margin: 0 10px;
    color: #999;
}

/* Top Header */
.top-header {
    margin-bottom: 40px;
}

.marquee-container {
    background: var(--color-text);
    color: #fff;
    padding: 10px 0;
    border: var(--border-thick);
    overflow: hidden;
    white-space: nowrap;
}

.marquee-text {
    display: inline-block;
    animation: marquee 30s linear infinite;
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 1.2rem;
    white-space: nowrap;
    padding-right: 50px;
}

@keyframes marquee {
    0% {
        transform: translateX(0%);
    }

    100% {
        transform: translateX(-100%);
    }
}

/* Masonry Grid */
.masonry-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
}

.masonry-item {
    width: calc(25% - 22.5px);
    margin-bottom: 0;
}

.card {
    display: block;
    position: relative;
    /* Added for absolute positioning of badges/stickers */
    background: #fff;
    border: var(--border-thick);
    box-shadow: var(--shadow-hard);
    transition: 0.1s;
}

.card:hover {
    transform: translate(3px, 3px);
    box-shadow: var(--shadow-hover);
}

.card-image-wrapper {
    position: relative;
    border-bottom: var(--border-thick);
    overflow: hidden;
}

.card-image {
    background: #eee;
    background-size: cover !important;
    background-position: center !important;
    aspect-ratio: 3/2;
    width: 100%;
}

.placeholder-hero {
    background: var(--color-accent);
}

.placeholder-biz {
    background: var(--color-biz);
}

.placeholder-life {
    background: var(--color-life);
}

.placeholder-self {
    background: var(--color-self);
}

.placeholder-life-tall {
    background: var(--color-life);
}

.placeholder-biz-tall {
    background: var(--color-biz);
}

.placeholder-self-tall {
    background: var(--color-self);
}

.sticker {
    position: absolute;
    top: 5px;
    right: 5px;
    background: var(--color-self);
    color: #fff;
    font-family: var(--font-display);
    font-weight: 900;
    padding: 10px;
    border: var(--border-thick);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    transform: rotate(15deg);
    z-index: 20;
}

.card-content {
    padding: 20px;
}

.card-tags {
    margin-bottom: 10px;
}

.tag {
    display: inline-block;
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 0.8rem;
    padding: 4px 10px;
    border: var(--border-thick);
    color: #fff;
    text-transform: uppercase;
}

.tag-self {
    background: var(--color-self);
}

.tag-biz {
    background: var(--color-biz);
}

.tag-life {
    background: var(--color-life);
}

.card-title {
    font-size: 1.3rem;
    font-weight: 900;
    margin-bottom: 10px;
    line-height: 1.3;
}

.card-desc {
    font-size: 0.9rem;
    margin-bottom: 15px;
    font-weight: 700;
    color: #555;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 0.9rem;
    border-top: var(--border-thick);
    padding-top: 10px;
}

.quote-card {
    background: var(--color-accent);
    color: var(--color-text);
    text-align: center;
}

.quote-text {
    font-weight: 900;
    font-size: 1.3rem;
    margin-bottom: 10px;
}

/* Detail Page */
.article-view {
    display: flex;
    justify-content: center;
}

.article-container {
    max-width: 900px;
    width: 100%;
    background: #fff;
    /* border: var(--border-thick); */
    /* padding: 40px; */
    /* box-shadow: var(--shadow-hard); */
}

.post-header {
    margin-bottom: 40px;
    border-bottom: var(--border-thick);
    padding-bottom: 20px;
    text-align: left;
}

.header-meta {
    display: flex;
    justify-content: left;
    gap: 20px;
    margin-bottom: 20px;
    font-family: var(--font-display);
    font-weight: 900;
}

.entry-title {
    font-size: 3rem;
    font-weight: 900;
    line-height: 1.1;
}

.post-visual {
    background: var(--color-self);
    color: #fff;
    border: var(--border-thick);
    margin-bottom: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 3/2;
    width: 100%;
    /* max-height: 500px; */
    background-size: cover !important;
    background-position: center !important;
}

.visual-text {
    font-family: var(--font-display);
    font-size: 3rem;
    font-weight: 900;
}

.post-content {
    font-size: 1.1rem;
}

.lead {
    font-weight: 700;
    margin-bottom: 40px;
    font-size: 1.3rem;
}

.brutal-hr {
    border: none;
    border-top: var(--border-thick);
    margin: 40px 0;
}

.post-content h2:not(.section-title) {
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 900;
    background: var(--color-text);
    color: #fff;
    display: inline-block;
    padding: 5px 15px;
    margin: 50px 0 25px;
    /* transform: rotate(-1deg); */
}

.post-content h2:not(.section-title):first-of-type {
    margin-top: 0;
}

.highlight {
    background: var(--color-accent);
    padding: 0 5px;
    border: 2px solid var(--color-text);
}

.quote-box {
    border: var(--border-thick);
    padding: 40px;
    font-size: 1.8rem;
    font-weight: 900;
    text-align: center;
    margin: 40px 0;
    background: var(--color-biz);
    color: #fff;
    box-shadow: var(--shadow-hard);
}

.brutal-list {
    list-style: square;
    padding-left: 40px;
    font-size: 1.3rem;
    font-weight: 700;
    margin-top: 20px;
}

.post-footer {
    text-align: center;
    margin-top: 60px;
    padding-top: 40px;
    border-top: var(--border-thick);
}

.btn-action {
    display: inline-block;
    background: var(--color-text);
    color: #fff;
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 1.2rem;
    padding: 15px 50px;
    border: var(--border-thick);
    box-shadow: var(--shadow-hard);
    transition: 0.1s;
}

.btn-action:hover {
    background: #fff;
    color: var(--color-text);
}

.search-form {
    display: flex;
    gap: 5px;
}

.search-input {
    width: 100%;
    padding: 10px;
    border: var(--border-thick);
    font-family: var(--font-body);
    font-size: 1rem;
    outline: none;
    transition: 0.1s;
    flex: 1;
}

.search-input:focus {
    box-shadow: var(--shadow-hover);
    transform: translate(-2px, -2px);
}

.search-btn {
    background: var(--color-text);
    color: #fff;
    border: var(--border-thick);
    cursor: pointer;
    padding: 0 15px;
    font-weight: 900;
    font-family: var(--font-display);
    transition: 0.1s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-btn:hover {
    background: var(--color-accent);
    color: var(--color-text);
}

/* Markdown Content Styles */
.post-content>*:first-child {
    margin-top: 0;
}

.post-content h1 {
    font-size: 2.2rem;
    border-bottom: var(--border-thick);
    padding-bottom: 10px;
    margin: 60px 0 30px;
}

.post-content h3 {
    font-size: 1.5rem;
    border-left: 10px solid var(--color-accent);
    padding-left: 15px;
    margin: 40px 0 20px;
}

.post-content h4 {
    font-size: 1.3rem;
    font-weight: 900;
    margin: 30px 0 15px;
}

.post-content p {
    margin-bottom: 1.5em;
    line-height: 1.8;
}

.post-content strong {
    background: linear-gradient(transparent 60%, var(--color-accent) 60%);
    font-weight: 900;
}

.post-content em {
    font-style: italic;
    background: #eee;
    padding: 0 5px;
}

.post-content a {
    color: var(--color-biz);
    text-decoration: underline;
    text-decoration-thickness: 2px;
    font-weight: 700;
}

.post-content a:hover {
    background: var(--color-biz);
    color: #fff;
    text-decoration: none;
}

.post-content ul,
.post-content ol {
    margin-bottom: 1.5em;
    padding-left: 2em;
    border: var(--border-thick);
    padding: 20px 20px 20px 40px;
    background: #fff;
    box-shadow: 4px 4px 0 #eee;
}

.post-content li {
    margin-bottom: 0.5em;
    font-weight: 700;
}

.post-content li::marker {
    color: var(--color-text);
    font-weight: 900;
}

.post-content blockquote {
    border: var(--border-thick);
    padding: 30px;
    margin: 40px 0;
    background: var(--color-biz);
    /* color: #fff; */
    font-size: 1.1rem;
    font-weight: 700;
    box-shadow: var(--shadow-hard);
    position: relative;
}

.post-content blockquote::before {
    content: "“";
    font-family: var(--font-display);
    font-size: 5rem;
    position: absolute;
    top: -20px;
    left: 10px;
    opacity: 0.3;
}

.post-content pre {
    background: #2d2d2d;
    color: #ccc;
    padding: 20px;
    overflow-x: auto;
    border: var(--border-thick);
    margin-bottom: 1.5em;
    font-family: 'Consolas', 'Monaco', monospace;
}

.post-content code {
    background: #eee;
    padding: 2px 5px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.9em;
    border: 1px solid #000;
}

.post-content pre code {
    background: none;
    padding: 0;
    border: none;
    color: inherit;
}

.post-content img {
    max-width: 100%;
    height: auto;
    border: var(--border-thick);
    margin: 30px 0;
    box-shadow: var(--shadow-hover);
}

.post-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 30px 0;
    border: var(--border-thick);
    font-size: 0.9rem;
}

.post-content th,
.post-content td {
    border: 1px solid #000;
    padding: 10px;
}

.post-content th {
    background: var(--color-text);
    color: #fff;
    font-weight: 900;
    text-align: left;
}

/* 最初のカラム（左側）は改行なし */
.post-content th:first-child,
.post-content td:first-child {
    white-space: nowrap;
}

/* 2列目以降は改行を許可 */
.post-content th:not(:first-child),
.post-content td:not(:first-child) {
    white-space: normal;
    word-break: break-word;
}

.post-content tr:nth-child(even) {
    background: #f9f9f9;
}

.post-content hr {
    border: none;
    border-top: var(--border-thick);
    margin: 50px 0;
    position: relative;
}

.post-content hr::after {
    content: "・";
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
    padding: 0 10px;
    font-weight: 900;
    letter-spacing: 5px;
}

/* =========================================
   Mobile Optimization
   ========================================= */

/* Hide Mobile Header & Hamburger on Desktop */
.mobile-header,
.hamburger-btn {
    display: none;
}

/* Sidebar Overlay */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1050;
    /* mobile-header(1000) < overlay < sidebar(1100) */
    opacity: 0;
    visibility: hidden;
    transition: 0.3s;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Close Button Removed from View */
.close-btn {
    display: none !important;
}

/* Mobile Styles */
@media (max-width: 768px) {

    /* Layout */
    .layout-wrapper {
        /* flex-direction: column; Not needed for block layout */
    }

    /* Mobile Header */
    .mobile-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        background: #fff;
        border-bottom: var(--border-thick);
        padding: 10px 20px;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        z-index: 1000;
        height: 70px;
        box-shadow: 0 2px 0 rgba(0, 0, 0, 0.1);
    }

    .mobile-logo {
        font-family: var(--font-display);
        font-weight: 900;
        font-size: 1.4rem;
        line-height: 1.1;
        text-transform: uppercase;
        display: flex;
        align-items: baseline;
        gap: 8px;
    }

    .mobile-logo-sub {
        font-size: 1rem;
        line-height: 1;
    }

    .mobile-logo-main {
        font-size: 1.8rem;
        line-height: 1;
        color: var(--color-text);
        text-shadow: 2px 2px 0 var(--color-accent);
    }

    /* Hamburger Button */
    .hamburger-btn {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        width: 30px;
        height: 22px;
        background: none;
        border: none;
        cursor: pointer;
        padding: 0;
        z-index: 1200;
        /* Higher than sidebar(1100) */
        position: relative;
    }

    .hamburger-line {
        width: 100%;
        height: 3px;
        background-color: var(--color-text);
        transition: 0.3s;
        transform-origin: center;
    }

    /* Hamburger Animation */
    .hamburger-btn.active .hamburger-line:nth-child(1) {
        transform: translateY(9.5px) rotate(45deg);
    }

    .hamburger-btn.active .hamburger-line:nth-child(2) {
        opacity: 0;
    }

    .hamburger-btn.active .hamburger-line:nth-child(3) {
        transform: translateY(-9.5px) rotate(-45deg);
    }

    /* Sidebar Mobile Transition */
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
        box-shadow: 10px 0 20px rgba(0, 0, 0, 0.2);
        width: 85%;
        max-width: 320px;
        top: 0;
        height: 100vh;
        z-index: 1100;
        overflow-y: auto;
        padding-bottom: 30px;
        /* Above header */
    }

    .sidebar.active {
        transform: translateX(0);
    }

    /* Show Close Button on Mobile */
    .close-btn {
        display: block;
    }

    /* Hide Logo in Sidebar on Mobile */
    .sidebar .sidebar-header {
        display: none;
    }

    /* Main Content Adjustments */
    .main-content {
        margin-left: 0;
        padding: 20px;
        padding-top: 100px;
        /* Header height + spacing */
        width: 100%;
    }

    /* Masonry Grid 1 Column */
    .masonry-grid {
        display: flex;
        flex-direction: column;
        gap: 15px;
    }

    .masonry-item {
        width: 100%;
        margin-bottom: 0;
    }

    /* Typography & Component Adjustments */
    .entry-title {
        font-size: 2rem;
    }

    .visual-text {
        font-size: 2rem;
    }

    .article-container {
        /* padding: 20px; */
    }

    .post-visual {
        max-height: 300px;
    }

    .logo {
        font-size: 2.2rem;
    }

    .nav-links {
        flex: none;
    }

    .nav-item {
        font-size: 1.4rem;
        padding: 12px 15px;
    }

    .category-header h2 {
        font-size: 2.5rem !important;
    }

    .category-header {
        padding: 25px !important;
    }

    .breadcrumb {
        font-size: 0.8rem;
        margin-bottom: 20px;
    }

    .post-content table {
        /* display: block; */
        display: table;
        overflow-x: auto;
        white-space: nowrap;
    }
}

/* =========================================
   Page-Specific Styles
   ========================================= */

/* Ranking Page Styles */
.rank-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 50px;
    height: 50px;
    background: var(--color-text);
    color: #fff;
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: var(--border-thick);
    z-index: 10;
    box-shadow: var(--shadow-hard);
}

.rank-1 {
    background: #ffd700;
    color: #000;
    font-size: 2rem;
    width: 60px;
    height: 60px;
    top: 5px;
    left: 5px;
}

.rank-2 {
    background: #c0c0c0;
    color: #000;
}

.rank-3 {
    background: #cd7f32;
    color: #000;
}

/* Profile Page Styles */
.profile-header {
    text-align: center;
    margin-bottom: 50px;
}

.avatar {
    width: 150px;
    height: 150px;
    background: var(--color-text);
    border-radius: 50%;
    margin: 0 auto 20px;
    border: var(--border-thick);
    box-shadow: var(--shadow-hard);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 3rem;
    font-family: var(--font-display);
}

.profile-name {
    font-family: var(--font-display);
    font-size: 3rem;
    font-weight: 900;
    margin-bottom: 10px;
}

.profile-role {
    font-size: 1.2rem;
    font-weight: 700;
    background: var(--color-accent);
    display: inline-block;
    padding: 5px 15px;
    border: var(--border-thick);
}

.skill-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.skill-tag {
    background: #fff;
    border: var(--border-thick);
    padding: 5px 15px;
    font-weight: 700;
    font-family: var(--font-display);
    box-shadow: 3px 3px 0 #000;
}

/* Contact Page Styles */
.contact-form {
    background: #fff;
    border: var(--border-thick);
    padding: 40px;
    box-shadow: var(--shadow-hard);
    max-width: 800px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 25px;
}

.form-label {
    display: block;
    font-weight: 900;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 15px;
    border: var(--border-thick);
    font-family: var(--font-body);
    font-size: 1rem;
    background: #f9f9f9;
    transition: 0.1s;
}

.form-input:focus,
.form-textarea:focus {
    background: #fff;
    box-shadow: var(--shadow-hover);
    transform: translate(-2px, -2px);
    outline: none;
}

.form-textarea {
    height: 200px;
    resize: vertical;
}

.btn-submit {
    background: var(--color-self);
    color: #fff;
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 1.2rem;
    padding: 15px 50px;
    border: var(--border-thick);
    box-shadow: var(--shadow-hard);
    cursor: pointer;
    transition: 0.1s;
    display: block;
    width: 100%;
}

.btn-submit:hover {
    transform: translate(3px, 3px);
    box-shadow: var(--shadow-hover);
    background: #e68e19;
}

.avatar-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.avatar-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-family: var(--font-display);
    font-size: 4rem;
    font-weight: 900;
}

/* プロフィール詳細スタイル */
.profile-list {
    list-style: none;
    padding-left: 0;
    margin: 15px 0;
}

.profile-list li {
    padding: 8px 0;
    padding-left: 20px;
    position: relative;
    line-height: 1.8;
}

.profile-list li::before {
    content: "▸";
    position: absolute;
    left: 0;
    color: var(--color-text);
    font-weight: 900;
}

.profile-list li:first-child {
    padding-top: 0;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.tool-category {
    background: #fff;
    border: var(--border-thick);
    padding: 15px;
    box-shadow: var(--shadow-hover);
}

.tool-category strong {
    display: block;
    margin-bottom: 10px;
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 900;
    color: var(--color-text);
}

.tool-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.reader-message {
    background: var(--color-accent);
    border: var(--border-thick);
    padding: 20px;
    font-weight: 700;
    line-height: 1.8;
    margin: 20px 0;
    box-shadow: var(--shadow-hover);
}

.sns-links {
    margin: 15px 0;
}

.sns-links a {
    color: var(--color-text);
    font-weight: 700;
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 4px;
    transition: all 0.2s;
}

.sns-links a:hover {
    color: var(--color-accent);
    text-decoration-color: var(--color-accent);
}

.post-content h3 {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 900;
    margin-top: 25px;
    margin-bottom: 15px;
    color: var(--color-text);
}


.section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 900;
    margin-top: 40px;
    margin-bottom: 20px;
    color: var(--color-text) !important;
    background: transparent !important;
    padding: 0 !important;
    display: inline-flex !important;
    transform: none !important;
}

.section-title:first-of-type {
    margin-top: 0;
}

.section-icon {
    width: 24px;
    height: 24px;
    stroke-width: 2.5;
    flex-shrink: 0;
    color: var(--color-text);
    stroke: currentColor;
}

/* 人間的なセクションのスタイル */
.human-section {
    margin: 30px 0;
}

.human-quote {
    font-size: 1.3rem;
    font-weight: 900;
    font-family: var(--font-display);
    line-height: 1.6;
    padding: 20px;
    background: var(--color-accent);
    border: var(--border-thick);
    box-shadow: var(--shadow-hover);
    margin: 20px 0;
    text-align: center;
}

.human-insight {
    font-weight: 700;
    font-style: italic;
    color: var(--color-text);
    margin: 10px 0;
    padding-left: 20px;
    position: relative;
}

.human-insight::before {
    content: "→";
    position: absolute;
    left: 0;
    font-weight: 900;
}

.human-insights {
    margin: 20px 0;
    padding: 15px;
    background: #f9f9f9;
    border-left: 4px solid var(--color-accent);
}

.human-message {
    font-size: 1.1rem;
    line-height: 1.8;
    font-weight: 700;
    margin: 20px 0;
}

@media (max-width: 768px) {
    .tools-grid {
        grid-template-columns: 1fr;
    }

    .tool-category {
        padding: 12px;
    }
}

/* Author Box */
.author-box {
    background: #fff;
    border: var(--border-thick);
    padding: 30px;
    margin-bottom: 60px;
    box-shadow: var(--shadow-hard);
    text-align: left;
}

.author-header {
    display: flex;
    gap: 20px;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: var(--border-thick);
    padding-bottom: 20px;
}

.author-avatar {
    width: 80px;
    height: 80px;
    border: var(--border-thick);
    border-radius: 50%;
    overflow: hidden;
    background: var(--color-accent);
    flex-shrink: 0;
}

.author-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.author-info {
    flex: 1;
}

.author-label {
    font-size: 0.8rem;
    font-weight: 900;
    color: var(--color-biz);
    margin-bottom: 5px;
    font-family: var(--font-display);
}

.author-name {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 900;
    line-height: 1.2;
}

.author-role {
    font-size: 0.9rem;
    font-weight: 700;
    color: #555;
    margin-top: 5px;
}

.author-bio p {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 20px;
}

.author-links {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.author-btn {
    display: inline-block;
    padding: 8px 15px;
    border: var(--border-thick);
    background: #fff;
    font-weight: 900;
    font-family: var(--font-display);
    font-size: 0.9rem;
    transition: 0.1s;
    box-shadow: 3px 3px 0 #000;
}

.author-btn:hover {
    transform: translate(2px, 2px);
    box-shadow: 1px 1px 0 #000;
    background: var(--color-accent);
}

.author-btn.twitter {
    background: #000;
    color: #fff;
}

.author-btn.twitter:hover {
    background: #333;
}

@media (max-width: 768px) {
    .author-header {
        flex-direction: column;
        text-align: center;
    }

    .author-box {
        text-align: center;
    }

    .author-links {
        justify-content: center;
    }
}

/* Pagination */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin: 60px 0;
    padding: 20px;
    flex-wrap: wrap;
}

.pagination-link {
    display: inline-block;
    padding: 10px 20px;
    border: var(--border-thick);
    background: #fff;
    font-weight: 900;
    font-family: var(--font-display);
    font-size: 0.9rem;
    transition: 0.1s;
    box-shadow: 3px 3px 0 #000;
    text-decoration: none;
    color: inherit;
}

.pagination-link:hover:not(.disabled) {
    transform: translate(2px, 2px);
    box-shadow: 1px 1px 0 #000;
    background: var(--color-accent);
}

.pagination-link.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    box-shadow: 1px 1px 0 #000;
}

.pagination-pages {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.pagination-page {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    border: var(--border-thick);
    background: #fff;
    font-weight: 900;
    font-family: var(--font-display);
    font-size: 0.9rem;
    transition: 0.1s;
    box-shadow: 3px 3px 0 #000;
    text-decoration: none;
    color: inherit;
}

.pagination-page:hover:not(.active) {
    transform: translate(2px, 2px);
    box-shadow: 1px 1px 0 #000;
    background: var(--color-accent);
}

.pagination-page.active {
    background: var(--color-text);
    color: #fff;
    box-shadow: 1px 1px 0 #000;
    cursor: default;
}

.pagination-ellipsis {
    padding: 0 5px;
    font-weight: 900;
    color: #666;
}

@media (max-width: 768px) {
    .pagination {
        gap: 10px;
        margin: 40px 0;
        padding: 15px;
    }

    .pagination-link {
        padding: 8px 15px;
        font-size: 0.85rem;
    }

    .pagination-page {
        min-width: 35px;
        height: 35px;
        font-size: 0.85rem;
    }

    .pagination-pages {
        gap: 5px;
    }
}

/* Article Navigation */
.article-navigation {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 60px;
}

.nav-link {
    display: flex;
    flex-direction: column;
    padding: 20px;
    border: var(--border-thick);
    background: #fff;
    box-shadow: 3px 3px 0 #000;
    transition: 0.1s;
    text-decoration: none;
    color: inherit;
}

.nav-link:hover:not(.disabled) {
    transform: translate(2px, 2px);
    box-shadow: 1px 1px 0 #000;
    background: var(--color-accent);
}

.nav-link.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.nav-label {
    font-size: 0.85rem;
    font-weight: 700;
    color: #666;
    margin-bottom: 8px;
    font-family: var(--font-display);
}

.nav-title {
    font-weight: 900;
    font-size: 1.1rem;
    line-height: 1.3;
}

.nav-prev {
    text-align: left;
}

.nav-next {
    text-align: right;
}

/* Related Articles */
.related-articles {
    margin-bottom: 60px;
}

.related-title {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 900;
    margin-bottom: 30px;
    border-bottom: var(--border-thick);
    padding-bottom: 15px;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.related-card {
    display: flex;
    flex-direction: column;
    border: var(--border-thick);
    background: #fff;
    box-shadow: 3px 3px 0 #000;
    transition: 0.1s;
    text-decoration: none;
    color: inherit;
    overflow: hidden;
}

.related-card:hover {
    transform: translate(2px, 2px);
    box-shadow: 1px 1px 0 #000;
}

.related-image {
    width: 100%;
    height: 180px;
    background-size: cover;
    background-position: center;
}

.related-content {
    padding: 20px;
}

.related-category {
    display: inline-block;
    margin-bottom: 10px;
}

.related-title-text {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 900;
    line-height: 1.3;
    margin-bottom: 8px;
}

.related-desc {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.5;
}

@media (max-width: 768px) {
    .article-navigation {
        grid-template-columns: 1fr;
    }
    
    .related-grid {
        grid-template-columns: 1fr;
    }
}

/* =========================================
   404 Error Page Styles
   ========================================= */
.error-404 {
    text-align: center;
    padding: 60px 20px;
    max-width: 800px;
    margin: 0 auto;
}

.error-404-number {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-bottom: 40px;
    font-family: var(--font-display);
}

.error-digit {
    font-size: 8rem;
    font-weight: 900;
    line-height: 1;
    color: var(--color-text);
    text-shadow: 4px 4px 0 var(--color-accent);
    display: inline-block;
    transition: transform 0.3s ease;
}

.error-digit:hover {
    transform: scale(1.1) rotate(5deg);
}

.error-digit-spin {
    animation: spin 2s ease-in-out infinite;
    display: inline-block;
}

@keyframes spin {
    0%, 100% {
        transform: rotate(0deg);
    }
    25% {
        transform: rotate(-10deg);
    }
    75% {
        transform: rotate(10deg);
    }
}

.error-title {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 900;
    margin-bottom: 20px;
    color: var(--color-text);
}

.error-message {
    font-size: 1.2rem;
    line-height: 1.8;
    margin-bottom: 40px;
    color: #666;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.error-actions {
    margin-bottom: 60px;
}

.error-suggestions {
    background: #f9f9f9;
    border: var(--border-thick);
    padding: 40px;
    box-shadow: var(--shadow-hover);
    text-align: left;
}

.error-suggestions-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 900;
    margin-bottom: 25px;
    text-align: center;
    color: var(--color-text);
}

.error-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.error-link {
    display: block;
    padding: 15px 20px;
    border: var(--border-thick);
    background: #fff;
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 1.1rem;
    text-align: center;
    transition: 0.1s;
    box-shadow: 3px 3px 0 #000;
    text-decoration: none;
    color: inherit;
}

.error-link:hover {
    transform: translate(2px, 2px);
    box-shadow: 1px 1px 0 #000;
    background: var(--color-accent);
}

@media (max-width: 768px) {
    .error-404 {
        padding: 40px 15px;
    }
    
    .error-digit {
        font-size: 5rem;
    }
    
    .error-title {
        font-size: 2rem;
    }
    
    .error-message {
        font-size: 1rem;
    }
    
    .error-suggestions {
        padding: 25px 20px;
    }
    
    .error-links {
        grid-template-columns: 1fr;
    }
}