/*
Theme Name: UlasTekno
Theme URI: https://ulastekno.web.id/
Author: UlasTekno
Author URI: https://ulastekno.web.id/
Description: Tema editorial kustom untuk ulastekno.web.id, dibangun dari design system NALAR: token warna Ink/Paper/Lavender/Lime, tipografi DM Sans, radius nol, layout editorial, dan komponen kartu, chip, serta tombol yang sama.
Version: 1.1
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ulastekno
*/

/* ============ Token (NALAR Design System v1.0) ============ */
:root {
  --bg: #101012;
  --surface: #1b1b1f;
  --ink: #f6f5f0;
  --muted: #a5a5ae;
  --line: #3a3a40;
  --purple: #b89aff;
  --lime: #dbff00;
  --on-lime: #111114;
  --radius: 0;
  --ease: cubic-bezier(.22, 1, .36, 1);
}
[data-theme="light"] {
  --bg: #f6f5f0;
  --surface: #eae8e1;
  --ink: #151517;
  --muted: #62616b;
  --line: #cccad1;
  --purple: #6834ce;
  --lime: #d1f000;
}

/* ============ Base ============ */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 100px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'DM Sans', Arial, sans-serif;
  transition: background .3s, color .3s;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button, a, input { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; color: inherit; }
button:disabled { opacity: .4; cursor: not-allowed; }
button:focus-visible, a:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 2px solid var(--purple);
  outline-offset: 5px;
}
button.plain { border: 0; background: none; padding: 8px; }
img { max-width: 100%; height: auto; }
h1, h2, h3, h4, p { margin: 0; }
h1 { font-size: clamp(48px, 5.5vw, 84px); font-weight: 1000; letter-spacing: -.065em; line-height: .99; }
h2 { font-size: clamp(32px, 4.5vw, 62px); line-height: 1; letter-spacing: -.055em; font-weight: 1000; }
h3 { font-size: 24px; line-height: 1.14; letter-spacing: -.04em; font-weight: 900; }
::selection { background: var(--purple); color: #111; }
.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;
}
.skip {
  position: fixed; top: -100px; left: 20px; z-index: 200;
  background: var(--lime); color: #111; padding: 15px; font-weight: 700;
}
.skip:focus { top: 10px; }

/* ============ Layout ============ */
.wrap { max-width: 1440px; margin: auto; padding: 0 48px; }
.masthead {
  display: flex; align-items: center; gap: 40px;
  min-height: 112px; border-bottom: 1px solid var(--line);
}
.logo {
  font-weight: 1000; letter-spacing: -.09em;
  font-size: 80px; line-height: 1; color: var(--purple);
  white-space: nowrap;
}
.desktop-nav, .footer-links nav { display: flex; gap: 25px; align-items: center; }
.desktop-nav, .desktop-nav a, .footer-links a { font-size: 13px; font-weight: 700; }
.desktop-nav a:hover, .footer-links a:hover { color: var(--purple); }
.header-actions { margin-left: auto; display: flex; gap: 12px; align-items: center; }
.icon { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.7; }
.theme-toggle { font-size: 24px; line-height: 1; }
.tagline {
  font-size: 10px; letter-spacing: .2em; text-align: right;
  padding: 13px 0; color: var(--muted); text-transform: uppercase;
}
.eyebrow {
  font-size: 11px; font-weight: 800; letter-spacing: .12em;
  text-transform: uppercase; color: var(--lime);
}
[data-theme="light"] .eyebrow { color: var(--purple); }
.accent { color: var(--purple); }
.description { font-size: 15px; line-height: 1.75; color: var(--muted); max-width: 540px; }
.meta {
  font-size: 10px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted); margin-top: 24px; display: flex; gap: 14px; flex-wrap: wrap;
}
.meta a:hover { color: var(--purple); }

