/*
Theme Name: Awikwok
Theme URI: https://teguhsantoso.net/
Author: Teguh Santoso
Author URI: https://teguhsantoso.net/
Description: Blog pribadi Teguh Santoso — guru penuh waktu, developer paruh waktu. Tema ringan, responsif, dengan mode malam.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: awikwok
Tags: blog, one-column, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready
*/

/* Awikwok — CSS disalin 1:1 dari html-template; blok kompatibilitas WP ada di paling bawah. */

:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-trans: rgba(255, 255, 255, 0.97);
  --ink: #171717;
  --ink-soft: #363636;
  --muted: #5f5f5f;
  --faint: #8a8a8a;
  --line: #e6e6e6;
  --soft: #f6f6f6;
  --accent: #ff6719;
  --accent-dark: #d9530a;
  --code-bg: #202020;
  --serif: "Spectral", Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --max: 1120px;
  --measure: 700px;
  --radius-s: 6px;
  --radius-m: 10px;
  --radius-l: 14px;
}

/* ---------- dark mode (aktif via data-theme="dark" di <html>) ---------- */

[data-theme="dark"] {
  --bg: #161616;
  --ink: #ededed;
  --ink-soft: #d4d4d4;
  --muted: #a3a3a3;
  --faint: #7c7c7c;
  --line: #2c2c2c;
  --soft: #212121;
  --accent: #ff7a33;
  --accent-dark: #ff8a4d;
  --code-bg: #0e0e0e;
  --surface: #161616;
  --surface-trans: rgba(22, 22, 22, 0.97);
  color-scheme: dark;
}

[data-theme="dark"] .top-list li::before { color: #3d3d3d; }
[data-theme="dark"] .btn-dark { background: #f2f2f2; border-color: #f2f2f2; color: #161616; }
[data-theme="dark"] .btn-dark:hover { background: #ffffff; }
[data-theme="dark"] .hero-logo { box-shadow: 0 4px 18px rgba(0, 0, 0, 0.5); }
[data-theme="dark"] .prose pre { border: 1px solid var(--line); }

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; height: auto; display: block; }

a { color: inherit; }

h1, h2, h3 { line-height: 1.2; text-wrap: balance; }

::selection { background: var(--accent); color: #fff; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- utilities ---------- */

.container {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: 24px;
}

.measure { max-width: var(--measure); margin-inline: auto; }

.skip-link {
  position: absolute;
  left: 16px;
  top: -48px;
  z-index: 100;
  background: var(--ink);
  color: #fff;
  padding: 10px 16px;
  border-radius: var(--radius-s);
  text-decoration: none;
  transition: top 0.15s ease;
}

.skip-link:focus { top: 12px; color: #fff; }

/* ---------- buttons & forms ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 600;
  padding: 11px 20px;
  border-radius: var(--radius-m);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); }

.btn-ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink); }

.btn-dark { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn-dark:hover { background: var(--ink-soft); }

/* ---------- top bar ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--surface-trans);
  border-bottom: 1px solid var(--line);
}

.topbar-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  height: 66px;
}

.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
}

.brand-name {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.main-nav { display: flex; gap: 4px; margin-left: auto; }

.main-nav a {
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink-soft);
  padding: 8px 12px;
  border-radius: 8px;
}

.main-nav a:hover { background: var(--soft); color: var(--ink); }
.main-nav a[aria-current="page"] { color: var(--ink); font-weight: 700; }

.topbar-actions { display: flex; align-items: center; gap: 10px; }

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid transparent;
  background: transparent;
  border-radius: 50%;
  cursor: pointer;
  color: var(--ink-soft);
}

.icon-btn:hover { background: var(--soft); color: var(--ink); }

.theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: block; }

.nav-toggle { display: none; }

.mobile-nav {
  display: none;
  border-top: 1px solid var(--line);
  padding: 8px 24px 16px;
}

.mobile-nav a {
  display: block;
  text-decoration: none;
  font-weight: 600;
  padding: 12px 4px;
  border-bottom: 1px solid var(--line);
}

.mobile-nav a:last-child { border-bottom: 0; }
.mobile-nav.open { display: block; }

/* ---------- hero ---------- */

.hero { text-align: center; padding: 64px 0 40px; }

.hero-logo {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  overflow: hidden;
  margin: 0 auto 20px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.12);
}

.hero h1 {
  font-family: var(--serif);
  font-size: clamp(34px, 5vw, 48px);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
}

.hero .tagline {
  font-size: 18px;
  color: var(--muted);
  max-width: 640px;
  margin: 0 auto 28px;
}

/* ---------- sections & featured ---------- */

.section { padding: 48px 0; }

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
}

.section-head h2 {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 700;
  margin: 0;
}

.section-head a {
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
}

.section-head a:hover { color: var(--accent-dark); }

.featured {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  overflow: hidden;
  margin-top: 24px;
  text-decoration: none;
}

.featured:hover .featured-title { text-decoration: underline; }

.featured-body { padding: 36px; display: flex; flex-direction: column; justify-content: center; }

.featured-kicker {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-dark);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
}

.featured-title {
  font-family: var(--serif);
  font-size: clamp(26px, 3.4vw, 34px);
  font-weight: 700;
  letter-spacing: -0.015em;
  margin: 0 0 12px;
}

.featured-excerpt { color: var(--muted); font-size: 16px; margin: 0 0 20px; }

.featured-cover { min-height: 280px; background: var(--soft); }

.featured-cover img, .featured-cover svg { width: 100%; height: 100%; object-fit: cover; }

/* ---------- post list rows ---------- */

.post-list { list-style: none; margin: 0; padding: 0; }

.post-row {
  display: grid;
  grid-template-columns: 1fr 180px;
  gap: 28px;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
}

.post-row:last-child { border-bottom: 0; }

.post-row-text { min-width: 0; }

.post-row-title {
  font-family: var(--serif);
  font-size: 23px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 8px;
}

.post-row-title a { text-decoration: none; }
.post-row-title a:hover { text-decoration: underline; }

.post-row-excerpt {
  color: var(--muted);
  margin: 0 0 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--faint);
  flex-wrap: wrap;
}

