/*
Theme Name: Cerdaskita
Theme URI: https:\//cerdaskita.my.id
Author: Achmad
Author URI: https://cerdaskita.my.id
Description: Tema putih minimalis untuk Cerdaskita — catatan dan coretan tentang teknologi.
Version: 1.1
License: GPL v2 or later
Text Domain: cerdaskita
*/

/* =====================
   CSS VARIABLES
   ===================== */
:root {
    --accent: #2563eb;        /* Electric Blue — satu accent, dikunci di seluruh tema */
    --accent-hover: #1d4ed8;
}

/* =====================
   RESET & BASE
   ===================== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #ffffff;
    color: #1e1e1e;
    line-height: 1.7;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* =====================
   NAVBAR
   ===================== */
.navbar {
    background: #ffffff;
    border-bottom: 1px solid #d1d5db;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    padding: 0.8rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.logo {
    font-size: 1.2rem;
    font-weight: 700;
    color: #1e1e1e;
    text-decoration: none;
}

.logo span {
    color: #6b7280;
}

.nav-links {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    list-style: none;
}

.nav-links a {
    color: #374151;
    font-weight: 500;
    white-space: nowrap;
    text-decoration: none;
    font-size: 0.9rem;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    transition: background 0.2s, color 0.15s;
    position: relative;
}

.nav-links a:hover {
    color: #111111;
    background: #f3f4f6;
}

/* Current page / active menu item */
.nav-links .current-menu-item > a,
.nav-links .current_page_item > a {
    color: #111111;
    background: #f3f4f6;
    font-weight: 600;
}

.nav-links .current-menu-item > a::after,
.nav-links .current_page_item > a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 16px;
    height: 2.5px;
    background: var(--accent);
    border-radius: 2px;
}

.btn-masuk {
    background: #1e1e1e;
    color: #fff !important;
    padding: 0.4rem 1.2rem;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.85rem;
    transition: background 0.15s;
}

.btn-masuk:hover {
    background: #333 !important;
    color: #fff !important;
}

/* Hamburger button */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 36px;
    height: 36px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: #1e1e1e;
    border-radius: 2px;
    transition: transform 0.25s ease, background-color 0.25s ease;
    transform-origin: center;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-search {
    position: relative;
}

.nav-search-input {
    width: 200px;
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    border: 1px solid #e5e7eb;
    background: #f9fafb;
    color: #1e1e1e;
    font-size: 0.85rem;
    outline: none;
    transition: border-color 0.15s, width 0.2s;
}

.nav-search-input:focus {
    width: 260px;
    border-color: #9ca3af;
}

.nav-search-input:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* Hamburger animasi → X */
.nav-toggle.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.nav-toggle.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* =====================
   HERO
   ===================== */
.hero {
    padding: 5.5rem 0 3.5rem;
    text-align: center;
}

.hero h1 {
    font-size: clamp(2.2rem, 5vw, 3.8rem);
    font-weight: 700;
    color: #1e1e1e;
    margin-bottom: 1rem;
    line-height: 1.15;
    letter-spacing: -0.02em;
    max-width: 18ch;
    margin-left: auto;
    margin-right: auto;
}

.hero p {
    font-size: 1rem;
    color: #6b7280;
    max-width: 480px;
    margin: 0 auto 1.5rem;
}

.search-box {
    display: flex;
    max-width: 420px;
    gap: 0.5rem;
}

.search-box input {
    flex: 1;
    padding: 0.7rem 1rem;
    border-radius: 999px;
    border: 1px solid #e5e7eb;
    background: #f9fafb;
    color: #1e1e1e;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.15s;
}

.search-box input:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.search-box input:focus {
    border-color: #9ca3af;
}

.search-box button {
    background: var(--accent);
    color: #fff;
    padding: 0.7rem 1.5rem;
    border-radius: 999px;
    border: none;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.15s;
}

.search-box button:hover {
    background: var(--accent-hover);
}

/* =====================
   CATEGORIES
   ===================== */
.categories {
    padding: 2rem 0;
}

