/* ==========================================================================
   Alam Personal — Homepage
   Layout: Profil kiri | Daftar tulisan kanan
   ========================================================================== */

.alam-homepage {
    background: #ffffff;
    min-height: calc(100vh - 64px);
}

/* ----------------------------------------------------------
   LAYOUT 2 KOLOM
   ---------------------------------------------------------- */
.alam-home-layout {
    max-width: 1200px;
    margin: 0 auto;
    padding: 80px 48px 100px;
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 64px;
    align-items: start;
}

/* ----------------------------------------------------------
   KIRI — PROFIL CARD
   ---------------------------------------------------------- */
.alam-profile {
    position: sticky;
    top: 88px;
}

.alam-profile__card {
    background: #ffffff;
    border: 1px solid #e4e4e7;
    border-radius: 16px;
    padding: 28px 24px;
    box-shadow: 0 2px 12px rgba(0,0,0,.06);
    transition: box-shadow .25s;
}

.alam-profile__card:hover {
    box-shadow: 0 8px 32px rgba(0,0,0,.1);
}

.alam-profile__photo-wrap {
    margin-bottom: 16px;
}

.alam-profile__photo {
    width: 64px;
    height: 64px;
    border-radius: 50% !important;
    object-fit: cover;
    border: 3px solid #f4f4f5;
    display: block;
    box-shadow: 0 2px 8px rgba(0,0,0,.1);
}

.alam-profile__greeting {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1.1rem;
    font-weight: 800;
    color: #18181b;
    letter-spacing: -.03em;
    line-height: 1.2;
    margin-bottom: 0;
}

.alam-profile__divider {
    height: 1px;
    background: #f4f4f5;
    margin: 16px 0;
}

.alam-profile__bio {
    font-size: .845rem;
    color: #52525b;
    line-height: 1.75;
    margin-bottom: 10px;
}

.alam-profile__tagline {
    font-size: .8rem;
    color: #a1a1aa;
    margin-bottom: 0;
}

.alam-profile__tagline em { font-style: italic; }