.post-meta .avatar { width: 24px; height: 24px; border-radius: 50%; overflow: hidden; }
.post-meta .author { font-weight: 600; color: var(--ink-soft); }
.post-meta .dot::before { content: "\00B7"; margin-right: 8px; }

.post-row-thumb {
  width: 180px;
  height: 120px;
  border-radius: var(--radius-s);
  overflow: hidden;
  background: var(--soft);
  align-self: start;
}

.post-row-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- two-column: latest + top ---------- */

.columns { display: grid; grid-template-columns: 1fr 320px; gap: 56px; }

.side-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  padding: 24px;
  margin-bottom: 24px;
}

.side-card h3 { font-family: var(--serif); font-size: 19px; margin: 0 0 12px; }
.side-card p { font-size: 14px; color: var(--muted); margin: 0 0 16px; }

.top-list { list-style: none; margin: 0; padding: 0; counter-reset: top; }

.top-list li {
  counter-increment: top;
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
}

.top-list li:last-child { border-bottom: 0; }

.top-list li::before {
  content: counter(top);
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 700;
  color: var(--line);
  line-height: 1.3;
  min-width: 22px;
}

.top-list a { text-decoration: none; font-weight: 600; }
.top-list a:hover { text-decoration: underline; }
.top-list small { display: block; color: var(--faint); font-weight: 400; font-size: 13px; }

/* ---------- footer ---------- */

.site-footer { padding: 56px 0 0; }

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
}

.footer-brand p { font-size: 14px; color: var(--muted); max-width: 320px; }

.social-row { display: flex; gap: 8px; margin-top: 16px; }

.footer-col h4 { font-size: 14px; margin: 0 0 12px; color: var(--ink); }
.footer-col ul { list-style: none; margin: 0; padding: 0; }

.footer-col li { margin-bottom: 8px; }

.footer-col a {
  text-decoration: none;
  font-size: 14px;
  color: var(--muted);
}

.footer-col a:hover { color: var(--ink); text-decoration: underline; }

.footer-bottom {
  border-top: 1px solid var(--line);
  padding: 20px 0;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--faint);
}

.footer-bottom nav { display: flex; gap: 16px; }
.footer-bottom a { color: var(--faint); text-decoration: none; }
.footer-bottom a:hover { color: var(--ink); text-decoration: underline; }

