/* Imported from old/sake-ui/style.css (with small Hugo tweaks) */
/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #212529;
}

a {
    text-decoration: none;
    color: inherit;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.site-header {
    background-color: #fff;
    border-bottom: 1px solid #dee2e6;
    padding: 32px 0;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.site-branding {
    flex: 1;
}

.site-title {
    font-weight: 500;
    margin-bottom: 8px;
    color: #212529;
    letter-spacing: -0.5px;
}

.site-description {
    color: #868e96;
    line-height: 1.5;
}

.main-nav {
    display: flex;
    gap: 8px;
    margin-top: 5px;
}

.nav-link {
    font-size: 14px;
    font-weight: 500;
    color: #495057;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.nav-link:hover {
    background-color: #f1f3f5;
    color: #228be6;
}

/* Main Content */
.site-main {
    padding: 0;
}

.content-wrapper {
    display: flex;
    gap: 40px;
    padding: 40px 0;
}

.main-content {
    flex: 1;
    max-width: 750px;
}

/* Post */
.post {
    background-color: #fff;
    margin-bottom: 24px;
    display: flex;
    gap: 24px;
    padding: 0 20px 20px 20px;
}

.post-image {
    flex-shrink: 0;
    width: 240px;
    border-radius: 8px;
    overflow: hidden;
}

.post-image a {
    display: block;
    border-radius: 8px;
    overflow: hidden;
}

.post-image img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
}

.post-content {
    flex: 1;
    padding: 0 04px 0;
    min-width: 0;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    font-size: 12px;
    flex-wrap: wrap;
}

.post-date {
    color: #868e96;
    background-color: #f1f3f5;
    padding: 4px 10px;
    border-radius: 6px;
    font-weight: 500;
}

.post-date::before {
    content: "📅 ";
}

.post-category {
    color: #228be6;
    background-color: #e7f5ff;
    padding: 4px 10px;
    border-radius: 6px;
    font-weight: 500;
}

.post-category::before {
    content: "📁 ";
}

.post-title {
    font-weight: 400;
    margin-bottom: 12px;
    line-height: 1.4;
    color: #212529;
}

.post-excerpt {
    color: #495057;
    line-height: 1.7;
    margin-bottom: 16px;
}

.read-more {
    display: inline-flex;
    align-items: center;
    font-size: 13px;
    font-weight: 600;
    color: #228be6;
    padding: 8px 16px;
    border-radius: 6px;
    background-color: transparent;
    transition: all 0.2s ease;
}

.read-more::before {
    content: "→";
    margin-right: 6px;
    transition: transform 0.2s ease;
}

.read-more:hover {
    background-color: #e7f5ff;
}

.read-more:hover::before {
    transform: translateX(4px);
}

/* Prev/Next post navigation (single) */
.post-nav {
    display: flex;
    margin-top: 28px;
    border-top: 1px solid #e9ecef;
    padding: 0 10px;
}

.post-nav__item {
    flex: 1 1 50%;
    padding: 18px 0;
    text-decoration: none;
    color: inherit;
    min-width: 0;
}

.post-nav__item--prev {
    padding-right: 24px;
}

.post-nav__item--next {
    padding-left: 24px;
    text-align: right;
}

.post-nav__label {
    display: block;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: #12a3b4;
    margin-bottom: 6px;
}

.post-nav__title {
    display: block;
    font-size: 14px;
    line-height: 1.6;
    color: #7d858e;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.post-nav__item:hover .post-nav__title {
    color: #12a3b4;
}

@media (max-width: 768px) {
    .post-nav {
        flex-direction: column;
    }

    .post-nav__item--prev {
        border-right: none;
        border-bottom: 1px solid #e9ecef;
        padding-right: 0;
    }

    .post-nav__item--next {
        padding-left: 0;
        text-align: left;
    }
}

/* Single post content tweaks */
.post-body {
    color: #212529;
    line-height: 1.8;
}

.post-body p {
    font-size: 1.1em;
    margin: 0 0 14px;
}

.post-body img {
    max-width: 100%;
    height: auto;
}

.post-body ul {
    list-style: none;
    margin: 0 0 14px;
    padding: 0;
}

.post-body li {
    margin: 0;
    padding: 0;
    font-size: 1.1em;
}

/* Sidebar */
.sidebar {
    width: 320px;
    flex-shrink: 0;
    background-color: #fafafa;
}

.widget {
    margin-bottom: 40px;
}

/* Search Widget */
.search-widget {
    border-radius: 4px;
    overflow: hidden;
    width: 90%;
    margin: 20px auto;
}

.search-form {
    display: flex;
}

.search-form:focus-within {
    border-color: #228be6;
}

.search-field {
    flex: 1;
    padding: 10px 14px;
    border: none;
    font-size: 14px;
    outline: none;
    font-family: inherit;
    min-width: 0;
}

.search-field::placeholder {
    color: #adb5bd;
}

.search-button {
    width: 50px;
    background-color: #228be6;
    border: none;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
}

.search-button:hover {
    background-color: #1c7ed6;
}

.search-button:active {
    transform: scale(0.95);
}

/* Category-like Widget */
.category-widget {
    padding: 24px;
}

.widget-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 16px;
    color: #212529;
    letter-spacing: -0.3px;
}

.category-list {
    list-style: none;
}

.category-list--nested {
    margin-top: 6px;
    margin-left: 14px;
}

.category-list--nested a {
    padding-left: 34px;
}

.category-list--nested a::before {
    left: 18px;
    opacity: 0.9;
}

.category-list li {
    margin-bottom: 4px;
}

.category-list a {
    color: #495057;
    transition: all 0.2s ease;
    display: block;
    padding: 8px 12px;
    border-radius: 6px;
    position: relative;
    padding-left: 28px;
}

.category-list a::before {
    content: "▸";
    position: absolute;
    left: 12px;
    color: #228be6;
    transition: transform 0.2s ease;
}

.category-list a:hover {
    background-color: #f1f3f5;
    color: #228be6;
    padding-left: 32px;
}

.category-list a:hover::before {
    transform: translateX(4px);
}

/* Pagination (Hugo) */
.pagination {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: center;
    margin: 28px 0 8px;
}

.pagination__item {
    font-size: 13px;
    color: #495057;
    background: #fff;
    border: 1px solid #dee2e6;
    padding: 8px 12px;
    border-radius: 8px;
}

.pagination__item--prev,
.pagination__item--next {
    color: #228be6;
    border-color: #d0ebff;
}

.pagination__item--current {
    color: #868e96;
}

/* Responsive */
@media (max-width: 1024px) {
    .content-wrapper {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
    }

    .main-content {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 20px;
    }

    .main-nav {
        margin-top: 0;
    }

    .post {
        flex-direction: column;
        padding: 16px;
    }

    .post-image {
        width: 100%;
    }

    .post-content {
        padding: 0;
    }

    .site-title {
        font-size: 24px;
    }

    .site-main {
        padding: 24px 0;
    }
}