/* elahady.site — restyled to match the "Denah Hidup" homepage design system
   (Material-3-derived sage palette, Libre Caslon Text + Manrope). */

:root {
    --border: #c2c8c3;
    --border-light: #e3e2e0;
    --text: #1b1c1b;
    --muted: #424845;
    --accent: #4d6359;
    --accent-contrast: #ffffff;
    --accent-container: #dde7e1;
    --accent-container-text: #273c33;
    --bg: #faf9f7;
    --surface: #ffffff;
    --surface-low: #f5f3f1;
    --sidebar-bg: #f5f3f1;
    --max-width: 1200px;
    --radius: 12px;
    --shadow: 0 12px 32px rgba(0, 0, 0, 0.05);
    --font-serif: "Libre Caslon Text", Georgia, "Times New Roman", serif;
    --font-sans: "Manrope", -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: var(--font-sans);
    color: var(--text);
    background: var(--bg);
    line-height: 1.65;
}

a { color: var(--text); }
a:hover { color: var(--accent); }

img { max-width: 100%; display: block; }

.site-wrap {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

/* Header */
.site-header {
    text-align: center;
    padding: 56px 20px 24px;
}

.site-title {
    font-family: var(--font-serif);
    font-weight: 700;
    font-size: 3rem;
    margin: 0;
    letter-spacing: -0.01em;
    color: var(--text);
}

.site-title a { text-decoration: none; color: inherit; }

.site-tagline {
    margin: 12px 0 0;
    color: var(--muted);
    font-size: 1.05rem;
}

.header-divider {
    border: none;
    border-top: 1px solid var(--border-light);
    margin: 0;
}

/* Navigation */
.main-nav-wrap {
    border-bottom: 1px solid var(--border-light);
    background: var(--surface);
}

.main-nav {
    list-style: none;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 34px;
    margin: 0;
    padding: 18px 0;
    flex-wrap: wrap;
}

.main-nav li { position: relative; }

.main-nav > li > a {
    text-decoration: none;
    color: var(--text);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    transition: color 0.2s ease;
}

.main-nav > li.has-children > a::after {
    content: " \25BE";
    font-size: 0.7em;
    color: var(--muted);
}

.main-nav > li.active > a,
.main-nav > li:hover > a {
    color: var(--accent);
}

.main-nav .dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 10px 0;
    margin: 0;
    list-style: none;
    z-index: 20;
    white-space: nowrap;
    overflow: hidden;
}

.main-nav > li:hover > .dropdown { display: block; }

.main-nav .dropdown li { position: relative; }

.main-nav .dropdown a {
    display: block;
    padding: 10px 22px;
    text-decoration: none;
    color: var(--text);
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: none;
    letter-spacing: normal;
}

.main-nav .dropdown li:hover > a { background: var(--accent-container); color: var(--accent-container-text); }

.main-nav .dropdown .flyout {
    display: none;
    position: absolute;
    top: -11px;
    left: 100%;
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 10px 0;
    margin: 0;
    list-style: none;
    z-index: 21;
    overflow: hidden;
}

.main-nav .dropdown li:hover > .flyout { display: block; }

/* Content grid */
.content-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 32px;
    padding: 48px 0 80px;
    align-items: start;
}

@media (max-width: 820px) {
    .content-grid { grid-template-columns: 1fr; }
    .site-title { font-size: 2.2rem; }
    .main-nav { gap: 18px; }
}

.box {
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
    padding: 36px 40px;
    margin-bottom: 28px;
}

/* Post cards on index/category listings */
.post-card {
    transition: border-color 0.3s ease, transform 0.3s ease;
}

.post-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.post-card h2 {
    text-align: center;
    font-family: var(--font-serif);
    font-weight: 700;
    font-size: 1.55rem;
    line-height: 1.35;
    margin: 0 0 6px;
}

.post-card h2 a { text-decoration: none; color: var(--text); }

.meta-divider {
    display: flex;
    align-items: center;
    gap: 14px;
    color: var(--muted);
    font-size: 0.85rem;
    margin: 16px 0 22px;
}

.meta-divider .line {
    flex: 1;
    height: 1px;
    background: var(--border-light);
}

.post-card .excerpt {
    color: var(--muted);
    margin: 0 0 16px;
}

.read-more {
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--accent);
    display: inline-block;
    border-bottom: 1px solid var(--accent);
    padding-bottom: 2px;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.read-more:hover {
    color: var(--accent-container-text);
    border-color: var(--accent-container-text);
}

