/*
Theme Name: Ruang Tulis
Theme URI: https://wordpress.org/themes/
Author: Ruang tulis
Description: Tema jurnal pribadi yang bersih dan hitam-putih: kartu tulisan bergaris tegas, pencarian langsung, halaman baca yang tenang, dan bagian perkenalan "Tentang". Diubah dari desain Hostinger Horizons "ruang tulis.". Semua teks tetap bisa diubah dari Tampilan → Sesuaikan → Ruang Tulis.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.9
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ruang-tulis
Tags: blog, one-column, grid-layout, custom-logo, custom-menu, editor-style, featured-images, translation-ready
*/

/* ---------- Tokens ---------- */
:root {
	--ink: #111111;
	--paper: #ffffff;
	--clay: #111111;
	--subtle: #666666;
	--line: #d4d4d4;
	--white: #fff;
	--dark: #111111;
	--radius: 1rem;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font-family: 'Plus Jakarta Sans', sans-serif;
	font-size: 14px;
	-webkit-font-smoothing: antialiased;
}
button, input, a { -webkit-tap-highlight-color: transparent; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; color: inherit; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible { outline: 2px solid var(--clay); outline-offset: 5px; }
button:active { transform: translateY(1px); }
[hidden] { display: none !important; }
em { font-style: italic; font-weight: 600; color: var(--clay); }

.screen-reader-text {
	border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%);
	height: 1px; margin: -1px; overflow: hidden; padding: 0;
	position: absolute !important; width: 1px; word-wrap: normal !important;
}
.skip-link {
	position: absolute; left: 12px; top: -60px; z-index: 100;
	background: var(--ink); color: var(--white); padding: 10px 16px; border-radius: 8px; font-size: 12px;
}
.skip-link:focus { top: 12px; }

/* ---------- Header ---------- */
.site-header { border-bottom: 2px solid var(--ink); }
.header-inner {
	max-width: 1200px; margin: auto; padding: 0 40px; height: 96px;
	display: flex; align-items: center; justify-content: space-between; gap: 28px;
}
.wordmark {
	display: flex; align-items: center; gap: 11px;
	font-size: 23px; font-weight: 800; letter-spacing: -1px; white-space: nowrap;
}
.logo-mark {
	display: inline-flex; align-items: center; justify-content: center;
	height: 34px; color: var(--ink); font-size: 27px; font-weight: 800; letter-spacing: -1px;
	margin-left: -9px;
}
.logo-image { height: 34px; width: auto; display: block; }
.wordmark-dot { color: var(--clay); margin-left: -11px; }
.header-inner nav { display: flex; gap: 29px; height: 100%; align-items: center; }
.nav-link {
	display: flex; align-items: center; height: 100%; position: relative; padding: 0 2px;
	font-size: 12px; font-weight: 600; color: var(--subtle);
}
.nav-link.active { color: var(--ink); }
.nav-link.active::after {
	content: ''; position: absolute; bottom: 24px; left: calc(50% - 8px);
	width: 16px; height: 2px; background: var(--clay);
}
.nav-link:hover { color: var(--clay); }
.header-note { font-size: 10px; display: flex; align-items: center; gap: 10px; color: var(--subtle); white-space: nowrap; }

/* ---------- Layout ---------- */
#top { min-height: 100vh; display: flex; flex-direction: column; }
#top > main { flex: 1 0 auto; }
main { max-width: 1120px; margin: 0 auto; width: 100%; }

/* ---------- Introduction ---------- */
.introduction { padding: 76px 0 63px; position: relative; }
.intro-label { font-size: 9px; letter-spacing: 1.8px; font-weight: 700; display: flex; align-items: center; gap: 10px; color: var(--subtle); }
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--clay); flex: none; }
.introduction h1 {
	font-size: clamp(44px, 5.5vw, 66px); font-weight: 700; letter-spacing: -3.1px;
	line-height: 1.16; margin: 26px 0 23px;
}
.introduction > p { max-width: 440px; font-size: 13px; line-height: 1.9; color: var(--subtle); }
.intro-side {
	position: absolute; right: 0; bottom: 81px; font-size: 9px; letter-spacing: 1.6px; line-height: 1.9;
	color: #858585; border-left: 1.5px solid var(--line); padding-left: 20px;
}

