/* Publications page – hero + content flow */

.menu-section {
    position: relative;

    background:
        /* radial-gradient(900px 500px at 10% 25%, rgba(124,92,255,0.1), transparent 60%); */
        radial-gradient(200px 200px at 40% 120px, rgba(117, 131, 255, 0.1), transparent 60%);
    /* radial-gradient(1000px 800px at 90% 700px, rgba(29,78,216,0.1), transparent 60%); */
    /* radial-gradient(1000px 1000px at 60% 60%, rgba(29,78,216,0.1), transparent 60%),
    radial-gradient(1200px 200px at 40% 95%, rgba(124,92,255,0.1), transparent 60%); */
}

#international-journals, #international-conferences, #domestic-journals, #domestic-conferences, #patents, #programs {
    scroll-margin-top: 20vh;
}

.pub-page {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* ===== tabs ===== */
.pub-tabs-wrap {
    position: relative;
}

.pub-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 28px;
    align-items: flex-end;
    /* border-bottom: 1px solid #e5e7eb; */
    padding-bottom: 0;
    margin-bottom: 8px;
}

.pub-tab-btn {
    position: relative;
    appearance: none;
    border: none;
    background: transparent;
    color: #6b7280;
    padding: 0 0 14px;
    font: inherit;
    font-size: 15px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    transition: color 0.2s ease;
}

.pub-tab-btn::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -1px;
    width: 100%;
    height: 2px;
    background: #111827;
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.2s ease;
}

.pub-tab-btn:hover {
    color: #111827;
}

.pub-tab-btn.is-active {
    color: #111827;
}

.pub-tab-btn.is-active::after {
    transform: scaleX(1);
}

.pub-tabs-arrow {
    display: none;
}

.tab-label-mobile {
    display: none;
}

/* ===== panel layout ===== */
.pub-tab-panel {
    display: block;
}

.pub-layout {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 32px;
    align-items: start;
}

/* ===== sidebar ===== */
.pub-aside {
    position: sticky;
    top: 110px;
}

.pub-aside-inner {
    padding: 8px 0 0;
    background: transparent;
    border: none;
    box-shadow: none;
}

.pub-aside-title {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #9ca3af;
}

.pub-aside-sub {
    margin-top: 6px;
    font-size: 13px;
    color: #9ca3af;
    line-height: 1.5;
}

.pub-year-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(64px, 1fr));
    gap: 8px;
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid #f1f5f9;
}

.pub-year-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 34px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    color: #6b7280;
    background: #fff;
    border: 1px solid #eceff3;
    border-radius: 8px;
    transition: 0.15s ease;
}

.pub-year-btn:hover {
    color: #111827;
    border-color: #d1d5db;
    background: #f9fafb;
    text-decoration: none;
}

.pub-year-empty {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid #f1f5f9;
    color: #9ca3af;
    font-size: 14px;
}

/* ===== main ===== */
.pub-main {
    min-width: 0;
}

.pub-panel-head {
    margin-bottom: 24px;
}

.pub-panel-head h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: #222;
}

.pub-panel-head p {
    margin: 5px 0 0;
    color: #6b7280;
    font-size: 14px;
}

/* ===== year block ===== */
.pub-year-block {
    scroll-margin-top: 10vh;
}

.pub-year-block+.pub-year-block {
    margin-top: 35px;
}

.pub-year-head {
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e5e7eb;
}

.pub-year {
    margin: 0;
    font-size: 26px;
    line-height: 1.2;
    color: #111827;
}

/* ===== list / card ===== */
.pub-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.pub-card {
    /* border: 1px solid #e5e7eb;
    border-radius: 16px; */
    background: transparent;
    /* box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04); */
}

.pub-body {
    padding: 0 15px;
    margin: 10px 0 ;
}

.pub-title {
    margin: 0;
    font-size: 18px;
    line-height: 1.5;
    font-weight: 500;
    color: #111827;
    word-break: keep-all;
}

.pub-authors {
    margin-top: 3px;
    color: #4b5563;
    line-height: 1.6;
    font-size: 15px;
}