/* Single post/page article */
.article-title {
    font-family: var(--font-serif);
    font-weight: 700;
    font-size: 2.1rem;
    line-height: 1.3;
    margin: 0 0 8px;
}

.article-meta {
    color: var(--muted);
    font-size: 0.9rem;
    margin-bottom: 22px;
}

.article-body h2,
.article-body h3 {
    font-family: var(--font-serif);
    font-weight: 700;
}

.article-body h2 { margin-top: 34px; }
.article-body h3 { margin-top: 26px; }

.comments {
    margin-top: 40px;
    border-top: 1px solid var(--border-light);
    padding-top: 24px;
}

.comments-empty { color: var(--muted); }

.comment-item { margin-bottom: 18px; }
.comment-item p { margin: 0; }
.comment-item .comment-author { margin: 0 0 4px; }
.comment-item .comment-meta { color: var(--muted); font-size: 0.85rem; }

.article-body blockquote {
    border-left: 4px solid var(--accent);
    background: var(--surface-low);
    border-radius: 0 var(--radius) var(--radius) 0;
    margin: 26px 0;
    padding: 14px 20px;
    font-style: italic;
    color: var(--text);
}

.article-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 22px 0;
    border-radius: var(--radius);
    overflow: hidden;
}

.article-body th,
.article-body td {
    border: 1px solid var(--border-light);
    padding: 10px 14px;
    text-align: left;
    vertical-align: top;
}

.article-body th {
    background: var(--surface-low);
    font-family: var(--font-serif);
}

.article-body figure {
    margin: 28px 0;
}

.article-body figure img,
.article-body figure video {
    width: 100%;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-light);
}

.article-body figure figcaption {
    margin-top: 10px;
    font-size: 0.85rem;
    color: var(--muted);
    text-align: center;
}

.article-body .image-row {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin: 28px 0;
}

.article-body .image-row figure {
    flex: 1 1 240px;
    margin: 0;
}

.sidebar-box .avatar-photo {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: var(--radius);
    object-fit: cover;
    display: block;
}

.article-body .image-placeholder {
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    background: var(--surface-low);
    color: var(--muted);
    text-align: center;
    padding: 34px 16px;
    margin: 24px 0;
    font-size: 0.85rem;
}

.article-body .core-insight {
    background: var(--accent-container);
    color: var(--accent-container-text);
    border-left: 4px solid var(--accent);
    border-radius: 0 var(--radius) var(--radius) 0;
    padding: 14px 20px;
    margin: 24px 0;
    font-size: 0.95rem;
}

/* Sidebar */
.sidebar-box {
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
    padding: 24px;
    margin-bottom: 24px;
    text-align: center;
}

.sidebar-box .placeholder-avatar {
    width: 100%;
    aspect-ratio: 1 / 1;
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    background: var(--surface-low);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    gap: 8px;
}

.sidebar-box .placeholder-avatar svg { width: 56%; height: 56%; color: var(--accent); }
.sidebar-box .placeholder-avatar span { font-size: 0.8rem; }

.sidebar-box .name {
    font-family: var(--font-serif);
    font-weight: 700;
    margin: 16px 0 4px;
    font-size: 1.1rem;
}
.sidebar-box .role { color: var(--muted); font-size: 0.85rem; margin-bottom: 14px; }

.ad-box {
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    background: var(--accent-container);
    box-shadow: var(--shadow);
    padding: 28px 20px;
    text-align: center;
    margin-bottom: 24px;
}

.ad-box .badge-circle {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--surface);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    font-family: var(--font-serif);
    font-weight: 700;
}

.ad-box .badge-text {
    font-family: var(--font-serif);
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--accent-container-text);
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 14px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.social-links a {
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--muted);
    border: 1px solid var(--border-light);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.social-links a:hover {
    background: var(--accent-container);
    color: var(--accent-container-text);
    border-color: var(--accent-container);
}

/* Footer */
.site-footer {
    border-top: 1px solid var(--border-light);
    background: var(--surface-low);
    padding: 40px 20px 48px;
    text-align: center;
    color: var(--muted);
    font-size: 0.85rem;
}

.site-footer .social-links { margin-bottom: 16px; }

.placeholder-note {
    background: var(--accent-container);
    border: 1px dashed var(--accent);
    border-radius: var(--radius);
    color: var(--accent-container-text);
    font-size: 0.85rem;
    padding: 10px 16px;
    margin-bottom: 20px;
}