.cat-grid {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.cat-grid a,
.cat-item {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(147,197,253,0.35);
    border-radius: 999px;
    padding: 0.45rem 1rem;
    font-size: 0.85rem;
    color: #e5e7eb;
    text-decoration: none;
    transition: all 0.2s;
}
.cat-item svg {
    width: 15px;
    height: 15px;
    color: #93c5fd;
    flex-shrink: 0;
}

.cat-grid a:hover {
    background: #ffffff;
    color: #1e3a8a;
    border-color: #ffffff;
    transform: translateY(-2px);
}
.cat-grid a:hover svg {
    color: #1e3a8a;
}

/* =====================
   ARTICLES GRID
   ===================== */
.articles {
    padding: 3rem 0;
}

.articles h2 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1e1e1e;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #f3f4f6;
}

.art-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.art-card {
    border: 1px solid #f3f4f6;
    border-radius: 12px;
    padding: 1.5rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
    background: #ffffff;
}

.art-card:hover {
    border-color: #d1d5db;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.07);
    transform: translateY(-3px);
}

.art-card .tag {
    display: inline-block;
    color: var(--accent);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.3px;
}

.art-card h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #1e1e1e;
    margin: 0.5rem 0 0.3rem;
    line-height: 1.4;
}

.art-card h3 a {
    color: #1e1e1e;
    text-decoration: none;
    transition: color 0.15s;
}

.art-card h3 a:hover {
    color: #374151;
}

.art-card p {
    font-size: 0.85rem;
    color: #6b7280;
    line-height: 1.6;
}

.card-excerpt {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    overflow-wrap: break-word;
}

.art-card .meta {
    display: flex;
    gap: 1rem;
    font-size: 0.75rem;
    color: #9ca3af;
    margin-top: 0.8rem;
    flex-wrap: wrap;
}

/* =====================
   SINGLE POST
   ===================== */
.art-single {
    max-width: 720px;
    margin: 0 auto;
    padding: 3rem 1.5rem;
}

.art-single h1 {
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    font-weight: 700;
    margin: 0.5rem 0;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.art-single .meta {
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
    color: #9ca3af;
    margin: 0.5rem 0 2rem;
    flex-wrap: wrap;
}

.art-single .tag {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--accent);
}

.art-single .tag a {
    color: var(--accent);
    text-decoration: none;
}

.art-single .content {
    font-size: 1rem;
    line-height: 1.8;
}

.art-single .content p {
    text-align: justify;
    margin-bottom: 1.2rem;
}

.art-single .content h2,
.art-single .content h3 {
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    font-weight: 700;
    line-height: 1.3;
}

.art-single .content ul,
.art-single .content ol {
    margin: 0 0 1.2rem 1.5rem;
}

.art-single .content li {
    text-align: justify;
    margin-bottom: 0.4rem;
}

.art-single .content blockquote {
    border-left: 3px solid var(--accent);
    margin: 1.5rem 0;
    padding: 0.5rem 1.2rem;
    color: #6b7280;
    font-style: italic;
}

.art-single .content code {
    background: #f3f4f6;
    border-radius: 4px;
    padding: 0.15em 0.4em;
    font-size: 0.875em;
    font-family: 'Fira Code', 'Courier New', monospace;
}

.art-single .content pre {
    background: #f3f4f6;
    border-radius: 8px;
    padding: 1.2rem;
    overflow-x: auto;
    margin: 1.5rem 0;
}

.art-single .content pre code {
    background: none;
    padding: 0;
    font-size: 0.875rem;
}

.art-single .content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 0.8rem 0;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.art-single .content img:hover {
    transform: scale(1.01);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}
.art-single .content .wp-block-image {
    margin: 0.8rem 0;
}
.art-single .content figure img {
    margin: 0;
}
.art-single .content .wp-block-image figcaption,
.art-single .content figure figcaption {
    text-align: center;
    font-size: 0.82rem;
    line-height: 1.5;
    color: #6b7280;
    margin: 0.75rem auto 0;
    padding-top: 0.6rem;
    max-width: 90%;
    border-top: 1px solid #e5e7eb;
    font-style: italic;
    letter-spacing: 0.01em;
}
.art-single .content .wp-block-image.aligncenter {
    text-align: center;
}
.art-single .content .wp-block-image.alignwide {
    margin-left: -1rem;
    margin-right: -1rem;
}