.alam-profile__links {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.alam-profile__link {
    font-size: .8rem;
    font-weight: 600;
    color: #6366f1;
    text-decoration: none;
    transition: color .15s, gap .15s;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.alam-profile__link::before {
    content: '↗';
    font-size: .72rem;
    opacity: .5;
    transition: opacity .15s;
}

.alam-profile__link:hover { color: #4f46e5; }
.alam-profile__link:hover::before { opacity: 1; }

/* Override overflow hidden dari parent Hello Elementor */
.alam-homepage,
.alam-home-layout,
.alam-homepage * {
    overflow: visible;
}

/* Khusus writings yang memang harus scroll */
.alam-writings {
    position: sticky;
    top: 88px;
    max-height: calc(100vh - 128px);
    overflow-y: auto !important;
    padding-top: 4px;
    padding-right: 8px;
    scrollbar-width: thin;
    scrollbar-color: #e4e4e7 transparent;
}

.alam-writings::-webkit-scrollbar       { width: 4px; }
.alam-writings::-webkit-scrollbar-track { background: transparent; }
.alam-writings::-webkit-scrollbar-thumb { background: #e4e4e7; border-radius: 999px; }
.alam-writings::-webkit-scrollbar-thumb:hover { background: #a1a1aa; }

.alam-writings__title {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: #a1a1aa;
    margin-bottom: 20px;
}

/* List */
.alam-post-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.alam-post-item {
    border-bottom: 1px solid #f4f4f5;
}

.alam-post-item:first-child {
    border-top: 1px solid #f4f4f5;
}

.alam-post-item__link {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    padding: 16px 0;
    text-decoration: none;
    transition: all .15s;
}

.alam-post-item__link:hover .alam-post-item__title {
    color: #6366f1;
}

.alam-post-item__left {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
    flex: 1;
}

.alam-post-item__title {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: .925rem;
    font-weight: 600;
    color: #18181b;
    letter-spacing: -.01em;
    line-height: 1.4;
    transition: color .15s;
    margin: 0;
    padding: 0;
}

.alam-post-item__excerpt {
    font-size: .8rem;
    color: #a1a1aa;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.alam-post-item__meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 3px;
    flex-shrink: 0;
    padding-top: 2px;
}

.alam-post-item__date {
    font-size: .78rem;
    color: #a1a1aa;
    font-weight: 500;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.alam-post-item__read {
    font-size: .7rem;
    color: #d4d4d8;
    font-weight: 500;
    white-space: nowrap;
}

.alam-post-item__cat {
    display: inline-block;
    background: #f4f4f5;
    color: #71717a;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: .68rem;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}

.alam-writings__empty {
    font-size: .9rem;
    color: #a1a1aa;
    font-style: italic;
    padding: 24px 0;
}

/* ----------------------------------------------------------
   RESPONSIVE
   ---------------------------------------------------------- */
@media (max-width: 768px) {
    .alam-home-layout {
        grid-template-columns: 1fr;
        gap: 48px;
        padding: 48px 20px 72px;
    }

    .alam-profile {
        position: static;
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 16px;
        align-items: flex-start;
    }

    .alam-profile__photo-wrap { margin-bottom: 0; }

    .alam-profile__content-wrap { flex: 1; min-width: 0; }

    .alam-post-item__cat   { display: none; }
    .alam-post-item__title { font-size: .875rem; white-space: normal; }
}

/* ----------------------------------------------------------
   BOOKSHELF — full width section di bawah
   ---------------------------------------------------------- */
.alam-bookshelf {
    border-top: 1px solid #f4f4f5;
    padding: 40px 0 60px;
    background: #ffffff;
}

.alam-bookshelf__inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 48px;
}

.alam-bookshelf__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.alam-bookshelf__title {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: #a1a1aa;
}

.alam-bookshelf__more {
    font-size: .78rem;
    font-weight: 600;
    color: #6366f1;
    text-decoration: none;
    transition: color .2s;
}

.alam-bookshelf__more:hover { color: #4f46e5; }

/* Carousel wrapper */
.alam-bookshelf__carousel {
    position: relative;
}

.alam-bookshelf__track {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 8px;
}

.alam-bookshelf__track::-webkit-scrollbar { display: none; }

/* Book item */
.alam-book-item {
    flex-shrink: 0;
    width: 110px;
    scroll-snap-align: start;
}

.alam-book-item__inner {
    display: block;
    text-decoration: none;
    transition: transform .2s;
}

.alam-book-item__inner:hover {
    transform: translateY(-4px);
}

.alam-book-item__cover {
    width: 110px;
    height: 155px;
    border-radius: 6px;
    overflow: hidden;
    background: #f4f4f5;
    margin-bottom: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,.12);
}

.alam-book-item__cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .3s;
}

.alam-book-item__inner:hover .alam-book-item__cover img {
    transform: scale(1.04);
}

.alam-book-item__placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
}

.alam-book-item__info { padding: 0 2px; }

.alam-book-item__title {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: .75rem;
    font-weight: 700;
    color: #18181b;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 2px;
    transition: color .2s;
}

.alam-book-item__inner:hover .alam-book-item__title { color: #6366f1; }

.alam-book-item__author {
    font-size: .68rem;
    color: #a1a1aa;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.alam-book-item__rating {
    font-size: .7rem;
    margin-top: 2px;
}

.alam-star--on  { color: #f59e0b; }
.alam-star--off { color: #e4e4e7; }

/* Nav buttons */
.alam-shelf-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-calc(50% + 20px));
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #ffffff;
    border: 1px solid #e4e4e7;
    box-shadow: 0 2px 8px rgba(0,0,0,.1);
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .2s;
    color: #18181b;
    z-index: 2;
    line-height: 1;
}

.alam-shelf-nav:hover {
    background: #18181b;
    color: #ffffff;
    border-color: #18181b;
}

.alam-shelf-nav--prev { left: -15px; }
.alam-shelf-nav--next { right: -15px; }

/* Divider antara bookshelf dan tulisan */
.alam-writings {
    border-top: 1px solid #f4f4f5;
    padding-top: 0;
}

/* ----------------------------------------------------------
   RESPONSIVE BOOKSHELF
   ---------------------------------------------------------- */
@media (max-width: 768px) {
    .alam-shelf-nav { display: none; }
    .alam-book-item { width: 90px; }
    .alam-book-item__cover { width: 90px; height: 127px; }
}