/* ---------- article page ---------- */

.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0;
  background: var(--accent);
  z-index: 60;
}

.article { padding: 48px 0 24px; }

.article-kicker {
  font-size: 14px;
  font-weight: 700;
  color: var(--accent-dark);
  text-decoration: none;
}

.article-kicker:hover { text-decoration: underline; }

.article h1 {
  font-family: var(--serif);
  font-size: clamp(30px, 4.6vw, 42px);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 12px 0;
}

.article-subtitle {
  font-family: var(--serif);
  font-size: 20px;
  color: var(--muted);
  margin: 0 0 28px;
}

.byline {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-bottom: 32px;
}

.byline .avatar { width: 46px; height: 46px; border-radius: 50%; overflow: hidden; flex-shrink: 0; }
.byline-name { font-weight: 700; font-size: 15px; }
.byline-date { font-size: 13px; color: var(--faint); }

.byline-share { margin-left: auto; display: flex; gap: 6px; }

.article-cover { border-radius: var(--radius-m); overflow: hidden; margin-bottom: 36px; }

.prose { font-family: var(--serif); font-size: 18px; line-height: 1.8; }

.prose p { margin: 0 0 1.5em; }

.prose h2 {
  font-size: 27px;
  letter-spacing: -0.015em;
  margin: 2em 0 0.7em;
}

.prose ul, .prose ol { margin: 0 0 1.5em; padding-left: 1.4em; }
.prose li { margin-bottom: 0.5em; }

.prose blockquote {
  margin: 2em 0;
  padding: 0;
  font-size: 24px;
  line-height: 1.5;
  text-align: center;
  color: var(--ink);
}

.prose blockquote p { margin: 0; }
.prose blockquote cite {
  display: block;
  margin-top: 12px;
  font-family: var(--sans);
  font-size: 14px;
  font-style: normal;
  color: var(--faint);
}

.prose pre {
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.6;
  background: var(--code-bg);
  color: #f2f2f2;
  padding: 20px 22px;
  border-radius: var(--radius-s);
  overflow-x: auto;
  margin: 0 0 1.8em;
}

.prose code { font-family: var(--mono); font-size: 0.85em; }

.prose p code {
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1px 6px;
}

.prose hr {
  border: 0;
  text-align: center;
  margin: 2.5em 0;
  color: var(--faint);
  letter-spacing: 0.6em;
}

.prose hr::after { content: "\00B7\00B7\00B7"; font-size: 22px; }

.article-actions {
  display: flex;
  gap: 10px;
  margin: 36px 0;
  flex-wrap: wrap;
}

.pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-soft);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 18px;
  cursor: pointer;
}

.pill-btn:hover { border-color: var(--ink); }

.article-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }

.article-tags a {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  background: var(--soft);
  border-radius: 999px;
  padding: 6px 14px;
}

.article-tags a:hover { color: var(--ink); }

.author-card {
  display: flex;
  gap: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  padding: 28px;
  margin: 40px 0;
}

.author-card .avatar { width: 72px; height: 72px; border-radius: 50%; overflow: hidden; flex-shrink: 0; }
.author-card h3 { font-family: var(--serif); font-size: 20px; margin: 0 0 8px; }
.author-card p { font-size: 15px; color: var(--muted); margin: 0 0 16px; }

/* ---------- related grid ---------- */

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-top: 24px;
}

.related-card { text-decoration: none; }

.related-thumb {
  border-radius: var(--radius-s);
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: var(--soft);
  margin-bottom: 14px;
}

.related-thumb img { width: 100%; height: 100%; object-fit: cover; }

.related-card h3 {
  font-family: var(--serif);
  font-size: 18px;
  margin: 0 0 6px;
}

.related-card:hover h3 { text-decoration: underline; }

.related-card .post-meta { margin-top: 8px; }

/* ---------- archive & about pages ---------- */

.page-hero { text-align: center; padding: 56px 0 32px; }

.page-hero h1 {
  font-family: var(--serif);
  font-size: clamp(30px, 4.4vw, 40px);
  letter-spacing: -0.02em;
  margin: 0 0 10px;
}

.page-hero p { color: var(--muted); max-width: 560px; margin: 0 auto; }