/* =====================
   FOOTER
   ===================== */
.footer {
    padding: 4rem 0 0;
    border-top: 1px solid #1e3a8a;
    font-size: 0.85rem;
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
    color: #e5e7eb;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-brand-center {
    text-align: center;
    margin-bottom: 2.5rem;
}

.footer-brand-center .footer-logo {
    display: inline-block;
    font-size: 1.4rem;
    color: #f9fafb;
}

.footer-brand-center .footer-logo span {
    color: #93c5fd;
}

.footer-brand-center .footer-tagline {
    margin: 0.5rem auto 0;
    max-width: 42ch;
}

.footer-col {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.footer-logo {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e1e1e;
    text-decoration: none;
    letter-spacing: -0.02em;
}

.footer-logo span {
    color: #6b7280;
}

.footer-tagline {
    color: #cbd5e1;
    font-size: 0.85rem;
    max-width: 28ch;
    line-height: 1.5;
}

.footer-social {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.3rem;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    color: #e5e7eb;
    background: rgba(255,255,255,0.12);
    transition: all 0.2s;
}

.social-link:hover {
    color: #1e3a8a;
    background: #ffffff;
    transform: translateY(-2px);
}

.footer-nav {
    margin: 0;
}

.footer-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-links a {
    color: #e5e7eb;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.15s;
    display: inline-block;
    position: relative;
}

.footer-links a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 0;
    height: 1.5px;
    background: #93c5fd;
    transition: width 0.2s;
}

.footer-links a:hover {
    color: #93c5fd;
}

.footer-links a:hover::after {
    width: 100%;
}

.footer-info-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-info-list a {
    color: #e5e7eb;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.15s;
    display: inline-block;
    position: relative;
}

.footer-info-list a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 0;
    height: 1.5px;
    background: #93c5fd;
    transition: width 0.2s;
}

.footer-info-list a:hover {
    color: #93c5fd;
}

.footer-info-list a:hover::after {
    width: 100%;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.15);
    padding-top: 1.5rem;
    padding-bottom: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.footer-copy {
    color: #cbd5e1;
    font-size: 0.8rem;
    margin: 0;
}

.footer-heading {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #bfdbfe;
    margin: 0 0 1rem;
}
.footer-heading svg {
    width: 16px;
    height: 16px;
    color: #93c5fd;
    flex-shrink: 0;
}

/* =====================
   SKIP LINK (aksesibilitas)
   ===================== */
.skip-link {
    position: absolute;
    top: -100%;
    left: 1rem;
    background: #1e1e1e;
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 0 0 6px 6px;
    font-size: 0.85rem;
    text-decoration: none;
    z-index: 9999;
    transition: top 0.15s;
}

.skip-link:focus {
    top: 0;
}

/* =====================
   FOCUS VISIBLE
   ===================== */
:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 3px;
}

/* =====================
   READING PROGRESS BAR
   ===================== */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: #1e1e1e;
    z-index: 9999;
    transition: width 0.1s linear;
}

/* =====================
   FEATURED IMAGE — CARD
   ===================== */
.card-thumb {
    display: block;
    margin: -1.5rem -1.5rem 1rem;
    border-radius: 12px 12px 0 0;
    overflow: hidden;
}

.card-thumb img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.art-card .read-more {
    display: inline-block;
    margin-top: 0.8rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: #2563eb;
    text-decoration: none;
    transition: gap 0.2s ease;
}
.art-card .read-more:hover {
    text-decoration: underline;
}
.art-card:hover .card-thumb img {
    transform: scale(1.03);
}

/* =====================
   FEATURED IMAGE — SINGLE
   ===================== */
.single-thumb {
    margin: 1.5rem 0 2rem;
    border-radius: 12px;
    overflow: hidden;
}

.single-thumb img {
    width: 100%;
    height: auto;
    display: block;
    max-height: 480px;
    object-fit: cover;
}

/* =====================
   TAG LINK
   ===================== */
.tag a,
.art-single .tag a {
    color: inherit;
    text-decoration: none;
}