.pub-line {
    margin-top: 3px;
    color: #6b7280;
    line-height: 1.6;
    font-size: 14px;
}

.pub-date {
    margin-left: 8px;
    font-weight: 600;
    color: #374151;
}

.pub-pin {
    display: inline-flex;
    align-items: center;
    margin-left: 8px;
    padding: 2px 8px;
    border-radius: 999px;
    background: #dbeafe;
    color: #1d4ed8;
    font-size: 12px;
    font-weight: 700;
    vertical-align: middle;
}

.pub-pin-status {
  background-color: #e8f4e8;
  color: #2d7a2d;
}

.pub-empty {
    border: 1px dashed #d1d5db;
    border-radius: 16px;
    padding: 28px 20px;
    text-align: center;
    color: #9ca3af;
    background: #fafafa;
}

/* ===== responsive ===== */
@media (max-width: 1024px) {
    .pub-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .pub-aside {
        display: none;
    }

    .pub-year-nav {
        flex-direction: row;
        flex-wrap: wrap;
        /* gap: 8px; */
    }

    .pub-year-link {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        /* padding: 8px 12px; */
        /* background: #f9fafb; */
        /* border: 1px solid #e5e7eb; */
    }
}

@media (max-width: 900px) {
    .pub-tabs-wrap {
        margin-bottom: 18px;
    }

    .pub-tabs-wrap::before,
    .pub-tabs-wrap::after {
        content: '';
        position: absolute;
        top: 0;
        bottom: 0px;
        width: 28px;
        pointer-events: none;
        z-index: 2;
    }

    .pub-tabs-wrap::before {
        left: 0;
        background: linear-gradient(to right, #fff 35%, rgba(255, 255, 255, 0));
    }

    .pub-tabs-wrap::after {
        right: 0;
        background: linear-gradient(to left, #fff 35%, rgba(255, 255, 255, 0));
    }

    .pub-tabs-wrap.is-start::before {
        opacity: 0;
    }

    .pub-tabs-wrap.is-end::after {
        opacity: 0;
    }

    .pub-tabs {
        flex-wrap: nowrap;
        gap: 25px;
        overflow-x: auto;
        overflow-y: hidden;
        scrollbar-width: none;
        -ms-overflow-style: none;
        padding: 0 0 8px;
        margin-bottom: 0;
        scroll-behavior: smooth;
        white-space: nowrap;
    }

    .pub-tabs::-webkit-scrollbar {
        display: none;
    }

    .pub-tab-btn {
        flex: 0 0 auto;
        padding: 0 0 10px;
        font-size: 14px;
        white-space: nowrap;
    }

    .pub-tabs-arrow {
        display: flex;
        position: absolute;
        top: 0;
        bottom: 20px;
        width: 28px;
        align-items: center;
        justify-content: center;
        z-index: 3;
        border: none;
        background: transparent;
        padding: 0;
        cursor: pointer;
    }

    .pub-tabs-arrow-left {
        left: 0;
    }

    .pub-tabs-arrow-right {
        right: 0;
    }

    .pub-tabs-arrow::before {
        content: '';
        width: 7px;
        height: 7px;
        border-top: 2px solid #374151;
        border-right: 2px solid #374151;
    }

    .pub-tabs-arrow-left::before {
        transform: rotate(-135deg);
    }

    .pub-tabs-arrow-right::before {
        transform: rotate(45deg);
    }

    .pub-tabs-arrow.is-hidden {
        opacity: 0;
        pointer-events: none;
    }

    .tab-label-desktop {
        display: none;
    }

    .tab-label-mobile {
        display: inline;
    }

    .pub-aside-inner {
        padding: 18px 16px;
        border-radius: 14px;
    }

    .pub-body {
        padding: 10px;
        margin: 0 ;
    }

    .pub-title {
        font-size: 16px;
    }

    .pub-authors,
    .pub-line {
        font-size: 13px;
    }

    .pub-year {
        font-size: 22px;
    }

}

/* =================================== */

@media (max-width: 768px) {

    .pub-year-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
    }

    .pub-year-btn {
        height: 40px;
        font-size: 14px;
    }
}
