/*
Theme Name: Selarik
Description: Tema personal blog minimalis, terinspirasi dari tema "Logs" HTMLy. Dibuat khusus untuk selarik.net.
Author: Fani
Version: 1.0
*/

/* ---- Reset ---- */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --font-sans: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

    --bg-page: #FAFAFA;
    --bg-surface: #FFFFFF;
    --text-main: #2b2b2b;
    --text-heading: #111111;
    --text-muted: #6B7280;
    --text-faint: #9CA3AF;
    --border-color: #E5E7EB;
    --border-faint: #F0F0F0;
    --link-color: #2563eb;
    --link-hover: #1d4ed8;
    --thumb-bg: #eee;
    --search-bg: #FFFFFF;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg-page: #15181D;
        --bg-surface: #1B1F26;
        --text-main: #D1D5DB;
        --text-heading: #F3F4F6;
        --text-muted: #9CA3AF;
        --text-faint: #6B7280;
        --border-color: #2D323C;
        --border-faint: #23272F;
        --link-color: #60A5FA;
        --link-hover: #93C5FD;
        --thumb-bg: #2D323C;
        --search-bg: #23272F;
    }
}

body {
    font-size: 16px;
    line-height: 1.7em;
    font-family: var(--font-sans);
    background: var(--bg-page);
    color: var(--text-main);
    -webkit-font-smoothing: antialiased;
}

img { border: 0 none; height: auto; max-width: 100%; }

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-sans);
    line-height: 1.3;
    margin: 0.5em 0;
    font-weight: 700;
    letter-spacing: -0.01em;
}

h1 { font-size: 30px; }
h2 { font-size: 22px; }
h3 { font-size: 17px; }

a { color: var(--link-color); text-decoration: none; }
a:hover { color: var(--link-hover); text-decoration: underline; }

p { margin: 1em 0; }

blockquote {
    font-style: italic;
    margin: 1em 0 1em 1em;
    border-left: 3px solid var(--border-color);
    padding-left: 1em;
    color: var(--text-muted);
}

ul, ol { padding-left: 30px; margin: 1em 0; }
ul li, ol li { margin: 0.25em 0; }

/* ---- Layout ---- */
#cover { padding: 0 0 20px 0; }

#header-wrapper { width: 100%; }
#header {
    max-width: 950px;
    margin: 0 auto;
    padding: 0 15px;
}

#branding {
    text-align: left;
    margin: 1.5em 0 0.5em 0;
}
#branding a { text-decoration: none; color: var(--text-heading); }
#branding a:hover { text-decoration: none; }
#branding h1, #branding h2 {
    font-size: 32px;
    font-family: var(--font-sans);
    font-weight: 800;
    letter-spacing: -0.02em;
    margin: 0;
}
.blog-tagline { margin: 0.3em 0 0 0; font-style: normal; color: var(--text-muted); font-size: 15px; }

#menu-wrapper {
    width: 100%;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 24px;
}
#menu {
    max-width: 950px;
    margin: 0 auto;
    padding: 0 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}
#menu ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; }
#menu ul li { padding: 0 14px 0 0; margin: 0; }
#menu ul li:first-child { padding-left: 0; }
#menu a { text-decoration: none; font-family: var(--font-sans); font-size: 14px; font-weight: 600; color: var(--text-main); }
#menu a:hover { text-decoration: none; color: var(--link-color); }

#search-toggle {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    padding: 4px;
    display: flex;
    align-items: center;
}
#search-toggle:hover { color: var(--link-color); }

#search-form {
    display: none;
    align-items: center;
    gap: 6px;
    margin-left: 8px;
}
#search-form.is-open { display: flex; }

#search-form input[type="search"] {
    border: 1px solid var(--border-color);
    padding: 6px 10px;
    border-radius: 6px;
    font-family: var(--font-sans);
    font-size: 14px;
    background: var(--search-bg);
    color: var(--text-main);
}
#search-form input[type="submit"] {
    background: var(--link-color);
    border: 1px solid var(--link-color);
    color: #fff;
    padding: 6px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-family: var(--font-sans);
    font-size: 14px;
    font-weight: 600;
}
#search-form input[type="submit"]:hover { background: var(--link-hover); }

#main-wrapper {
    background: var(--bg-surface);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}
#main {
    max-width: 950px;
    margin: 0 auto;
    padding: 36px 15px;
    overflow: hidden;
}

#content { width: 700px; float: left; padding-right: 50px; }

.post {
    margin: 0 0 28px 0;
    overflow: hidden;
    border-bottom: 1px solid var(--border-faint);
    padding-bottom: 28px;
}
.post:last-child { border-bottom: none; }

.title-index a { border: none; color: var(--text-heading); }
.title-index a:hover { color: var(--link-color); text-decoration: none; }

.date {
    color: var(--text-faint);
    font-size: 13px;
    font-family: var(--font-sans);
    margin: 0.6em 0;
}
.date a { color: var(--text-muted); }

.teaser-body, .post-body { margin-top: 0.5em; color: var(--text-main); }
.teaser-body.has-thumb { overflow: hidden; }

.thumbnail {
    float: left;
    height: 72px;
    width: 72px;
    margin: 0 16px 5px 0;
    overflow: hidden;
    display: block;
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    background-color: var(--thumb-bg);
    border-radius: 8px;
}

.pager {
    text-align: center;
    margin: 1.5em 0;
    font-size: 15px;
}
.pager .nav-previous, .pager .nav-next { display: inline-block; margin: 0 1em; }

/* single post extras */
.title-post { margin-top: 0; }
.tags { margin-top: 1em; font-size: 14px; color: var(--text-muted); }
.postnav { margin-top: 2em; overflow: hidden; font-size: 15px; }
.postnav .nav-previous { float: left; }
.postnav .nav-next { float: right; }

/* ---- Sidebar ---- */
#sidebar {
    float: left;
    width: 200px;
    color: var(--text-main);
    font-size: 14px;
    line-height: 1.5;
}
#sidebar h3 {
    color: var(--text-heading);
    border-bottom: 1px solid var(--border-color);
    margin: 0 0 1em 0;
    padding-bottom: 6px;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
#sidebar ul { list-style: none; margin: 0; padding: 0; }
#sidebar li { margin: 0.5em 0; font-size: 14px; }
.views-count { display: block; color: var(--text-faint); font-size: 12px; }
.widget { margin-bottom: 2em; }

/* ---- Footer ---- */
#copyright-wrapper {
    margin: 24px 0 0 0;
    font-size: 13px;
}
#copyright {
    text-align: center;
    color: var(--text-faint);
    max-width: 950px;
    margin: 0 auto;
    padding: 0 15px;
}

/* ---- Responsive ---- */
@media all and (max-width: 1024px) {
    #header, #menu, #main { max-width: 95%; }
    #content { width: 73%; padding-right: 5%; }
    #sidebar { width: 22%; }
}

@media all and (max-width: 640px) {
    #content { width: 100%; padding-right: 0; float: none; }
    #sidebar { width: 100%; float: none; }
    #branding, #menu { text-align: center; justify-content: center; }
    #menu ul { justify-content: center; width: 100%; margin-bottom: 10px; }
    #search-form.is-open { width: 100%; margin-left: 0; margin-top: 8px; }
    #search-form.is-open input[type="search"] { flex: 1; }
}