.tag a:hover,
.art-single .tag a:hover {
    text-decoration: underline;
}

/* =====================
   POST NAVIGATION (prev/next)
   ===================== */
.post-nav {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #f3f4f6;
}

.post-nav .nav-links {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    list-style: none;
    flex-wrap: wrap;
    margin-top: 0;
}

.post-nav .nav-previous,
.post-nav .nav-next {
    flex: 1;
    min-width: 0;
}

.post-nav .nav-next {
    text-align: right;
}

.post-nav a {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    text-decoration: none;
    color: #1e1e1e;
}

.post-nav .post-nav-label {
    font-size: 0.75rem;
    color: #9ca3af;
    font-weight: 500;
}

.post-nav .post-nav-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #1e1e1e;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.15s;
}

.post-nav a:hover .post-nav-title {
    color: #374151;
}

/* =====================
   RELATED POSTS
   ===================== */
.related-posts {
    padding: 3rem 0;
    border-top: 1px solid #f3f4f6;
    margin-top: 1rem;
}

.related-posts h2 {
    font-size: 0.9rem;
    font-weight: 600;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1.2rem;
}

/* =====================
   PAGINATION
   ===================== */
.navigation.pagination .nav-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    justify-content: center;
    margin-top: 2.5rem;
    list-style: none;
    padding: 0;
}

.page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 0.6rem;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.85rem;
    color: #6b7280;
    text-decoration: none;
    transition: border-color 0.15s, color 0.15s, background-color 0.15s;
    background: #fff;
}

.page-numbers:hover {
    border-color: #9ca3af;
    color: #1e1e1e;
}

.page-numbers.current {
    background: #1e1e1e;
    border-color: #1e1e1e;
    color: #fff;
    font-weight: 600;
}

.page-numbers.dots {
    border-color: transparent;
    background: none;
    cursor: default;
}

/* =====================
   ARCHIVE HEADER
   ===================== */
.archive-header {
    padding: 3rem 0 1.5rem;
    border-bottom: 1px solid #f3f4f6;
    margin-bottom: 0;
}

.archive-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.4rem;
}

.archive-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #1e1e1e;
    line-height: 1.3;
}

.archive-count {
    font-size: 0.85rem;
    color: #9ca3af;
    margin-top: 0.4rem;
}

.archive-desc {
    font-size: 0.95rem;
    color: #6b7280;
    margin-top: 0.6rem;
    max-width: 600px;
}

/* =====================
   404 PAGE
   ===================== */
.not-found {
    padding: 6rem 0;
    text-align: center;
}

.not-found-inner {
    max-width: 480px;
    margin: 0 auto;
}

.not-found-code {
    display: block;
    font-size: 5rem;
    font-weight: 700;
    color: #f3f4f6;
    line-height: 1;
    margin-bottom: 1rem;
    letter-spacing: -4px;
}

.not-found h1 {
    font-size: 1.4rem;
    font-weight: 700;
    color: #1e1e1e;
    margin-bottom: 0.5rem;
}

.not-found > .not-found-inner > p {
    color: #6b7280;
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

.btn-home {
    display: inline-block;
    background: #1e1e1e;
    color: #fff;
    padding: 0.6rem 1.4rem;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: background 0.15s;
    margin-bottom: 2.5rem;
}

.btn-home:hover {
    background: #333;
}

.not-found-search p {
    font-size: 0.85rem;
    color: #9ca3af;
    margin-bottom: 0.75rem;
}

/* =====================
   COMMENTS
   ===================== */
.comments-wrap {
    padding: 3rem 0;
    max-width: 720px;
    margin: 0 auto;
}

.comments-wrap .comments-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: #1e1e1e;
}

.comments-wrap .comment-body {
    padding: 1rem 0;
    border-top: 1px solid #f3f4f6;
    font-size: 0.9rem;
}

.comments-wrap .comment-author {
    font-weight: 600;
    font-size: 0.85rem;
}

.comments-wrap .comment-metadata {
    font-size: 0.75rem;
    color: #9ca3af;
    margin-bottom: 0.5rem;
}