.archive-tools {
  display: flex;
  gap: 10px;
  max-width: 560px;
  margin: 28px auto 0;
}

.archive-tools input[type="search"] {
  flex: 1;
  min-width: 0;
  font: inherit;
  font-size: 15px;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  background: var(--surface);
}

.archive-month {
  font-family: var(--serif);
  font-size: 22px;
  margin: 40px 0 0;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--ink);
}

.archive-empty { display: none; text-align: center; color: var(--muted); padding: 40px 0; }

.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 40px 0 8px;
}

.pagination a, .pagination span {
  min-width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-soft);
  padding-inline: 12px;
}

.pagination a:hover { border-color: var(--ink); }
.pagination [aria-current="page"] { background: var(--ink); border-color: var(--ink); color: #fff; }

.about-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 36px 0;
}

.stat { text-align: center; padding: 24px 12px; background: var(--soft); border-radius: var(--radius-m); }
.stat strong { display: block; font-family: var(--serif); font-size: 30px; }
.stat span { font-size: 13px; color: var(--muted); }

/* ---------- responsive ---------- */

@media (max-width: 960px) {
  .columns { grid-template-columns: 1fr; gap: 40px; }
  .featured { grid-template-columns: 1fr; }
  .featured-cover { min-height: 220px; order: -1; }
  .related-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  .main-nav { display: none; }
  .nav-toggle { display: inline-flex; }
  .topbar-actions { margin-left: auto; }
  .post-row { grid-template-columns: 1fr 112px; gap: 16px; }
  .post-row-thumb { width: 112px; height: 84px; }
  .post-row-title { font-size: 19px; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .related-grid { grid-template-columns: 1fr; }
  .byline-share { display: none; }
  .author-card { flex-direction: column; }
  .about-stats { grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
  .stat strong { font-size: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}

/* ==========================================================================
   AWIKWOK-WP-COMPAT — tambahan khusus WordPress (menu, overlay, komentar).
   CSS di atas blok ini identik 1:1 dengan html-template.
   ========================================================================== */

.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;
  width: 1px;
  word-wrap: normal !important;
}

.main-nav ul {
  display: flex;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.mobile-nav ul { margin: 0; padding: 0; list-style: none; }
.mobile-nav li { border-bottom: 1px solid var(--line); }
.mobile-nav li:last-child { border-bottom: 0; }
.mobile-nav li a { border-bottom: 0; }

.brand-mark img, .avatar img { width: 100%; height: 100%; object-fit: cover; }

.search-overlay {
  border-top: 1px solid var(--line);
  background: var(--surface);
  padding: 16px 0;
}

.search-overlay[hidden] { display: none; }

.search-overlay-inner {
  display: flex;
  gap: 10px;
  align-items: center;
  max-width: 640px;
}

.search-overlay .archive-tools { margin: 0; flex: 1; max-width: none; }

.comments-area { margin: 40px 0; }

.comments-title { font-family: var(--serif); font-size: 24px; margin: 0 0 8px; }

.comment-list { list-style: none; margin: 0 0 24px; padding: 0; }
.comment-list .children { list-style: none; margin-left: 24px; padding: 0; }
.comment-list .comment { border-bottom: 1px solid var(--line); padding: 20px 0; }
.comment-author { display: flex; align-items: center; gap: 12px; }
.comment-author img { border-radius: 50%; }
.comment-meta { font-size: 13px; color: var(--faint); margin: 6px 0 10px; }
.comment-meta a { color: inherit; }
.comment-body p { margin: 0 0 10px; }
.reply a { font-size: 14px; font-weight: 600; }

.comment-form label { display: block; font-size: 14px; font-weight: 600; margin: 12px 0 6px; }

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%;
  font: inherit;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  background: var(--surface);
  color: var(--ink);
}

.comment-form-cookies-consent { display: flex; gap: 8px; align-items: baseline; }
.comment-form-cookies-consent label { font-weight: 400; }

.prose img { height: auto; border-radius: var(--radius-s); }
.prose figure { margin: 0 0 1.5em; }
.prose figcaption {
  font-family: var(--sans);
  font-size: 14px;
  color: var(--faint);
  text-align: center;
  margin-top: 8px;
}
