/* =========================================================
   Hendrik Supardi — Calendar of one-line days
   Latar putih, tile berlapis warna, serif + sans
   ========================================================= */

:root {
    --ink: #2a2430;
    --ink-soft: #6b6573;
    --line: #ece9ef;
    --paper: #ffffff;
    --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
    --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
}

body {
    background: var(--paper);
    color: var(--ink);
    font-family: var(--sans);
    font-size: 16px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

.page {
    max-width: 920px;
}

/* ---------- Header ---------- */
.site-header {
    text-align: center;
    padding: 1.5rem 0 1rem;
}

.site-name {
    font-family: var(--serif);
    font-weight: 600;
    font-size: clamp(2rem, 6vw, 3rem);
    letter-spacing: -0.02em;
    line-height: 1.1;
    margin: 0;
}

.site-tagline {
    font-family: var(--serif);
    font-style: italic;
    font-weight: 300;
    color: var(--ink-soft);
    margin: 0.4rem 0 0;
}

.site-rule {
    height: 4px;
    width: 140px;
    margin: 1.1rem auto 0;
    border-radius: 4px;
    background: linear-gradient(90deg, #FFB86B, #FF8FA3, #B79CF5, #7CC8E8, #8FE0B5);
}

/* ---------- Month navigation ---------- */
.month-nav {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 0.5rem;
    margin: 1.25rem 0 1rem;
}

.month-nav .nav-prev { justify-self: start; }
.month-nav .nav-next { justify-self: end; }

.month-nav .btn {
    border: 1px solid var(--line);
    color: var(--ink);
    background: #fff;
    border-radius: 999px;
    padding: 0.4rem 0.95rem;
    font-size: 0.85rem;
}

.month-nav .btn:hover {
    background: #faf8fc;
    border-color: #ddd6e6;
}

.current-month {
    font-family: var(--serif);
    font-size: 1.5rem;
    font-weight: 500;
    text-align: center;
}

/* ---------- Keyword cloud ---------- */
.keyword-cloud {
    margin: 0 0 1.5rem;
    text-align: center;
    line-height: 2;
}

.keyword-cloud a {
    display: inline-block;
    margin: 0.15rem 0.2rem;
    padding: 0.15rem 0.8rem;
    border-radius: 999px;
    text-decoration: none;
    color: var(--ink);
    background: var(--tag-bg, #f3f0f7);
    border: 1px solid var(--tag-bd, #e6e0ee);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.keyword-cloud a:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(60, 40, 90, 0.1);
}

.keyword-cloud a small {
    opacity: 0.55;
    font-size: 0.7em;
    margin-left: 0.25em;
}

.tag-0 { --tag-bg: #FFF1D6; --tag-bd: #FBDDA0; }
.tag-1 { --tag-bg: #FFE3E8; --tag-bd: #F8BFCB; }
.tag-2 { --tag-bg: #ECE4FB; --tag-bd: #D3C4F3; }
.tag-3 { --tag-bg: #DDF1FA; --tag-bd: #B6DFF0; }
.tag-4 { --tag-bg: #DDF6E8; --tag-bd: #B5E8CC; }

/* ---------- Calendar ---------- */
.calendar {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 6px;
}

.day-header {
    text-align: center;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--ink-soft);
    padding: 0.35rem 0;
}

.day {
    position: relative;
    aspect-ratio: 1 / 1;
    border-radius: 10px;
    overflow: hidden;
    background: #fbfafc;
    border: 1px solid var(--line);
}

.day.empty {
    background: transparent;
    border-color: transparent;
}

.day-content {
    position: absolute;
    inset: 0;
    padding: 0.4rem 0.45rem;
    display: flex;
    flex-direction: column;
    z-index: 2;
}

.day-number {
    font-weight: 600;
    font-size: 0.85rem;
    line-height: 1;
}

.day:not(.quote) .day-number {
    color: #b3adbb;
    font-weight: 500;
}

.day.today {
    box-shadow: 0 0 0 2px var(--ink);
}

/* tile berisi quote */
.day.quote {
    cursor: pointer;
    border-color: transparent;
    color: var(--ink);
    background-color: var(--c1);
    background-image:
        radial-gradient(circle at 12% 92%, var(--c3) 0%, transparent 58%),
        radial-gradient(circle at 92% 8%, var(--c2) 0%, transparent 52%),
        radial-gradient(ellipse at 55% 45%, rgba(255, 255, 255, 0.38) 0%, transparent 62%),
        linear-gradient(135deg, var(--c1), var(--c2));
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

/* grain halus di atas semua lapisan */
.day.quote::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    opacity: 0.22;
    mix-blend-mode: multiply;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .3  0 0 0 0 .25  0 0 0 0 .35  0 0 0 .9 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* kilau kaca di pojok atas */
.day.quote::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.45) 0%, rgba(255, 255, 255, 0) 38%);
}

.day.quote:hover,
.day.quote:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(60, 40, 90, 0.16);
    outline: none;
}

.day.quote:focus-visible {
    box-shadow: 0 0 0 2px var(--ink);
}

.day.quote.today {
    box-shadow: 0 0 0 2px var(--ink);
}

.day-text {
    flex: 1;
    min-height: 0;
    margin: 0.25rem 0 0;
    font-family: var(--serif);
    font-size: 0.72rem;
    line-height: 1.25;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
}

.day-actions {
    position: absolute;
    right: 0.3rem;
    bottom: 0.3rem;
}

.btn-reply-mini {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.55);
    color: var(--ink);
    font-size: 0.75rem;
    backdrop-filter: blur(2px);
}

.btn-reply-mini:hover {
    background: rgba(255, 255, 255, 0.9);
}

.day.highlighted {
    box-shadow: 0 0 0 3px #ffcc00;
}

/* ---------- Palet mood: 3 warna per mood (c1 terang, c2 tengah, c3 aksen) ---------- */
.mood-default      { --c1:#F4F1F7; --c2:#E3DCEB; --c3:#D6D0E4; }

/* hangat-ceria */
.mood-happy        { --c1:#FFEBA8; --c2:#FFBE72; --c3:#FF9FA8; }
.mood-joyful       { --c1:#FFE0D2; --c2:#FFB3C1; --c3:#FFD27A; }
.mood-energized    { --c1:#FFF0A8; --c2:#FFB36B; --c3:#FF8F9E; }
.mood-excited      { --c1:#FFE3B8; --c2:#FF9FB2; --c3:#C9A4F5; }

/* tenang */
.mood-calm         { --c1:#DDF5F2; --c2:#A5DCEA; --c3:#BCCBF6; }
.mood-peaceful     { --c1:#E4F6DC; --c2:#B4E5C4; --c3:#A7DBEA; }
.mood-focused      { --c1:#DCE8FB; --c2:#A9C6F2; --c3:#B9B4F0; }

/* kreatif */
.mood-creative     { --c1:#EEDFFB; --c2:#E6A9DB; --c3:#9BE3C0; }
.mood-inspired     { --c1:#DDF6E8; --c2:#9FDCE9; --c3:#C5B3F2; }
.mood-adventurous  { --c1:#D9EEFB; --c2:#B9A8F0; --c3:#8FE3BE; }
.mood-romantic     { --c1:#FFE1EA; --c2:#FFA9BE; --c3:#E7B1F0; }

/* lembut-sendu */
.mood-sad          { --c1:#DCE8F8; --c2:#A9BEE4; --c3:#C3B7E6; }
.mood-melancholic  { --c1:#E8E0F5; --c2:#B7A8E0; --c3:#9CC4E4; }
.mood-nostalgic    { --c1:#FFE6CF; --c2:#EBB7C9; --c3:#C9B4E6; }
.mood-tired        { --c1:#F6EFD2; --c2:#DCCFA8; --c3:#B9C9DD; }

/* intens */
.mood-angry        { --c1:#FFD9D6; --c2:#F59A9F; --c3:#F5B88A; }
.mood-frustrated   { --c1:#FFE3CF; --c2:#F7A9A0; --c3:#E7A0C4; }
.mood-sick         { --c1:#E8F2CF; --c2:#B9DE9F; --c3:#9FD8C4; }

/* ---------- Modal ---------- */
.modal-content {
    border: 0;
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(40, 20, 70, 0.25);
    overflow: hidden;
}

.modal-quote-band {
    height: 10px;
    background-color: var(--c1);
    background-image:
        radial-gradient(circle at 10% 50%, var(--c3) 0%, transparent 60%),
        radial-gradient(circle at 90% 50%, var(--c2) 0%, transparent 60%),
        linear-gradient(90deg, var(--c1), var(--c2));
}

.modal-body {
    font-size: 0.95rem;
}

.quote-full {
    font-family: var(--serif);
    font-size: 1.2rem;
    line-height: 1.55;
    margin-bottom: 0.75rem;
}

.quote-meta {
    font-size: 0.8rem;
    color: var(--ink-soft);
}

.quote-replies {
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--line);
}

.quote-reply {
    font-size: 0.88rem;
    color: #555060;
    padding: 0.35rem 0 0.35rem 0.75rem;
    border-left: 3px solid var(--c2);
    margin-bottom: 0.4rem;
}

.btn {
    font-size: 0.85rem;
}

/* ---------- Highlight moments ---------- */
.section-title {
    font-family: var(--serif);
    font-weight: 500;
    font-size: 1.35rem;
    margin: 0;
}

.highlight-card {
    border: 0;
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 14px rgba(60, 40, 90, 0.08);
}

.highlight-card .band {
    height: 8px;
    background-color: var(--c1);
    background-image:
        radial-gradient(circle at 15% 50%, var(--c3) 0%, transparent 60%),
        radial-gradient(circle at 85% 50%, var(--c2) 0%, transparent 60%),
        linear-gradient(90deg, var(--c1), var(--c2));
}

.highlight-card .card-text {
    font-family: var(--serif);
    font-size: 1.05rem;
}

#highlightMomentsCarousel {
    padding: 0 44px;
}

.carousel-control-prev,
.carousel-control-next {
    width: 32px;
    height: 32px;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(42, 36, 48, 0.55);
    border-radius: 50%;
    opacity: 0.85;
}

.carousel-control-prev { left: 0; }
.carousel-control-next { right: 0; }

.carousel-control-prev:hover,
.carousel-control-next:hover {
    opacity: 1;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    width: 1rem;
    height: 1rem;
}

.archive-card,
.highlight-wrap {
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
}

.archive-year {
    margin: 0.2rem;
    border-radius: 999px;
}

/* ---------- Responsive ---------- */
@media (max-width: 767.98px) {
    .calendar { gap: 4px; }
    .day { border-radius: 8px; }
    .day-content { padding: 0.28rem 0.3rem; }
    .day-number { font-size: 0.72rem; }
    .day-text { font-size: 0.58rem; line-height: 1.2; -webkit-line-clamp: 3; }
    .btn-reply-mini { width: 1.25rem; height: 1.25rem; font-size: 0.62rem; }
    .day-actions { right: 0.2rem; bottom: 0.2rem; }
    .current-month { font-size: 1.2rem; }
    .month-nav .btn { padding: 0.3rem 0.7rem; font-size: 0.78rem; }
    #highlightMomentsCarousel { padding: 0 38px; }
}

@media (max-width: 575.98px) {
    body { font-size: 14px; }
    .calendar { gap: 3px; }
    .day-header { font-size: 0.65rem; }
    .day-text { font-size: 0.5rem; -webkit-line-clamp: 2; }
    .day-actions { display: none; } /* balas lewat modal quote */
}

@media (prefers-reduced-motion: reduce) {
    .day.quote,
    .keyword-cloud a { transition: none; }
    .day.quote:hover { transform: none; }
}