/* ---------- Grid ---------- */
.writing-section { padding-bottom: 16px; }
.section-toolbar {
	display: flex; align-items: center; justify-content: space-between; gap: 16px;
	padding: 25px 0 26px; border-top: 2px solid var(--ink);
}
.section-toolbar h2 { font-size: 14px; font-weight: 700; margin: 0; display: flex; gap: 12px; align-items: center; }
.section-toolbar h2 > span { font-size: 10px; font-weight: 500; color: var(--subtle); border: 1px solid var(--line); padding: 2px 7px; border-radius: 5px; }
.search-field { display: flex; align-items: center; gap: 9px; color: var(--subtle); margin: 0; }
.search-field input {
	border: 0; background: transparent; width: 136px; font-size: 11px; outline-offset: 3px;
	color: var(--ink); padding: 0; -webkit-appearance: none; appearance: none;
}
.search-field input::-webkit-search-cancel-button { display: none; }
.search-field input::placeholder { color: var(--subtle); }
.search-field button { border: 0; background: transparent; padding: 3px; display: flex; color: var(--subtle); }
.article-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.article-card {
	border: 2.5px solid var(--ink); background: var(--white); border-radius: 16px;
	padding: 27px 27px 20px; text-align: left; display: flex; flex-direction: column; min-height: 280px;
	transition: background .2s, border-color .2s, transform .2s;
}
.article-card:hover { border-color: var(--clay); transform: translateY(-3px); }
.article-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 9px; color: var(--subtle); }
.category-tag { padding: 5px 9px; background: #f0f0f0; border-radius: 5px; color: #111111; font-weight: 700; }
.category-tag.category-kehidupan, .category-tag.category-perspektif { background: #f3f3f3; color: #444444; }
.article-card h3 { font-size: 21px; letter-spacing: -.65px; line-height: 1.5; font-weight: 700; margin: 24px 0 10px; max-width: 260px; }
.article-card p { font-size: 11px; line-height: 1.9; color: var(--subtle); margin: 0 0 25px; }
.article-bottom { margin-top: auto; display: flex; align-items: center; justify-content: space-between; }
.article-bottom > span:first-child { display: flex; align-items: center; gap: 6px; color: #777777; font-size: 9px; }
.read-arrow {
	display: flex; align-items: center; justify-content: center; border: 1px solid var(--line);
	height: 31px; width: 31px; border-radius: 50%; transition: background .2s, color .2s;
}
.article-card:hover .read-arrow { background: var(--ink); color: var(--white); border-color: var(--ink); }
.end-note {
	display: flex; justify-content: center; align-items: center; gap: 18px; margin: 53px 0 48px;
	font-style: italic; color: #858585; font-size: 12px; text-align: center;
}
.end-note > span { height: 2px; width: 35px; background: var(--ink); flex: none; }
.empty-state { padding: 70px 20px; text-align: center; border: 1px dashed var(--line); border-radius: 16px; }
.empty-state p { color: var(--subtle); }
.empty-button {
	display: inline-block; background: var(--ink); color: var(--white); border: 0;
	border-radius: 8px; padding: 12px 18px; font-size: 13px;
}

/* Pagination */
.pagination { margin-top: 40px; }
.pagination .nav-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; }
.pagination .page-numbers {
	min-width: 38px; height: 38px; padding: 0 12px; display: inline-flex; align-items: center; justify-content: center;
	border: 1.5px solid var(--line); border-radius: 8px; font-size: 12px; font-weight: 600;
}
.pagination .page-numbers.current { background: var(--ink); color: var(--white); border-color: var(--ink); }
.pagination a.page-numbers:hover { border-color: var(--ink); }

/* ---------- About (Tentang page content) ---------- */
.about-section { border-top: 2px solid var(--ink); padding: 50px 0 80px; display: grid; grid-template-columns: 1fr 2fr; gap: 40px; }
.about-index { font-size: 10px; color: var(--subtle); letter-spacing: 1px; }
.about-section h2 { font-size: 38px; font-weight: 700; letter-spacing: -1.5px; line-height: 1.3; margin: 0 0 28px; }
.about-section .prose-copy p { font-size: 14px; max-width: 580px; }

/* ---------- Reading view (single post / page) ---------- */
.reader-page { max-width: 760px; margin: 0 auto; }
.reader-content { padding: 48px 65px 64px; }
.back-button { display: inline-flex; align-items: center; gap: 8px; padding: 6px 0; font-size: 11px; color: var(--subtle); margin-bottom: 40px; }
.back-button:hover { color: var(--ink); }
.reader-meta { font-size: 11px; color: var(--clay); display: flex; gap: 10px; flex-wrap: wrap; }
.reader-meta a:hover { text-decoration: underline; }
.reader-title { font-size: 38px; font-weight: 700; letter-spacing: -1.3px; line-height: 1.3; margin: 18px 0; }
.reading-time { display: flex; gap: 6px; align-items: center; color: var(--subtle); font-size: 10px; margin-bottom: 35px; }
.reader-image { margin: 0 0 35px; }
.reader-image img { border-radius: 14px; display: block; width: 100%; }
.reader-signature { border-top: 1.5px solid var(--line); padding-top: 25px; margin-top: 34px; font-style: italic; color: var(--clay); font-size: 13px; }

/* Article body (block editor content) */
.prose-copy { font-size: 15px; line-height: 2; color: #555555; overflow-wrap: break-word; }
.prose-copy > * { margin: 0 0 22px; }
.prose-copy p { font-size: 15px; line-height: 2; color: #555555; margin: 0 0 22px; }
.prose-copy h2, .prose-copy h3, .prose-copy h4 { color: var(--ink); letter-spacing: -.6px; line-height: 1.35; margin: 40px 0 16px; }
.prose-copy h2 { font-size: 26px; }
.prose-copy h3 { font-size: 21px; }
.prose-copy h4 { font-size: 17px; }
.prose-copy a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.prose-copy strong { color: var(--ink); }
.prose-copy ul, .prose-copy ol { padding-left: 1.3em; }
.prose-copy li { margin-bottom: 6px; }
.prose-copy blockquote, .prose-copy .wp-block-quote {
	border-left: 2.5px solid var(--ink); margin: 32px 0; padding: 4px 0 4px 24px;
	font-style: italic; color: var(--ink);
}
.prose-copy blockquote p { color: var(--ink); }
.prose-copy cite { font-size: 12px; color: var(--subtle); font-style: normal; }
.prose-copy img { border-radius: 12px; }
.prose-copy figure { margin: 32px 0; }
.prose-copy figcaption, .wp-caption-text, .wp-element-caption { font-size: 11px; color: var(--subtle); text-align: center; margin-top: 10px; line-height: 1.6; }
.prose-copy hr, .wp-block-separator { border: 0; border-top: 1.5px solid var(--line); margin: 40px 0; }
.prose-copy pre { background: #f5f5f5; border-radius: 10px; padding: 18px; overflow-x: auto; font-size: 13px; line-height: 1.6; }
.prose-copy code { background: #f3f3f3; padding: 2px 5px; border-radius: 4px; font-size: .9em; }
.prose-copy pre code { background: none; padding: 0; }
.prose-copy table { width: 100%; border-collapse: collapse; font-size: 13px; line-height: 1.6; }
.prose-copy th, .prose-copy td { border-bottom: 1px solid var(--line); padding: 10px 8px; text-align: left; }
.prose-copy .wp-block-button__link { background: var(--ink); color: var(--white); text-decoration: none; border-radius: 8px; padding: 12px 18px; font-size: 13px; }

/* WordPress core alignment classes */
.alignleft { float: left; margin: 6px 24px 16px 0; }
.alignright { float: right; margin: 6px 0 16px 24px; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; text-align: center; }
.alignwide { margin-left: -65px; margin-right: -65px; max-width: none; }
.alignfull { margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); max-width: 100vw; width: 100vw; }
.alignfull img, .alignwide img { width: 100%; }
.wp-caption { max-width: 100%; }
.sticky, .gallery-caption, .bypostauthor { }

/* Previous / next article */
.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 40px; }
.post-nav a {
	border: 2px solid var(--ink); border-radius: 14px; padding: 16px 18px;
	font-size: 14px; font-weight: 700; line-height: 1.45; transition: transform .2s;
}
.post-nav a:hover { transform: translateY(-2px); }
.post-nav span { display: block; font-size: 9px; font-weight: 600; letter-spacing: 1.2px; text-transform: uppercase; color: var(--subtle); margin-bottom: 6px; }
.post-nav-next { grid-column: 2; text-align: right; }

/* Comments */
.comments-area { border-top: 1.5px solid var(--line); margin-top: 40px; padding-top: 30px; }
.comments-title, .comment-reply-title { font-size: 18px; letter-spacing: -.4px; }
.comment-list { list-style: none; padding: 0; }
.comment-list .children { list-style: none; padding-left: 24px; }
.comment-body { border-bottom: 1px solid var(--line); padding: 18px 0; font-size: 13px; line-height: 1.8; color: #555; }
.comment-meta { font-size: 11px; color: var(--subtle); }
.comment-author { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 700; }
.comment-author img { border-radius: 50%; }
.comment-form label { display: block; font-size: 11px; font-weight: 600; margin-bottom: 6px; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea {
	width: 100%; border: 1.5px solid var(--line); border-radius: 10px; padding: 11px 13px; font-size: 13px; background: var(--white);
}
.comment-form input[type="submit"] { background: var(--ink); color: var(--white); border: 0; border-radius: 8px; padding: 12px 20px; cursor: pointer; }

/* ---------- 404 ---------- */
.not-found { min-height: 50vh; }

/* ---------- Footer ---------- */
.site-footer {
	background: var(--dark); color: var(--paper); display: flex; justify-content: space-between; gap: 25px;
	padding: 45px max(40px, calc((100vw - 1120px) / 2)) 43px;
}
.footer-brand { font-size: 21px; letter-spacing: -.7px; font-weight: 700; }
.site-footer p { font-size: 10px; color: #dddddd; margin: 10px 0 0; }
.footer-right { display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; gap: 20px; }
.footer-right a { font-size: 10px; display: flex; align-items: center; gap: 8px; }
.footer-right > span { font-size: 9px; color: #dddddd; }

/* ---------- Responsive ---------- */
@media (min-width: 1500px) {
	main { max-width: 1180px; }
	.header-inner { max-width: 1260px; }
	.site-footer { padding-left: calc((100vw - 1180px) / 2); padding-right: calc((100vw - 1180px) / 2); }
}
@media (max-width: 1200px) {
	main { max-width: calc(100% - 80px); }
	.header-note { display: none; }
}
@media (max-width: 850px) {
	.article-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.header-inner { height: auto; min-height: 100px; flex-wrap: wrap; padding: 24px 30px 0; gap: 15px; }
	.header-inner nav { height: 48px; gap: 24px; }
	.nav-link.active::after { bottom: 0; }
	.intro-side { display: none; }
	main { max-width: calc(100% - 60px); }
	.introduction { padding: 55px 0 40px; }
	.site-footer { padding: 35px 30px; }
	.reader-content { padding: 40px 0 56px; }
	.alignwide { margin-left: 0; margin-right: 0; }
}
@media (max-width: 560px) {
	.header-inner { padding: 22px 22px 0; display: block; }
	.wordmark { font-size: 22px; padding: 0; }
	.header-inner nav { margin-top: 15px; gap: 0; justify-content: space-between; overflow-x: auto; }
	.nav-link { font-size: 11px; min-height: 44px; }
	.nav-link.active::after { bottom: 0; }
	main { max-width: calc(100% - 44px); }
	.introduction { padding: 43px 0 31px; }
	.intro-label { font-size: 8px; letter-spacing: 1.1px; }
	.introduction h1 { font-size: 47px; letter-spacing: -2px; margin-top: 22px; }
	.introduction > p { font-size: 12px; max-width: 310px; }
	.article-grid { grid-template-columns: 1fr; gap: 15px; }
	.section-toolbar { padding: 23px 0; }
	.article-card { min-height: 245px; padding: 25px; }
	.article-card h3 { font-size: 23px; max-width: 280px; margin-top: 20px; }
	.article-card p { font-size: 12px; }
	.article-meta { font-size: 10px; }
	.article-bottom > span:first-child { font-size: 10px; }
	.search-field input { width: 95px; }
	.end-note { font-size: 10px; gap: 10px; margin: 38px 0; }
	.end-note > span { width: 20px; }
	.site-footer { padding: 32px 22px; flex-direction: column; }
	.footer-right { align-items: flex-start; }
	.about-section { grid-template-columns: 1fr; padding: 35px 0 50px; gap: 30px; }
	.about-section h2 { font-size: 32px; }
	.reader-content { padding: 25px 0 48px; }
	.reader-title { font-size: 29px; }
	.prose-copy, .prose-copy p { font-size: 14px; }
	.back-button { margin-bottom: 30px; }
	.post-nav { grid-template-columns: 1fr; }
	.post-nav-next { grid-column: 1; }
	.alignleft, .alignright { float: none; margin: 0 0 16px; }
}
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { transition: none !important; }
}