.comments-wrap .comment-content p {
    margin-bottom: 0.75rem;
}

.comments-wrap .comment-reply-link {
    font-size: 0.8rem;
    color: #6b7280;
    text-decoration: none;
}

.comments-wrap .comment-reply-link:hover {
    color: #1e1e1e;
}

.comments-wrap .comment-form label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 0.3rem;
    color: #374151;
}

.comments-wrap .comment-form input[type="text"],
.comments-wrap .comment-form input[type="email"],
.comments-wrap .comment-form input[type="url"],
.comments-wrap .comment-form textarea {
    width: 100%;
    padding: 0.6rem 0.9rem;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.9rem;
    font-family: inherit;
    background: #f9fafb;
    color: #1e1e1e;
    outline: none;
    transition: border-color 0.15s;
    margin-bottom: 1rem;
}

.comments-wrap .comment-form input:focus-visible,
.comments-wrap .comment-form textarea:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.comments-wrap .comment-form input:focus,
.comments-wrap .comment-form textarea:focus {
    border-color: #9ca3af;
    background: #fff;
}

.comments-wrap .comment-form textarea {
    min-height: 120px;
    resize: vertical;
}

.comments-wrap .form-submit .submit {
    background: #1e1e1e;
    color: #fff;
    border: none;
    padding: 0.6rem 1.4rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s;
    font-family: inherit;
}

.comments-wrap .form-submit .submit:hover {
    background: #333;
}

/* =====================
   NO POSTS
   ===================== */
.no-posts {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem 0;
    color: #9ca3af;
    font-size: 0.95rem;
}

/* =====================
   BACK TO TOP
   ===================== */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 40px;
    height: 40px;
    background: #1e1e1e;
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease, background 0.15s;
    z-index: 200;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: #333;
}

.back-to-top svg {
    width: 18px;
    height: 18px;
}

/* =====================
   KONTAK FORM
   ===================== */
.kontak-wrap {
    max-width: 640px;
    margin: 0 auto;
}

.kontak-alert {
    padding: 0.9rem 1.1rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    font-size: 0.92rem;
    line-height: 1.5;
}