/* ============ Hero ============ */
.hero { display: grid; grid-template-columns: 1fr 1.08fr; gap: 32px; padding: 12px 0 38px; }
.hero-copy { display: flex; flex-direction: column; justify-content: center; padding: 12px 0; }
.hero h1 { margin: 22px 0; }
.hero h1 a:hover { color: var(--purple); }
.image-wrap { overflow: hidden; position: relative; background: var(--surface); }
.image-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .8s var(--ease); }
a:hover .image-wrap img, a.image-wrap:hover img { transform: scale(1.04); }
.hero-image { min-height: 460px; }
.hero-image img { position: absolute; inset: 0; }
.hero-placeholder {
  min-height: 460px; display: grid; place-items: center;
  background: var(--purple); color: #111;
  font-weight: 1000; letter-spacing: -.06em; font-size: clamp(40px, 5vw, 72px);
  padding: 24px; text-align: center;
}
.arrow {
  background: var(--lime); color: #111; display: grid; place-items: center;
  width: 52px; height: 52px; font-size: 28px; position: absolute; bottom: 0; right: 0;
}

/* ============ Sections, cards, editorial ============ */
.section-top {
  border-top: 1px solid var(--line); padding-top: 24px;
  display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px;
}
.section-top h2 { font-size: clamp(32px, 4.5vw, 62px); }
.text-link { color: var(--purple); font-size: 13px; font-weight: 700; }
.editorial { display: grid; grid-template-columns: 1fr 310px; gap: 40px; margin-bottom: 70px; }
.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 24px; }
.cards.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card .image-wrap { aspect-ratio: 1.8; }
.card .eyebrow { display: block; margin: 17px 0 10px; }
.card .description { font-size: 13px; margin-top: 12px; }
.card h3 a:hover { color: var(--purple); }
.card-footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.card-footer .meta { margin-top: 18px; }
.card-placeholder {
  aspect-ratio: 1.8; display: grid; place-items: center;
  background: var(--surface); color: var(--purple);
  font-weight: 1000; letter-spacing: -.05em; font-size: 28px; padding: 16px; text-align: center;
}
.save { background: none; border: 1px solid var(--line); padding: 7px 10px; font-size: 14px; }
.save.active { color: var(--purple); border-color: var(--purple); }
.editor { border-top: 3px solid var(--purple); }
.editor h3 { font-size: 14px; letter-spacing: 0; color: var(--purple); padding: 14px 0; }
.editor-item { padding: 24px 0; display: grid; grid-template-columns: 26px 1fr; gap: 12px; border-bottom: 1px solid var(--line); }
.editor-item:hover h4 { color: var(--purple); }
.number { color: var(--lime); font-weight: 800; }
[data-theme="light"] .number { color: var(--purple); }
.editor-item h4 { font-size: 17px; line-height: 1.3; margin: 0 0 9px; }
.editor-item p { font-size: 12px; line-height: 1.65; color: var(--muted); }
.panel { padding: 28px; border: 1px solid var(--line); margin: 20px 0; }
.panel .description { margin-top: 12px; }