.kontak-alert--ok {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.kontak-alert--err {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.kontak-alert--err ul {
    margin: 0;
    padding-left: 1.2rem;
}

.kontak-form {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

.kontak-field {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.kontak-field label {
    font-size: 0.88rem;
    font-weight: 600;
    color: #374151;
}

.kontak-field input,
.kontak-field textarea {
    font-family: inherit;
    font-size: 0.95rem;
    padding: 0.7rem 0.9rem;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    background: #ffffff;
    color: #1f2937;
    transition: border-color 0.15s, box-shadow 0.15s;
    resize: vertical;
}

.kontak-field input:focus,
.kontak-field textarea:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.kontak-submit {
    align-self: flex-start;
    background: #1e3a8a;
    color: #fff;
    border: none;
    padding: 0.7rem 1.6rem;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
}

.kontak-submit:hover {
    background: #2563eb;
}

.kontak-submit:active {
    transform: translateY(1px);
}

[data-theme="dark"] .kontak-field label { color: #e5e7eb; }
[data-theme="dark"] .kontak-field input,
[data-theme="dark"] .kontak-field textarea {
    background: #111827;
    border-color: #374151;
    color: #f9fafb;
}
[data-theme="dark"] .kontak-alert--ok {
    background: #064e3b;
    color: #d1fae5;
    border-color: #065f46;
}
[data-theme="dark"] .kontak-alert--err {
    background: #7f1d1d;
    color: #fee2e2;
    border-color: #991b1b;
}

/* =====================
   SIDE DOWN (icon lingkaran ke bawah)
   ===================== */
.side-down {
    position: fixed;
    bottom: 5rem;
    right: 2rem;
    width: 40px;
    height: 40px;
    background: #1e1e1e;
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 1.1rem;
    text-decoration: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease, background 0.15s;
    z-index: 200;
    box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}

.side-down svg {
    width: 18px;
    height: 18px;
}

.side-down.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.side-down:hover {
    background: #333;
}

/* =====================
   DARK MODE
   ===================== */
/* Transisi halus saat ganti tema */
body,
.navbar,
.art-card,
.footer,
.nav-search-input,
.cat-grid a {
    transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

/* Honor prefers-reduced-motion — matikan semua animasi/transisi */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .art-card:hover {
        transform: none;
    }

    .art-card .read-more {
    display: inline-block;
    margin-top: 0.8rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: #2563eb;
    text-decoration: none;
    transition: gap 0.2s ease;
}
.art-card .read-more:hover {
    text-decoration: underline;
}
.art-card:hover .card-thumb img {
        transform: none;
    }
}

/* Tombol toggle dark/light */
.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    cursor: pointer;
    padding: 0.3rem 0.45rem;
    color: #6b7280;
    transition: color 0.2s, border-color 0.2s, background 0.2s;
    line-height: 1;
    flex-shrink: 0;
}

.theme-toggle:hover {
    color: #1e1e1e;
    border-color: #9ca3af;
    background: #f9fafb;
}

/* Default: tampilkan ikon bulan (artinya mode sekarang terang) */
.icon-sun  { display: none; }
.icon-moon { display: block; }

/* Saat dark mode aktif: tampilkan ikon matahari */
[data-theme="dark"] .icon-sun  { display: block; }
[data-theme="dark"] .icon-moon { display: none; }

[data-theme="dark"] .theme-toggle {
    border-color: #2a2a2a;
    color: #9ca3af;
}

[data-theme="dark"] .theme-toggle:hover {
    color: #f9fafb;
    border-color: #4b5563;
    background: #1a1a1a;
}

/* ponytail: @media prefers-color-scheme dihapus — JS di ui.js sudah set data-theme dari OS, jadi @media jadi dead code */
[data-theme="dark"] {
    --accent: #3b82f6;       /* Biru sedikit lebih terang di dark mode untuk kontras */
    --accent-hover: #2563eb;
}
[data-theme="dark"] body {
    background: #111111;
    color: #e5e7eb;
}
[data-theme="dark"] .navbar { background: #111111; border-bottom-color: #333333; box-shadow: 0 1px 3px rgba(0,0,0,0.3); }
[data-theme="dark"] .logo { color: #f9fafb; }
[data-theme="dark"] .logo span { color: #6b7280; }
[data-theme="dark"] .nav-links a { color: #d1d5db; }
[data-theme="dark"] .nav-links a:hover { color: #ffffff; background: #1f1f1f; }
[data-theme="dark"] .btn-masuk { background: #f9fafb !important; color: #111111 !important; }
[data-theme="dark"] .btn-masuk:hover { background: #e5e7eb !important; color: #111111 !important; }
[data-theme="dark"] .nav-toggle span { background: #e5e7eb; }
[data-theme="dark"] .hero h1 { color: #f9fafb; }
[data-theme="dark"] .cat-grid a,
[data-theme="dark"] .cat-item { background: #1a1a1a; border-color: #2a2a2a; color: #9ca3af; }
[data-theme="dark"] .cat-grid a:hover { background: #222; border-color: #3a3a3a; color: #e5e7eb; }
[data-theme="dark"] .art-card { background: #161616; border-color: #1f1f1f; }
[data-theme="dark"] .art-card:hover { border-color: #2a2a2a; box-shadow: 0 4px 16px rgba(0,0,0,0.4); }
[data-theme="dark"] .art-card h3 a { color: #f9fafb; }
[data-theme="dark"] .art-card h3 a:hover { color: #e5e7eb; }
[data-theme="dark"] .art-card p { color: #9ca3af; }
[data-theme="dark"] .art-single h1 { color: #f9fafb; }
[data-theme="dark"] .art-single .content h2,
[data-theme="dark"] .art-single .content h3 { color: #f9fafb; }
[data-theme="dark"] .art-single .content blockquote { border-left-color: #2a2a2a; color: #9ca3af; }
[data-theme="dark"] .art-single .content code { background: #1a1a1a; color: #e5e7eb; }
[data-theme="dark"] .art-single .content pre { background: #1a1a1a; }
[data-theme="dark"] .footer { background: #0f0f0f; border-top-color: #1f1f1f; }
[data-theme="dark"] .footer-logo { color: #f9fafb; }
[data-theme="dark"] .footer-logo span { color: #6b7280; }
[data-theme="dark"] .footer { background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 100%); border-top-color: #1e3a8a; }
[data-theme="dark"] .footer-tagline { color: #cbd5e1; }
[data-theme="dark"] .footer-copy { color: #4b5563; }
[data-theme="dark"] .footer-links a { color: #9ca3af; }
[data-theme="dark"] .footer-links a:hover { color: #f9fafb; }
[data-theme="dark"] .footer-links a::after { background: #f9fafb; }
[data-theme="dark"] .footer-info-list a { color: #9ca3af; }
[data-theme="dark"] .footer-info-list a:hover { color: #f9fafb; }
[data-theme="dark"] .footer-info-list a::after { background: #f9fafb; }
[data-theme="dark"] .footer-heading { color: #4b5563; }
[data-theme="dark"] .footer-bottom { border-top-color: #1f1f1f; }
[data-theme="dark"] .social-link { background: #1a1a1a; color: #4b5563; }
[data-theme="dark"] .social-link:hover { background: #2a2a2a; color: #e5e7eb; }
[data-theme="dark"] .post-nav { border-top-color: #1f1f1f; }
[data-theme="dark"] .post-nav .post-nav-title { color: #e5e7eb; }
[data-theme="dark"] .post-nav a:hover .post-nav-title { color: #9ca3af; }
[data-theme="dark"] .related-posts { border-top-color: #1f1f1f; }
[data-theme="dark"] .page-numbers { background: #161616; border-color: #2a2a2a; color: #9ca3af; }
[data-theme="dark"] .page-numbers:hover { border-color: #4b5563; color: #e5e7eb; }
[data-theme="dark"] .page-numbers.current { background: #f9fafb; border-color: #f9fafb; color: #111111; }
[data-theme="dark"] .archive-header { border-bottom-color: #1f1f1f; }
[data-theme="dark"] .archive-title { color: #f9fafb; }
[data-theme="dark"] .not-found-code { color: #1f1f1f; }
[data-theme="dark"] .not-found h1 { color: #f9fafb; }
[data-theme="dark"] .btn-home { background: #f9fafb; color: #111111; }
[data-theme="dark"] .btn-home:hover { background: #e5e7eb; }
[data-theme="dark"] .back-to-top { background: #f9fafb; color: #111111; }
[data-theme="dark"] .nav-overlay { background: rgba(0, 0, 0, 0.6); }
[data-theme="dark"] .back-to-top:hover { background: #e5e7eb; }
[data-theme="dark"] .reading-progress { background: #f9fafb; }
[data-theme="dark"] .skip-link { background: #f9fafb; color: #111111; }
[data-theme="dark"] .comments-wrap .comment-form input[type="text"],
[data-theme="dark"] .comments-wrap .comment-form input[type="email"],
[data-theme="dark"] .comments-wrap .comment-form input[type="url"],
[data-theme="dark"] .comments-wrap .comment-form textarea { background: #1a1a1a; border-color: #2a2a2a; color: #e5e7eb; }
[data-theme="dark"] .comments-wrap .comment-form input:focus,
[data-theme="dark"] .comments-wrap .comment-form textarea:focus { border-color: #4b5563; background: #1f1f1f; }
[data-theme="dark"] .comments-wrap .form-submit .submit { background: #f9fafb; color: #111111; }
[data-theme="dark"] .comments-wrap .form-submit .submit:hover { background: #e5e7eb; }
@media (max-width: 640px) {
    [data-theme="dark"] .nav-links { background: #161616; border-color: #1f1f1f; }
    [data-theme="dark"] .nav-links a:hover { background: #1a1a1a; }
}

[data-theme="dark"] .nav-links .current-menu-item > a,
[data-theme="dark"] .nav-links .current_page_item > a {
    color: #ffffff;
    background: #1f1f1f;
}

[data-theme="dark"] .nav-links .current-menu-item > a::after,
[data-theme="dark"] .nav-links .current_page_item > a::after {
    background: #3b82f6;
}

/* Light override (kalau OS dark tapi user pilih terang) */
[data-theme="light"] body { background: #ffffff; color: #1e1e1e; }
[data-theme="light"] .navbar { background: #ffffff; border-bottom-color: #d1d5db; box-shadow: 0 1px 3px rgba(0,0,0,0.04); }
[data-theme="light"] .art-card { background: #ffffff; border-color: #f3f4f6; }
[data-theme="light"] .footer-info-list a:hover { color: #1e1e1e; }
[data-theme="light"] .footer-info-list a::after { background: #1e1e1e; }
[data-theme="light"] .footer-bottom { border-top-color: #f3f4f6; }
@media (max-width: 640px) {
    [data-theme="light"] .nav-links a:hover { background: #f9fafb; }
    [data-theme="light"] .nav-links .current-menu-item > a,
    [data-theme="light"] .nav-links .current_page_item > a { background: #f9fafb; }
}

/* =====================
   NAV OVERLAY (mobile)
   ===================== */
.nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99;
    background: rgba(0, 0, 0, 0.4);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.nav-overlay.open {
    display: block;
    opacity: 1;
}

body.menu-open {
    overflow: hidden;
}

/* =====================
   MOBILE
   ===================== */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 1.6rem;
    }

    .hero {
        padding: 3rem 0 2rem;
    }

    /* Hamburger muncul */
    .nav-toggle {
        display: flex;
    }

    /* Nav-links jadi dropdown */
    .nav-links {
        display: none;
        position: absolute;
        top: calc(100% + 0.8rem);
        left: 0;
        right: 0;
        background: #ffffff;
        border: 1px solid #f0f0f0;
        border-radius: 10px;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 0.5rem 0;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
        z-index: 101;
        max-height: 70vh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .nav-links.open {
        display: flex;
    }

    .nav-links li {
        width: 100%;
    }

    .nav-links a {
        display: flex;
        align-items: center;
        min-height: 44px;
        padding: 0.75rem 1.25rem;
        font-size: 0.95rem;
        border-radius: 0;
        white-space: normal;
    }

    .nav-links a:hover {
        background: #f9fafb;
    }

    .nav-links .current-menu-item > a,
    .nav-links .current_page_item > a {
        background: #f3f4f6;
    }

    .nav-links .current-menu-item > a::after,
    .nav-links .current_page_item > a::after {
        display: none;
    }

    .nav-search {
        display: none;
    }

    .nav-search-input {
        display: none;
    }

    .art-list {
        grid-template-columns: 1fr;
    }

    .art-single {
        padding: 2rem 1rem;
    }

    .art-single h1 {
        font-size: 1.4rem;
    }

    .back-to-top {
        bottom: 1.25rem;
        right: 1.25rem;
        width: 36px;
        height: 36px;
    }

    .post-nav .nav-links {
        flex-direction: column;
    }

    .post-nav .nav-next {
        text-align: left;
    }

    .archive-title {
        font-size: 1.4rem;
    }
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    .footer-bottom {
        text-align: center;
    }
}
/* Form Kontak */
.kontak-form {
    max-width: 520px;
    margin-top: 1.5rem;
}
.kontak-form label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #374151;
}
.kontak-form input,
.kontak-form textarea {
    width: 100%;
    padding: 0.6rem 0.8rem;
    margin-top: 0.3rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.9rem;
    font-family: inherit;
}
.kontak-form input:focus,
.kontak-form textarea:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37,99,235,0.15);
}
.kontak-form button {
    margin-top: 0.5rem;
    background: #2563eb;
    color: #fff;
    border: none;
    padding: 0.6rem 1.5rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
.kontak-form button:hover {
    background: #1d4ed8;
}
[data-theme="dark"] .kontak-form label { color: #e5e7eb; }
[data-theme="dark"] .kontak-form input,
[data-theme="dark"] .kontak-form textarea {
    background: #1f2937;
    border-color: #374151;
    color: #e5e7eb;
}
.footer-info-list a {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}
.footer-info-list a svg {
    width: 15px;
    height: 15px;
    color: #93c5fd;
    flex-shrink: 0;
}