/* ============ Page heading, chips, buttons, fields ============ */
.page-heading { padding: 55px 0 40px; }
.page-heading h1 { margin: 15px 0 20px; }
.chips { display: flex; gap: 9px; flex-wrap: wrap; margin: 24px 0; }
.chip {
  background: none; border: 1px solid var(--line); padding: 10px 18px;
  color: var(--ink); font-size: 12px; display: inline-block;
}
.chip.active { background: var(--purple); color: var(--bg); border-color: var(--purple); }
a.chip:hover { border-color: var(--purple); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  padding: 14px 22px; border: 1px solid transparent; background: var(--lime);
  color: #111; font-weight: 800; font-size: 13px;
  transition: transform .25s, background .25s;
}
.btn:hover { transform: translateY(-2px); background: #c8ec00; }
.btn.secondary { color: var(--ink); background: transparent; border-color: var(--line); }
.btn.secondary:hover { background: transparent; border-color: var(--purple); }
.field {
  width: 100%; padding: 15px; background: var(--surface);
  border: 1px solid var(--line); color: var(--ink); border-radius: 0;
}
textarea.field { min-height: 140px; resize: vertical; }
.load { text-align: center; margin: 40px 0 60px; }
.empty { padding: 50px 0; color: var(--muted); }

/* ============ Footer ============ */
.footer {
  border-top: 1px solid var(--line); padding: 36px 0;
  display: flex; justify-content: space-between; gap: 24px; align-items: center;
}
.footer .logo { font-size: 38px; }
.footer-links { display: flex; gap: 22px; font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.fineprint { font-size: 11px; color: var(--muted); padding-bottom: 28px; }

/* ============ Article ============ */
.article-title { max-width: 1050px; }
.article-cover { aspect-ratio: 2.4; margin-bottom: 40px; }
.article-cover img { position: absolute; inset: 0; }
.reading-layout {
  display: grid; grid-template-columns: 190px minmax(0, 760px);
  gap: 60px; justify-content: center;
}
.toc { position: sticky; top: 30px; align-self: start; font-size: 12px; line-height: 1.6; }
.toc strong { display: block; margin-bottom: 8px; letter-spacing: .08em; }
.toc a { display: block; padding: 10px 0; color: var(--muted); }
.toc a:hover { color: var(--purple); }
.prose { font-size: 17px; line-height: 1.9; color: var(--ink); min-width: 0; }
.prose > *:first-child { margin-top: 0; }
.prose p { margin: 0 0 26px; }
.prose h2 { font-size: 32px; letter-spacing: -.035em; line-height: 1.2; margin: 40px 0 20px; }
.prose h3 { font-size: 24px; margin: 34px 0 16px; }
.prose h4 { font-size: 19px; margin: 28px 0 12px; }
.prose blockquote {
  font-size: 30px; line-height: 1.4; font-weight: 800; letter-spacing: -.03em;
  border-left: 4px solid var(--purple); padding-left: 26px; margin: 38px 0; color: var(--purple);
}
.prose blockquote p { margin: 0; }
.prose li { padding: 6px 0; }
.prose a { color: var(--purple); text-decoration: underline; text-underline-offset: 3px; }
.prose img { border: 0; }
.prose figure { margin: 0 0 26px; }
.prose figcaption { font-size: 12px; color: var(--muted); margin-top: 10px; }
.prose pre {
  background: var(--surface); padding: 20px; overflow: auto;
  font-size: 14px; line-height: 1.6; border: 1px solid var(--line);
}
.prose code { background: var(--surface); padding: 2px 6px; font-size: .9em; }
.prose pre code { background: none; padding: 0; }
.prose table { border-collapse: collapse; width: 100%; font-size: 15px; margin: 0 0 26px; }
.prose th, .prose td { border: 1px solid var(--line); padding: 10px 14px; text-align: left; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 38px 0; }
.prose ul, .prose ol { margin: 0 0 26px; padding-left: 24px; }
.author-box { padding: 25px; border: 1px solid var(--line); margin: 40px 0; display: flex; gap: 20px; align-items: flex-start; }
.author-box img { border-radius: 50%; flex-shrink: 0; }
.author-box h3 { font-size: 19px; margin-bottom: 8px; }
.author-box p { font-size: 14px; line-height: 1.7; color: var(--muted); }
.read-progress { height: 3px; position: fixed; top: 0; left: 0; background: var(--lime); z-index: 130; width: 0; }
.post-nav {
  display: grid; grid-template-columns: 1fr 1fr; gap: 24px;
  border-top: 1px solid var(--line); margin: 50px 0; padding-top: 30px;
}
.post-nav a { display: block; }
.post-nav .nav-next { text-align: right; }
.post-nav h4 { font-size: 17px; line-height: 1.3; margin-top: 8px; }
.post-nav a:hover h4 { color: var(--purple); }

/* ============ Comments ============ */
.comments-area { border-top: 1px solid var(--line); margin: 50px 0; padding-top: 30px; }
.comments-area h2 { font-size: 32px; margin-bottom: 24px; }
.comment-list { list-style: none; margin: 0 0 30px; padding: 0; }
.comment-list li { border-bottom: 1px solid var(--line); padding: 22px 0; }
.comment-list .children { list-style: none; margin: 22px 0 0 40px; padding: 0; }
.comment-author { display: flex; gap: 14px; align-items: center; margin-bottom: 10px; }
.comment-author img { border-radius: 50%; }
.comment-author .fn { font-weight: 800; }
.comment-meta { font-size: 11px; color: var(--muted); margin-bottom: 10px; }
.comment-meta a { color: var(--muted); }
.comment-body p { font-size: 15px; line-height: 1.75; margin: 0 0 12px; }
.reply a { font-size: 12px; font-weight: 700; color: var(--purple); }
.comment-form p { margin: 0 0 16px; }
.comment-form label { display: block; font-size: 13px; margin-bottom: 8px; }
.comment-form .comment-form-cookies-consent label { display: inline; margin: 0 0 0 8px; }

/* ============ Pagination ============ */
.nav-links { display: flex; gap: 9px; flex-wrap: wrap; margin: 40px 0 60px; }
.nav-links .page-numbers {
  border: 1px solid var(--line); padding: 10px 18px; font-size: 12px; font-weight: 700;
}
.nav-links .page-numbers.current { background: var(--purple); color: var(--bg); border-color: var(--purple); }
.nav-links a.page-numbers:hover { border-color: var(--purple); }

/* ============ Overlays: search + mobile menu + toast ============ */
.overlay {
  position: fixed; inset: 0; background: rgba(0, 0, 0, .7); z-index: 90;
  backdrop-filter: blur(12px); padding: 8vh 22px; overflow: auto;
}
.search-panel {
  background: var(--bg); border: 1px solid var(--line);
  max-width: 760px; margin: auto; padding: 30px;
}
.search-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; gap: 16px; }
.search-row h2 { font-size: 32px; }
.search-panel .btn { margin-top: 12px; }
.search-hint { font-size: 12px; color: var(--muted); margin-top: 16px; }
.mobile-panel {
  position: fixed; inset: 0; background: var(--bg);
  padding: 25px; z-index: 100; overflow: auto;
}
.mobile-panel .panel-top { display: flex; align-items: center; justify-content: space-between; }
.mobile-panel nav { display: flex; flex-direction: column; align-items: flex-start; margin-top: 55px; gap: 0; }
.mobile-panel nav a { font-size: 32px; font-weight: 1000; letter-spacing: -.04em; padding: 12px 0; }
.mobile-panel nav a:hover { color: var(--purple); }
.close-btn { font-size: 32px; line-height: 1; }
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  padding: 16px 24px; background: var(--lime); color: #111; z-index: 120;
  box-shadow: 0 8px 40px rgba(0, 0, 0, .3); font-size: 13px;
  max-width: 90%; width: max-content; display: none;
}
.toast.show { display: block; }
[hidden] { display: none !important; }
.mobile-only { display: none !important; }
.reveal { animation: enter .8s var(--ease) both; }
@keyframes enter { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

/* ============ Responsive ============ */
@media (min-width: 1600px) { .wrap { max-width: 1500px; } }
@media (max-width: 1100px) {
  .wrap { padding: 0 28px; }
  .masthead { gap: 28px; }
  .desktop-nav { gap: 15px; }
  .logo { font-size: 65px; }
  .editorial { grid-template-columns: 1fr 260px; gap: 28px; }
  .hero-image, .hero-placeholder { min-height: 410px; }
  .hero h1 { font-size: 64px; }
  .cards.three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .wrap { padding: 0 20px; }
  .desktop-nav { display: none; }
  .mobile-only { display: inline-flex !important; }
  .masthead { min-height: 83px; }
  .logo { font-size: 55px; }
  .tagline { text-align: left; font-size: 8px; padding: 14px 0; }
  .hero { grid-template-columns: 1fr; gap: 22px; }
  .hero h1 { font-size: clamp(48px, 11vw, 74px); max-width: 650px; }
  .hero-image, .hero-placeholder { min-height: 0; height: 320px; order: 2; }
  .editorial { grid-template-columns: 1fr; }
  .editor { margin-top: 20px; }
  .cards, .cards.three { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 16px; }
  .card h3 { font-size: 20px; }
  .footer { flex-wrap: wrap; }
  .footer-links { flex-wrap: wrap; gap: 18px; }
  .reading-layout { display: block; }
  .toc { position: relative; margin-bottom: 30px; border-bottom: 1px solid var(--line); padding-bottom: 20px; }
  .toc a { display: inline-block; margin-right: 18px; }
  .page-heading { padding: 35px 0; }
  .page-heading h1 { font-size: 54px; }
  .article-cover { aspect-ratio: 1.6; }
  .prose { font-size: 16px; }
  .overlay { padding: 20px 12px; }
  .search-panel { padding: 20px; }
  .author-box { flex-direction: column; }
  .post-nav { grid-template-columns: 1fr; }
  .post-nav .nav-next { text-align: left; }
}
@media (max-width: 430px) {
  .cards, .cards.three { grid-template-columns: 1fr; }
  .card h3 { font-size: 25px; }
  .hero-image, .hero-placeholder { height: 270px; }
  .header-actions { gap: 4px; }
  .logo { font-size: 48px; }
  .hero h1 { font-size: 49px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *:before, *:after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
